This example demonstrates how to use LaunchDarkly's AI Config with LangGraph to create a single ReAct agent with tool support.
- Python 3.10 or higher
- Poetry installed
- A LaunchDarkly account and SDK key
- API keys for the providers you want to use
-
Create the following config in your LaunchDarkly project. You can use a different key by setting the environment variable in your
.env.- Create an AI Agent Config with a model and agent instructions. Default key:
sample-agent.
- Create an AI Agent Config with a model and agent instructions. Default key:
-
Copy
.env.exampleto.envand fill in your keys (only the provider keys for providers you actually use are required):cp .env.example .env
-
Install the required dependencies:
poetry install
poetry run agent