Ontology API
Let agents inspect real structure before they query.
RushDB exposes a live snapshot of project structure as compact Markdown or structured JSON. Applications can inject it into agent context or use it to build controlled interfaces.
Agents guess when the current data model is missing from context.
A generic prompt cannot tell an agent which labels exist, how fields are named, which numeric ranges are realistic, or which relationship paths can be traversed.
Before
- Guess field names from a prompt
- Filter outside the available value range
- Attempt relationship paths that do not exist
- Maintain schema prompt text by hand
With RushDB
- Read labels and property types from the live project
- Inspect sample values and numeric or datetime ranges
- See relationship types and directions
- Check vector-index readiness before semantic search
How it works
Start with the smallest useful path.
01
Choose Markdown or JSON
Use Markdown for compact LLM context injection. Use JSON when application code needs structured schema data.
02
Load the relevant labels
Request the whole ontology or restrict the result to the labels needed for the current workflow.
03
Build queries from real structure
Use the returned fields, values, ranges, relationship directions, and vector-index metadata to constrain the next tool call.
Implementation sketch
Load compact ontology context at session start.
The Markdown endpoint is intended for LLM context injection. Pass labels when the workflow only needs one part of the project.
curl -X POST https://api.rushdb.com/api/v1/ai/ontology/md \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RUSHDB_API_KEY" \
-d '{"labels":["Order","User","Product"]}'Know the operational boundary.
Ontology is a live snapshot
The response describes labels, properties, value samples or ranges, relationships, and semantic-search index metadata derived from the current project.
Read the Ontology API guideCache behavior is explicit
Ontology endpoints share a one-hour project cache. Use force only when an immediate recalculation is required.
Read about ontology cachingNext step
Build one focused workflow.
Related features
Explore all featuresUnified query API
Use one SearchQuery-shaped contract for records, labels, relationships, property metadata, and distinct values or ranges.
Explore featureMCP server
Give MCP-compatible clients tool access to records, relationships, queries, bulk operations, exports, and transactions.
Explore featureConnect your data
Import nested JSON as linked records. Review suggested connections when flat sources need durable relationships.
Explore feature