Bourdon has three programmable surfaces, and all three are documented here. Which one you use depends on where you are standing.
| Surface | Use it from | Reference |
|---|---|---|
| MCP server | any MCP-aware agent or client (Claude Code, Claude Desktop, Cursor, Codex, ChatGPT, claude.ai) | this page, plus MCP tools |
| Command line | shell, hooks, CI, cron you choose to run | this page |
| On-disk library | anything that can read YAML | The memory format |
MCP server#
bourdon serve # stdio, for a client that launches the server
bourdon serve --transport http --port 7500 # HTTP, loopback only by default
Transports#
stdio is the MCP default and the zero-config path: the client launches bourdon serve and talks to it over standard input and output. There are no ports and no tokens because the caller is your own process; it gets the trusted operator identity.
HTTP serves the MCP endpoint at /mcp on port 7500. Binding anything other than loopback requires authentication to be configured, or the server refuses to start:
bourdon agent add my-laptop --tier trusted # prints a bearer token once
bourdon serve --transport http --host 0.0.0.0 --allowed-host bourdon.example.org
Clients present the token as Authorization: Bearer <token>:
{
"mcpServers": {
"bourdon": {
"url": "https://bourdon.example.org/mcp",
"headers": { "Authorization": "Bearer bdn_…" }
}
}
}
Requests under a Host header you did not declare are refused with 421 Misdirected Request before authentication, as a DNS-rebinding guard. Declare each public name with --allowed-host or BOURDON_ALLOWED_HOSTS.
OAuth front door#
Browser clients that cannot carry a header (claude.ai custom connectors, ChatGPT connectors) authenticate through a built-in OAuth flow with a consent page you gate with a passphrase. There is no identity provider and no third party in the path.
bourdon oauth set-passphrase
bourdon serve --transport http --oauth-public-url https://bourdon.example.org
Setting --oauth-public-url is what turns it on. The full model, including what it does not promise, is in docs/oauth-security-model.md.
Peers#
bourdon serve --transport http --peer https://other-machine.example/ --federate
--peer names one peer (repeatable). --federate also loads ~/.bourdon/peers.yaml. --no-peers forbids federation entirely. Remote peers must be HTTPS. See How federation works for the semantics.
Tools and resources#
Sixteen tools and three resources. They are listed with full signatures on MCP tools, a page generated from the server source at each release. The short map:
| Need | Call |
|---|---|
| recognise what this turn is about, in about a millisecond | prepare_recognition_context |
| then fetch deeper context without blocking recognition | get_deeper_context |
| who knows about X | find_entity, query_agent_memory, get_cross_agent_summary |
| what happened lately | list_recent_work, list_workstreams, list_notes |
| who is here | list_agents, export_agents, describe_caller |
| write a fact or decision | commit_to_federation |
| audit and undo | list_memory_versions, explain_memory_change, rollback_agent_memory |
Every read takes access_level (public, team, or private, default public for reads and team for recognition). Every write is validated against the L5 schema before it lands.
Command line#
bourdon --help is authoritative and every subcommand has its own --help. Grouped by job:
Install and check#
| Command | Does |
|---|---|
bourdon setup | Detect agents, pick which to federate, create ~/agent-library/, wire the Claude Code hooks (SessionEnd export, UserPromptSubmit and SessionStart recognition), run the first export. --dry-run, --non-interactive. |
bourdon claude-code hook user-prompt-submit / session-start | The recognition hooks Claude Code runs; read the hook JSON on stdin, print hookSpecificOutput, exit 0 always. Other agents author theirs against docs/AUTHORING_A_HOOK.md. |
bourdon claude-code hook stop | The usefulness half: finds the turn's pending recognition row, scores the reply in the transcript, appends a kind: reply row. Wired by bourdon setup with the others (0.22.0). |
bourdon recognition eval [--live PROMPTS] | Score recognition against the golden set, or against the live library with real prompts. |
bourdon recognition usefulness [--from-transcript PATH] | Did replies reference what was recognised. |
bourdon doctor | Health of every installed participant with a proposed_fix per problem. --strict for CI. |
bourdon demo | The production pipeline over synthetic data in a tempdir. Touches nothing real. |
bourdon dogfood | Plant a marker, export all, query L6, verify the round trip. Machine-readable report with --report-out. |
bourdon audit-leaks | Static scan of published manifests for credential shapes and leaked private rows. --strict --require-files is the CI form. |
Publish memory#
| Command | Does |
|---|---|
bourdon export-all | Export every enrolled participant's manifest. Refuses to overwrite a populated manifest with an empty export unless told to. |
bourdon <agent> export | One participant: claude-code, codex, cursor, copilot, cascade, hermes, lovable, claude-desktop-cowork, claude-desktop-code, *-automations, openclaw (staged). |
bourdon agents list / enable / disable | The consent roster. Bare bourdon agents emits the bourdon.agents/v1 JSON contract; --federated merges peers. |
Read memory#
| Command | Does |
|---|---|
bourdon prepare-turn "<prompt>" | The recognition step as a command. --access-level. |
bourdon deeper-context "<prompt>" | The hydration step. |
bourdon codex prepare-turn and friends | Codex-specific turn preparation, including the UserPromptSubmit hook. |
Serve and secure#
| Command | Does |
|---|---|
bourdon serve | The L6 MCP server. Flags above. |
bourdon agent add / list / rotate / set-tier | Federation members and their tokens. Tokens print once; only hashes are stored. |
bourdon grant / ungrant | Give a quarantined member read access to one namespace. |
bourdon revoke | Kill a member's token, effective on the next request. |
bourdon staging list / promote / reject | Review quarantined writes. |
bourdon audit | Query the append-only audit log. --denials, --agent, --export. |
bourdon oauth set-passphrase / status | The browser-client front door. |
bourdon library enroll | Explicit library identity, required for caller descriptions. |
Move memory#
| Command | Does |
|---|---|
bourdon sync push <dest> | rsync the library out, visibility-filtered (public by default), machine-scoped. |
bourdon sync pull <src> | Receive into a quarantine, validate, promote atomically. |
bourdon sync stage <dir> | The first half of a push as its own step, for destinations rsync cannot reach. |
Surfaces#
| Command | Does |
|---|---|
bourdon presence register / heartbeat / deregister / list | Live-session registry for the desktop tray. Local, TTL-based. |
bourdon console | Loopback-only web page for the roster, per-run access token. |
bourdon benchmark | The recognition and latency harnesses behind the published numbers. |
Stable contracts#
These are the shapes other software can depend on. Everything else may change before 1.0; see Status and stability.
| Contract | Where |
|---|---|
L5 manifest, spec 0.1 | https://bourdon.ai/schema/L5_manifest_v0.1.json |
bourdon.agents/v1 | output of bourdon agents --json and the export_agents tool |
bourdon.roster/v1 | output of bourdon agents list --json |
codex-turn-brief/v1 | output of compile_codex_turn |
| Participant contract | spec/PARTICIPANT_CONTRACT.md |
| Conformance fixtures | conformance/, regenerated in CI |
The CLI, the L5 wire format, the spec, and the conformance fixtures are Apache-2.0. The engine behind them is BUSL-1.1 and converts to Apache-2.0 four years after each release. Details in LICENSING.md.