---
title: "Set the environment variables | Grafana Labs"
description: "Export the five AGENTO11Y_ environment variables with basic authentication so the SDK client reads them when it is created."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Set the environment variables

This milestone happens on your machine, not in Grafana Cloud. The SDK reads five `AGENTO11Y_` environment variables when you create the client, so set them in the shell or process that runs your agent.

1. Open a terminal on the machine where you run your agent. Stay in this terminal for the rest of this milestone and for Milestone 5.
2. Copy the following commands into that terminal, but don’t run them yet. `export` sets each variable in that shell so the SDK can read it when you create the client.
   
   Bash ![Copy code to clipboard](https://grafana.com/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```bash
   export AGENTO11Y_ENDPOINT="{AGENTO11Y_ENDPOINT}"
   export AGENTO11Y_PROTOCOL=http
   export AGENTO11Y_AUTH_MODE=basic
   export AGENTO11Y_AUTH_TENANT_ID="{AGENTO11Y_INSTANCE_ID}"
   export AGENTO11Y_AUTH_TOKEN="{ACCESS_POLICY_TOKEN}"
   ```
3. Replace the placeholders in those commands.
   
   Expand table
   
   | Variable                   | Value                               | Where it came from                                 |
   |----------------------------|-------------------------------------|----------------------------------------------------|
   | `AGENTO11Y_ENDPOINT`       | **API URL**                         | Milestone 2                                        |
   | `AGENTO11Y_PROTOCOL`       | `http`                              | Fixed value for Grafana Cloud                      |
   | `AGENTO11Y_AUTH_MODE`      | `basic`                             | Fixed value; the mode documented for Grafana Cloud |
   | `AGENTO11Y_AUTH_TENANT_ID` | **Instance ID**                     | Milestone 2                                        |
   | `AGENTO11Y_AUTH_TOKEN`     | The access policy token (`glc_...`) | Milestone 3                                        |
4. Run the commands, then keep this shell open. Milestone 5 runs the sample from the same shell, so the client is created after the variables are set. If you use a secret manager or an untracked `.env` file instead of `export`, load it in the same way before you run the agent.

The five variables are set in the shell that will run your agent.
