Show HN: BrainAPI's event-centric graph from any data with four-stage pipeline Lumen Labs launched BrainAPI, an open-source tool that automatically builds event-centric knowledge graphs from raw text using a swarm of AI agents. The system extracts facts and relationships to answer multi-step questions with traceable reasoning paths, distinguishing it from similarity-based retrieval. Available via a CLI or Docker, it targets developers needing structured knowledge extraction from unstructured data. Turn raw text into a living knowledge graph — automatically. You send text. A swarm of agents reads it, takes notes, and draws the graph for you. Then you ask questions and get answers backed by a traceable path — not a similarity guess. BrainAPI Cloud https://brainapi.lumen-labs.ai/ • Quickstart -quickstart-fastest-way-to-run-it • What it is -what-is-brainapi • How it works ️-how-it-works-the-agent-swarm • Use cases -where-you-can-use-it • Docs ↗ https://brainapi.lumen-labs.ai/docs/v2 BrainAPI reads your text and builds a knowledge graph out of it — by itself. You feed it documents, notes, messages or events. Behind the scenes a group of AI agents reads everything, understands what happened, writes down the facts, and connects them into a queryable graph. You then ask questions in plain language and get answers grounded in the actual connections it found. The trick is that BrainAPI is event-centric . Instead of just storing "A is related to B," it captures who did what, to whom, when, and in what context . That's what lets it answer multi-step questions and always show you the path it used to get there. Feed it one sentence: "Emily organized the AI Ethics Meetup in London on March 8, 2024." Ask something it was never explicitly told: result = client.retrieveContext "Who organized AI events in London in Q1 2024?" → "Emily organized the AI Ethics Meetup in London on 2024-03-08." → result.triples shows the full graph path used to derive this That trace is the difference. Not a nearest-neighbour guess — a reasoned, walkable path through a graph it built for you. The quickest way to get BrainAPI running is the brainapi TUI — an interactive CLI that clones the project, sets up a Python environment, walks you through configuration, starts the backing services, and launches everything for you. Pick the defaults and you'll be up in a few minutes. npm install -g brainapi-tui brainapi init clone, install deps, interactive setup → choose "Use default settings" brainapi start backing services + API + MCP + worker + console When it's up: API → http://localhost:8000 Console web UI → http://localhost:8000/console MCP server → http://localhost:8001/mcp Log in to the console with the BRAINPAT TOKEN generated during setup. That's it — you have a working brain. | Command | What it does | |---|---| brainapi init | Clone the repo into ~/.brainapi/source/ , create a venv, run the setup wizard | brainapi start | Bring up backing services and run the API, MCP server, and Celery worker Ctrl-C stops all | brainapi config | Re-open the setup wizard to change one area databases, models, pipeline, plugins, … | brainapi doctor | Check Python, Docker, Ollama, cloud credentials, and configured services | brainapi update | git pull the install and reinstall Python dependencies | Running any command except help before init will run init first automatically. Useful brainapi start flags: --pipeline accurate|lightweight , --no-services , --no-api / --no-mcp / --no-worker , --only api,mcp,worker . Full reference → . /Lumen-Labs/brainapi2/blob/main/tui/README.md tui/README.md The TUI installs into ~/.brainapi/ source, venv, .env , and state.json — separate from any git clone. Override with BRAINAPI HOME , BRAINAPI REPO URL , or BRAINAPI BRANCH . If you're contributing or hacking on BrainAPI, run it straight from the repo with make : git clone https://github.com/lumen-labs/brainapi2.git && cd brainapi2 poetry install make start-all backing services + API :8000 + MCP :8001 + Celery worker make start-all runs everything from source with hot reload enabled, so code changes are picked up live. Console in dev mode: make build-console && make start-api serve console at http://localhost:8000/console — or hot-reload the console UI separately — make start-api terminal 1 make start-console-dev terminal 2 → http://localhost:5173/console/ Other handy targets: make start-api , make start-mcp , make stop-all , and make install-extras auto-installs heavy ML extras like local OCR based on your .env . Docker only: docker compose -f example-docker-compose.yaml up -d Then ingest your first data point: curl -X POST http://localhost:8000/ingest/ \ -H "Authorization: Bearer $BRAINPAT TOKEN" \ -H "Content-Type: application/json" \ -d '{"data": {"data type": "text", "text data": "Emily organized the AI Ethics Meetup in London on 2024-03-08."}, "brain id": "default"}' The Console is a web UI for exploring everything inside your brain: the graph , text chunks , vectors , observations , tasks , and an ingest page to push new data. It's served on the same port as the API at http://localhost:8000/console and you log in with your BRAINPAT TOKEN . Set CONSOLE ENABLED=false to disable static serving in environments where you don't want the UI exposed. Every piece of text you send is read and discussed by a swarm of specialized agents . After they understand it, they write down notes and draw the graph. Each agent has one narrow job, which keeps the pipeline reliable and auditable end to end. php flowchart TD Text "Raw text" -- Scout "🔍 Scout