[PR #209] feat(deepagents): add SDK version metadata to agent traces #213

Open
opened 2026-02-16 06:17:27 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/209
Author: @hntrl
Created: 2/9/2026
Status: 🔄 Open

Base: mainHead: hunter/trace-metadata


📝 Commits (3)

  • 497d46a feat(deepagents): add SDK version metadata to agent traces
  • aa9ef05 Apply suggestions from code review
  • aaf0b1e Merge branch 'main' into hunter/trace-metadata

📊 Changes

4 files changed (+39 additions, -1 deletions)

View changed files

.changeset/sdk-trace-metadata.md (+5 -0)
📝 libs/deepagents/src/agent.ts (+13 -1)
📝 libs/deepagents/tsdown.config.ts (+11 -0)
📝 libs/deepagents/vitest.config.ts (+10 -0)

📄 Description

Summary

Add SDK version metadata to all agent runs created via createDeepAgent. Every trace sent to LangSmith now includes sdk: "deepagents-js" and sdk_version in the run metadata, making it easy to identify and filter deep agent runs.

Changes

  • libs/deepagents/src/agent.ts — Declare a __SDK_VERSION__ build-time constant and attach { sdk: "deepagents-js", sdk_version } to the .withConfig() metadata on the compiled agent.
  • libs/deepagents/tsdown.config.ts — Read the package version from package.json at build time and inject it via tsdown's define option, replacing __SDK_VERSION__ with the literal version string in the bundle.
  • libs/deepagents/vitest.config.ts — Mirror the same define so that __SDK_VERSION__ resolves during tests.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/209 **Author:** [@hntrl](https://github.com/hntrl) **Created:** 2/9/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `hunter/trace-metadata` --- ### 📝 Commits (3) - [`497d46a`](https://github.com/langchain-ai/deepagentsjs/commit/497d46a074ce6c0d61549bc054f3276a3fb7615e) feat(deepagents): add SDK version metadata to agent traces - [`aa9ef05`](https://github.com/langchain-ai/deepagentsjs/commit/aa9ef055027946164140434791badb3d6264fced) Apply suggestions from code review - [`aaf0b1e`](https://github.com/langchain-ai/deepagentsjs/commit/aaf0b1efcf847dff76d2932d3c933cfe0b1bce1a) Merge branch 'main' into hunter/trace-metadata ### 📊 Changes **4 files changed** (+39 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/sdk-trace-metadata.md` (+5 -0) 📝 `libs/deepagents/src/agent.ts` (+13 -1) 📝 `libs/deepagents/tsdown.config.ts` (+11 -0) 📝 `libs/deepagents/vitest.config.ts` (+10 -0) </details> ### 📄 Description ## Summary Add SDK version metadata to all agent runs created via `createDeepAgent`. Every trace sent to LangSmith now includes `sdk: "deepagents-js"` and `sdk_version` in the run metadata, making it easy to identify and filter deep agent runs. ## Changes - **`libs/deepagents/src/agent.ts`** — Declare a `__SDK_VERSION__` build-time constant and attach `{ sdk: "deepagents-js", sdk_version }` to the `.withConfig()` metadata on the compiled agent. - **`libs/deepagents/tsdown.config.ts`** — Read the package version from `package.json` at build time and inject it via tsdown's `define` option, replacing `__SDK_VERSION__` with the literal version string in the bundle. - **`libs/deepagents/vitest.config.ts`** — Mirror the same `define` so that `__SDK_VERSION__` resolves during tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 06:17:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#213