Inferensys

Prompt

Task Completion Summary Prompt for Operators

A practical prompt playbook for using Task Completion Summary Prompt for Operators in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job-to-be-done, ideal user, required context, and clear boundaries for the Task Completion Summary Prompt.

This prompt is designed for the final step of an agent execution loop. After a multi-step workflow completes, fails partially, or exhausts its retry budget, an operator needs a structured summary to decide the next action without reading the full execution trace. The ideal user is an SRE, engineering lead, or operations specialist responsible for supervising autonomous agents in production. They need a concise, evidence-backed handoff that reconciles what was accomplished against the original objectives, flags deviations, inventories artifacts, and recommends follow-ups. The required context includes the original plan or goal, a structured execution log, and any tool outputs or error traces generated during the run.

Use this prompt when you need a single, definitive summary at the end of an agent's execution. It is particularly valuable for long-running workflows where reviewing the full trace is impractical, for partially failed runs where partial results must be preserved, and for compliance-sensitive environments where every agent decision needs a human-readable audit trail. The prompt forces the model to perform completeness checks against the original objectives, explicitly list unresolved items, and provide a clear recommendation for the operator. This structured output can then be routed to a review queue, logged as an audit record, or used to trigger downstream workflows.

Do not use this prompt for real-time streaming status updates or mid-execution heartbeats. Those require separate monitoring prompts designed for incremental progress reporting, such as the Agent Execution Heartbeat Prompt Template or the Stuck Agent Detection and Alert Prompt. This prompt is also inappropriate for interactive debugging sessions where an operator is actively stepping through the agent's reasoning; in that case, a conversational trace exploration interface is more effective. Finally, do not use this prompt for workflows where the agent's output is consumed directly by another automated system without human review—those handoffs require machine-readable status codes and structured state objects, not operator-facing narratives.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Task Completion Summary Prompt delivers reliable operator summaries and where it introduces risk. Use these cards to decide if this prompt fits your workflow before wiring it into an agent harness.

01

Good Fit: Multi-Step Agent Workflows

Use when: An agent has completed a structured plan with 3+ distinct steps and the operator needs a concise summary of what happened, what artifacts were produced, and what remains unresolved. Guardrail: Provide the original plan and execution trace as input so the model can compare planned vs. actual behavior.

02

Good Fit: Supervised Autonomy with Human Handoff

Use when: An agent finishes a batch of work and a human operator must decide whether to approve results, escalate issues, or trigger the next phase. Guardrail: Include explicit completeness checks against the original objectives and flag any deviations that require operator attention before proceeding.

03

Bad Fit: Real-Time Streaming or Single-Step Calls

Avoid when: The workflow is a single tool call, a real-time chat turn, or a streaming response where there is no multi-step plan to summarize. Guardrail: Use a simpler status message or structured output prompt instead. This prompt adds latency and token cost without benefit for atomic operations.

04

Bad Fit: Fully Autonomous Loops Without Operator Review

Avoid when: The agent runs in a closed loop with no human operator reading summaries. Generating prose summaries for machine consumption wastes tokens. Guardrail: If downstream automation needs structured completion data, use a schema-only output format instead of a narrative summary.

05

Required Inputs: Plan, Trace, and Objective

What to watch: Without the original plan, execution trace, and success criteria, the model cannot verify completeness or detect deviations. Guardrail: Always pass the original objective, the planned steps with expected outputs, and the actual execution log. Missing any of these produces a plausible but unverified summary.

06

Operational Risk: Silent Failures and Partial Completeness

What to watch: The model may produce a confident summary that masks skipped steps, empty artifacts, or schema-compliant garbage outputs. Guardrail: Add postcondition validation that checks each claimed artifact exists and matches expected schema before the summary reaches the operator.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready prompt that generates a structured operator summary when an agent completes a multi-step workflow.

This prompt template is designed to be pasted directly into your agent's completion handler after a multi-step workflow finishes. It instructs the model to produce a concise, structured summary for a human operator, covering what was accomplished, any deviations from the original plan, unresolved items, artifacts produced, and recommended follow-up actions. The summary acts as a handoff document between the autonomous agent and the human responsible for oversight.

text
You are an operator reporting agent. Your task is to produce a final task completion summary for a human operator after a multi-step workflow has finished executing.

