RunResult
此内容尚不支持你的语言。
The result of an agent run.
Extends
Section titled “Extends”RunResultBase<TContext,TAgent>
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
|
|
|
|
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RunResult<TContext, TAgent>(state): RunResult<TContext, TAgent>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”RunResult<TContext, TAgent>
Overrides
Section titled “Overrides”RunResultBase<TContext, TAgent>.constructorProperties
Section titled “Properties”readonly state: RunState<TContext, TAgent>;The state of the run.
Inherited from
Section titled “Inherited from”RunResultBase.stateAccessors
Section titled “Accessors”finalOutput
Section titled “finalOutput”Get Signature
Section titled “Get Signature”get finalOutput(): ResolvedAgentOutput<TAgent["outputType"]> | undefined;The final output of the agent. If the output type was set to anything other than text,
this will be parsed either as JSON or using the Zod schema you provided.
Returns
Section titled “Returns”ResolvedAgentOutput<TAgent["outputType"]> | undefined
Inherited from
Section titled “Inherited from”RunResultBase.finalOutputhistory
Section titled “history”Get Signature
Section titled “Get Signature”get history(): AgentInputItem[];The history of the agent run. This includes the input items and the new items generated during the agent run.
This can be used as inputs for the next agent run.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”RunResultBase.historyGet Signature
Section titled “Get Signature”get input(): | string | AgentInputItem[];A copy of the original input items.
Returns
Section titled “Returns”| string
| AgentInputItem[]
Inherited from
Section titled “Inherited from”RunResultBase.inputinputGuardrailResults
Section titled “inputGuardrailResults”Get Signature
Section titled “Get Signature”get inputGuardrailResults(): InputGuardrailResult[];Guardrail results for the input messages.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”RunResultBase.inputGuardrailResultsinterruptions
Section titled “interruptions”Get Signature
Section titled “Get Signature”get interruptions(): RunToolApprovalItem[];Any interruptions that occurred during the agent run for example for tool approvals.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”RunResultBase.interruptionslastAgent
Section titled “lastAgent”Get Signature
Section titled “Get Signature”get lastAgent(): TAgent | undefined;The last agent that was run
Returns
Section titled “Returns”TAgent | undefined
Inherited from
Section titled “Inherited from”RunResultBase.lastAgentlastResponseId
Section titled “lastResponseId”Get Signature
Section titled “Get Signature”get lastResponseId(): string | undefined;The last response ID generated by the model during the agent run.
Returns
Section titled “Returns”string | undefined
Inherited from
Section titled “Inherited from”RunResultBase.lastResponseIdnewItems
Section titled “newItems”Get Signature
Section titled “Get Signature”get newItems(): RunItem[];The run items generated during the agent run. This associates the model data with the agents.
For the model data that can be used as inputs for the next agent run, use the output property.
Returns
Section titled “Returns”RunItem[]
Inherited from
Section titled “Inherited from”RunResultBase.newItemsoutput
Section titled “output”Get Signature
Section titled “Get Signature”get output(): AgentOutputItem[];The new items generated during the agent run. These include things like new messages, tool calls and their outputs, etc.
It does not include information about the agents and instead represents the model data.
For the output including the agents, use the newItems property.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”RunResultBase.outputoutputGuardrailResults
Section titled “outputGuardrailResults”Get Signature
Section titled “Get Signature”get outputGuardrailResults(): OutputGuardrailResult<OutputGuardrailMetadata, "text">[];Guardrail results for the final output of the agent.
Returns
Section titled “Returns”OutputGuardrailResult<OutputGuardrailMetadata, "text">[]
Inherited from
Section titled “Inherited from”RunResultBase.outputGuardrailResultsrawResponses
Section titled “rawResponses”Get Signature
Section titled “Get Signature”get rawResponses(): ModelResponse[];The raw LLM responses generated by the model during the agent run.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”RunResultBase.rawResponses