polygres
Built by Evokoa

A context window the size of your database.

Polygres turns Postgres into working memory for AI agents. Rows, relationships, and embeddings, retrievable in one hybrid query. Stop stuffing prompts. Start querying.

pgGraph × pgContext

Ask once. Retrieve everything.

pgGraph walks your relationships. pgContext runs ten kinds of search at once. Polygres fuses it all into one ranked answer, in the Postgres you already run.

pgGraph

Graph retrieval

Your foreign keys become a compiled graph. Multi-hop traversal, shortest paths, and relationship search over the tables you already have. The customer's orders, the ticket's history, all at memory-scan speed.

evokoa/pggraph
pgContext

Fused search

Ten ways to search, one engine. They all run against your live tables at once, then a single fusion pass merges the results and re-scores every hit exactly. One query in, one ranked list out.

evokoa/pgcontext
drag to rotate · click a channel to preview

One fused result

Graph hops and ten search methods don't return separate answers. Semantic hits seed the graph, pgGraph expands along the relationships, and everything gets re-ranked together. Rows, paths, and matches land in a single, token-ready context block.

Hybrid retrieval

Context assembly is one call.

Say what the agent needs. Semantic match, graph hops, scalar filters. Polygres hands back a ranked, token-ready context block. No vector store. No sync layer. No glue code.

Read the documentation
build_context.py
# everything the agent needs, in one query
context = polygres.retrieve(
    query="why did order #8231 fail?",
    graph_hops=2,  # orders → payments → disputes
    filters={"status": "failed"},
    limit_tokens=8_000,
)

agent.run(context)  # grounded in your database
Database-scale context

Stop rationing tokens.

Models cap out at a few million tokens. Your database doesn't. Retrieval turns every row into working memory, fetched the moment your agent needs it.

UnboundedEffective context. Every row is addressable.
MillisecondsHNSW and graph retrieval, indexed in Postgres.
One queryRelational, graph, and vector. Joined at the source.
Get Started

Give your agents the whole database.

Deploy a managed instance in seconds. Or point the open source SDK at your existing schema.

Start Building with Polygres

Get full access to relational table definitions, pgGraph traversals, and pgVector similarity search instantly.

Polygres