Metadata-Version: 2.4
Name: agentlog-ai
Version: 0.1.0a1
Summary: OpenTelemetry-native observability for multi-agent LLM systems
Project-URL: Homepage, https://github.com/Medhaj-ops/agentlog
Project-URL: Repository, https://github.com/Medhaj-ops/agentlog
Project-URL: Issues, https://github.com/Medhaj-ops/agentlog/issues
Author-email: Medhaj <114381637+Medhaj-ops@users.noreply.github.com>
License-Expression: Apache-2.0
Keywords: agents,llm,multi-agent,observability,opentelemetry,tracing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.10
Requires-Dist: opentelemetry-api>=1.27.0
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.27.0
Requires-Dist: opentelemetry-sdk>=1.27.0
Requires-Dist: opentelemetry-semantic-conventions>=0.48b0
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.34.0; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Provides-Extra: litellm
Requires-Dist: litellm>=1.40.0; extra == 'litellm'
Provides-Extra: openai
Requires-Dist: openai>=1.50.0; extra == 'openai'
Description-Content-Type: text/markdown

# agentlog

OpenTelemetry-native observability for multi-agent LLM systems.

## Install

```bash
pip install agentlog[openai]     # for OpenAI
pip install agentlog[litellm]    # for LiteLLM (covers Bedrock, Anthropic, Gemini)
```

## Quick Start

```python
import agentlog
agentlog.init()  # patches LLM clients, exports spans to collector at localhost:4317

import openai
client = openai.OpenAI()
response = client.chat.completions.create(model="gpt-4o", messages=[...])
# ^ this call is now automatically traced
```

## Multi-Agent Tracing

```python
@agentlog.agent(name="supervisor")
def supervisor(input):
    # all LLM calls here are grouped under "supervisor"
    ...

@agentlog.agent(name="researcher")
def researcher(query):
    # all LLM calls here are grouped under "researcher"
    ...
```

## What Gets Captured

Every LLM call emits a span with:
- Full prompt (messages array)
- Full response (content + tool calls)
- Model name (requested and resolved)
- Token counts (input + output)
- Finish reason
- Timing and parent-child relationships

## Infrastructure

The SDK sends spans to an OpenTelemetry Collector. Deploy the full stack (collector + ClickHouse + trace viewer UI) via the Helm chart:

```bash
helm install agentlog oci://ghcr.io/medhaj-ops/agentlog/chart
```

Or run locally with Docker Compose:

```bash
git clone https://github.com/Medhaj-ops/agentlog && cd agentlog
docker compose up -d
```

## Links

- [GitHub](https://github.com/Medhaj-ops/agentlog)
- [Documentation](https://github.com/Medhaj-ops/agentlog/tree/main/docs)

## License

Apache 2.0
