The SDK is configured at three layers. From highest to lowest precedence:Documentation Index
Fetch the complete documentation index at: https://docs.egisai.co/llms.txt
Use this file to discover all available pages before exploring further.
- Keyword arguments to
egisai.init(...). - Environment variables read by
egisai.init(). - Defaults built into the package.
EGISAI_API_KEY and pass app= /
env= to init(). Everything else has a sensible default.
Initialization parameters
| Parameter | Default | What it does |
|---|---|---|
api_key | — | Required. Your SDK API key (egis_live_…). Falls back to EGISAI_API_KEY. |
app | "default" | Logical agent name — appears as an Agent on the dashboard. |
env | "production" | Environment label for segmentation ("dev", "staging", "prod", …). |
base_url | Hosted control plane | Override only when directed by EgisAI. Falls back to EGISAI_BASE_URL. |
on_block | "raise" | "raise" to raise PermissionError, "stub" to return a refusal-shaped response. |
refresh_interval_seconds | 10.0 | Polling interval for policy updates when the live channel is unavailable. |
enable_sse | True | Subscribe to live policy updates. |
enable_http_fallback | True | Patch httpx / requests for HTTP-level audit visibility. |
quiet | False | Suppress the one-line startup banner on stderr. |
init reference.
Environment variables
| Variable | Purpose |
|---|---|
EGISAI_API_KEY | SDK API key if not passed as api_key=. |
EGISAI_BASE_URL | Override the control plane URL. Use only if directed to do so. |
Recommended setups
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:Custom HTTP clients only
If your application doesn’t use any official provider SDK and instead calls endpoints directly viahttpx or requests:
Verifying configuration at startup
The startup banner echoes the resolved configuration: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.