Skip to main content

Documentation Index

Fetch the complete documentation index at: https://ahvn.top/llms.txt

Use this file to discover all available pages before exploring further.

One query surface. HeavenBase routes fragments to the right backends and merges results.

1. Finding entities

results = ws.find(Document, Document.title == "My Doc")

2. Filter expressions

ws.find(Document, Document.tags.contains("ai"))
ws.find(Document, Document.embedding.near([0.1, 0.2], top_k=5))
ws.find(Document, (Document.title == "Draft") & (Document.tags.contains("ai")))

3. QueryBuilder

qb = ws.query(Document)
qb = qb.where(Document.title == "My Doc")
qb = qb.limit(10)
results = qb.execute()

4. Explain

Use explain() to inspect routing decisions before executing:
qb = ws.find(Document, Document.embedding.near([0.1, 0.2]))
print(qb.explain())
# shows: route, backend, strategy, handler for each leaf

5. Write, update, delete

ws.put(Document(title="Hello", body="world", tags=["test"]))
ws.update(Document, Document.id == doc_id, {"body": "updated"})
ws.delete(Document, Document.id == doc_id)

Further Exploration

Related resources: