> ## 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.

# OpenAI Agents SDK

> Auto-instrument the OpenAI Agents SDK. Captures LLM generations, tool calls, handoffs, guardrails, and the full manifest.

DecimalAI's deepest integration. Pass the `Agent` object to `install()` and DecimalAI introspects tools, model config, handoffs, and guardrails — no manual manifest registration needed.

## Install

```bash theme={null}
pip install decimalai
```

## Use

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

# Or for more control:
from decimalai.openai_agents import install
from agents import Agent, Runner

agent = Agent(name="my-agent", instructions="You are helpful.", tools=[...])
install(agent=agent)  # introspects tools, model, and handoffs

result = Runner.run_sync(agent, "Hello!")
# Trace auto-captured with full manifest
```

## What gets captured

* All LLM generations with model, tokens, latency
* Tool calls with inputs and outputs
* Handoffs between agents (multi-agent flows)
* Guardrail checks and results
* Auto-detected manifest from agent config (tools, model, instructions, sub-agents)

## When to use the explicit `install(agent=...)` form

The flag form (`init(openai_agents=True)`) hooks into the SDK at module level. Use the explicit `install(agent=...)` form when you need DecimalAI to introspect the full agent object — tool schemas, sub-agent topology, the resolved instruction prompt. Without the `agent=` argument, manifest detection captures tool *names* only.

## What's next

<CardGroup cols={2}>
  <Card title="Multi-agent guide" icon="users" href="/guides/multi-agent">
    How handoffs and sub-agent calls show up in the trace tree.
  </Card>

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