Skip to main content

Python SDK for the Rebuno execution runtime

Project description

Rebuno Python SDK

Python client library for the Rebuno agent execution runtime.

Installation

pip install rebuno

Quick Start

from rebuno import Client

client = Client(base_url="http://localhost:8080")

execution = await client.create("my-agent", input={"prompt": "hello"})
print(execution.id)

Client defaults to REBUNO_URL and REBUNO_API_KEY env vars when no args are passed.

Building an Agent

from rebuno import Agent, execution

agent = Agent("my-agent")

async def process(prompt: str) -> dict:
    print("running execution", execution.id)
    return {"answer": prompt.upper()}

agent.run(process)

The handler signature is the input schema — process(prompt: str) makes prompt a required field. Pass a pydantic.BaseModel parameter for validation, or input: dict for the raw claim. Use from rebuno import execution to access the current execution's id, session_id, history, etc.

Tools

from rebuno import tool

@tool("web_search")
async def search(query: str, limit: int = 10) -> list[str]:
    return [...]

Tools are plain module-level functions. The wrapper submits an intent to the kernel before running the body. Hand them to your framework as a list:

graph = create_agent(llm, [search, ...])

Building a Runner

from rebuno import Runner, tool

@tool("compute_heavy")
async def heavy(data: str) -> str:
    return process(data)

Runner("compute-1").run()

The runner advertises every @tool it imports, publishes their schemas to the kernel, and services job assignments. @tool(remote=True) lets you declare a stub in agent code for type-checked imperative calls.

Local MCP

The agent connects to the MCP server directly. Install with pip install rebuno[mcp]:

from rebuno import MCPServer

github = MCPServer(
    "github",
    url="https://api.githubcopilot.com/mcp/",
    headers={"Authorization": "Bearer xxx"},
)

# Inside your handler:
graph = create_agent(llm, [..., *github.tools])

Remote tools (incl. remote MCP)

Discover tools that runners host elsewhere — the agent never holds credentials, never opens MCP transport. Schemas come from the kernel directory.

from rebuno import remote

github_tools  = remote.Tools("github")
compute_tools = remote.Tools("compute")

# Inside your handler:
graph = create_agent(llm, [..., *github_tools, *compute_tools])
# or cherry-pick by short name:
graph = create_agent(llm, [..., github_tools["create_pr"], compute_tools["heavy"]])

Each call routes through the kernel to whichever runner advertises that tool ID. Works for any source — @tool Python functions on a runner, MCP servers hosted by a runner, or both.

Documentation

See the full documentation.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rebuno-0.4.8.tar.gz (117.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rebuno-0.4.8-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file rebuno-0.4.8.tar.gz.

File metadata

  • Download URL: rebuno-0.4.8.tar.gz
  • Upload date:
  • Size: 117.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for rebuno-0.4.8.tar.gz
Algorithm Hash digest
SHA256 34038f57e91646412522c65ce14fe0942d02eb40dca6fcbb68320e8f6eb8725f
MD5 4c21d0183b91390efff89ed89acbfbf8
BLAKE2b-256 f9de6c81511c1e00011801571dbae0bd1320820eddc35f37e0a2a7de800fdd6c

See more details on using hashes here.

File details

Details for the file rebuno-0.4.8-py3-none-any.whl.

File metadata

  • Download URL: rebuno-0.4.8-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for rebuno-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a83b25e1a26d1169e532cc5955f6d184b88d481d3c2e7d28056f6677db9b2a76
MD5 935f83619b1382a32978a8edf3f719e0
BLAKE2b-256 e6911b637b8a9c415df9787462dbe470a6f153c829ef17c8b10e9b121b65e650

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page