mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-02 22:02:13 +08:00
docs: add LangSmith tracing configuration and documentation (#1414)
Add LangSmith tracing setup instructions across the project: - .env.example: add LANGSMITH_* env vars (commented out) - README.md + translations (zh/ja/fr/ru): add LangSmith Tracing section under Advanced with setup steps and env var reference - backend/README.md: add detailed LangSmith Tracing section with setup, env var table, how-it-works explanation, and Docker notes - docker-compose.yaml: update LANGCHAIN_TRACING_V2 to LANGSMITH_TRACING for naming consistency with the rest of the project Made-with: Cursor Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -24,5 +24,11 @@ INFOQUEST_API_KEY=your-infoquest-api-key
|
|||||||
# SLACK_APP_TOKEN=your-slack-app-token
|
# SLACK_APP_TOKEN=your-slack-app-token
|
||||||
# TELEGRAM_BOT_TOKEN=your-telegram-bot-token
|
# TELEGRAM_BOT_TOKEN=your-telegram-bot-token
|
||||||
|
|
||||||
|
# Enable LangSmith to monitor and debug your LLM calls, agent runs, and tool executions.
|
||||||
|
# LANGSMITH_TRACING=true
|
||||||
|
# LANGSMITH_ENDPOINT=https://api.smith.langchain.com
|
||||||
|
# LANGSMITH_API_KEY=your-langsmith-api-key
|
||||||
|
# LANGSMITH_PROJECT=your-langsmith-project
|
||||||
|
|
||||||
# GitHub API Token
|
# GitHub API Token
|
||||||
# GITHUB_TOKEN=your-github-token
|
# GITHUB_TOKEN=your-github-token
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -58,6 +58,7 @@ DeerFlow has newly integrated the intelligent search and crawling toolset indepe
|
|||||||
- [Sandbox Mode](#sandbox-mode)
|
- [Sandbox Mode](#sandbox-mode)
|
||||||
- [MCP Server](#mcp-server)
|
- [MCP Server](#mcp-server)
|
||||||
- [IM Channels](#im-channels)
|
- [IM Channels](#im-channels)
|
||||||
|
- [LangSmith Tracing](#langsmith-tracing)
|
||||||
- [From Deep Research to Super Agent Harness](#from-deep-research-to-super-agent-harness)
|
- [From Deep Research to Super Agent Harness](#from-deep-research-to-super-agent-harness)
|
||||||
- [Core Features](#core-features)
|
- [Core Features](#core-features)
|
||||||
- [Skills \& Tools](#skills--tools)
|
- [Skills \& Tools](#skills--tools)
|
||||||
@@ -391,6 +392,21 @@ Once a channel is connected, you can interact with DeerFlow directly from the ch
|
|||||||
|
|
||||||
> Messages without a command prefix are treated as regular chat — DeerFlow creates a thread and responds conversationally.
|
> Messages without a command prefix are treated as regular chat — DeerFlow creates a thread and responds conversationally.
|
||||||
|
|
||||||
|
#### LangSmith Tracing
|
||||||
|
|
||||||
|
DeerFlow has built-in [LangSmith](https://smith.langchain.com) integration for observability. When enabled, all LLM calls, agent runs, and tool executions are traced and visible in the LangSmith dashboard.
|
||||||
|
|
||||||
|
Add the following to your `.env` file:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LANGSMITH_TRACING=true
|
||||||
|
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
|
||||||
|
LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxx
|
||||||
|
LANGSMITH_PROJECT=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
For Docker deployments, tracing is disabled by default. Set `LANGSMITH_TRACING=true` and `LANGSMITH_API_KEY` in your `.env` to enable it.
|
||||||
|
|
||||||
## From Deep Research to Super Agent Harness
|
## From Deep Research to Super Agent Harness
|
||||||
|
|
||||||
DeerFlow started as a Deep Research framework — and the community ran with it. Since launch, developers have pushed it far beyond research: building data pipelines, generating slide decks, spinning up dashboards, automating content workflows. Things we never anticipated.
|
DeerFlow started as a Deep Research framework — and the community ran with it. Since launch, developers have pushed it far beyond research: building data pipelines, generating slide decks, spinning up dashboards, automating content workflows. Things we never anticipated.
|
||||||
|
|||||||
16
README_fr.md
16
README_fr.md
@@ -58,6 +58,7 @@ DeerFlow intègre désormais le toolkit de recherche et de crawling intelligent
|
|||||||
- [Mode Sandbox](#mode-sandbox)
|
- [Mode Sandbox](#mode-sandbox)
|
||||||
- [Serveur MCP](#serveur-mcp)
|
- [Serveur MCP](#serveur-mcp)
|
||||||
- [Canaux de messagerie](#canaux-de-messagerie)
|
- [Canaux de messagerie](#canaux-de-messagerie)
|
||||||
|
- [Traçage LangSmith](#traçage-langsmith)
|
||||||
- [Du Deep Research au Super Agent Harness](#du-deep-research-au-super-agent-harness)
|
- [Du Deep Research au Super Agent Harness](#du-deep-research-au-super-agent-harness)
|
||||||
- [Fonctionnalités principales](#fonctionnalités-principales)
|
- [Fonctionnalités principales](#fonctionnalités-principales)
|
||||||
- [Skills et outils](#skills-et-outils)
|
- [Skills et outils](#skills-et-outils)
|
||||||
@@ -389,6 +390,21 @@ Une fois un canal connecté, vous pouvez interagir avec DeerFlow directement dep
|
|||||||
|
|
||||||
> Les messages sans préfixe de commande sont traités comme du chat classique — DeerFlow crée un thread et répond de manière conversationnelle.
|
> Les messages sans préfixe de commande sont traités comme du chat classique — DeerFlow crée un thread et répond de manière conversationnelle.
|
||||||
|
|
||||||
|
#### Traçage LangSmith
|
||||||
|
|
||||||
|
DeerFlow intègre nativement [LangSmith](https://smith.langchain.com) pour l'observabilité. Une fois activé, tous les appels LLM, les exécutions d'agents et les exécutions d'outils sont tracés et visibles dans le tableau de bord LangSmith.
|
||||||
|
|
||||||
|
Ajoutez les lignes suivantes à votre fichier `.env` :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LANGSMITH_TRACING=true
|
||||||
|
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
|
||||||
|
LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxx
|
||||||
|
LANGSMITH_PROJECT=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
Pour les déploiements Docker, le traçage est désactivé par défaut. Définissez `LANGSMITH_TRACING=true` et `LANGSMITH_API_KEY` dans votre `.env` pour l'activer.
|
||||||
|
|
||||||
## Du Deep Research au Super Agent Harness
|
## Du Deep Research au Super Agent Harness
|
||||||
|
|
||||||
DeerFlow a démarré comme un framework de Deep Research — et la communauté s'en est emparée. Depuis le lancement, les développeurs l'ont poussé bien au-delà de la recherche : construction de pipelines de données, génération de présentations, mise en place de dashboards, automatisation de workflows de contenu. Des usages qu'on n'avait jamais anticipés.
|
DeerFlow a démarré comme un framework de Deep Research — et la communauté s'en est emparée. Depuis le lancement, les développeurs l'ont poussé bien au-delà de la recherche : construction de pipelines de données, génération de présentations, mise en place de dashboards, automatisation de workflows de contenu. Des usages qu'on n'avait jamais anticipés.
|
||||||
|
|||||||
16
README_ja.md
16
README_ja.md
@@ -58,6 +58,7 @@ DeerFlowは、BytePlusが独自に開発したインテリジェント検索・
|
|||||||
- [サンドボックスモード](#サンドボックスモード)
|
- [サンドボックスモード](#サンドボックスモード)
|
||||||
- [MCPサーバー](#mcpサーバー)
|
- [MCPサーバー](#mcpサーバー)
|
||||||
- [IMチャネル](#imチャネル)
|
- [IMチャネル](#imチャネル)
|
||||||
|
- [LangSmithトレーシング](#langsmithトレーシング)
|
||||||
- [Deep Researchからスーパーエージェントハーネスへ](#deep-researchからスーパーエージェントハーネスへ)
|
- [Deep Researchからスーパーエージェントハーネスへ](#deep-researchからスーパーエージェントハーネスへ)
|
||||||
- [コア機能](#コア機能)
|
- [コア機能](#コア機能)
|
||||||
- [スキルとツール](#スキルとツール)
|
- [スキルとツール](#スキルとツール)
|
||||||
@@ -342,6 +343,21 @@ FEISHU_APP_SECRET=your_app_secret
|
|||||||
|
|
||||||
> コマンドプレフィックスのないメッセージは通常のチャットとして扱われ、DeerFlowがスレッドを作成して会話形式で応答します。
|
> コマンドプレフィックスのないメッセージは通常のチャットとして扱われ、DeerFlowがスレッドを作成して会話形式で応答します。
|
||||||
|
|
||||||
|
#### LangSmithトレーシング
|
||||||
|
|
||||||
|
DeerFlowには[LangSmith](https://smith.langchain.com)による可観測性が組み込まれています。有効にすると、すべてのLLM呼び出し、エージェント実行、ツール実行がトレースされ、LangSmithダッシュボードで確認できます。
|
||||||
|
|
||||||
|
`.env`ファイルに以下を追加します:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LANGSMITH_TRACING=true
|
||||||
|
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
|
||||||
|
LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxx
|
||||||
|
LANGSMITH_PROJECT=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
Dockerデプロイでは、トレーシングはデフォルトで無効です。`.env`で`LANGSMITH_TRACING=true`と`LANGSMITH_API_KEY`を設定して有効にします。
|
||||||
|
|
||||||
## Deep Researchからスーパーエージェントハーネスへ
|
## Deep Researchからスーパーエージェントハーネスへ
|
||||||
|
|
||||||
DeerFlowはDeep Researchフレームワークとして始まり、コミュニティがそれを大きく発展させました。リリース以来、開発者たちはリサーチを超えて活用してきました:データパイプラインの構築、スライドデッキの生成、ダッシュボードの立ち上げ、コンテンツワークフローの自動化。私たちが予想もしなかったことです。
|
DeerFlowはDeep Researchフレームワークとして始まり、コミュニティがそれを大きく発展させました。リリース以来、開発者たちはリサーチを超えて活用してきました:データパイプラインの構築、スライドデッキの生成、ダッシュボードの立ち上げ、コンテンツワークフローの自動化。私たちが予想もしなかったことです。
|
||||||
|
|||||||
17
README_ru.md
17
README_ru.md
@@ -60,6 +60,7 @@ DeerFlow интегрирован с инструментарием для ум
|
|||||||
- [Режим Sandbox](#режим-sandbox)
|
- [Режим Sandbox](#режим-sandbox)
|
||||||
- [MCP-сервер](#mcp-сервер)
|
- [MCP-сервер](#mcp-сервер)
|
||||||
- [Мессенджеры](#мессенджеры)
|
- [Мессенджеры](#мессенджеры)
|
||||||
|
- [Трассировка LangSmith](#трассировка-langsmith)
|
||||||
- [От Deep Research к Super Agent Harness](#от-deep-research-к-super-agent-harness)
|
- [От Deep Research к Super Agent Harness](#от-deep-research-к-super-agent-harness)
|
||||||
- [Core Features](#core-features)
|
- [Core Features](#core-features)
|
||||||
- [Skills & Tools](#skills--tools)
|
- [Skills & Tools](#skills--tools)
|
||||||
@@ -294,6 +295,22 @@ channels:
|
|||||||
|
|
||||||
> Сообщения без команды воспринимаются как обычный чат — DeerFlow создаёт тред и отвечает.
|
> Сообщения без команды воспринимаются как обычный чат — DeerFlow создаёт тред и отвечает.
|
||||||
|
|
||||||
|
#### Трассировка LangSmith
|
||||||
|
|
||||||
|
DeerFlow имеет встроенную интеграцию с [LangSmith](https://smith.langchain.com) для наблюдаемости. При включении все вызовы LLM, запуски агентов и выполнения инструментов отслеживаются и отображаются в дашборде LangSmith.
|
||||||
|
|
||||||
|
Добавьте в файл `.env` в корне проекта:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LANGSMITH_TRACING=true
|
||||||
|
LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxx
|
||||||
|
LANGSMITH_PROJECT=deer-flow
|
||||||
|
```
|
||||||
|
|
||||||
|
`LANGSMITH_ENDPOINT` по умолчанию `https://api.smith.langchain.com` и может быть переопределён при необходимости. Устаревшие переменные `LANGCHAIN_*` (`LANGCHAIN_TRACING_V2`, `LANGCHAIN_API_KEY` и т.д.) также поддерживаются для обратной совместимости; `LANGSMITH_*` имеет приоритет, когда заданы обе.
|
||||||
|
|
||||||
|
В Docker-развёртываниях трассировка отключена по умолчанию. Установите `LANGSMITH_TRACING=true` и `LANGSMITH_API_KEY` в `.env` для включения.
|
||||||
|
|
||||||
## От Deep Research к Super Agent Harness
|
## От Deep Research к Super Agent Harness
|
||||||
|
|
||||||
DeerFlow начинался как фреймворк для Deep Research, и сообщество вышло далеко за эти рамки. После запуска разработчики строили пайплайны, генерировали презентации, поднимали дашборды, автоматизировали контент. То, чего мы не ожидали.
|
DeerFlow начинался как фреймворк для Deep Research, и сообщество вышло далеко за эти рамки. После запуска разработчики строили пайплайны, генерировали презентации, поднимали дашборды, автоматизировали контент. То, чего мы не ожидали.
|
||||||
|
|||||||
16
README_zh.md
16
README_zh.md
@@ -46,6 +46,7 @@ https://github.com/user-attachments/assets/a8bcadc4-e040-4cf2-8fda-dd768b999c18
|
|||||||
- [Sandbox 模式](#sandbox-模式)
|
- [Sandbox 模式](#sandbox-模式)
|
||||||
- [MCP Server](#mcp-server)
|
- [MCP Server](#mcp-server)
|
||||||
- [IM 渠道](#im-渠道)
|
- [IM 渠道](#im-渠道)
|
||||||
|
- [LangSmith 链路追踪](#langsmith-链路追踪)
|
||||||
- [从 Deep Research 到 Super Agent Harness](#从-deep-research-到-super-agent-harness)
|
- [从 Deep Research 到 Super Agent Harness](#从-deep-research-到-super-agent-harness)
|
||||||
- [核心特性](#核心特性)
|
- [核心特性](#核心特性)
|
||||||
- [Skills 与 Tools](#skills-与-tools)
|
- [Skills 与 Tools](#skills-与-tools)
|
||||||
@@ -330,6 +331,21 @@ FEISHU_APP_SECRET=your_app_secret
|
|||||||
|
|
||||||
> 没有命令前缀的消息会被当作普通聊天处理。DeerFlow 会自动创建 thread,并以对话方式回复。
|
> 没有命令前缀的消息会被当作普通聊天处理。DeerFlow 会自动创建 thread,并以对话方式回复。
|
||||||
|
|
||||||
|
#### LangSmith 链路追踪
|
||||||
|
|
||||||
|
DeerFlow 内置了 [LangSmith](https://smith.langchain.com) 集成,用于可观测性。启用后,所有 LLM 调用、agent 运行和工具执行都会被追踪,并在 LangSmith 仪表盘中展示。
|
||||||
|
|
||||||
|
在 `.env` 文件中添加以下配置:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LANGSMITH_TRACING=true
|
||||||
|
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
|
||||||
|
LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxx
|
||||||
|
LANGSMITH_PROJECT=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
Docker 部署时,追踪默认关闭。在 `.env` 中设置 `LANGSMITH_TRACING=true` 和 `LANGSMITH_API_KEY` 即可启用。
|
||||||
|
|
||||||
## 从 Deep Research 到 Super Agent Harness
|
## 从 Deep Research 到 Super Agent Harness
|
||||||
|
|
||||||
DeerFlow 最初是一个 Deep Research 框架,后来社区把它一路推到了更远的地方。上线之后,开发者拿它去做的事情早就不止研究:搭数据流水线、生成演示文稿、快速起 dashboard、自动化内容流程,很多方向一开始连我们自己都没想到。
|
DeerFlow 最初是一个 Deep Research 框架,后来社区把它一路推到了更远的地方。上线之后,开发者拿它去做的事情早就不止研究:搭数据流水线、生成演示文稿、快速起 dashboard、自动化内容流程,很多方向一开始连我们自己都没想到。
|
||||||
|
|||||||
@@ -312,6 +312,26 @@ MCP servers and skill states in a single file:
|
|||||||
- Model API keys: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, etc.
|
- Model API keys: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, etc.
|
||||||
- Tool API keys: `TAVILY_API_KEY`, `GITHUB_TOKEN`, etc.
|
- Tool API keys: `TAVILY_API_KEY`, `GITHUB_TOKEN`, etc.
|
||||||
|
|
||||||
|
### LangSmith Tracing
|
||||||
|
|
||||||
|
DeerFlow has built-in [LangSmith](https://smith.langchain.com) integration for observability. When enabled, all LLM calls, agent runs, tool executions, and middleware processing are traced and visible in the LangSmith dashboard.
|
||||||
|
|
||||||
|
**Setup:**
|
||||||
|
|
||||||
|
1. Sign up at [smith.langchain.com](https://smith.langchain.com) and create a project.
|
||||||
|
2. Add the following to your `.env` file in the project root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LANGSMITH_TRACING=true
|
||||||
|
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
|
||||||
|
LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxx
|
||||||
|
LANGSMITH_PROJECT=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
**Legacy variables:** The `LANGCHAIN_TRACING_V2`, `LANGCHAIN_API_KEY`, `LANGCHAIN_PROJECT`, and `LANGCHAIN_ENDPOINT` variables are also supported for backward compatibility. `LANGSMITH_*` variables take precedence when both are set.
|
||||||
|
|
||||||
|
**Docker:** In `docker-compose.yaml`, tracing is disabled by default (`LANGSMITH_TRACING=false`). Set `LANGSMITH_TRACING=true` and provide `LANGSMITH_API_KEY` in your `.env` to enable it in containerized deployments.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
# DEER_FLOW_REPO_ROOT — repo root (used for skills host path in DooD)
|
# DEER_FLOW_REPO_ROOT — repo root (used for skills host path in DooD)
|
||||||
# BETTER_AUTH_SECRET — required for frontend auth/session security
|
# BETTER_AUTH_SECRET — required for frontend auth/session security
|
||||||
#
|
#
|
||||||
# LangSmith tracing is disabled by default (LANGCHAIN_TRACING_V2=false).
|
# LangSmith tracing is disabled by default (LANGSMITH_TRACING=false).
|
||||||
# Set LANGCHAIN_TRACING_V2=true and LANGSMITH_API_KEY in .env to enable it.
|
# Set LANGSMITH_TRACING=true and LANGSMITH_API_KEY in .env to enable it.
|
||||||
#
|
#
|
||||||
# Access: http://localhost:${PORT:-2026}
|
# Access: http://localhost:${PORT:-2026}
|
||||||
|
|
||||||
@@ -144,8 +144,8 @@ services:
|
|||||||
- DEER_FLOW_HOST_SKILLS_PATH=${DEER_FLOW_REPO_ROOT}/skills
|
- DEER_FLOW_HOST_SKILLS_PATH=${DEER_FLOW_REPO_ROOT}/skills
|
||||||
- DEER_FLOW_SANDBOX_HOST=host.docker.internal
|
- DEER_FLOW_SANDBOX_HOST=host.docker.internal
|
||||||
# Disable LangSmith tracing — LANGSMITH_API_KEY is not required.
|
# Disable LangSmith tracing — LANGSMITH_API_KEY is not required.
|
||||||
# Set LANGCHAIN_TRACING_V2=true and LANGSMITH_API_KEY in .env to enable.
|
# Set LANGSMITH_TRACING=true and LANGSMITH_API_KEY in .env to enable.
|
||||||
- LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2:-false}
|
- LANGSMITH_TRACING=${LANGSMITH_TRACING:-false}
|
||||||
env_file:
|
env_file:
|
||||||
- ../.env
|
- ../.env
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
|
|||||||
Reference in New Issue
Block a user