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

# Set State • AI Agent SDK

> set_state: Set a state value

# set\_state

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

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

Set a state value

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def set_state(key: str, value: Any) -> None
```

## Parameters

<ParamField query="key" type="str" required={true}>
  No description available.
</ParamField>

<ParamField query="value" type="Any" required={true}>
  No description available.
</ParamField>

## 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/agents/agents.py#L1405">
  `praisonaiagents/agents/agents.py` at line 1405
</Card>
