# Supabase (pgvector) — card for AI agents

Hosted Postgres with the pgvector extension, plus auth, storage and APIs.

Maker: Supabase · category: Vector databases

## Price (official page)
- Free tier: Free: 500 MB database, shared CPU, 2 active projects (paused after 1 week inactivity)
- Paid from $25/month
- Usage price: Pro: 8 GB disk per project then $0.125/GB; compute from $10/month (Micro; first instance covered by $10 credits)
- Pricing page: https://supabase.com/pricing (checked 2026-10-09)
- Note: Vector search is plain Postgres + pgvector, so cost is the database/compute plan; no per-vector pricing. Egress 250 GB then $0.09/GB on Pro. Hosted MCP also at https://mcp.supabase.com/mcp.

## Connect
- Official MCP server: @supabase/mcp-server-supabase
- MCP server card (how to connect it): https://agentgid.com/mcp/servers/com-supabase-mcp/agent.md
- npm: `npm install @supabase/supabase-js`
- PyPI: `pip install supabase`
- Repository: https://github.com/supabase/supabase
- Status: All Systems Operational

## For AI agents on Supabase's own site (AgentGid check 2026-11-13: 6 of 6)
- llms.txt: https://supabase.com/llms.txt (full text: https://supabase.com/llms-full.txt)
- Docs pages as Markdown: 95% of the pages llms.txt lists
- OpenAPI description: https://supabase.com/openapi.json
- Official MCP server: yes · official SDK: yes · status page: yes
- robots.txt lets AI assistants (ChatGPT-User, Claude-User) read the site: yes

## A year of price history (Internet Archive copies of the pricing page, read by rules)
- Months read: 10 (2025-10 to 2026-09) of https://supabase.com/pricing
- Lowest $/month figure on the page: $10 in 2025-10, $10 in 2026-09
- A figure is any "$X/month" on the page (plans, seats and add-ons alike); open the archived copy to see which plan it is.

