Skip to main content
The LangChain adapter runs agents built with LangChain’s createAgent (create_agent in Python), which runs on LangGraph. It is a LangChain middleware. It works with LangChain 1 and LangGraph 1.

TypeScript example

A complete LangChain agent in TypeScript.

Python example

A complete LangChain agent in Python.

Install

How it works

Add the Tilde middleware to the agent. On each model call, it adds the channel’s tools, the agent’s Tilde and bundled tools, and skills. It runs Tilde tool calls, and adds new user input to the agent’s state.
The adapter also works with createReactAgent and bindTools, through withTildeTools.

Feature compatibility

Limitations

  • Python is async only. Call the agent with ainvoke or astream.
  • Dynamic prompts in TypeScript. A dynamicSystemPromptMiddleware prompt is not versioned, because its text is hidden in a closure. Discovery warns. Use definePrompt for it.
  • External prompts. LangSmith Hub prompts and Jinja2 templates are reported as warnings, not versioned.
  • Injected state. In search mode, a tool that needs LangGraph-injected state, such as ToolRuntime or InjectedState, runs without that state.
  • Tracing. LangSmith tracing is separate from Tilde, and sends data to LangSmith.