From bcf31ea73d82468a39f1a337fa5a55f2adac1cce Mon Sep 17 00:00:00 2001 From: Kathryn May Date: Fri, 7 Nov 2025 13:25:32 -0500 Subject: [PATCH 1/3] Update SDK refs in langsmith docs --- pipeline/preprocessors/link_map.py | 6 ++++++ src/langsmith/add-auth-server.mdx | 8 ++++---- src/langsmith/configuration-cloud.mdx | 4 ++-- src/langsmith/env-var.mdx | 2 +- src/langsmith/observability-concepts.mdx | 2 +- src/langsmith/resource-auth.mdx | 6 +++--- src/langsmith/use-threads.mdx | 8 ++++---- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/pipeline/preprocessors/link_map.py b/pipeline/preprocessors/link_map.py index 4fe91f1d59..4e8e2e822a 100644 --- a/pipeline/preprocessors/link_map.py +++ b/pipeline/preprocessors/link_map.py @@ -247,8 +247,14 @@ class LinkMap(TypedDict): "SyncHttpClient": "langsmith/deployment/sdk/#langgraph_sdk.client.SyncHttpClient", # Resource clients - Async "AssistantsClient": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient", + "AssistantsClient.create": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient.create", + "AssistantsClient.update": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient.update", "ThreadsClient": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient", + "ThreadsClient.create": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.create", + "ThreadsClient.copy": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.copy", + "ThreadsClient.search": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.search", "RunsClient": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient", + "RunsClient.stream": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient.stream", "CronClient": "langsmith/deployment/sdk/#langgraph_sdk.client.CronClient", "StoreClient": "langsmith/deployment/sdk/#langgraph_sdk.client.StoreClient", # Resource clients - Sync diff --git a/src/langsmith/add-auth-server.mdx b/src/langsmith/add-auth-server.mdx index 2e33c4b7b6..00428b2084 100644 --- a/src/langsmith/add-auth-server.mdx +++ b/src/langsmith/add-auth-server.mdx @@ -4,7 +4,7 @@ sidebarTitle: Connect an authentication provider --- In [the last tutorial](/langsmith/resource-auth), you added resource authorization to give users private conversations. However, you are still using hard-coded tokens for authentication, which is not secure. Now you'll replace those tokens with real user accounts using [OAuth2](/langsmith/deployment-quickstart). -You'll keep the same [`Auth`](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.Auth) object and [resource-level access control](/langsmith/auth#single-owner-resources), but upgrade authentication to use Supabase as your identity provider. While Supabase is used in this tutorial, the concepts apply to any OAuth2 provider. You'll learn how to: +You'll keep the same @[`Auth`][Auth] object and [resource-level access control](/langsmith/auth#single-owner-resources), but upgrade authentication to use Supabase as your identity provider. While Supabase is used in this tutorial, the concepts apply to any OAuth2 provider. You'll learn how to: 1. Replace test tokens with real JWT tokens 2. Integrate with OAuth2 providers for secure user authentication @@ -82,9 +82,9 @@ Since you're using Supabase for this, you can do this in the Supabase dashboard: ## 3. Implement token validation -In the previous tutorials, you used the [`Auth`](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.Auth) object to [validate hard-coded tokens](/langsmith/set-up-custom-auth) and [add resource ownership](/langsmith/resource-auth). +In the previous tutorials, you used the @[`Auth`][Auth] object to [validate hard-coded tokens](/langsmith/set-up-custom-auth) and [add resource ownership](/langsmith/resource-auth). -Now you'll upgrade your authentication to validate real JWT tokens from Supabase. The main changes will all be in the [`@auth.authenticate`](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.Auth.authenticate) decorated function: +Now you'll upgrade your authentication to validate real JWT tokens from Supabase. The main changes will all be in the @[`@auth.authenticate`][Auth.authenticate] decorated function: * Instead of checking against a hard-coded list of tokens, you'll make an HTTP request to Supabase to validate the token. * You'll extract real user information (ID, email) from the validated token. @@ -278,4 +278,4 @@ Now that you have production authentication, consider: 1. Building a web UI with your preferred framework (see the [Custom Auth](https://github.com/langchain-ai/custom-auth) template for an example) 2. Learn more about the other aspects of authentication and authorization in the [conceptual guide on authentication](/langsmith/auth). -3. Customize your handlers and setup further after reading the [reference docs](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.Auth). +3. Customize your handlers and setup further after reading the @[reference docs][Auth]. diff --git a/src/langsmith/configuration-cloud.mdx b/src/langsmith/configuration-cloud.mdx index 77d38a3189..af79d957f5 100644 --- a/src/langsmith/configuration-cloud.mdx +++ b/src/langsmith/configuration-cloud.mdx @@ -51,7 +51,7 @@ For more information on configurations, [see here](/langsmith/configuration-clou ### LangGraph SDK -To create an assistant, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the [Python](/langsmith/langgraph-python-sdk#langgraph_sdk.client.AssistantsClient.create) and [JS](/langsmith/langgraph-js-ts-sdk#create) SDK reference docs for more information. +To create an assistant, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the @[Python][AssistantsClient.create] and [JS](/langsmith/langgraph-js-ts-sdk#create) SDK reference docs for more information. This example uses the same context schema as above, and creates an assistant with `model_name` set to `openai`. @@ -231,7 +231,7 @@ Inside your deployment, select the "Assistants" tab. For the assistant you would ### LangGraph SDK -To edit the assistant, use the `update` method. This will create a new version of the assistant with the provided edits. See the [Python](/langsmith/langgraph-python-sdk#langgraph_sdk.client.AssistantsClient.update) and [JS](/langsmith/langgraph-js-ts-sdk#update) SDK reference docs for more information. +To edit the assistant, use the `update` method. This will create a new version of the assistant with the provided edits. See the @[Python][AssistantsClient.update] and [JS](/langsmith/langgraph-js-ts-sdk#update) SDK reference docs for more information. **Note** diff --git a/src/langsmith/env-var.mdx b/src/langsmith/env-var.mdx index 022ffd56d9..26a8b92aa7 100644 --- a/src/langsmith/env-var.mdx +++ b/src/langsmith/env-var.mdx @@ -172,6 +172,6 @@ Time-to-live in seconds for resumable stream data in Redis. When a run is created and the output is streamed, the stream can be configured to be resumable (e.g. `stream_resumable=True`). If a stream is resumable, output from the stream is temporarily stored in Redis. The TTL for this data can be configured by setting `RESUMABLE_STREAM_TTL_SECONDS`. -See the [Python](/langsmith/langgraph-python-sdk#langgraph_sdk.client.RunsClient.stream) and [JS/TS](https://langchain-ai.github.io/langgraphjs/reference/classes/sdk_client.RunsClient.html#stream) SDKs for more details on how to implement resumable streams. +See the @[Python][RunsClient.stream] and [JS/TS](https://langchain-ai.github.io/langgraphjs/reference/classes/sdk_client.RunsClient.html#stream) SDKs for more details on how to implement resumable streams. Defaults to `120` seconds. diff --git a/src/langsmith/observability-concepts.mdx b/src/langsmith/observability-concepts.mdx index 6cdfb45490..11ddcf1d3e 100644 --- a/src/langsmith/observability-concepts.mdx +++ b/src/langsmith/observability-concepts.mdx @@ -114,7 +114,7 @@ You can delete a project with one of the following ways: - In the [LangSmith UI](https://smith.langchain.com), select the **Delete** option on the project's overflow menu. - With the [`delete_tracer_sessions`](https://api.smith.langchain.com/redoc#tag/tracer-sessions/operation/delete_tracer_session_api_v1_sessions__session_id__delete) API endpoint -- With the `delete_project()` ([Python](/langsmith/smith-python-sdk)) or `deleteProject()` ([JS/TS](/langsmith/smith-js-ts-sdk)) in the LangSmith SDK. +- With the `delete_project()` ([Python](https://reference.langchain.com/python/langsmith/observability/sdk/)) or `deleteProject()` ([JS/TS](https://reference.langchain.com/javascript/modules/langsmith.html)) in the LangSmith SDK. LangSmith does not support self-service deletion of individual traces. diff --git a/src/langsmith/resource-auth.mdx b/src/langsmith/resource-auth.mdx index 68a5a3170e..95c57fd55d 100644 --- a/src/langsmith/resource-auth.mdx +++ b/src/langsmith/resource-auth.mdx @@ -12,7 +12,7 @@ Before you start this tutorial, ensure you have the [bot from the first tutorial ## 1. Add resource authorization -Recall that in the last tutorial, the [`Auth`](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.Auth) object lets you register an [authentication function](/langsmith/auth#authentication), which LangSmith uses to validate the bearer tokens in incoming requests. Now you'll use it to register an **authorization** handler. +Recall that in the last tutorial, the @[`Auth`][Auth] object lets you register an [authentication function](/langsmith/auth#authentication), which LangSmith uses to validate the bearer tokens in incoming requests. Now you'll use it to register an **authorization** handler. Authorization handlers are functions that run **after** authentication succeeds. These handlers can add [metadata](/langsmith/auth#filter-operations) to resources (like who owns them) and filter what each user can see. @@ -107,7 +107,7 @@ async def add_owner( The handler receives two parameters: -1. `ctx` ([AuthContext](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.types.AuthContext)): contains info about the current `user`, the user's `permissions`, the `resource` ("threads", "crons", "assistants"), and the `action` being taken ("create", "read", "update", "delete", "search", "create_run") +1. `ctx` (@[AuthContext]): contains info about the current `user`, the user's `permissions`, the `resource` ("threads", "crons", "assistants"), and the `action` being taken ("create", "read", "update", "delete", "search", "create_run") 2. `value` (`dict`): data that is being created or accessed. The contents of this dict depend on the resource and action being accessed. See [adding scoped authorization handlers](#scoped-authorization) below for information on how to get more tightly scoped access control. Notice that the simple handler does two things: @@ -317,4 +317,4 @@ Now that you can control access to resources, you might want to: 1. Move on to [Connect an authentication provider](/langsmith/add-auth-server) to add real user accounts. 2. Read more about [authorization patterns](/langsmith/auth#authorization). -3. Check out the [API reference](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.Auth) for details about the interfaces and methods used in this tutorial. +3. Check out the @[API reference][Auth] for details about the interfaces and methods used in this tutorial. diff --git a/src/langsmith/use-threads.mdx b/src/langsmith/use-threads.mdx index 2fca36b699..54c7c499ff 100644 --- a/src/langsmith/use-threads.mdx +++ b/src/langsmith/use-threads.mdx @@ -10,7 +10,7 @@ To run your graph and the state persisted, you must first create a thread. ### Empty thread -To create a new thread, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the [Python](/langsmith/langgraph-python-sdk#langgraph_sdk.client.ThreadsClient.create) and [JS](/langsmith/langgraph-js-ts-sdk#create_3) SDK reference docs for more information. +To create a new thread, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the @[Python][ThreadsClient.create] and [JS](/langsmith/langgraph-js-ts-sdk#create_3) SDK reference docs for more information. @@ -58,7 +58,7 @@ Output: ### Copy thread -Alternatively, if you already have a thread in your application whose state you wish to copy, you can use the `copy` method. This will create an independent thread whose history is identical to the original thread at the time of the operation. See the [Python](/langsmith/langgraph-python-sdk#langgraph_sdk.client.ThreadsClient.copy) and [JS](/langsmith/langgraph-js-ts-sdk#copy) SDK reference docs for more information. +Alternatively, if you already have a thread in your application whose state you wish to copy, you can use the `copy` method. This will create an independent thread whose history is identical to the original thread at the time of the operation. See the @[Python][ThreadsClient.copy] and [JS](/langsmith/langgraph-js-ts-sdk#copy) SDK reference docs for more information. @@ -239,11 +239,11 @@ Output: ### LangGraph SDK -To list threads, use the [LangGraph SDK](/langsmith/sdk) `search` method. This will list the threads in the application that match the provided filters. See the [Python](/langsmith/langgraph-python-sdk#langgraph_sdk.client.ThreadsClient.search) and [JS](/langsmith/langgraph-js-ts-sdk#search_2) SDK reference docs for more information. +To list threads, use the [LangGraph SDK](/langsmith/sdk) `search` method. This will list the threads in the application that match the provided filters. See the @[Python][ThreadsClient.search] and [JS](/langsmith/langgraph-js-ts-sdk#search_2) SDK reference docs for more information. #### Filter by thread status -Use the `status` field to filter threads based on their status. Supported values are `idle`, `busy`, `interrupted`, and `error`. See [here](/langsmith/langgraph-python-sdk?h=thread+status#langgraph_sdk.auth.types.ThreadStatus) for information on each status. For example, to view `idle` threads: +Use the `status` field to filter threads based on their status. Supported values are `idle`, `busy`, `interrupted`, and `error`. See @[here][ThreadStatus] for information on each status. For example, to view `idle` threads: From a6bfdc3714033cbff6b760bd42fb741e253ae028 Mon Sep 17 00:00:00 2001 From: Kathryn May Date: Fri, 7 Nov 2025 14:34:58 -0500 Subject: [PATCH 2/3] Additional --- pipeline/preprocessors/link_map.py | 1 + src/langsmith/use-threads.mdx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pipeline/preprocessors/link_map.py b/pipeline/preprocessors/link_map.py index 4e8e2e822a..771c275f46 100644 --- a/pipeline/preprocessors/link_map.py +++ b/pipeline/preprocessors/link_map.py @@ -253,6 +253,7 @@ class LinkMap(TypedDict): "ThreadsClient.create": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.create", "ThreadsClient.copy": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.copy", "ThreadsClient.search": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.search", + "ThreadsClient.get_history": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.get_history", "RunsClient": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient", "RunsClient.stream": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient.stream", "CronClient": "langsmith/deployment/sdk/#langgraph_sdk.client.CronClient", diff --git a/src/langsmith/use-threads.mdx b/src/langsmith/use-threads.mdx index 54c7c499ff..5f5dd5b649 100644 --- a/src/langsmith/use-threads.mdx +++ b/src/langsmith/use-threads.mdx @@ -490,7 +490,7 @@ Optionally, to view the state of a thread at a given checkpoint, simply pass in #### Inspect full thread history -To view a thread's history, use the `get_history` method. This returns a list of every state the thread experienced. For more information see the [Python](/langsmith/langgraph-python-sdk?h=thread+status#langgraph_sdk.client.ThreadsClient.get_history) and [JS](/langsmith/langgraph-js-ts-sdk#gethistory) reference docs. +To view a thread's history, use the `get_history` method. This returns a list of every state the thread experienced. For more information see the @[Python][ThreadsClient.get_history] and [JS](/langsmith/langgraph-js-ts-sdk#gethistory) reference docs. ### LangSmith UI From f2eafcb05c09a40ddf0468ef78ab690862408617 Mon Sep 17 00:00:00 2001 From: Kathryn May Date: Fri, 7 Nov 2025 15:39:08 -0500 Subject: [PATCH 3/3] Some js refs --- pipeline/preprocessors/link_map.py | 12 ++++++++++++ src/langsmith/configuration-cloud.mdx | 4 ++-- src/langsmith/use-threads.mdx | 8 ++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pipeline/preprocessors/link_map.py b/pipeline/preprocessors/link_map.py index 771c275f46..02e1264ebc 100644 --- a/pipeline/preprocessors/link_map.py +++ b/pipeline/preprocessors/link_map.py @@ -334,6 +334,18 @@ class LinkMap(TypedDict): "tool": "functions/_langchain_core.tools.tool.html", "ToolNode": "classes/langchain.index.ToolNode.html", "UsageMetadata": "types/_langchain_core.messages.UsageMetadata.html", + # LangSmith Deployment SDK - JS + "ThreadsClient": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html", + "ThreadsClient.create": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#create", + "ThreadsClient.copy": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#copy", + "ThreadsClient.search": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#search", + "ThreadsClient.getHistory": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#gethistory", + "AssistantsClient": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html", + "AssistantsClient.create": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#create", + "AssistantsClient.update": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#update", + "AssistantsClient.search": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#search", + "RunsClient": "classes/_langchain_langgraph-sdk.client.RunsClient.html", + "RunsClient.stream": "classes/_langchain_langgraph-sdk.client.RunsClient.html#stream", }, }, ] diff --git a/src/langsmith/configuration-cloud.mdx b/src/langsmith/configuration-cloud.mdx index af79d957f5..20b9582651 100644 --- a/src/langsmith/configuration-cloud.mdx +++ b/src/langsmith/configuration-cloud.mdx @@ -51,7 +51,7 @@ For more information on configurations, [see here](/langsmith/configuration-clou ### LangGraph SDK -To create an assistant, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the @[Python][AssistantsClient.create] and [JS](/langsmith/langgraph-js-ts-sdk#create) SDK reference docs for more information. +To create an assistant, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the @[Python][AssistantsClient.create] and [JS](https://reference.langchain.com/javascript/classes/_langchain_langgraph-sdk.client.AssistantsClient.html#create) SDK reference docs for more information. This example uses the same context schema as above, and creates an assistant with `model_name` set to `openai`. @@ -231,7 +231,7 @@ Inside your deployment, select the "Assistants" tab. For the assistant you would ### LangGraph SDK -To edit the assistant, use the `update` method. This will create a new version of the assistant with the provided edits. See the @[Python][AssistantsClient.update] and [JS](/langsmith/langgraph-js-ts-sdk#update) SDK reference docs for more information. +To edit the assistant, use the `update` method. This will create a new version of the assistant with the provided edits. See the @[Python][AssistantsClient.update] and [JS](https://reference.langchain.com/javascript/classes/_langchain_langgraph-sdk.client.AssistantsClient.html#update) SDK reference docs for more information. **Note** diff --git a/src/langsmith/use-threads.mdx b/src/langsmith/use-threads.mdx index 5f5dd5b649..8624ae5a8e 100644 --- a/src/langsmith/use-threads.mdx +++ b/src/langsmith/use-threads.mdx @@ -10,7 +10,7 @@ To run your graph and the state persisted, you must first create a thread. ### Empty thread -To create a new thread, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the @[Python][ThreadsClient.create] and [JS](/langsmith/langgraph-js-ts-sdk#create_3) SDK reference docs for more information. +To create a new thread, use the [LangGraph SDK](/langsmith/sdk) `create` method. See the @[Python][ThreadsClient.create] and [JS](https://reference.langchain.com/javascript/classes/_langchain_langgraph-sdk.client.ThreadsClient.html#create) SDK reference docs for more information. @@ -58,7 +58,7 @@ Output: ### Copy thread -Alternatively, if you already have a thread in your application whose state you wish to copy, you can use the `copy` method. This will create an independent thread whose history is identical to the original thread at the time of the operation. See the @[Python][ThreadsClient.copy] and [JS](/langsmith/langgraph-js-ts-sdk#copy) SDK reference docs for more information. +Alternatively, if you already have a thread in your application whose state you wish to copy, you can use the `copy` method. This will create an independent thread whose history is identical to the original thread at the time of the operation. See the @[Python][ThreadsClient.copy] and [JS](https://reference.langchain.com/javascript/classes/_langchain_langgraph-sdk.client.ThreadsClient.html#copy) SDK reference docs for more information. @@ -239,7 +239,7 @@ Output: ### LangGraph SDK -To list threads, use the [LangGraph SDK](/langsmith/sdk) `search` method. This will list the threads in the application that match the provided filters. See the @[Python][ThreadsClient.search] and [JS](/langsmith/langgraph-js-ts-sdk#search_2) SDK reference docs for more information. +To list threads, use the [LangGraph SDK](/langsmith/sdk) `search` method. This will list the threads in the application that match the provided filters. See the @[Python][ThreadsClient.search] and [JS](https://reference.langchain.com/javascript/classes/_langchain_langgraph-sdk.client.ThreadsClient.html#search) SDK reference docs for more information. #### Filter by thread status @@ -490,7 +490,7 @@ Optionally, to view the state of a thread at a given checkpoint, simply pass in #### Inspect full thread history -To view a thread's history, use the `get_history` method. This returns a list of every state the thread experienced. For more information see the @[Python][ThreadsClient.get_history] and [JS](/langsmith/langgraph-js-ts-sdk#gethistory) reference docs. +To view a thread's history, use the `get_history` method. This returns a list of every state the thread experienced. For more information see the @[Python][ThreadsClient.get_history] and [JS](https://reference.langchain.com/javascript/classes/_langchain_langgraph-sdk.client.ThreadsClient.html#gethistory) reference docs. ### LangSmith UI