Bub

A common shape for agents that live alongside people.

Bub started in group chats. Not as a demo or a personal assistant, but as a teammate that had to coexist with real humans and other agents in the same messy conversations — concurrent tasks, incomplete context, and nobody waiting.

It is hook-first, built on pluggy, with a small core (~200 lines) and builtins that are just default plugins you can replace. Context comes from tape via Republic, not session accumulation. The same pipeline runs across CLI, Telegram, and any channel you add.

Quick Start

pip install bub

Or from source:

git clone https://github.com/bubbuild/bub.git
cd bub
uv sync
cp env.example .env
uv run bub chat                         # interactive session
uv run bub run "summarize this repo"    # one-shot task
uv run bub gateway                      # channel listener mode

How It Works

Every inbound message goes through one turn pipeline. Each stage is a hook.

resolve_session → load_state → build_prompt → run_model
              dispatch_outbound ← render_outbound ← save_state

Builtins are plugins registered first. Later plugins override earlier ones. No special cases.