Skip to content
masterclass Buddy

LangChain · Class

RemoveMessage

RemoveMessage tells LangGraph to delete one message from graph state. Use a message ID for one message, or REMOVE_ALL_MESSAGES to clear the history.

Last updated

Syntax

RemoveMessage(id: str, kwargs: Any = {})

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BaseMessage
  • REMOVE_ALL_MESSAGES
  • add_messages
  • AgentState
  • short-term memory

Source: Short-term memory - Docs by LangChain Documentation. Checked 2026-11-03.