Skip to content

Commit 17c8bcb

Browse files
jsonbaileyclaude
andcommitted
chore: Add .env.example files to all examples
Each example directory now ships a `.env.example` listing the env vars that example reads, with empty values for the user to fill in. Each per-example README now points at it with a `cp .env.example .env` step instead of inlining the variable list. `.env` is already covered by .gitignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1946920 commit 17c8bcb

20 files changed

Lines changed: 128 additions & 84 deletions

File tree

features/create_agent/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Your LaunchDarkly server-side SDK key
2+
LAUNCHDARKLY_SDK_KEY=
3+
4+
# Provider API key(s) for the provider your agent config uses
5+
OPENAI_API_KEY=
6+
7+
# Optional - defaults to "sample-agent"
8+
LAUNCHDARKLY_AGENT_KEY=

features/create_agent/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ This example demonstrates how to use LaunchDarkly's `create_agent` method, which
1515

1616
- [Create an AI Agent Config](https://launchdarkly.com/docs/home/ai-configs/agents) with a model and agent instructions. Default key: `sample-agent`.
1717

18-
1. Create a `.env` file in this directory with the following variables:
18+
1. Copy `.env.example` to `.env` and fill in your keys:
1919

20-
```
21-
LAUNCHDARKLY_SDK_KEY=your-launchdarkly-sdk-key
22-
LAUNCHDARKLY_AGENT_KEY=sample-agent
23-
OPENAI_API_KEY=your-openai-api-key
20+
```bash
21+
cp .env.example .env
2422
```
2523

2624
1. Install the required dependencies:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Your LaunchDarkly server-side SDK key
2+
LAUNCHDARKLY_SDK_KEY=
3+
4+
# Provider API key(s) for the provider(s) your agent graph uses
5+
OPENAI_API_KEY=
6+
7+
# Optional - defaults to "sample-agent-graph"
8+
LAUNCHDARKLY_AGENT_GRAPH_KEY=

features/create_agent_graph/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ This example demonstrates how to use LaunchDarkly's `create_agent_graph` method,
1616
- [Create AI Agent Configs](https://launchdarkly.com/docs/home/ai-configs/agents) for each node in your graph. Configure each with a model and agent instructions. Add tools (e.g. `search_flights`, `search_hotels`, `get_weather`) to the agents that need them.
1717
- [Create an Agent Graph](https://launchdarkly.com/docs/home/ai-configs/create) that connects your agent configs as nodes with edges defining the workflow. Default key: `sample-agent-graph`.
1818

19-
1. Create a `.env` file in this directory with the following variables:
19+
1. Copy `.env.example` to `.env` and fill in your keys:
2020

21-
```
22-
LAUNCHDARKLY_SDK_KEY=your-launchdarkly-sdk-key
23-
LAUNCHDARKLY_AGENT_GRAPH_KEY=sample-agent-graph
24-
OPENAI_API_KEY=your-openai-api-key
21+
```bash
22+
cp .env.example .env
2523
```
2624

2725
1. Install the required dependencies:

features/create_judge/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Your LaunchDarkly server-side SDK key
2+
LAUNCHDARKLY_SDK_KEY=
3+
4+
# Provider API key(s) for the provider your judge config uses
5+
OPENAI_API_KEY=
6+
7+
# Optional - defaults to "sample-judge"
8+
LAUNCHDARKLY_JUDGE_KEY=

features/create_judge/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ This example demonstrates how to use LaunchDarkly's `create_judge` method to eva
1515

1616
- [Create a Judge Config](https://launchdarkly.com/docs/home/ai-configs/judges) for evaluation. Default key: `sample-judge`.
1717

18-
1. Create a `.env` file in this directory with the following variables:
18+
1. Copy `.env.example` to `.env` and fill in your keys:
1919

20-
```
21-
LAUNCHDARKLY_SDK_KEY=your-launchdarkly-sdk-key
22-
LAUNCHDARKLY_JUDGE_KEY=sample-judge
23-
OPENAI_API_KEY=your-openai-api-key
20+
```bash
21+
cp .env.example .env
2422
```
2523

2624
1. Install the required dependencies:

features/create_model/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Your LaunchDarkly server-side SDK key
2+
LAUNCHDARKLY_SDK_KEY=
3+
4+
# Provider API key(s) for the provider your AI config uses
5+
OPENAI_API_KEY=
6+
7+
# Optional - defaults to "sample-completion"
8+
LAUNCHDARKLY_COMPLETION_KEY=

features/create_model/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ This example demonstrates how to use LaunchDarkly's `create_model` method, which
1515

1616
- [Create an AI Config](https://launchdarkly.com/docs/home/ai-configs/create) with a model and system message. Default key: `sample-completion`.
1717

18-
1. Create a `.env` file in this directory with the following variables:
18+
1. Copy `.env.example` to `.env` and fill in your keys:
1919

20-
```
21-
LAUNCHDARKLY_SDK_KEY=your-launchdarkly-sdk-key
22-
LAUNCHDARKLY_COMPLETION_KEY=sample-completion
23-
OPENAI_API_KEY=your-openai-api-key
20+
```bash
21+
cp .env.example .env
2422
```
2523

2624
1. Install the required dependencies:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Your LaunchDarkly server-side SDK key
2+
LAUNCHDARKLY_SDK_KEY=
3+
4+
# Your AWS credentials for Bedrock access
5+
AWS_ACCESS_KEY_ID=
6+
AWS_SECRET_ACCESS_KEY=
7+
8+
# Optional - defaults to "us-east-1"
9+
AWS_DEFAULT_REGION=
10+
11+
# Optional - defaults to "sample-completion"
12+
LAUNCHDARKLY_COMPLETION_KEY=

getting_started/bedrock/converse/README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,15 @@ This example demonstrates how to use LaunchDarkly's AI Config with the AWS Bedro
1515

1616
- [Create an AI Config](https://launchdarkly.com/docs/home/ai-configs/create) with a Bedrock model and a system message. Default key: `sample-completion`.
1717

18-
1. Create a `.env` file in this directory with the following variables:
18+
1. Copy `.env.example` to `.env` and fill in your keys:
1919

20+
```bash
21+
cp .env.example .env
2022
```
21-
LAUNCHDARKLY_SDK_KEY=your-launchdarkly-sdk-key
22-
LAUNCHDARKLY_COMPLETION_KEY=sample-completion
23-
```
24-
25-
> `LAUNCHDARKLY_COMPLETION_KEY` defaults to `sample-completion` if not set.
2623

27-
1. Ensure your AWS credentials can be [auto-detected by the `boto3` library](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html). You can set them in your `.env` file:
28-
29-
```
30-
AWS_ACCESS_KEY_ID=your-access-key-id
31-
AWS_SECRET_ACCESS_KEY=your-secret-access-key
32-
AWS_DEFAULT_REGION=us-east-1
33-
```
24+
`LAUNCHDARKLY_COMPLETION_KEY` defaults to `sample-completion` if not set.
3425

35-
Other options include role providers or shared credential files.
26+
Ensure your AWS credentials can be [auto-detected by the `boto3` library](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html). Setting them in `.env` is one option; role providers or shared credential files are also supported.
3627

3728
1. Install the required dependencies:
3829

0 commit comments

Comments
 (0)