Supabase AI app with semantic search
Postgres with pgvector for embeddings, the AI SDK for model calls, and prompt caching to keep costs down.
by Promptu
What you end up with
An app that stores embeddings in Supabase Postgres (pgvector), answers questions with the AI SDK, and reuses cached prompt prefixes. The prompt helps explain slow queries as the data grows.
Build order
- 1MCP serverDatabase access for your agentSupabase MCP server
Connect agents to your Supabase projects: schema, SQL, logs and docs. Scope it to one project and read-only when you can.
- 2TechnologyEmbeddingspgvector
Open-source vector similarity search for Postgres. Keep embeddings next to your data, with no separate vector database.
CREATE EXTENSION vector;
- 3TechnologyModel callsAI SDK
TypeScript toolkit for building AI features (streaming, tool calling, structured output) across model providers.
npm install ai
- 4TechnologyCostPrompt caching (Claude API)
Reuse a processed prompt prefix (tools, system, messages) to cut cost and latency on repeated context.
- 5PromptPerformanceWhy is this Postgres query slow?
Review commands before running them. Promptu never runs code on your machine.

