Skip to main content

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


Download files

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

Source Distribution

ati_integrations_langchain-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

ati_integrations_langchain-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file ati_integrations_langchain-0.1.0.tar.gz.

File metadata

File hashes

Hashes for ati_integrations_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 edf1b263249e7b086d505962541e7abffeb823906e27dbd2fb22e775c616d501
MD5 70b997ea79c474c4397332b9712bd6c1
BLAKE2b-256 6fcd93a32fd79ef531d0b8e87fea9a42da97fdfa04c2d4493884dbd777351341

See more details on using hashes here.

File details

Details for the file ati_integrations_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ati_integrations_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33dec4c1d344bd71efbb073c0dbdd4183189e4d58fa51908616576b0b893dc79
MD5 f9df1d5d01003461b52da6445520ae0c
BLAKE2b-256 c2c95f178c2486841ce134a06b5e2b4c600af0279352a2d8a012c2bfc4713608

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