Guides
Guides
Task-focused recipes for building with pgmem.
Step-by-step recipes for common tasks. Each one assumes you've read the Concepts and gives you copy-paste code.
Integrate pgmem into your agent
Wire pgmem into your agent's turn loop.
Connect a model provider
Wire an LLM (OpenAI, Anthropic, Ollama) and an embedder into pgmem.
Decide what to remember
Govern claims with ClaimPolicy and the events-vs-state rule.
Use live system-of-record state
Inject current state at compile time instead of storing it.
Ingest & search the graph
Write facts into Tier 4 and query them with hybrid search.
Tune retrieval
Strategies, depths, and the token budget.
Compaction off the critical path
Keep summarization off the response path so voice stays fast.
Run the promotion worker
Refresh derived claim projections asynchronously.
Multi-tenancy & isolation
Isolate tenants with group_id.
LiveKit / voice agents
Wire pgmem into a LiveKit voice agent.