Trace
Returned byagent.run(). Contains the result of an agent execution.
| Field | Type | Description |
|---|---|---|
reward | float | Evaluation score (0.0-1.0) |
done | bool | Whether execution completed |
content | str | None | Final response content |
isError | bool | Whether an error occurred |
info | dict[str, Any] | Additional metadata |
task | Task | None | The executed task |
trace | list[TraceStep] | Execution trace steps |
messages | list[Any] | Final conversation state |
AgentResponse
Returned by agentget_response() methods. Represents a single model response.
| Field | Type | Description |
|---|---|---|
tool_calls | list[MCPToolCall] | Tools to execute |
done | bool | Whether agent should stop |
content | str | None | Response text |
reasoning | str | None | Model reasoning/thinking |
info | dict[str, Any] | Provider-specific metadata |
isError | bool | Error flag |
MCPToolCall
Represents a tool call to be executed.| Field | Type | Description |
|---|---|---|
id | str | Unique identifier (auto-generated if not provided) |
name | str | Tool name |
arguments | dict[str, Any] | Tool arguments |
MCPToolResult
Result from executing a tool call.| Field | Type | Description |
|---|---|---|
content | list[ContentBlock] | Result content blocks |
structuredContent | dict[str, Any] | None | Structured result data |
isError | bool | Whether the tool call failed |
Task
Defines an agent task with prompt, environment config, and lifecycle tools.| Field | Type | Description |
|---|---|---|
prompt | str | Instruction for the agent |
mcp_config | dict | Environment connection config |
id | str | None | Unique identifier (required for datasets) |
system_prompt | str | None | Custom system prompt |
setup_tool | dict | list[dict] | None | Tool(s) to initialize state |
evaluate_tool | dict | list[dict] | None | Tool(s) to score performance |
agent_config | BaseAgentConfig | None | Task-specific agent config |
metadata | dict | None | Additional task metadata |
BaseAgentConfig
Standard agent configuration that tasks can override.| Field | Type | Description | Default |
|---|---|---|---|
allowed_tools | list[str] | None | Tool patterns to expose | None (all) |
disallowed_tools | list[str] | None | Tool patterns to hide | None |
system_prompt | str | None | Custom system prompt | None |
append_setup_output | bool | Include setup output in first turn | True |
initial_screenshot | bool | Include screenshot in initial context | True |
response_tool_name | str | None | Lifecycle tool for responses | None |
AgentType
Enum of supported agent types.| Value | Agent Class |
|---|---|
AgentType.CLAUDE | ClaudeAgent |
AgentType.OPENAI | OpenAIAgent |
AgentType.OPERATOR | OperatorAgent |
AgentType.GEMINI | GeminiAgent |
AgentType.OPENAI_COMPATIBLE | OpenAIChatAgent |
ContentBlock
MCP content block types (frommcp.types):
TextContent- Text content withtextfieldImageContent- Image withdata(base64) andmimeTypeEmbeddedResource- Embedded resource reference
See Also
- Agents Reference - Agent classes and configuration
- Tasks Reference - Task configuration details