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 — это личная команда ИИ-агентов, которую вы развёртываете на своём оборудовании: агенты используют общую долговременную память (Tideline), передают друг другу задачи по настоящей иерархии и работают с более чем 1000 приложениями, которыми вы уже пользуетесь.
Это одно приложение или скорее экосистема?Это экосистема, а не одно приложение: одну команду агентов можно вызвать из терминала, WhatsApp, Telegram, Slack, Discord, iMessage, BlueBubbles, даже с часов или умных очков, а быстрый терминальный интерфейс TUI служит точкой входа по умолчанию.
Как установить и запустить?Запустите скрипт установки (curl ... | sh), который при необходимости установит для вас Node 22.12+, или установите напрямую из npm, если Node уже есть, а затем запустите мастер первоначальной настройки, чтобы завершить установку.
Нужен ли API-ключ для каждого провайдера моделей?Нет — можно войти через существующую подписку Claude, ChatGPT или Copilot либо использовать уже авторизованный вход в Claude Code / Codex CLI, без вставки API-ключа.
Есть ли подводные камни при установке, о которых стоит знать?Если npm install завершается с ошибкой EACCES, это проблема с правами Node, а не ошибка Brigade — решение: использовать установщик curl (он настраивает среду выполнения в домашнем каталоге пользователя) или указать npm префикс, доступный для записи пользователю, а не использовать sudo.
Можно ли запустить это на Raspberry Pi или нужен полноценный сервер?Та же команда агентов работает на Raspberry Pi или на сервере: по умолчанию используется облегчённая установка на файловой системе, а для более серьёзных нагрузок можно подключить необязательную самостоятельно развёрнутую базу данных 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 по умолчанию.
Какие модели ИИ можно использовать?Brigade работает с Anthropic, OpenAI, Gemini, OpenRouter, OrcaRouter, Token Market, Groq, Cerebras, xAI, DeepSeek, Mistral, любой конечной точкой, совместимой с OpenAI, или локальной моделью Ollama, и модель можно менять прямо во время разговора.
Creator
spinabot
Size
30 MB
Stars
11.3K
Age
3mo
Commits · 90 Days