Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.
launchdarklyPublic archive

Latest commit

 

History

39 Commits

Folders and files

Repository files navigation

LaunchDarkly AI SDK for Python - Examples

Warning

This repository is archived. These examples use the legacy LaunchDarkly AI SDK for Python (launchdarkly-server-sdk-ai), which is in maintenance mode and no longer receives new features.

For new applications, use the current Python AI SDK and its examples. To move existing code, see Migrate from the legacy AI SDKs.

Package PyPI Docs
launchdarkly-server-sdk-ai PyPI Reference
launchdarkly-server-sdk-ai-openai PyPI Reference
launchdarkly-server-sdk-ai-langchain PyPI Reference
launchdarkly-observability PyPI Reference

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 legacy Python reference guide.

Getting Started

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

Provider Example Description
Bedrock Converse completion_config with AWS Bedrock Converse API, metrics tracking
Gemini Generate Content completion_config with Google GenAI, metrics tracking
LangChain Invoke completion_config with LangChain, async metrics tracking
LangGraph ReAct Agent agent_config with a single LangGraph ReAct agent, tool calling, metrics tracking
LangGraph StateGraph agent_config with multiple LangGraph agents, custom StateGraph workflow, per-node metrics
OpenAI Chat Completions completion_config with OpenAI, automatic metrics tracking

Features

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

Example Description
create_judge Standalone evaluation of AI responses
create_agent Tool calling, automatic metrics tracking, and judge evaluation
create_agent_graph Multi-node workflows, tool calling, per-node metrics, and judge evaluation
create_model Managed chat, automatic metrics tracking, and judge evaluation

Releases

Packages

Contributors

Languages