BrainAPI
BrainAPI
Concepts

For the complete BrainAPI documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL. Docs MCP: /docs/mcp.

What BrainAPI is for

A plain-language map of BrainAPI features and which ones to use for common goals

BrainAPI is a place to store what your product knows, keep that knowledge in separate rooms called brains, and later ask questions with a trail back to the original notes. You send text, files, or already-shaped facts. BrainAPI turns them into passages you can quote and a knowledge graph of people, things, events, and relationships. Assistants, search screens, and operators then read from the same brain.

This Concepts section explains each major feature in everyday language. The Build, Retrieve, and Reference sections remain the technical how-to and API contract. Behavior here matches BrainAPI 2.21.1.

Who these pages are for

Read this section if you are choosing BrainAPI for an application, connecting an assistant, or explaining the product to a teammate. You do not need a background in memory research, graphs, or retrieval systems.

The product in one picture

flowchart LR
  Sources["Text, files, URLs, or facts"] --> Ingest["Ingestion task"]
  Ingest --> Brain["One brain"]
  Brain --> Passages["Quoted passages"]
  Brain --> Graph["People, things, and events"]
  Passages --> Ask["Ask a question"]
  Graph --> Ask
  Ask --> Context["Context pack"]
  Ask --> Explore["Explore the graph"]
  Ask --> Agent["Assistant tools"]
  1. Pick a brain so one team's knowledge never mixes with another's.
  2. Ingest material. Work runs in the background; you poll a task until it finishes.
  3. Retrieve what you need: a context pack for an assistant, a graph walk, a historical snapshot, or a conflict report.
  4. When two sources disagree, or a fact should be trusted or ignored, use conflicts and verification.

Feature map

FeatureIn one sentenceStart here
Brains and isolationEach brain is a locked room; a token and a brain ID must both match.Tenant or user memory
IngestionSend text, files (with optional OCR), URLs, or structured facts; spreadsheets are an opt-in experiment.Getting knowledge in
Knowledge graphBrainAPI finds the people, things, and events in that material and connects them."Who did what, when?"
Retrieval, chat, and ExploreAsk a question, browse the graph, or (optionally) chat against the brain.Answering from memory
History and as-of queriesAsk what was true on a given date; superseded facts stay on file.Facts that change
Conflicts and provenanceTwo sources that disagree are flagged, with a path back to each source."Where did this come from?"
Verified and rejected factsAn expert can mark a fact trusted or hidden from ordinary answers.Human review
Source revisions and dedupeRe-importing a document keeps older copies; similar entities are merged when possible.Living documents
Tasks, cancel, and rollbackEvery import is a job you can watch. Stop when the run lists cancellation_modes. Rollback needs staging.Long imports
MCP and OAuthAssistants call BrainAPI tools without you pasting REST details into a prompt.Agent memory
SDKs, PATs, and billingTokens, client libraries, and managed plan prices.Getting access

Which features for which goal

If you need…UseUsually skip
My assistant should remember users or a knowledge baseA brain per tenant or user, text or file ingestion, then context retrievalRanked Search unless your UI is a search box; Search is off on hosted production
My assistant should remember users and call tools itselfThe same path, plus MCPPutting a system-wide token inside the assistant
My facts change over timeHistory and as-of and source revisionsTreating every import as a wipe-and-replace
I need to know where an answer came fromContext packs (passages and graph paths), then conflicts and provenanceTrusting a score with no source list
Two documents contradict each otherConflict scan and, if a person should decide, verificationAuto-detect on every ingest (that flag is off by default)
I uploaded a scanned PDFFile ingestion and OCRSpreadsheet import; scans are not workbooks
I have a spreadsheet of rows to query as a tableSpreadsheet import, experimental and opt-inThe knowledge-graph pipeline; gated brains skip that path for .xlsx / .csv
I need to browse a large graphExplore on the PostgreSQL graph driverExplore on other graph stores (they return 501)
I already have a database of rows and foreign keysOrdinary application storageBrainAPI, unless language or changing events is the real problem

What stays optional

BrainAPI ships with safe defaults. Turn a capability on only when you need it:

CapabilityDefaultNotes
Ranked SearchOff (SEARCH_ENABLED=false)Hosted production returns 404 for /retrieve/search. Use context retrieval instead.
Spreadsheet importOff (SPREADSHEET_EXPERIMENT_BRAINS empty)Experimental. PostgreSQL brains only. Added in 2.21.1.
Conflict scan on ingestOffOn-demand scan is always available on a 2.21.0+ engine.
Extra leftover-pair judgingOffOptional; leave it off unless you have a review workflow.
Fact verification writesOff (no verification scope)Any valid token can read states.
Task cancel / rollbackOffINGESTION_CANCELLATION_ENABLED or staging. Rollback is offered only while a run is staged.
ExplorePostgreSQL graph driver onlyOther drivers return 501.
Chat against the brainOptional pluginNot part of the core API.
Hosted MCP sign-inOff until OAuth issuer URLs are set2.21.1 encrypts stored access keys for that flow.

Python and Node client libraries exist but are pre-1.0. For production traffic, prefer REST until those packages reach 1.0. See SDKs, PATs, and billing.

What these pages are not

  • They are not a claim that BrainAPI replaces a search engine, a warehouse, or a row store.
  • They do not compare BrainAPI with other retrieval designs.
  • They describe shipped 2.21.1 behavior. Public regional hosts can lag; a 404 on a new route often means that host has not rolled the matching engine yet. See Regional API hosts.

Next step

If you are implementing, follow the Quickstart, then Authentication and brains. If you are choosing features, pick the row in the table above and open that Concepts page.

Edit on GitHub

Last updated on

On this page