agent-strace
v0.131.0Query recorded AI agent sessions: events, summaries, diffs, health, skills, PR reviewability.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_sessions
List captured agent sessions with metadata: session ID, start time, tool call count, LLM requests, errors, total tokens, and estimated cost.
| Parameter | Type | Description |
|---|---|---|
agent | string | Filter by agent name (substring match). |
limit | integer | Maximum number of sessions to return (default: 20). |
get_session
Return the full event stream for a session as structured JSON. Includes every tool call, LLM request, file read/write, and error.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID or unique prefix. |
event_types | array | Filter to these event types only. Valid values: tool_call, tool_result, llm_request, llm_response, file_read, file_write, error, user_prompt, assistant_response. Empty list returns all events. |
search_events
Search events across one or all sessions. Filter by tool name, file path substring, exit code, or error.
| Parameter | Type | Description |
|---|---|---|
exit_code | integer | Filter tool_result events by exit code. |
file_path | string | Filter file_read/file_write events by path substring. |
has_error | boolean | If true, return only error events. |
limit | integer | Maximum events to return (default: 50). |
session_id | string | Session ID or prefix. Omit to search all sessions. |
tool_name | string | Filter tool_call events by tool name (case-insensitive substring). |
get_session_summary
Return a plain-English summary of what the agent did in a session: phases, files touched, commands run, retries, and wasted time.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID or unique prefix. |
diff_sessions
Compare two sessions and return a structured diff: which tools were added/removed, file overlap, cost delta, error delta, and token delta.
| Parameter | Type | Description |
|---|---|---|
session_a * | string | First session ID or prefix (the 'before' session). |
session_b * | string | Second session ID or prefix (the 'after' session). |
health
Report evidence health for a session: which agent/provider recorded it, whether it was finalized, redaction state, known capture blind spots, and structural problems such as orphaned tool results. Same data as 'agent-strace health --format json'.
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session ID or unique prefix. Omit for the latest session. |
skills
Report agent skill (SKILL.md) adoption: which skills are available, which were loaded, follow-up signals after a load, and which never loaded. Without session_id, aggregates sessions since 'since'. Same data as 'agent-strace skills --format json', except command_match reports counts only. Prompt text, SKILL.md bodies, and command signatures taken from them are never returned.
| Parameter | Type | Description |
|---|---|---|
min_sessions | integer | Minimum sessions before a skill is reported as never loaded (default: 5). |
session_id | string | Session ID or prefix for a single-session report. Omit to aggregate. |
since | string | Aggregate window, e.g. 7d, 24h, or 2026-01-01 (default: 30d). |
skills_dirs | array | Extra skill directories to scan. |
workspace | string | Repository path used to discover repo skills when a session has no recorded cwd. Defaults to the server's working directory. |
review
Run the pull-request reviewability check: rationale, scope, validation, stewardship, and evidence health for the sessions linked to a branch, each with a status, confidence, and source, plus the threshold result. Same versioned JSON as 'agent-strace review --format json'. Read-only: it never posts a PR comment or writes a file. Prompt text and command strings are never returned.
| Parameter | Type | Description |
|---|---|---|
agent_trace_records | string | Path to Agent Trace (agent-trace.dev) records to read line attribution from: one JSON record, a JSON array, or JSON Lines. Relative paths resolve against the server's working directory. Reported, not… |
branch | string | Branch to link sessions by. Defaults to the CI source branch or the git branch of the server's working directory. |
commits | string | Git revision range to read Entire-Checkpoint, Agent-Logs-Url, Claude-Session, Assisted-by and Generated-by trailers, agent co-authors, Copilot cloud agent authors, and git-ai notes (refs/notes/ai) fro… |
config | string | Config file with a review block. Defaults to .agent-strace.yaml in the server's working directory if present. |
disclosure | string | Compare the AI assistance the PR declares with the agent evidence: report adds it, check also fails on evidence, not declared or an agent Signed-off-by (default: off, or the config file). |
fail_on | string | Comma-separated statuses that fail: missing, partial, inconclusive, or none (default: missing, or the config file). |
findings | string | Comma-separated findings the threshold applies to: rationale, scope, validation, stewardship, evidence (default: all). |
format | string | json (default) or markdown, same as the CLI formats. |
min_confidence | string | Lowest confidence that can fail the check (default: medium). |
otel_logs | string | Path to a Claude Code OpenTelemetry logs export (OTLP JSON or JSON Lines) to read safety_event from. Relative paths resolve against the server's working directory. Reported, not graded. |
pr_body | string | Path to the PR description to match disclosure patterns in. Defaults to the pull request event or GitLab CI_MERGE_REQUEST_DESCRIPTION. |
session_ids | array | Session IDs or prefixes to review (explicit link). Empty links sessions by branch, then head commit time, then latest. |