Observability Guide
Savine automatically captures every step of every task. No configuration or telemetry setup is required. The platform provides full visibility into cost, latency, and reasoning traces by default.
The Execution Trace
When a task executes, the AgentGraphEngine steps through a state machine. A full task trace consists of these step types:
- THINK: The LLM reasoning step. The raw prompt sent and completion received.
- ACT: The agent decides to select a tool or return a final answer.
- TOOL_CALL: An isolated sandbox spins up to execute a built-in or custom tool.
- OBSERVE: The sandbox returns the result (stdout/stderr) back to the LLM context.
- COMPLETE / ERROR: The terminal state of the execution graph.
Reading a Trace
If you open the dashboard or fetch /api/v1/tasks/:id/steps, you will see an array of objects. Each step contains:
timestamp: Millisecond precision timing.step_type: (THINK, ACT, TOOL_CALL, OBSERVE, COMPLETE, ERROR).duration_ms: Wall-clock execution time for this specific node.content: The string payload, SQL query, web search snippet, or LLM generation.tokens: Usage count for this specific step (only present on THINK steps).
Token Tracking and Cost Analysis
Tokens are captured directly from the LLM provider API response headers. Savine maintains an internal pricing matrix updated daily.
- Input Tokens and Output Tokens are separated.
- Cost calculation is applied retroactively based on the specific
modelversion used.
In the dashboard, you can view:
- Cost per task: How much a single execution cost.
- Cost per agent: Which of your agents is the most expensive.
- Cost per model: Breakdown of Anthropic vs OpenAI spend.
Latency Breakdown
The most common bottleneck in an agent pipeline is a slow tool execution (e.g., waiting for an external HTTP API to respond) or an overloaded LLM endpoint. The trace UI colour-codes latency:
- Green: < 1000ms
- Yellow: 1000ms - 5000ms
- Red: > 5000ms
Loop Detection
Because autonomous agents can get stuck (e.g., repeatedly calling python_exec with syntax errors), Savine explicitly enforces loop detection algorithms.
If the platform detects the exact same ACT payload repeating, it intervenes by injecting a system warning:
"You have repeated this action 3 times without success. You must try a different approach."
If the loop persists to the max_steps limit in agent.json, the task halts with ERROR: Loop threshold exceeded.
Accessing and Exporting Data
- Dashboard: Visual waterfall graphs in Observability > Traces.
- API: Programmatic GET requests to
/api/v1/metrics/observability. - Stream: SSE endpoints to watch traces live as they happen in your terminal or backend.
- Bulk Export: Export CSV/JSON dumps of 30-day history for external analysis in BI tools.