Runtime Types
This document describes the types that are available at runtime.
AgentState
The AgentState type contains the execution state of an agent.
Properties
id(string): Unique id of this agent executionroot(StackFrame): StackFrame object that represents the current execution statestatus(string): Indicates the status of the agent execution, can berunning,finished,errororawaitingoutput(any, optional): The result of the agent execution if any
StackFrame
The StackFrame represents a single step within the execution stack.
Properties
trace(string): Unique identifier for the frame in the execution statestatus(string): Status of the frame, can berunning,finished,errororawaitingstartedAt(Date): Timestamp at which the current step beganupdatedAt(Date): Timestamp at which the step was updatedvariables(object, optional): All the local variables available in scopeparent(StackFrame, optional): Pointer to the parentStackFrameif nestederror(string, optional): Error during execution if anyvalue(any, optional): Value of the variable or function call in scopestate(any, optional): Tool state, if anyevents(ToolEvent[], optional): Events for the tool, if anychildren(StackFrame[], optional): Array of children frames, representing the nested execution
RuntimeError
The RuntimeError represents an exception that occurs during the execution of an AgentScript.
It's usually related to invalid runtime calls or variable access.