brigade README

The project's README from github.com/spinabot/brigade. As one markdown file: README.md.

🦁 Brigade — Your personal intelligence, built enterprise-grade

Brigade — your personal intelligence, built enterprise-grade

Built for enterprise scale. Open for everyone. · An ecosystem, not an app.

🔐 No tokens to juggle. No drama. No copy-pasting secrets, no telemetry — we handle them, not you. Your API keys stay on your own machine, never sent to a middleman.

🔑 No API key? No problem. Sign in with your Claude, ChatGPT, or Copilot subscription — or, if you're already signed into the Claude Code or Codex CLI, reuse that login (no browser, no re-auth).

🩸💥 B³ — Brigade Bloody Benchmark 💥🩸
NEW in v1.9.0 · the one command that throws your crew to the wolves (lovingly)

Three B's. One bloody command. Your crew — loose on the open internet.

Brigade is your crew. Bloody is what you do to it — fling it into the open with no net, down a red-hot tunnel to the wild. Benchmark is the punchline: the only test that ever mattered isn't a lab, it's strangers poking your agents at 3 a.m. Survive that, and you've shipped.

Under the hood it's tame — HTTPS at the edge, no account, no setup. Cloudflare by default, or bring your own relay (bore · frp · sish, all open-source). A secret key rides along invisibly: you never see it, and gate-crashers just bleed out on a 401. Not feeling the name? It also answers to the buttoned-up brigade expose. 🩸

brigade bloody benchmark  ·  brigade expose  ·  brigade expose stop  🩸

spinabot/brigade on Trendshift

CI status npm version npm total downloads node engine MIT License website

Brigade is your personal intelligence, built on enterprise-grade tech: a crew of AI agents on a real org chart that share one long-term memory, Tideline, so what one agent learns, the rest can use. They delegate to each other, switch models mid-task without losing the thread, and act inside the 1,000+ apps you already use. It's an ecosystem you host yourself, with the controls and data sovereignty of enterprise tech: no account to create, no SaaS in the middle.

The same crew runs on a Raspberry Pi or a server. By default it's a small filesystem install; switch to a self-hosted Convex database when you want one. Bring any model: Claude, GPT, Gemini, Llama, or a local Ollama. Privileged actions wait for your approval, and your keys and data never leave your machine. No telemetry.

It's an ecosystem, not an app: one crew you reach from the terminal, WhatsApp, Telegram, Slack, Discord, iMessage, and BlueBubbles, and from your watch, Meta smart glasses, and Meta Quest.

# macOS / Linux — installs Node if needed, then Brigade (no sudo)
curl -fsSL https://brigade.spinabot.com/install.sh | sh
brigade

Start it and you get a fast chat TUI. Keep going and you get isolated agents with their own workspaces and credentials, persistent memory, a skill system, a cron scheduler, sub-agent fan-out, an org hierarchy, messaging channels like WhatsApp and Telegram, 1,000+ app connectors, an MCP memory server, and an optional self-hosted Convex backend — all under one ~/.brigade/ directory you fully own.

One owner, a whole crew — many agents that coordinate through a real org chart, all on hardware and storage you control.


Table of contents


Why Brigade

🖥️ Terminal-first A flicker-free chat TUI by default. No browser, no Electron.
🧠 Memory that lasts Facts persist across sessions with origin scoping, decay, and hybrid (keyword + vector) recall — the Tideline engine.
👥 A real crew Spawn isolated agents with their own personas, credentials, and memory; wire them into an org chart that governs who can talk to whom.
🔌 Bring any model Anthropic, OpenAI, Gemini, OpenRouter, OrcaRouter, Token Market, Groq, Cerebras, xAI, DeepSeek, Mistral, local Ollama, or any OpenAI-compatible endpoint. Switch mid-conversation.
📅 Always-on Run as a headless WebSocket gateway with a crash supervisor, cron jobs, and OS service install.
💬 Channels Talk to your crew from WhatsApp, Telegram, Slack, Discord, iMessage, and BlueBubbles today; the adapter contract is built for more.
🔗 1,000+ connectors Gmail, Slack, GitHub, Notion, Calendar, Linear… via the built-in Composio tool.
📄 Reads & writes documents Send a PDF, Office doc, image, audio, or video and your crew understands it — then have it create or edit Word, Excel, PowerPoint, and PDF files and hand them back.
🧩 MCP Expose your long-term memory to any MCP client (brigade mcp), or connect MCP servers in.
🗄️ Your storage Default filesystem mode, or an optional fully self-hosted Convex backend with at-rest encryption.
🔐 Yours Everything lives under ~/.brigade/. Keys are stored locally at mode 0600. rm -rf ~/.brigade wipes it clean.

