> ## 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 State • AI Agent SDK

> get_state: Get session state.

# get\_state

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**GatewaySessionProtocol**](../classes/GatewaySessionProtocol) class in the [**protocols**](../modules/protocols) module.

Get session state.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_state() -> Dict[str, Any]
```

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  The result of the operation.
</ResponseField>

## Used By

* [`Session.increment_state`](../functions/Session-increment_state)

## Source

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