diff --git a/.env.example b/.env.example index 6da7517..59b93dd 100644 --- a/.env.example +++ b/.env.example @@ -24,5 +24,11 @@ INFOQUEST_API_KEY=your-infoquest-api-key # SLACK_APP_TOKEN=your-slack-app-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_TOKEN=your-github-token diff --git a/README.md b/README.md index 4cd819f..fa8712d 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ DeerFlow has newly integrated the intelligent search and crawling toolset indepe - [Sandbox Mode](#sandbox-mode) - [MCP Server](#mcp-server) - [IM Channels](#im-channels) + - [LangSmith Tracing](#langsmith-tracing) - [From Deep Research to Super Agent Harness](#from-deep-research-to-super-agent-harness) - [Core Features](#core-features) - [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. +#### 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 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. diff --git a/README_fr.md b/README_fr.md index abb7480..066e247 100644 --- a/README_fr.md +++ b/README_fr.md @@ -58,6 +58,7 @@ DeerFlow intègre désormais le toolkit de recherche et de crawling intelligent - [Mode Sandbox](#mode-sandbox) - [Serveur MCP](#serveur-mcp) - [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) - [Fonctionnalités principales](#fonctionnalités-principales) - [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. +#### 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 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. diff --git a/README_ja.md b/README_ja.md index 0a44f31..ee4517d 100644 --- a/README_ja.md +++ b/README_ja.md @@ -58,6 +58,7 @@ DeerFlowは、BytePlusが独自に開発したインテリジェント検索・ - [サンドボックスモード](#サンドボックスモード) - [MCPサーバー](#mcpサーバー) - [IMチャネル](#imチャネル) + - [LangSmithトレーシング](#langsmithトレーシング) - [Deep Researchからスーパーエージェントハーネスへ](#deep-researchからスーパーエージェントハーネスへ) - [コア機能](#コア機能) - [スキルとツール](#スキルとツール) @@ -342,6 +343,21 @@ FEISHU_APP_SECRET=your_app_secret > コマンドプレフィックスのないメッセージは通常のチャットとして扱われ、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からスーパーエージェントハーネスへ DeerFlowはDeep Researchフレームワークとして始まり、コミュニティがそれを大きく発展させました。リリース以来、開発者たちはリサーチを超えて活用してきました:データパイプラインの構築、スライドデッキの生成、ダッシュボードの立ち上げ、コンテンツワークフローの自動化。私たちが予想もしなかったことです。 diff --git a/README_ru.md b/README_ru.md index dc18847..086c79a 100644 --- a/README_ru.md +++ b/README_ru.md @@ -60,6 +60,7 @@ DeerFlow интегрирован с инструментарием для ум - [Режим Sandbox](#режим-sandbox) - [MCP-сервер](#mcp-сервер) - [Мессенджеры](#мессенджеры) + - [Трассировка LangSmith](#трассировка-langsmith) - [От Deep Research к Super Agent Harness](#от-deep-research-к-super-agent-harness) - [Core Features](#core-features) - [Skills & Tools](#skills--tools) @@ -294,6 +295,22 @@ channels: > Сообщения без команды воспринимаются как обычный чат — 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 DeerFlow начинался как фреймворк для Deep Research, и сообщество вышло далеко за эти рамки. После запуска разработчики строили пайплайны, генерировали презентации, поднимали дашборды, автоматизировали контент. То, чего мы не ожидали. diff --git a/README_zh.md b/README_zh.md index 9d4f1a2..3d6eef7 100644 --- a/README_zh.md +++ b/README_zh.md @@ -46,6 +46,7 @@ https://github.com/user-attachments/assets/a8bcadc4-e040-4cf2-8fda-dd768b999c18 - [Sandbox 模式](#sandbox-模式) - [MCP Server](#mcp-server) - [IM 渠道](#im-渠道) + - [LangSmith 链路追踪](#langsmith-链路追踪) - [从 Deep Research 到 Super Agent Harness](#从-deep-research-到-super-agent-harness) - [核心特性](#核心特性) - [Skills 与 Tools](#skills-与-tools) @@ -330,6 +331,21 @@ FEISHU_APP_SECRET=your_app_secret > 没有命令前缀的消息会被当作普通聊天处理。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 DeerFlow 最初是一个 Deep Research 框架,后来社区把它一路推到了更远的地方。上线之后,开发者拿它去做的事情早就不止研究:搭数据流水线、生成演示文稿、快速起 dashboard、自动化内容流程,很多方向一开始连我们自己都没想到。 diff --git a/backend/README.md b/backend/README.md index 063ae24..d3b2615 100644 --- a/backend/README.md +++ b/backend/README.md @@ -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. - 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 diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 4c2d689..4fe0329 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -16,8 +16,8 @@ # DEER_FLOW_REPO_ROOT — repo root (used for skills host path in DooD) # BETTER_AUTH_SECRET — required for frontend auth/session security # -# LangSmith tracing is disabled by default (LANGCHAIN_TRACING_V2=false). -# Set LANGCHAIN_TRACING_V2=true and LANGSMITH_API_KEY in .env to enable it. +# LangSmith tracing is disabled by default (LANGSMITH_TRACING=false). +# Set LANGSMITH_TRACING=true and LANGSMITH_API_KEY in .env to enable it. # # Access: http://localhost:${PORT:-2026} @@ -144,8 +144,8 @@ services: - DEER_FLOW_HOST_SKILLS_PATH=${DEER_FLOW_REPO_ROOT}/skills - DEER_FLOW_SANDBOX_HOST=host.docker.internal # Disable LangSmith tracing — LANGSMITH_API_KEY is not required. - # Set LANGCHAIN_TRACING_V2=true and LANGSMITH_API_KEY in .env to enable. - - LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2:-false} + # Set LANGSMITH_TRACING=true and LANGSMITH_API_KEY in .env to enable. + - LANGSMITH_TRACING=${LANGSMITH_TRACING:-false} env_file: - ../.env extra_hosts: