Skip to main content

Sessions

A session is a persistent conversation with the agent. The engine backs each session with:
  • A JSONL transcript on disk under ~/.prime/agent/, written by the daemon’s session catalog.
  • A persistent IPython kernel, so variables, open files, and processes survive across tool calls within the session.
Because transcripts live on disk and the daemon outlives the browser tab, sessions remain available after you close the browser. The workspace lists them again on the next launch, and POST /api/chat/resume reattaches by sessionId or sessionFile. Fleet releases the connection of a session that has been idle for 30 minutes, or the least recently used idle sessions when more than 64 sessions are attached. Fleet never releases a session that is running a turn or has other work in progress, and it does not delete the transcript. When you reopen a released session, Fleet reattaches it and restores its saved messages. Sessions are created with a working directory (cwd), an optional model, and an optional thinking level. You can rename and delete sessions from the workspace (PATCH and DELETE on /api/chat/sessions).

Projects

The web workspace groups sessions into projects. A project associates sessions with a directory on disk, so one Fleet instance can track work across multiple codebases. The project registry is server-side state in web/server; projects support create, rename, delete, and fork (/api/projects, /api/projects/fork), and a directory picker (/api/projects/browse) helps you bind a project to a path. Every session belongs to a registered project. After you delete a project, Fleet rejects commands, resume requests, and other session-scoped requests for its sessions with 404, including sessions that are still open in the workspace. The default working directory is the directory you launched fleet-agent from (exposed to the server as PRIME_AGENT_WORKSPACE_ROOT). You can rebind it at runtime with POST /api/workspace/root.

Session status

The workspace derives one of four statuses per session:

Attachments

Sessions accept file attachments through the workspace composer (POST /api/chat/session), and individual attachments are fetched back by attachmentId. Attachments are managed per session on the server side.
  • Streaming — how live turns and reconnection replay work.
  • HTTP API — the full session, project, and workspace endpoint list.
Last modified on November 19, 2026