Skip to main content
n8n is a workflow automation platform that includes advanced AI capabilities built on LangChain. n8n has a native LangSmith integration that lets you send traces from your AI workflows to LangSmith for debugging, evaluation, and observability.

Prerequisites

Set up tracing

1

Add LangSmith credentials in n8n

  1. In your n8n instance, go to Settings > Credentials.
  2. Select Add Credential and search for LangSmith.
  3. Enter your LangSmith API key.
  4. Select Save.
For more details, refer to the n8n credentials documentation.
2

Connect LangSmith to your AI workflow

  1. Open an AI workflow that uses LangChain nodes (for example, an AI Agent or Basic LLM Chain node).
  2. In the root LangChain node, find the Connect LangSmith option.
  3. Select your LangSmith credential.
n8n automatically traces all LangChain node executions in the workflow and sends them to LangSmith.

View traces in LangSmith

After running your workflow:
  1. Open the LangSmith UI.
  2. Select your project.
  3. Locate the trace corresponding to your workflow execution.
You’ll be able to inspect:
  • LLM inputs and outputs
  • Agent execution steps
  • Tool calls and results
  • Timing and error information

Additional resources