Metadata-Version: 2.5
Name: launchdarkly-ai-vercel-agents
Version: 1.0.0
Summary: Vercel AI SDK agent handler for LaunchDarkly AI SDK
Author-email: LaunchDarkly <team@launchdarkly.com>
License-Expression: Apache-2.0
Keywords: agents,ai,launchdarkly,vercel
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: ai<0.8,>=0.7
Requires-Dist: launchdarkly-ai-server<2,>=1.0.0
Requires-Dist: opentelemetry-api>=1.25
Requires-Dist: pydantic>=2.13
Description-Content-Type: text/markdown

# `launchdarkly-ai-vercel-agents`

Wildcard LaunchDarkly AI agent handler built on the official Vercel `ai.Agent`
runtime for Python.

## Install

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

Default routing is AI Gateway via a mapped `creator/model` id (for example,
`xAI` + `grok-4.5` becomes `spacexai/grok-4.5`). Already-qualified ids remain
unchanged. Set `AI_GATEWAY_API_KEY` or Vercel OIDC. This package does not load a provider SDK from
`config.provider.name`. Inject a model or model factory to call a provider
directly.

All LaunchDarkly providers are handled explicitly. Anthropic, OpenAI, Azure,
Gemini, Cohere, DeepSeek, Meta, Mistral, Perplexity, and Vertex map directly.
Bedrock, Cortex, Cursor, Databricks, and Fireworks AI infer the creator from the
model and fail locally if ambiguous. AI21 Labs and IBM Watson fail locally
because Vercel's current catalog has no corresponding creator.

## Use

```python
from launchdarkly_ai_server import config
from launchdarkly_ai_vercel_agents import create_vercel_agents_handler

result = await config(
    key="my-agent-config",
    handler=create_vercel_agents_handler(),
).invoke("Help me", {"kind": "user", "key": "user-123"})
```

The package also exports `vercel_graph()` and `to_vercel_agents()` for
LaunchDarkly and framework-native graph execution. The native adapter builds one
`ai.Agent` per graph node and follows only a `transfer_to_<target>` tool that the
current node actually selects.

This package advertises `("*", "agent")`; register only one wildcard agent
adapter in a handler pool.
