Core layer
Composable agent kernel providing the loop, tools, context (Tape), event bus, and model client.
Bub is a lightweight agent runtime written in Python. It ships with a ready-to-use CLI app and a composable SDK, so you can run it out of the box or embed agent capabilities in your own programs.
An agent is at heart a loop: the model reads the context and decides which tool to call, the tool result goes back into the context, and the model reads it again. The loop ends when the model stops asking for tools and answers directly.
So an agent rests on four core parts: a model, tools, a context, and the loop that drives them. Working from that idea, Bub keeps a small core and builds a ready-to-run application around it:
Core layer
Composable agent kernel providing the loop, tools, context (Tape), event bus, and model client.
App layer
Application harness on top of the core, providing configuration, plugins, hooks, skills, channels, and a gateway.
Which one should you use?
Bub is built around simplicity, composability, and extensibility—you can combine its parts as needed or build your own agent on top of it:
Append-only context
Conversation history is appended to the Tape without mutating existing entries.
Event-driven
Every model and tool call emits events so you can observe, modify arguments, or intercept execution.
Tools are functions
Define tools as standard Python functions and use any library in the Python ecosystem.
Pluggable
Extend tools, event listeners, message channels, and skills through plugins.
Now you can explore the docs freely, or head to the next page to start your journey with Bub.