Skip to content

Optional Agentic Toolkit ​

PiramideDB runs entirely inside PostgreSQL with no network or LLM dependencies. When you want automated embeddings, multilingual schema routing, or natural-language query parsing beside your database, install the optional piramidedb-agentic Python package.

What's included ​

1. Embedding client & vector codec ​

  • Connects to any HuggingFace Text Embeddings Inference (/embed) or OpenAI-compatible (/v1/embeddings) endpoint.
  • Truncates, normalizes, and quantizes embeddings into PiramideDB's compact int8 bytea format.
  • Designed as a strict soft dependency: if the embedding service is unreachable or slow, a built-in circuit breaker trips immediately and your search falls back seamlessly to BM25 without logging raw query text.

2. Permission-aware schema routing ​

  • Keeps a lightweight in-memory vector catalog of your entity types, relationships, and enum values.
  • Filters strictly by the caller's readable types before scoring, and applies confidence and margin thresholds so ambiguous phrases never lock onto the wrong filter.

3. Grounded natural-language query parsing ​

  • Decides automatically when a query actually benefits from LLM parsing (skipping autocomplete, single words, IDs, and already-filtered queries).
  • Passes only the caller's authorized schema metadata to a parser (such as Martha).
  • Runs every proposed filter, type, or relation through a deterministic grounding gate before building the SQL query—silently discarding anything unrecognized or unauthorized so restricted schema items can never be probed.

Running with a local embedding sidecar ​

Start PiramideDB alongside an optional embedding container using Docker Compose:

bash
docker compose -f quickstart/docker-compose.agentic.yml --profile embedder up -d

PiramideDB is built by Nomad River.