Engraphy Docs ← Back to site

Fleet mode: memory for multi-agent frameworks

Preview. Fleet mode is a test feature on hosted Engraphy. Fleet API keys are issued on request, and the API described here may change before general release. To request a key, use the contact page.

Fleet mode gives every agent in a multi-agent framework an Engraphy memory of its own. Agents keep private memory, share chosen scopes with chosen agents, and hand work to each other with the relevant memory attached. Your framework's control layer manages the fleet over a small REST API, and each agent reads and writes memory over MCP with its own token.

This page is written to be followed by an agent or by the engineer wiring one up. Every request below is complete: replace the capitalised placeholders and run it.

The two endpoints

Plane Base URL Credential Who holds it
Management https://api.engraphy.tech/v1/fleets fleet API key, egk_... your framework's control layer only
Memory (MCP) https://mcp.engraphy.tech/bearer one agent token per running instance each agent instance

The two hosts are separate. /v1/fleets is served on api.engraphy.tech only, and mcp.engraphy.tech serves memory only, at /bearer for token clients and /oauth for OAuth clients such as Claude. A subscriber's own connection token does not authenticate /v1/fleets: management calls take the fleet API key, and agents take the tokens the management API mints for them.

Every management response that mints a token also returns mcp_url, the address that agent dials. Use the value from the response.

The model

Your framework Engraphy
One fleet, one deployment and one trust domain one space. Nothing crosses between spaces, so two fleets share nothing.
One durable agent, such as researcher or writer one principal (an agent id)
One running instance of that agent one token, named by client_name
The agent's own memory its private scope, personal-<agent>
Sharing with specific agents a scope grant at read or write
Sharing with the whole fleet scope visibility team-read or team-write
A handoff between agents a delegation: a private task scope that both agents can write, holding the brief
Your control layer the fleet's orchestrator principal, operated for you by Engraphy

An agent sees its own private scope, every scope granted to it, and every scope whose visibility is team-read or team-write. It sees nothing else. The management plane never reads an agent's private memory.

Authenticate

The fleet API key. Fleet keys belong to an Engraphy account. If you joined through an invite, that account already exists, and Engraphy issues a fleet key for it on request. The key is shown once and looks like egk_ followed by 43 URL-safe characters. Send it on every management request:

export ENGRAPHY_FLEET_KEY="YOUR_FLEET_KEY"   # egk_...
export API="https://api.engraphy.tech"

curl -sS "$API/v1/fleets" -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY"
[]

The key opens /v1/fleets and nothing else. Keep it in your control layer's secret store. Agents never need it.

Agent tokens. Each agent instance gets its own token from the management API, shown once in the response that mints it. Store it as that instance's secret and present it to the MCP endpoint as Authorization: Bearer AGENT_TOKEN.

Endpoint reference

All paths are under https://api.engraphy.tech, all require the fleet key, and all bodies are JSON. Unknown fields are refused with 422, so a typo fails loudly rather than being ignored.

Method and path Body Does
POST /v1/fleets {"name"} Create a fleet
GET /v1/fleets List your fleets
GET /v1/fleets/{fleet_id} One fleet: agents with live instances, active grants, delegations
DELETE /v1/fleets/{fleet_id} Tear down: every token revoked, all data retained
POST /v1/fleets/{fleet_id}/agents {"id", "display_name"?, "token"?} Register an agent: principal, private scope, first token
POST /v1/fleets/{fleet_id}/agents/{agent}/tokens {"client_name", "role"?, "no_scope_all"?} Mint a token for another instance
DELETE /v1/fleets/{fleet_id}/agents/{agent}/tokens/{client_name} Revoke one instance
DELETE /v1/fleets/{fleet_id}/agents/{agent} Retire an agent: every instance revoked, memory retained
POST /v1/fleets/{fleet_id}/scopes {"id", "description", "display_name"?, "visibility"?} Create a shared scope
PUT /v1/fleets/{fleet_id}/scopes/{scope}/visibility {"visibility"} private, team-read or team-write
PUT /v1/fleets/{fleet_id}/scopes/{scope}/grants/{agent} {"level"} Share a scope with an agent, read or write
DELETE /v1/fleets/{fleet_id}/scopes/{scope}/grants/{agent} Stop sharing
POST /v1/fleets/{fleet_id}/delegations {"from_agent", "to_agent", "task", "context"?} Open a handoff
POST /v1/fleets/{fleet_id}/delegations/{delegation_id}/complete Close a handoff

