|
5 | 5 | [](https://pypi.org/project/value-python/) |
6 | 6 | [](https://opensource.org/licenses/MIT) |
7 | 7 |
|
8 | | -OpenTelemetry-based Python SDK for AI agent observability and control. |
| 8 | +Python SDK to track AI agents with Value actions and auto-instrument LLM calls (Gemini, LangChain). |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- **Value Actions**: Track agent behavior using `action_context` with `user_id` and `anonymous_id`, send custom actions via `ctx.send()` |
| 13 | +- **Auto-Instrumentation**: Automatically capture LLM calls from Gemini and LangChain with zero code changes |
| 14 | +- **OpenTelemetry-Based**: Built on OpenTelemetry for standardized, vendor-neutral observability |
9 | 15 |
|
10 | 16 | ## Installation |
11 | 17 |
|
@@ -69,7 +75,7 @@ async def main(): |
69 | 75 | print(f"Processing data: {data}") |
70 | 76 | await asyncio.sleep(0.5) |
71 | 77 | result = data.upper() |
72 | | - |
| 78 | + |
73 | 79 | with client.action_context(user_id="user123", anonymous_id="anon456") as ctx: |
74 | 80 | ctx.send( |
75 | 81 | action_name="transform_data", |
@@ -136,20 +142,20 @@ print(response.text) |
136 | 142 |
|
137 | 143 | Configure the SDK using environment variables: |
138 | 144 |
|
139 | | -| Variable | Description | Default | |
140 | | -|----------|-------------|---------| |
141 | | -| `VALUE_AGENT_SECRET` | Agent authentication secret | Required | |
142 | | -| `VALUE_OTEL_ENDPOINT` | OpenTelemetry collector endpoint | `http://localhost:4317` | |
143 | | -| `VALUE_BACKEND_URL` | Value Control Plane backend URL | Required | |
144 | | -| `VALUE_SERVICE_NAME` | Service name for OpenTelemetry resource | `value-control-agent` | |
145 | | -| `VALUE_CONSOLE_EXPORT` | Enable console span exporter for debugging | `false` | |
| 145 | +| Variable | Description | Default | |
| 146 | +| ---------------------- | ------------------------------------------ | ----------------------- | |
| 147 | +| `VALUE_AGENT_SECRET` | Agent authentication secret | Required | |
| 148 | +| `VALUE_OTEL_ENDPOINT` | OpenTelemetry collector endpoint | `http://localhost:4317` | |
| 149 | +| `VALUE_BACKEND_URL` | Value Control Plane backend URL | Required | |
| 150 | +| `VALUE_SERVICE_NAME` | Service name for OpenTelemetry resource | `value-control-agent` | |
| 151 | +| `VALUE_CONSOLE_EXPORT` | Enable console span exporter for debugging | `false` | |
146 | 152 |
|
147 | 153 | ## Supported Auto-Instrumentation Libraries |
148 | 154 |
|
149 | | -| Library | Extra | Instrumentor | |
150 | | -|---------|-------|--------------| |
151 | | -| Google Generative AI (Gemini) | `genai` | `opentelemetry-instrumentation-google-generativeai` | |
152 | | -| LangChain | `langchain` | `opentelemetry-instrumentation-langchain` | |
| 155 | +| Library | Extra | Instrumentor | |
| 156 | +| ----------------------------- | ----------- | --------------------------------------------------- | |
| 157 | +| Google Generative AI (Gemini) | `genai` | `opentelemetry-instrumentation-google-generativeai` | |
| 158 | +| LangChain | `langchain` | `opentelemetry-instrumentation-langchain` | |
153 | 159 |
|
154 | 160 | ## API Reference |
155 | 161 |
|
|
0 commit comments