Metadata-Version: 2.4
Name: agentbyte
Version: 0.2.4
Summary: A toolkit for designing multiagent systems
Project-URL: Homepage, https://gitlab.com/pyninja/aiengineering/agentbyte
Project-URL: Repository, https://gitlab.com/pyninja/aiengineering/agentbyte
Project-URL: Issues, https://gitlab.com/pyninja/aiengineering/agentbyte/-/issues
Project-URL: Changelog, https://gitlab.com/pyninja/aiengineering/agentbyte/-/blob/main/CHANGELOG.md
Author-email: MrDataPsycho <mr.data.psycho@gmail.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: pydantic-settings>=2.13.0
Requires-Dist: pydantic>=2.12.5
Provides-Extra: all
Requires-Dist: azure-identity>=1.25.1; extra == 'all'
Requires-Dist: openai>=1.107.1; extra == 'all'
Requires-Dist: opentelemetry-api>=1.39.1; extra == 'all'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.39.1; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.39.1; extra == 'all'
Provides-Extra: azureopenai
Requires-Dist: azure-identity>=1.25.1; extra == 'azureopenai'
Requires-Dist: openai>=1.107.1; extra == 'azureopenai'
Provides-Extra: openai
Requires-Dist: openai>=1.107.1; extra == 'openai'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.39.1; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.39.1; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.39.1; extra == 'otel'
Description-Content-Type: text/markdown

  Agentbyte

# Agentbyte

Agentbyte is a Python toolkit for building and studying multiagent systems with a learning-first, implementation-oriented workflow.

Current release: **0.2.1**

Repository: [gitlab.com/pyninja/aiengineering/agentbyte](https://gitlab.com/pyninja/aiengineering/agentbyte)

## What’s New in 0.2.1

- Added explicit project URLs in package metadata (Homepage, Repository, Issues, Changelog).
- Added MIT `LICENSE` file at repository root.
- Expanded README install guidance for extras using `pip install` and `uv add`.

See [CHANGELOG.md](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.

## Installation

```bash
uv sync --all-groups
```

Optional extras:

```bash
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:

```bash
pip install "agentbyte[azureopenai,otel]"
```

```bash
uv add "agentbyte[azureopenai,otel]"
```

Install all optional features:

```bash
pip install "agentbyte[all]"
# or
uv add "agentbyte[all]"
```

Note: the Azure extra is `azureopenai`.

## Quick Start

```python
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

```bash
uv run ruff check src tests
uv run pytest tests -v
```

## License

MIT — see [LICENSE](LICENSE).

## References

- [Designing Multi-Agent Systems](https://github.com/victordibia/designing-multiagent-systems/tree/main)
- [Microsoft Agent Framework](https://github.com/microsoft/agent-framework)
- [Pydantic AI](https://ai.pydantic.dev/)

