mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-22 07:32:25 +02:00
because in
```python
def call_model(
state: AgentState,
config: RunnableConfig,
)
...
if (
(
"remaining_steps" not in state
and state["is_last_step"]
and has_tool_calls
)
```
https://github.com/langchain-ai/langgraph/blob/c0b56bf60d84ed435609c35b0691cd0305ceae78/libs/langgraph/langgraph/prebuilt/chat_agent_executor.py#L543
the AgentState requires is_last_step to have a default value, like
`False`, and `IsLastStep` can satisfy it.
---------
Co-authored-by: Vadym Barda <vadym@langchain.dev>