Import
The import command converts agent session transcripts into AgentV’s Message[] format for offline grading — no re-running the agent, no API keys needed.
Supported Providers
Section titled “Supported Providers”| Provider | Command | Source |
|---|---|---|
| Claude Code | agentv import claude | ~/.claude/projects/<path>/<uuid>.jsonl |
Codex and Copilot importers are planned for future releases.
import claude
Section titled “import claude”Import a Claude Code session transcript.
Discover available sessions
Section titled “Discover available sessions”agentv import claude --listOutput:
Found 5 session(s):
4c4f9e4e-e6f1-490b-a1b1-9aef543ebf22 2m ago -home-user-myproject 087b801a-7a63-48ff-b348-62563a290b23 1h ago -home-user-myproject ed8b8c62-4414-49fb-8739-006d809c8588 3h ago -home-user-other-projectImport latest session
Section titled “Import latest session”agentv import claude --discover latestImport a specific session
Section titled “Import a specific session”agentv import claude --session-id 4c4f9e4e-e6f1-490b-a1b1-9aef543ebf22Filter by project path
Section titled “Filter by project path”agentv import claude --discover latest --project-path /home/user/myprojectCustom output path
Section titled “Custom output path”agentv import claude --discover latest -o transcripts/my-session.jsonlDefault output: .agentv/transcripts/claude-<session-id-short>.jsonl
Options
Section titled “Options”| Flag | Description |
|---|---|
--session-id <uuid> | Import a specific session by UUID |
--discover latest | Import the most recent session |
--project-path <path> | Filter sessions by project path |
--output, -o <path> | Custom output file path |
--projects-dir <dir> | Override ~/.claude/projects directory |
--list | List available sessions instead of importing |
Output Format
Section titled “Output Format”The imported transcript is written as JSONL — one Message object per line:
{"role":"user","content":"Fix the bug in auth.ts"}{"role":"assistant","content":"I'll fix the authentication bug.","toolCalls":[{"tool":"Read","input":{"file_path":"src/auth.ts"},"id":"toolu_01...","output":"...file contents..."}]}Each message follows AgentV’s standard Message interface with role, content, and optional toolCalls (including tool outputs paired from subsequent events).
What Gets Parsed
Section titled “What Gets Parsed”| Claude Event | AgentV Message |
|---|---|
user | { role: 'user', content } |
assistant | { role: 'assistant', content, toolCalls } |
tool_use blocks | ToolCall { tool, input, id } |
tool_result blocks | Paired with matching tool_use by ID |
progress, system | Skipped |
| Subagent events | Filtered out (v1) |
Token usage is aggregated from the final cumulative value per LLM request. Duration is computed from first-to-last event timestamp.
Workflow
Section titled “Workflow”Import a session, then run evaluators against it:
# 1. Import the latest Claude Code sessionagentv import claude --discover latest
# 2. Run evaluators against the imported transcriptagentv eval evals/my-eval.yaml --transcript .agentv/transcripts/claude-4c4f9e4e.jsonlSee examples/features/import-claude/ for a complete working example.