How spinabot/brigade works
Brigade is a self-hosted, multi-agent assistant reached through a terminal or messaging channels. A user message enters a channel adapter or the terminal client, reaches the gateway, and is handled in an agent session; the crew can use tools and shared Tideline memory, then return a response. The map also includes documented model/provider, collaboration, scheduling, MCP, and storage capabilities. Some implementations are represented by directory-level nodes because their source was not sampled; links without direct evidence are omitted.
Main entry points: server.ts WebSocket gateway · agent-loop.ts Agent loop · client.ts Terminal client · channels Messaging channels
Components 20
User entry
- Terminal client
src/tui/client.ts - Messaging channels
src/agents/channels - Inbound pipeline
src/agents/channels/inbound-pipeline.ts
Gateway runtime
- WebSocket gateway
src/core/server.ts - Wire protocol
src/protocol.ts - Agent sessions
src/sessions/session-store.ts
Agents and capabilities
- Agent loop
src/agents/agent-loop.ts - Model providers
src/providers/catalog.ts - Agent tools
src/agents/tools - Team coordination
src/collaboration/runtime-service.ts - MCP tools
src/agents/mcp/tool-plane-host.ts
Memory and state
- Tideline memory
src/tideline/index.ts - Memory records
src/tideline/store/records.ts - Storage adapters
src/storage
Administration
- Configuration
src/config/io.ts - Provider authentication
src/auth/profiles.ts - Cron scheduler
src/cron/active-service.ts - Secure exposure
src/core/tunnel/manager.ts - Convex backend
convex/schema.ts
Other components
- User
Connections 20
- User → Terminal client: chats through
README.md - User → Messaging channels: messages through
README.md - Messaging channels → Inbound pipeline: processes messages
src/agents/channels/manager.ts - Inbound pipeline → WebSocket gateway: routes turns
- Terminal client → WebSocket gateway: sends requests
src/tui/client.ts - Terminal client → Wire protocol: uses frames
src/tui/client.ts - WebSocket gateway → Wire protocol: handles methods
src/core/server.ts - WebSocket gateway → Agent sessions: reads sessions
src/core/server.ts - WebSocket gateway → Agent loop: runs turns
src/core/server.ts - Agent loop → Model providers: selects models
- Agent loop → Agent tools: invokes tools
- Agent loop → Team coordination: delegates tasks
- WebSocket gateway → MCP tools: hosts tool plane
src/core/server.ts - WebSocket gateway → Tideline memory: queries memory
src/core/server.ts - Tideline memory → Memory records: stores facts
src/tideline/index.ts - Storage adapters → Convex backend: supports backend
- Configuration → Storage adapters: resolves runtime mode
src/config/io.ts - Provider authentication → Model providers: authenticates providers
src/auth/profiles.ts - WebSocket gateway → Cron scheduler: exposes cron methods
src/core/server.ts - Secure exposure → WebSocket gateway: proxies access
src/core/tunnel/manager.ts