This prompt is designed for orchestration engineers and platform builders who need a standardized way for agents to announce task completion. Use it when an agent finishes a delegated task and must communicate results, confidence, evidence, and recommended next steps to the orchestrator or downstream agent. The primary job-to-be-done is enforcing a structured output contract so that completion payloads are machine-parseable, auditable, and safe to act on without manual inspection. The ideal user is an AI platform engineer wiring together agent graphs, DAG-based executors, or event-driven agent meshes where a missing or malformed completion signal can stall the entire pipeline.
Prompt
Agent Completion Notification Prompt Template

When to Use This Prompt
Defines the exact conditions and system architecture where the Agent Completion Notification prompt delivers value, and where it introduces risk.
This prompt is not appropriate for progress updates mid-task, error reporting, or handoff summaries between agents with different capability scopes. Those scenarios require separate templates with different output contracts—progress updates need partial result fields and estimated time remaining, error reports need stack traces and retry eligibility flags, and handoff summaries need recipient-specific action items. Using this completion prompt for those purposes will produce payloads that are either missing critical fields or misleadingly marked as terminal. The prompt assumes the agent has fully completed its assigned work and is ready to yield control. If your agent is in a streaming or incremental execution mode, pair this prompt with a separate progress update template and only invoke completion when the final step is done.
Before wiring this into production, ensure your agent runtime can validate the output against the expected schema before forwarding it to the orchestrator. A completion payload with a missing evidence array or an uncalibrated confidence_score can cause downstream agents to act on incomplete information. In high-risk domains such as healthcare, finance, or legal workflows, add a human review gate that inspects the recommended_next_steps field before any automated action is taken. Do not use this prompt as a fire-and-forget signal in systems where the cost of a false completion is high—always pair it with idempotency keys, correlation IDs, and a dead-letter queue for payloads that fail validation.
Use Case Fit
Where the Agent Completion Notification Prompt Template delivers value and where it introduces risk. Use these cards to decide whether this prompt fits your orchestration architecture before wiring it into production.
Good Fit: Structured Multi-Agent Pipelines
Use when: You have a defined DAG or sequential agent chain where downstream agents must consume structured completion signals. The prompt produces typed payloads with confidence scores, evidence attachments, and next-step recommendations that prevent silent handoff failures. Guardrail: Validate output against the expected schema before forwarding to the next agent.
Bad Fit: Ad-Hoc Chat or Single-Agent Systems
Avoid when: There is no downstream agent waiting for a structured completion signal. Generating a full completion payload for a single-agent chat response adds latency, token cost, and parsing overhead with no consumer. Guardrail: Use a lightweight status flag or boolean completion marker instead. Reserve this prompt for multi-agent topologies.
Required Inputs: Task Context and Output Contract
Risk: The prompt cannot produce a useful completion notification without the original task definition, the agent's output, and the expected downstream schema. Missing inputs produce vague payloads that downstream agents cannot act on. Guardrail: Always supply [TASK_DEFINITION], [AGENT_OUTPUT], and [EXPECTED_SCHEMA] as required placeholders. Reject invocation if any are empty.
Operational Risk: Stale or Overconfident Payloads
Risk: The prompt may generate confidence scores that do not reflect actual output quality, or evidence attachments that reference unavailable sources. Downstream agents that trust these payloads without verification propagate errors through the chain. Guardrail: Run eval checks on confidence calibration and evidence grounding before promoting this prompt to production. Log discrepancies for review.
Integration Risk: Schema Drift Across Agent Versions
Risk: When upstream agents update their output formats, the completion notification schema can silently break downstream consumers. Parsing failures cascade into retry storms or dropped tasks. Guardrail: Version the completion payload schema and include a schema_version field. Validate backward compatibility in CI before deploying any agent update.
Scale Risk: Notification Fan-Out Without Deduplication
Risk: In parallel agent topologies, multiple agents may complete simultaneously and generate duplicate or conflicting completion notifications for the same task. Downstream agents receive redundant signals and may act multiple times. Guardrail: Include an idempotency key derived from the task ID and agent ID. Deduplicate at the message bus layer before delivery.
Copy-Ready Prompt Template
A structured agent completion notification payload that signals task completion across agent chains with results, confidence scores, evidence attachments, and next-step recommendations.
This prompt template generates a standardized completion notification that one agent sends to an orchestrator or downstream agent when it finishes its assigned task. The payload enforces a strict contract: it requires the agent to report what it did, what it found, how confident it is, what evidence supports its conclusions, and what should happen next. Without this structure, agent chains accumulate silent failures—an agent might complete its work but fail to communicate critical uncertainty, missing evidence, or the fact that it skipped a step. This template is designed for orchestration engineers who need every agent in a chain to speak the same completion language.
textYou are an agent that has just completed an assigned task. Generate a structured completion notification using the exact schema below. Do not omit any required fields. If a field cannot be populated, set it to null and include a reason in the `field_omissions` array. TASK CONTEXT: - Task ID: [TASK_ID] - Task Description: [TASK_DESCRIPTION] - Assigned Agent Role: [AGENT_ROLE] - Input Summary: [INPUT_SUMMARY] COMPLETION SCHEMA (JSON): { "notification_type": "task_completion", "task_id": "[TASK_ID]", "agent_role": "[AGENT_ROLE]", "status": "[SUCCESS | PARTIAL | FAILED | ABORTED]", "completion_summary": "[One-paragraph summary of what was accomplished]", "results": { "primary_output": "[Main deliverable or finding]", "secondary_outputs": ["[Optional list of additional outputs]"], "output_format": "[JSON | TEXT | STRUCTURED_OBJECT | FILE_REFERENCE]" }, "confidence": { "score": [0.0-1.0], "calibration_notes": "[How this score was determined]", "low_confidence_factors": ["[Specific reasons for uncertainty]"] }, "evidence": [ { "source_id": "[SOURCE_IDENTIFIER]", "source_type": "[DOCUMENT | TOOL_OUTPUT | API_RESPONSE | PRIOR_AGENT | USER_INPUT]", "relevance": "[Why this evidence matters]", "excerpt_or_reference": "[Direct quote, pointer, or summary]" } ], "completeness": { "all_steps_completed": [true | false], "skipped_steps": ["[Steps that were skipped and why]"], "remaining_work": "[What still needs to be done, if anything]" }, "next_step_recommendations": [ { "action": "[Recommended next action]", "target_agent_or_role": "[Who should perform it]", "priority": "[HIGH | MEDIUM | LOW]", "deadline_if_applicable": "[ISO timestamp or null]" } ], "escalation_triggers": [ { "condition": "[What condition should trigger escalation]", "severity": "[CRITICAL | WARNING | INFO]", "recommended_escalation_target": "[Human reviewer, supervisor agent, or fallback path]" } ], "field_omissions": [ { "field": "[Field name]", "reason": "[Why it could not be populated]" } ], "correlation_id": "[CORRELATION_ID]", "timestamp": "[ISO 8601 timestamp]" } CONSTRAINTS: - The `status` field must be exactly one of: SUCCESS, PARTIAL, FAILED, ABORTED. - If status is PARTIAL or FAILED, the `remaining_work` field must contain actionable detail. - Every evidence item must include a `source_id` that can be traced back to an upstream artifact. - Confidence scores below 0.7 must include at least one `low_confidence_factor`. - If the task was ABORTED, the `completion_summary` must explain why and the `next_step_recommendations` must include a recovery path. - Do not fabricate evidence. If no evidence exists, set the `evidence` array to empty and note it in `field_omissions`.
To adapt this template, replace the square-bracket placeholders with actual values from your orchestration layer before sending it to the model. The TASK_CONTEXT block should be populated by the orchestrator that assigned the task—this gives the agent the information it needs to self-report accurately. The schema itself should be treated as a contract: your downstream agent or orchestrator should validate every incoming completion notification against this schema before acting on it. If a required field is missing or malformed, reject the notification and request a corrected payload rather than proceeding with incomplete information. For high-risk workflows where incorrect completions could cause downstream damage, add a human review step before the notification is accepted by the next agent in the chain.
Prompt Variables
Inputs the prompt needs to work reliably. Validate each before injection into the template.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[AGENT_ID] | Unique identifier of the agent reporting completion | agent-7b3f2a | Must match registered agent ID format; non-empty string; validate against agent registry |
[TASK_ID] | Correlation identifier linking completion to the original task request | task-9d4e1c | Must be non-null; validate format matches task ID schema; verify task exists and is not already completed |
[TASK_DESCRIPTION] | Human-readable summary of the completed task | Extract invoice line items from PDF batch #442 | Non-empty string; max 500 chars; should match original task description for correlation |
[COMPLETION_STATUS] | Outcome code from the agent status taxonomy | SUCCESS | Must be one of enumerated status codes: SUCCESS, PARTIAL, FAILED, TIMEOUT, REJECTED; validate against approved enum |
[RESULT_PAYLOAD] | Structured output produced by the agent | {"invoices_processed": 12, "line_items_extracted": 47} | Must be valid JSON; validate against expected output schema for this task type; null allowed only if status is FAILED or TIMEOUT |
[CONFIDENCE_SCORE] | Agent's self-assessed confidence in the result | 0.92 | Float between 0.0 and 1.0; required for SUCCESS and PARTIAL statuses; null allowed for FAILED, TIMEOUT, REJECTED |
[EVIDENCE_REFERENCES] | List of source artifacts, tool outputs, or data objects used | ["s3://docs/invoice-batch-442.pdf", "db://extraction-run-1189"] | Must be valid JSON array; each reference must include source type and locator; empty array allowed if no evidence was used |
[NEXT_STEP_RECOMMENDATIONS] | Suggested actions for downstream agents or human reviewers | ["Route to validation-agent for accuracy check", "Flag invoice #INV-887 for manual review due to low confidence"] | Must be valid JSON array of strings; max 5 recommendations; each under 200 chars; empty array allowed if no next steps are needed |
Implementation Harness Notes
How to wire the Agent Completion Notification prompt into an orchestration system with validation, retries, and audit logging.
The Agent Completion Notification prompt is designed to be called at the end of an agent's execution cycle, not as a standalone chat interaction. In a production orchestration system, this prompt should be invoked by the agent harness immediately after the agent produces its final output. The harness passes the agent's raw result, the original task contract, and any execution metadata into the prompt to generate a structured completion payload. This payload then becomes the input to the next agent in the chain or the final response to the user. The key integration point is that the completion notification is not the agent's output—it is a wrapper that makes the output machine-readable and auditable.
Wire this prompt into your agent framework as a post-execution hook. After the agent completes its primary task, call the completion notification prompt with the following inputs: the agent's raw output, the original task specification, the agent's role identifier, and any tool call logs or evidence artifacts. The prompt returns a structured JSON payload containing the result summary, confidence score, evidence attachments, and next-step recommendations. Validate this payload against a strict schema before forwarding it. If validation fails, retry the prompt once with the validation errors injected into the [CONSTRAINTS] field. If the retry also fails, log the failure and escalate to a human reviewer with the raw agent output attached. For high-risk domains, always require human approval on the completion payload before it triggers downstream actions.
For observability, log every completion notification payload with a correlation ID that traces back to the originating task. Store the raw agent output, the generated completion payload, and the validation result in your audit system. This creates a verifiable chain: task request → agent execution → completion notification → downstream action. When choosing a model for this prompt, prefer models with strong JSON mode and schema adherence. The completion notification prompt is a structural contract, not a creative task, so smaller, faster models often perform well here. Avoid using this prompt for agents that produce streaming outputs or incremental results—it is designed for discrete task completion with a clear end state. If your agent produces partial results over time, use the Agent Progress Update Message prompt instead and reserve this completion notification for the final handoff.
Expected Output Contract
Defines the required fields, types, and validation rules for the agent completion notification payload. Use this contract to build downstream parsers, validation middleware, and logging schemas.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
completion_id | UUID v4 string | Must parse as valid UUID v4; reject if null or malformed | |
agent_id | string matching [AGENT_ID] | Must match the registered agent identifier pattern; reject if unknown | |
task_id | string matching [TASK_ID] | Must match the originating task request correlation ID; reject if missing | |
status | enum: 'success', 'partial', 'failure', 'timeout' | Must be one of the allowed enum values; reject unknown status codes | |
confidence_score | float between 0.0 and 1.0 | Must be a number in range; reject if outside bounds or non-numeric | |
result_summary | string, max 500 characters | Must be non-empty string; truncate and flag if exceeds length limit | |
evidence_attachments | array of {id: string, type: string, uri: string} | If present, each element must have non-empty id, type, and uri fields; null allowed | |
next_step_recommendation | string or null | If provided, must be non-empty string; null allowed when no next step exists |
Common Failure Modes
Completion notifications are the critical handshake in multi-agent chains. When they fail, downstream agents stall, duplicate work, or act on stale data. These are the most common failure modes and how to prevent them.
Missing or Incomplete Evidence Attachments
What to watch: The agent declares completion but omits evidence references, file pointers, or structured data that downstream agents need. The notification payload validates syntactically but is semantically empty. Guardrail: Add a post-generation validator that checks for required attachment fields, non-null evidence arrays, and minimum content length before the notification is published to the message bus.
Overconfident Confidence Scores
What to watch: The agent reports confidence: 0.95 on outputs that are speculative, unsupported, or generated from incomplete data. Downstream agents trust the score and skip verification. Guardrail: Require confidence calibration metadata—evidence count, source recency, and explicit uncertainty flags. Add an eval that compares reported confidence against ground-truth accuracy on held-out cases.
Next-Step Recommendations Without Precondition Checks
What to watch: The agent recommends a next step that requires state the downstream agent doesn't have, such as suggesting a database write when the target agent lacks write credentials. Guardrail: Include a capability check in the recommendation field—each suggested next step must reference a known agent capability ID. Validate recommendations against a live capability registry before forwarding.
Silent Partial Completion
What to watch: The agent completes only a subset of its assigned sub-tasks but reports overall status as completed rather than partial or degraded. Downstream agents assume full results and produce incorrect outputs. Guardrail: Require a completion_scope field that enumerates which sub-tasks were attempted, completed, and skipped. Add an eval that flags status mismatches between scope and declared completion state.
Stale Context in Handoff Payloads
What to watch: The agent includes session state or user context that was valid when the task started but is now outdated. Downstream agents act on stale preferences or permissions. Guardrail: Attach a context_timestamp and context_ttl to all state fields. Downstream agents must reject payloads where TTL has expired and request a fresh context snapshot from the shared state store.
Malformed Output Schema Under Load
What to watch: The completion payload conforms to the schema in normal conditions but produces extra fields, missing required fields, or type mismatches when the agent is under high concurrency or processing edge-case inputs. Guardrail: Run schema conformance tests against a fuzzed input corpus that includes empty inputs, maximum-length strings, and adversarial edge cases. Reject any payload that fails strict schema validation before it enters the message bus.
Evaluation Rubric
Use this rubric to test the Agent Completion Notification Prompt Template before production deployment. Each criterion validates a specific contract requirement. Run these checks against a golden dataset of 20-50 handoff scenarios covering normal completion, partial failure, low-confidence results, and edge cases.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Output schema compliance | Payload parses as valid JSON matching the [OUTPUT_SCHEMA] exactly; all required fields present | JSON parse error, missing required field, or extra unexpected field | Automated schema validator run against 100% of test outputs; reject any parse failure |
Confidence score calibration | [CONFIDENCE_SCORE] is a float between 0.0 and 1.0 and correlates with actual correctness across test cases | Score is outside 0-1 range, non-numeric, or consistently high despite known-ambiguous inputs | Compare confidence scores against ground-truth correctness labels; Brier score or ECE metric on test set |
Evidence attachment completeness | Every claim in [RESULTS] has a corresponding entry in [EVIDENCE_ATTACHMENTS] with source reference and excerpt | Claim present in results but no evidence entry, or evidence entry missing source reference | Automated cross-reference check: extract all claims, verify each has evidence entry with non-empty source |
Next-step recommendation actionability | [NEXT_STEPS] contains at least one concrete action with target agent, required input, and deadline or priority | Next steps field is empty, contains only generic text like 'proceed as needed', or lacks target agent | LLM judge eval: does the next step specify who, what, and when? Pass/fail threshold at 90% |
Error condition handling | When task partially failed, [STATUS] is 'partial' and [ERRORS] array contains structured error objects with code and message | Failed task reports status 'complete' or errors array is empty despite known failure conditions | Inject known failure scenarios; assert status field and errors array populated correctly |
Idempotency key preservation | [CORRELATION_ID] from the original task request appears unchanged in the completion payload | Correlation ID is missing, truncated, or modified from the original request | Automated field comparison between task request and completion payload correlation IDs |
Handoff summary conciseness | [HANDOFF_SUMMARY] is under 500 tokens and contains key decisions, unresolved items, and recipient action items | Summary exceeds token limit, omits unresolved items, or duplicates full results verbatim | Token count check plus LLM judge eval for inclusion of decisions, unresolved items, and actions |
Timestamp and traceability | [COMPLETED_AT] is ISO 8601 format and [AGENT_ID] matches the completing agent's registered identifier | Timestamp missing timezone, non-standard format, or agent ID does not match registry | Regex validation on timestamp format; agent ID lookup against test registry |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base template and strip optional fields. Use a single model call without retry logic. Replace [CONFIDENCE_SCORE] with a simple 0-1 float. Skip evidence attachment validation and next-step recommendation generation. Focus on getting the core completion status, result summary, and agent ID fields working.
codeYou are an agent completion notifier. Signal task completion with: - agent_id: [AGENT_ID] - task_id: [TASK_ID] - status: "completed" | "failed" - result_summary: [BRIEF_OUTPUT]
Watch for
- Missing status codes beyond completed/failed (no partial, degraded, or timeout states)
- Result summaries that are too verbose or too vague
- No correlation ID linking back to the original task request
- Confidence scores that are always 1.0 without evidence

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us