A toolkit for designing multiagent systems
Project description
Agentbyte
Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
Current release: 0.10.0 — see CHANGELOG.md for the full release history.
Repository: gitlab.com/pyninja/aiengineering/agentbyte
Current Capabilities
- Agent execution loop with
run()andrun_stream()APIs. - Tooling system (function tools + core tools + memory tool).
- Middleware chain for request/response/error handling.
- Built-in middleware: logging, security, rate limiting, approval, telemetry.
- Memory abstractions: list memory, file memory, context injection.
- OpenAI and Azure OpenAI model client support.
- OpenTelemetry-first tracing with model-call and task-level usage telemetry.
- Multi-agent orchestration:
RoundRobinOrchestrator,AIOrchestrator,HandoffOrchestrator,PlanBasedOrchestratorwith composable termination conditions. - Workflow runtime: typed step graphs (
FunctionStep,EchoStep,HttpStep,TransformStep,AgentStep,SubWorkflowStep) with conditional routing, parallel execution, checkpoint/resume, human-in-the-loop suspend/resume, staged state semantics, structured streaming events, and declarative JSON/YAML schema serialisation.
Observability-First Telemetry
Agentbyte exposes two complementary telemetry layers:
- Per-call middleware spans (
chat ...,tool ...) for model/tool-level diagnostics. - Task-level root span attributes (
agent ...) for final aggregated usage and outcome.
Enable telemetry:
export AGENTBYTE_ENABLE_OTEL=true
Per-call span attributes emitted by OTelMiddleware:
gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,gen_ai.usage.total_tokensgen_ai.usage.cost_estimate_usdgen_ai.response.finish_reasongen_ai.request.modelgen_ai.tool.name,gen_ai.tool.success
Degugging Traces without UI
details can be found in the OTel spans guide.
Practical interpretation:
chat gpt-4.1-minispans show per-call usage/cost/finish reason.agent <name>span shows final accumulated usage and final task outcome.
Installation
Python requirement: 3.11+
uv sync --all-groups
Optional extras:
uv sync --extra openai
uv sync --extra azureopenai
uv sync --extra otel
uv sync --extra webui
Install in another project (pip / uv add)
Use extras to enable provider + telemetry support:
pip install "agentbyte[azureopenai,otel]"
uv add "agentbyte[azureopenai,otel]"
For the browser WebUI:
pip install "agentbyte[webui]"
# or
uv add "agentbyte[webui]"
Install all optional features:
pip install "agentbyte[all]"
# or
uv add "agentbyte[all]"
Note: the Azure extra is azureopenai.
Quick Start
from agentbyte.agents import Agent
from agentbyte.middleware import LoggingMiddleware
# model_client = OpenAIChatCompletionClient(...) or AzureOpenAIChatCompletionClient(...)
def quick_faq_lookup(topic: str) -> str:
faq = {
"middleware": "Middleware handles cross-cutting runtime concerns.",
"memory": "Memory helps agents keep useful context across interactions.",
}
return faq.get(topic.lower(), "No FAQ found.")
agent = Agent(
name="helpful-assistant",
description="Helpful assistant with middleware",
instructions="Answer clearly and use tools when needed.",
model_client=model_client,
tools=[quick_faq_lookup],
middlewares=[LoggingMiddleware()],
)
Run The WebUI
Option 1: Run the preset-backed app
This is the easiest way to see the WebUI working end to end with real preset entities:
- preset agents
- preset orchestrators
- preset workflow
Step 1. Install the WebUI extra:
uv sync --extra webui
Step 2. Start the preset-backed app:
uv run python examples/webui/presets_webui.py
Step 3. Open the browser:
http://127.0.0.1:8080
If auto-open is enabled in your environment, the browser may open automatically.
Option 2: Run the WebUI against your current project directory
Use this when you want Agentbyte to scan a directory for exported agent, workflow, or orchestrator objects.
Important: discovery is convention-based. The scanned directory must contain Python modules that expose top-level variables literally named agent, workflow, or orchestrator. If you point --dir at a folder that does not export those names, the UI will load but show No entities found.
Step 1. Install the WebUI extra:
uv sync --extra webui
Step 2. Launch the WebUI and scan the current directory:
uv run agentbyte webui --dir .
Step 3. Open the browser:
http://127.0.0.1:8080
Useful variants:
uv run agentbyte webui --dir . --port 8080 --host 127.0.0.1 --no-open
uv run agentbyte webui --dir examples --port 8090
For this repository, the most reliable first-run path is the preset-backed launcher:
uv run python examples/webui/presets_webui.py
Use agentbyte webui --dir ... when you have a directory of exportable demo modules, for example:
# my_entities.py
agent = ...
workflow = ...
orchestrator = ...
Option 3: Run it programmatically
Use this when you want to serve in-memory entities directly from Python.
from agentbyte.webui import serve
serve(entities=[agent], port=8080, auto_open=True)
Quick Troubleshooting
If the app does not start:
uv sync --extra webui
If port 8080 is already in use:
uv run agentbyte webui --dir . --port 8090
If you do not want the browser to open automatically:
uv run agentbyte webui --dir . --no-open
Project Layout
src/agentbyte/
agents/
llm/
memory/
middleware/
tools/
messages.py
context.py
types.py
Development
uv run ruff check src tests
uv run pytest tests -v
License
MIT — see LICENSE.
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentbyte-0.10.0.tar.gz.
File metadata
- Download URL: agentbyte-0.10.0.tar.gz
- Upload date:
- Size: 644.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c79478f0952e4569e68e3b8a33dcb15aed7313daff7b24ac6859a119ac9ff25a
|
|
| MD5 |
b985da6b39939cc92a913bd58182cbf6
|
|
| BLAKE2b-256 |
912fa21598a62b95f1e1d641e1e76326d4f7464491f4ca8a82e957a6f0772d05
|
File details
Details for the file agentbyte-0.10.0-py3-none-any.whl.
File metadata
- Download URL: agentbyte-0.10.0-py3-none-any.whl
- Upload date:
- Size: 650.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c94bb6ec474a5820bd2e9d1cba255c9e498f9f8f3e3a8ec8db403e284c8f0b3
|
|
| MD5 |
aafc58e747511b3732251ba640240dd8
|
|
| BLAKE2b-256 |
58f23a371b9a8eb5d97a90c877aec5c24436e834c76679739db0e7b427b5fe74
|