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 RebunoClient

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

# Create an execution
result = client.create_execution(agent_id="my-agent", input={"task": "hello"})
print(result["execution_id"])

Building an Agent

from rebuno.agent import BaseAgent

class MyAgent(BaseAgent):
    def process(self, ctx):
        result = ctx.invoke_tool("web.search", {"query": "hello"})
        return {"answer": result}

agent = MyAgent(
    agent_id="my-agent",
    kernel_url="http://localhost:8080",
)
agent.run()

Building a Runner

from rebuno.runner import BaseRunner

class MyRunner(BaseRunner):
    def execute(self, tool_id, arguments):
        if tool_id == "web.search":
            return {"results": ["..."]}
        raise ValueError(f"Unknown tool: {tool_id}")

runner = MyRunner(
    runner_id="my-runner",
    kernel_url="http://localhost:8080",
    capabilities=["web.search"],
)
runner.run()

MCP Support

Connect to MCP servers to expose their tools through the kernel:

pip install rebuno[mcp]
import asyncio
from rebuno import AsyncBaseRunner

runner = AsyncBaseRunner(
    runner_id="mcp-tools",
    kernel_url="http://localhost:8080",
)
runner.mcp_server(
    "filesystem",
    command="npx",
    args=["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
)
asyncio.run(runner.run())

Agents can also use MCP tools as local tools:

agent.mcp_server("filesystem", command="npx", args=["-y", "@modelcontextprotocol/server-filesystem", "/tmp"])

See the full documentation for details on partial failure tolerance, config-based setup, and runner MCP routing.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

rebuno-0.1.2-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rebuno-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for rebuno-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1615a88c72f83a7e576f16292a9ed3dbfcd6f7577717f102730297538559bcdb
MD5 0060c6ea2973c9919d0d08d0bb958958
BLAKE2b-256 b8db33dec77e8ed419bd19a10ffa2bf0e855784c83eef36ff3229787b1c5dc7a

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