What Postgram does
Postgram provides a shared, self-hosted corpus for human users and AI agents. Its data model covers six entity types: memory, person, project, task, interaction, and document. Entities can include content, tags, visibility, status, and additional JSON metadata.
Memory entities support two distinct roles. Durable memory is intended for facts future agents should rely on, including decisions, preferences, constraints, and completed-work summaries. Session context is scoped to a calling client and supports short-lived continuity between conversations. Operators can groom old session context or promote selected information into durable memory.
The system also includes GTD-oriented task handling, Kanban views, Markdown repository synchronization, browser interfaces, a REST API, a CLI, encrypted backups, audit logging, and administrative controls. These features make the MCP endpoint part of a broader knowledge workspace rather than an isolated vector store.
How it works
Postgram is a TypeScript application built around PostgreSQL and pgvector. Hono provides the HTTP layer, and the MCP interface uses Streamable HTTP. A background worker handles enrichment after an entity is written, including text chunking, embedding generation, and optional LLM-based relationship extraction.
Search combines keyword retrieval with vector similarity and reciprocal-rank fusion. Results can be expanded through typed, directional graph edges when related context is useful. Relationship extraction can use OpenAI, Anthropic, Ollama, or an OpenAI-compatible endpoint. Embeddings can use a local Ollama deployment or hosted OpenAI embeddings.
The default Compose deployment is intended for one person or a small trusted team running locally or on a single virtual machine. PostgreSQL data and installation secrets are stored in persistent Docker volumes. Raw API and UI ports bind to loopback by default.
Setup and configuration
The standard installation uses Git, Docker, and Docker Compose. Clone the repository, select an embedding provider, and start the stack with Docker Compose. The default local path uses Ollama with the bge-m3 model; OpenAI embeddings require an OPENAI_API_KEY in .env before startup.
After the first start, retrieve the bootstrap token from the mcp-server logs, use the administration page to create the first administrator and enroll MFA, then create a scoped API key. API keys can be restricted by operations, entity type, and visibility. The health endpoint reports both application status and PostgreSQL connectivity.
The CLI package is @ivotoby/postgram-cli. It uses PGM_API_URL and PGM_API_KEY for authenticated operations. Enrichment is asynchronous, so newly stored content may need to clear the processing queue before it becomes searchable.
For remote MCP access, place Postgram behind HTTPS and enable OAuth. The development ports should not be exposed directly to the public internet. Changing the embedding provider, model, or vector dimensions after initial setup requires migration work rather than a simple configuration update.
Tools and capabilities
The MCP endpoint gives agents access to the Postgram corpus and its knowledge operations. Supported capabilities include:
- Store and update typed memories, people, projects, tasks, interactions, and documents.
- Search with combined keyword and vector retrieval.
- Use graph relationships and optional graph expansion to find connected context.
- Keep client-scoped session context separate from durable memory.
- Work with visibility values such as
personal, work, and shared.
- Use content synchronized from local Markdown repositories.
- Access task capture and organization features alongside knowledge records.
The same underlying data is available through the REST API and pgm CLI, allowing agents, browser users, and automation to work against one inspectable source.
Limitations and notes
Postgram is a self-hosted deployment, not a hosted multi-tenant SaaS service. Operators are responsible for PostgreSQL, provider credentials, network exposure, authentication, and backups. Knowledge extraction is optional, but search enrichment depends on an available embedding provider; writes can still be accepted when embeddings are unavailable while enrichment and search remain unavailable.
The Compose setup is designed for local or single-VM use and a small trusted team. Relationship extraction consumes an optional LLM provider, and embedding configuration changes after initial startup can require migration work. Remote clients need an HTTPS deployment with OAuth rather than direct access to loopback development ports.