SanctumOS

The Modular, Self-Hosted Agentic Operating System

Broca — The Speech Center of SanctumOS

Broca is SanctumOS’s communication middleware — the bridge between your agents and the outside world. It translates high-level agent intent into platform-specific messages, unifies multi-channel delivery, and exposes a clean plugin interface so you can add new endpoints without touching core logic. Think of it as the system’s “speech center”: agents think in one place and speak everywhere.

Why Broca

  • Separation of concerns: Let the Letta/agent layer focus on reasoning while Broca handles delivery, formatting, retries, and routing.
  • Multi-channel by design: Ship to Telegram, CLI, APIs, and more from one interface.
  • Extensible: Drop-in plugins add new platforms without forking the core.

Architecture at a Glance

broca2/
├── main.py                 # runtime entry
├── runtime/core/           # AgentClient, QueueProcessor, PluginManager, Message
├── cli/                    # admin & diagnostics CLI
└── plugins/                # platform adapters (e.g., telegram/, cli/)

broca2/ ├── main.py # runtime entry ├── runtime/core/ # AgentClient, QueueProcessor, PluginManager, Message ├── cli/ # admin & diagnostics CLI └── plugins/ # platform adapters (e.g., telegram/, cli/)

broca2/
├── main.py                 # runtime entry
├── runtime/core/           # AgentClient, QueueProcessor, PluginManager, Message
├── cli/                    # admin & diagnostics CLI
└── plugins/                # platform adapters (e.g., telegram/, cli/)

Broca’s runtime coordinates message flow, the queue processor handles work reliably, the agent client talks to your Letta server, and the plugin manager loads/isolates platform adapters.

Core Capabilities

  • Processing modes:
  • Echo (round-trip testing)
  • Listen (ingest/store without processing)
  • Live (full agent processing)
  • Robust queueing & recovery: Operational safety around message handling.
  • Unified admin CLI: Manage queues, users, conversations, and settings (broca-admin …).
  • Plugin system: Standardized interface, lifecycle hooks, and per-plugin settings.

Plugins

Broca ships with a Telegram plugin and a CLI plugin out of the box; adding more is simple. Implement the small Plugin interface (name, platform, handler, start/stop) and Broca handles the rest.

MCP-Ready by Design

All CLI/admin capabilities and plugin interfaces are machine-controllable (MCP-able). That means your orchestrators/agents can operate Broca programmatically with JSON-clean outputs and predictable errors — ideal for test harnesses and multi-agent networks.

Typical Flows

  • Research Assistant → Telegram: Agent generates a structured response → Broca formats and posts to Telegram → user reply returns to agent via the same channel.
  • Ops Bot → CLI: Schedule health checks; Broca’s CLI plugin becomes a diagnostic loop for agents during development.

Install & Run (quick start)

  • Install (editable): pip install -e .
  • Run server: python -m broca2.main
  • Admin examples:
  • broca-admin queue list
  • broca-admin users list
  • broca-admin settings set message_mode live

Configuration

  • Message mode, queue refresh interval, debug flags
  • Agent API credentials, datastore config
  • Per-plugin settings via env/INI for clean deploys

Developing a Plugin (5 steps)

  1. subclass Plugin
  2. implement get_name() and get_platform()
  3. provide a message handler callable
  4. wire up start()/stop() for lifecycle
  5. ship it in plugins// and enable via settings

Where Broca Fits in SanctumOS

Broca sits below your agents and above your channels: agents produce intent, Broca handles expression. In the broader neuro-inspired stack, it complements Thalamus/Cerebellum (signal prep & prioritization) by owning delivery and conversation state across endpoints.