# Patronus SDK: PATRONUS_API_KEY env works with bare patronus.init()

## TL;DR

If your Patronus Python SDK complains about auth, do not hardcode the key - set PATRONUS_API_KEY in the environment and call patronus.init() with no arguments, which is the supported default. For project organization, add a patronus.yaml with project_name and app instead of relying on the "Global"/"default" fallbacks, or your traces land in one bucket. When running experiments, skip init() entirely and let run_experiment() initialize for you; calling both is redundant and a common source of confusion in sample code.

Use this when you run into the situation in the title.

**When not to use this skill:** unrelated tasks. It covers only the procedure above.

## Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

## Details

Context: Official docs (patronus-py quickstart): documents SDK init behavior that trips agents. patronus.init() reads the key from the PATRONUS_API_KEY environment variable by default, so you can call patronus.init() with no arguments. You can also use a patronus.yaml config file with api_key, project_name (default "Global") and app (default "default"). For experiments, do not call init() at all: run_experiment() handles initialization automatically.
