Usage
How to Create Relationships¶
Using store_memory¶
When creating a new memory, you can link it to existing memories using related_memory_ids:
curl -X POST https://akashic-mcp.com/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"memory","arguments":{"action":"store","content":"PostgreSQL index strategy: Use B-tree indexes for primary keys and foreign keys, hash indexes for equality lookups. Create composite indexes for common query patterns.","metadata":{"classification":"notes","event_type":"decision","tags":["database","postgresql","indexes"],"project_name":"ecommerce-api","related_memory_ids":["mem-db-001"]},"language":"en"}},"id":1}'
Using update_memory¶
You can add or update relationships when updating a memory:
curl -X POST https://akashic-mcp.com/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"memory","arguments":{"action":"update","id":"mem-main-001","metadata":{"related_memory_ids":["mem-db-001","mem-auth-001","mem-cart-001"]},"language":"en"}},"id":1}'
Automatic Bidirectional Links¶
The system automatically maintains bidirectional relationships. When you link memory A to memory B, the system also updates memory B to reference memory A (if it exists).
Related Documentation¶
- Nested Memories Guide - Complete nested memories guide
- Memory Management Guide - Learn how to organize and use memories effectively
- MCP Tools Reference - Complete tools reference