Prime Agent
Prime Agent saves sessions as JSONL session trees. Hansard imports ordinary conversations, the branch you last worked on, forks, and recursive language model (RLM) child sessions. Your model provider sign-in stays inside Prime Agent.
Source IDs
Section titled “Source IDs”| Source | Use it for |
|---|---|
prime-agent |
Prime Agent sessions in current and older folder layouts, forks, and linked RLM child sessions. |
How the import works
Section titled “How the import works”Hansard reads Prime Agent’s current flat session folder, the earlier folders
for each working directory, and older JSONL files stored directly under
~/.prime/agent. Every stable Prime Agent release writes the same version 3
session tree, with added records for session events, repository state, service
tier, child usage, and RLM children. Hansard accepts only this version 3
format. Files in pi’s older version 1 and 2 formats are rejected, because
Prime Agent never wrote them.
The conversation starts at the last entry in the file and follows each entry’s parent back to the start, which is the branch Prime Agent resumes. User and assistant messages, images, reasoning, tool calls and results, model settings, usage, session events, and repository and status details come from that branch. Entries on abandoned branches stay in the archive’s exact copy of the file.
RLM child sessions become their own linked conversations, and their usage stays with the child. Resuming a Prime Agent session updates the same conversation in Hansard, and a fork creates a new linked conversation. The import reads only conversation records. It never reads provider credentials, configuration secrets, or general app logs.
Prime Agent’s continual harness, which carries learned state from one session
to the next, is archived as memory instead. hansard memory backup saves
~/.prime/agent/harness/harness_state.json and the global refinements.jsonl
history as editable global memories. A session’s own harness state stays in
that session’s archived files and does not become a project or global memory.
Session details record only the harness format and its entry and refinement
counts, not its prompts, memories, skills, or subagents.
Import and keep current
Section titled “Import and keep current”hansard import --source prime-agent --since allhansard memory backuphansard index rebuildHansard finds the standard ~/.prime/agent folder. If your sessions are
somewhere else, set HANSARD_PRIME_AGENT_SESSION_DIR.
With Automatic source selection, the watcher already includes
prime-agent, and it backs up memories every 15 minutes. With a Custom
list, enable the source. The watcher picks it up within 30 seconds:
hansard config sources enable prime-agenthansard watcher statusSet up Prime Agent first
Section titled “Set up Prime Agent first”Install Prime Agent with Prime Intellect’s installer, start it, and use
/login to connect a model provider:
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | shprime-agentprime-agent model listThe Prime Agent model catalog lists the
model routes bundled with the Prime Agent release Hansard was checked against.
It does not show what your account can use; prime-agent model list shows the
routes available on your machine.
Review the import in the app
Section titled “Review the import in the app”- When the import finishes, open Sessions and selectFilter & sort.
- Set Source to Prime Agent and setTime to the window you imported. UseFolder to narrow the list when you use this harness in several projects.
- Select a conversation to check its messages, tool calls, files, commits, model, and token usage.
To keep archiving new sessions from a local harness, openSettings → Imports. Automaticfollows every supported harness installed on this computer.Custom lets you turn individual harnesses on or off. Cloud sources turn on separately under Cloud agents, and ChatGPT, Claude.ai, Gemini, and Gemini Notebook / NotebookLM exports import withImport export…. Each also has its own import command. If a conversation you expect is missing after you reset the filters, run the import command on this page again with --explain-skips where the source supports it.
What Hansard preserves
Section titled “What Hansard preserves”- User and assistant text, images, reasoning, tool calls and results, shell commands, model routes, response IDs, finish state, input and output tokens, and the cost Prime Agent reported.
- Model, reasoning effort, and service tier changes, applied to the turns that follow them.
- Branch summaries, context compaction, session events, tasks, repository, branch, commit, and extension details. Abandoned branches stay in the archived copy of the file.
- Fork history and linked RLM child sessions, including the child’s tokens and cost when Prime Agent recorded them.
- A session’s own harness state in its archived files, with only the counts of prompts, memories, skills, subagents, and refinements in the session details.
- Your images and extension attachments, stored as attachment files instead of inside the transcript.
Prime Agent can continue your latest session, resume a session in place, or
fork it. prime-agent --resume and prime-agent --fork take a session path or
ID:
prime-agent --continueAfter a resume, the next import updates the same Hansard conversation. A fork becomes a separate conversation that records its parent.
Known limitations
Section titled “Known limitations”- A route in the model catalog does not mean your account can use it.
- Registry, scheduler, and artifact JSONL files without a valid session header are rejected instead of being guessed into conversations.
- Version 1, version 2, mixed, damaged, changing, and oversized session files are rejected instead of being read as pi sessions.
- A session’s own harness state stays in its archived files. Only the global harness appears in memory search.
- Hansard never reads, copies, or archives Prime Agent’s
auth.json, API keys, OAuth tokens, configuration, background service logs, or installed package files.
Refresh an existing archive
Section titled “Refresh an existing archive”hansard import --source prime-agent --since allhansard index rebuildAfter a Hansard parser change, reimport from Prime Agent’s files. Model routes, service tiers, session events, attachments, fork history, and harness state all come from the original JSONL files and session folders. Hansard does not patch older imported conversations in place.