Interleaved Thinking Agents

Title: Feature Request: Support for Anthropic’s “Interleaved Thinking” via Custom Headers in the Anthropic Node

The idea is:

To add a new option in the “Anthropic Chat Model” node that allows users to specify custom API headers.

The core idea is to enable support for advanced, model-specific beta features that are not yet in the main UI. A perfect example is Anthropic’s “interleaved thinking” feature.

The implementation could be a simple key-value input field for “Additional Headers” within the node’s parameters, allowing a user to enter:

  • Header Name: anthropic-beta
  • Header Value: interleaved-thinking-2025-05-14

My use case:

My use case is to build more sophisticated and capable AI agents using n8n’s AI Agent framework. I want to leverage Anthropic’s “interleaved thinking” feature to create agents that can reason in a deeper and more sophisticated way than previously possible when deciding what tool to call next in tool call chaining operations.

This would allow my agent to perform a complex, multi-step task, such as:

  1. Calling a tool to fetch data (e.g., a customer’s order history).
  2. Reasoning about the results of that tool call (e.g., “This customer is a VIP but hasn’t ordered recently”).
  3. Using that reasoning to dynamically decide which tool to use next or how to formulate its final response (e.g., “I will now call the ‘send-discount-code’ tool with a 20% offer”).
  4. This Improved reasoning would dramatically increase the already incredible power of Claude models when it comes to tool calling when connected to the langchain AI Agent node.

I think it would be beneficial to add this because:

This feature will solve the current limitation where n8n users cannot access powerful beta features from leading AI models like Anthropic within the AI Agent node. It bridges the gap between the full capabilities of the underlying model and what is currently possible in n8n.

Adding this would unlock a new level of intelligence for agents built in n8n, allowing them to handle more complex, real-world problems that require dynamic planning and reasoning between steps. It also future-proofs the node, allowing the community to experiment with new features from model providers without having to wait for an official n8n update for every new feature.

Any resources to support this?

Yes, here is the official Anthropic documentation that describes the “interleaved thinking” feature and the specific beta header required to enable it.

Are you willing to work on this?

Yes but only with help as I am not very familiar with langchain.