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

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

Method

> This is a method of the [**Agents**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/Agents.md) class in the [**agents**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/agents.md) 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

**key** `str` *required*

No description available.

**amount** `float` (default: 1)

No description available.

**default** `float` (default: 0)

No description available.

### Returns

**Returns** `float`

The result of the operation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.