|
1 | | -# LaunchDarkly sample Python application |
| 1 | +# LaunchDarkly AI SDK for Python - Examples |
2 | 2 |
|
3 | | -We've built a simple console application that demonstrates how LaunchDarkly's SDK works. |
4 | | - |
5 | | -Below, you'll find the build procedure. For more comprehensive instructions, you can visit your [Quickstart page](https://docs.launchdarkly.com/home/ai-configs/quickstart) or the [Python reference guide](https://docs.launchdarkly.com/sdk/ai/python). |
6 | | - |
7 | | -This demo requires Python 3.10 or higher. |
8 | | - |
9 | | -## Build Instructions |
10 | | - |
11 | | -This repository includes examples for `OpenAI`, `Bedrock`, `Gemini`, `LangChain`, `LangGraph`, `Judge`, and `Observability`. Depending on your preferred provider, you may have to take some additional steps. |
| 3 | +| Package | PyPI | Docs | |
| 4 | +| --- | --- | --- | |
| 5 | +| [launchdarkly-server-sdk-ai](https://github.com/launchdarkly/python-server-sdk-ai/tree/main/packages/sdk/server-ai) | [](https://pypi.org/project/launchdarkly-server-sdk-ai/) | [Reference](https://docs.launchdarkly.com/sdk/ai/python) | |
| 6 | +| [launchdarkly-server-sdk-ai-openai](https://github.com/launchdarkly/python-server-sdk-ai/tree/main/packages/ai-providers/server-ai-openai) | [](https://pypi.org/project/launchdarkly-server-sdk-ai-openai/) | [Reference](https://docs.launchdarkly.com/sdk/ai/python) | |
| 7 | +| [launchdarkly-server-sdk-ai-langchain](https://github.com/launchdarkly/python-server-sdk-ai/tree/main/packages/ai-providers/server-ai-langchain) | [](https://pypi.org/project/launchdarkly-server-sdk-ai-langchain/) | [Reference](https://docs.launchdarkly.com/sdk/ai/python) | |
| 8 | +| [launchdarkly-observability](https://github.com/launchdarkly/observability-sdk/tree/main/sdk/%40launchdarkly/observability-python) | [](https://pypi.org/project/launchdarkly-observability/) | [Reference](https://docs.launchdarkly.com/sdk/observability/python) | |
12 | 9 |
|
13 | | -### General setup |
| 10 | +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. |
14 | 11 |
|
15 | | -1. [Create an AI Config](https://launchdarkly.com/docs/home/ai-configs/create) using the key specified in each example, or copy the key of existing AI Config in your LaunchDarkly project that you want to evaluate. |
| 12 | +For more comprehensive instructions, visit the [Quickstart page](https://docs.launchdarkly.com/home/ai-configs/quickstart) or the [Python reference guide](https://docs.launchdarkly.com/sdk/ai/python). |
16 | 13 |
|
17 | | -1. Ensure you have [Poetry](https://python-poetry.org/) installed. |
| 14 | +## Getting Started |
18 | 15 |
|
19 | | -1. Create a `.env` file in the repository root with at least your LaunchDarkly SDK key: |
| 16 | +These examples show how to integrate LaunchDarkly AI with different providers using `completion_config` and `agent_config`. |
20 | 17 |
|
21 | | - ``` |
22 | | - LAUNCHDARKLY_SDK_KEY=your-launchdarkly-sdk-key |
23 | | - ``` |
| 18 | +| Example | Description | |
| 19 | +| --- | --- | |
| 20 | +| [Bedrock](getting_started/completion_config/bedrock/) | `completion_config` with AWS Bedrock, metrics tracking | |
| 21 | +| [Gemini](getting_started/completion_config/gemini/) | `completion_config` with Google Gemini, metrics tracking | |
| 22 | +| [LangChain](getting_started/completion_config/langchain/) | `completion_config` with LangChain, async metrics tracking | |
| 23 | +| [LangGraph Agent](getting_started/agent_config/langgraph_agent/) | `agent_config` with a single LangGraph ReAct agent, tool calling, metrics tracking | |
| 24 | +| [LangGraph Multi-Agent](getting_started/agent_config/langgraph_multi_agent/) | `agent_config` with multiple LangGraph agents, custom StateGraph workflow, per-node metrics | |
| 25 | +| [OpenAI](getting_started/completion_config/openai/) | `completion_config` with OpenAI, automatic metrics tracking | |
24 | 26 |
|
25 | | - Each example README describes the full set of environment variables needed. The `.env` file is loaded automatically when running any example. |
| 27 | +## Features |
26 | 28 |
|
27 | | -### Examples |
| 29 | +These examples demonstrate LaunchDarkly's managed APIs and standalone capabilities. |
28 | 30 |
|
29 | | -| Example | Description | README | |
30 | | -| --- | --- | --- | |
31 | | -| **OpenAI** | Single provider using OpenAI | [examples/openai](examples/openai/README.md) | |
32 | | -| **Bedrock** | Single provider using AWS Bedrock | [examples/bedrock](examples/bedrock/README.md) | |
33 | | -| **Gemini** | Single provider using Google Gemini | [examples/gemini](examples/gemini/README.md) | |
34 | | -| **LangChain** | Multiple providers via LangChain | [examples/langchain](examples/langchain/README.md) | |
35 | | -| **LangGraph Agent** | Single agent using LangGraph | [examples/langgraph_agent](examples/langgraph_agent/README.md) | |
36 | | -| **LangGraph Multi-Agent** | Multiple agents using LangGraph | [examples/langgraph_multi_agent](examples/langgraph_multi_agent/README.md) | |
37 | | -| **Judge** | Judge evaluation of AI responses | [examples/judge](examples/judge/README.md) | |
38 | | -| **Chat with Observability** | Observability plugin for AI chat monitoring | [examples/chat_observability](examples/chat_observability/README.md) | |
| 31 | +| Example | Description | |
| 32 | +| --- | --- | |
| 33 | +| [Judge](features/judge/) | `create_judge` for standalone evaluation of AI responses | |
| 34 | +| [Managed Agent](features/managed_agent/) | `create_agent` with tool calling, automatic metrics tracking, and judge evaluation | |
| 35 | +| [Managed Agent Graph](features/managed_agent_graph/) | `create_agent_graph` with multi-node workflows, tool calling, per-node metrics, and judge evaluation | |
| 36 | +| [Managed Model](features/managed_model/) | `create_model` with managed chat, automatic metrics tracking, and judge evaluation | |
0 commit comments