> ## 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.

# Session Config • AI Agent SDK

> SessionConfig: Configuration for gateway sessions.

# SessionConfig

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

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

Configuration for gateway sessions.

Attributes:
timeout: Session timeout in seconds (0 = no timeout)
max\_messages: Maximum messages to keep in history (0 = unlimited)
persist: Whether to persist session state
persist\_path: Path for session persistence
metadata: Additional session metadata

## Properties

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

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

<ResponseField name="persist" type="bool">
  No description available.
</ResponseField>

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

<ResponseField name="metadata" type="Dict">
  No description available.
</ResponseField>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Session Management" icon="clock" href="/docs/concepts/session-management" />

  <Card title="Sessions Feature" icon="folder" href="/docs/features/sessions" />

  <Card title="Session Persistence" icon="database" href="/docs/features/session-persistence" />

  <Card title="Configuration Overview" icon="gear" href="/docs/configuration/index" />

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