Giving your agents persistent memory with Postgres + pgvector
An agent with no memory starts from zero every run. As soon as you want it to remember a past conversation or a document it already processed, you need a vector store.
Why not a dedicated managed service
Managed vector databases (Pinecone, Weaviate Cloud, etc.) are quick to set up, but add one more service to monitor, a recurring cost, and an external network dependency for every call.
The pgvector option
pgvector is a Postgres extension that adds a vector column type and similarity operators. If you already run Postgres for the rest of your stack (users, logs, config), adding pgvector costs nothing but enabling an extension.
Concrete benefits:
- One database to back up instead of two separate systems.
- Regular transactions: you can link a vector entry to a business row in the same SQL transaction.
- Hosting cost limited to a Postgres instance you already run on your VPS.
When it stops being enough
Past a few million vectors with very strict latency requirements, a specialized vector database regains the edge thanks to more optimized indexes. For the vast majority of personal agents or small teams, pgvector holds up just fine.
Read next
Gemini Agent: Google gives its agents an email address, their own permissions and a spending cap
Announced October 8, the Gemini agent can act as a coworker with its own Workspace identity. Governance, audit and cost caps: what agent builders can take from it.
MCP: tool servers are becoming the main attack surface against AI agents
Prompt hijacking, poisoned tools, unauthenticated servers: where MCP security stands in 2026 and the habits that protect an agent stack.
OpenAI launches "dots": always-on agents, but not for Europe
At its September 29 DevDay, OpenAI unveiled persistent agents with their own cloud computer. What they do, their guardrails, and what it means if you'd rather host your own agents.