> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sessions and projects

> How Fleet Prime Agent persists sessions on disk, groups them into projects, and reports session status in the workspace.

## 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`.

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.

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:

| Status        | Meaning                                                                     |
| ------------- | --------------------------------------------------------------------------- |
| `running`     | The session is streaming a turn, or the daemon reports it actively working. |
| `idle`        | The session is live (attached or active) but not currently working.         |
| `interrupted` | The session exists on disk but has no live daemon worker.                   |
| `failed`      | The daemon reports the session crashed.                                     |

## 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.

## Related

* [Streaming](/fleet-prime-agent/concepts/streaming) — how live turns and reconnection replay work.
* [HTTP API](/fleet-prime-agent/reference/http-api) — the full session, project, and workspace endpoint list.
