Endpoint
Authentication
This endpoint requires API token authentication. Include your token in the Authorization header:Parameters
Response Structure
The endpoint returns anAgentRunWithLogsResponse object containing the agent run details and paginated logs:
Agent Run Log Fields
Each log entry in thelogs array contains the following fields:
Core Fields
Agent Reasoning Fields
Tool Execution Fields
Log Types
Themessage_type field indicates the type of log entry. Here are the possible values:
Plan Agent Types
PR Agent Types
Commit Agent Types
Link Types
Field Population Patterns
Different log types populate different fields:ACTION Logs
- Always have:
tool_name,tool_input,tool_output - Often have:
thought,observation - Example: Tool executions like searching code, editing files, creating PRs
PLAN_EVALUATION Logs
- Always have:
thought - May have:
observation - Rarely have: Tool-related fields
- Example: Agent reasoning about next steps
ERROR Logs
- Always have:
observation(containing error details) - May have:
tool_name(if error occurred during tool execution) - Example: Failed tool executions or system errors
FINAL_ANSWER Logs
- Always have:
observation(containing the final response) - May have:
thought - Example: Agent’s final response to the user
Usage Examples
Basic Log Retrieval
Filtering by Log Type
Pagination Example
Debugging Failed Runs
Common Use Cases
1. Building Monitoring Dashboards
Use the logs to create dashboards showing:- Agent execution progress
- Tool usage patterns
- Error rates and types
- Execution timelines
2. Debugging Agent Behavior
Analyze logs to understand:- Why an agent made certain decisions
- Where errors occurred in the execution flow
- What tools were used and their results
3. Audit and Compliance
Track agent actions for:- Code change auditing
- Compliance reporting
- Security monitoring
4. Performance Analysis
Monitor:- Tool execution times
- Common failure patterns
- Agent reasoning efficiency
Rate Limits
- 60 requests per 60 seconds per API token
- Rate limits are shared across all API endpoints
Error Responses
Feedback and Support
Since this endpoint is in ALPHA, we’d love your feedback! Please reach out through:The structure and fields of this API may change as we gather feedback and
improve the service. We’ll provide advance notice of any breaking changes.