Skip to main content

Automatic instrumentation for Python agent applications, monitored via WSO2 Agent Management Platform

Project description

WSO2 AI Agent Management Platform Instrumentation

Zero-code OpenTelemetry instrumentation for Python agents using the Traceloop SDK, with trace visibility in the WSO2 AI Agent Management Platform.

Overview

amp-instrumentation enables zero-code instrumentation for Python agents, automatically capturing traces for LLM calls, MCP 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, MCP 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 built using a wide range of agent frameworks supported by the TraceLoop SDK

Installation

pip install amp-instrumentation

Quick Start

1. Register Your Agent

First, register your agent at the WSO2 AI Agent Management Platform to obtain your agent API key and configuration details.

2. Set Required Environment Variables

export AMP_AGENT_NAME="my-agent" # Name assigned during agent registration
export AMP_OTEL_ENDPOINT="https://amp-otel-endpoint.com" # AMP OTEL endpoint
export AMP_AGENT_API_KEY="your-agent-api-key" # Agent-specific key generated after registration

3. Run Your Application

Use the amp-instrument command to wrap your application run command:

# Run a Python script
amp-instrument python my_script.py

# Run with uvicorn
amp-instrument uvicorn app:main --reload

# Run with any package manager
amp-instrument poetry run python script.py
amp-instrument uv run python script.py

That's it! Your application is now instrumented and sending traces to the WSO2 AI Agent Management Platform.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amp_instrumentation-0.1.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amp_instrumentation-0.1.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file amp_instrumentation-0.1.1.tar.gz.

File metadata

  • Download URL: amp_instrumentation-0.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for amp_instrumentation-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6e653f17c9b2379fa2217e59832899ada3c6f765b3ce763db5acaf6c9159c118
MD5 ce368cccadff24b423cfbbb3e976aba2
BLAKE2b-256 0272f9f4580f37b7068d4c4c719bfb2ac22ad39d9002b947d9f574d8cb27d247

See more details on using hashes here.

File details

Details for the file amp_instrumentation-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for amp_instrumentation-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7aa27ac281554ab07562000346afa6f0a2c2a1e8c4ca9f6d084c2ec55214044
MD5 f73ef43382fe3387b4b128504db05285
BLAKE2b-256 c1a2d4f2aa5d68b08fc6e968246935302d331ea7c0dac0fffca2631e81c4614b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page