Metadata-Version: 2.5
Name: launchdarkly-ai-litellm-agents
Version: 1.0.0
Summary: LiteLLM-backed OpenAI Agents handler for LaunchDarkly AI SDK
Project-URL: Homepage, https://github.com/launchdarkly/python-ai-sdk
Project-URL: Repository, https://github.com/launchdarkly/python-ai-sdk
Project-URL: Bug Tracker, https://github.com/launchdarkly/python-ai-sdk/issues
Author-email: LaunchDarkly <team@launchdarkly.com>
License-Expression: Apache-2.0
Keywords: agents,ai,launchdarkly,litellm
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: launchdarkly-ai-server<2,>=1.0.0
Requires-Dist: openai-agents[litellm]>=0.17
Requires-Dist: openai>=2.44
Requires-Dist: opentelemetry-api>=1.25
Requires-Dist: pydantic>=2.13
Description-Content-Type: text/markdown

# `launchdarkly-ai-litellm-agents`

**Experimental.** This package stays on 0.x until the Python and JavaScript LiteLLM integrations match.

Provider-agnostic LaunchDarkly AI Config and graph handlers built on the OpenAI
Agents SDK's `LitellmModel`.

## Installation

```bash
pip install "launchdarkly-ai-server[ld]" launchdarkly-ai-litellm-agents
```

Python uses LiteLLM in-process; no proxy endpoint is required. Set the provider
credentials required by the models in your AI Config, such as
`OPENAI_API_KEY` or `ANTHROPIC_API_KEY`. Standard LiteLLM configuration,
gateways, and model aliases are supported.

## Usage

```python
from launchdarkly_ai_litellm_agents import create_litellm_agents_handler
from launchdarkly_ai_server import config

result = await config(
    key="assistant",
    handler=create_litellm_agents_handler(),
).invoke("Hello", {"kind": "user", "key": "user-123"})
```

Each evaluated config model is authoritative and creates its own `LitellmModel`.
The package supports callable tools, structured output, streaming, the
`litellm_graph` convenience wrapper, and `to_litellm_agents` for native Agents
SDK handoffs.

Because this is a wildcard agent handler, do not register it together with
another `["*", "agent"]` handler such as LangChain in the same registry.
