Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 942 Bytes

File metadata and controls

34 lines (22 loc) · 942 Bytes

Create Agent Example

This example demonstrates how to use LaunchDarkly's create_agent method, which handles model creation, metric tracking, and judge evaluation dispatch automatically.

Prerequisites

  • Python 3.10 or higher
  • Poetry installed
  • A LaunchDarkly account and SDK key
  • API keys for the provider you want to use (OpenAI, Bedrock, or Gemini)

Setup

  1. Create the following config in your LaunchDarkly project. You can use a different key by setting the environment variable in your .env.

  2. Copy .env.example to .env and fill in your keys:

    cp .env.example .env
  3. Install the required dependencies:

    poetry install

Run

poetry run agent