Adapter SDK
Teach atrium how to detect and resume your AI tool.
Overview
atrium ships with bundled adapters for Claude Code and Codex. If your AI tool can detect active sessions and resume them from the CLI, you can teach atrium how to work with it too.
An adapter is just a directory with a JSON manifest and a few shell scripts:
~/.atrium/adapters/my-tool/
adapter.json
detect_running.sh
extract_session_id.sh
list_recent_sessions.sh
build_resume_command.sh
No Rust. No recompilation. If your tool has a --resume flag, you can probably get it working in an afternoon.
Adapter manifest
The adapter.json file describes the adapter:
{
"name": "my-tool",
"displayName": "My Tool",
"version": "1.0.0",
"accentColor": "#4CAF50",
"launchCommand": "my-tool",
"hooks": {}
}
Shell scripts
detect_running.sh
Given a PTY's process tree, determine if the AI tool is currently running. Exit 0 if running, non-zero otherwise.
extract_session_id.sh
Extract the session ID from a running instance's process arguments or environment. Output the session ID to stdout.
list_recent_sessions.sh
List recent sessions as JSON. Each entry should include a session ID and title:
[
{ "id": "session-abc123", "title": "Refactor auth middleware" },
{ "id": "session-def456", "title": "Add user validation" }
]
build_resume_command.sh
Given a session ID as an argument, output the shell command to resume that session:
echo "my-tool --resume $1"
Bundled adapters
The bundled adapters for Claude Code and Codex are in the source repository at src-tauri/adapters/. They are seeded to ~/.atrium/adapters/ on first run and updated when the bundled version changes.
Community adapters and the full SDK spec are maintained at atrium-adapters.
