COMMAND LINE
The ACP CLI provides utilities for trace inspection, replay, testing, and analysis. All commands operate on recorded artifacts without executing agent code.
acp [command] [options]acp inspectView trace details and step contents
acp replayVerify deterministic reproduction
acp testRun behavioral tests against traces
acp analyzeDetect inefficiencies and issues
acp listList all available traces
acp exportExport trace to various formats
INSPECT
Interactively explore trace contents in the terminal.
View Trace Summary
acp inspect traces/run_abc123/Displays run metadata, step count, status, and duration.
View Specific Step
acp inspect traces/run_abc123/ --step 5acp inspect traces/run_abc123/ --step 5 --memoryFilter by Phase
acp inspect traces/run_abc123/ --phase toolacp inspect traces/run_abc123/ --status errorREPLAY
Verify deterministic reproduction of agent execution from recorded artifacts.
acp replay traces/run_abc123/acp replay traces/run_abc123/ --verboseacp replay traces/run_abc123/ --compare traces/run_xyz789/What Replay Does
- • Reads from
steps.jsonlandsnapshots/ - • Feeds recorded outputs back to the execution model
- • Never calls external APIs or LLMs
- • Verifies state consistency at each step
- • Reports any divergence from expected behavior
TEST
Run behavioral tests against recorded traces using YAML test definitions.
acp test traces/run_abc123/acp test traces/run_abc123/ --file tests/booking.yamlacp test traces/run_abc123/ --verboseExample Test File
# tests/booking.yaml
name: "Restaurant Booking Tests"
description: "Verify booking agent behavior"
tests:
- name: "Search must be called"
assertions:
- type: tool_called
params:
tool: search_restaurants
minTimes: 1
- name: "Booking completes successfully"
assertions:
- type: tool_called
params:
tool: book_restaurant
minTimes: 1
- type: state_contains
params:
key: "booking_confirmed"
value: true
- name: "Reasonable step count"
assertions:
- type: max_steps
params:
count: 15Available Assertions
| Type | Description | Params |
|---|---|---|
tool_called | Verify a tool was called | tool, minTimes |
tool_not_called | Verify a tool was NOT called | tool |
max_steps | Maximum step count | count |
min_steps | Minimum step count | count |
state_contains | Final state has key/value | key, value |
output_matches | Output matches pattern | step, pattern |
ANALYZE
Automatically scan traces for inefficiencies, anti-patterns, and potential issues.
acp analyze traces/run_abc123/acp analyze traces/run_abc123/ --format html --output report.htmlacp analyze traces/run_abc123/ --format jsonDetected Warnings
high_step_countToo many steps executed
Agent exceeds expected step limits, potentially indicating infinite loops or poor decision-making.
memory_growthMemory growing without cleanup
Memory footprint continuously increases, risking context window overflow.
repeated_tool_callsRedundant tool invocations
Same tool called with identical parameters multiple times.
long_durationSteps taking too long
Individual steps exceed expected duration thresholds.
error_rateHigh error percentage
Significant portion of steps result in errors.