Skip to main content
Cost: 5 operations per call

POST /brain/ingest

Processes a piece of text through the full ingestion pipeline:
  1. Deduplication — skips the text if a near-identical chunk already exists (cosine similarity ≥ 0.92)
  2. Graph extraction — extracts entities and relationships via spaCy (default) or LLMGraphTransformer (when use_llm_extraction: true)
  3. Semantic storage — writes graph triples to Neo4j with embeddings for vector index lookup
  4. Episodic storage — chunks the text via SemanticChunker and stores embeddings in Qdrant
  5. Working memory — updates the session rolling topic vector in Redis (if session_id provided)

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.
Batch size limits by tier:

Tips

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.
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.
Any fields in metadata are stored alongside the vector. You can use them for custom filtering in direct API calls.