## Inputs
- Original Plan: [ORIGINAL_PLAN]
- Execution Log: [EXECUTION_LOG]
- Final State: [FINAL_STATE]
- Artifact Inventory: [ARTIFACT_INVENTORY]

## Output Schema
Return a single JSON object with the following structure:
{
  "summary": {
    "objective": "string (restate the original objective in one sentence)",
    "status": "string (enum: completed | partially_completed | failed | abandoned)",
    "completed_steps": ["string (step ID and brief outcome)"],
    "failed_steps": ["string (step ID, failure reason, and recovery attempted)"],
    "skipped_steps": ["string (step ID and reason for skipping)"],
    "deviations_from_plan": ["string (description of any deviation, its cause, and its impact)"],
    "unresolved_items": ["string (open questions, incomplete work, or blocked dependencies)"],
    "artifacts_produced": ["string (file path, URI, or identifier for each output artifact)"],
    "recommended_follow_up": ["string (actionable next step for the operator)"],
    "completeness_check": {
      "original_objectives_met": ["string (objective and whether it was satisfied)"],
      "missing_coverage": ["string (any part of the original request not addressed)"]
    },
    "operator_notes": "string (any additional context the operator needs, including assumptions made or risks identified)"
  }
}

## Constraints
- Be concise. Each string field should be no more than 2-3 sentences unless the complexity demands more.
- If the workflow completed successfully, the tone should be factual and brief.
- If there were failures or deviations, clearly separate what went wrong from what succeeded. Do not bury failures in optimistic language.
- If the original plan was modified during execution, explain why and what the new plan became.
- If any artifacts are missing or corrupted, flag them explicitly.
- Do not invent outcomes. Only report what is present in the Execution Log and Final State.
- If the Execution Log is incomplete or truncated, note this in `operator_notes` and mark confidence as low.

To adapt this template, replace each square-bracket placeholder at runtime: [ORIGINAL_PLAN] should contain the agent's initial plan object, [EXECUTION_LOG] should contain the full trace of tool calls and observations, [FINAL_STATE] should contain the agent's final memory or state snapshot, and [ARTIFACT_INVENTORY] should list every file, record, or side effect produced. Before deploying, validate that the model's output conforms to the JSON schema using a programmatic validator. For high-risk workflows, route summaries with a failed or abandoned status to a human review queue before any downstream action is taken. Log every generated summary alongside the execution trace for auditability.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to work reliably. Validate each before assembly.

PlaceholderPurposeExampleValidation Notes

[ORIGINAL_OBJECTIVE]

The user's original goal statement

Generate a Q3 sales report for the Northeast region

Must be non-empty string; check for ambiguous pronouns or missing scope

[PLAN_STEPS]

Ordered list of planned steps with IDs and descriptions

[{"id":"step-1","desc":"Pull sales data from Snowflake"},...]

Must be a valid JSON array; each object requires id and desc fields; array length >= 1

[EXECUTION_LOG]

Chronological record of actions taken, tool calls, and outputs

[{"step_id":"step-1","action":"query","result":"..."},...]

Must be valid JSON array; each entry requires step_id, action, and timestamp; check for gaps in step coverage

[ARTIFACTS_PRODUCED]

List of outputs, files, or data created during execution

[{"name":"sales_report_q3.csv","location":"s3://..."},...]

Must be valid JSON array; each artifact requires name and location; allow empty array if no artifacts

[DEVIATIONS]

Recorded departures from the original plan

[{"step_id":"step-4","type":"skipped","reason":"..."},...]

Must be valid JSON array; each deviation requires step_id, type, and reason; allow empty array

[UNRESOLVED_ITEMS]

Tasks or issues that remain open or blocked

[{"item":"West region data unavailable","blocker":"..."},...]

Must be valid JSON array; each item requires description and blocker; allow empty array

[COMPLETION_STATUS]

Enum indicating overall workflow outcome

completed | partial | failed | abandoned

Must be one of the four allowed enum values; reject any other string

[CONFIDENCE_SCORE]

Model's self-assessed confidence in summary accuracy

0.87

Must be a float between 0.0 and 1.0; reject values outside range; flag scores below 0.7 for human review

PROMPT PLAYBOOK

Implementation Harness Notes

Wire the Task Completion Summary prompt into your agent runtime as a post-execution hook with validation, routing, and audit logging.

