# 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/398d6cc59d4cf81ab23c09f037e9f521c3fedcd6/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py#L53)