Quickstart

From zero to working memory in under 5 minutes.

1. Get an API key

Sign up at /portal/login with your email. You'll get a magic link — click it and create an API key from your dashboard.

Warning
Keep your key secret. Never expose it in frontend code or commit it to git. Use environment variables.

2. Ingest some content

shell
"kw">curl -X POST https://anansimemory.com/v1/ingest \ -H "Authorization: Bearer ans_your_key" \ -H "Content-Type: application/json" \ -d '{"userId":"user_abc","content":"User prefers TypeScript. Building a webhook retry system with BullMQ."}'
202Response
{ "id": "api:ws:user_abc:uuid", "queued": true }

3. Wait for synthesis

Synthesis runs in the background. For a quick test, wait about 10–15 seconds before querying. In production, synthesis keeps up automatically.

4. Retrieve context

shell
"kw">curl "https://anansimemory.com/v1/context?userId=user_abc&q=webhook+retry" \ -H "Authorization: Bearer ans_your_key"
200Response
{ "static": ["Prefers TypeScript", "Uses BullMQ for job queues"], "dynamic": ["Working on webhook retry system"], "relevant": [{ "content": "User prefers TypeScript...", "similarity": 0.87 }] }

5. Inject into your LLM call

typescriptchatbot.ts
"kw">const ctx = "kw">await fetch( `https:"kw">class="cm">//anansimemory.com/v1/context?userId=${userId}&q=${encodeURIComponent(question)}`, { headers: { Authorization: `Bearer ${process.env.ANANSI_KEY}` } } ).then(r => r.json()); "kw">const memoryBlock = [ ...ctx.static.map((f: "kw">string) => `Fact: ${f}`), ...ctx.dynamic.map((d: "kw">string) => `Context: ${d}`), ].join("\n"); "kw">const response = "kw">await anthropic.messages.create({ model: "claude-haiku-4-5-20251001", system: `You are a helpful assistant.\n\n## User memory\n${memoryBlock}`, messages: [{ role: "user", content: question }], });

6. Delete memory

shell
"kw">curl -X DELETE "https://anansimemory.com/v1/memory?userId=user_abc" \ -H "Authorization: Bearer ans_your_key"
200Response
{ "deleted": 7 }
Note
Ready for the full details? See the API Reference for all parameters, error codes, and rate limits.