This release is a pre-release and may not be stable for production use.
BRIAN
A self-hosted AI harness: a model plus the loop, tools, memory, and permissions that turn it into an agent you can actually run.
Package: brian-core 2.0.0rc1. Command: brian. agent is a silent alias of the same program. Code lives under src/brian_core.
This checkout is /srv/brian on branch brian. It is not the live operator at /srv/agent (ab212.io) and not HeyBrian. Do not copy those trees’ .env, memory/, or sessions here.
Install
curl -LsSf https://astral.sh/uv/install.sh | sh && uv tool install brian-core && brian
Or run scripts/install.sh. First run asks for a provider and key, writes ~/.brian/.env (mode 0600), then starts the REPL. Type brian from any folder — keys, USER.md, and sessions live in ~/.brian. You still need your own LLM key. The wheel is code only; a stranger’s brain starts blank.
Three doors
| Door | What it is |
|---|---|
| CLI | Type brian |
| HTTP API | brian --api — OpenAI-shaped chat plus durable runs |
| Agent SDK | from brian_core.sdk import run — same loop in-process, not HTTP |
BrianClient is an HTTP helper for the API. It is not the Agent SDK.
from brian_core.sdk import run, stream
print(run("list python files"))
for event in stream("list python files"):
...
Run from this repo
Needs Git, Python 3.11+, and uv. Product home is still ~/.brian (override with BRIAN_HOME or BRIAN_ENV_FILE). Tests may set MEMORY_DIR.
cd /srv/brian # or clone the repo and check out this branch
uv sync
uv run brian --help
uv run brian # first run: provider + key into ~/.brian/.env
uv run brian "list python files" # one shot
Package layout is src/brian_core. Optional extras: providers, hosted.
Modes
uv run brian # interactive REPL
uv run brian "do this" # one shot
uv run brian --continue # last session
uv run brian --resume <session-id>
uv run brian --fork-session <id>
uv run brian --tui # full-screen terminal UI
uv run brian --api # FastAPI server
uv run brian --scheduler # durable job worker
uv run brian --heartbeat-only # memory maintenance, then exit
uv run brian --learning-graph
uv run brian --version
uv run agent --help # same CLI; do not teach this name
One execution mode per invocation. --api requires API_SERVER_KEY.
HTTP API
uv run brian --api
curl -fsS http://127.0.0.1:8000/health
curl -fsS http://127.0.0.1:8000/v1/chat/completions \
-H "Authorization: Bearer $API_SERVER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"agent","messages":[{"role":"user","content":"Say hello."}]}'
Bearer API_SERVER_KEY on almost every route. Public: /health, /v1/health, throttled POST /api/web/login, Twilio-signed POST /hooks/twilio/sms.
| Endpoint | Purpose |
|---|---|
POST /v1/chat/completions |
Chat, streaming or not |
POST /v1/runs |
Durable run that survives a closed tab |
GET /v1/runs/{id}/events |
SSE for that run |
POST /v1/runs/{id}/approval |
Human approval |
GET /v2/capabilities |
Machine-readable surface |
/api/sessions/* |
Session CRUD and chat |
/api/jobs/* |
Scheduler jobs |
Operator detail (SOUL, skills, MCP, session save): docs/brian-operator.md. What it can do in plain English: docs/CAPABILITIES.md.
Config
All settings are .env under ~/.brian (or BRIAN_ENV_FILE). Names are in env.example. Required: PROVIDER, MODEL, and the key for that provider.
On first interactive start, if ~/.brian/memory/USER.md is empty, the CLI asks a few profile questions after keys work.
What this tree is for
Build the product here. Leave /srv/agent as production. Tests that need config use a local env, never the live one.
Working rules for agents: AGENTS.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brian_core-2.0.0rc1.tar.gz.
File metadata
- Download URL: brian_core-2.0.0rc1.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e3df9c6a79b692cd9e1b3bd83495a6e32b9969e78dc8c6b8e108c9648047c6f
|
|
| MD5 |
c194e7770ad7653008b481cf35e53b14
|
|
| BLAKE2b-256 |
930f637b637a7f250a6f0f7130b7059668b391fbf47f132915507206f16c9f59
|
File details
Details for the file brian_core-2.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: brian_core-2.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 973.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96fd938f1082d438ccacf7fdf0d5445a49d372267548c3d71382d567b4e3afd9
|
|
| MD5 |
6d7b9f865236315f4c3bb8d5ab096e56
|
|
| BLAKE2b-256 |
eafe69f91e464ba6f031b858f70c9bff4cd702545c35cb4324357aadf47c75d7
|