Documentation Index
Fetch the complete documentation index at: https://docs.bsyncs.com/llms.txt
Use this file to discover all available pages before exploring further.
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | ✓ | — | The text to ingest. Minimum 1 character. |
persona | string | "shared" | Memory sub-namespace within your user account. | |
source | string | "user" | Origin label: "user", "assistant", or "document". Affects confidence scoring. | |
session_id | string | null | Enables working memory update for this session. | |
use_llm_extraction | boolean | false | Use LLMGraphTransformer (GPT-4.1) instead of spaCy for richer graph extraction. Costs more. | |
metadata | object | null | Arbitrary key-value pairs stored alongside the memory. |
Response
| Field | Type | Description |
|---|---|---|
facts_ingested | int | Number of graph relationships stored in Neo4j. |
episodic_chunks | int | Number of vector chunks stored in Qdrant. |
entities_extracted | int | Number of entity nodes created or updated. |
triples_extracted | int | Same as facts_ingested. |
working_memory_updated | boolean | Whether the session topic vector was updated. |
latency_ms | float | Total processing time in milliseconds. |
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.
| Tier | Max batch size |
|---|---|
| Free | 5 |
| Starter | 20 |
| Pro | 50 |
| Scale / Enterprise | 100 |
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.