bubbuild/bub
Bub it. Build it. A hook-first runtime for agents that live alongside people.
What it solves
Bub is a Python runtime designed for building AI agents that operate in shared environments, such as group chats, where humans and agents must collaborate without hidden state or complex framework-specific magic. It provides a consistent way to run agents across different interfaces (CLI, Telegram, and custom channels) while maintaining a transparent, auditable history of interactions.
How it works
Bub uses a "hook-first" architecture where every stage of an agent's turn—from session resolution and state loading to model execution and outbound message rendering—is a pluggable hook. This allows developers to override specific stages of the logic without forking the runtime. Instead of carrying mutable session state, Bub uses a "tape context," where context is rebuilt from append-only records to ensure interactions are easier to inspect and replay.
Who it’s for
It is intended for developers building collaborative AI agents that need to be highly extensible via plugins and must operate across multiple communication channels.
Highlights
- Hook-based extensibility: Every turn stage is a pluggy hook, making it easy to replace or modify the runtime flow.
- Tape context: Uses append-only records for context rather than mutable state, improving auditability and replayability.
- Unified runtime: The same inbound pipeline works across CLI, Telegram, and custom channels.
- Operator equivalence: Treats humans and agents as equals within the same runtime boundaries and evidence trail.
- Batteries included: Ships with built-in tools, skills, and model execution capabilities.