Metadata-Version: 2.5
Name: evolv-agents
Version: 0.1.0
Summary: e-volv Observer for Agents SDK for Python: agent runs, model calls and tool calls as spans the Observer rollup reads, with OpenAI, Anthropic and MCP wrappers.
Project-URL: Homepage, https://e-volv.io/observer/agents
Project-URL: Documentation, https://e-volv.io/docs/logs
Project-URL: Support, https://e-volv.io/support
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: e-volv-logs>=0.2.2
Description-Content-Type: text/markdown

# evolv-agents

Agent runs as e-volv Observer reads them. Every model call, tool call and
agent run becomes a span with the OpenTelemetry GenAI attributes, sent through
the `e-volv-logs` SDK you already have, so Observer's Agents pages show each
run with its tokens, cost, session and prompt version.

```bash
pip install evolv-agents
```

```python
import evolv_agents as agents
from openai import OpenAI

agents.init(key=os.environ["EVOLVE_LOGS_KEY"],
            url="https://api.e-volv.io/api/public/v1/logs", service="support-bot")
client = agents.instrument_openai(OpenAI())

with agents.session(thread_id, user=user_id), agents.agent("triage"):
    res = client.chat.completions.create(model="gpt-5-mini", messages=messages)
    with agents.tool("read_ticket"):
        ticket = tickets.read(ticket_id)
```

## What it gives you

- `init(content=False, **e_volv_logs_options)`: `content=True` records
  prompts, completions, tool arguments and results (off by default).
- `agent(name, agent_id=, provider=, model=)`: the run, as a context manager.
- `chat(model, provider=)`: one model call; call `c.usage(input=, output=,
cache_read=, cache_write=, response_model=)` inside.
- `tool(name)`: one tool call.
- `session(session_id, user=)` and `prompt(name, version)`: tag every span
  inside.
- `instrument_openai(client)`, `instrument_anthropic(client)`: wrap the client
  in place; chat completions, the Responses API and messages, streams included.
- `trace_mcp(session, server_name)`: every `call_tool` is a tool span.

Already on OpenTelemetry? You do not need this package: point your exporter at
`https://api.e-volv.io/api/public/v1/logs/otlp/v1/traces` with the ingest key
as `Authorization` and Observer reads the GenAI spans directly.