Naming rules. Agent ids and scope ids are 2 to 63 characters of lowercase letters, digits and dashes, starting with a letter or digit. An agent id is at most 54 characters, because its private scope is personal-<agent>. The agent id orchestrator is reserved. A client_name is 1 to 120 characters of letters, digits, dot, underscore and dash, and may not begin with engraphy-.

Token options. role is readwrite (the default) or readonly. no_scope_all defaults to true: the instance names the scope it searches, and scope: "all" is refused. Leave it on for unattended agents.

Default limits. 3 active fleets per account, 24 agents per fleet, 600 management requests per key per 5 minutes. Memory calls are rate limited per token by your account's plan.

Register agents and mint instance tokens

curl -sS -X POST "$API/v1/fleets/FLEET_ID/agents" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
  -d '{"id": "researcher", "display_name": "Researcher",
       "token": {"client_name": "worker-1"}}'

201 Created:

{
  "agent": {
    "id": "researcher",
    "display_name": "Researcher",
    "personal_scope": "personal-researcher",
    "status": "active",
    "tokens": [
      {"client_name": "worker-1", "role": "readwrite", "no_scope_all": true,
       "created_at": "2026-10-11T09:00:00+00:00"}
    ]
  },
  "token": {
    "client_name": "worker-1",
    "role": "readwrite",
    "no_scope_all": true,
    "created_at": "2026-10-11T09:00:00+00:00",
    "token": "AGENT_TOKEN_RESEARCHER",
    "mcp_url": "https://mcp.engraphy.tech/bearer"
  }
}

token.token is shown once. A second instance of the same agent gets its own token, so it can be revoked on its own:

curl -sS -X POST "$API/v1/fleets/FLEET_ID/agents/researcher/tokens" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
  -d '{"client_name": "worker-2"}'

201 Created returns the same token object as above. Every node an instance writes records its client_name as its source. If the token mint fails after the agent was created, the response is 502 and names the tokens route to call; the agent itself exists.

Share scopes between agents

A shared scope is created by the management plane and owned by the orchestrator. Its description is required: agents read it to decide where a memory belongs.

curl -sS -X POST "$API/v1/fleets/FLEET_ID/scopes" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
  -d '{"id": "project-notes",
       "description": "Findings about the current project that more than one agent needs."}'
{"scope_id": "project-notes", "visibility": "private", "owner_principal": "orchestrator"}

Grant it to specific agents. The call is idempotent, and a new level replaces the old one:

curl -sS -X PUT "$API/v1/fleets/FLEET_ID/scopes/project-notes/grants/researcher" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
  -d '{"level": "write"}'
{"scope_id": "project-notes", "agent": "researcher", "level": "write", "changed": true}

Grants work on an agent's private scope too: granting personal-researcher to writer at read lets the writer read the researcher's own memory. Stop sharing with DELETE .../scopes/{scope}/grants/{agent}, which answers {"scope_id": ..., "agent": ..., "removed": true}.

Share with the whole fleet

curl -sS -X PUT "$API/v1/fleets/FLEET_ID/scopes/project-notes/visibility" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
  -d '{"visibility": "team-read"}'
{"scope_id": "project-notes", "visibility": "team-read"}

team-read lets every agent in the fleet read the scope. team-write lets every agent read and write it. private limits it to its owner and its grants. A scope can also be created with a visibility in the same call, by adding "visibility": "team-read" to the create body.

Hand off work: delegation

A delegation opens a private task scope, grants both agents write on it, and writes the brief into it. The delegating side chooses what memory crosses: it searches its own memory, distils what is relevant, and passes it as context items (at most 20). The receiving agent sees the task scope and nothing behind it.

