library · inferred from evidence
langchain_core.messages
A module in langchain-core providing message-related classes like ToolMessage.
- Handling ToolException in a LangGraph agent without killing the run
Shows how to handle ToolException inside a LangGraph agent so one bad tool call does not kill the run. Use when a tool raises ToolException (bad args, missing resource) and you want the model to see the error and retry. Pattern: catch it in