Endpoint references
Lifecycle
Why both
type=knowledge and app_knowledge? They answer different questions.typepicks the store:knowledge(shared documents) ormemory(per-user context). It routes the ingest to the right store.- Within
type=knowledge, you pick the payload shape:documents(binary documents HydraDB will parse: PDFs, DOCX, CSV) orapp_knowledge(a JSON array of already-extracted content from your app: Slack messages, Notion pages, web pages). You can send both in the same request.
Core ingestion concepts
- Knowledge vs. memories: Knowledge is shared content (documents, app pages, Slack messages). Memories are one user’s preferences and conversation history. Both live in a
collection, andtype: "all"onPOST /querysearches both from the same scope. - IDs: Unique identifiers returned by
/context/ingest. You can assign custom IDs usingidindocument_metadata,app_knowledge, ormemoriesitems. Use them for polling status, inspecting content, and deleting context. - Metadata filtering: You can scope queries using
metadata(structured fields defined in your database schema) oradditional_metadata(free-form per-document JSON). For detailed guidelines on structuring metadata, see the Scoping using metadata guide.
Forceful relations and metadata
Forceful relations let you pre-wire document relationships at ingestion time so that relevant documents surface together during retrieval, even before the graph layer discovers connections organically. Think of them as explicit “see also” links between your documents. Linked sources come back in the query response’sadditional_context (thinking mode). Set relations on the same document_metadata item as the file’s metadata:
Python SDK
Related
- Knowledge: forceful relations: linking sources at ingestion
- Memories: memories vs knowledge, when to use which
- Metadata: database-level vs document-level metadata
- Query: retrieve ingested content