Wire this prompt into your agent runtime as a post-execution hook. Call it after the agent's main loop exits, regardless of exit reason (success, failure, escalation, or abandonment). The prompt consumes the execution trace, final state, and original plan to produce a structured operator summary. This summary is the primary handoff artifact between the agent and the human operator, so it must be generated reliably and routed correctly. Do not call this prompt if the agent was interrupted mid-execution and will resume; use a checkpoint prompt instead to preserve resumable state.

For strict schema compliance, use Structured Outputs or JSON mode with the output contract defined in the prompt template. Validate the response before routing: confirm that completion_status is a recognized enum value, artifacts_produced contains valid URIs or identifiers, and unresolved_items is populated when the status is not completed. If validation fails, retry once with the validation errors injected into the prompt context. If the second attempt also fails, log the raw output and escalate to the human review queue with a summary_generation_failed flag. For high-risk workflows (finance, healthcare, legal), always route summaries to a human review queue regardless of validation status, and require explicit acknowledgment before the workflow is marked closed.

Pass the validated structured output to your notification layer—Slack, email, dashboard, or ticketing system—based on the recommended_escalation field. If the summary indicates unresolved items or recommends escalation, route to a human review queue with the full summary payload and a link to the execution trace. Log the full summary alongside the execution trace for auditability, including the prompt version, model identifier, timestamp, and validation result. For long-running workflows, consider appending this summary to a session-level audit log that operators can query without accessing raw traces. Avoid calling this prompt on empty or near-empty execution traces, as the model may hallucinate completion details; instead, surface a no_execution_data status directly from the harness.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, format, and validation rules for the Task Completion Summary JSON object. Use this contract to build a parser, validator, and downstream consumer for the summary before deploying the prompt.

Field or ElementType or FormatRequiredValidation Rule

summary_id

string (UUID v4)

Must match regex ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$. Reject if missing or malformed.

objective_summary

string (max 500 chars)

Must be non-empty after trimming. Must contain at least one reference to the original [OBJECTIVE] key terms. Reject if blank or purely generic.

completion_status

enum: completed | partially_completed | failed | abandoned

Must match one of the four enum values exactly. Reject on case mismatch or unrecognized value.

steps_executed

array of objects

Must be a non-empty array. Each object must contain step_id (string), status (enum), and output_artifact_reference (string or null). Reject if array is empty or any required sub-field is missing.

deviations_from_plan

array of strings

If present, each string must be non-empty and reference a specific [PLAN_STEP_ID]. If no deviations, field must be an empty array, not null or omitted.

unresolved_items

array of objects

Each object must contain item_description (string) and recommended_action (enum: retry | escalate | ignore | manual_review). Reject if array contains objects missing required fields.

artifacts_produced

array of objects

Each object must contain artifact_id (string), artifact_type (string), and storage_location (string or null). Reject if artifact_id is not unique within the array.

follow_up_actions

array of objects

Each object must contain action_description (string), priority (enum: critical | high | medium | low), and assigned_to (enum: operator | agent | external_system). Reject if priority or assigned_to values are unrecognized.

PRACTICAL GUARDRAILS

Common Failure Modes

Task completion summaries fail silently in production. The model omits critical deviations, overstates confidence, or produces fluent but incomplete reports. These cards cover the most common failure patterns and the operational checks that catch them before an operator makes a decision on bad information.

01

Silent Omission of Failed Steps

What to watch: The summary describes only successful steps and drops failed, skipped, or partially completed tasks without acknowledgment. Operators assume full completion when critical work is missing. Guardrail: Require the prompt to enumerate all planned steps and explicitly mark each as completed, failed, skipped, or partial before generating prose. Validate output against the original plan step list.

02

Overconfident Completion Claims

What to watch: The model declares objectives 'fully met' when evidence shows gaps, low-confidence outputs, or unvalidated artifacts. Fluent summaries mask uncertainty. Guardrail: Add a completeness score field (0-100) with required evidence for the score. Reject summaries where the score exceeds a threshold but artifact counts or validation results don't match.

03

Deviation Erasure

What to watch: The agent changed the plan mid-execution but the summary describes the original plan as if it was followed. Operators lose the audit trail of what actually happened. Guardrail: Require a dedicated deviations section that compares planned vs. actual execution. If no deviations exist, the model must explicitly state that. Validate that the deviations list is non-empty when replanning events occurred in the trace.

04

Artifact Hallucination

