Agent Instrumentation
Automatic OpenTelemetry instrumentation for Python agents using the Traceloop SDK, with trace visibility.
Overview
agent-instrumentation enables zero-code instrumentation for Python agents, automatically capturing traces for LLM calls, API requests, and other operations. It seamlessly wraps your agent’s execution with OpenTelemetry tracing powered by the Traceloop SDK.
Features
- Zero Code Changes: Instrument existing applications without modifying code
- Automatic Tracing: Traces LLM calls, HTTP requests, database queries, and more
- OpenTelemetry Compatible: Uses industry-standard OpenTelemetry protocol
- Flexible Configuration: Configure via environment variables
- Framework Agnostic: Works with any Python application or framework
Installation
pip install -i agent-instrumentation
Quick Start
1. Set Required Environment Variables
export AMP_APP_NAME="my-application"
export AMP_OTEL_EXPORTER_OTLP_ENDPOINT="https://your-otel-endpoint.com"
export AMP_API_KEY="your-api-key"
2. Run Your Application
Use the agent-trace command to wrap your application:
# Run a Python script
agent-trace python my_script.py
# Run with uvicorn
agent-trace uvicorn app:main --reload
# Run with any package manager
agent-trace poetry run python script.py
agent-trace uv run python script.py
That's it! Your application is now instrumented and sending traces to your configured endpoint.
Metadata
Release files for agent-instrumentation 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_instrumentation-1.0.1.tar.gz | 11.2 kB | Without provenance | Details for agent_instrumentation-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_instrumentation-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for agent_instrumentation-1.0.1-py3-none-any.whl |
Total release size: 21.7 kB
Release files / agent_instrumentation-1.0.1.tar.gz
| Download URL | agent_instrumentation-1.0.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0c1f199d5e0756965a960b7efdaa53aba6eacff81b2a0be6edf885b3c4b1cc4
|
|
BLAKE2b-256 checksum How to use checksums |
9599b677e562dd329ba5264b8141b861c83ebca4d2905b175dda0b074e843d5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / agent_instrumentation-1.0.1-py3-none-any.whl
| Download URL | agent_instrumentation-1.0.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c23b4c67766ee69a8feefd6f643e26b3ca79e51d7e007a8a560bbb2eee88d090
|
|
BLAKE2b-256 checksum How to use checksums |
e5c318b65cdd5815dd61d74bbf86bb84f9711d0341be295b71a7829f6c0cc6fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for agent-instrumentation 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.