Connecting Agents¶
Lerim ingests session transcripts from your coding agents to extract decisions and learnings. The lerim connect command registers an agent platform so Lerim knows where to find its sessions.
Supported platforms¶
| Platform | Session store | Format |
|---|---|---|
claude |
~/.claude/projects/ |
JSONL files |
codex |
~/.codex/sessions/ |
JSONL files |
cursor |
~/Library/Application Support/Cursor/User/globalStorage/ (macOS) |
SQLite state.vscdb, exported to JSONL cache |
opencode |
~/.local/share/opencode/ |
SQLite opencode.db, exported to JSONL cache |
Auto-detect¶
Connect all supported platforms in one command:
This scans default paths for each platform and registers any that are found.
Connect individual platforms¶
Custom session paths¶
If your agent stores sessions in a non-default location:
lerim connect claude --path /custom/path/to/claude/sessions
lerim connect cursor --path ~/my-cursor-data/globalStorage
The path is expanded (~ is resolved) and must exist on disk. This overrides the auto-detected default for that platform.
List connections¶
Disconnect a platform¶
How adapters work¶
Each adapter implements the same protocol:
default_path()— where traces live on diskcount_sessions(path)— how many sessions existiter_sessions(traces_dir, start, end, known_run_ids)— yield session records within a time windowfind_session_path(session_id, traces_dir)— locate a specific session fileread_session(session_path, session_id)— parse a session for the dashboard viewer
Adapters handle platform-specific formats (JSONL, SQLite) and normalize them into a common SessionRecord that the sync pipeline processes.
Adding a new adapter¶
See Contributing for the step-by-step guide to adding a new platform adapter. Adapters are the easiest contribution path — clear interface, isolated scope.