What to watch: The summary references files, outputs, or artifacts that were never produced, or describes their content incorrectly. Operators act on non-existent deliverables. Guardrail: Require artifact references to include a verifiable path, ID, or hash. Add a post-generation check that every claimed artifact exists in the execution trace or file system before the summary is delivered.

05

Follow-Up Action Inflation

What to watch: The model generates vague, excessive, or unnecessary recommended follow-ups to appear thorough. Operators waste time chasing phantom action items. Guardrail: Limit follow-up recommendations to a fixed count (e.g., max 3) and require each to cite a specific unresolved gap from the execution trace. Filter recommendations that don't trace back to a concrete incomplete or failed step.

06

Temporal Drift and Stale State

What to watch: The summary uses outdated state from early in execution, ignoring later corrections, replanning events, or updated outputs. Operators receive a summary that doesn't reflect the final state. Guardrail: Require the prompt to ingest the final execution trace snapshot, not intermediate summaries. Add a freshness check that compares summary timestamps against the last state change timestamp and flags summaries older than the most recent action.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks against a golden dataset of known workflow outcomes to validate the Task Completion Summary Prompt before shipping. Each criterion targets a specific failure mode observed in operator-facing summaries.

CriterionPass StandardFailure SignalTest Method

Objective Coverage

All objectives from [ORIGINAL_PLAN] are explicitly addressed with a status (completed, partial, failed, not started)

Summary omits an objective present in the plan or introduces a fabricated objective

Diff the set of objectives in [ORIGINAL_PLAN] against the summary. Flag missing or hallucinated items.

Deviation Accuracy

Every deviation listed in the summary matches a logged deviation from [EXECUTION_TRACE]. No false deviations reported.

Summary claims a deviation that does not appear in the trace, or fails to report a trace-logged deviation exceeding severity threshold

Cross-reference deviation list against [EXECUTION_TRACE] deviation events. Require exact step ID match.

Artifact Inventory Completeness

All output artifacts produced during execution are listed with their identifiers, types, and storage locations

An artifact recorded in [EXECUTION_TRACE] output log is missing from the summary artifact list

Parse artifact IDs from trace output events. Assert set equality with summary artifact list after normalizing identifiers.

Unresolved Item Flagging

Every step with status 'blocked', 'failed', or 'partial' appears in the unresolved items section with a reason

A blocked or failed step from [EXECUTION_TRACE] is absent from unresolved items, or a completed step is incorrectly flagged

Filter trace for non-success terminal states. Assert each appears in unresolved items with a non-empty reason string.

Follow-Up Actionability

Each recommended follow-up action includes a specific owner role, a concrete next step, and a priority level

Follow-up contains vague language like 'monitor the situation' without owner, or omits priority on a high-severity unresolved item

LLM-as-judge check: prompt a separate evaluator model to score each follow-up on owner presence, concreteness, and priority. Require score >= 4/5.

Schema Compliance

Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and no extra top-level keys

JSON parse failure, missing required field, or null value in a non-nullable field per schema

Validate output against [OUTPUT_SCHEMA] using a JSON schema validator. Reject on any validation error.

Timestamp Freshness

The summary generation timestamp is within 60 seconds of the last event timestamp in [EXECUTION_TRACE]

Summary timestamp is stale, missing, or predates the final trace event by more than the freshness threshold

Parse summary timestamp and max trace event timestamp. Assert delta <= 60 seconds. Fail if either timestamp is unparseable.

Confidence Honesty

Any claim marked as low-confidence in the summary corresponds to a step where the agent's internal confidence score fell below the configured threshold

Low-confidence flag appears on a step with high agent confidence, or is absent on a step with known low confidence from trace

Compare confidence flags in summary against agent confidence scores in [EXECUTION_TRACE]. Require exact match for all steps below threshold.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a simple checklist format instead of strict JSON schema. Remove the [OUTPUT_SCHEMA] constraint and ask for a plain-language summary with bullet points. Skip completeness scoring and artifact inventory fields. Focus on getting the narrative right before adding structure.

Prompt modification

Replace the structured output instruction with: Provide a plain-language summary of what was accomplished, any deviations from the plan, and recommended next steps. Use bullet points.

Watch for

  • Missing deviation reporting when the agent silently skips steps
  • Overly verbose summaries that bury key findings
  • No distinction between completed and partially completed work
Prasad Kumkar

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.