← Back to Leaderboard
Bspinabot

spinabot/brigade

A self-hosted WebSocket gateway for agent teams with persistent memory

Engineering Health (Methodology)
A · 87/100
Maintenance Activity
● Updated 2d ago
Latest Release
brigade-v1.39.2
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption12/25
Release Cadence20/20
License Clarity20/20
Self-HostedLocal AIMCPCLI
Total Stars
★ 11,391
24h Growth
+0
7d Growth
+0
Forks
82

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

spinabot/brigade Star History (2026-06-19 - 2026-12-04) ALL-TIME STAR HISTORY (2026-06 – 2026-12) +11.4k in 168d · avg +68/day 12k 6k 0 2026-06-19: ★ 12026-07-04: ★ 522026-07-18: ★ 1512026-08-01: ★ 4862026-08-15: ★ 2,6602026-08-29: ★ 3,1292026-09-12: ★ 3,6432026-09-26: ★ 6,8392026-10-10: ★ 11,2742026-10-24: ★ 11,3242026-11-04: ★ 11,3482026-11-15: ★ 11,3622026-11-26: ★ 11,3882026-12-04: ★ 11,391 ★ 11.4k 06-19 09-11 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Brigade is a TypeScript application packaged as @spinabot/brigade. The brigade CLI can run the long-lived WebSocket gateway on port 7777 or attach a thin client. Terminal and messaging inputs share a routing pipeline that resolves each message to an agent and session. The gateway assembles the prompt from persona, skills, and org context, streams model output, checks tool calls against approval and ownership rules, and persists the transcript. Work stays with the gateway when clients disconnect.

The package includes @earendil-works/pi-agent-core, @earendil-works/pi-ai, and @earendil-works/pi-tui, alongside channel libraries such as grammy, discord.js, and @whiskeysockets/baileys. The default filesystem layout keeps configuration, agent workspaces, JSONL sessions, memory, and cron state under ~/.brigade/; self-hosted Convex is optional. Extensibility comes through SKILL.md discovery, a typed channel-adapter contract, and MCP connections. The memory export exposed by brigade mcp uses stdio, not the gateway's WebSocket client protocol.

Key Capabilities & Differentiators

Tideline stores facts in facts.jsonl in filesystem mode. It scopes recall by origin, deduplicates writes, applies three tiers of decay, and checks provenance before allowing changes to identity or preferences. Retrieval combines BM25 with a model-free vector lane and a typed link graph; nightly consolidation maintains long-lived memory. Org rules govern agent-to-agent messaging. Parallel delegation has depth and child-count limits, cancellation cascades to children, and the parent is notified when they settle.

Brigade supports hosted providers such as Anthropic, OpenAI, Gemini, and OpenRouter, plus Ollama and OpenAI-compatible endpoints. Carrow keeps the transcript in the same session, strips provider-specific reasoning blocks as needed, and adjusts reasoning settings for the target model. A mid-turn switch aborts the current run and replays the last message; it does not transfer an in-flight generation. The crew is reachable through Slack, Telegram, WhatsApp, Discord, iMessage, and BlueBubbles, with text-only iMessage via imsg. Document tools analyze attachments and create or edit Word, Excel, PowerPoint, and PDF files; analysis provider choice matters for data handling.

Trade-offs & Limitations

Compared with a standalone model CLI, Brigade trades a simpler local process for a crew that can keep running, share persistent memory under origin rules, and accept work from multiple channels. Compared with a hosted workspace, it puts gateway and storage operations under your control, but leaves you responsible for channel credentials, backups, approvals, and access policy. Self-hosting is not the same as keeping all data local: hosted models, media analysis, messaging adapters, and Composio can send workflow data outside the host.

Switching providers makes it easier to choose a model per task, but replay after an interrupted turn should not be treated as a rollback of external tool actions. For workflows that write to third-party apps, confirm how retries are handled before enabling unattended runs. Origin scoping and org rules help contain context and communication, but do not establish OS-level sandboxing. Keep the gateway private by default, restrict shell approvals and connector scopes, and treat public tunneling as a change to the deployment's security boundary.

