Skip to content

feat: Add LangSmith integration metadata to create_agent and init_chat_model#35810

Merged
ccurme (ccurme) merged 7 commits into
masterfrom
add-metadata
Mar 18, 2026
Merged

feat: Add LangSmith integration metadata to create_agent and init_chat_model#35810
ccurme (ccurme) merged 7 commits into
masterfrom
add-metadata

Conversation

@tanushree-sharma
Copy link
Copy Markdown
Contributor

Adds ls_integration metadata to agents created via create_agent() and init_chat_model(), enabling identification of langchain traces in LangSmith. create_agent() gets ls_integration": "langchain_create_agent" and init_chat_model gets "langchain_chat_model"

create_agent
image

init_chat_model
image

@github-actions github-actions Bot added size: XS < 50 LOC core `langchain-core` package issues & PRs langchain `langchain` package issues & PRs feature For PRs that implement a new feature; NOT A FEATURE REQUEST internal labels Mar 13, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 13, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 13 untouched benchmarks
⏩ 23 skipped benchmarks1


Comparing add-metadata (7edc4cc) with master (1d2916b)

Open in CodSpeed

Footnotes

  1. 23 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

gambletan

This comment was marked as spam.

@github-actions github-actions Bot added size: S 50-199 LOC and removed size: XS < 50 LOC labels Mar 17, 2026
# generate responses that match a given schema.
raise NotImplementedError

def _get_ls_params(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think we need the updates to LLMs

@ccurme ccurme (ccurme) merged commit 2319fdc into master Mar 18, 2026
93 checks passed
@ccurme ccurme (ccurme) deleted the add-metadata branch March 18, 2026 15:24
Sydney Runkle (sydney-runkle) pushed a commit to langchain-ai/langgraph that referenced this pull request Mar 30, 2026
Adds ls_integration metadata to agents created via langgraph:
`ls_integration:langgraph`

Only sets the value if the key doesn't already exist so that we don't
override the `ls_integration` field set in
[deepagents](langchain-ai/deepagents#1837),
[langchain](langchain-ai/langchain#35810).

LangGraph trace
<img width="1321" height="1017" alt="image"
src="https://github.com/user-attachments/assets/134fad3a-034d-4d90-8fba-318dd7658e3c"
/>

Deepagents trace (value is correctly not set to langgraph in this case)
<img width="1317" height="882" alt="image"
src="https://github.com/user-attachments/assets/d9b09346-5827-4267-95c1-f3f77d0c76f3"
/>
xingshuozhu1998 pushed a commit to xingshuozhu1998/langgraph that referenced this pull request May 1, 2026
)

Adds ls_integration metadata to agents created via langgraph:
`ls_integration:langgraph`

Only sets the value if the key doesn't already exist so that we don't
override the `ls_integration` field set in
[deepagents](langchain-ai/deepagents#1837),
[langchain](langchain-ai/langchain#35810).

LangGraph trace
<img width="1321" height="1017" alt="image"
src="https://github.com/user-attachments/assets/134fad3a-034d-4d90-8fba-318dd7658e3c"
/>

Deepagents trace (value is correctly not set to langgraph in this case)
<img width="1317" height="882" alt="image"
src="https://github.com/user-attachments/assets/d9b09346-5827-4267-95c1-f3f77d0c76f3"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core `langchain-core` package issues & PRs feature For PRs that implement a new feature; NOT A FEATURE REQUEST internal langchain `langchain` package issues & PRs size: S 50-199 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants