Skip to content

Commit 890747d

Browse files
committed
feat(core): Add per-workflow LangSmith tracing configuration.
1 parent 56f7261 commit 890747d

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

docs/advanced-ai/langchain/langsmith.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,32 @@ Self-hosted n8n only.
4040

4141
1. Restart n8n.
4242

43+
## Per-workflow LangSmith configuration
44+
45+
In addition to instance-wide environment variables, you can configure LangSmith tracing on a per-workflow basis. This lets you send traces from different workflows to different LangSmith projects or accounts without changing global settings.
46+
47+
### Set up a LangSmith credential
48+
49+
1. Go to **Settings** > **Credentials** and select **Add Credential**.
50+
2. Search for **LangSmith API** and select it.
51+
3. Enter your **API Key** from [LangSmith settings](https://smith.langchain.com/settings).
52+
4. Optionally change the **API URL** if you use a self-hosted LangSmith instance.
53+
5. Select **Save** to store the credential.
54+
55+
### Configure a workflow to use LangSmith
56+
57+
1. Open your workflow.
58+
2. Select the **three dots icon** <span class="n8n-inline-image">![three dots icon](/_images/common-icons/three-dots-horizontal.png){.off-glb}</span> in the upper-right corner.
59+
3. Select **Settings**.
60+
4. In the **LangSmith** section:
61+
- **LangSmith Credential**: Select the LangSmith API credential to use for this workflow.
62+
- **LangSmith Project**: Enter the project name where traces should appear. Defaults to `"default"` if left empty.
63+
5. Select **Save**.
64+
65+
Once configured, all AI node executions in that workflow send traces to the specified LangSmith project. This overrides any instance-level `LANGCHAIN_PROJECT` environment variable for this workflow.
66+
67+
/// note
68+
The per-workflow setting requires creating a LangSmith API credential. The credential stores the API key securely using n8n's credential encryption.
69+
///
70+
4371
For information on using LangSmith, refer to [LangSmith's documentation](https://docs.smith.langchain.com/).

docs/workflows/settings.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ Controls whether n8n redacts execution data from manually triggered executions.
8282

8383
Refer to [Execution data redaction](/workflows/executions/execution-data-redaction.md) for details on redaction policies, revealing data, and permission requirements.
8484

85+
### LangSmith tracing
86+
87+
Configure [LangSmith](/advanced-ai/langchain/langsmith.md) tracing on a per-workflow basis to monitor AI node executions.
88+
89+
- **LangSmith Credential**: Select a LangSmith API credential to enable tracing for this workflow.
90+
- **LangSmith Project**: The LangSmith project name where traces appear. Defaults to `"default"`.
91+
92+
This overrides any instance-level LangSmith environment variables for the workflow. See [Use LangSmith with n8n](/advanced-ai/langchain/langsmith.md#per-workflow-langsmith-configuration) for setup instructions.
93+
8594
### Estimated time saved
8695

8796
An estimate of the number of minutes each of execution of this workflow saves you.

0 commit comments

Comments
 (0)