Cost: 5 operations per call
POST /brain/ingest
Processes a piece of text through the full ingestion pipeline:
- Deduplication — skips the text if a near-identical chunk already exists (cosine similarity ≥ 0.92)
- Graph extraction — extracts entities and relationships via spaCy (default) or LLMGraphTransformer (when
use_llm_extraction: true) - Semantic storage — writes graph triples to Neo4j with embeddings for vector index lookup
- Episodic storage — chunks the text via SemanticChunker and stores embeddings in Qdrant
- Working memory — updates the session rolling topic vector in Redis (if
session_idprovided)
Request body
Response
Code examples
Batch ingest — POST /brain/ingest/batch
For ingesting multiple texts efficiently in one call.
Cost: 5 ops × number of items. Batch cost is deducted atomically upfront.
Tips
When to use LLM extraction
When to use LLM extraction
Enable
use_llm_extraction: true for long-form documents (technical specs, architecture docs, meeting notes) where entity relationships are complex. Keep it disabled for short conversational turns — spaCy is sufficient and much faster.Source labels matter
Source labels matter
Memories stored with
source: "user" have higher confidence than source: "assistant" in conflict resolution. When two memories contradict each other for the same slot, the user-sourced one wins.Metadata is searchable in the future
Metadata is searchable in the future
Any fields in
metadata are stored alongside the vector. You can use them for custom filtering in direct API calls.