AI & Embeddings
Power AI agents with serverless Postgres — and build AI applications with Neon as your vector database
Neon enables AI agents to provision Postgres databases in seconds, execute SQL queries, and easily manage Neon infrastructure. With one-second provision times, scale-to-zero compute, and agent-friendly Neon API interfaces, Neon lets AI agents manage database fleets at scale while minimizing costs. Learn more about this use case.
Neon also supports vector data, a key component for AI applications. With the pgvector open-source extension, you can use Neon as a vector database for storing and querying embeddings. This allows you to use Postgres as your vector store, eliminating the need for data migration or third-party solutions.
Neon for AI Agents
Neon supports Postgres for AI agents with the following interfaces:
- @neondatabase/toolkit — a terse client that lets you spin up a Postgres database in seconds and run SQL queries. It includes both the Neon TypeScript SDK and the Neon Serverless Driver, making it an perfect choice for AI agents that need to quickly set up an SQL database. Learn more.
- Neon Model Context Protocol (MCP) server — enables any MCP Client to interact with Neon’s API using natural language. AI agents can use Neon's MCP server to perform actions such as creating databases, running SQL queries, and managing database migrations. Read the announcement.
@neondatabase/toolkit
A terse client that lets you spin up a Postgres database in seconds and run SQL queries
Neon MCP Server
A Model Context Protocol (MCP) server for Neon that lets MCP Clients interact with Neon’s API using natural language
Neon for AI Apps
Neon's AI Starter Kit provides resources, starter apps, and examples to help get you started with Neon as your vector database.
The Neon AI Starter Kit includes:
- Neon Postgres with the latest version of the Postgres pgvector extension for storing vector embeddings
- A variety of hackable, pre-built AI starter apps:
- AI chat
- RAG chat
- Semantic search
- Hybrid search
- Reverse image search
- Chat with PDF
- A vector search optimization guide for better AI application performance
- A scaling guide for scaling your app with Neon's Autoscaling and Read Replica features
- A collection of AI apps built with Neon that you can reference while building your own app
AI basics
AI concepts
Learn how embeddings are used to build AI applications
The pgvector extension
Learn about the pgvector Postgres extension
AI starter apps
Hackable, fully-featured, pre-built starter apps to get you up and running.
AI chatbot (OpenAI + LllamIndex)
A Next.js AI chatbot starter app built with OpenAI and LlamaIndex
AI chatbot (OpenAI + LangChain)
A Next.js AI chatbot starter app built with OpenAI and LangChain
RAG chatbot (OpenAI + LlamaIndex)
A Next.js RAG chatbot starter app built with OpenAI and LlamaIndex
RAG chatbot (OpenAI + LangChain)
A Next.js RAG chatbot starter app built with OpenAI and LangChain
Semantic search chatbot (OpenAI + LlamaIndex)
A Next.js Semantic Search chatbot starter app built with OpenAI and LlamaIndex
Semantic search chatbot (OpenAI + LangChain)
A Next.js Semantic Search chatbot starter app built with OpenAI and LangChain
Hybrid search (OpenAI)
A Next.js Hybrid Search starter app built with OpenAI
Reverse image search (OpenAI + LlamaIndex)
A Next.js Reverse Image Search Engine starter app built with OpenAI and LlamaIndex
Chat with PDF (OpenAI + LlamaIndex)
A Next.js Chat with PDF chatbot starter app built with OpenAI and LlamaIndex
Chat with PDF (OpenAI + LangChain)
A Next.js Chat with PDF chatbot starter app built with OpenAI and LangChain
AI integrations
Learn how to integrate Neon Postgres with LLMs and AI platforms.
LangChain (with OpenAI)
Learn how to use LangChain with OpenAI to create AI applications faster
LlamaIndex (with OpenAI)
Learn how to use LlamaIndex with OpenAI to create AI applications faster
Preparing your AI app for production
Optimize pgvector search
Optimize pgvector search for better application performance
Scale with Neon
Scale your AI app with Neon's Autoscaling and Read Replica features
AI apps built with Neon
AI applications built with Neon Postgres that you can reference as code examples or inspiration.
Feature your app here
Share your AI app on our #showcase channel on Discord for consideration.
AI vector database per tenant
Deploy an AI vector database per-tenant architecture with Neon
Guide: Build a RAG chatbot
Build a RAG chatbot in an Astro application with LlamaIndex and Postgres
Guide: Build a Reverse Image Search Engine
Using LlamaIndex with Postgres to Build your own Reverse Image Search Engine
Ask Neon Chatbot
An Ask Neon AI-powered chatbot built with pgvector
Vercel Postgres pgvector Starter
Enable vector similarity search with Vercel Postgres powered by Neon
YCombinator Semantic Search App
YCombinator semantic search application
Web-based AI SQL Playground
An AI-enabled SQL playground application for natural language queries
Jupyter Notebook for vector search with Neon
Jupyter Notebook for vector search with Neon, pgvector, and OpenAI
Image search with Neon and Vertex AI
Community: An image serch app built with Neon and Vertex AI
Text-to-SQL conversion with Mistral + LangChain
A Text-to-SQL conversion app built with Mistral AI, Neon, and LangChain
Postgres GPT Expert
Blog + repo: Create and publish a custom Postgres GPT Expert using OpenAI's GPT
AI tools
Learn about popular AI tools and how to use them with Neon Postgres.