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

# Increment State • AI Agent SDK

> increment_state: Increment a numeric state value. Creates the key with default if it doesn't exist.

# increment\_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.

Increment a numeric state value. Creates the key with default if it doesn't exist.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def increment_state(key: str, amount: float, default: float) -> float
```

## Parameters

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

<ParamField query="amount" type="float" required={false} default="1">
  No description available.
</ParamField>

<ParamField query="default" type="float" required={false} default="0">
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="float">
  The result of the operation.
</ResponseField>

## Uses

* `TypeError`

## Source

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