Skip to content

Instrumentation API

agentlightning.instrumentation.instrument_all()

Instrument all the instrumentation libraries.

agentlightning.instrumentation.uninstrument_all()

Uninstrument all the instrumentation libraries.

AgentOps LangChain

agentlightning.instrumentation.agentops_langchain

instrument_agentops_langchain()

Bypass AgentOp's native support for Langchain.

uninstrument_agentops_langchain()

Restore AgentOp's native support for Langchain.

AgentOps

agentlightning.instrumentation.agentops

AgentOpsServerManager

Manages a AgentOps local server to bypass the online service of AgentOps.

agentops_local_server()

Returns a Flask app that can be used to test agentops integration. This server provides endpoints for token fetching and a catch-all endpoint.

instrument_agentops()

Instrument agentops to capture token IDs. Automatically detects and uses the appropriate patching method based on the installed agentops version.

uninstrument_agentops()

Uninstrument agentops to stop capturing token IDs.

LiteLLM

agentlightning.instrumentation.litellm

LiteLLM instrumentations.

It's unclear whether or not this file is useful. It seems that LiteLLM owns its own telemetry from their own entrance

Related documentation.

instrument_litellm()

Instrument litellm to capture token IDs.

uninstrument_litellm()

Uninstrument litellm to stop capturing token IDs.

vLLM

agentlightning.instrumentation.vllm

instrument_vllm()

Instrument vLLM to capture token IDs generated by engine.

This instrumentation has been merged to upstream vLLM since v0.10.2.

uninstrument_vllm()

Uninstrument vLLM to stop capturing token IDs generated by engine.