Skip to content

Repository files navigation

LaunchDarkly AI SDK for Python - Examples

PackagePyPIDocs
launchdarkly-server-sdk-aiPyPIReference
launchdarkly-server-sdk-ai-openaiPyPIReference
launchdarkly-server-sdk-ai-langchainPyPIReference
launchdarkly-observabilityPyPIReference

Each example is a self-contained application you can run independently to explore LaunchDarkly's AI APIs hands-on. Pick one that matches your provider or use case, follow the README, and you'll be up and running in minutes.

For more comprehensive instructions, visit the Quickstart page or the Python reference guide.

Getting Started

These examples show how to integrate LaunchDarkly AI with different providers.

ProviderExampleDescription
BedrockConversecompletion_config with AWS Bedrock Converse API, metrics tracking
GeminiGenerate Contentcompletion_config with Google GenAI, metrics tracking
LangChainInvokecompletion_config with LangChain, async metrics tracking
LangGraphReAct Agentagent_config with a single LangGraph ReAct agent, tool calling, metrics tracking
LangGraphStateGraphagent_config with multiple LangGraph agents, custom StateGraph workflow, per-node metrics
OpenAIChat Completionscompletion_config with OpenAI, automatic metrics tracking

Features

These examples demonstrate LaunchDarkly's managed APIs and standalone capabilities.

ExampleDescription
create_judgeStandalone evaluation of AI responses
create_agentTool calling, automatic metrics tracking, and judge evaluation
create_agent_graphMulti-node workflows, tool calling, per-node metrics, and judge evaluation
create_modelManaged chat, automatic metrics tracking, and judge evaluation

Releases

Packages

Used by

Contributors

Languages