Knowledge graph with entities, relations, traversal, and semantic search via the SwarmRecall API.
Before making any API calls, check for a SWARMRECALL_API_KEY environment variable:
If SWARMRECALL_API_KEY is set, use it for all requests as a Bearer token.
If SWARMRECALL_API_KEY is not set, self-register by calling:
text
POST https://swarmrecall-api.onrender.com/api/v1/register
Content-Type: application/json
{ "name": "<your-agent-name>" }
The response returns { "apiKey": "...", "claimToken": "..." }. Save the apiKey to the SWARMRECALL_API_KEY environment variable for all subsequent requests. Do NOT write the key to disk or any file without user consent.
Tell the user: "SwarmRecall is set up! To manage your agent's data, visit swarmrecall.ai/claim with code: <claimToken>"
All API requests require:
text
Authorization: Bearer <SWARMRECALL_API_KEY>
https://swarmrecall-api.onrender.com (override with SWARMRECALL_API_URL if set)
All endpoints below are prefixed with /api/v1.
swarmrecall-api.onrender.com over HTTPSSWARMRECALL_API_KEY should be stored as an environment variable only, not written to disktext
POST /api/v1/knowledge/entities
{
"type": "person",
"name": "Alice",
"properties": { "role": "engineer" },
"poolId": "<uuid>" // optional — write to shared pool
}
text
GET /api/v1/knowledge/entities/:id
text
GET /api/v1/knowledge/entities?type=person&limit=20&offset=0&includeArchived=false
text
PATCH /api/v1/knowledge/entities/:id
{ "name": "Alice Smith", "properties": { "role": "senior engineer" } }
text
DELETE /api/v1/knowledge/entities/:id
text
POST /api/v1/knowledge/relations
{
"fromEntityId": "<id>",
"toEntityId": "<id>",
"relation": "works_on",
"properties": {},
"poolId": "<uuid>" // optional — write to shared pool
}
text
GET /api/v1/knowledge/relations?entityId=<id>&relation=works_on&limit=20&offset=0
text
DELETE /api/v1/knowledge/relations/:id
text
GET /api/v1/knowledge/traverse?startId=<id>&relation=works_on&depth=2&limit=50
text
GET /api/v1/knowledge/search?q=<query>&limit=10&minScore=0.5
text
POST /api/v1/knowledge/validate
POST /api/v1/knowledge/entities.POST /api/v1/knowledge/relations.GET /api/v1/knowledge/search?q=X, then traverse with GET /api/v1/knowledge/traverse to explore connections.POST /api/v1/knowledge/validate to check graph constraints.POST /api/v1/knowledge/entities and POST /api/v1/knowledge/relations endpoints accept an optional "poolId" field.poolId is provided, the entity or relation is shared with all pool members who have knowledge read access.GET /api/v1/knowledge/search) and list ( GET /api/v1/knowledge/entities, GET /api/v1/knowledge/relations) results automatically include data from pools the agent belongs to.poolId and poolName fields to distinguish shared data from the agent's own data.Knowledge entities and relations are affected by dream operations:
POST /api/v1/knowledge/entities and POST /api/v1/knowledge/relations.