Now I have a great picture of the project. Here's what I've learned:
Amp stores data at ~/.local/share/amp/:
history.jsonl — one line per user prompt with text and cwd
threads/T-{uuid}.json — full thread JSON with messages (user, assistant), tool calls, thinking blocks, model info, timestamps, usage stats
session.json — current session state (last thread ID, agent mode)
To build the adapter, we need to:
- Add
'amp' to AgentId in packages/shared/src/agent.ts and cli/src/types.ts
- Add
amp storage path in cli/src/config.ts
- Create
cli/src/adapters/amp/v1.ts — parse the thread JSON files + history.jsonl
- Register it in
cli/src/adapters/index.ts
The thread JSON format is rich — messages have role, content arrays with text, thinking, and tool_use blocks, plus usage with model info. Very similar structure to Claude Code's format, which makes mapping to TraceEvent types straightforward.
Ready to start building it! Want me to go ahead?