data.agents.session-trace
Return the recent step metrics, tool calls, memory queries, and events for an agent session — for a live timeline view
Return recent step metrics, tool calls, memory queries, and events for an agent session.
Overview
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-agents |
| Version | 1.0 |
Triggers
| Source | Endpoint / Event | Description |
|---|---|---|
| API | GET /api/agents/sessions/{session_uuid}/trace | Read-only session trace for the agent timeline UI |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
session_uuid | string | Yes | — | — |
organization_uuid | string | Yes | — | — |
limit | integer | No | — | — |
since | string | No | — | — |
include_raw | boolean | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
error | string | No | — | — |
error_type | string | No | — | — |
events | json | No | — | — |
approvals | json | No | — | — |
cursor | string | No | — | — |
session | json | No | — | — |
timeline | json | No | — | — |
failed_at | string | No | — | — |
failed_at_state | string | No | — | — |
failed_layer | json | No | — | — |
failed_step | string | No | — | — |
failure_reason | string | No | — | — |
limit | json | No | — | — |
memory_queries | json | No | — | — |
session_uuid | json | No | — | — |
step_metrics | json | No | — | — |
tool_calls | json | No | — | — |
organization_uuid | json | No | — | — |
include_raw | boolean | No | — | — |
since | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | — |
run | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | — |
run | complete | completed | — |
* (any state) | fail | failed | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
fetched | SUCCESS | Session trace fetched | events, session, timeline, session_uuid, organization_uuid |
failed | FAILURE | Session trace fetched failed | failure_reason, error, error_type, failed_at_state, failed_step, failed_layer |
Business Errors
| Code | Message Template |
|---|---|
AGENTS_ORGANIZATION_CONTEXT_INVALID | Authenticated organization context is missing or does not match the workflow input |
AGENTS_CONFIG_NOT_FOUND | Agent configuration {agent_config_uuid} was not found in the organization |
AGENTS_SKILL_NOT_FOUND | Agent skill {skill_uuid} was not found in the organization |
AGENTS_SESSION_NOT_FOUND | Agent session {session_uuid} was not found in the organization |
AGENTS_MCP_SERVER_NOT_FOUND | MCP server {mcp_server_uuid} was not found in the organization |
AGENTS_DATASET_NOT_FOUND | Fine-tuning dataset {dataset_uuid} was not found in the organization |
AGENTS_PACKAGE_NOT_FOUND | Skill/guidance package {package_uuid} was not found in the organization |
AGENTS_RUNNER_GROUP_NOT_FOUND | Runner group {runner_group_uuid} was not found in the organization |
AGENTS_VALIDATION_FAILED | Workflow input or domain state failed validation: |
AGENTS_CONFLICT | Conflicting agent domain state: |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.agents.session-trace",
"initial_data": {
"session_uuid": "value",
"organization_uuid": "value"
}
}