curl -sS -X POST "$API/v1/fleets/FLEET_ID/delegations" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
  -d '{"from_agent": "researcher", "to_agent": "writer",
       "task": {"title": "Draft the summary", "body": "Write a one-page summary of the findings."},
       "context": [{"title": "Key finding", "body": "Latency doubles above 10k rows."}]}'

201 Created:

{
  "id": "DELEGATION_ID",
  "from_agent": "researcher",
  "to_agent": "writer",
  "scope_id": "task-0a1b2c3d4e5f",
  "title": "Draft the summary",
  "task_node_id": "TASK_NODE_ID",
  "status": "open"
}

Both agents read and write the task scope by its scope_id. When the work is done, close it:

curl -sS -X POST "$API/v1/fleets/FLEET_ID/delegations/DELEGATION_ID/complete" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY"

The response is the same object with "status": "completed". Completing a delegation archives the task scope, so it leaves both agents' readable sets. An agent that wants to keep a result writes it into its own scope before the delegation is completed.

Use memory from an agent

Each agent connects to mcp_url over MCP (Streamable HTTP) with its own token, and uses the engine's tools: write, search, briefing, get, traverse, link, update, supersede, resolve_duplicate, and scope_create for further private scopes of its own. Parameters for every tool are in the tool reference.

With the Python MCP SDK (pip install mcp):

import asyncio, json, os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

MCP_URL = "https://mcp.engraphy.tech/bearer"
TOKEN = os.environ["ENGRAPHY_AGENT_TOKEN"]

async def main():
    headers = {"Authorization": f"Bearer {TOKEN}"}
    async with streamablehttp_client(MCP_URL, headers=headers) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            result = await session.call_tool("search", {
                "scope": "project-notes", "query": "latency findings", "limit": 5})
            print(json.loads(result.content[0].text))

asyncio.run(main())

Any MCP client that can send an Authorization header works the same way. The raw request underneath is JSON-RPC over HTTP POST:

curl -sS -X POST "https://mcp.engraphy.tech/bearer" \
  -H "Authorization: Bearer AGENT_TOKEN_RESEARCHER" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
       "params": {"name": "write", "arguments": {
         "scope": "project-notes", "type": "note",
         "title": "Latency above 10k rows",
         "body": "Query latency doubles once the table passes 10k rows."}}}'

The answer is JSON, or a server-sent event stream carrying the same JSON-RPC message. The tool's envelope is the JSON text in result.content[0].text:

{"v": 1, "outcome": "inserted", "node": {"id": "NODE_ID", "type": "note",
 "scope": "project-notes", "title": "Latency above 10k rows", "...": "..."}}

Resolve parked writes. When a write closely resembles an existing memory, write answers "outcome": "needs_confirmation" with a pending_id, and nothing is saved yet. Call resolve_duplicate with that pending_id and "resolution": "distinct" (or "merge" with merge_into). A parked write that is not resolved within 24 hours is discarded, so an agent's write helper should resolve before it returns.

Walkthrough: two agents, end to end

This connects, registers a researcher and a writer, shares a scope, writes and reads a memory, and hands work over.

1. Create the fleet.

curl -sS -X POST "$API/v1/fleets" \
  -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
  -d '{"name": "research-team"}'
{"id": "FLEET_ID", "name": "research-team", "status": "active",
 "mcp_url": "https://mcp.engraphy.tech/bearer", "created_at": "2026-10-11T09:00:00+00:00"}

Keep id. Every later call names it.

2. Register two agents. Run the agent registration request twice, once with "id": "researcher" and once with "id": "writer". Store each response's token.token as that agent's AGENT_TOKEN_RESEARCHER and AGENT_TOKEN_WRITER.

3. Share a scope. Create project-notes as shown above, then grant researcher at write and writer at read:

for pair in researcher:write writer:read; do
  curl -sS -X PUT "$API/v1/fleets/FLEET_ID/scopes/project-notes/grants/${pair%%:*}" \
    -H "Authorization: Bearer $ENGRAPHY_FLEET_KEY" -H "Content-Type: application/json" \
    -d "{\"level\": \"${pair##*:}\"}"
