Skip to content
AddHunt

Bub

Small plugin-based runtime for building AI agents

Open source

  • Open source
  • Licence: Apache-2.0

In short

Bub is an open-source Python agent runtime with a small core in which every stage of a turn can be replaced by a plugin. It is for developers who want a working agent out of the box but need control over prompting, model calls, memory and the channels the agent talks through.

What you get

  • Every turn stage exposed as a pluggy hook
  • Python plugins override defaults without forking
  • Context rebuilt from an append-only tape
  • Same pipeline for CLI, Telegram and custom channels
  • Swappable model provider through a hook
  • One-line install on macOS, Linux and Windows

The details

Bub ships as a working agent that can be reshaped piece by piece. Its core is deliberately small, and each stage of a conversation turn is exposed as a pluggy hook, so a Python plugin can override any stage without forking the project.

Turn pipeline

A turn moves through hooks that resolve the session, load state, build the prompt, call the model, render the reply, save state and dispatch it to the channel. The default behavior for each of these is itself just a plugin, and plugins registered later take priority over earlier ones. Plugins are discovered through Python entry points.

Tape-based context

Instead of accumulating session state, Bub rebuilds context from an append-only tape of immutable entries. Anchors mark phase boundaries, and corrections are added as new entries that supersede older ones rather than rewriting history.

Channels and operators

The same inbound pipeline serves the CLI, Telegram and any channel a developer adds. The CLI, chat, gateway and comma commands are all bundled as ordinary plugins. Humans and agents follow the same operator model, with shared boundaries and handoff rules, which the project presents as a basis for multi-agent collaboration.

Bub is released under Apache-2.0 and installs with a one-line script on macOS, Linux or Windows.

Alternatives to Bub

Questions

How do plugins change Bub's behavior?

Each stage of a turn is a hook. A plugin registered through Python entry points can implement any hook, and later plugins take precedence over earlier ones, including the built-in defaults.

Which channels does Bub support?

The CLI and Telegram work out of the box, and the same pipeline can drive other channels added through plugins.

What license is Bub under?

Bub is open source under the Apache-2.0 license.

More like this