当AI代理需要持久记忆、知识图谱、学习成果、技能注册表、共享池或后台梦境整合等功能时,使用SwarmRecall。
Persistent memory, a knowledge graph, learnings, a skill registry, shared collaboration pools, and background "dream" consolidation — for any AI agent — via the SwarmRecall API at https://swarmrecall-api.onrender.com.
For onboarding, examples, command references, or troubleshooting, read the bundled README.md, examples/, references/, and TROUBLESHOOTING.md before improvising workflow advice.
Three ways to connect, in increasing order of flexibility:
Local stdio (default):
bash
npm install -g @swarmrecall/cli
swarmrecall register --save # mints an API key and stores it in ~/.config/swarmrecall/config.json
swarmrecall mcp # runs the MCP server over stdio — point your client at this command
Remote HTTP (no install):
text
URL: https://swarmrecall-api.onrender.com/mcp
Auth: Authorization: Bearer ${SWARMRECALL_API_KEY}
Transport: streamable-http
Both transports expose the same 52 tools and 4 resources. See https://www.swarmrecall.ai/docs/mcp for client-specific configuration snippets.
bash
npm install -g @swarmrecall/cli
swarmrecall register --save
swarmrecall memory store "<content>" --category fact --importance 0.8
swarmrecall memory search "<query>"
swarmrecall knowledge create --type person --name "Alice" --props '{"role":"engineer"}'
swarmrecall learnings log --category error --summary "<summary>"
swarmrecall dream start
See references/commands.md for the full command surface.
If the user is wiring a custom agent, install the SDK:
bash
npm install @swarmrecall/sdk
ts
import { SwarmRecallClient } from '@swarmrecall/sdk';
const client = new SwarmRecallClient({ apiKey: process.env.SWARMRECALL_API_KEY! });
await client.memory.store({ content: 'User prefers dark mode', category: 'preference', importance: 0.8 });
If SWARMRECALL_API_KEY is not set and a hosted agent needs one, self-register with no account:
text
POST https://swarmrecall-api.onrender.com/api/v1/register
Content-Type: application/json
{ "name": "<agent-name>" }
Response returns { "apiKey": "...", "claimToken": "..." }. Tell the user: "SwarmRecall is set up! To manage your agent's data, visit https://swarmrecall.ai/claim with code: <claimToken>."
All API requests require a Bearer token in the Authorization header: Authorization: Bearer <SWARMRECALL_API_KEY>.
swarmrecall-api.onrender.com over HTTPS.SWARMRECALL_API_KEY as an environment variable or in ~/.config/swarmrecall/config.json (created by swarmrecall register --save). Do not check it into source control.Conversational memory with semantic search and session tracking.
ToolPurposememory_storeStore a memory with category, importance, and tags.memory_searchSemantic search over memories.memory_get / memory_listFetch a specific memory or filtered list.memory_update / memory_deleteUpdate metadata or archive a memory.memory_sessions_startStart a new memory session.memory_sessions_currentGet the active session.memory_sessions_updateAppend state, summary, or mark ended.memory_sessions_listList sessions.
memory_sessions_current to load context. If none, call memory_sessions_start.memory_store with an appropriate category and importance.memory_search and use returned memories to inform your response.memory_sessions_update with ended: true and a summary.Knowledge graph with entities, relations, traversal, and semantic search.
ToolPurposeknowledge_entity_create/get/list/update/deleteEntity CRUD.knowledge_relation_create/list/deleteRelation CRUD.knowledge_traverseWalk the graph from an entity, filtered by relation and depth.knowledge_searchSemantic search over entities.knowledge_validateCheck graph constraints.
knowledge_entity_create.knowledge_relation_create.knowledge_search then knowledge_traverse to explore connections.knowledge_validate to catch orphaned entities or conflicting relations.Error tracking, correction logging, and pattern detection that surfaces recurring issues.
ToolPurposelearning_logLog a learning with category, summary, priority, area.learning_search/get/list/updateRetrieve and update.learning_patternsList recurring patterns.learning_promotionsList promotion candidates.learning_resolveMark resolved with a resolution + optional commit SHA.learning_linkLink two learnings for pattern detection.
learning_log with the full error output / what was wrong vs. correct.learning_patterns to preload known recurring issues; learning_promotions for patterns ready to be promoted.Skill registry for tracking installed agent capabilities and getting contextual suggestions.
ToolPurposeskill_registerRegister a new skill.skill_list/get/update/removeManage registered skills.skill_suggestGet skill suggestions for a task context.
skill_register with name, version, and source.skill_list.skill_suggest for relevant skill recommendations.Named shared data containers for cross-agent collaboration.
ToolPurposepool_listList pools this agent belongs to.pool_getPool details + members.
poolId and poolName to distinguish shared data from the agent's private data.poolId to any memory_store, knowledge_entity_create, knowledge_relation_create, learning_log, or skill_register call.pool_list to see available pools and their access levels.Background memory consolidation — deduplication, pruning, contradiction resolution, and session summarization.
ToolPurposedream_startStart a dream cycle.dream_get/list/updateCycle management.dream_complete/failCycle completion.dream_get_config / dream_update_configConfiguration.dream_get_duplicates/unsummarized_sessions/duplicate_entities/stale/contradictions/unprocessedCandidate primitives.dream_executeRun Tier 1 server-side operations (decay, prune, orphan cleanup).
dream_start.dream_execute (decay, prune, orphan cleanup).dream_get_duplicates, dream_get_unsummarized_sessions, dream_get_contradictions.dream_complete with the results.Read-only MCP resources for clients that surface resources as inline context:
swarmrecall://pools — pools this agent belongs toswarmrecall://skills — skills this agent has registeredswarmrecall://sessions/current — current memory sessionswarmrecall://dream/config — dream configurationexamples/quickstart.md, examples/memory-workflow.md, examples/knowledge-graph.md, examples/learnings-workflow.md — workflow recipesreferences/commands.md, references/mcp-tools.md — complete command and tool referencesTROUBLESHOOTING.md — common auth and connectivity issues