API Config • AI Agent SDK

ApiConfig: Configuration for additive protocol surfaces on the gateway app.

ApiConfig

Defined in the config module.

AI Agent

Configuration for additive protocol surfaces on the gateway app.

All surfaces are opt-in. When both are False (default), no extra routes are mounted and the gateway behaves exactly as before.

Attributes: openai: Serve OpenAI-compatible endpoints (`/v1/chat/completions, /v1/responses, /v1/models) backed by the gateway's live agents and sessions. mcp: Serve an MCP JSON-RPC endpoint (/mcp) exposing the gateway's registered agents as callable tools. stream: Emit true token-level deltas on the OpenAI-compatible /v1/chat/completions SSE surface (stream:true) by wiring the agent's existing stream_emitter` through the gateway hot path. Off by default: streaming responses stay byte-for-byte the buffered single-chunk path, so enabling it never regresses non-streaming latency or correctness.

Properties

ResponseField bool

No description available.

ResponseField bool

No description available.

ResponseField bool

No description available.

Methods

Internal & Generic Methods
  • from_dict: Create from a parsed `gateway.api` mapping (tolerant of None).
  • to_dict: Convert to dictionary.

Source

View on GitHub

praisonaiagents/gateway/config.py at line 860


Related Documentation