Install

Fastest — handles Node for you (installs Node 22.12+ if you don't have it, then Brigade):

# macOS / Linux
curl -fsSL https://brigade.spinabot.com/install.sh | sh
# …or straight from GitHub:
curl -fsSL https://raw.githubusercontent.com/spinabot/brigade/main/packaging/install/install.sh | sh
# Windows (PowerShell)
irm https://brigade.spinabot.com/install.ps1 | iex
# …or straight from GitHub:
irm https://raw.githubusercontent.com/spinabot/brigade/main/packaging/install/install.ps1 | iex

Already on Node 22.12+? Install straight from npm:

npm i -g @spinabot/brigade

Hitting EACCES / permission denied? Your Node's global folder needs admin rights. Don't sudo — either use the curl … | sh installer above (it sets up a private, user-owned runtime, no root needed), or point npm at a user-writable prefix: npm config set prefix ~/.npm-global, then add ~/.npm-global/bin to your PATH.

Then launch onboarding:

brigade

Quick start

# 1. Set up — pick a provider, paste an API key (or scan local Ollama), choose a model
brigade onboard

# 2. Start the always-on gateway — your crew, channels, and cron jobs live here
brigade gateway run

# 3. Chat with your crew
brigade tui

The onboarding wizard walks you through five steps: (0) storage mode (filesystem or self-hosted Convex), (1) pick a provider (Anthropic, OpenAI, Gemini, OpenRouter, OrcaRouter, Token Market, Ollama, and more), (2) connect it (paste an API key, sign in with a Claude/ChatGPT/Copilot subscription, reuse your Claude Code or Codex CLI login, or connect local Ollama), (3) choose a default model, and (4) web search (pick a search backend; keyless options work out of the box). Subsequent launches resume right where you left off.

brigade tui (or just brigade) auto-starts the gateway if it isn't already running, so for a quick local session you can skip step 2. To keep the gateway alive across reboots, run brigade gateway install (installs a launchd / systemd / Task Scheduler service).

Other handy entry points:

brigade agent -m "summarize ~/today.md"   # one-shot turn, no TUI
brigade connect                            # attach a client to a running gateway
brigade doctor                             # health-check your install

How it works

Brigade is one binary that can act as a gateway (the long-lived process that holds all state and runs agents) or as a thin client that attaches to it.

            ┌─────────────────────────── ~/.brigade/ ───────────────────────────┐
            │  config · per-agent workspaces · sessions (JSONL) · memory · cron  │
            └───────────────────────────────────────────────────────────────────┘
                                          ▲
                                          │ reads/writes (filesystem OR Convex)
                        ┌─────────────────┴─────────────────┐
   brigade tui ──ws──▶  │            GATEWAY  :7777          │  ◀──ws── brigade connect
   brigade chat         │  per-turn agent loop · routing    │
   WhatsApp·Telegram ──▶│  tools · sub-agents · supervisor  │◀──────── cron jobs
   MCP client ─stdio──▶ │  (brigade mcp → memory server)    │
                        └───────────────────────────────────┘

Features

🧠 Memory (Tideline)

File-backed facts (facts.jsonl) tagged with an origin (owner vs. channel peer) so a peer's facts never leak into your context. Facts decay on three tiers and are deduped at write time, behind a provenance write-gate that stops untrusted sources from overwriting your identity/preferences. The Tideline engine adds hybrid recall (BM25 keyword + model-free vector lane), a typed link graph, and a nightly reflect/consolidate pass. Auto-recall injects only origin-matched facts before each turn. Tools: recall_memory, read_memory, write_memory, manage_memory. → docs/tideline.md

🪪 Skills

Drop a folder with a SKILL.md into your workspace and Brigade discovers it next turn. Skills are prompt-resident (name + description injected; the model reads the body on demand). Six discovery roots merge in precedence order with eligibility filters for OS, required binaries, env vars, and config. 56 skills ship bundled. Manage with manage_skill.

👥 Sub-agents

Delegate work to child agents: spawn_agent (single) and spawn_agents (parallel fan-out). Depth-capped (default 3) and child-count-capped (default 5), with an abort cascade and a completion bridge that wakes the parent when children settle.

🏢 Org / Pride hierarchy

Define a crew as a real org chart (cfg.org): members, departments, reporting lines. An A2A (agent-to-agent) policy derives from the graph and governs which agents may message which. Inspect it with brigade org show / explain / doctor, or render a 🦁 Pride chart with the org tool.

💬 Channels

A typed channel-adapter contract with a shared inbound pipeline (access control, dedupe, abort triggers, approval routing). WhatsApp (Baileys, QR/code pairing, multi-account, reconnect backoff), Telegram (Bot API token, inline-button approvals, owner bootstrapped on the gateway), Slack (Socket Mode, bot + app tokens, channel/thread chat), Discord (bot token, DM/server/thread chat), iMessage (via the imsg CLI, plain-text only), and BlueBubbles (macOS server, REST-out + webhook-in, reactions/edit/unsend) ship today; the contract is built for more. See Telegram setup for the full walkthrough.

⏰ Cron

Schedule recurring or one-shot work: cron expressions (with IANA timezones and stagger), fixed intervals, or one-shot timestamps. Payloads can be a system event into your main session, a full agent turn in an isolated session, or a shell script. Jobs survive restarts.

🔗 Connectors (Composio)

An owner-only composio tool brings 1,000+ app connectors (Gmail, Slack, GitHub, Notion, Calendar, Linear, …) with managed OAuth. Set a key once, then just ask your crew in plain language: "connect my Gmail", "post to #team".

Getting the key: Brigade uses the Composio SDK, so it needs a PLATFORM key (starts with ak_), not the "FOR YOU" consumer key (ck_) that Brigade rejects. At dashboard.composio.dev, set the top-left mode toggle to PLATFORM, open Settings → API Keys, and copy the ak_… key. Hand it to Brigade once ("set my Composio key to ak_…") and it's verified and stored encrypted. Full guide: docs/composio.md.

📄 Documents & media

Send your crew a file and it actually reads it: the analyze_media tool understands PDFs (text or scanned), Word / Excel / PowerPoint (including the images embedded inside them), plain images, audio, and video — auto-selecting the right provider and caching the result. The write side, make_document and edit_document, creates and edits Word / Excel / PowerPoint / PDF in place: fill templates and form fields, set cells and formulas, add charts, and merge / split / stamp / watermark PDFs — all with pure-JS libraries, no sandbox. Drop a document into a channel and Brigade sees it; ask for a report and it hands one back with send_media.

📎 Attach files in the terminal

Send your crew an image, a PDF, a screenshot, a video — from the chat TUI, with no ceremony. Four ways in, and they all land as a real attachment:

An image on a vision-capable model rides the turn inline — the model actually sees it. A text or source file is read and its contents are inlined directly. PDFs, Office docs, video and audio go through analyze_media (see above). A persistent clipboard worker keeps a paste to a few milliseconds on every platform, and a 📎 attached bar shows what will ride your next message. Works against a local gateway (files travel as paths, so a 400 MB video costs nothing on the wire).

🎬 Motion-graphics video (HyperFrames)

render_video turns an HTML composition into a deterministic MP4 — animated charts and dashboards, data explainers, quote/announcement cards, kinetic typography, branded short-form social clips. Your crew writes a self-contained GSAP-timeline composition (the hyperframes skill teaches the conventions) and Brigade renders it frame-by-frame in an isolated worker (headless Chrome + FFmpeg), then hands back the file with send_media. It's the deterministic, data-driven counterpart to generate_video (generative AI footage). The engine is an optional dependency — the tool stays dormant until you install it with brigade video install, so it adds nothing to a lean setup. (Install it that way, not with a bare npm i: Brigade keeps engine dependencies in its own directory, and npm run from your shell would put it somewhere Brigade never looks.)

🧩 MCP

Run brigade mcp to expose your long-term memory to any MCP client (Claude Desktop, editors, etc.) as add/search/context tools over stdio, owner-bound.

Brigade is also an MCP server for its own agent. See below.

🔌 Subscription backends — your Claude login, Brigade's tools

Already signed into Claude Code? Pick claude-cli as your provider and Brigade drives that binary directly, on your existing subscription. No API key, no per-token bill.

Most tools that wrap a CLI give the model whatever the CLI already had. Brigade does the opposite: it denies the binary's own filesystem, shell, network and sub-agent tools, and serves it Brigade's entire guarded surface — all 30+ native

brigade (spinabot/brigade)

Searching Database…

11.3K ·GitHub
这是什么?Brigade 是一个可自托管的个人 AI 团队:一组智能体共享同一份长期记忆(Tideline),在真实的组织架构中相互委派任务,并能跨越你已在使用的 1,000 多个应用协同工作。
这是单个应用,还是一个生态系统?它是一个生态系统,而不是单个应用:你可以通过终端、WhatsApp、Telegram、Slack、Discord、iMessage、BlueBubbles,甚至手表或智能眼镜与同一个智能体团队交互,默认入口是响应迅速的终端 TUI。
我该如何安装并启动?运行安装脚本(curl ... | sh),如果需要会为你安装 Node 22.12+;如果你已经装有 Node,也可以直接通过 npm 安装。然后启动引导向导完成设置。
每个模型服务商都需要 API 密钥吗?不需要。你可以使用现有的 Claude、ChatGPT 或 Copilot 订阅账号登录,也可以复用已经完成认证的 Claude Code 或 Codex CLI 登录,无需粘贴 API 密钥。
安装时有哪些需要注意的坑?如果 npm install 报 EACCES 错误,那是 Node 的权限问题,而不是 Brigade 的 bug。解决办法是使用 curl 安装脚本(它会设置一个归用户所有的运行环境),或者把 npm 的安装前缀指向用户可写的目录,而不要使用 sudo。
它能在树莓派上运行,还是必须有真正的服务器?同一个智能体团队可以在树莓派或服务器上运行。默认使用轻量的文件系统安装方式;如果使用量较大,也可以选择可选的自托管 Convex 数据库。
我的 API 密钥和个人数据究竟存放在哪里?所有数据都保存在你完全拥有的本地 ~/.brigade/ 目录下,密钥以本地文件形式保存,文件权限为 0600,没有任何遥测数据上传,你的 API 密钥也不会经过任何中间服务器。删除该文件夹,所有数据就都没有了。
什么是 Tideline?Tideline 是 Brigade 的长期记忆引擎:以文件形式保存事实,并按来源打标签,支持衰减、去重、BM25 与向量的混合召回,以及每晚一次的整合过程。这样事实可以跨会话保留,又不会在同一个团队中与不同的人之间相互泄露。
什么是 Brigade Bloody Benchmark?它是一条命令(brigade bloody benchmark,别名 brigade expose),可以通过 HTTPS 隧道(默认使用 Cloudflare,也可选 bore、frp 或 sish)把你的智能体团队暴露到公网上,并由一个隐藏的密钥保护,方便陌生人在真实环境中对你的智能体进行压力测试。
我可以通过哪些聊天应用与团队交流?目前可以通过 WhatsApp、Telegram、Slack、Discord、iMessage 和 BlueBubbles 使用,它们都通过统一的类型化通道适配器接口接入,此外还支持默认的终端 TUI。
我可以使用哪些 AI 模型?Brigade 支持 Anthropic、OpenAI、Gemini、OpenRouter、OrcaRouter、Token Market、Groq、Cerebras、xAI、DeepSeek、Mistral、任何兼容 OpenAI 的接口,或本地的 Ollama 模型。你还可以在对话过程中随时切换模型。
Creator
spinabot
Size
30 MB
Stars
11.3K
Age
4mo
Commits · 90 Days