PiyAPI by Negentro: the memory layer for AI agents
PiyAPI remembers every user across sessions and sends your model only what each answer needs. Store memories over a REST API, the TypeScript and Python SDKs or the Model Context Protocol, and ask questions answered from them, each with a receipt of the memories it used.
Start for free · Read the docs · Benchmark results · Report (PDF) · Every answer, on GitHub
Install
npm install @piyapi/sdk
pip install piyapi-memory
npx -y @piyapi/mcp-server install cursor --api-key YOUR_KEY
Benchmarks (November 2026)
84.1% on BEAM-1M · 93.6% on LongMemEval-S · 99.4% recall@10 · 96.0% on LoCoMo · 97% fewer tokens than the full history
Five long-term memory benchmarks, run without answer hints and under each competitor's own protocol. PiyAPI leads mem0 by 14 points on BEAM-1M and by 30 at ten million tokens, matches Mastra's LongMemEval score with a seventh of the context, and needs 6× fewer tokens per correct answer than Supermemory on Supermemory's own benchmark.
| Benchmark (questions) | PiyAPI | Compared with | Margin | Basis |
|---|---|---|---|---|
| BEAM-1M (700) | 84.1% passed | mem0 70.1% | +14.0 points; ahead in 29 of 35 conversations | mem0's answer prompt, judge prompt and pass rule; PiyAPI read by Claude Sonnet 5.5, mem0 by gpt-5 |
| BEAM-10M (200) | 80.5% passed | mem0 50.5% | +30.0 points; ahead in all 10 conversations | as above; from 1M to 10M tokens PiyAPI drops 3.6 points, mem0 19.6 |
| BEAM-1M, memory against memory (500) | 397 passed | past.dev 359 | +38 questions; rubric +5.7 (95% CI 3.1 to 8.1) | one reader (Claude Haiku 5.5), one prompt and one judge for both; past.dev's published retrieval |
| LongMemEval-S (500) | 93.6% correct, 4.1k tokens per read | Mastra 93.6%, about 30k tokens | same score, 7× less context | official judge; gpt-5-mini reads, gpt-5 on the 64 questions where two reads differ |
| LongMemEval-S retrieval (470) | 99.4% recall@10, 98.5% recall@5 | naive vector search 98.1%, 96.8% | +13.2 points on the exact evidence turn in the top 5 | LongMemEval's own retrieval metric; same memories and embedder |
| LoCoMo, correctly keyed (1,441) | 96.0% at retrieval depth 50 | mem0 93.3% | +2.6 points; 68 questions only PiyAPI answers, 30 only mem0 | mem0's judge prompt; judge models differ |
| ConvoMem (2,843) | 95.6%; 99.4% of facts recalled | no vendor result published | Supermemory's MemoryBench protocol | |
| xAFS (102) | 59k tokens per correct answer | Supermemory SMFS 359k | 6.1× fewer tokens | Supermemory's benchmark and its headline metric |
| Token cost on Claude (120) | 4.5k tokens per question | full history 168k | 97.3% fewer; $24.30 against $678 per 1,000 questions on Claude Opus 5.5 | exact Claude token counts; model bill without prompt caching |
Counting answers longer than mem0's 4,096-token budget as failed, BEAM is 81.1% and 76.5%. The LongMemEval score is replayed from recorded answers, and the same two-read routing ships as an opt-in /ask setting. LoCoMo's depth 50 was chosen on its own questions. Full method and every caveat: PiyAPI benchmark results (PDF) · negentro.tech/research · every answer and verdict on GitHub