Skip to content

AgentCompletedOutput

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  1388251858["output_types.AgentCompletedOutput"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 1388251858
  2751680898 --> 2645524081

🛈 DocStrings

Bases: TypedDict

Output from the Task tool when the agent completed successfully.

Source code in src/clawd_code_sdk/models/output_types.py
class AgentCompletedOutput(TypedDict):
    """Output from the Task tool when the agent completed successfully."""

    status: Literal["completed"]
    """Agent completion status."""
    agentId: str
    """ID of the agent that ran."""
    agentType: NotRequired[str]
    """Type of the agent that ran."""
    content: list[AgentOutputTextContent]
    """Text content blocks produced by the agent."""
    resolvedModel: NotRequired[str]
    """Model the agent ran on."""
    modelsUsed: NotRequired[list[str]]
    """Ordered distinct models used (length > 1 means a mid-run swap)."""
    totalToolUseCount: int
    """Total number of tool calls made."""
    totalDurationMs: int
    """Total execution duration in milliseconds."""
    totalTokens: int
    """Total tokens used."""
    usage: AgentOutputUsage
    """Detailed token usage statistics."""
    toolsUsed: NotRequired[list[str]]
    """Names of the tools the agent used."""
    toolStats: NotRequired[ToolStats]
    """Tool usage statistics."""
    prompt: str
    """The prompt that was given to the agent."""
    worktreePath: NotRequired[str]
    """Worktree the agent ran in (isolation="worktree")."""
    worktreeBranch: NotRequired[str]
    """Branch of the agent's worktree."""

agentId instance-attribute

agentId: str

ID of the agent that ran.

agentType instance-attribute

agentType: NotRequired[str]

Type of the agent that ran.

content instance-attribute

content: list[AgentOutputTextContent]

Text content blocks produced by the agent.

modelsUsed instance-attribute

modelsUsed: NotRequired[list[str]]

Ordered distinct models used (length > 1 means a mid-run swap).

prompt instance-attribute

prompt: str

The prompt that was given to the agent.

resolvedModel instance-attribute

resolvedModel: NotRequired[str]

Model the agent ran on.

status instance-attribute

status: Literal['completed']

Agent completion status.

toolStats instance-attribute

toolStats: NotRequired[ToolStats]

Tool usage statistics.

toolsUsed instance-attribute

toolsUsed: NotRequired[list[str]]

Names of the tools the agent used.

totalDurationMs instance-attribute

totalDurationMs: int

Total execution duration in milliseconds.

totalTokens instance-attribute

totalTokens: int

Total tokens used.

totalToolUseCount instance-attribute

totalToolUseCount: int

Total number of tool calls made.

usage instance-attribute

Detailed token usage statistics.

worktreeBranch instance-attribute

worktreeBranch: NotRequired[str]

Branch of the agent's worktree.

worktreePath instance-attribute

worktreePath: NotRequired[str]

Worktree the agent ran in (isolation="worktree").

:fa-brands-github: Show source on GitHub