---
title: Environment
description: AGENKO_API_KEY, AGENKO_HOST, and friends.
---

# Environment

`init()` reads env. Do not pass a config object unless you are writing tests.

## SDK

| Variable | Default | Purpose |
|---|---|---|
| `AGENKO_API_KEY` | empty | Project key. Required to ingest and connect. |
| `AGENKO_HOST` | `http://localhost:8000` | Control plane base URL. |
| `AGENKO_HTTP_ENDPOINT` | — | Legacy alias of `AGENKO_HOST`. |
| `AGENKO_ENDPOINT` | `{host}/api/public/otel/v1/traces` | OTLP/HTTP traces. |
| `AGENKO_SERVICE_NAME` | `agenko-agent` | `service.name` on spans. |
| `AGENKO_ENV` | `development` | Environment tag. |
| `AGENKO_PROJECT_ID` | — | Scope for prompts, scores, and datasets. |
| `AGENKO_SESSION_ID` | random | `session.id` on every span (Langfuse filter). |
| `AGENKO_USER_ID` | — | `user.id` on every span (Langfuse filter). |
| `AGENKO_CONSOLE_URL` | `http://localhost:3000` | Printed after init; approval links. |
| `AGENKO_DEBUG` | unset | Set `1` for verbose SDK logs. |

After `make dev`, copy the `agk_dev_*` key from API logs into `AGENKO_API_KEY`.

## Local compose (server)

See `.env.example` in the monorepo: `DATABASE_URL`, `REDIS_URL`, `SECRET_KEY`, MinIO, optional SuperTokens, optional Resend, optional Slack.

Do not put OAuth secrets in the root `.env` if the console loads `agenko-frontend/.env.local` — empty values override.

## Honesty

Empty `AGENKO_API_KEY` is valid. The process runs; traces do not land in a project until a key exists.

## Agent instructions

This page: https://docs.agenko.app/environment.md

Fetch `/llms.txt` for the full index. Search: `GET /api/search-docs?query=...`
