# AgentState

> **Class** in `langgraph.prebuilt`

📖 [View in docs](https://reference.langchain.com/python/langgraph.prebuilt/chat_agent_executor/AgentState)

The state of the agent.

## Signature

```python
AgentState()
```

## Extends

- `TypedDict`

## Constructors

```python
__init__(
    messages: Annotated[Sequence[BaseMessage], add_messages],
    remaining_steps: NotRequired[RemainingSteps],
)
```

| Name | Type |
|------|------|
| `messages` | `Annotated[Sequence[BaseMessage], add_messages]` |
| `remaining_steps` | `NotRequired[RemainingSteps]` |


## Properties

- `messages`
- `remaining_steps`

## ⚠️ Deprecated

AgentState has been moved to `langchain.agents`. Please update your import to `from langchain.agents import AgentState`.

---

[View source on GitHub](https://github.com/langchain-ai/langgraph/blob/3614e88c58af63f597764218646e85c49952b2da/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py#L53)