Skip to content

Supported Frameworks

Coalex auto-instruments 15 LLM frameworks through OpenInference instrumentors. When you call coalex.auto_instrument(), the SDK automatically patches every installed framework to emit OpenInference spans.


Framework Table

Framework Python Install Extra TypeScript npm Package Description
OpenAI coalex[openai] @arizeai/openinference-instrumentation-openai OpenAI SDK (GPT-4, GPT-4o, o1, etc.)
LlamaIndex coalex[llamaindex] -- LlamaIndex RAG framework
LangChain coalex[langchain] @arizeai/openinference-instrumentation-langchain LangChain and LCEL chains
Google Generative AI coalex[google-genai] -- Google Generative AI (Gemini)
Vertex AI coalex[vertexai] -- Google Vertex AI (Gemini via GCP)
AWS Bedrock coalex[bedrock] -- AWS Bedrock (Claude, Titan, etc.)
Anthropic coalex[anthropic] @arizeai/openinference-instrumentation-anthropic Anthropic Claude SDK
MistralAI coalex[mistralai] -- MistralAI SDK
Groq coalex[groq] -- Groq inference API
liteLLM coalex[litellm] -- liteLLM unified LLM gateway
DSPy coalex[dspy] -- DSPy programming framework
CrewAI coalex[crewai] -- CrewAI multi-agent framework
Haystack coalex[haystack] -- Haystack NLP framework
Instructor coalex[instructor] -- Instructor structured output
Guardrails coalex[guardrails] -- Guardrails AI validation

TypeScript framework support

The TypeScript SDK currently supports auto-instrumentation for OpenAI, LangChain, and Anthropic via their respective @arizeai/openinference-instrumentation-* npm packages. Additional framework support will be added in future releases.


Installation

Install all frameworks at once

pip install "coalex[auto-instrument]"

This installs all 15 OpenInference instrumentor packages. Only frameworks that are actually installed in your environment will be instrumented -- missing frameworks are silently skipped.

Install specific frameworks

# Just OpenAI and LangChain
pip install "coalex[openai,langchain]"

# Just Vertex AI
pip install "coalex[vertexai]"

Install with uv

uv pip install "coalex[auto-instrument]"
# or
uv pip install "coalex[openai,langchain]"

Install supported frameworks

# OpenAI
npm install @coalex-ai/sdk @arizeai/openinference-instrumentation-openai

# LangChain
npm install @coalex-ai/sdk @arizeai/openinference-instrumentation-langchain

# Anthropic
npm install @coalex-ai/sdk @arizeai/openinference-instrumentation-anthropic

# Multiple frameworks
npm install @coalex-ai/sdk \
    @arizeai/openinference-instrumentation-openai \
    @arizeai/openinference-instrumentation-langchain \
    @arizeai/openinference-instrumentation-anthropic

Only installed instrumentor packages will be detected by autoInstrument(). Missing packages are silently skipped.


Usage

Auto-instrument all installed frameworks

import coalex

coalex.register(endpoint="...", api_key="...", service_name="my-agent")

# Patches all installed frameworks
results = coalex.auto_instrument()
# results: {"openai": "success", "langchain": "success", "llamaindex": "not_installed", ...}
import { register, autoInstrument } from "@coalex-ai/sdk";

register({ endpoint: "...", apiKey: "...", serviceName: "my-agent" });

// Patches all installed frameworks
const results = autoInstrument();
// results: { openai: "success", langchain: "not_installed", anthropic: "not_installed" }

Instrument specific frameworks

# Include only certain frameworks
results = coalex.auto_instrument(include_libraries=["openai", "langchain"])

# Exclude certain frameworks
results = coalex.auto_instrument(exclude_libraries=["guardrails"])
// Include only certain frameworks
const results = autoInstrument({ includeLibraries: ["openai", "langchain"] });

// Exclude certain frameworks
const results = autoInstrument({ excludeLibraries: ["anthropic"] });

Convenience functions for individual frameworks

import coalex

coalex.register(endpoint="...", api_key="...", service_name="my-agent")

# Instrument individual frameworks
coalex.instrument_openai()
coalex.instrument_langchain()
coalex.instrument_llamaindex()
coalex.instrument_google_genai()
coalex.instrument_vertexai()
coalex.instrument_bedrock()
coalex.instrument_anthropic()
import { register, instrumentOpenAI, instrumentLangChain, instrumentAnthropic } from "@coalex-ai/sdk";

register({ endpoint: "...", apiKey: "...", serviceName: "my-agent" });

// Instrument individual frameworks
instrumentOpenAI();
instrumentLangChain();
instrumentAnthropic();

Return Values

auto_instrument() returns a dictionary mapping each framework to its instrumentation status:

Status Meaning
"success" Framework was found and instrumented
"not_installed" OpenInference package not installed -- skipped
"already_instrumented" Framework was already instrumented (e.g., by a previous call)
"excluded" Framework was in the exclude_libraries list
"error" Instrumentation failed (logged as warning, not raised)

OpenInference Compatibility

Coalex uses OpenInference semantic conventions for all auto-instrumented spans. This means:

  • Spans are categorized by kind: LLM, RETRIEVER, EMBEDDING, RERANKER, TOOL, GUARDRAIL
  • Standard attributes are set: llm.model_name, llm.token_count.prompt, llm.token_count.completion, input.value, output.value
  • Any OpenInference-compatible instrumentor will work with Coalex

Manual spans

For operations not covered by auto-instrumentation, use extension decorators like @retrieval_span, @tool_span, @embedding_span, @reranker_span, and @guardrail_span. These also emit OpenInference-compatible spans.


Troubleshooting

No frameworks instrumented:

If auto_instrument() reports no libraries were instrumented, install the instrumentor packages:

pip install "coalex[auto-instrument]"

Framework not captured:

Ensure the framework's OpenInference package is installed. Check the return value of auto_instrument() for the specific status.

Duplicate instrumentation warnings:

If you call auto_instrument() multiple times, already-instrumented frameworks will return "already_instrumented" and will not be patched again. This is safe and expected.