Skip to content
Projects

aexhq/brain has 29 GitHub stars and 0 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-16 00:41 UTC. Last push 2026-11-14.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Update delayed
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

A minimal and extensible agent server for building agent applications

Self-hosted

README.md

Original
              ______ ______ _______ _______ _______
  ▄████▄     |   __ \   __ \   _   |_     _|    |  |
▄██▄██▄██▄   |   __ <      <       |_|   |_|       |
  ▀▀  ▀▀     |______/___|__|___|___|_______|__|____|

A minimal and extensible agent server for building agent applications

Quickstart · Docs · API reference · Examples · Roadmap

Brain runs agent sessions on infrastructure you control. Your application sends messages and connects tools; Brain keeps the session history and runs Pi in an isolated environment for each session.

Four services divide the work:

  • Brain accepts messages, orders turns and streams events.
  • Storage keeps transcripts, attachments and session state across restarts.
  • Tools calls uploaded code, remote services and connected client functions.
  • Sandbox creates and cleans up isolated environments for Pi and uploaded tools.

Sessions can outlive client connections. Your application chooses each session’s model, instructions and tools, then reconnects to its event history whenever it needs to.

Get started

Follow the Docker quickstart to start the services and connect with the TypeScript SDK or CLI. The embedded application guide covers running the existing server package from Node.js.

import { Brain, Pi, Model, ApiKey } from '@aexhq/brain';

const brain = new Brain('http://127.0.0.1:8080', process.env.BRAIN_API_KEY);
const session = await brain.create({
  id: 'support/issue-42',
  harness: Pi(),
  model: Model('openai/gpt-4.1-mini', ApiKey(process.env.OPENAI_API_KEY)),
});
await brain.send(session.id, { type: 'user.message', text: 'Hello.' });

Documentation

I want to… Read
Run my first session Quickstart
Understand how Brain runs a session Architecture
Stream events, interrupt turns, and resume sessions Session lifecycle
Write a tool service Distributed tools
Connect a remote MCP server MCP tools
Issue tokens and isolate customers Authentication
Back up sessions and move them between servers Persistence & recovery
Deploy and monitor Brain Operations & observability
Call Brain from my backend TypeScript SDK
Look up routes and config fields HTTP API and Host configuration
See what's coming next Roadmap

Build with a coding agent

Give your coding agent Brain's docs as plain text: llms-full.txt has every page in one file, and llms.txt lists the pages.

Contributing

Install the dependencies and run every local check before you open a pull request. The checks need Go 1.26+, Node.js 24+, and Python 3.11+ for the sandbox execution fixture.

node scripts/setup.mjs
node scripts/check.mjs

Development & verification covers what the checks run, how CI publishes releases, and how to preview the docs.

License

Brain is released under the MIT License.

Docs · Roadmap · Architecture · License · Issues