Skip to content

AgentExecutionResult

junjo.agent.result.AgentExecutionResult

Kind: Class

SDK version: 0.69.0

Documentation channel: Stable release

AgentExecutionResult(*, agent_key: str, name: str, definition_id: str, structural_id: str, run_id: str, output: OutputT, transcript: tuple[AgentMessage, ...], usage: AgentUsage, model_request_count: int, tool_call_requested_count: int, tool_call_admitted_count: int, tool_call_started_count: int, tool_call_completed_count: int, application_state: StateT | None = None, application_store_id: str | None = None)

View source

Frozen detached result returned only after validated final output.

Create a detached successful Agent execution result.

The public constructor enforces portable identities, exact Agent fingerprint form, a complete normalized transcript, usage/request consistency, and completed <= started <= admitted <= requested.

Name Type Description Default
application_state StateT | None Detached typed application state at this run
boundary. The live Store may continue changing in another execution.
None
application_store_id str | None Identity of that application Store, if configured. None
output OutputT Already validated typed output owned by the caller.
transcript tuple[AgentMessage, ...] One or more complete normalized exchanges.
usage AgentUsage Immutable aggregate usage evidence.
Exception Description
TypeError If typed members have the wrong public type.
ValueError If identities, transcript, or counters conflict.

agent_key: str

View source

Application-owned stable key of the Agent definition.

name: str

View source

Human-readable Agent name captured for this execution.

definition_id: str

View source

Identity of the Agent definition used for this invocation.

structural_id: str

View source

Compiled structural identity used to correlate equivalent executable shapes.

run_id: str

View source

Identity of this admitted Agent invocation, distinct from an evaluation run ID.

output: OutputT

View source

Final output validated against the Agent output type.

application_state: StateT | None

View source

Detached application-state checkpoint at completion; None when no Store was configured.

application_store_id: str | None

View source

Identity of the application Store observed by this invocation.

transcript: tuple[AgentMessage, ...]

View source

Immutable normalized records of the messages and operations captured for this invocation.

usage: AgentUsage

View source

Aggregated provider-reported usage; unavailable fields remain absent rather than becoming zero.

model_request_count: int

View source

Number of model requests recorded during this invocation.

tool_call_requested_count: int

View source

Number of tool calls requested by model responses.

tool_call_admitted_count: int

View source

Requested tool calls accepted for execution by the Agent runtime.

tool_call_started_count: int

View source

Admitted tool calls whose execution started.

tool_call_completed_count: int

View source

Started tool calls whose execution completed.

termination_reason: str

View source

Successful result termination reason; currently final_output.