Gateway YAML Configuration
The standalone gateway reads its configuration from <project>/.agentix/gateway.yaml.
File location resolution
--cwdargument (CLI) orcwdargument (build_gateway(cwd=...))AGENTIX_GATEWAY_PROJECT_CWDenvironment variableAGENTIX_CWDenvironment variable- Process CWD
~/.agentix/gateway.yaml(user home fallback)
Example gateway.yaml
agent:
name: support-agent
provider: anthropic
model: claude-sonnet-4-20250514
system_prompt: "You are a helpful support agent."
max_iterations: 20
server:
host: "0.0.0.0"
port: 8080
session_ttl: 7200
channels:
slack:
type: slack
bot_token: "${SLACK_BOT_TOKEN}"
signing_secret: "${SLACK_SIGNING_SECRET}"
whatsapp:
type: whatsapp
phone_number_id: "${WA_PHONE_NUMBER_ID}"
access_token: "${WA_ACCESS_TOKEN}"
verify_token: "${WA_VERIFY_TOKEN}"
app_secret: "${WA_APP_SECRET}"
webhook_github:
type: webhook
route: github
secret: "${GITHUB_WEBHOOK_SECRET}"
Environment variable substitution
YAML values in the form ${VAR_NAME} are substituted from the process environment. Use a .env file in the project root for local development:
# <project>/.env
SLACK_BOT_TOKEN=xoxb-...
SLACK_SIGNING_SECRET=...
Loading YAML from Python
from agentix.gateway._config import build_gateway
gateway, server_cfg, config, resolved_path = build_gateway()
# or
gateway, server_cfg, config, resolved_path = build_gateway(cwd="/path/to/project")
print(f"Loaded config from: {resolved_path}")
await gateway.start(host=server_cfg["host"], port=server_cfg["port"])
build_gatewayis not re-exported fromagentix.gateway. Import directly fromagentix.gateway._config.
agent section
Maps to AgentixAgentOptions fields. All fields are optional with the same defaults.
server section
| Key | Default | Description |
|---|---|---|
host | "0.0.0.0" | Bind address |
port | 8080 | HTTP port |
channels section
Each key is a channel name; the type field selects the adapter. See individual adapter docs for channel-specific fields.