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:
adapter: slack
bot_token: "${SLACK_BOT_TOKEN}"
signing_secret: "${SLACK_SIGNING_SECRET}"
whatsapp_baileys:
adapter: whatsapp_baileys
mode: self-chat
allowed_users: null
connect_timeout: 120
whatsapp:
adapter: whatsapp
phone_number_id: "${WA_PHONE_NUMBER_ID}"
access_token: "${WA_ACCESS_TOKEN}"
verify_token: "${WA_VERIFY_TOKEN}"
app_secret: "${WA_APP_SECRET}"
webhook:
adapter: webhook
routes:
github_pr:
events: ["pull_request"]
secret: "${GITHUB_WEBHOOK_SECRET}"
agent: default
prompt: |
A GitHub event was received. Handle it appropriately.
Payload:
{payload}
deliver: log
agents:
default:
name: webhook-agent
provider: anthropic
model: null
system_prompt: "Process incoming webhook events and take appropriate action."
permission_mode: default
max_tokens: 4096
max_iterations: 20
tool_timeout: 120.0
conversation_summarization_enabled: true
persistence_enabled: false
allowed_tools: []
disallowed_tools: []
cwd: null
env: {}
llm_options: {}
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.