Rebuno Python SDK
Durable execution for agents, on any framework. Rebuno gives your agent crash-safe, resumable runs without changing how you build it: write a normal async handler, wrap the side effects you want recorded, and the kernel takes care of retries, replay, and human-in-the-loop approvals.
The SDK is built around three primitives:
@rebuno.tool— mark an async function as a durable tool callrebuno.Agent(agent_id).run(process)— receive webhook dispatches from the kernel and run your handler per executionrebuno.step()— record non-deterministic local work (time, randomness, ids) so it replays identically
The SDK is async-only.
Installation
pip install rebuno
Quick start (create an execution)
from rebuno import Client
client = Client(base_url="http://localhost:8080")
execution = await client.create("dev-agent", input={"prompt": "hello"})
print(execution.id)
Client falls back to the REBUNO_URL and REBUNO_API_KEY environment variables
when base_url / api_key are omitted.
Building an agent
from rebuno import Agent, tool
@tool
async def search(query: str) -> list[str]:
return [f"result for {query}"]
async def process(prompt: str) -> dict:
hits = await search(prompt)
return {"answer": hits}
agent = Agent("dev-agent", secret="dev-secret", kernel_url="http://localhost:8080")
agent.run(process, port=5000)
The handler's signature is the input schema: process(prompt: str) makes prompt
a required input field. A single pydantic.BaseModel parameter gets validated input;
a single input: dict (or input: Any) parameter receives the raw input unchanged.
agent.run(...) binds process and serves the webhook endpoint with uvicorn
(this call blocks). The kernel calls that webhook to dispatch each execution; the
agent runs process and records every tool call durably, so crashes and pending
approvals resume transparently on the next dispatch — your handler code doesn't need
to know the difference.
If you want to mount the agent into an existing service, or serve it with your own
uvicorn/gunicorn process, use agent.app (a FastAPI app) instead of agent.run(...).
Tools
from rebuno import tool
@tool
async def search(query: str, limit: int = 10) -> list[str]:
...
Tools are plain async functions — hand them to your framework as a list:
agent = create_agent(llm, [search, ...])
Use @tool("custom_id") to set an explicit tool id, and
@tool(idempotency="at_most_once") for destructive operations that must not be
retried automatically (e.g. sending an email or charging a card).
If a tool does blocking or CPU-bound work, offload it so it doesn't block the event loop:
@tool
async def render(doc: str) -> bytes:
return await asyncio.to_thread(render_sync, doc)
Durable local work — rebuno.step()
Wrap non-deterministic local computation — the current time, random choices, fresh ids — so its result is recorded once and replays identically on resume:
from rebuno import step
chosen = await step("pick_winner", random.choice, args={"candidates": candidates})
Human-in-the-loop / approvals
Approvals are inspected and resolved through Client:
pending = await client.list_approvals()
await client.grant_approval(pending[0].id, decided_by="alice")
License
MIT
Metadata
Release files for rebuno 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rebuno-0.5.0.tar.gz | 69.3 kB | Without provenance | Details for rebuno-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rebuno-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for rebuno-0.5.0-py3-none-any.whl |
Total release size: 92.5 kB
Release files / rebuno-0.5.0.tar.gz
| Download URL | rebuno-0.5.0.tar.gz |
|---|---|
| Size | 69.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a3ebe5cc533acd2a52cbb2cb9f083443bd170c56a4711589209b8ee8517cb29
|
|
BLAKE2b-256 checksum How to use checksums |
008673117d4d19fbc43b011c24b7ccc419a2a2a18cd923786cdc0c8a4a862016
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / rebuno-0.5.0-py3-none-any.whl
| Download URL | rebuno-0.5.0-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
687bfc5ac68280b5dd670540154fadfa33e121a7395e6d8b71bb126efeb851cd
|
|
BLAKE2b-256 checksum How to use checksums |
822ffb2579f005c628022e65797f1c6edef590b2b1398d96b95dab2f9b650d27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for rebuno 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.