Quick start
Since 0.6.0, Bub is split into two layers—core and app—so you can pick whichever path fits how you want to use it.
This page assumes you have already installed Bub.
Start from the CLI
Section titled “Start from the CLI”Open your terminal and walk through these steps on the command line:
-
(Optional) If you have never configured Bub before, run the setup wizard first:
Terminal window bub onboard -
Create a workspace directory anywhere, switch into it, and launch an interactive session with
bub chat:Terminal window mkdir hello-bub && cd hello-bubbub chat -
Now try copying and pasting the prompt below to start a conversation with Bub:
Terminal window Summarize the files in this directory
Press Ctrl+D or type ,quit whenever you want to leave the interactive session.
Run with the SDK
Section titled “Run with the SDK”If you want to embed an Agent in your own Python project, start with the core SDK:
-
Create a new project and install
bub:Terminal window uv init --python 3.12 my-agent && cd my-agentuv add bub -
Save the following code as
main.py:main.py import asyncioimport republicfrom bub.core import Agentasync def main() -> None:agent = Agent(system_prompt="Be concise.")async with republic.get_model("openai:gpt-5-mini") as model:async with agent.run("What can you do?", model=model, tape="demo") as stream:async for event in stream:if event.kind == "text":print(event.data.get("delta", ""), end="")asyncio.run(main()) -
Run it with your API key:
Terminal window export REPUBLIC_OPENAI_API_KEY=sk-...uv run python main.py
Next steps
Section titled “Next steps”Congrats — you now know the basics of Bub! Pick a path below to explore further:
And of course, if you are curious, keep reading to see the design ideas behind Bub.