pgEdge Agentic AI Toolkit for Postgres
The pgEdge Agentic AI Toolkit
The pgEdge Agentic AI Toolkit provides a complete, PostgreSQL-native stack for building production AI applications.
The toolkit includes:
1. MCP Server for AI assistant integration,
2. RAG pipeline with Document Loader, Vectorizer, and RAG Server,
3. Essential AI extensions
All components within the pgEdge AI Toolkit are designed to work with standard PostgreSQL or pgEdge Distributed Postgres without external dependencies.
Beta Release - Your Feedback Matters
This toolkit is in beta and we're actively improving it based on user feedback. Found a bug or have a feature request?
Report issues on the relevant GitHub repository
Join the discussion on Discord
Support Service Customers: Use your standard support channels for priority assistance 24x7x365
Binary Distribution (Fastest way to start)
All components of the pgEdge Agentic AI Toolkit are available as pre-built binaries from the pgEdge Enterprise Repository. This provides the fastest path to deployment with tested, production-ready packages.
MCP Server, CLI Client, and Web UI
The pgEdge Postgres MCP Server enables AI assistants like Claude Desktop, Claude Code, and Cursor to interact with PostgreSQL databases through natural language queries, with support for both cloud-based frontier models (Claude, ChatGPT) and locally-hosted Ollama models for secure, air-gapped environments. The server operates in two modes: stdio mode for IDE integration, and HTTP/HTTPS mode for web applications. The included CLI client provides a production-ready command-line interface with 90% cost reduction through prompt caching, while the Web UI offers a modern React-based interface for browser-based database interaction—all three components work together to provide flexible AI-powered database access across different environments.
Resources:
MCP Quickstart Demo - Interactive demonstration of the MCP Server with sample queries and configuration examples
MCP Server Repository - Complete source code, documentation, and deployment guides for the MCP Server, CLI client, and Web UI
RAG Pipeline
The pgEdge RAG (Retrieval-Augmented Generation) Server provides an end-to-end solution for building semantic search and AI-powered query systems entirely within PostgreSQL. The RAG Server handles retrieval using hybrid search (vector similarity + BM25 keyword matching) and sends context to LLMs for response generation. Combined with the pgEdge Vectorizer extension (which automatically chunks documents and generates embeddings with support for OpenAI, Voyage AI, or local Ollama models) and the Document Loader tool (which converts HTML, Markdown, reStructuredText, and SGML into PostgreSQL), you get a complete pipeline: load documents → automatic vectorization → semantic search API—all running on PostgreSQL without external vector databases, message queues, or orchestration services.
Components:
RAG Server Repository - API server for hybrid search and LLM integration with support for multiple pipelines and streaming responses
Document Loader Repository - Command-line tool for converting and loading documentation from multiple formats into PostgreSQL
pgEdge Vectorizer Repository - PostgreSQL extension for automatic document chunking and vector embedding generation with trigger-based updates
AI Extensions
The following PostgreSQL extensions are essential for AI application development and are available through the pgEdge Enterprise Repository. These extensions are also pre-installed in the Standard Image used by the pgEdge Control Plane (Repository) and the pgEdge Kubernetes Helm Chart (Repository).
Available Extensions:
pgVector - Open-source vector similarity search extension that adds vector data types and indexing (HNSW, IVFFlat) to PostgreSQL for storing and querying embeddings
pg_vectorize - Automated embedding generation and synchronization extension that manages the transformation of text data to embeddings with support for multiple LLM providers
VectorChord Tokenizer - High-performance tokenizer for text processing that prepares documents for vectorization and search operations
VectorChord BM25 - Native PostgreSQL implementation of the BM25 ranking algorithm with Block-WeakAnd indexing for fast keyword-based retrieval in hybrid search scenarios
Additional Tools
These supplementary components provide helpful capabilities when developing AI applications, including data privacy protection and extended PostgreSQL functionality.
Tools:
pgEdge Anonymizer - Command-line tool for replacing personally identifiable information (PII) and sensitive data in database copies, preserving referential integrity while creating safe datasets for development and testing