Hardware & Deployment Guide

Run it on Node.js 22.12 or newer. Install with npm i -g @spinabot/brigade, run brigade onboard to choose storage and a model provider, then open brigade tui, which starts the gateway if needed. Use brigade gateway run for a dedicated foreground process or brigade gateway install for launchd, systemd, or Windows Task Scheduler. The filesystem path requires no separate database. If you choose self-hosted Convex, plan for database operation and recovery; in either mode, test restoration of local configuration and workspaces.

For hosted inference, size the gateway for Node.js, enabled channels, document processing, and scheduled work rather than GPU inference. With Ollama, size inference separately for the chosen model and concurrency. To operate offline, pair local inference and storage with workflows that do not use web search, external connectors, or hosted messaging. Version 1.39.0 added durable collaboration mode; 1.39.1 made subscription sign-in failures more specific; 1.39.2 added trust for OS root certificates, relevant on networks that inspect HTTPS.

Gateway: Thin WebSocket clients attach to a long-lived process; turns can continue after the terminal disconnects.
Memory: Tideline combines origin-scoped facts and a provenance write gate with BM25, model-free vector recall, and nightly consolidation.
Delegation: Org-chart rules govern agent-to-agent messaging; child runs default to a depth cap of 3 and a child-count cap of 5.
Model switching: Carrow reuses the session transcript across providers; a mid-turn switch aborts the current run and replays the last message.
Integration: MCP supports inbound server connections and exports memory over stdio; the owner-only Composio tool uses managed OAuth.
Operations: The gateway pairs a heartbeat file with an external supervisor, and scheduled jobs persist across restarts.
Best For

Individuals or small teams that want a persistent agent crew across terminal and messaging channels, with control over where the gateway and state run.

Skip If

You only need interactive chat, want zero infrastructure maintenance, or need independently verified OS-level isolation before running privileged tools.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

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

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
brigade ★11.4k—TypeScriptMITA self-hosted WebSocket gateway for agent teams with persistent memory
hermes-agent268.1k+1.5kPythonMITSelf-hosted Python agent with persistent memory and automation across chat and C
AstrBot47.9k+298PythonAGPL-3.0A self-hosted Python agent hub that connects chat platforms to model providers
CowAgent48.2k+116PythonMITSelf-hosted agent harness for running and remembering work across chat channels

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/spinabot/brigade.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

spinabot/brigade Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about brigade

How do I connect another terminal or an MCP client?

Use brigade connect with --host and --port to attach a thin terminal client to an existing gateway. Use brigade mcp when an MCP client needs access to Brigade memory over stdio; --agent selects the agent. These are different interfaces: WebSocket connects a client to the running crew, while the stdio endpoint serves memory.

Do I need a GPU, and what should I size for?

The Node.js gateway does not need a GPU when inference is handled by a hosted provider. With local Ollama, size the inference host separately: RAM and VRAM needs depend on the model, quantization, context length, and concurrent runs. Also budget for persistent transcripts and memory, especially if you enable multiple channels or frequent scheduled jobs.

Can I use Brigade commercially and self-host it for compliance?

Yes. Brigade is MIT-licensed; retain the applicable copyright and license notices when redistributing it. That license does not cover third-party models, provider subscriptions, messaging platforms, or Composio. Review each service's terms and data-handling requirements. Self-hosting the gateway and storage does not keep prompts, attachments, or tool data on-site when a workflow sends them to an external service.

When is Brigade a better fit than a model CLI or hosted agent workspace?

Use a standalone model CLI if you mainly want interactive coding or chat and already manage any automation elsewhere. Choose Brigade when the same crew needs to keep running after the terminal closes, route messages from multiple channels, and carry memory between sessions. A hosted agent workspace is a better fit if turnkey operations matter more than running and controlling the gateway yourself.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining spinabot/brigade? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature spinabot/brigade on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare