AgentMem
The memory layer for AI agents. Postgres-native, TypeScript- and Python-first, framework-agnostic. Drop it into any agent stack (LangChain, LangGraph, CrewAI, Mastra, Claude SDK, custom) in three lines.
import { MemoryStore } from '@agentmem/sdk'
const mem = new MemoryStore({ apiKey: process.env.AGENTMEM_API_KEY! })
await mem.write({ content: 'Alice prefers email over phone', agentId: 'support-bot' })
const hits = await mem.search({ query: 'how should I reach Alice?', agentId: 'support-bot' })What you get
- Write + search with embeddings, BM25 keyword search, and entity-graph traversal — all merged with Reciprocal Rank Fusion. Optional Gemini re-ranking for high-precision queries.
- Multi-agent coordination. Scopes (private / team / global) + roles (planner / executor / observer) + access grants give you fine-grained visibility control out of the box.
- CRDT conflict resolution. Vector clocks per agent, configurable policies (
planner_wins,timestamp_wins,human_in_loop), and supersession lineage so you can audit who replaced what. - TTL + retention. Memories expire automatically. Retention policies prune old data on a schedule.
- Webhooks. Subscribe to
memory.written,memory.expired,memory.conflict_detected, etc. — HMAC-signed payloads. - BYOK encryption for compliance-sensitive deployments.
Install
# TypeScript
npm install @agentmem/sdk
# Python
pip install agentmem-pyWhere to next
- Getting started — install, first write, first search, in 3 minutes.
- Core concepts — scopes, roles, workflows, vector clocks. Read this before you build anything non-trivial.
- Features — deep-dives into each shipped feature.
- API reference — every endpoint with curl examples.
- SDK reference — every method on the TS and Python clients.
Last updated on