done

4. The researcher writes a memory. Send the raw write request above with AGENT_TOKEN_RESEARCHER. The outcome is inserted, or needs_confirmation, which the researcher resolves as distinct.

5. The writer reads it. With AGENT_TOKEN_WRITER:

curl -sS -X POST "https://mcp.engraphy.tech/bearer" \
  -H "Authorization: Bearer AGENT_TOKEN_WRITER" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
       "params": {"name": "search", "arguments": {
         "scope": "project-notes", "query": "latency"}}}'

The result lists the researcher's note. A write from the writer into project-notes is refused, because its grant is read.

6. Hand off. Open the delegation shown above, from researcher to writer. The writer searches the returned scope_id to read the brief and the context, and writes its draft there. The researcher reads the draft from the same scope.

7. Close. The writer copies anything it wants to keep into personal-writer, then the control layer completes the delegation.

8. Inspect. GET /v1/fleets/FLEET_ID returns the fleet with its agents and live instances, its active grants and its delegations.

Revoke, retire and tear down

Call Effect
DELETE /v1/fleets/{fleet_id}/agents/{agent}/tokens/{client_name} That instance's token stops working at once
DELETE /v1/fleets/{fleet_id}/agents/{agent} Every instance of the agent is revoked; its memory is retained
DELETE /v1/fleets/{fleet_id} Every token in the fleet is revoked; all data is retained

Errors

Status Meaning
401 Missing or unknown fleet key
403 The key's account is not in good standing
404 No such fleet, agent, scope or delegation in this account. Another account's fleet answers the same as one that does not exist.
409 Already exists, already torn down or retired, or a limit is reached
422 Invalid body: an unknown field, a malformed id, or an out-of-range value. detail says which.
429 Rate limited. Wait for the Retry-After header.
502 The memory engine refused the operation. detail carries its message.

Error bodies are {"detail": "..."}.

FAQ

Does a fleet's space get a pack automatically, and can I use my own pack?

Yes, every new fleet's space has a pack applied as part of POST /v1/fleets, before the call returns. It is the same pack for every fleet on the deployment: the hosted fleet pack, which is Engraphy's starter pack unless the deployment sets a different one. POST /v1/fleets accepts only name, so a request cannot choose a pack, and agents have no pack tool over MCP. To run a fleet on your own pack, contact Engraphy: packs are applied and upgraded by the operator on the server.

Can an agent's own token create or list scopes, or only the fleet key?

An agent's token can do both, over MCP. scope_list (and scope_guide) work with any token and return every scope that agent can read: its private scope, scopes it created, scopes granted to it, and scopes with team-read or team-write visibility. scope_create needs a readwrite token (the default) and arguments id, display_name, description and confirm: true; it creates a private scope that the agent owns. What an agent cannot do is share: grants and visibility changes are management calls, made with the fleet key through PUT .../scopes/{scope}/grants/{agent} and PUT .../scopes/{scope}/visibility, and they work on any scope in the fleet, including one an agent created. The management API creates shared scopes (POST .../scopes) but has no route that lists scopes.

Does a deleted fleet still count toward the limit of 3?

No. The limit counts only fleets whose status is active. DELETE /v1/fleets/{fleet_id} is a soft delete: it revokes every token in the fleet, sets the fleet's status to torn_down, and retains all of its data, which frees the slot at once. A torn-down fleet still appears in GET /v1/fleets with "status": "torn_down" and cannot be reactivated.

What is the complete body for registering an agent?

id is the one required field, so the smallest valid body is {"id": "researcher"}. A body of only {"token": {"client_name": "..."}} is refused with 422, because it has no id. Everything else is optional:

Field Default
id required: 2 to 54 characters of lowercase letters, digits and dashes
display_name the id
token.client_name "default"
token.role "readwrite" (or "readonly")
token.no_scope_all true

So {"id": "researcher", "token": {"client_name": "worker-1"}} registers the agent and names its first instance. Any field not listed here is refused with 422.

Engraphy, associative memory for AI agents · engraphy.tech