> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gateway Config • AI Agent SDK

> GatewayConfig: Configuration for the gateway server.

# GatewayConfig

> Defined in the [**config**](../modules/config) module.

<Badge color="blue">AI Agent</Badge>

Configuration for the gateway server.

Attributes:
host: Host to bind to
port: Port to listen on
cors\_origins: Allowed CORS origins
auth\_token: Optional authentication token
max\_connections: Maximum concurrent connections
max\_sessions\_per\_agent: Maximum sessions per agent (0 = unlimited)
session\_config: Default session configuration
heartbeat\_interval: Heartbeat interval in seconds
reconnect\_timeout: Time to wait for reconnection before closing session
ssl\_cert: Path to SSL certificate (for HTTPS/WSS)
ssl\_key: Path to SSL key

## Properties

<ResponseField name="host" type="str">
  No description available.
</ResponseField>

<ResponseField name="port" type="int">
  No description available.
</ResponseField>

<ResponseField name="cors_origins" type="List">
  No description available.
</ResponseField>

<ResponseField name="auth_token" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="max_connections" type="int">
  No description available.
</ResponseField>

<ResponseField name="max_sessions_per_agent" type="int">
  No description available.
</ResponseField>

<ResponseField name="session_config" type="SessionConfig">
  No description available.
</ResponseField>

<ResponseField name="heartbeat_interval" type="int">
  No description available.
</ResponseField>

<ResponseField name="reconnect_timeout" type="int">
  No description available.
</ResponseField>

<ResponseField name="ssl_cert" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="ssl_key" type="Optional">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="is_secure()" icon="function" href="../functions/GatewayConfig-is_secure">
    Whether SSL/TLS is enabled.
  </Card>

  <Card title="ws_url()" icon="function" href="../functions/GatewayConfig-ws_url">
    WebSocket URL for this gateway.
  </Card>

  <Card title="http_url()" icon="function" href="../functions/GatewayConfig-http_url">
    HTTP URL for this gateway.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Convert to dictionary (hides sensitive data).
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/config.py#L41">
  `praisonaiagents/gateway/config.py` at line 41
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Configuration Overview" icon="gear" href="/docs/configuration/index" />

  <Card title="Agent Config" icon="robot" href="/docs/configuration/agent-config" />

  <Card title="Gateway Feature" icon="tower-broadcast" href="/docs/features/gateway" />
</CardGroup>
