Agent Trace Analysis
Analyse an AI agent's run trace for potential failures and token waste. Returns findings, likely causes and suggested fixes.
Pay by wallet (x402) AI-generated
agent-trace-analyze Example
Input
{
"trace": "test_value"
} Answer
{
"severity": "warning",
"root_cause": "The trace input 'test_value' is not a valid AI agent execution log. It lacks essential components including: timestamped steps, tool invocations, agent reasoning, state transitions, or error messages. Cannot analyze execution flow without structured trace data.",
"step_count": 0,
"failure_type": "none",
"trace_length": 10,
"failure_point": "Trace input validation - insufficient execution data provided",
"steps_summary": [],
"suggested_fix": "Provide a complete agent execution trace with: (1) timestamped sequential steps, (2) agent thoughts/reasoning, (3) tool names and parameters, (4) tool outputs/responses, (5) any error messages or exceptions, (6) final state or outcome",
"patterns_detected": [
"insufficient_trace_data",
"missing_execution_steps",
"cannot_analyze_without_structured_log"
],
"token_usage_breakdown": {
"total": 97,
"estimated_input_tokens": 12,
"estimated_output_tokens": 85
}
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
trace | string | Yes | Agent log/trace output |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
root_cause | string | Always (present in every successful answer) |
step_count | integer | Always (present in every successful answer) |
failure_type | string | Always (present in every successful answer) |
failure_point | string | Always (present in every successful answer) |
suggested_fix | string | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "agent-trace-analyze",
"inputs": {
"trace": "test_value"
},
"max_price_cents": 20
}' {
"tool": "strale_execute",
"arguments": {
"slug": "agent-trace-analyze",
"inputs": {
"trace": "test_value"
},
"max_price_cents": 20
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "agent-trace-analyze",
inputs: {
"trace": "test_value"
},
max_price_cents: 20,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="agent-trace-analyze",
inputs={
"trace": "test_value",
},
max_price_cents=20,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/agent-trace-analyze?trace=test_value' Limitations
Complex trace bottlenecks can be missed
AI analysis of agent traces — may not identify all performance bottlenecks in complex multi-agent orchestrations
What to do instead: Provide the full trace including timestamps and tool outputs for the most actionable analysis
Related tools
- API Docs Generator €0.20
- API Mock Responses €0.05
- Changelog Generator €0.03
- Code Converter €0.05
- Commit Message Generator €0.05
- Context Window Optimiser €0.03