Sometimes, you need to trace a request across multiple services.LangSmith supports distributed tracing out of the box, linking runs within a trace across services using context propagation headers (langsmith-trace and optional baggage for metadata/tags).Example client-server setup:
Trace starts on client
Continues on server
Only accept distributed-tracing headers from trusted services. The langsmith-trace and baggage headers are consumed as trusted tracing context. Do not add TracingMiddleware (or pass inbound request headers as the tracing parent) on a service that receives requests directly from untrusted third parties or the public internet. Keep distributed tracing to internal, service-to-service calls, and strip these headers from untrusted inbound requests at your gateway or proxy. Trusting baggage from an external caller lets them influence how your runs are recorded.
# client.pyfrom langsmith.run_helpers import get_current_run_tree, traceableimport httpx@traceableasync def my_client_function(): headers = {} async with httpx.AsyncClient(base_url="...") as client: if run_tree := get_current_run_tree(): # add langsmith-id to headers headers.update(run_tree.to_headers()) return await client.post("/my-route", headers=headers)
Then the server (or other service) can continue the trace by handling the headers appropriately. If you are using an asgi app Starlette or FastAPI, you can connect the distributed trace using LangSmith’s TracingMiddleware.
The TracingMiddleware class was added in langsmith==0.1.133.
Example using FastAPI:
from langsmith import traceablefrom langsmith.middleware import TracingMiddlewarefrom fastapi import FastAPI, Requestapp = FastAPI() # Or Flask, Django, or any other frameworkapp.add_middleware(TracingMiddleware)@traceableasync def some_function(): ...@app.post("/my-route")async def fake_route(request: Request): return await some_function()
If you are using other server frameworks, you can always “receive” the distributed trace by passing the headers in through langsmith_extra:
# server.pyimport langsmith as lsfrom fastapi import FastAPI, Request@ls.traceableasync def my_application(): ...app = FastAPI() # Or Flask, Django, or any other framework@app.post("/my-route")async def fake_route(request: Request): # request.headers: {"langsmith-trace": "..."} # as well as optional metadata/tags in `baggage` with ls.tracing_context(parent=request.headers): return await my_application()
The example above uses the tracing_context context manager. You can also directly specify the parent run context in the langsmith_extra parameter of a method wrapped with @traceable.
# ... same as above@app.post("/my-route")async def fake_route(request: Request): # request.headers: {"langsmith-trace": "..."} my_application(langsmith_extra={"parent": request.headers})
Then, the server converts the headers back to a run tree, which it uses to further continue the tracing.To pass the newly created run tree to a traceable function, we can use the withRunTree helper, which will ensure the run tree is propagated within traceable invocations.
// server.mtsimport { RunTree } from "langsmith";import { traceable, withRunTree } from "langsmith/traceable";import express from "express";import bodyParser from "body-parser"; const server = traceable( (text: string) => `Hello from the server! Received "${text}"`, { name: "server" } ); const app = express(); app.use(bodyParser.text());app.post("/", async (req, res) => { const runTree = RunTree.fromHeaders(req.headers); const result = await withRunTree(runTree, () => server(req.body)); res.send(result);});
// server.mtsimport { RunTree } from "langsmith";import { traceable, withRunTree } from "langsmith/traceable";import { Hono } from "hono"; const server = traceable( (text: string) => `Hello from the server! Received "${text}"`, { name: "server" } ); const app = new Hono();app.post("/", async (c) => { const body = await c.req.text(); const runTree = RunTree.fromHeaders(c.req.raw.headers); const result = await withRunTree(runTree, () => server(body)); return c.body(result);});
Connect these docs to your agent of choice via MCP for real-time answers.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Docs by LangChain","description":"Documentation for LangSmith, Fleet, and our open source packages.","colors":{"primary":"#161F34","light":"#7FC8FF","dark":"#006DDD"},"logo":{"light":"https://mintcdn.com/langchain-5e9cc07a/nQm-sjd_MByLhgeW/images/brand/langchain-docs-dark-blue.png?fit=max\u0026auto=format\u0026n=nQm-sjd_MByLhgeW\u0026q=85\u0026s=5babf1a1962208fd7eed942fa2432ecb","dark":"https://mintcdn.com/langchain-5e9cc07a/nQm-sjd_MByLhgeW/images/brand/langchain-docs-light-blue.png?fit=max\u0026auto=format\u0026n=nQm-sjd_MByLhgeW\u0026q=85\u0026s=0bcd2a1f2599ed228bcedf0f535b45b1"},"favicon":{"light":"https://mintcdn.com/langchain-5e9cc07a/8njVp3mXF3LrAS1d/images/brand/docs-favicon.png?fit=max\u0026auto=format\u0026n=8njVp3mXF3LrAS1d\u0026q=85\u0026s=a61c2b4666f558992e1fd44750b08465","dark":"https://mintcdn.com/langchain-5e9cc07a/8njVp3mXF3LrAS1d/images/brand/docs-favicon.png?fit=max\u0026auto=format\u0026n=8njVp3mXF3LrAS1d\u0026q=85\u0026s=a61c2b4666f558992e1fd44750b08465"},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#030710"}},"navbar":{"links":[{"icon":"message","href":"https://chat.langchain.com/","label":"Ask AI"},{"icon":"brand-github","href":"https://github.com/langchain-ai","label":"GitHub"}],"primary":{"type":"button","label":"Try LangSmith","href":"https://smith.langchain.com/"}},"footer":{"socials":{"github":"https://github.com/langchain-ai","x":"https://x.com/LangChain","linkedin":"https://www.linkedin.com/company/langchain","youtube":"https://www.youtube.com/@LangChain"},"links":[{"header":"Resources","items":[{"label":"Forum","href":"https://forum.langchain.com/"},{"label":"Changelog","href":"https://changelog.langchain.com/"},{"label":"LangChain Academy","href":"https://academy.langchain.com/"},{"label":"Contact Sales","href":"https://www.langchain.com/contact-sales"}]},{"header":"Company","items":[{"label":"Home","href":"https://langchain.com/"},{"label":"Trust Center","href":"https://trust.langchain.com/"},{"label":"Careers","href":"https://langchain.com/careers"},{"label":"Blog","href":"https://blog.langchain.com/"}]}]},"seo":{"metatags":{"canonical":"https://docs.langchain.com","google-site-verification":"9_2KHeJwmEdwgncBRk1MsKxriZz7Sc21EJdbfCxkTEo"}},"fonts":{"heading":{"family":"TWK Lausanne","weight":700,"source":"fonts/TWKLausanne-700.woff2","format":"woff2"},"body":{"family":"Inter","weight":400}},"icons":{"library":"tabler"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}},"latex":true},"integrations":{"gtm":{"tagId":"GTM-MBBX68ST"}},"banner":{"content":"Would you notice if your agent got worse in production? [Tell us in our annual survey](https://form.typeform.com/to/U2EAO1Lz) for the chance to win LangChain swag.","dismissible":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"We couldn't find the page you were looking for."}},"contextual":{"options":["copy","view",{"title":"llms.txt","description":"Open llms.txt for this site","icon":"file","href":"https://docs.langchain.com/llms.txt"},"chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"langchain-5e9cc07a","hasAudioNarration":false,"actualSubdomain":"langchain-5e9cc07a","customDomains":["docs.langchain.com"],"gitSource":{"type":"github","owner":"langchain-ai","repo":"docs","deployBranch":"prod","contentDirectory":"build","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af6368ec9aed49005cc131e","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"AGENT DEVELOPMENT LIFECYCLE","count":1501},{"language":"default","tag":"Reference","count":766},{"language":"default","tag":"Monitor","count":704},{"language":"default","tag":"LangSmith REST API","count":596},{"language":"default","tag":"Build","count":468},{"language":"default","tag":"Deploy","count":251},{"language":"default","tag":"TypeScript","count":244},{"language":"default","tag":"Python","count":224},{"language":"default","tag":"PRODUCTS AND SETUP","count":221},{"language":"default","tag":"Get started","count":181}],"searchSettings":{"maxResults":10,"showContentSnippets":true,"isFiltersEnabled":false}},"assistantConfig":{"enableAskAiButton":false,"enableAskAiSearchBar":true,"deflection":{"enabled":false,"email":"support@langchain.dev"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/langchain-5e9cc07a/c109e4d2e0725af7/style.css"}],"page":{"pagePath":"langsmith/distributed-tracing","slug":"/langsmith/distributed-tracing","pageMetadata":{"title":"Implement distributed tracing","sidebarTitle":"Implement distributed tracing","description":null,"href":"/langsmith/distributed-tracing"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Callout,CodeBlock,CodeGroup,Heading,Info,Note,Warning}=_components;if(!Callout)_missingMdxReference(`Callout`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Sometimes, you need to trace a request across multiple services.`}),`\n`,_jsxs(_components.p,{children:[`LangSmith supports distributed tracing out of the box, linking runs within a trace across services using context propagation headers (`,_jsx(_components.code,{children:`langsmith-trace`}),` and optional `,_jsx(_components.code,{children:`baggage`}),` for metadata/tags).`]}),`\n`,_jsx(_components.p,{children:`Example client-server setup:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Trace starts on client`}),`\n`,_jsx(_components.li,{children:`Continues on server`}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Only accept distributed-tracing headers from trusted services.`}),` The `,_jsx(_components.code,{children:`langsmith-trace`}),` and `,_jsx(_components.code,{children:`baggage`}),` headers are consumed as trusted tracing context. Do not add `,_jsx(_components.code,{children:`TracingMiddleware`}),` (or pass inbound request headers as the tracing `,_jsx(_components.code,{children:`parent`}),`) on a service that receives requests directly from untrusted third parties or the public internet. Keep distributed tracing to internal, service-to-service calls, and strip these headers from untrusted inbound requests at your gateway or proxy. Trusting `,_jsx(_components.code,{children:`baggage`}),` from an external caller lets them influence how your runs are recorded.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`distributed-tracing-in-python`,children:`Distributed tracing in Python`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`# client.py`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` langsmith.run_helpers `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` get_current_run_tree, traceable`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` httpx`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`@traceable`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` def`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` my_client_function():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` headers = {}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` async`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` with`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` httpx.AsyncClient(base_url=`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`) `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`as`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` if`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` run_tree := get_current_run_tree():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:` # add langsmith-id to headers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` headers.update(run_tree.to_headers())`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` return`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` client.post(`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"/my-route\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`, headers=headers)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Then the server (or other service) can continue the trace by handling the headers appropriately. If you are using an asgi app Starlette or FastAPI, you can connect the distributed trace using LangSmith’s `,_jsx(_components.code,{children:`TracingMiddleware`}),`.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`TracingMiddleware`}),` class was added in `,_jsx(_components.code,{children:`langsmith==0.1.133`}),`.`]})}),`\n`,_jsx(_components.p,{children:`Example using FastAPI:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` langsmith `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` traceable`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` langsmith.middleware `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` TracingMiddleware`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` fastapi `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` FastAPI, Request`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`app = FastAPI() `}),_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`# Or Flask, Django, or any other framework`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`app.add_middleware(TracingMiddleware)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`@traceable`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` def`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` some_function():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`@app.post(`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"/my-route\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` def`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` fake_route(request: Request):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` return`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` some_function()`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Or in Starlette:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` starlette.applications `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` Starlette`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` starlette.middleware `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` Middleware`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` langsmith.middleware `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` TracingMiddleware`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`routes = ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`middleware = [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` Middleware(TracingMiddleware),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`app = Starlette(..., middleware=middleware)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`If you are using other server frameworks, you can always “receive” the distributed trace by passing the headers in through `,_jsx(_components.code,{children:`langsmith_extra`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`# server.py`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` langsmith `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`as`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` ls`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` fastapi `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` FastAPI, Request`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`@ls.traceable`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` def`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` my_application():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`app = FastAPI() `}),_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`# Or Flask, Django, or any other framework`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`@app.post(`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"/my-route\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` def`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` fake_route(request: Request):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:` # request.headers: {\"langsmith-trace\": \"...\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:\" # as well as optional metadata/tags in `baggage`\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` with`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` ls.tracing_context(parent=request.headers):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` return`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` my_application()`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The example above uses the `,_jsx(_components.code,{children:`tracing_context`}),` context manager. You can also directly specify the parent run context in the `,_jsx(_components.code,{children:`langsmith_extra`}),` parameter of a method wrapped with `,_jsx(_components.code,{children:`@traceable`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`# ... same as above`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`@app.post(`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"/my-route\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` def`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` fake_route(request: Request):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:` # request.headers: {\"langsmith-trace\": \"...\"}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` my_application(langsmith_extra={`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"parent\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`: request.headers})`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`distributed-tracing-in-typescript`,children:`Distributed tracing in TypeScript`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Distributed tracing in TypeScript requires `,_jsx(_components.code,{children:`langsmith>=0.1.31`})]})}),`\n`,_jsxs(_components.p,{children:[`First, we obtain the current run tree from the client and convert it to `,_jsx(_components.code,{children:`langsmith-trace`}),` and `,_jsx(_components.code,{children:`baggage`}),` header values, which we can pass to the server:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`// client.mts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { getCurrentRunTree, traceable } `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"langsmith/traceable\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` client = traceable(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` async`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` () => {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` runTree = getCurrentRunTree();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` return`}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` method: `}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` headers: runTree.toHeaders(),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` }).then((a) => a.text());`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { name: `}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"client\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` client();`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Then, the server converts the headers back to a run tree, which it uses to further continue the tracing.`}),`\n`,_jsxs(_components.p,{children:[`To pass the newly created run tree to a traceable function, we can use the `,_jsx(_components.code,{children:`withRunTree`}),` helper, which will ensure the run tree is propagated within traceable invocations.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Express.JS`,numberOfLines:`19`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`// server.mts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { RunTree } `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"langsmith\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { traceable, withRunTree } `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"langsmith/traceable\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` express `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"express\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` bodyParser `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"body-parser\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` server = traceable(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` (text: string) => `}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:'`Hello from the server! Received \"${text}\"`'}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { name: `}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"server\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` app = express();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` app.use(bodyParser.text());`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`app.post(`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"/\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` (req, res) => {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` runTree = RunTree.fromHeaders(req.headers);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` result = `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` withRunTree(runTree, () => server(req.body));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` res.send(result);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Hono`,numberOfLines:`18`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes catppuccin-latte catppuccin-mocha`,style:{backgroundColor:`#eff1f5`,\"--shiki-dark-bg\":`#1e1e2e`,color:`#4c4f69`,\"--shiki-dark\":`#cdd6f4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#7C7F93`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#9399B2`,\"--shiki-dark-font-style\":`italic`},children:`// server.mts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { RunTree } `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"langsmith\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { traceable, withRunTree } `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"langsmith/traceable\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`import`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { Hono } `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`from`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:` \"hono\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` server = traceable(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` (text: string) => `}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:'`Hello from the server! Received \"${text}\"`'}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` { name: `}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"server\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` app = `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`new`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` Hono();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`app.post(`}),_jsx(_components.span,{style:{color:`#40A02B`,\"--shiki-dark\":`#A6E3A1`},children:`\"/\"`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`, `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`async`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` (c) => {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` body = `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` c.req.text();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` runTree = RunTree.fromHeaders(c.req.raw.headers);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` const`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` result = `}),_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:`await`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` withRunTree(runTree, () => server(body));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8839EF`,\"--shiki-dark\":`#CBA6F7`},children:` return`}),_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:` c.body(result);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#4C4F69`,\"--shiki-dark\":`#CDD6F4`},children:`});`})}),`\n`]})})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(`div`,{className:`source-links`,children:[_jsx(Callout,{icon:`terminal-2`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/use-these-docs`,children:`Connect these docs`}),` to your agent of choice via MCP for real-time answers.`]})}),_jsx(Callout,{icon:`edit`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://github.com/langchain-ai/docs/edit/main/src/langsmith/distributed-tracing.mdx`,children:`Edit this page on GitHub`}),` or `,_jsx(_components.a,{href:`https://github.com/langchain-ai/docs/issues/new/choose`,children:`file an issue`}),`.`]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}},"config":{},"pageMetadata":{"title":"Implement distributed tracing","sidebarTitle":"Implement distributed tracing","description":null,"href":"/langsmith/distributed-tracing"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Distributed tracing in Python","slug":"distributed-tracing-in-python","depth":2,"children":[]},{"title":"Distributed tracing in TypeScript","slug":"distributed-tracing-in-typescript","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/langchain-5e9cc07a/8e2bdc5fa13bae3b/language-toggle.js","/_mintlify/custom/langchain-5e9cc07a/e53df5e6c631412e/ChatLangChainEmbed.js","/_mintlify/custom/langchain-5e9cc07a/de0c938f8f025ce1/integration-downloads-table.js","/_mintlify/custom/langchain-5e9cc07a/bf5a14ed20580d69/default-changelog-filter.js","/_mintlify/custom/langchain-5e9cc07a/2b68992dd6b93a5a/changelog-navigation.js"],"subdomain":"langchain-5e9cc07a","siteName":"Docs by LangChain","title":"Implement distributed tracing - Docs by LangChain","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T19:23:14.500Z","originalFileLocation":"langsmith/distributed-tracing.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Docs by LangChain\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Implement distributed tracing - Docs by LangChain\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Docs by LangChain\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.langchain.com/langsmith/distributed-tracing\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://langchain-5e9cc07a.mintlify.site/_mintlify/api/og/v2?division=Advanced+tracing+techniques\u0026amp;title=Implement+distributed+tracing\u0026amp;theme=f35197f94eda06999e44c5f5\u0026amp;signature=4061c11c9b7289c94cfd98c5057c73de6fb8f42ac7e7ffee5012ddf8a5dc9e4e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Implement distributed tracing - Docs by LangChain\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://langchain-5e9cc07a.mintlify.site/_mintlify/api/og/v2?division=Advanced+tracing+techniques\u0026amp;title=Implement+distributed+tracing\u0026amp;theme=f35197f94eda06999e44c5f5\u0026amp;signature=4061c11c9b7289c94cfd98c5057c73de6fb8f42ac7e7ffee5012ddf8a5dc9e4e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Docs by LangChain\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#161F34\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"9_2KHeJwmEdwgncBRk1MsKxriZz7Sc21EJdbfCxkTEo\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.langchain.com/langsmith/distributed-tracing\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/langsmith/distributed-tracing.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.langchain.com/#organization\",\"name\":\"Docs by LangChain\",\"url\":\"https://docs.langchain.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/langchain-5e9cc07a/nQm-sjd_MByLhgeW/images/brand/langchain-docs-dark-blue.png?fit=max\u0026auto=format\u0026n=nQm-sjd_MByLhgeW\u0026q=85\u0026s=5babf1a1962208fd7eed942fa2432ecb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.langchain.com#website\",\"name\":\"Docs by LangChain\",\"url\":\"https://docs.langchain.com\",\"publisher\":{\"@id\":\"https://docs.langchain.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.langchain.com/langsmith/distributed-tracing#webpage\",\"url\":\"https://docs.langchain.com/langsmith/distributed-tracing\",\"name\":\"Implement distributed tracing\",\"dateModified\":\"2026-11-12T19:23:14.500Z\",\"isPartOf\":{\"@id\":\"https://docs.langchain.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.langchain.com/langsmith/distributed-tracing#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.langchain.com/langsmith/distributed-tracing#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Configuration \u0026 troubleshooting\",\"item\":\"https://docs.langchain.com/langsmith/log-traces-to-agent\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Implement distributed tracing\",\"item\":\"https://docs.langchain.com/langsmith/distributed-tracing\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.langchain.com/langsmith/distributed-tracing#article\",\"headline\":\"Implement distributed tracing\",\"name\":\"Implement distributed tracing\",\"url\":\"https://docs.langchain.com/langsmith/distributed-tracing\",\"mainEntityOfPage\":{\"@id\":\"https://docs.langchain.com/langsmith/distributed-tracing#webpage\"},\"dateModified\":\"2026-11-12T19:23:14.500Z\",\"publisher\":{\"@id\":\"https://docs.langchain.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.langchain.com#website\"}}]}\u003c/script>","agentPointerHref":"/langsmith/distributed-tracing.md","siteName":"Docs by LangChain","nav":{"global":null,"products":[{"product":"AGENT DEVELOPMENT LIFECYCLE","menu":[{"item":"Home","icon":"home","description":"Get started","pages":[{"title":null,"sidebarTitle":"Home","mode":"custom","href":""}]},{"item":"Build","icon":"hammer","description":"Build agents with open source","dropdowns":[{"dropdown":"Python","icon":{"style":"regular","name":"brand-python"},"tabs":[{"tab":"Overview","pages":[{"title":"Build","sidebarTitle":"Overview","mode":"custom","icon":"hammer","href":"/build-overview"}]},{"tab":"Managed Deep Agents","pages":[{"group":"Get started","tag":"BETA","pages":[{"title":"Managed Deep Agents","sidebarTitle":"Overview","href":"/langsmith/python/managed-deep-agents-overview"},{"title":"Managed Deep Agents quickstart","sidebarTitle":"Quickstart","href":"/langsmith/python/managed-deep-agents-quickstart"},{"title":"Managed Deep Agents project structure","sidebarTitle":"Project structure","href":"/langsmith/python/managed-deep-agents-project-structure"},{"title":"Move from Deep Agents to Managed Deep Agents","sidebarTitle":"Move from Deep Agents","href":"/langsmith/python/managed-deep-agents-migrate"}]},{"group":"Agent capabilities","pages":[{"title":"Define a Managed Deep Agent","sidebarTitle":"Agent definition","href":"/langsmith/python/managed-deep-agents-agent-definition"},{"title":"Add instructions to Managed Deep Agents","sidebarTitle":"Instructions","href":"/langsmith/python/managed-deep-agents-instructions"},{"title":"Add skills to Managed Deep Agents","sidebarTitle":"Skills","href":"/langsmith/python/managed-deep-agents-skills"},{"title":"Add custom tools to Managed Deep Agents","sidebarTitle":"Tools","href":"/langsmith/python/managed-deep-agents-tools"},{"title":"Web search","sidebarTitle":"Web search","href":"/langsmith/python/managed-deep-agents-search"},{"title":"Manage connections","sidebarTitle":"Connections","href":"/langsmith/python/managed-deep-agents-connections"},{"title":"Connect to MCP servers","sidebarTitle":"MCP","href":"/langsmith/python/managed-deep-agents-mcp-connectors"},{"title":"Add custom middleware to Managed Deep Agents","sidebarTitle":"Middleware","href":"/langsmith/python/managed-deep-agents-middleware"},{"title":"Add memory to Managed Deep Agents","sidebarTitle":"Memory","href":"/langsmith/python/managed-deep-agents-memory"},{"title":"Add a sandbox to Managed Deep Agents","sidebarTitle":"Sandboxes","href":"/langsmith/python/managed-deep-agents-sandboxes"},{"title":"Browser use","sidebarTitle":"Browser use","href":"/langsmith/python/managed-deep-agents-browser-use"},{"title":"Subagents","sidebarTitle":"Subagents","href":"/langsmith/python/managed-deep-agents-subagents"},{"title":"Add identity to Managed Deep Agents","sidebarTitle":"Identity","href":"/langsmith/python/managed-deep-agents-identity"},{"group":"Channels","expanded":false,"pages":[{"title":"Connect Managed Deep Agents to channels","sidebarTitle":"Overview","href":"/langsmith/python/managed-deep-agents-channels"},{"title":"Connect a Managed Deep Agent to Slack","sidebarTitle":"Slack","href":"/langsmith/python/managed-deep-agents-channels-slack"},{"title":"Connect a Managed Deep Agent to a custom channel over HTTP","sidebarTitle":"Custom","href":"/langsmith/python/managed-deep-agents-channels-http"},{"title":"Prompt Slack users with agent-owned interrupts","sidebarTitle":"Agent-owned interrupts","href":"/langsmith/python/managed-deep-agents-agent-owned-interrupts"}]},{"title":"Add schedules to Managed Deep Agents","sidebarTitle":"Schedules","href":"/langsmith/python/managed-deep-agents-schedules"},{"title":"Evaluate Managed Deep Agents","sidebarTitle":"Evals","href":"/langsmith/python/managed-deep-agents-evals"},{"title":"Managed Deep Agents runtime","sidebarTitle":"Runtime","href":"/langsmith/python/managed-deep-agents-runtime"}]},{"group":"Build and deploy","pages":[{"title":"Develop locally with LangSmith Studio","sidebarTitle":"Local Studio","href":"/langsmith/python/managed-deep-agents-local-development"},{"title":"Add a custom search tool, memory, and a schedule","sidebarTitle":"Build a scheduled agent","href":"/langsmith/python/managed-deep-agents-tutorial"},{"title":"Deploy a Managed Deep Agent","sidebarTitle":"Deploy an agent","href":"/langsmith/python/managed-deep-agents-deploy"},{"title":"Connect MCP clients to a Managed Deep Agent","sidebarTitle":"MCP endpoint","href":"/langsmith/python/managed-deep-agents-mcp-endpoint"},{"title":"Build a custom frontend for a Managed Deep Agent","sidebarTitle":"Custom frontend","href":"/langsmith/python/managed-deep-agents-custom-frontend"},{"title":"Manage Context Hub for Managed Deep Agents","sidebarTitle":"Context Hub","href":"/langsmith/python/managed-deep-agents-context-hub"},{"title":"Managed Deep Agents CLI reference","sidebarTitle":"CLI reference","href":"/langsmith/python/managed-deep-agents-cli"},{"title":"Changelog","url":"https://github.com/langchain-ai/managed-deepagents/blob/main/CHANGELOG.md","href":"/langsmith/python/managed-deep-agents-changelog"}]},{"group":"Templates","pages":[{"title":"Deploy the open-source design agent","sidebarTitle":"Design agent","href":"/langsmith/python/managed-deep-agents-design-agent"},{"title":"Deploy the open-source paid media agent","sidebarTitle":"Paid media agent","href":"/langsmith/python/managed-deep-agents-paid-media-agent"}]}]},{"tab":"Deep Agents","pages":[{"title":"Deep Agents overview","sidebarTitle":"Overview","href":"/oss/python/deepagents/overview"},{"group":"Get started","pages":[{"title":"Quickstart","href":"/oss/python/deepagents/quickstart"},{"title":"Customize Deep Agents","sidebarTitle":"Customization","href":"/oss/python/deepagents/customization"},{"title":"Models","href":"/oss/python/deepagents/models"},{"title":"Comparison with Claude Agent SDK","sidebarTitle":"Comparison with Claude Agent SDK","href":"/oss/python/deepagents/comparison"},{"title":"Changelog","url":"https://docs.langchain.com/oss/python/releases/changelog","href":"/oss/python/deepagents/changelog-py"}]},{"group":"Deployment","pages":[{"title":"Managed Deep Agents","sidebarTitle":"Managed Deep Agents","tag":"BETA","url":"/langsmith/python/managed-deep-agents-overview","href":"/langsmith/python/managed-deep-agents"},{"group":"Going to production","root":{"title":"Going to production","href":"/oss/python/deepagents/going-to-production"},"pages":[{"title":"Fault tolerance","href":"/oss/python/deepagents/fault-tolerance"}]}]},{"group":"Execution environment","expanded":true,"pages":[{"title":"Tools","href":"/oss/python/deepagents/tools"},{"title":"Backends","href":"/oss/python/deepagents/backends"},{"title":"Permissions","href":"/oss/python/deepagents/permissions"},{"title":"Multimodal inputs and outputs","sidebarTitle":"Multimodality","href":"/oss/python/deepagents/multimodal"},{"title":"Sandboxes","sidebarTitle":"Sandboxes","href":"/oss/python/deepagents/sandboxes"},{"title":"Browser use","href":"/oss/python/deepagents/browser-use"},{"title":"Interpreters","tag":"Beta","href":"/oss/python/deepagents/interpreters"},{"title":"Event streaming","tag":"Beta","href":"/oss/python/deepagents/event-streaming"},{"title":"Streaming","href":"/oss/python/deepagents/streaming"}]},{"group":"Context management","expanded":true,"pages":[{"title":"Skills","href":"/oss/python/deepagents/skills"},{"title":"Memory","href":"/oss/python/deepagents/memory"},{"title":"Retrieval","href":"/oss/python/deepagents/retrieval"},{"title":"Context engineering in Deep Agents","sidebarTitle":"Context engineering","href":"/oss/python/deepagents/context-engineering"},{"title":"Profiles","tag":"Beta","href":"/oss/python/deepagents/profiles"},{"title":"OpenWiki","sidebarTitle":"OpenWiki","url":"/oss/openwiki/overview","href":"/oss/python/deepagents/openwiki"}]},{"group":"Delegation","expanded":true,"pages":[{"title":"Subagents","href":"/oss/python/deepagents/subagents"},{"title":"Dynamic subagents","tag":"Beta","href":"/oss/python/deepagents/dynamic-subagents"},{"title":"Async subagents","href":"/oss/python/deepagents/async-subagents"}]},{"group":"Steering","expanded":true,"pages":[{"title":"Human-in-the-loop","href":"/oss/python/deepagents/human-in-the-loop"},{"title":"Grading rubrics","href":"/oss/python/deepagents/rubric"}]},{"group":"Middleware","expanded":true,"pages":[{"title":"Middleware overview","sidebarTitle":"Overview","href":"/oss/python/langchain/middleware/overview"},{"title":"Prebuilt middleware","href":"/oss/python/langchain/middleware/built-in"},{"title":"Custom middleware","href":"/oss/python/langchain/middleware/custom"}]},{"group":"Frontend","pages":[{"title":"Overview","href":"/oss/python/deepagents/frontend/overview"},{"group":"Patterns","pages":[{"title":"Subagent streaming","href":"/oss/python/deepagents/frontend/subagent-streaming"},{"title":"Todo list","href":"/oss/python/deepagents/frontend/todo-list"},{"title":"Sandbox","href":"/oss/python/deepagents/frontend/sandbox"}]}]},{"group":"Protocols","pages":[{"title":"Agent Client Protocol (ACP)","href":"/oss/python/deepagents/acp"},{"title":"Model Context Protocol","sidebarTitle":"MCP with LangChain","url":"/oss/python/langchain/mcp","href":"/oss/python/deepagents/mcp"},{"title":"A2A server","sidebarTitle":"A2A with LangSmith","url":"/langsmith/server-a2a","href":"/oss/python/deepagents/a2a"},{"title":"Agent User Interaction Protocol (AG-UI)","sidebarTitle":"AG-UI","href":"/oss/python/deepagents/ag-ui"}]}]},{"tab":"LangChain","pages":[{"title":"LangChain overview","sidebarTitle":"Overview","href":"/oss/python/langchain/overview"},{"group":"Get started","pages":[{"title":"Install LangChain","sidebarTitle":"Install","href":"/oss/python/langchain/install"},{"title":"Quickstart","href":"/oss/python/langchain/quickstart"},{"title":"Changelog","url":"https://docs.langchain.com/oss/python/releases/changelog","href":"/oss/python/langchain/changelog-py"},{"title":"Philosophy","mode":"wide","href":"/oss/python/langchain/philosophy"}]},{"group":"Core components","pages":[{"title":"Agents","href":"/oss/python/langchain/agents"},{"title":"Models","href":"/oss/python/langchain/models"},{"title":"Messages","href":"/oss/python/langchain/messages"},{"title":"Tools","href":"/oss/python/langchain/tools"},{"title":"Short-term memory","href":"/oss/python/langchain/short-term-memory"},{"title":"Event streaming","href":"/oss/python/langchain/event-streaming"},{"title":"Streaming","href":"/oss/python/langchain/streaming"},{"title":"Structured output","href":"/oss/python/langchain/structured-output"}]},{"group":"Middleware","pages":[{"title":"Middleware overview","sidebarTitle":"Overview","href":"/oss/python/langchain/middleware/overview"},{"title":"Prebuilt middleware","href":"/oss/python/langchain/middleware/built-in"},{"title":"Custom middleware","href":"/oss/python/langchain/middleware/custom"}]},{"group":"Frontend","pages":[{"title":"Overview","href":"/oss/python/langchain/frontend/overview"},{"group":"Patterns","pages":[{"title":"Markdown messages","href":"/oss/python/langchain/frontend/markdown-messages"},{"title":"Tool calling","href":"/oss/python/langchain/frontend/tool-calling"},{"title":"Headless tools","href":"/oss/python/langchain/frontend/headless-tools"},{"title":"Human-in-the-Loop","href":"/oss/python/langchain/frontend/human-in-the-loop"},{"title":"Branching chat","href":"/oss/python/langchain/frontend/branching-chat"},{"title":"Reasoning tokens","href":"/oss/python/langchain/frontend/reasoning-tokens"},{"title":"Structured output","href":"/oss/python/langchain/frontend/structured-output"},{"title":"Message queues","href":"/oss/python/langchain/frontend/message-queues"},{"title":"Join \u0026 rejoin streams","href":"/oss/python/langchain/frontend/join-rejoin"},{"title":"Time travel","href":"/oss/python/langchain/frontend/time-travel"},{"group":"Generative UI","pages":[{"title":"Generative UI overview","sidebarTitle":"Overview","href":"/oss/python/langchain/frontend/generative-ui-overview"},{"title":"Controlled generative UI","sidebarTitle":"Controlled","href":"/oss/python/langchain/frontend/controlled-generative-ui"},{"title":"Declarative generative UI","sidebarTitle":"Declarative","href":"/oss/python/langchain/frontend/declarative-generative-ui"},{"title":"Open-ended generative UI","sidebarTitle":"Open-ended","href":"/oss/python/langchain/frontend/open-ended-generative-ui"}]}]},{"group":"Integrations","pages":[{"title":"Overview","href":"/oss/python/langchain/frontend/integrations/overview"},{"title":"CopilotKit","href":"/oss/python/langchain/frontend/integrations/copilotkit"},{"title":"AI Elements","href":"/oss/python/langchain/frontend/integrations/ai-elements"},{"title":"assistant-ui","href":"/oss/python/langchain/frontend/integrations/assistant-ui"},{"title":"OpenUI","href":"/oss/python/langchain/frontend/integrations/openui"}]}]},{"group":"Advanced usage","pages":[{"title":"Guardrails","href":"/oss/python/langchain/guardrails"},{"title":"Runtime","href":"/oss/python/langchain/runtime"},{"title":"Context engineering in agents","sidebarTitle":"Context engineering","href":"/oss/python/langchain/context-engineering"},{"group":"MCP","pages":[{"title":"Model Context Protocol (MCP)","sidebarTitle":"Overview","href":"/oss/python/langchain/mcp/index"},{"title":"Tools","href":"/oss/python/langchain/mcp/tools"},{"title":"Connections","href":"/oss/python/langchain/mcp/connections"},{"title":"Authentication","href":"/oss/python/langchain/mcp/auth"}]},{"title":"Human-in-the-loop","href":"/oss/python/langchain/human-in-the-loop"},{"group":"Multi-agent","pages":[{"title":"Multi-agent","sidebarTitle":"Overview","href":"/oss/python/langchain/multi-agent/index"},{"title":"Subagents","href":"/oss/python/langchain/multi-agent/subagents"},{"title":"Handoffs","href":"/oss/python/langchain/multi-agent/handoffs"},{"title":"Skills","href":"/oss/python/langchain/multi-agent/skills"},{"title":"Router","href":"/oss/python/langchain/multi-agent/router"},{"title":"Custom workflow","href":"/oss/python/langchain/multi-agent/custom-workflow"}]},{"title":"Retrieval","href":"/oss/python/deepagents/retrieval"},{"title":"Long-term memory","href":"/oss/python/langchain/long-term-memory"}]},{"group":"Agent development","pages":[{"title":"LangSmith Studio","sidebarTitle":"LangSmith Studio","href":"/oss/python/langchain/studio"},{"group":"Test","pages":[{"title":"Test","sidebarTitle":"Overview","href":"/oss/python/langchain/test/index"},{"title":"Unit testing","href":"/oss/python/langchain/test/unit-testing"},{"title":"Integration testing","href":"/oss/python/langchain/test/integration-testing"},{"title":"Agent Evals","href":"/oss/python/langchain/test/evals"}]},{"title":"Agent Chat UI","href":"/oss/python/langchain/ui"}]},{"group":"Production","pages":[{"title":"Deployment","sidebarTitle":"Deployment","href":"/oss/python/langchain/deploy"},{"title":"LangSmith Observability","sidebarTitle":"Observability","href":"/oss/python/langchain/observability"}]}]},{"tab":"LangGraph","pages":[{"title":"LangGraph overview","sidebarTitle":"Overview","href":"/oss/python/langgraph/overview"},{"group":"Get started","pages":[{"title":"Quickstart","href":"/oss/python/langgraph/quickstart"},{"title":"Changelog","url":"https://docs.langchain.com/oss/python/releases/changelog","href":"/oss/python/langgraph/changelog-py"}]},{"group":"Capabilities","pages":[{"title":"Persistence","href":"/oss/python/langgraph/persistence"},{"title":"Checkpointers","href":"/oss/python/langgraph/checkpointers"},{"title":"Stores","href":"/oss/python/langgraph/stores"},{"title":"Fault tolerance","href":"/oss/python/langgraph/fault-tolerance"},{"title":"Event streaming","href":"/oss/python/langgraph/event-streaming"},{"title":"Streaming","href":"/oss/python/langgraph/streaming"},{"title":"Interrupts","href":"/oss/python/langgraph/interrupts"},{"title":"Use time-travel","sidebarTitle":"Time travel","href":"/oss/python/langgraph/use-time-travel"},{"title":"Memory","href":"/oss/python/langgraph/add-memory"},{"title":"Subgraphs","sidebarTitle":"Subgraphs","href":"/oss/python/langgraph/use-subgraphs"}]},{"group":"Patterns","pages":[{"title":"Workflows and agents","sidebarTitle":"Workflows + agents","href":"/oss/python/langgraph/workflows-agents"}]},{"group":"Build with the Graph API","pages":[{"title":"Thinking in the Graph API","sidebarTitle":"Thinking in the Graph API","href":"/oss/python/langgraph/thinking-in-graph-api"},{"title":"Build checklist for the Graph API","sidebarTitle":"Build checklist","href":"/oss/python/langgraph/use-graph-api"},{"title":"Graph API overview","sidebarTitle":"Graph API","href":"/oss/python/langgraph/graph-api"},{"title":"Define and update state","sidebarTitle":"Define and update state","href":"/oss/python/langgraph/graph-api-state"},{"title":"Build sequences, branches, and loops","sidebarTitle":"Control flow","href":"/oss/python/langgraph/graph-api-control-flow"},{"title":"Use Send and Command","sidebarTitle":"Send and Command","href":"/oss/python/langgraph/graph-api-send-command"},{"title":"Configure nodes","sidebarTitle":"Configure nodes","href":"/oss/python/langgraph/graph-api-nodes"},{"title":"Visualize your graph","sidebarTitle":"Visualize your graph","href":"/oss/python/langgraph/graph-api-visualize"}]},{"group":"Deployment","pages":[{"title":"Run a local server","sidebarTitle":"Local server","href":"/oss/python/langgraph/local-server"},{"title":"Application structure","href":"/oss/python/langgraph/application-structure"},{"title":"Test","href":"/oss/python/langgraph/test"},{"title":"Backward compatibility","href":"/oss/python/langgraph/backward-compatibility"},{"title":"LangSmith Studio","href":"/oss/python/langgraph/studio"},{"title":"Agent Chat UI","href":"/oss/python/langgraph/ui"},{"title":"Deployment","sidebarTitle":"Deployment","href":"/oss/python/langgraph/deploy"},{"title":"LangSmith Observability","href":"/oss/python/langgraph/observability"}]},{"group":"Frontend","pages":[{"title":"Overview","href":"/oss/python/langgraph/frontend/overview"},{"title":"Graph execution","href":"/oss/python/langgraph/frontend/graph-execution"},{"title":"Custom stream channels","href":"/oss/python/langgraph/frontend/custom-stream-channels"}]},{"group":"Advanced","pages":[{"title":"Functional API overview","sidebarTitle":"Functional API","href":"/oss/python/langgraph/functional-api"},{"title":"LangGraph runtime","sidebarTitle":"Runtime","href":"/oss/python/langgraph/pregel"}]},{"title":"Studio","url":"https://docs.langchain.com/langsmith/studio","href":"/oss/python/studio"}]},{"tab":"OpenWiki","pages":[{"title":"OpenWiki","sidebarTitle":"Overview","mode":"wide","href":"/oss/openwiki/overview"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/oss/openwiki/quickstart"},{"group":"Modes","pages":[{"title":"Code mode","sidebarTitle":"Code mode","href":"/oss/openwiki/code-mode"},{"title":"Personal mode","sidebarTitle":"Personal mode","href":"/oss/openwiki/personal-mode"}]},{"title":"Coding-agent integrations","sidebarTitle":"Integrations","href":"/oss/openwiki/integrations"},{"title":"Search and link wikis","sidebarTitle":"Search and link","href":"/oss/openwiki/search-and-link"},{"title":"Visualize your wiki","sidebarTitle":"Visualize","href":"/oss/openwiki/visualize"},{"title":"Command reference","sidebarTitle":"CLI reference","href":"/oss/openwiki/cli-reference"},{"title":"Customize OpenWiki","sidebarTitle":"Customize OpenWiki","href":"/oss/openwiki/customize"},{"title":"Model providers","sidebarTitle":"Providers","href":"/oss/openwiki/providers"},{"title":"Automate updates","sidebarTitle":"Automate updates","href":"/oss/openwiki/automate-updates"},{"title":"Changelog","url":"https://github.com/langchain-ai/openwiki/releases","href":"/oss/openwiki/changelog"}]},{"tab":"Integrations","pages":[{"title":"LangChain Python integrations","sidebarTitle":"LangChain integrations","mode":"wide","href":"/oss/python/integrations/providers/overview"},{"title":"All LangChain Python integration providers","sidebarTitle":"All providers","mode":"wide","href":"/oss/python/integrations/providers/all_providers"},{"group":"Popular Providers","icon":"users-group","pages":[{"title":"OpenAI integrations","sidebarTitle":"OpenAI","href":"/oss/python/integrations/providers/openai"},{"title":"Anthropic (Claude) integrations","sidebarTitle":"Anthropic","href":"/oss/python/integrations/providers/anthropic"},{"title":"Google integrations","sidebarTitle":"Google","href":"/oss/python/integrations/providers/google"},{"title":"AWS (Amazon) integrations","sidebarTitle":"AWS","href":"/oss/python/integrations/providers/aws"},{"title":"NVIDIA","href":"/oss/python/integrations/providers/nvidia"},{"title":"Hugging Face integrations","sidebarTitle":"Hugging Face","href":"/oss/python/integrations/providers/huggingface"},{"title":"Microsoft integrations","sidebarTitle":"Microsoft","href":"/oss/python/integrations/providers/microsoft"},{"title":"Ollama integrations","sidebarTitle":"Ollama","href":"/oss/python/integrations/providers/ollama"},{"title":"Groq integrations","sidebarTitle":"Groq","href":"/oss/python/integrations/providers/groq"},{"title":"Fireworks integrations","sidebarTitle":"Fireworks","href":"/oss/python/integrations/providers/fireworks"},{"title":"Browserbase integrations","href":"/oss/python/integrations/providers/browserbase"}]},{"group":"Integrations by component","icon":"plug","pages":[{"title":"Chat model integrations","sidebarTitle":"Chat models","mode":"wide","href":"/oss/python/integrations/chat/index"},{"title":"Tool integrations","sidebarTitle":"Tools and toolkits","href":"/oss/python/integrations/tools/index"},{"title":"Middleware integrations","sidebarTitle":"Middleware","href":"/oss/python/integrations/middleware/index"},{"title":"Sandbox integrations","sidebarTitle":"Sandboxes","href":"/oss/python/integrations/sandboxes/index"},{"title":"Backend integrations","sidebarTitle":"Backends","href":"/oss/python/integrations/backends/index"},{"title":"Checkpointer integrations","sidebarTitle":"Checkpointers","href":"/oss/python/integrations/checkpointers/index"},{"title":"Store integrations","sidebarTitle":"Stores","href":"/oss/python/integrations/long-term-memory/index"},{"title":"Retriever integrations","sidebarTitle":"Retrievers","href":"/oss/python/integrations/retrievers/index"},{"title":"Text splitter integrations","sidebarTitle":"Text splitters","href":"/oss/python/integrations/splitters/index"},{"title":"Embedding model integrations","sidebarTitle":"Embedding models","href":"/oss/python/integrations/embeddings/index"},{"title":"Vector store integrations","sidebarTitle":"Vector stores","href":"/oss/python/integrations/vectorstores/index"},{"title":"Document loader integrations","sidebarTitle":"Document loaders","href":"/oss/python/integrations/document_loaders/index"}]}]},{"tab":"Learn","pages":[{"title":"Learn","href":"/oss/python/learn"},{"group":"Tutorials","icon":"code","pages":[{"group":"Deep Agents","expanded":true,"pages":[{"title":"Build a data analysis agent","sidebarTitle":"Data Analysis","href":"/oss/python/deepagents/data-analysis"},{"title":"Build a deep research agent","sidebarTitle":"Deep Research","href":"/oss/python/deepagents/deep-research"},{"title":"Build a content builder agent","sidebarTitle":"Content Builder","href":"/oss/python/deepagents/content-builder"},{"title":"Retrieval Augmented Generation (RAG) with Deep Agents","sidebarTitle":"RAG","href":"/oss/python/deepagents/rag"}]},{"group":"LangChain","expanded":true,"pages":[{"title":"Build a data analysis agent from scratch","sidebarTitle":"Deep Agent","href":"/oss/python/langchain/deep-agent-from-scratch"},{"title":"Build a semantic search engine with LangChain","sidebarTitle":"Semantic search","href":"/oss/python/langchain/knowledge-base"},{"title":"Build a SQL agent","sidebarTitle":"SQL agent","href":"/oss/python/langchain/sql-agent"},{"title":"Build a voice agent with LangChain","sidebarTitle":"Voice agent","href":"/oss/python/langchain/voice-agent"}]},{"group":"Multi-agent","expanded":true,"pages":[{"title":"Build a personal assistant with subagents","sidebarTitle":"Subagents: Personal assistant","href":"/oss/python/langchain/multi-agent/subagents-personal-assistant"},{"title":"Build customer support with handoffs","sidebarTitle":"Handoffs: Customer support","href":"/oss/python/langchain/multi-agent/handoffs-customer-support"},{"title":"Build a multi-source knowledge base with routing","sidebarTitle":"Router: Knowledge base","href":"/oss/python/langchain/multi-agent/router-knowledge-base"},{"title":"Build a SQL assistant with on-demand skills","sidebarTitle":"Skills: SQL assistant","href":"/oss/python/langchain/multi-agent/skills-sql-assistant"}]},{"group":"LangGraph","expanded":true,"pages":[{"title":"Build a custom RAG agent with LangGraph","sidebarTitle":"Custom RAG agent","href":"/oss/python/langgraph/agentic-rag"},{"title":"Build a custom SQL agent","sidebarTitle":"Custom SQL agent","href":"/oss/python/langgraph/sql-agent"}]}]},{"group":"Conceptual overviews","icon":"book","pages":[{"title":"Runtimes, frameworks, and harnesses","sidebarTitle":"LangChain vs. LangGraph vs. Deep Agents","href":"/oss/python/concepts/products"},{"title":"Providers and models","href":"/oss/python/concepts/providers-and-models"},{"title":"Component architecture","href":"/oss/python/langchain/component-architecture"},{"title":"Memory overview","sidebarTitle":"Memory","href":"/oss/python/concepts/memory"},{"title":"Context overview","sidebarTitle":"Context","href":"/oss/python/concepts/context"},{"title":"Human-in-the-loop overview","sidebarTitle":"Human-in-the-loop","href":"/oss/python/concepts/human-in-the-loop"},{"title":"Graph API overview","sidebarTitle":"Graph API","href":"/oss/python/langgraph/graph-api"},{"title":"Functional API overview","sidebarTitle":"Functional API","href":"/oss/python/langgraph/functional-api"}]},{"group":"Additional resources","icon":"list","pages":[{"title":"Use docs programmatically","href":"/use-these-docs"},{"title":"LangChain Academy","url":"https://academy.langchain.com/","href":"/oss/python/langchain/academy"},{"title":"Case studies","href":"/oss/python/langgraph/case-studies"},{"title":"Get help","href":"/oss/python/langchain/get-help"}]}]},{"tab":"Reference","pages":[{"title":"Reference","sidebarTitle":"Overview","href":"/oss/python/reference/overview"},{"group":"Reference","pages":[{"title":"Deep Agents","url":"https://reference.langchain.com/python/deepagents","href":"/oss/python/reference/deepagents-python"},{"title":"LangChain SDK","url":"https://reference.langchain.com/python/langchain","href":"/oss/python/reference/langchain-python"},{"title":"LangGraph SDK","url":"https://reference.langchain.com/python/langgraph","href":"/oss/python/reference/langgraph-python"},{"title":"Integrations","url":"https://reference.langchain.com/python/integrations/overview","href":"/oss/python/reference/integrations-python"},{"title":"Errors","sidebarTitle":"Errors","href":"/oss/python/common-errors"}]},{"group":"Releases","pages":[{"title":"Versioning","href":"/oss/python/versioning"},{"title":"Changelog","sidebarTitle":"Changelog","href":"/oss/python/releases/changelog"},{"group":"Releases","boost":0.5,"pages":[{"title":"What's new in LangChain v1","sidebarTitle":"LangChain v1","href":"/oss/python/releases/langchain-v1"},{"title":"What's new in LangGraph v1","sidebarTitle":"LangGraph v1","href":"/oss/python/releases/langgraph-v1"}]},{"group":"Migration guides","boost":0.5,"pages":[{"title":"LangChain v1 migration guide","sidebarTitle":"LangChain v1","href":"/oss/python/migrate/langchain-v1"},{"title":"LangGraph v1 migration guide","sidebarTitle":"LangGraph v1","href":"/oss/python/migrate/langgraph-v1"},{"title":"Migrate from langgraph-supervisor","sidebarTitle":"langgraph-supervisor","href":"/oss/python/migrate/langgraph-supervisor"},{"title":"Migrate from langchain-mcp-adapters","sidebarTitle":"langchain-mcp-adapters","href":"/oss/python/migrate/langchain-mcp-adapters"}]}]},{"group":"Policies","pages":[{"title":"Release policy","href":"/oss/python/release-policy"},{"title":"Security policy","sidebarTitle":"Security","href":"/oss/python/security-policy"}]}]},{"tab":"Contribute","pages":[{"title":"Contributing","sidebarTitle":"Overview","href":"/oss/python/contributing/overview"},{"group":"Contribute","boost":0.5,"icon":"heart-plus","pages":[{"title":"Contributing to documentation","sidebarTitle":"Documentation","href":"/oss/python/contributing/documentation"},{"title":"Contributing to code","sidebarTitle":"Code","href":"/oss/python/contributing/code"},{"group":"Integrations","pages":[{"title":"Contributing integrations","sidebarTitle":"Guide","href":"/oss/python/contributing/integrations-langchain"},{"title":"Implement a LangChain integration","sidebarTitle":"Implement","href":"/oss/python/contributing/implement-langchain"},{"title":"Using standard tests","sidebarTitle":"Standard tests","href":"/oss/python/contributing/standard-tests-langchain"},{"title":"Publish an integration","sidebarTitle":"Publish","href":"/oss/python/contributing/publish-langchain"},{"title":"Co-marketing","href":"/oss/python/contributing/comarketing"}]}]}]}]},{"dropdown":"TypeScript","icon":{"style":"regular","name":"brand-typescript"},"tabs":[{"tab":"Overview","pages":[{"title":"Build","sidebarTitle":"Overview","mode":"custom","icon":"hammer","href":"/build-overview"}]},{"tab":"Managed Deep Agents","pages":[{"group":"Get started","tag":"BETA","pages":[{"title":"Managed Deep Agents","sidebarTitle":"Overview","href":"/langsmith/javascript/managed-deep-agents-overview"},{"title":"Managed Deep Agents quickstart","sidebarTitle":"Quickstart","href":"/langsmith/javascript/managed-deep-agents-quickstart"},{"title":"Managed Deep Agents project structure","sidebarTitle":"Project structure","href":"/langsmith/javascript/managed-deep-agents-project-structure"},{"title":"Move from Deep Agents to Managed Deep Agents","sidebarTitle":"Move from Deep Agents","href":"/langsmith/javascript/managed-deep-agents-migrate"}]},{"group":"Agent capabilities","pages":[{"title":"Define a Managed Deep Agent","sidebarTitle":"Agent definition","href":"/langsmith/javascript/managed-deep-agents-agent-definition"},{"title":"Add instructions to Managed Deep Agents","sidebarTitle":"Instructions","href":"/langsmith/javascript/managed-deep-agents-instructions"},{"title":"Add skills to Managed Deep Agents","sidebarTitle":"Skills","href":"/langsmith/javascript/managed-deep-agents-skills"},{"title":"Add custom tools to Managed Deep Agents","sidebarTitle":"Tools","href":"/langsmith/javascript/managed-deep-agents-tools"},{"title":"Web search","sidebarTitle":"Web search","href":"/langsmith/javascript/managed-deep-agents-search"},{"title":"Manage connections","sidebarTitle":"Connections","href":"/langsmith/javascript/managed-deep-agents-connections"},{"title":"Connect to MCP servers","sidebarTitle":"MCP","href":"/langsmith/javascript/managed-deep-agents-mcp-connectors"},{"title":"Add custom middleware to Managed Deep Agents","sidebarTitle":"Middleware","href":"/langsmith/javascript/managed-deep-agents-middleware"},{"title":"Add memory to Managed Deep Agents","sidebarTitle":"Memory","href":"/langsmith/javascript/managed-deep-agents-memory"},{"title":"Add a sandbox to Managed Deep Agents","sidebarTitle":"Sandboxes","href":"/langsmith/javascript/managed-deep-agents-sandboxes"},{"title":"Browser use","sidebarTitle":"Browser use","href":"/langsmith/javascript/managed-deep-agents-browser-use"},{"title":"Subagents","sidebarTitle":"Subagents","href":"/langsmith/javascript/managed-deep-agents-subagents"},{"title":"Add identity to Managed Deep Agents","sidebarTitle":"Identity","href":"/langsmith/javascript/managed-deep-agents-identity"},{"group":"Channels","expanded":false,"pages":[{"title":"Connect Managed Deep Agents to channels","sidebarTitle":"Overview","href":"/langsmith/javascript/managed-deep-agents-channels"},{"title":"Connect a Managed Deep Agent to Slack","sidebarTitle":"Slack","href":"/langsmith/javascript/managed-deep-agents-channels-slack"},{"title":"Connect a Managed Deep Agent to a custom channel over HTTP","sidebarTitle":"Custom","href":"/langsmith/javascript/managed-deep-agents-channels-http"},{"title":"Prompt Slack users with agent-owned interrupts","sidebarTitle":"Agent-owned interrupts","href":"/langsmith/javascript/managed-deep-agents-agent-owned-interrupts"}]},{"title":"Add schedules to Managed Deep Agents","sidebarTitle":"Schedules","href":"/langsmith/javascript/managed-deep-agents-schedules"},{"title":"Evaluate Managed Deep Agents","sidebarTitle":"Evals","href":"/langsmith/javascript/managed-deep-agents-evals"},{"title":"Managed Deep Agents runtime","sidebarTitle":"Runtime","href":"/langsmith/javascript/managed-deep-agents-runtime"}]},{"group":"Build and deploy","pages":[{"title":"Develop locally with LangSmith Studio","sidebarTitle":"Local Studio","href":"/langsmith/javascript/managed-deep-agents-local-development"},{"title":"Add a custom search tool, memory, and a schedule","sidebarTitle":"Build a scheduled agent","href":"/langsmith/javascript/managed-deep-agents-tutorial"},{"title":"Deploy a Managed Deep Agent","sidebarTitle":"Deploy an agent","href":"/langsmith/javascript/managed-deep-agents-deploy"},{"title":"Connect MCP clients to a Managed Deep Agent","sidebarTitle":"MCP endpoint","href":"/langsmith/javascript/managed-deep-agents-mcp-endpoint"},{"title":"Build a custom frontend for a Managed Deep Agent","sidebarTitle":"Custom frontend","href":"/langsmith/javascript/managed-deep-agents-custom-frontend"},{"title":"Manage Context Hub for Managed Deep Agents","sidebarTitle":"Context Hub","href":"/langsmith/javascript/managed-deep-agents-context-hub"},{"title":"Managed Deep Agents CLI reference","sidebarTitle":"CLI reference","href":"/langsmith/javascript/managed-deep-agents-cli"},{"title":"Changelog","url":"https://github.com/langchain-ai/managed-deepagents/blob/main/CHANGELOG.md","href":"/langsmith/javascript/managed-deep-agents-changelog"}]},{"group":"Templates","pages":[{"title":"Deploy the open-source design agent","sidebarTitle":"Design agent","href":"/langsmith/javascript/managed-deep-agents-design-agent"},{"title":"Deploy the open-source paid media agent","sidebarTitle":"Paid media agent","href":"/langsmith/javascript/managed-deep-agents-paid-media-agent"}]}]},{"tab":"Deep Agents","pages":[{"title":"Deep Agents overview","sidebarTitle":"Overview","href":"/oss/javascript/deepagents/overview"},{"group":"Get started","pages":[{"title":"Quickstart","href":"/oss/javascript/deepagents/quickstart"},{"title":"Customize Deep Agents","sidebarTitle":"Customization","href":"/oss/javascript/deepagents/customization"},{"title":"Models","href":"/oss/javascript/deepagents/models"},{"title":"Comparison with Claude Agent SDK","sidebarTitle":"Comparison with Claude Agent SDK","href":"/oss/javascript/deepagents/comparison"},{"title":"Changelog","url":"https://docs.langchain.com/oss/javascript/releases/changelog","href":"/oss/javascript/deepagents/changelog-js"}]},{"group":"Deployment","pages":[{"title":"Managed Deep Agents","sidebarTitle":"Managed Deep Agents","tag":"BETA","url":"/langsmith/javascript/managed-deep-agents-overview","href":"/langsmith/javascript/managed-deep-agents"},{"group":"Going to production","root":{"title":"Going to production","href":"/oss/javascript/deepagents/going-to-production"},"pages":[{"title":"Fault tolerance","href":"/oss/javascript/deepagents/fault-tolerance"}]}]},{"group":"Execution environment","expanded":true,"pages":[{"title":"Tools","href":"/oss/javascript/deepagents/tools"},{"title":"Backends","href":"/oss/javascript/deepagents/backends"},{"title":"Permissions","href":"/oss/javascript/deepagents/permissions"},{"title":"Multimodal inputs and outputs","sidebarTitle":"Multimodality","href":"/oss/javascript/deepagents/multimodal"},{"title":"Sandboxes","sidebarTitle":"Sandboxes","href":"/oss/javascript/deepagents/sandboxes"},{"title":"Browser use","href":"/oss/javascript/deepagents/browser-use"},{"title":"Interpreters","tag":"Beta","href":"/oss/javascript/deepagents/interpreters"},{"title":"Event streaming","tag":"Beta","href":"/oss/javascript/deepagents/event-streaming"},{"title":"Streaming","href":"/oss/javascript/deepagents/streaming"}]},{"group":"Context management","expanded":true,"pages":[{"title":"Skills","href":"/oss/javascript/deepagents/skills"},{"title":"Memory","href":"/oss/javascript/deepagents/memory"},{"title":"Retrieval","href":"/oss/javascript/deepagents/retrieval"},{"title":"Context engineering in Deep Agents","sidebarTitle":"Context engineering","href":"/oss/javascript/deepagents/context-engineering"},{"title":"Profiles","tag":"Beta","href":"/oss/javascript/deepagents/profiles"},{"title":"OpenWiki","sidebarTitle":"OpenWiki","url":"/oss/openwiki/overview","href":"/oss/javascript/deepagents/openwiki"}]},{"group":"Delegation","expanded":true,"pages":[{"title":"Subagents","href":"/oss/javascript/deepagents/subagents"},{"title":"Dynamic subagents","tag":"Beta","href":"/oss/javascript/deepagents/dynamic-subagents"},{"title":"Async subagents","href":"/oss/javascript/deepagents/async-subagents"}]},{"group":"Steering","expanded":true,"pages":[{"title":"Human-in-the-loop","href":"/oss/javascript/deepagents/human-in-the-loop"}]},{"group":"Middleware","expanded":true,"pages":[{"title":"Middleware overview","sidebarTitle":"Overview","href":"/oss/javascript/langchain/middleware/overview"},{"title":"Prebuilt middleware","href":"/oss/javascript/langchain/middleware/built-in"},{"title":"Custom middleware","href":"/oss/javascript/langchain/middleware/custom"}]},{"group":"Frontend","pages":[{"title":"Overview","href":"/oss/javascript/deepagents/frontend/overview"},{"group":"Patterns","pages":[{"title":"Subagent streaming","href":"/oss/javascript/deepagents/frontend/subagent-streaming"},{"title":"Todo list","href":"/oss/javascript/deepagents/frontend/todo-list"},{"title":"Sandbox","href":"/oss/javascript/deepagents/frontend/sandbox"}]}]},{"group":"Protocols","pages":[{"title":"Agent Client Protocol (ACP)","href":"/oss/javascript/deepagents/acp"},{"title":"Model Context Protocol","sidebarTitle":"MCP with LangChain","url":"/oss/javascript/langchain/mcp","href":"/oss/javascript/deepagents/mcp"},{"title":"A2A server","sidebarTitle":"A2A with LangSmith","url":"/langsmith/server-a2a","href":"/oss/javascript/deepagents/a2a"},{"title":"Agent User Interaction Protocol (AG-UI)","sidebarTitle":"AG-UI","href":"/oss/javascript/deepagents/ag-ui"}]}]},{"tab":"LangChain","pages":[{"title":"LangChain overview","sidebarTitle":"Overview","href":"/oss/javascript/langchain/overview"},{"group":"Get started","pages":[{"title":"Install LangChain","sidebarTitle":"Install","href":"/oss/javascript/langchain/install"},{"title":"Quickstart","href":"/oss/javascript/langchain/quickstart"},{"title":"Changelog","url":"https://docs.langchain.com/oss/javascript/releases/changelog","href":"/oss/javascript/langchain/changelog-js"},{"title":"Philosophy","mode":"wide","href":"/oss/javascript/langchain/philosophy"}]},{"group":"Core components","pages":[{"title":"Agents","href":"/oss/javascript/langchain/agents"},{"title":"Models","href":"/oss/javascript/langchain/models"},{"title":"Messages","href":"/oss/javascript/langchain/messages"},{"title":"Tools","href":"/oss/javascript/langchain/tools"},{"title":"Short-term memory","href":"/oss/javascript/langchain/short-term-memory"},{"title":"Event streaming","href":"/oss/javascript/langchain/event-streaming"},{"title":"Streaming","href":"/oss/javascript/langchain/streaming"},{"title":"Structured output","href":"/oss/javascript/langchain/structured-output"}]},{"group":"Middleware","pages":[{"title":"Middleware overview","sidebarTitle":"Overview","href":"/oss/javascript/langchain/middleware/overview"},{"title":"Prebuilt middleware","href":"/oss/javascript/langchain/middleware/built-in"},{"title":"Custom middleware","href":"/oss/javascript/langchain/middleware/custom"}]},{"group":"Frontend","pages":[{"title":"Overview","href":"/oss/javascript/langchain/frontend/overview"},{"group":"Patterns","pages":[{"title":"Markdown messages","href":"/oss/javascript/langchain/frontend/markdown-messages"},{"title":"Tool calling","href":"/oss/javascript/langchain/frontend/tool-calling"},{"title":"Headless tools","href":"/oss/javascript/langchain/frontend/headless-tools"},{"title":"Human-in-the-Loop","href":"/oss/javascript/langchain/frontend/human-in-the-loop"},{"title":"Branching chat","href":"/oss/javascript/langchain/frontend/branching-chat"},{"title":"Reasoning tokens","href":"/oss/javascript/langchain/frontend/reasoning-tokens"},{"title":"Structured output","href":"/oss/javascript/langchain/frontend/structured-output"},{"title":"Message queues","href":"/oss/javascript/langchain/frontend/message-queues"},{"title":"Join \u0026 rejoin streams","href":"/oss/javascript/langchain/frontend/join-rejoin"},{"title":"Time travel","href":"/oss/javascript/langchain/frontend/time-travel"},{"group":"Generative UI","pages":[{"title":"Generative UI overview","sidebarTitle":"Overview","href":"/oss/javascript/langchain/frontend/generative-ui-overview"},{"title":"Controlled generative UI","sidebarTitle":"Controlled","href":"/oss/javascript/langchain/frontend/controlled-generative-ui"},{"title":"Declarative generative UI","sidebarTitle":"Declarative","href":"/oss/javascript/langchain/frontend/declarative-generative-ui"},{"title":"Open-ended generative UI","sidebarTitle":"Open-ended","href":"/oss/javascript/langchain/frontend/open-ended-generative-ui"}]}]},{"group":"Integrations","pages":[{"title":"Overview","href":"/oss/javascript/langchain/frontend/integrations/overview"},{"title":"CopilotKit","href":"/oss/javascript/langchain/frontend/integrations/copilotkit"},{"title":"AI Elements","href":"/oss/javascript/langchain/frontend/integrations/ai-elements"},{"title":"assistant-ui","href":"/oss/javascript/langchain/frontend/integrations/assistant-ui"},{"title":"OpenUI","href":"/oss/javascript/langchain/frontend/integrations/openui"}]}]},{"group":"Advanced usage","pages":[{"title":"Guardrails","href":"/oss/javascript/langchain/guardrails"},{"title":"Runtime","href":"/oss/javascript/langchain/runtime"},{"title":"Context engineering in agents","sidebarTitle":"Context engineering","href":"/oss/javascript/langchain/context-engineering"},{"group":"MCP","pages":[{"title":"Model Context Protocol (MCP)","sidebarTitle":"Overview","href":"/oss/javascript/langchain/mcp/index"},{"title":"Tools","href":"/oss/javascript/langchain/mcp/tools"},{"title":"Connections","href":"/oss/javascript/langchain/mcp/connections"},{"title":"Authentication","href":"/oss/javascript/langchain/mcp/auth"}]},{"title":"Human-in-the-loop","href":"/oss/javascript/langchain/human-in-the-loop"},{"group":"Multi-agent","pages":[{"title":"Multi-agent","sidebarTitle":"Overview","href":"/oss/javascript/langchain/multi-agent/index"},{"title":"Subagents","href":"/oss/javascript/langchain/multi-agent/subagents"},{"title":"Handoffs","href":"/oss/javascript/langchain/multi-agent/handoffs"},{"title":"Skills","href":"/oss/javascript/langchain/multi-agent/skills"},{"title":"Router","href":"/oss/javascript/langchain/multi-agent/router"},{"title":"Custom workflow","href":"/oss/javascript/langchain/multi-agent/custom-workflow"}]},{"title":"Retrieval","href":"/oss/javascript/deepagents/retrieval"},{"title":"Long-term memory","href":"/oss/javascript/langchain/long-term-memory"}]},{"group":"Agent development","pages":[{"title":"LangSmith Studio","sidebarTitle":"LangSmith Studio","href":"/oss/javascript/langchain/studio"},{"group":"Test","pages":[{"title":"Test","sidebarTitle":"Overview","href":"/oss/javascript/langchain/test/index"},{"title":"Unit testing","href":"/oss/javascript/langchain/test/unit-testing"},{"title":"Integration testing","href":"/oss/javascript/langchain/test/integration-testing"},{"title":"Agent Evals","href":"/oss/javascript/langchain/test/evals"}]},{"title":"Agent Chat UI","href":"/oss/javascript/langchain/ui"}]},{"group":"Production","pages":[{"title":"Deployment","sidebarTitle":"Deployment","href":"/oss/javascript/langchain/deploy"},{"title":"LangSmith Observability","sidebarTitle":"Observability","href":"/oss/javascript/langchain/observability"}]}]},{"tab":"LangGraph","pages":[{"title":"LangGraph overview","sidebarTitle":"Overview","href":"/oss/javascript/langgraph/overview"},{"group":"Get started","pages":[{"title":"Quickstart","href":"/oss/javascript/langgraph/quickstart"},{"title":"Changelog","url":"https://docs.langchain.com/oss/javascript/releases/changelog","href":"/oss/javascript/langgraph/changelog-js"}]},{"group":"Capabilities","pages":[{"title":"Persistence","href":"/oss/javascript/langgraph/persistence"},{"title":"Fault tolerance","href":"/oss/javascript/langgraph/fault-tolerance"},{"title":"Checkpointers","href":"/oss/javascript/langgraph/checkpointers"},{"title":"Stores","href":"/oss/javascript/langgraph/stores"},{"title":"Event streaming","href":"/oss/javascript/langgraph/event-streaming"},{"title":"Streaming","href":"/oss/javascript/langgraph/streaming"},{"title":"Interrupts","href":"/oss/javascript/langgraph/interrupts"},{"title":"Use time-travel","sidebarTitle":"Time travel","href":"/oss/javascript/langgraph/use-time-travel"},{"title":"Memory","href":"/oss/javascript/langgraph/add-memory"},{"title":"Subgraphs","sidebarTitle":"Subgraphs","href":"/oss/javascript/langgraph/use-subgraphs"}]},{"group":"Patterns","pages":[{"title":"Workflows and agents","sidebarTitle":"Workflows + agents","href":"/oss/javascript/langgraph/workflows-agents"}]},{"group":"Build with the Graph API","pages":[{"title":"Thinking in the Graph API","sidebarTitle":"Thinking in the Graph API","href":"/oss/javascript/langgraph/thinking-in-graph-api"},{"title":"Build checklist for the Graph API","sidebarTitle":"Build checklist","href":"/oss/javascript/langgraph/use-graph-api"},{"title":"Graph API overview","sidebarTitle":"Graph API","href":"/oss/javascript/langgraph/graph-api"},{"title":"Define and update state","sidebarTitle":"Define and update state","href":"/oss/javascript/langgraph/graph-api-state"},{"title":"Build sequences, branches, and loops","sidebarTitle":"Control flow","href":"/oss/javascript/langgraph/graph-api-control-flow"},{"title":"Use Send and Command","sidebarTitle":"Send and Command","href":"/oss/javascript/langgraph/graph-api-send-command"},{"title":"Configure nodes","sidebarTitle":"Configure nodes","href":"/oss/javascript/langgraph/graph-api-nodes"},{"title":"Visualize your graph","sidebarTitle":"Visualize your graph","href":"/oss/javascript/langgraph/graph-api-visualize"}]},{"group":"Deployment","pages":[{"title":"Run a local server","sidebarTitle":"Local server","href":"/oss/javascript/langgraph/local-server"},{"title":"Application structure","href":"/oss/javascript/langgraph/application-structure"},{"title":"Test","href":"/oss/javascript/langgraph/test"},{"title":"Backward compatibility","href":"/oss/javascript/langgraph/backward-compatibility"},{"title":"LangSmith Studio","href":"/oss/javascript/langgraph/studio"},{"title":"Agent Chat UI","href":"/oss/javascript/langgraph/ui"},{"title":"Deployment","sidebarTitle":"Deployment","href":"/oss/javascript/langgraph/deploy"},{"title":"LangSmith Observability","href":"/oss/javascript/langgraph/observability"}]},{"group":"Frontend","pages":[{"title":"Overview","href":"/oss/javascript/langgraph/frontend/overview"},{"title":"Graph execution","href":"/oss/javascript/langgraph/frontend/graph-execution"},{"title":"Custom stream channels","href":"/oss/javascript/langgraph/frontend/custom-stream-channels"}]},{"group":"Advanced","pages":[{"title":"Functional API overview","sidebarTitle":"Functional API","href":"/oss/javascript/langgraph/functional-api"},{"title":"LangGraph runtime","sidebarTitle":"Runtime","href":"/oss/javascript/langgraph/pregel"}]},{"title":"Studio","url":"https://docs.langchain.com/langsmith/studio","href":"/oss/javascript/studio"}]},{"tab":"OpenWiki","pages":[{"title":"OpenWiki","sidebarTitle":"Overview","mode":"wide","href":"/oss/openwiki/overview"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/oss/openwiki/quickstart"},{"group":"Modes","pages":[{"title":"Code mode","sidebarTitle":"Code mode","href":"/oss/openwiki/code-mode"},{"title":"Personal mode","sidebarTitle":"Personal mode","href":"/oss/openwiki/personal-mode"}]},{"title":"Coding-agent integrations","sidebarTitle":"Integrations","href":"/oss/openwiki/integrations"},{"title":"Search and link wikis","sidebarTitle":"Search and link","href":"/oss/openwiki/search-and-link"},{"title":"Visualize your wiki","sidebarTitle":"Visualize","href":"/oss/openwiki/visualize"},{"title":"Command reference","sidebarTitle":"CLI reference","href":"/oss/openwiki/cli-reference"},{"title":"Customize OpenWiki","sidebarTitle":"Customize OpenWiki","href":"/oss/openwiki/customize"},{"title":"Model providers","sidebarTitle":"Providers","href":"/oss/openwiki/providers"},{"title":"Automate updates","sidebarTitle":"Automate updates","href":"/oss/openwiki/automate-updates"},{"title":"Changelog","url":"https://github.com/langchain-ai/openwiki/releases","href":"/oss/openwiki/changelog"}]},{"tab":"Integrations","pages":[{"title":"LangChain JavaScript integrations","sidebarTitle":"Overview","mode":"wide","href":"/oss/javascript/integrations/providers/overview"},{"title":"All LangChain JavaScript integration providers","sidebarTitle":"All providers","mode":"wide","href":"/oss/javascript/integrations/providers/all_providers"},{"group":"Popular Providers","icon":"users-group","pages":[{"group":"OpenAI","pages":[{"title":"OpenAI integrations","sidebarTitle":"Overview","href":"/oss/javascript/integrations/providers/openai"},{"title":"ChatOpenAI integration","sidebarTitle":"Chat","href":"/oss/javascript/integrations/chat/openai"},{"title":"OpenAIEmbeddings integration","sidebarTitle":"Embeddings","href":"/oss/javascript/integrations/embeddings/openai"},{"title":"OpenAI integration","sidebarTitle":"Tools","href":"/oss/javascript/integrations/tools/openai"}]},{"group":"Anthropic","pages":[{"title":"Anthropic integrations","sidebarTitle":"Overview","href":"/oss/javascript/integrations/providers/anthropic"},{"title":"ChatAnthropic integration","sidebarTitle":"Chat","href":"/oss/javascript/integrations/chat/anthropic"},{"title":"Anthropic integration","sidebarTitle":"Tools","href":"/oss/javascript/integrations/tools/anthropic"}]},{"group":"Google","pages":[{"title":"Google integrations","sidebarTitle":"Overview","href":"/oss/javascript/integrations/providers/google"},{"title":"ChatGoogle integration","sidebarTitle":"Chat","href":"/oss/javascript/integrations/chat/google"},{"title":"Google integration","sidebarTitle":"Tools","href":"/oss/javascript/integrations/tools/google"},{"title":"ChatGoogleGenerativeAI integration","sidebarTitle":"ChatGoogleGenerativeAI (Legacy)","href":"/oss/javascript/integrations/chat/google_generative_ai"},{"title":"ChatVertexAI integration","sidebarTitle":"ChatVertexAI (Legacy)","href":"/oss/javascript/integrations/chat/google_vertex_ai"}]},{"group":"AWS","pages":[{"title":"AWS integrations","sidebarTitle":"Overview","href":"/oss/javascript/integrations/providers/aws"},{"title":"ChatBedrockConverse integration","href":"/oss/javascript/integrations/chat/bedrock_converse"},{"title":"BedrockEmbeddings integration","sidebarTitle":"Embeddings","href":"/oss/javascript/integrations/embeddings/bedrock"}]},{"group":"Microsoft","pages":[{"title":"Microsoft integrations","sidebarTitle":"Overview","href":"/oss/javascript/integrations/providers/microsoft"},{"title":"AzureChatOpenAI integration","sidebarTitle":"Chat","href":"/oss/javascript/integrations/chat/azure"},{"title":"AzureOpenAIEmbeddings integration","sidebarTitle":"Embeddings","href":"/oss/javascript/integrations/embeddings/azure_openai"}]}]},{"group":"General integrations","icon":"plug","pages":[{"title":"Chat model integrations","sidebarTitle":"Chat models","href":"/oss/javascript/integrations/chat/index"},{"title":"Tool integrations","sidebarTitle":"Tools and Toolkits","href":"/oss/javascript/integrations/tools/index"},{"title":"LLM integrations","sidebarTitle":"LLMs","href":"/oss/javascript/integrations/llms/index"},{"title":"Middleware integrations","sidebarTitle":"Middleware","href":"/oss/javascript/integrations/middleware/index"},{"title":"Sandbox integrations","sidebarTitle":"Sandboxes","href":"/oss/javascript/integrations/sandboxes/index"},{"title":"Backend integrations","sidebarTitle":"Backends","href":"/oss/javascript/integrations/backends/index"},{"title":"Store integrations","sidebarTitle":"Key-value stores","href":"/oss/javascript/integrations/stores/index"},{"title":"Store integrations","sidebarTitle":"Stores","href":"/oss/javascript/integrations/long-term-memory/index"},{"title":"Document transformer integrations","sidebarTitle":"Document transformers","href":"/oss/javascript/integrations/document_transformers/index"},{"title":"Cache integrations","sidebarTitle":"Model caches","href":"/oss/javascript/integrations/llm_caching/index"}]},{"group":"RAG integrations","icon":"database","pages":[{"title":"Retriever integrations","sidebarTitle":"Retrievers","href":"/oss/javascript/integrations/retrievers/index"},{"title":"Text splitter integrations","sidebarTitle":"Text splitters","href":"/oss/javascript/integrations/splitters/index"},{"title":"Embedding model integrations","sidebarTitle":"Embedding models","href":"/oss/javascript/integrations/embeddings/index"},{"title":"Vector store integrations","sidebarTitle":"Vector stores","href":"/oss/javascript/integrations/vectorstores/index"},{"title":"Document loader integrations","sidebarTitle":"Document loaders","href":"/oss/javascript/integrations/document_loaders/index"},{"title":"Store integrations","sidebarTitle":"Key-value stores","href":"/oss/javascript/integrations/stores/index"}]}]},{"tab":"Learn","pages":[{"title":"Learn","href":"/oss/javascript/learn"},{"group":"Tutorials","icon":"code","pages":[{"group":"Deep Agents","expanded":true,"pages":[{"title":"Build a deep research agent","sidebarTitle":"Deep Research","href":"/oss/javascript/deepagents/deep-research"},{"title":"Build a content builder agent","sidebarTitle":"Content Builder","href":"/oss/javascript/deepagents/content-builder"},{"title":"Retrieval Augmented Generation (RAG) with Deep Agents","sidebarTitle":"RAG","href":"/oss/javascript/deepagents/rag"}]},{"group":"LangChain","expanded":true,"pages":[{"title":"Build a data analysis agent from scratch","sidebarTitle":"Deep Agent","href":"/oss/javascript/langchain/deep-agent-from-scratch"},{"title":"Build a semantic search engine with LangChain","sidebarTitle":"Semantic search","href":"/oss/javascript/langchain/knowledge-base"},{"title":"Build a SQL agent","sidebarTitle":"SQL agent","href":"/oss/javascript/langchain/sql-agent"},{"title":"Build a voice agent with LangChain","sidebarTitle":"Voice agent","href":"/oss/javascript/langchain/voice-agent"}]},{"group":"Multi-agent","expanded":true,"pages":[{"title":"Build a personal assistant with subagents","sidebarTitle":"Subagents: Personal assistant","href":"/oss/javascript/langchain/multi-agent/subagents-personal-assistant"},{"title":"Build customer support with handoffs","sidebarTitle":"Handoffs: Customer support","href":"/oss/javascript/langchain/multi-agent/handoffs-customer-support"},{"title":"Build a multi-source knowledge base with routing","sidebarTitle":"Router: Knowledge base","href":"/oss/javascript/langchain/multi-agent/router-knowledge-base"},{"title":"Build a SQL assistant with on-demand skills","sidebarTitle":"Skills: SQL assistant","href":"/oss/javascript/langchain/multi-agent/skills-sql-assistant"}]},{"group":"LangGraph","expanded":true,"pages":[{"title":"Build a custom RAG agent with LangGraph","sidebarTitle":"Custom RAG agent","href":"/oss/javascript/langgraph/agentic-rag"},{"title":"Build a custom SQL agent","sidebarTitle":"Custom SQL agent","href":"/oss/javascript/langgraph/sql-agent"}]}]},{"group":"Conceptual overviews","icon":"book","pages":[{"title":"Runtimes, frameworks, and harnesses","sidebarTitle":"LangChain vs. LangGraph vs. Deep Agents","href":"/oss/javascript/concepts/products"},{"title":"Providers and models","href":"/oss/javascript/concepts/providers-and-models"},{"title":"Component architecture","href":"/oss/javascript/langchain/component-architecture"},{"title":"Memory overview","sidebarTitle":"Memory","href":"/oss/javascript/concepts/memory"},{"title":"Context overview","sidebarTitle":"Context","href":"/oss/javascript/concepts/context"},{"title":"Human-in-the-loop overview","sidebarTitle":"Human-in-the-loop","href":"/oss/javascript/concepts/human-in-the-loop"},{"title":"Graph API overview","sidebarTitle":"Graph API","href":"/oss/javascript/langgraph/graph-api"},{"title":"Functional API overview","sidebarTitle":"Functional API","href":"/oss/javascript/langgraph/functional-api"}]},{"group":"LangChain Academy","icon":"school","pages":[{"title":"LangChain Academy","url":"https://academy.langchain.com/","href":"/oss/javascript/langchain/academy"}]},{"group":"Additional resources","icon":"list","pages":[{"title":"Use docs programmatically","href":"/use-these-docs"},{"title":"Case studies","href":"/oss/javascript/langgraph/case-studies"},{"title":"Get help","href":"/oss/javascript/langchain/get-help"}]}]},{"tab":"Reference","pages":[{"title":"Reference","sidebarTitle":"Overview","href":"/oss/javascript/reference/overview"},{"group":"Reference","pages":[{"title":"Deep Agents","url":"https://reference.langchain.com/javascript/deepagents","href":"/oss/javascript/reference/deepagents-javascript"},{"title":"LangChain SDK","url":"https://reference.langchain.com/javascript/langchain","href":"/oss/javascript/reference/langchain-javascript"},{"title":"LangGraph SDK","url":"https://reference.langchain.com/javascript/langchain-langgraph","href":"/oss/javascript/reference/langgraph-javascript"},{"title":"Integrations","url":"https://reference.langchain.com/javascript/integrations/overview","href":"/oss/javascript/reference/integrations-javascript"},{"title":"Errors","sidebarTitle":"Errors","href":"/oss/javascript/common-errors"}]},{"group":"Releases","pages":[{"title":"Versioning","href":"/oss/javascript/versioning"},{"title":"Changelog","sidebarTitle":"Changelog","href":"/oss/javascript/releases/changelog"},{"group":"Releases","boost":0.5,"pages":[{"title":"What's new in LangChain v1","sidebarTitle":"LangChain v1","href":"/oss/javascript/releases/langchain-v1"},{"title":"What's new in LangGraph v1","sidebarTitle":"LangGraph v1","href":"/oss/javascript/releases/langgraph-v1"}]},{"group":"Migration guides","boost":0.5,"pages":[{"title":"LangChain v1 migration guide","sidebarTitle":"LangChain v1","href":"/oss/javascript/migrate/langchain-v1"},{"title":"LangGraph v1 migration guide","sidebarTitle":"LangGraph v1","href":"/oss/javascript/migrate/langgraph-v1"},{"title":"Migrate to @langchain/mcp-adapters 2.0","sidebarTitle":"MCP adapters v2","href":"/oss/javascript/migrate/langchain-mcp-adapters"}]}]},{"group":"Policies","pages":[{"title":"Release policy","href":"/oss/javascript/release-policy"},{"title":"Security policy","sidebarTitle":"Security","href":"/oss/javascript/security-policy"}]}]},{"tab":"Contribute","pages":[{"title":"Contributing","sidebarTitle":"Overview","href":"/oss/javascript/contributing/overview"},{"group":"Contribute","boost":0.5,"icon":"heart-plus","pages":[{"title":"Contributing to documentation","sidebarTitle":"Documentation","href":"/oss/javascript/contributing/documentation"},{"title":"Contributing to code","sidebarTitle":"Code","href":"/oss/javascript/contributing/code"},{"group":"Integrations","pages":[{"title":"Contributing integrations","sidebarTitle":"Guide","href":"/oss/javascript/contributing/integrations-langchain"},{"title":"Implement a LangChain integration","sidebarTitle":"Implement","href":"/oss/javascript/contributing/implement-langchain"},{"title":"Using standard tests","sidebarTitle":"Standard tests","href":"/oss/javascript/contributing/standard-tests-langchain"},{"title":"Publish an integration","sidebarTitle":"Publish","href":"/oss/javascript/contributing/publish-langchain"},{"title":"Co-marketing","href":"/oss/javascript/contributing/comarketing"}]}]}]}]}]},{"item":"Test","icon":"flask","description":"Evaluate and refine agents","tabs":[{"tab":"Get started","pages":[{"title":"LangSmith Evaluation","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/evaluation"},{"title":"Evaluation quickstart","sidebarTitle":"Quickstart","href":"/langsmith/evaluation-quickstart"},{"title":"Evaluation concepts","sidebarTitle":"Concepts","href":"/langsmith/evaluation-concepts"},{"title":"Application-specific evaluation approaches","sidebarTitle":"Evaluation approaches","href":"/langsmith/evaluation-approaches"}]},{"tab":"Datasets \u0026 Experiments","pages":[{"group":"Datasets","pages":[{"group":"Create a dataset","pages":[{"title":"Create and manage datasets in the UI","sidebarTitle":"With the UI","icon":"browser","href":"/langsmith/manage-datasets-in-application"},{"title":"How to create and manage datasets programmatically","sidebarTitle":"With the SDK","href":"/langsmith/manage-datasets-programmatically"}]},{"title":"Manage datasets","sidebarTitle":"Manage datasets","href":"/langsmith/manage-datasets"},{"title":"Custom output rendering","sidebarTitle":"Custom output rendering","href":"/langsmith/custom-output-rendering"}]},{"group":"Run an evaluation","pages":[{"title":"How to evaluate agents","sidebarTitle":"With the SDK","href":"/langsmith/evaluate-llm-application"},{"title":"How to evaluate with OpenTelemetry","sidebarTitle":"With OpenTelemetry","href":"/langsmith/evaluate-with-opentelemetry"},{"title":"Run an evaluation with the UI","sidebarTitle":"With the UI","url":"/langsmith/run-evaluation-from-playground","href":"/langsmith/playground-link"},{"title":"How to use the REST API","sidebarTitle":"With the API","href":"/langsmith/run-evals-api-only"}]},{"group":"Evaluation techniques","pages":[{"group":"Define evaluation target","pages":[{"title":"How to define a target function to evaluate","sidebarTitle":"Define a target function to evaluate","href":"/langsmith/define-target-function"},{"title":"How to evaluate an application's intermediate steps","sidebarTitle":"Evaluate intermediate steps","href":"/langsmith/evaluate-on-intermediate-steps"},{"title":"How to evaluate a runnable","sidebarTitle":"Evaluate a runnable","href":"/langsmith/langchain-runnable"},{"title":"How to evaluate a graph","sidebarTitle":"Evaluate a graph","href":"/langsmith/evaluate-graph"},{"title":"How to simulate multi-turn interactions","sidebarTitle":"Simulate multi-turn interactions","href":"/langsmith/multi-turn-simulation"},{"title":"How to evaluate your agent with trajectory evaluations","sidebarTitle":"Evaluate agent trajectories","href":"/langsmith/trajectory-evals"}]},{"group":"Scoring methods","pages":[{"title":"How to return multiple scores in one evaluator","sidebarTitle":"Return multiple scores in one evaluator","href":"/langsmith/multiple-scores"},{"title":"How to return categorical vs numerical metrics","sidebarTitle":"Return categorical vs numerical metrics","href":"/langsmith/metric-type"}]},{"group":"Experiment configuration","pages":[{"title":"Experiment configuration","sidebarTitle":"Experiment configuration","href":"/langsmith/experiment-configuration"},{"title":"How to run an evaluation asynchronously","sidebarTitle":"Run an evaluation asynchronously","href":"/langsmith/evaluation-async"},{"title":"How to evaluate with repetitions","sidebarTitle":"Evaluate with repetitions","href":"/langsmith/repetition"},{"title":"How to handle model rate limits","sidebarTitle":"Handle model rate limits","href":"/langsmith/handle-model-rate-limiting"},{"title":"Automatically run evaluators on experiments","sidebarTitle":"Run evaluators on experiments","url":"/langsmith/bind-evaluator-to-dataset","href":"/langsmith/bind-evaluator-to-dataset-link"},{"title":"How to add evaluators to an existing experiment (Python only)","sidebarTitle":"Evaluate an existing experiment (Python)","href":"/langsmith/evaluate-existing-experiment"},{"title":"How to run an evaluation locally (Python only)","sidebarTitle":"Run an evaluation locally (Python)","href":"/langsmith/local"},{"title":"How to read experiment results locally","sidebarTitle":"Read experiment results locally","href":"/langsmith/read-local-experiment-results"},{"title":"How to retry failed runs in experiments (Python only)","sidebarTitle":"Retry on failed experiment runs (Python)","href":"/langsmith/evaluate-with-retry"}]},{"group":"Multimodal evaluations","pages":[{"title":"Run an evaluation with multimodal content","sidebarTitle":"Run an evaluation with multimodal content","href":"/langsmith/evaluate-with-attachments"}]}]},{"group":"Analyze experiment results","pages":[{"title":"Analyze an experiment","sidebarTitle":"Analyze an experiment","href":"/langsmith/analyze-an-experiment"},{"title":"LangSmith Chat","sidebarTitle":"Analyze with Chat","url":"/langsmith/chat#evaluation","href":"/langsmith/chat-evaluation"},{"title":"How to compare experiment results","sidebarTitle":"Compare experiment results","href":"/langsmith/compare-experiment-results"},{"title":"How to filter experiments in the UI","sidebarTitle":"Filter experiments in the UI","href":"/langsmith/filter-experiments-ui"},{"title":"How to fetch performance metrics for an experiment","sidebarTitle":"Fetch performance metrics for an experiment","href":"/langsmith/fetch-perf-metrics-experiment"},{"title":"How to upload experiments run outside of LangSmith with the REST API","sidebarTitle":"Upload experiments run outside of LangSmith","href":"/langsmith/upload-existing-experiments"}]},{"group":"Fine-tuning","pages":[{"title":"Fine-tune models with Smithtune","sidebarTitle":"Fine-tune models","tag":"Beta","href":"/langsmith/smithtune"}]},{"group":"Tutorials","pages":[{"title":"Evaluate a chatbot","sidebarTitle":"Evaluate a chatbot","href":"/langsmith/evaluate-chatbot-tutorial"},{"title":"Evaluate a RAG application","sidebarTitle":"Evaluate a RAG application","href":"/langsmith/evaluate-rag-tutorial"},{"title":"Test a ReAct agent with Pytest/Vitest and LangSmith","sidebarTitle":"Test a ReAct agent with Pytest/Vitest and LangSmith","href":"/langsmith/test-react-agent-pytest"},{"title":"Evaluate a complex agent","sidebarTitle":"Evaluate a complex agent","href":"/langsmith/evaluate-complex-agent"},{"title":"Run backtests on a new version of an agent","sidebarTitle":"Run backtests on a new version of an agent","href":"/langsmith/run-backtests-new-agent"}]},{"group":"Common data types","pages":[{"title":"Example data format","sidebarTitle":"Example data format","href":"/langsmith/example-data-format"},{"title":"Dataset prebuilt JSON schema types","sidebarTitle":"Dataset prebuilt JSON schema types","href":"/langsmith/dataset-json-types"},{"title":"Dataset transformations","sidebarTitle":"Dataset transformations","href":"/langsmith/dataset-transformations"}]}]},{"tab":"Evaluators","pages":[{"title":"Evaluation types","sidebarTitle":"Overview","href":"/langsmith/evaluation-types"},{"title":"Manage evaluators","sidebarTitle":"Manage evaluators","href":"/langsmith/evaluators"},{"title":"Manage evaluators with the SDK","sidebarTitle":"Manage evaluators programmatically","icon":"code","tag":"SDK","href":"/langsmith/manage-evaluators-sdk"},{"title":"Automatically run evaluators on experiments","sidebarTitle":"Run evaluators on experiments","href":"/langsmith/bind-evaluator-to-dataset"},{"title":"Track and limit evaluator spend","sidebarTitle":"Evaluator spend","href":"/langsmith/evaluator-spend"},{"group":"Evaluator types","pages":[{"group":"UI","pages":[{"title":"How to define an LLM-as-a-judge evaluator","sidebarTitle":"LLM-as-a-judge","href":"/langsmith/llm-as-judge"},{"title":"How to define a decision model evaluator","sidebarTitle":"Decision model","href":"/langsmith/decision-model-evaluator"},{"title":"How to define a code evaluator","sidebarTitle":"Code evaluator","href":"/langsmith/code-evaluator-ui"},{"title":"How to create a composite evaluator","sidebarTitle":"Composite evaluators","href":"/langsmith/composite-evaluators-ui"}]},{"group":"SDK","pages":[{"title":"How to define an LLM-as-a-judge evaluator","sidebarTitle":"LLM-as-a-judge","href":"/langsmith/llm-as-judge-sdk"},{"title":"How to define a code evaluator","sidebarTitle":"Code evaluator","href":"/langsmith/code-evaluator-sdk"},{"title":"How to create a composite evaluator","sidebarTitle":"Composite evaluators","href":"/langsmith/composite-evaluators-sdk"},{"title":"How to define a summary evaluator","sidebarTitle":"Summary evaluator","href":"/langsmith/summary"},{"title":"How to run a pairwise evaluation","sidebarTitle":"Pairwise evaluation","href":"/langsmith/evaluate-pairwise"}]}]},{"group":"Frameworks \u0026 integrations","pages":[{"title":"Run evals with openevals package","sidebarTitle":"Run evals with openevals package","href":"/langsmith/openevals"},{"title":"How to run evaluations with pytest","sidebarTitle":"Run evals with pytest","href":"/langsmith/pytest"},{"title":"How to run evaluations with Vitest/Jest","sidebarTitle":"Run evals with Vitest/Jest","href":"/langsmith/vitest-jest"},{"title":"Harbor integrations","href":"/langsmith/harbor-integrations"}]},{"group":"Improve evaluators","pages":[{"title":"Improve LLM-as-judge evaluators using human feedback","sidebarTitle":"Improve LLM-as-judge evaluators using human feedback","href":"/langsmith/improve-judge-evaluator-feedback"},{"title":"How to improve your evaluator with few-shot examples","sidebarTitle":"Improve your evaluator with few-shot examples","href":"/langsmith/create-few-shot-evaluators"},{"title":"How to audit evaluator scores","sidebarTitle":"Audit evaluator scores","href":"/langsmith/audit-evaluator-scores"}]}]},{"tab":"Annotation Queues","pages":[{"title":"Use annotation queues","sidebarTitle":"Use annotation queues","href":"/langsmith/annotation-queues"},{"title":"Build custom views for annotation queues","sidebarTitle":"Build custom views","href":"/langsmith/annotation-queue-custom-views"},{"title":"Manage feedback \u0026 annotation queues programmatically","sidebarTitle":"Manage feedback \u0026 annotation queues","tag":"SDK","href":"/langsmith/annotation-queues-sdk"},{"title":"Use assertions","sidebarTitle":"Use assertions","href":"/langsmith/assertions"},{"title":"Set up feedback criteria","sidebarTitle":"Set up feedback criteria","href":"/langsmith/set-up-feedback-criteria"},{"title":"Annotate traces and runs inline","sidebarTitle":"Annotate traces and runs inline","href":"/langsmith/annotate-traces-inline"},{"group":"Feedback","pages":[{"title":"Log user feedback using the SDK","sidebarTitle":"Log user feedback using the SDK","href":"/langsmith/attach-user-feedback"},{"title":"Collect feedback with presigned URLs","sidebarTitle":"Collect feedback with presigned URLs","href":"/langsmith/presigned-feedback-tokens"}]}]},{"tab":"Test from Playground","pages":[{"title":"Test from the Playground","sidebarTitle":"Overview","href":"/langsmith/test-from-playground"},{"title":"Run an evaluation from the Playground","sidebarTitle":"Run an evaluation","href":"/langsmith/run-evaluation-from-playground"}]},{"tab":"Test from Studio","pages":[{"title":"LangSmith Studio","sidebarTitle":"Overview","href":"/langsmith/studio"},{"title":"Get started with Studio","sidebarTitle":"Quickstart","href":"/langsmith/quick-start-studio"},{"title":"How to use Studio","sidebarTitle":"Runs, assistants, threads","href":"/langsmith/use-studio"},{"title":"Observability in Studio","sidebarTitle":"Traces, datasets, prompts","href":"/langsmith/observability-studio"},{"title":"Studio troubleshooting","sidebarTitle":"Troubleshooting","href":"/langsmith/troubleshooting-studio"}]}]},{"item":"Deploy","icon":"rocket","description":"Ship agents to production","tabs":[{"tab":"Get started","pages":[{"title":"LangSmith Agent Server","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/deployment"},{"title":"Deploy your app to cloud","sidebarTitle":"Quickstart","icon":"rocket","href":"/langsmith/deployment-quickstart"},{"group":"Deployment components","pages":[{"title":"LangSmith Agent Server components","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/components"},{"title":"LangSmith data plane","sidebarTitle":"Data plane","href":"/langsmith/data-plane"},{"title":"LangSmith control plane","sidebarTitle":"Control plane","href":"/langsmith/control-plane"}]},{"group":"Develop \u0026 test","pages":[{"title":"Local development \u0026 testing","icon":"device-laptop","href":"/langsmith/local-dev-testing"},{"title":"Studio","url":"https://docs.langchain.com/langsmith/studio","href":"/langsmith/studio-deploy"}]},{"group":"Frameworks and platforms","pages":[{"title":"Deploy Google ADK agents","sidebarTitle":"Deploy Google ADK","href":"/langsmith/deploy-google-adk"},{"title":"Deploy other frameworks","sidebarTitle":"Claude SDK, Strands, \u0026 more","href":"/langsmith/deploy-other-frameworks"},{"group":"Full-stack web apps","pages":[{"title":"Deploy full-stack web apps","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/deploy-frameworks-and-platforms"},{"title":"Deploy with LangSmith and Vite","sidebarTitle":"LangSmith + Vite","href":"/langsmith/deploy-vite-langsmith"},{"title":"Deploy with Next.js","sidebarTitle":"Next.js","href":"/langsmith/deploy-nextjs"},{"title":"Deploy with SvelteKit","sidebarTitle":"SvelteKit","href":"/langsmith/deploy-sveltekit"},{"title":"Deploy with Nuxt","sidebarTitle":"Nuxt","href":"/langsmith/deploy-nuxt"},{"title":"Deploy with Cloudflare Workers","sidebarTitle":"Cloudflare Workers","href":"/langsmith/deploy-cloudflare-workers"},{"title":"Deploy with Deno Deploy","sidebarTitle":"Deno Deploy","href":"/langsmith/deploy-deno"}]}]},{"group":"Reference","pages":[{"title":"Reference","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/deploy-reference-overview"},{"title":"LangSmith Agent Server SDK","url":"https://reference.langchain.com/python/langsmith/deployment/sdk/","href":"/langsmith/smith-deployments-sdk"},{"title":"LangGraph CLI","sidebarTitle":"LangGraph CLI","href":"/langsmith/cli"},{"title":"RemoteGraph","sidebarTitle":"RemoteGraph","url":"https://reference.langchain.com/python/langsmith/deployment/remote_graph/","href":"/langsmith/remote-graph"},{"group":"Agent Server API","boost":0.3,"pages":[{"title":"Agent Server API reference","sidebarTitle":"Overview","href":"/langsmith/server-api-ref"},{"group":"Assistants","pages":[{"title":"Create Assistant","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /assistants","href":"/langsmith/agent-server-api/assistants/create-assistant"},{"title":"Search Assistants","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /assistants/search","href":"/langsmith/agent-server-api/assistants/search-assistants"},{"title":"Count Assistants","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /assistants/count","href":"/langsmith/agent-server-api/assistants/count-assistants"},{"title":"Get Assistant","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /assistants/{assistant_id}","href":"/langsmith/agent-server-api/assistants/get-assistant"},{"title":"Delete Assistant","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json delete /assistants/{assistant_id}","href":"/langsmith/agent-server-api/assistants/delete-assistant"},{"title":"Patch Assistant","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json patch /assistants/{assistant_id}","href":"/langsmith/agent-server-api/assistants/patch-assistant"},{"title":"Get Assistant Graph","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /assistants/{assistant_id}/graph","href":"/langsmith/agent-server-api/assistants/get-assistant-graph"},{"title":"Get Assistant Subgraphs","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /assistants/{assistant_id}/subgraphs","href":"/langsmith/agent-server-api/assistants/get-assistant-subgraphs"},{"title":"Get Assistant Subgraphs by Namespace","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /assistants/{assistant_id}/subgraphs/{namespace}","href":"/langsmith/agent-server-api/assistants/get-assistant-subgraphs-by-namespace"},{"title":"Get Assistant Schemas","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /assistants/{assistant_id}/schemas","href":"/langsmith/agent-server-api/assistants/get-assistant-schemas"},{"title":"Get Assistant Versions","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /assistants/{assistant_id}/versions","href":"/langsmith/agent-server-api/assistants/get-assistant-versions"},{"title":"Set Latest Assistant Version","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /assistants/{assistant_id}/latest","href":"/langsmith/agent-server-api/assistants/set-latest-assistant-version"}]},{"group":"Threads","pages":[{"title":"Create Thread","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads","href":"/langsmith/agent-server-api/threads/create-thread"},{"title":"Search Threads","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/search","href":"/langsmith/agent-server-api/threads/search-threads"},{"title":"Count Threads","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/count","href":"/langsmith/agent-server-api/threads/count-threads"},{"title":"Prune Threads","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/prune","href":"/langsmith/agent-server-api/threads/prune-threads"},{"title":"Get Thread Storage","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/storage","href":"/langsmith/agent-server-api/threads/get-thread-storage"},{"title":"Get Thread State","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/state","href":"/langsmith/agent-server-api/threads/get-thread-state"},{"title":"Update Thread State","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/state","href":"/langsmith/agent-server-api/threads/update-thread-state"},{"title":"Get Thread State At Checkpoint","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/state/{checkpoint_id}","href":"/langsmith/agent-server-api/threads/get-thread-state-at-checkpoint"},{"title":"Get Thread State At Checkpoint","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/state/checkpoint","href":"/langsmith/agent-server-api/threads/get-thread-state-at-checkpoint-1"},{"title":"Get Thread History","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/history","href":"/langsmith/agent-server-api/threads/get-thread-history"},{"title":"Get Thread History Post","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/history","href":"/langsmith/agent-server-api/threads/get-thread-history-post"},{"title":"Copy Thread","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/copy","href":"/langsmith/agent-server-api/threads/copy-thread"},{"title":"Get Thread","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}","href":"/langsmith/agent-server-api/threads/get-thread"},{"title":"Delete Thread","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json delete /threads/{thread_id}","href":"/langsmith/agent-server-api/threads/delete-thread"},{"title":"Patch Thread","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json patch /threads/{thread_id}","href":"/langsmith/agent-server-api/threads/patch-thread"},{"title":"Join Thread Stream","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/stream","href":"/langsmith/agent-server-api/threads/join-thread-stream"}]},{"group":"Streaming","pages":[{"title":"Protocol v2 Event Stream (SSE)","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/stream/events","href":"/langsmith/agent-server-api/streaming/protocol-v2-event-stream-sse"},{"title":"Protocol v2 Command","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/commands","href":"/langsmith/agent-server-api/streaming/protocol-v2-command"}]},{"group":"Thread Runs","pages":[{"title":"List Runs","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/runs","href":"/langsmith/agent-server-api/thread-runs/list-runs"},{"title":"Create Background Run","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/runs","href":"/langsmith/agent-server-api/thread-runs/create-background-run"},{"title":"Create Run, Stream Output","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/runs/stream","href":"/langsmith/agent-server-api/thread-runs/create-run-stream-output"},{"title":"Create Run, Wait for Output","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/runs/wait","href":"/langsmith/agent-server-api/thread-runs/create-run-wait-for-output"},{"title":"Get Run","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/runs/{run_id}","href":"/langsmith/agent-server-api/thread-runs/get-run"},{"title":"Delete Run","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json delete /threads/{thread_id}/runs/{run_id}","href":"/langsmith/agent-server-api/thread-runs/delete-run"},{"title":"Join Run","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/runs/{run_id}/join","href":"/langsmith/agent-server-api/thread-runs/join-run"},{"title":"Join Run Stream","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /threads/{thread_id}/runs/{run_id}/stream","href":"/langsmith/agent-server-api/thread-runs/join-run-stream"},{"title":"Cancel Run","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/runs/{run_id}/cancel","href":"/langsmith/agent-server-api/thread-runs/cancel-run"},{"title":"Cancel Runs","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs/cancel","href":"/langsmith/agent-server-api/thread-runs/cancel-runs"}]},{"group":"Crons","pages":[{"title":"Create Thread Cron","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /threads/{thread_id}/runs/crons","href":"/langsmith/agent-server-api/crons/create-thread-cron"},{"title":"Create Cron","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs/crons","href":"/langsmith/agent-server-api/crons/create-cron"},{"title":"Search Crons","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs/crons/search","href":"/langsmith/agent-server-api/crons/search-crons"},{"title":"Count Crons","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs/crons/count","href":"/langsmith/agent-server-api/crons/count-crons"},{"title":"Get Cron","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /runs/crons/{cron_id}","href":"/langsmith/agent-server-api/crons/get-cron"},{"title":"Delete Cron","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json delete /runs/crons/{cron_id}","href":"/langsmith/agent-server-api/crons/delete-cron"},{"title":"Update Cron","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json patch /runs/crons/{cron_id}","href":"/langsmith/agent-server-api/crons/update-cron"}]},{"group":"Stateless Runs","pages":[{"title":"Create Run, Stream Output","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs/stream","href":"/langsmith/agent-server-api/stateless-runs/create-run-stream-output"},{"title":"Create Run, Wait for Output","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs/wait","href":"/langsmith/agent-server-api/stateless-runs/create-run-wait-for-output"},{"title":"Create Background Run","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs","href":"/langsmith/agent-server-api/stateless-runs/create-background-run"},{"title":"Create Run Batch","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /runs/batch","href":"/langsmith/agent-server-api/stateless-runs/create-run-batch"}]},{"group":"Store","pages":[{"title":"Retrieve a single item.","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /store/items","href":"/langsmith/agent-server-api/store/retrieve-a-single-item"},{"title":"Store or update an item.","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json put /store/items","href":"/langsmith/agent-server-api/store/store-or-update-an-item"},{"title":"Delete an item.","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json delete /store/items","href":"/langsmith/agent-server-api/store/delete-an-item"},{"title":"Search or list items within a namespace prefix.","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /store/items/search","href":"/langsmith/agent-server-api/store/search-or-list-items-within-a-namespace-prefix"},{"title":"List namespaces with optional match conditions.","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /store/namespaces","href":"/langsmith/agent-server-api/store/list-namespaces-with-optional-match-conditions"}]},{"group":"A2A","pages":[{"title":"A2A JSON-RPC","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /a2a/{assistant_id}","href":"/langsmith/agent-server-api/a2a/a2a-json-rpc"}]},{"group":"MCP","pages":[{"title":"MCP Get","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /mcp/","href":"/langsmith/agent-server-api/mcp/mcp-get"},{"title":"MCP Post","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json post /mcp/","href":"/langsmith/agent-server-api/mcp/mcp-post"},{"title":"Terminate Session","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json delete /mcp/","href":"/langsmith/agent-server-api/mcp/terminate-session"}]},{"group":"System","pages":[{"title":"Server Information","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /info","href":"/langsmith/agent-server-api/system/server-information"},{"title":"System Metrics","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /metrics","href":"/langsmith/agent-server-api/system/system-metrics"},{"title":"API Documentation","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /docs","href":"/langsmith/agent-server-api/system/api-documentation"},{"title":"Health Check","deprecated":null,"version":null,"openapi":"/langsmith/agent-server-openapi.json get /ok","href":"/langsmith/agent-server-api/system/health-check"}]}]},{"group":"Control Plane API","boost":0.3,"pages":[{"title":"Control plane API reference for Agent Server hosting","sidebarTitle":"Overview","href":"/langsmith/api-ref-control-plane"},{"group":"Integrations (v1)","pages":[{"title":"List GitHub Integrations","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v1/integrations/github/install","href":"/api-reference/integrations-v1/list-github-integrations"},{"title":"List GitHub Repositories","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v1/integrations/github/{integration_id}/repos","href":"/api-reference/integrations-v1/list-github-repositories"},{"title":"List Forge GitHub Integrations","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v1/integrations/forge/github/install","href":"/api-reference/integrations-v1/list-forge-github-integrations"},{"title":"List Forge GitHub Repositories","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v1/integrations/forge/github/{integration_id}/repos","href":"/api-reference/integrations-v1/list-forge-github-repositories"}]},{"group":"Deployments (v2)","pages":[{"title":"List Deployments","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployments","href":"/api-reference/deployments-v2/list-deployments"},{"title":"Create Deployment","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/deployments","href":"/api-reference/deployments-v2/create-deployment"},{"title":"Delete Deployments","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/deployments","href":"/api-reference/deployments-v2/delete-deployments"},{"title":"Get Free Deployment Count","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployments/free-count","href":"/api-reference/deployments-v2/get-free-deployment-count"},{"title":"Get Deployment","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployments/{deployment_id}","href":"/api-reference/deployments-v2/get-deployment"},{"title":"Delete Deployment","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/deployments/{deployment_id}","href":"/api-reference/deployments-v2/delete-deployment"},{"title":"Patch Deployment","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json patch /v2/deployments/{deployment_id}","href":"/api-reference/deployments-v2/patch-deployment"},{"title":"Patch Deployment Tier","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json patch /v2/deployments/{deployment_id}/deployment-tier","href":"/api-reference/deployments-v2/patch-deployment-tier"},{"title":"Patch Deployment Resource Tiers","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json patch /v2/deployments/{deployment_id}/resource-tiers","href":"/api-reference/deployments-v2/patch-deployment-resource-tiers"},{"title":"List Revisions","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployments/{deployment_id}/revisions","href":"/api-reference/deployments-v2/list-revisions"},{"title":"Create Deployment Revision","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/deployments/{deployment_id}/revisions","href":"/api-reference/deployments-v2/create-deployment-revision"},{"title":"Get Revision","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployments/{deployment_id}/revisions/{revision_id}","href":"/api-reference/deployments-v2/get-revision"},{"title":"Redeploy Revision","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/deployments/{deployment_id}/revisions/{revision_id}/redeploy","href":"/api-reference/deployments-v2/redeploy-revision"},{"title":"List Deployment Logs","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployments/{deployment_id}/logs","href":"/api-reference/deployments-v2/list-deployment-logs"},{"title":"List Revision Logs","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployments/{deployment_id}/revisions/{revision_id}/logs","href":"/api-reference/deployments-v2/list-revision-logs"},{"title":"Interrupt Deployment Revision","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/deployments/{deployment_id}/revisions/{revision_id}/interruption","href":"/api-reference/deployments-v2/interrupt-deployment-revision"},{"title":"List Deployment Log Entries","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/deployment-logs","href":"/api-reference/deployments-v2/list-deployment-log-entries"}]},{"group":"Listeners (v2)","pages":[{"title":"List Listeners","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/listeners","href":"/api-reference/listeners-v2/list-listeners"},{"title":"Create Listener","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/listeners","href":"/api-reference/listeners-v2/create-listener"},{"title":"Get Listener","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/listeners/{listener_id}","href":"/api-reference/listeners-v2/get-listener"},{"title":"Delete Listener","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/listeners/{listener_id}","href":"/api-reference/listeners-v2/delete-listener"},{"title":"Patch Listener","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json patch /v2/listeners/{listener_id}","href":"/api-reference/listeners-v2/patch-listener"}]},{"group":"Integrations (v2)","pages":[{"title":"List Github Installations","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/integrations/github/installations","href":"/api-reference/integrations-v2/list-github-installations"},{"title":"List Github Installation Repositories","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/integrations/github/installations/{integration_id}/repositories","href":"/api-reference/integrations-v2/list-github-installation-repositories"},{"title":"Get Github Install Link Endpoint","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/integrations/github/installation-link","href":"/api-reference/integrations-v2/get-github-install-link-endpoint"},{"title":"List Forge Github Installations","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/integrations/forge-github/installations","href":"/api-reference/integrations-v2/list-forge-github-installations"},{"title":"List Forge Github Installation Repositories","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/integrations/forge-github/installations/{integration_id}/repositories","href":"/api-reference/integrations-v2/list-forge-github-installation-repositories"},{"title":"Get Forge Github Install Link Endpoint","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/integrations/forge-github/installation-link","href":"/api-reference/integrations-v2/get-forge-github-install-link-endpoint"},{"title":"Get Engine Picker Session Endpoint","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/integrations/forge-github/picker-sessions/{session_id}","href":"/api-reference/integrations-v2/get-engine-picker-session-endpoint"},{"title":"Create Engine Picker Session Selection","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/integrations/forge-github/picker-sessions/{session_id}/selection","href":"/api-reference/integrations-v2/create-engine-picker-session-selection"}]},{"group":"Auth Service (v2)","pages":[{"title":"List Oauth Providers","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/providers","href":"/api-reference/auth-service-v2/list-oauth-providers"},{"title":"Create Oauth Provider","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/providers","href":"/api-reference/auth-service-v2/create-oauth-provider"},{"title":"List Platform Oauth Providers","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/platform-providers","href":"/api-reference/auth-service-v2/list-platform-oauth-providers"},{"title":"Get Platform Oauth Provider","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/platform-providers/{provider_id}","href":"/api-reference/auth-service-v2/get-platform-oauth-provider"},{"title":"Oauth Setup Callback","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/setup/{provider_id}","href":"/api-reference/auth-service-v2/oauth-setup-callback"},{"title":"Oauth Callback Get","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/callback/{provider_id}","href":"/api-reference/auth-service-v2/oauth-callback-get"},{"title":"Oauth Callback","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/callback/{provider_id}","href":"/api-reference/auth-service-v2/oauth-callback"},{"title":"Authenticate","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/authenticate","href":"/api-reference/auth-service-v2/authenticate"},{"title":"Wait For Auth Completion","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/wait/{auth_id}","href":"/api-reference/auth-service-v2/wait-for-auth-completion"},{"title":"Create Mcp Oauth Provider","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/providers/mcp-discover","href":"/api-reference/auth-service-v2/create-mcp-oauth-provider"},{"title":"Get Oauth Provider","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/providers/{provider_id}","href":"/api-reference/auth-service-v2/get-oauth-provider"},{"title":"Delete Oauth Provider","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/auth/providers/{provider_id}","href":"/api-reference/auth-service-v2/delete-oauth-provider"},{"title":"Update Oauth Provider","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json patch /v2/auth/providers/{provider_id}","href":"/api-reference/auth-service-v2/update-oauth-provider"},{"title":"List Oauth Tokens For User","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/tokens","href":"/api-reference/auth-service-v2/list-oauth-tokens-for-user"},{"title":"Delete Oauth Tokens For User","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/auth/tokens","href":"/api-reference/auth-service-v2/delete-oauth-tokens-for-user"},{"title":"List Token Events For User","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/token-events","href":"/api-reference/auth-service-v2/list-token-events-for-user"},{"title":"Update Token Label","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json patch /v2/auth/tokens/{token_id}/metadata","href":"/api-reference/auth-service-v2/update-token-label"},{"title":"Import Oauth Token","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/tokens/import","href":"/api-reference/auth-service-v2/import-oauth-token"},{"title":"Delete Single Oauth Token","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/auth/tokens/{token_id}","href":"/api-reference/auth-service-v2/delete-single-oauth-token"},{"title":"Check Oauth Token Exists","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/tokens/exists","href":"/api-reference/auth-service-v2/check-oauth-token-exists"},{"title":"Check Oauth Tokens Exist Batch","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/tokens/exists/batch","href":"/api-reference/auth-service-v2/check-oauth-tokens-exist-batch"},{"title":"Check Workspace Slack Tokens Exist","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/tokens/workspace/slack/exists","href":"/api-reference/auth-service-v2/check-workspace-slack-tokens-exist"},{"title":"Revoke All Slack Tokens For Workspace","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/auth/tokens/workspace/slack","href":"/api-reference/auth-service-v2/revoke-all-slack-tokens-for-workspace"}]},{"group":"Agent Connections (v2)","pages":[{"title":"List Connections","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json get /v2/auth/agents/{agent_id}/connections","href":"/api-reference/agent-connections-v2/list-connections"},{"title":"Create Connection","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/agents/{agent_id}/connections","href":"/api-reference/agent-connections-v2/create-connection"},{"title":"Remove Connection","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json delete /v2/auth/agents/{agent_id}/connections/{connection_id}","href":"/api-reference/agent-connections-v2/remove-connection"},{"title":"Upsert Agent Provider Token","deprecated":null,"version":null,"openapi":"https://api.host.langchain.com/openapi.json post /v2/auth/agents/{agent_id}/providers/{provider_id}/tokens","href":"/api-reference/agent-connections-v2/upsert-agent-provider-token"}]}]},{"title":"Agent Server changelog","sidebarTitle":"Agent Server changelog","href":"/langsmith/agent-server-changelog"},{"group":"Related","pages":[{"title":"LangGraph Python SDK","sidebarTitle":"LangGraph Python SDK","url":"https://reference.langchain.com/python/langgraph-sdk","href":"/langsmith/langgraph-python-sdk"},{"title":"LangGraph JS/TS SDK","sidebarTitle":"LangGraph JS/TS SDK","url":"https://reference.langchain.com/javascript/langchain-langgraph-sdk","href":"/langsmith/langgraph-js-ts-sdk"}]}]}]},{"tab":"Agent Server","pages":[{"title":"Agent Server","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/agent-server-overview"},{"group":"Develop your application","pages":[{"title":"Application structure","sidebarTitle":"Application structure","href":"/langsmith/application-structure"},{"group":"Set up dependencies","pages":[{"title":"How to set up an application with requirements.txt","sidebarTitle":"With requirements.txt","href":"/langsmith/setup-app-requirements-txt"},{"title":"How to set up an application with pyproject.toml","sidebarTitle":"With pyproject.toml","href":"/langsmith/setup-pyproject"},{"title":"How to set up a JavaScript application","sidebarTitle":"Set up a JavaScript application","href":"/langsmith/setup-javascript"},{"title":"How to customize the Dockerfile","sidebarTitle":"Customize the Dockerfile","href":"/langsmith/custom-docker"},{"title":"Monorepo support","sidebarTitle":"Monorepo support","href":"/langsmith/monorepo-support"}]},{"group":"Persistence","pages":[{"title":"Configure checkpointer backend","sidebarTitle":"Configure checkpointer backend","href":"/langsmith/configure-checkpointer"},{"title":"How to add TTLs to your application","sidebarTitle":"Add TTLs to your application","href":"/langsmith/configure-ttl"},{"title":"How to add semantic search to your agent deployment","sidebarTitle":"Add semantic search to your agent deployment","href":"/langsmith/semantic-search"}]}]},{"group":"Capabilities","pages":[{"title":"Agent Server","sidebarTitle":"Overview","href":"/langsmith/agent-server"},{"group":"Assistants","pages":[{"title":"Assistants","sidebarTitle":"Overview","href":"/langsmith/assistants"},{"title":"Manage assistants","sidebarTitle":"Manage assistants","href":"/langsmith/configuration-cloud"}]},{"title":"Use threads","sidebarTitle":"Threads","href":"/langsmith/use-threads"},{"group":"Runs","pages":[{"title":"Runs","sidebarTitle":"Overview","href":"/langsmith/runs"},{"title":"How to kick off background runs","sidebarTitle":"Kick off background runs","href":"/langsmith/background-run"},{"title":"How to run multiple assistants on the same thread","sidebarTitle":"Run multiple assistants on the same thread","href":"/langsmith/same-thread"},{"title":"Stateless runs","sidebarTitle":"Stateless runs","href":"/langsmith/stateless-runs"},{"title":"How to cancel a run","sidebarTitle":"Cancel a run","href":"/langsmith/cancel-run"}]},{"title":"How to interact with a deployment using RemoteGraph","sidebarTitle":"Interact with a deployment using RemoteGraph","href":"/langsmith/use-remote-graph"},{"title":"Use cron jobs","sidebarTitle":"Cron jobs","href":"/langsmith/cron-jobs"},{"title":"Streaming API","sidebarTitle":"Streaming API","href":"/langsmith/streaming"},{"title":"Human-in-the-loop using server API","sidebarTitle":"Human-in-the-loop using server API","href":"/langsmith/add-human-in-the-loop"},{"title":"Time travel using the server API","sidebarTitle":"Time travel using the server API","href":"/langsmith/human-in-the-loop-time-travel"},{"group":"Double-texting","pages":[{"title":"Double texting","sidebarTitle":"Overview","href":"/langsmith/double-texting"},{"title":"Interrupt concurrent","sidebarTitle":"Interrupt","href":"/langsmith/interrupt-concurrent"},{"title":"Rollback Concurrent","sidebarTitle":"Rollback","href":"/langsmith/rollback-concurrent"},{"title":"Reject Concurrent","sidebarTitle":"Reject","href":"/langsmith/reject-concurrent"},{"title":"Enqueue concurrent","sidebarTitle":"Enqueue","href":"/langsmith/enqueue-concurrent"}]},{"title":"Use webhooks","sidebarTitle":"Webhooks","href":"/langsmith/use-webhooks"},{"title":"Distributed tracing with Agent Server","sidebarTitle":"Distributed tracing","href":"/langsmith/agent-server-distributed-tracing"},{"title":"MCP endpoint in Agent Server","sidebarTitle":"MCP endpoint in Agent Server","href":"/langsmith/server-mcp"},{"title":"Human-in-the-loop over MCP","sidebarTitle":"Human-in-the-loop over MCP","href":"/langsmith/server-mcp-elicitation"},{"title":"A2A endpoint in Agent Server","sidebarTitle":"A2A endpoint in Agent Server","href":"/langsmith/server-a2a"},{"title":"Agent Server changelog","sidebarTitle":"Changelog","url":"/langsmith/agent-server-changelog","href":"/langsmith/agent-server-changelog-link"}]},{"group":"How to build","pages":[{"title":"How to collect user feedback for Agent Server runs","sidebarTitle":"Collect user feedback for Agent Server runs","href":"/langsmith/agent-server-feedback"},{"title":"How to implement generative user interfaces with LangGraph","sidebarTitle":"Implement generative user interfaces with LangGraph","href":"/langsmith/generative-ui-react"},{"title":"Implement a CI/CD pipeline using LangSmith Agent Server and Evaluation","sidebarTitle":"Implement a CI/CD pipeline","href":"/langsmith/cicd-pipeline-example"}]},{"group":"Auth \u0026 access control","pages":[{"title":"Authentication \u0026 access control","sidebarTitle":"Overview","href":"/langsmith/auth"},{"title":"Add custom authentication","sidebarTitle":"Add custom authentication","href":"/langsmith/custom-auth"},{"group":"Custom auth tutorial","icon":"school","pages":[{"title":"Set up custom authentication","sidebarTitle":"Set up custom authentication","href":"/langsmith/set-up-custom-auth"},{"title":"Make conversations private","sidebarTitle":"Make conversations private","href":"/langsmith/resource-auth"},{"title":"Isolate store data per user","sidebarTitle":"Isolate store per user","href":"/langsmith/store-auth"},{"title":"Connect an authentication provider","sidebarTitle":"Connect an authentication provider","href":"/langsmith/add-auth-server"}]},{"title":"Document API authentication in OpenAPI","sidebarTitle":"Document API authentication in OpenAPI","href":"/langsmith/openapi-security"},{"title":"Set up Agent Auth","tag":"Beta","href":"/langsmith/agent-auth"}]},{"group":"Server customization","pages":[{"title":"Use server-side caching","sidebarTitle":"Caching","href":"/langsmith/caching"},{"title":"Configure IAM authentication for data stores","sidebarTitle":"Data store IAM authentication","href":"/langsmith/configure-iam-auth"},{"group":"Encryption at rest","root":{"title":"Encryption at rest","sidebarTitle":"Encryption at rest","href":"/langsmith/encryption"},"pages":[{"title":"Configure AES encryption at rest","sidebarTitle":"AES encryption","href":"/langsmith/aes-encryption"},{"title":"Configure custom encryption at rest","sidebarTitle":"Custom encryption","href":"/langsmith/custom-encryption"}]},{"title":"Rebuild graph at runtime","sidebarTitle":"Rebuild graph at runtime","href":"/langsmith/graph-rebuild"},{"group":"Replace built-in backends","pages":[{"title":"How to use a custom store","sidebarTitle":"Add custom store","tag":"Alpha","href":"/langsmith/custom-store"},{"title":"How to use a custom checkpointer","sidebarTitle":"Add custom checkpointer","tag":"Alpha","href":"/langsmith/custom-checkpointer"}]},{"group":"Extend the HTTP server","pages":[{"title":"How to add custom routes","sidebarTitle":"Add custom routes","href":"/langsmith/custom-routes"},{"title":"How to add custom middleware","sidebarTitle":"Add custom middleware","href":"/langsmith/custom-middleware"},{"title":"How to add custom lifespan events","sidebarTitle":"Add custom lifespan events","href":"/langsmith/custom-lifespan"}]},{"group":"Headers and logging","pages":[{"title":"Use HTTP headers for runtime configuration","sidebarTitle":"Configurable headers","href":"/langsmith/configurable-headers"},{"title":"Include HTTP headers in server logs","sidebarTitle":"Logging Headers","href":"/langsmith/configurable-logs"}]}]}]},{"tab":"Deploy to Cloud","pages":[{"title":"Deploy to Cloud","sidebarTitle":"Cloud overview","icon":"cloud","iconType":"solid","mode":"wide","href":"/langsmith/deploy-to-cloud-overview"},{"title":"Cloud platform features","sidebarTitle":"Platform features","icon":"list-check","href":"/langsmith/cloud-platform-features"},{"group":"Deployment guide","pages":[{"title":"Create an Agent Server","href":"/langsmith/deploy-to-cloud"},{"title":"Revisions","href":"/langsmith/deployment-revisions"},{"title":"Monitor an Agent Server","href":"/langsmith/monitor-deployment"},{"title":"Preview builds","href":"/langsmith/preview-builds"},{"title":"Manage an Agent Server","href":"/langsmith/manage-deployment"}]},{"group":"Reference","pages":[{"title":"Cloud Agent Server environment variables","sidebarTitle":"Environment variables","href":"/langsmith/env-var-cloud"}]}]},{"tab":"Deploy to Self-hosted","pages":[{"title":"Deploy to self-hosted","sidebarTitle":"Self-hosted overview","icon":"buildings","mode":"wide","href":"/langsmith/deploy-to-self-hosted-overview"},{"title":"Deploy with control plane","sidebarTitle":"With control plane","icon":"cloud-upload","href":"/langsmith/deploy-with-control-plane"},{"title":"Hybrid","sidebarTitle":"Hybrid","icon":"cloud","href":"/langsmith/hybrid"},{"title":"Self-host standalone servers","sidebarTitle":"Standalone servers","icon":"server","href":"/langsmith/deploy-standalone-server"},{"group":"Configure","pages":[{"title":"Self-hosted platform features","sidebarTitle":"Platform features","icon":"list-check","href":"/langsmith/self-hosted-platform-features"},{"title":"Agent Server metrics","sidebarTitle":"Agent Server metrics","icon":"chart-line","href":"/langsmith/self-hosted-agent-server-metrics"},{"title":"Configure Agent Server for scale","sidebarTitle":"Agent Server scaling","icon":"box-multiple","href":"/langsmith/agent-server-scale"},{"title":"Set up a build machine on a restricted network","sidebarTitle":"Build on a restricted network","icon":"world-off","href":"/langsmith/self-host-restricted-network-build"},{"title":"Troubleshooting for self-hosted deployments","sidebarTitle":"Troubleshooting","icon":"stethoscope","href":"/langsmith/diagnostics-self-hosted"}]},{"group":"Reference","pages":[{"title":"Self-hosted Agent Server environment variables","sidebarTitle":"Environment variables","href":"/langsmith/env-var-self-hosted"}]}]},{"tab":"Prompt \u0026 Context Hub","pages":[{"title":"Prompt \u0026 Context Hub","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/prompt-context-hub"},{"group":"Prompts","pages":[{"title":"Prompt engineering quickstart","sidebarTitle":"Quickstart","href":"/langsmith/prompt-engineering-quickstart"},{"title":"Prompt engineering concepts","sidebarTitle":"Concepts","href":"/langsmith/prompt-engineering-concepts"},{"title":"LangSmith Chat","sidebarTitle":"Chat","url":"https://docs.langchain.com/langsmith/chat#prompt-engineering","icon":"feather","href":"/langsmith/chat-prompt-engineering"},{"title":"Model providers","sidebarTitle":"Model providers","href":"/langsmith/playground-model-providers"},{"group":"Create and manage prompts","pages":[{"title":"Create a prompt","sidebarTitle":"Create a prompt","href":"/langsmith/create-a-prompt"},{"title":"Manage prompts","sidebarTitle":"Manage prompts","href":"/langsmith/manage-prompts"},{"title":"Manage prompts programmatically","sidebarTitle":"Manage prompts programmatically","href":"/langsmith/manage-prompts-programmatically"},{"title":"Configure prompt settings","sidebarTitle":"Configure prompt settings","href":"/langsmith/managing-model-configurations"},{"title":"Prompt template format guide","sidebarTitle":"Prompt template format","href":"/langsmith/prompt-template-format"},{"title":"Use tools in a prompt","sidebarTitle":"Use tools in a prompt","href":"/langsmith/use-tools"},{"title":"Include multimodal content in a prompt","sidebarTitle":"Include multimodal content in a prompt","href":"/langsmith/multimodal-content"}]},{"title":"Write your prompt with AI","sidebarTitle":"Write your prompt with AI","href":"/langsmith/write-prompt-with-ai"},{"group":"Connect to models","pages":[{"title":"Connect to an OpenAI compliant model provider/proxy","sidebarTitle":"OpenAI-compliant model provider/proxy","href":"/langsmith/custom-openai-compliant-model"},{"title":"Connect to a compatible decision model provider","sidebarTitle":"Compatible decision model provider","href":"/langsmith/compatible-decision-model-provider"},{"title":"Connect to a custom model","sidebarTitle":"Custom model","href":"/langsmith/custom-endpoint"}]}]},{"group":"Context Hub","pages":[{"title":"Context engineering concepts","sidebarTitle":"Concepts","href":"/langsmith/context-engineering-concepts"},{"title":"Use the Context Hub","sidebarTitle":"Use the Context Hub","tag":"UI","href":"/langsmith/use-the-context-hub"},{"title":"Manage contexts with the SDK","sidebarTitle":"Manage contexts","tag":"SDK","href":"/langsmith/manage-contexts-sdk"},{"title":"Configure Context Hub commit webhooks","sidebarTitle":"Commit webhooks","href":"/langsmith/context-hub-webhooks"}]},{"group":"Tutorials","pages":[{"title":"Optimize a classifier","sidebarTitle":"Optimize a classifier","href":"/langsmith/optimize-classifier"},{"title":"How to sync prompts with GitHub","sidebarTitle":"Sync prompts with GitHub","href":"/langsmith/prompt-commit"},{"title":"Test multi-turn conversations","sidebarTitle":"Test multi-turn conversations","href":"/langsmith/multiple-messages"}]}]},{"tab":"Sandboxes","pages":[{"title":"LangSmith Sandboxes","sidebarTitle":"Overview","href":"/langsmith/sandboxes"},{"title":"Sandbox snapshots","sidebarTitle":"Snapshots","href":"/langsmith/sandbox-snapshots"},{"title":"Sandbox service URLs","sidebarTitle":"Service URLs","href":"/langsmith/sandbox-service-urls"},{"title":"Sandbox download links","sidebarTitle":"Download links","href":"/langsmith/sandbox-download-links"},{"title":"Sandbox auth proxy","sidebarTitle":"Auth proxy","href":"/langsmith/sandbox-auth-proxy"},{"title":"Sandbox mounts","sidebarTitle":"Mounts","href":"/langsmith/sandbox-mounts"},{"title":"Sandbox access permissions","sidebarTitle":"Permissions","href":"/langsmith/sandbox-permissions"},{"title":"Sandbox CLI","href":"/langsmith/sandbox-cli"},{"title":"Sandbox SDK usage","sidebarTitle":"SDK usage","href":"/langsmith/sandbox-sdk"},{"title":"Harbor integrations","href":"/langsmith/harbor-integrations"}]}]},{"item":"Monitor","icon":"chart-line","description":"Trace, debug, and observe agents","tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/langsmith/observability"}]},{"tab":"Trace","pages":[{"title":"Tracing quickstart","sidebarTitle":"Quickstart","icon":"rocket","href":"/langsmith/observability-quickstart"},{"title":"Trace an agent","sidebarTitle":"Tutorial","icon":"school","href":"/langsmith/observability-llm-tutorial"},{"title":"Observability concepts","sidebarTitle":"Concepts","icon":"book","href":"/langsmith/observability-concepts"},{"title":"LangSmith Chat","sidebarTitle":"Chat","url":"https://docs.langchain.com/langsmith/chat#observability","icon":"feather","href":"/langsmith/chat-observability"},{"group":"Tracing setup","pages":[{"group":"Integrations","icon":"plug","pages":[{"title":"Integrations","sidebarTitle":"Overview","mode":"wide","href":"/langsmith/integrations"},{"group":"LLM providers","pages":[{"title":"Trace with Anthropic","sidebarTitle":"Anthropic","href":"/langsmith/trace-anthropic"},{"title":"Trace with Amazon Bedrock","sidebarTitle":"Bedrock","href":"/langsmith/trace-bedrock"},{"title":"Trace with DeepSeek","sidebarTitle":"DeepSeek","href":"/langsmith/trace-deepseek"},{"title":"Trace with Google Gemini","sidebarTitle":"Google Gemini","href":"/langsmith/trace-with-google-gemini"},{"title":"Trace with LiteLLM","sidebarTitle":"LiteLLM","href":"/langsmith/trace-litellm"},{"title":"Trace with Mistral","sidebarTitle":"Mistral","href":"/langsmith/trace-with-mistral"},{"title":"Trace with OpenAI","sidebarTitle":"OpenAI","href":"/langsmith/trace-openai"},{"title":"Trace OpenAI-compatible providers","sidebarTitle":"OpenAI-compatible APIs","href":"/langsmith/trace-with-openai-compatible"}]},{"group":"Agent frameworks","pages":[{"title":"Trace AutoGen agents","sidebarTitle":"AutoGen","href":"/langsmith/trace-with-autogen"},{"title":"Trace with the Claude Agent SDK","sidebarTitle":"Claude Agent SDK","href":"/langsmith/trace-claude-agent-sdk"},{"title":"Trace Claude Managed Agents","sidebarTitle":"Claude Managed Agents","href":"/langsmith/trace-with-claude-managed-agents"},{"title":"Trace CrewAI agents","sidebarTitle":"CrewAI","href":"/langsmith/trace-with-crewai"},{"title":"Trace Deep Agents","sidebarTitle":"Deep Agents","href":"/langsmith/trace-deep-agents"},{"title":"Trace Google ADK agents","sidebarTitle":"Google ADK","href":"/langsmith/trace-with-google-adk"},{"title":"Trace LangChain agents (Python and JS/TS)","sidebarTitle":"LangChain","href":"/langsmith/trace-with-langchain"},{"title":"Trace LangGraph agents","sidebarTitle":"LangGraph","href":"/langsmith/trace-with-langgraph"},{"title":"Trace Mastra agents","sidebarTitle":"Mastra","href":"/langsmith/trace-with-mastra"},{"title":"Trace with Microsoft Agent Framework","sidebarTitle":"Microsoft Agent Framework","href":"/langsmith/trace-with-microsoft-agent-framework"},{"title":"Trace with the OpenAI Agents SDK","sidebarTitle":"OpenAI Agents SDK","href":"/langsmith/trace-with-openai-agents-sdk"},{"title":"Trace with OpenTelemetry","sidebarTitle":"OpenTelemetry","href":"/langsmith/trace-with-opentelemetry"},{"title":"Trace PydanticAI agents","sidebarTitle":"PydanticAI","href":"/langsmith/trace-with-pydantic-ai"},{"title":"Trace Semantic Kernel agents","sidebarTitle":"Semantic Kernel","href":"/langsmith/trace-with-semantic-kernel"},{"title":"Trace with Strands Agents","sidebarTitle":"Strands Agents","href":"/langsmith/trace-with-strands-agents"},{"title":"Trace Vercel AI SDK agents (JS/TS only)","sidebarTitle":"Vercel AI SDK","href":"/langsmith/trace-with-vercel-ai-sdk"}]},{"group":"Voice AI frameworks","pages":[{"title":"Voice tracing fundamentals","sidebarTitle":"Voice fundamentals","href":"/langsmith/trace-voice-fundamentals"},{"title":"Trace OpenAI Realtime agents","sidebarTitle":"OpenAI Realtime","tag":"Beta","href":"/langsmith/trace-openai-realtime"},{"title":"Trace Gemini Live agents","sidebarTitle":"Gemini Live","tag":"Beta","href":"/langsmith/trace-gemini-live"},{"title":"Trace LiveKit agents","sidebarTitle":"LiveKit","tag":"Beta","href":"/langsmith/trace-with-livekit"},{"title":"Trace Pipecat agents","sidebarTitle":"Pipecat","tag":"Beta","href":"/langsmith/trace-with-pipecat"}]},{"group":"Developer tools","pages":[{"title":"Coding agent metadata contract","sidebarTitle":"Metadata contract","href":"/langsmith/coding-agent-metadata-contract"},{"title":"Trace Claude Code sessions","sidebarTitle":"Claude Code","href":"/langsmith/trace-claude-code"},{"title":"Trace OpenAI Codex sessions","sidebarTitle":"OpenAI Codex","href":"/langsmith/trace-with-codex"},{"title":"Trace OpenCode sessions","sidebarTitle":"OpenCode","href":"/langsmith/trace-with-opencode"},{"title":"Trace Cursor sessions","sidebarTitle":"Cursor","href":"/langsmith/trace-with-cursor"},{"title":"Trace Pi coding agent sessions","sidebarTitle":"Pi","href":"/langsmith/trace-with-pi"},{"title":"Trace with Instructor","sidebarTitle":"Instructor (Python only)","href":"/langsmith/trace-with-instructor"},{"title":"Trace n8n workflows","sidebarTitle":"n8n","href":"/langsmith/trace-with-n8n"},{"title":"Trace with Temporal","sidebarTitle":"Temporal","href":"/langsmith/trace-with-temporal"},{"title":"Trace Visual Studio Code Copilot Chat sessions","sidebarTitle":"VS Code Copilot","href":"/langsmith/trace-with-vscode-copilot"}]},{"group":"Productivity","pages":[{"title":"Trace Claude Cowork sessions","sidebarTitle":"Claude Cowork","href":"/langsmith/trace-claude-cowork"}]}]},{"group":"Manual instrumentation","pages":[{"title":"Custom instrumentation","sidebarTitle":"Customize instrumentation","href":"/langsmith/annotate-code"},{"title":"Trace with API","sidebarTitle":"Trace with API","href":"/langsmith/trace-with-api"},{"title":"Log LLM calls","sidebarTitle":"Log LLM calls","href":"/langsmith/log-llm-trace"},{"title":"Log retriever traces","sidebarTitle":"Log retriever traces","href":"/langsmith/log-retriever-trace"},{"title":"Metadata parameters reference","sidebarTitle":"Metadata parameters","href":"/langsmith/ls-metadata-parameters"},{"title":"Upload files with traces","sidebarTitle":"Upload files with traces","href":"/langsmith/upload-files-with-traces"}]}]},{"group":"Configuration \u0026 troubleshooting","pages":[{"group":"Agent \u0026 environment settings","pages":[{"title":"Log traces to an agent","sidebarTitle":"Log traces to an agent","href":"/langsmith/log-traces-to-agent"},{"title":"Write traces to multiple destinations with replicas","sidebarTitle":"Trace replicas","href":"/langsmith/trace-replicas"},{"title":"Trace without setting environment variables","sidebarTitle":"Trace without env vars","mode":"wide","href":"/langsmith/trace-without-env-vars"},{"title":"Conditional tracing","sidebarTitle":"Conditional tracing","href":"/langsmith/conditional-tracing"},{"title":"Set a sampling rate for traces","sidebarTitle":"Set a sampling rate for traces","href":"/langsmith/sample-traces"}]},{"title":"Cost tracking","sidebarTitle":"Cost tracking","href":"/langsmith/cost-tracking"},{"title":"Usage and billing","sidebarTitle":"Usage and billing","description":"Understand LangSmith trace data retention tiers, pricing, rate limits, and usage limits.","href":"/langsmith/usage-and-billing"},{"group":"Advanced tracing techniques","pages":[{"title":"Implement distributed tracing","sidebarTitle":"Implement distributed tracing","href":"/langsmith/distributed-tracing"},{"title":"Access the current run (span) within a traced function","sidebarTitle":"Access the current run (span) within a traced function","description":null,"href":"/langsmith/access-current-span"},{"title":"Trace JS functions in serverless environments","sidebarTitle":"Trace JS functions in serverless environments","href":"/langsmith/serverless-environments"},{"title":"Log multimodal traces","sidebarTitle":"Log multimodal traces","href":"/langsmith/log-multimodal-traces"},{"title":"Trace generator functions","sidebarTitle":"Trace generator functions","href":"/langsmith/trace-generator-functions"}]},{"group":"Data \u0026 privacy","pages":[{"title":"Add metadata and tags to traces","sidebarTitle":"Add metadata and tags to traces","href":"/langsmith/add-metadata-tags"},{"title":"Prevent logging of sensitive data in traces","sidebarTitle":"Prevent logging of sensitive data in traces","href":"/langsmith/mask-inputs-outputs"},{"title":"Redact secrets from traces","href":"/langsmith/redact-secrets"},{"title":"Redact sensitive data with the OpenTelemetry Gateway architecture","sidebarTitle":"Redact sensitive data with OTEL","href":"/langsmith/otel-gateway-trace-redaction"}]},{"group":"Troubleshooting guides","pages":[{"title":"Troubleshoot trace nesting","sidebarTitle":"Troubleshoot trace nesting","href":"/langsmith/nest-traces"},{"title":"Troubleshoot variable caching","sidebarTitle":"Troubleshoot variable caching","href":"/langsmith/troubleshooting-variable-caching"}]}]}]},{"tab":"Debug","pages":[{"title":"Debug","href":"/langsmith/view-traces"}]},{"tab":"Observe","pages":[{"title":"Observe","href":"/langsmith/dashboards"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/langsmith/reference"}]}]}]},{"product":"PRODUCTS AND SETUP","menu":[{"item":"LangSmith setup","icon":"server","description":"Hosting and administration","tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/langsmith/langsmith-setup-overview"}]},{"tab":"Account","pages":[{"title":"Account","href":"/langsmith/admin"}]},{"tab":"Cloud","pages":[{"title":"Cloud","href":"/langsmith/cloud"}]},{"tab":"BYOC","pages":[{"title":"BYOC","href":"/langsmith/byoc"}]},{"tab":"Self-hosted","pages":[{"title":"Self-hosted","href":"/langsmith/self-hosted"}]},{"tab":"Govern","pages":[{"title":"Govern","href":"/langsmith/govern-overview"}]}]},{"item":"LLM Gateway","icon":"route","description":"Route, control, and observe LLM traffic","pages":[{"title":"LLM Gateway","href":"/langsmith/llm-gateway"}]},{"item":"No-code agents","icon":"wand","description":"Build agents without code","tabs":[{"tab":"Studio","pages":[{"title":"Studio","href":"/langsmith/build-an-agent"}]},{"tab":"Fleet","pages":[{"title":"Fleet","href":"/langsmith/fleet"}]}]},{"item":"Engine","icon":"https://mintlify.s3.us-west-1.amazonaws.com/langchain-5e9cc07a/images/brand/engine-icon-no-bg-dark.svg","description":"Find and fix agent issues","pages":[{"title":"Engine","href":"/langsmith/engine"}]},{"item":"Deep Agents Code","icon":"code","description":"Code with an agent in your terminal","pages":[{"title":"Deep Agents Code","href":"/oss/deepagents/code/overview"}]}],"pages":[{"title":"PRODUCTS AND SETUP","href":"/langsmith/langsmith-setup-overview"}]}]},"basePath":"","title":"Implement distributed tracing - Docs by LangChain","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":["10e4515597"],"chunks":["BannerMarkdown-D7Q3g8OM.js","dist-BvrGG8gU.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-B35qUV0p.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}