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

# Daemon protocol

> Wire protocol between the Fleet Prime Agent daemon and its clients. Versions, capabilities, and compatibility rules.

The daemon protocol lives in `packages/agent/src/protocol.ts`. It's how CLI, TUI, and web all attach to a running daemon.

## Version numbers

* **`DAEMON_PROTOCOL_VERSION`** — bumps only on incompatible changes.
* **`DAEMON_SCHEMA_REVISION`** — bumps on schema changes.

Every wire change is classified as one of:

* **Backward-compatible** — old clients keep working with new daemons without a change.
* **Capability-gated** — the daemon only sends the new thing to clients that advertised support.
* **Incompatible** — old clients cannot talk to new daemons. Requires a `DAEMON_PROTOCOL_VERSION` bump.

## Capability negotiation

Clients advertise capabilities on connect. The daemon checks capabilities before sending new commands or depending on events the client doesn't understand. **New daemon commands must not be part of startup without a protocol or capability gate** — otherwise old clients would fail to connect.

## Compatibility tests

Every wire change updates:

* The compatibility maps.
* The new-client / old-daemon test.
* The old-client / new-daemon test.

If a change ships without these updates, mixed-version deployments will break.

## Related

* [Daemon](/fleet-prime-agent/interfaces/daemon) — how to run it.
* [Streaming protocol](/fleet-prime-agent/concepts/streaming-protocol) — the event shape flowing over the daemon protocol.
