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

# Delete State • AI Agent SDK

> delete_state: Delete a state key if it exists. Returns True if deleted, False if key didn't exist.

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

Delete a state key if it exists. Returns True if deleted, False if key didn't exist.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def delete_state(key: str) -> bool
```

## Parameters

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

### Returns

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

## Source

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