Skip to main content

A toolkit for designing multiagent systems

Project description

Agentbyte

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.3.2

Repository: gitlab.com/pyninja/aiengineering/agentbyte

What's New in 0.3.2

  • Python baseline lowered: package runtime requirement is now Python 3.11+.
  • CI release pipeline now builds/tests/publishes with Python 3.11.

What's New in 0.3.1

  • Interactive CLI wizard: running agentbyte with no arguments launches a guided numbered menu — choose a command, then choose a provider (github-copilot / claude), then confirm before any files are written.
  • Non-interactive path (agentbyte create-skills --provider=github-copilot) is fully preserved for scripting and CI.

What's New in 0.3.0

  • Breaking: BaseAgent no longer stores context. self.context, reset_context(), clear_messages(), window_messages(), and reset() are removed. Agent.__init__ no longer accepts a context= kwarg.
  • Agent.run(task=None, context=None, ...) and Agent.run_stream(task=None, context=None, ...) accept a per-call AgentContext. A fresh context is created automatically when None.
  • AgentResponse.context returns the fully-populated working context to the caller — enables clean multi-turn patterns without agent-side state.
  • AgentAsTool.execute() and execute_stream() thread the caller-supplied context through to the underlying agent.
  • Notebooks, study docs (topic_agents.md, topic_approval.md), and OTel span guide (topic_otel_spans.md) updated to the caller-owned context pattern.

See CHANGELOG.md for the complete release history.

Current Capabilities

  • Agent execution loop with run() and run_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.

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_tokens
  • gen_ai.usage.cost_estimate_usd
  • gen_ai.response.finish_reason
  • gen_ai.request.model
  • gen_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-mini spans 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

Install in another project (pip / uv add)

Use extras to enable provider + telemetry support:

pip install "agentbyte[azureopenai,otel]"
uv add "agentbyte[azureopenai,otel]"

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()],
)

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


Download files

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

Source Distribution

agentbyte-0.3.4.tar.gz (151.5 kB view details)

Uploaded Source

Built Distribution

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

agentbyte-0.3.4-py3-none-any.whl (147.0 kB view details)

Uploaded Python 3

File details

Details for the file agentbyte-0.3.4.tar.gz.

File metadata

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

Hashes for agentbyte-0.3.4.tar.gz
Algorithm Hash digest
SHA256 e84668fa3c1bdbd1814aa509c7544eebc58b3babc9ffd0161110cd80e188a683
MD5 9a78ad9fef62788371b9d8851675b772
BLAKE2b-256 40eb641c5c73243363192242d9dfcac0c765865a9e7f6f64148ab3e44a4cbf96

See more details on using hashes here.

File details

Details for the file agentbyte-0.3.4-py3-none-any.whl.

File metadata

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

Hashes for agentbyte-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 14138c2ebcb6e730c54a0696c825b0f99961e95eba11455a33666479a735bea8
MD5 06fc09290942deb7aefa11884f8ab0e5
BLAKE2b-256 15d3355fa6927c1c2b8a01c02c6f1b9d0159ada47ac8e7807fcf437843781185

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