multi-channel agent deployment with unified message routing
Nanobot implements a BaseChannel abstraction layer that normalizes message I/O across 25+ messaging platforms (Telegram, Feishu, Matrix, Discord, WeChat, Slack) and a CLI REPL, routing all user inputs through a centralized message bus and event flow system. Each channel adapter handles platform-specific authentication, message formatting, and delivery semantics while the core AgentLoop processes normalized message objects, enabling a single agent instance to serve multiple communication channels simultaneously without code duplication.
Unique: Uses a unified BaseChannel interface with a centralized message bus and event flow pattern, allowing 25+ platforms to be supported through adapter plugins without modifying core agent logic. Inspired by OpenClaw's multi-channel architecture but simplified for readability.
vs alternatives: Simpler than building separate agent instances per platform (like Rasa or Botpress multi-channel) because message normalization happens at the channel layer, not in the agent loop itself.
provider-agnostic llm abstraction with auto-detection and registry
Nanobot implements a ProviderSpec registry pattern that abstracts 25+ LLM services (OpenAI, Anthropic, Ollama, Groq, etc.) behind a unified interface. The system uses native SDKs for major providers (OpenAI, Anthropic) and a centralized metadata registry for auto-detection of model capabilities, token limits, and cost parameters. Provider selection is declarative via config schema, with fallback logic for API key resolution from environment variables or config files, enabling seamless switching between LLM backends without code changes.
Unique: Centralizes provider metadata (token limits, capabilities, pricing) in a ProviderSpec registry with auto-detection logic, rather than hardcoding provider logic throughout the codebase. Supports both native SDKs (OpenAI, Anthropic) and generic HTTP adapters for extensibility.
vs alternatives: More flexible than LangChain's provider abstraction because it separates metadata (registry) from execution (native SDKs), allowing custom providers to be added without modifying core agent logic.
declarative yaml configuration with schema validation and env interpolation
Nanobot uses a declarative YAML configuration schema (defined in config/schema.py) that specifies agent behavior, LLM provider, channels, tools, memory settings, and automation rules. The configuration loader supports environment variable interpolation (e.g., ${OPENAI_API_KEY}), schema validation via Pydantic, and config migration/backfilling for backward compatibility. Configuration is loaded at startup and can be reloaded without restarting the agent, enabling dynamic reconfiguration.
Unique: Uses a Pydantic-based schema for declarative YAML configuration with environment variable interpolation and validation, rather than requiring code-based configuration. Configuration can be reloaded without restarting the agent.
vs alternatives: More flexible than hardcoded configuration (like some chatbot frameworks) because YAML is human-readable and environment variables enable secrets management without code changes.
cli repl with command routing and interactive agent interaction
Nanobot provides a feature-rich CLI REPL (built with typer and prompt-toolkit) that enables interactive agent interaction with command routing, history, autocomplete, and syntax highlighting. The CLI supports built-in commands (e.g., /memory, /tools, /config) for agent introspection and control, while regular text is routed to the agent for processing. The REPL maintains conversation history and integrates with the agent's session management, allowing users to interact with the agent from the terminal.
Unique: Implements a feature-rich REPL with command routing (built-in commands like /memory, /tools) and prompt-toolkit integration for history and autocomplete, rather than a simple input/output loop. Built-in commands provide agent introspection without leaving the REPL.
vs alternatives: More user-friendly than raw Python REPL because it provides syntax highlighting, history, and built-in commands for agent introspection without requiring knowledge of the agent's internal API.
docker containerization and multi-instance deployment
Nanobot supports Docker containerization via a Dockerfile that packages the agent with all dependencies, enabling consistent deployment across environments. The system supports multi-instance deployment where multiple agent instances can run concurrently (e.g., in Kubernetes), each with its own configuration and session state. The message bus and channel layer coordinate across instances, and external storage (database, Redis) can be used for shared state (sessions, memory, configuration).
Unique: Provides Docker support with multi-instance deployment patterns that coordinate via external state stores, rather than requiring a single monolithic deployment. Each instance is stateless and can be scaled independently.
vs alternatives: More scalable than single-instance deployments (like some chatbot frameworks) because multiple instances can run concurrently and share state via external stores, enabling horizontal scaling.
security and sandboxing with path validation and command whitelisting
Nanobot implements security controls at the tool layer: file operations are restricted to configured directories via path validation, shell commands can be whitelisted to prevent arbitrary execution, and network requests can be filtered by URL patterns. The security layer validates all tool inputs before execution and logs security events for audit trails. Network security includes configurable headers, timeout limits, and SSL verification to prevent SSRF and other attacks.
Unique: Implements security controls at the tool layer with explicit path validation, command whitelisting, and URL filtering, rather than relying on OS-level sandboxing. Security events are logged for audit trails.
vs alternatives: More transparent than OS-level sandboxing (like containers or VMs) because security rules are explicit and configurable, making it easier to understand what agents can and cannot do.
subagent orchestration and multi-agent communication
Nanobot supports creating subagents that can be spawned by parent agents to handle specialized tasks. Subagents are configured similarly to parent agents (with their own LLM provider, tools, memory) and communicate with parent agents via the message bus. Parent agents can delegate tasks to subagents, wait for results, and incorporate subagent responses into their own reasoning. This enables hierarchical agent structures where complex tasks are decomposed across multiple specialized agents.
Unique: Implements subagent orchestration via the message bus, allowing parent agents to spawn and communicate with subagents without explicit process management. Subagents are configured similarly to parent agents, enabling code reuse.
vs alternatives: More flexible than monolithic agents because tasks can be decomposed across specialized subagents, reducing complexity and enabling better separation of concerns.
agent loop with configurable tool iteration limits and context building
The AgentLoop orchestrates the core agent execution cycle: it receives a user message, builds context from memory and session history, sends a prompt to the LLM, parses tool calls from the response, executes tools, and loops until the agent decides to respond or hits a configurable iteration limit (default 200 iterations). Context building dynamically incorporates session history, memory consolidation results, and available tool schemas, with each iteration step tracked for debugging and memory consolidation.
Unique: Implements a configurable iteration loop with explicit context building stages (session history, memory consolidation, tool schema injection) rather than relying on implicit LLM context management. Tracks each iteration for debugging and feeds results back into memory consolidation.
vs alternatives: More transparent than LangChain's agent executors because iteration steps are explicit and configurable, making it easier to debug and tune agent behavior without black-box abstractions.
+7 more capabilities