Back to Projects
pg-agent-memory
Stateful AI agent memory layer for PostgreSQL with pgvector. TypeScript-first with intelligent context management and zero-cost embeddings.
Local
Embeddings
Multi-model
Token counting
PostgreSQL
pgvector native
Core Features
Local Embeddings
Zero-cost semantic search using local Sentence Transformers
PostgreSQL Native
Uses existing PostgreSQL infrastructure with pgvector
Architecture
Memory Layer
TypeScript-first API with intelligent context management and compression
Multi-Model Support
Universal tokenizer for OpenAI, Anthropic, DeepSeek, Google, Meta
TypeScriptPostgreSQLpgvectorSentence TransformersVitest
Design Decisions
PostgreSQL-First
Leveraged existing infrastructure with pgvector instead of separate vector databases
Local Embeddings
Zero-cost embedding generation eliminating API dependencies
Universal Tokenization
Provider-specific token counting for accurate cost estimation