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

# Get Session Spill Dir • AI Agent SDK

> get_session_spill_dir: Get the session spill directory (last-resort salvage on write failure).

# get\_session\_spill\_dir

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**paths**](../modules/paths) module.

Get the session spill directory (last-resort salvage on write failure).

When a durable session write fails (disk-full / corruption / permission),
the already-produced turn is spilled here atomically and re-ingested on the
next load (Issue #3597).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_session_spill_dir() -> Path
```

### Returns

<ResponseField name="Returns" type="Path">
  Path to \~/.praisonai/state/session\_spill/
</ResponseField>

## Uses

* `get_data_dir`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/paths.py#L120">
  `praisonaiagents/paths.py` at line 120
</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" />
</CardGroup>