## Price history in AgentGid's catalog (since 2026-10-09)
- Changes recorded: 0 (a vendor price change or an editor's correction; the evidence archive keeps the pricing page of each date)

## Other APIs in this category
- Algolia: https://agentgid.com/apis/algolia/agent.md
- pgvector: https://agentgid.com/apis/pgvector/agent.md
- Elasticsearch (Elastic Cloud): https://agentgid.com/apis/elastic-cloud/agent.md
- Qdrant Cloud: https://agentgid.com/apis/qdrant-cloud/agent.md
- turbopuffer: https://agentgid.com/apis/turbopuffer/agent.md

## Links
- AgentGid page: https://agentgid.com/apis/supabase-pgvector/


## Supabase with pgvector: one database that also searches by meaning

Supabase is a hosted Postgres database with sign-in, file storage and a ready web API around it. Its pgvector add-on lets the same database store embeddings, the number lists that capture what a text means, and find the closest ones. Your products, users and search data stay in one place instead of a separate search service. Supabase is open source, so it can also run on your own server.

### Where to use it
- Help center search by meaning: Visitors type a question in their own words and get the help articles that answer it, even when the wording differs.
- A document chat that respects access: An assistant answers from company files, and each user only gets passages from documents they are allowed to open.
- Similar products in your shop: Show items that are close in meaning to the one on screen, from the same table that holds prices and stock.
- Search inside one category: Look for the closest matches only among blog posts, or only among one customer's records, without losing results.
- Keywords and meaning together: A recipe search finds "pasta with tomato sauce" by exact words and also dishes that match the idea, then mixes both lists.
- Catch duplicate listings: When someone posts a new listing or ticket, warn them if a very similar one already exists. (idea, not from the official pages)

### How to start
- Create a Supabase project in the dashboard and copy its URL and publishable key into your app's environment.

```
NEXT_PUBLIC_SUPABASE_URL=<SUBSTITUTE_SUPABASE_URL>
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=<SUBSTITUTE_SUPABASE_PUBLISHABLE_KEY>
```

- Turn on the vector extension and add a vector column sized to your embedding model (384 here; 1536 for OpenAI text-embedding-3-small).

```
create extension vector
with
  schema extensions;

create table documents (
  id serial primary key,
  title text not null,
  body text not null,
  embedding extensions.vector(384)
);
```

- Create the match_documents function from the semantic search guide, add an HNSW index, and call it with rpc() from your app.

```
create index on documents using hnsw (embedding vector_cosine_ops);
```


### License
The hosted service is paid by plan, with a free plan, and you own the data you store. Supabase itself is open source under the Apache 2.0 license, so you may also run it yourself. You may not resell access to the hosted service itself.

### Good to know
- The Free plan gives 500 MB of database per project and 2 active projects, and pauses a project after a week of low activity.
- Vector search has no separate price; you pay for the database plan, its computer size and disk, like any other data.
- The publishable key may sit in a web page only when Row Level Security rules protect your tables; the secret key stays on servers.
- The old anon and service_role keys stop working by the end of 2026; older tutorials still show them.
- The Supabase server for AI assistants acts with your developer rights, so never hand it to customers.

Checked 2026-11-10 against: https://supabase.com/llms.txt, https://supabase.com/pricing.md, https://supabase.com/pricing, https://supabase.com/modules/vector.md, https://supabase.com/terms, https://supabase.com/docs/guides/ai.md, https://supabase.com/docs/guides/database/extensions/pgvector.md, https://supabase.com/docs/guides/ai/vector-columns.md, https://supabase.com/docs/guides/ai/semantic-search.md, https://supabase.com/docs/guides/ai/hybrid-search.md, https://supabase.com/docs/guides/ai/vector-indexes.md, https://supabase.com/docs/guides/ai/vector-indexes/hnsw-indexes.md, https://supabase.com/docs/guides/ai/rag-with-permissions.md, https://supabase.com/docs/guides/ai/choosing-compute-addon.md, https://supabase.com/docs/guides/ai/going-to-prod.md, https://supabase.com/docs/guides/ai/automatic-embeddings.md, https://supabase.com/docs/guides/ai/vecs-python-client.md, https://supabase.com/docs/guides/ai/quickstarts/hello-world.md, https://supabase.com/docs/guides/api.md, https://supabase.com/docs/guides/api/api-keys.md, https://supabase.com/docs/guides/api/quickstart.md, https://supabase.com/docs/guides/api/rest/postgrest-error-codes.md, https://supabase.com/docs/guides/platform/http-status-codes.md, https://supabase.com/docs/guides/platform/project-pausing.md, https://supabase.com/docs/guides/platform/regions.md, https://supabase.com/docs/guides/platform/billing-on-supabase.md, https://supabase.com/docs/guides/getting-started/mcp.md, https://supabase.com/docs/guides/getting-started/quickstarts/nextjs.md, https://supabase.com/docs/reference/javascript/rpc, https://github.com/supabase/supabase/blob/master/README.md, https://github.com/supabase/supabase/blob/master/LICENSE, https://github.com/supabase/vecs/blob/main/README.md, https://registry.npmjs.org/@supabase/supabase-js/2.119.0, https://registry.npmjs.org/@supabase/mcp-server-supabase/0.16.1, https://pypi.org/pypi/supabase/2.34.1/json, https://pypi.org/pypi/vecs/0.4.5/json

### Mistakes to avoid
- Don't: createClient(url, SUPABASE_SECRET_KEY) in browser code so that vector search "just works" → Do: Use the publishable key in the browser and write Row Level Security policies; keep the secret key on the server (The secret key skips every security rule, so anyone who reads the page gets full access.)
- Don't: supabase.rpc('match_documents', {...}).eq('category', 'blog') → Do: Add a filter_category parameter to the SQL function and pass it inside rpc() (A filter chained after rpc() runs after ranking and the limit, so it can return fewer rows than asked.)
- Don't: embedding vector(3072) from text-embedding-3-large with a plain HNSW index → Do: Ask the embedding model for 1536 or fewer dimensions, or index (embedding::halfvec(3072)) with halfvec_cosine_ops (Plain vector indexes stop at 2,000 dimensions.)
- Don't: order by similarity desc in the match function → Do: order by embedding <=> query_embedding asc, so the index is used (Sorting by a computed similarity column can make Postgres skip the index and scan everything.)
- Don't: vecs.get_or_create_collection(...) and docs.upsert(vectors=...), as on the Supabase vecs docs page → Do: vx = vecs.create_client(DB_CONNECTION); docs = vx.get_or_create_collection(...); docs.upsert(records=[...]) (Our check of vecs 0.4.5 found no module-level get_or_create_collection and a TypeError for vectors=; the vecs README uses records.)

### Questions
- Is there a free plan? Yes, $0 a month with a 500 MB database, up to 2 active projects, paused after a week without activity.
- What does a small production setup cost? The Pro plan is from $25 a month and includes $10 of compute credits, which cover one Micro database; extra disk is $0.125 per GB.
- How big can a vector be? An HNSW index takes vectors up to 2,000 numbers; larger ones, like 3072 from OpenAI's large model, need the halfvec type.
- Does Supabase train AI on my data? No. The terms say Supabase will not use your data, AI inputs or outputs to train models without written consent.
- Can I keep my data in the EU? Yes. Pick a specific region such as Frankfurt or Paris when creating the project; the region decides where the data is stored.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
