> ## 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. Defaults to True so a
gateway started from the out-of-box path remembers conversations
across restarts/redeploys via the SQLite transcript store. Set
`persist: false` in the config to opt into ephemeral, in-memory
sessions.
persist\_path: Path for session persistence
store: Persistence backend when `persist` is set — `"sqlite"`
(default: transcripts in a WAL SQLite DB with concurrent readers
and indexed lookups) or `"file"` (legacy per-session JSON files)
resume\_window: How long (seconds) a session stays resumable after disconnect
max\_inbox: Maximum queued messages per session (0 = unlimited, default 256)
metadata: Additional session metadata
mirror\_runtime\_state: Enable runtime state mirroring for native transcript replay (Issue #1943)

## 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[str]">
  No description available.
</ResponseField>

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

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

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

<ResponseField name="metadata" type="Dict[str, Any]">
  No description available.
</ResponseField>

<ResponseField name="mirror_runtime_state" type="bool">
  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#L301">
  `praisonaiagents/gateway/config.py` at line 301
</Card>

***

## Related Documentation

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

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

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

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

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