Skip to main content
The SDK is configured at three layers. From highest to lowest precedence:
  1. Keyword arguments to egisai.init(...).
  2. Environment variables read by egisai.init().
  3. Defaults built into the package.
Most applications only need to set EGISAI_API_KEY and pass app= / env= to init(). Everything else has a sensible default.

Initialization parameters

Every parameter has a corresponding section in the init reference.

Environment variables

Keep your API key out of source control. Use environment variables, a secrets manager, or your platform’s configuration store.

Local development

Production with stub mode

Strict / restricted networks

If your environment blocks long-lived HTTP connections, disable the live update channel and rely on polling:

Fail closed on judge outages

If your workload uses semantic_guard as its primary defense for a sensitive category and you’d rather refuse a call than risk an unvetted one when the judge is unreachable, switch the policy from fail-open to fail-closed:
Deterministic local checks (PII detection, regex denylists, model allow-lists, prompt-size caps) are unaffected — they always run locally.

Custom HTTP clients only

If your application doesn’t use any official provider SDK and instead calls endpoints directly via httpx or requests:
If you don’t need HTTP fallback (because you only use official SDKs), turn it off to skip patching:

Verifying configuration at startup

The startup banner echoes the resolved configuration:
If you don’t see this line, either init() was never called, or you passed quiet=True. Set quiet=False and re-run to confirm the SDK is active.

What’s next

Blocking behavior

Choose between raise and stub modes.

Multi-agent context

Distinguish several agents in one process.