ATI LangChain integration: emit agent-aware OpenTelemetry spans via LangChain callbacks
Project description
ATI Integration for LangChain
This package provides OpenTelemetry instrumentation for LangChain agents using IOcane ATI.
Installation
pip install ati-integrations-langchain
Usage
from ati_langchain import LangChainInstrumentor
from langchain.chat_models import ChatOpenAI
from langchain.agents import initialize_agent, AgentType
# 1. Enable Instrumentation
# This returns a callback handler that captures ATI spans.
handler = LangChainInstrumentor().instrument()
# 2. Use in LangChain
llm = ChatOpenAI(temperature=0, callbacks=[handler])
# or pass globally if using a CallbackManager
Configuration
Configure the instrumentation via environment variables:
| Variable | Description | Default |
|---|---|---|
ATI_CAPTURE_PAYLOADS |
Capture input/output payloads (redacted) | false |
ATI_DEBUG |
Enable debug logging | false |
Features
- Captures LLM calls (
ati.span.type=llm) - Captures Tool usage (
ati.span.type=tool) - Captures Chain/Agent execution steps
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ati_integrations_langchain-0.1.0.tar.gz.
File metadata
- Download URL: ati_integrations_langchain-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf1b263249e7b086d505962541e7abffeb823906e27dbd2fb22e775c616d501
|
|
| MD5 |
70b997ea79c474c4397332b9712bd6c1
|
|
| BLAKE2b-256 |
6fcd93a32fd79ef531d0b8e87fea9a42da97fdfa04c2d4493884dbd777351341
|
File details
Details for the file ati_integrations_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ati_integrations_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33dec4c1d344bd71efbb073c0dbdd4183189e4d58fa51908616576b0b893dc79
|
|
| MD5 |
f9df1d5d01003461b52da6445520ae0c
|
|
| BLAKE2b-256 |
c2c95f178c2486841ce134a06b5e2b4c600af0279352a2d8a012c2bfc4713608
|