> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Framework Instrumentation

> Auto-capture traces from OpenAI Agents, LangChain, LlamaIndex, CrewAI, AutoGen, or any OpenTelemetry-emitting framework — usually with one line of code.

Every supported framework follows the same pattern: pass a flag to `init()` (or call the framework subpackage's `install()` directly for more control), and DecimalAI auto-captures traces, tool calls, and the underlying manifest.

```python theme={null}
import decimalai
decimalai.init(api_key="dai_sk_...", openai_agents=True)
```

## Supported frameworks

<CardGroup cols={2}>
  <Card title="OpenAI Agents SDK" icon="circle-nodes" href="/sdk/python/frameworks/openai-agents">
    Deepest integration. Full manifest from agent introspection.
  </Card>

  <Card title="LangChain & LangGraph" icon="link" href="/sdk/python/frameworks/langchain">
    Callback handler. Chains, AgentExecutor, LangGraph all auto-traced.
  </Card>

  <Card title="LlamaIndex" icon="database" href="/sdk/python/frameworks/llamaindex">
    Query engines, retrievers, synthesizers via the LlamaIndex callback system.
  </Card>

  <Card title="CrewAI" icon="users-gear" href="/sdk/python/frameworks/crewai">
    Crews, tasks, agent conversations via OpenTelemetry.
  </Card>

  <Card title="AutoGen / AG2" icon="comments" href="/sdk/python/frameworks/autogen">
    Conversation-turn-based agents via OpenTelemetry.
  </Card>

  <Card title="Generic OpenTelemetry" icon="rss" href="/sdk/python/frameworks/otel">
    Any framework emitting OTel `gen_ai.*` semantic-convention spans.
  </Card>
</CardGroup>

## Capability comparison

| Framework                                 | Auto-detected manifest | Tool schema depth | Handoffs / multi-agent |
| ----------------------------------------- | :--------------------: | :---------------: | :--------------------: |
| OpenAI Agents (with `install(agent=...)`) |         ✅ full         |    Full schemas   |            ✅           |
| LangChain / LangGraph                     |         ✅ full         |    Full schemas   |            ✅           |
| LlamaIndex                                |        ✅ partial       |     Names only    |            —           |
| CrewAI                                    |        ✅ partial       |     Names only    |            ✅           |
| AutoGen / AG2                             |        ✅ partial       |     Names only    |     ✅ (group chat)     |
| Generic OTel                              |  ❌ (register manually) |         —         |            —           |

"Names only" means DecimalAI knows *which* tool was called but not its full input schema. If schema-aware manifests matter for your use case (e.g. you want the regression check to flag schema changes), use the explicit `register_manifest()` form for those frameworks.

## Module-level reference

| Module                    | Function             | Use it for                                                              |
| ------------------------- | -------------------- | ----------------------------------------------------------------------- |
| `decimalai.openai_agents` | `install(agent=...)` | OpenAI Agents SDK — pass the Agent object for full schema introspection |
| `decimalai.langchain`     | `install()`          | LangChain / LangGraph callbacks                                         |
| `decimalai.llamaindex`    | `install()`          | LlamaIndex span handler                                                 |
| `decimalai.autogen`       | `install()`          | AutoGen / AG2 via OpenTelemetry                                         |
| `decimalai.otel`          | `install()`          | Generic OpenTelemetry GenAI span exporter                               |

CrewAI ships through the same OTel-based pathway as AutoGen — there's no `decimalai.crewai` subpackage; the `init(crewai=True)` flag is the canonical entry.

## What's next

<CardGroup cols={2}>
  <Card title="Tracing" icon="route" href="/sdk/python/tracing">
    Manual decorators if you need custom span boundaries inside an instrumented framework.
  </Card>

  <Card title="Manifests" icon="layer-group" href="/sdk/python/manifests">
    Override the auto-detected manifest when needed.
  </Card>
</CardGroup>
