State-based text editor tool middleware.
Provides Anthropic's text_editor tool using LangGraph state for storage.
Files persist for the conversation thread.
_StateClaudeFileToolMiddlewareExample:
from langchain.agents import create_agent
from langchain.agents.middleware import StateTextEditorToolMiddleware
agent = create_agent(
model=model,
tools=[],
middleware=[StateTextEditorToolMiddleware()],
)