Skip to content

Commit d13f312

Browse files
authored
Add further updates for SDK references to new site (#1336)
1 parent 34c2798 commit d13f312

File tree

7 files changed

+35
-16
lines changed

7 files changed

+35
-16
lines changed

pipeline/preprocessors/link_map.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,15 @@ class LinkMap(TypedDict):
246246
"SyncHttpClient": "langsmith/deployment/sdk/#langgraph_sdk.client.SyncHttpClient",
247247
# Resource clients - Async
248248
"AssistantsClient": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient",
249+
"AssistantsClient.create": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient.create",
250+
"AssistantsClient.update": "langsmith/deployment/sdk/#langgraph_sdk.client.AssistantsClient.update",
249251
"ThreadsClient": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient",
252+
"ThreadsClient.create": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.create",
253+
"ThreadsClient.copy": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.copy",
254+
"ThreadsClient.search": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.search",
255+
"ThreadsClient.get_history": "langsmith/deployment/sdk/#langgraph_sdk.client.ThreadsClient.get_history",
250256
"RunsClient": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient",
257+
"RunsClient.stream": "langsmith/deployment/sdk/#langgraph_sdk.client.RunsClient.stream",
251258
"CronClient": "langsmith/deployment/sdk/#langgraph_sdk.client.CronClient",
252259
"StoreClient": "langsmith/deployment/sdk/#langgraph_sdk.client.StoreClient",
253260
# Resource clients - Sync
@@ -326,6 +333,18 @@ class LinkMap(TypedDict):
326333
"tool": "functions/_langchain_core.tools.tool.html",
327334
"ToolNode": "classes/langchain.index.ToolNode.html",
328335
"UsageMetadata": "types/_langchain_core.messages.UsageMetadata.html",
336+
# LangSmith Deployment SDK - JS
337+
"ThreadsClient": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html",
338+
"ThreadsClient.create": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#create",
339+
"ThreadsClient.copy": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#copy",
340+
"ThreadsClient.search": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#search",
341+
"ThreadsClient.getHistory": "classes/_langchain_langgraph-sdk.client.ThreadsClient.html#gethistory",
342+
"AssistantsClient": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html",
343+
"AssistantsClient.create": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#create",
344+
"AssistantsClient.update": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#update",
345+
"AssistantsClient.search": "classes/_langchain_langgraph-sdk.client.AssistantsClient.html#search",
346+
"RunsClient": "classes/_langchain_langgraph-sdk.client.RunsClient.html",
347+
"RunsClient.stream": "classes/_langchain_langgraph-sdk.client.RunsClient.html#stream",
329348
},
330349
},
331350
]

src/langsmith/add-auth-server.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebarTitle: Connect an authentication provider
44
---
55
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).
66

7-
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:
7+
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:
88

99
1. Replace test tokens with real JWT tokens
1010
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:
8282

8383
## 3. Implement token validation
8484

85-
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).
85+
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).
8686

87-
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:
87+
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:
8888

8989
* Instead of checking against a hard-coded list of tokens, you'll make an HTTP request to Supabase to validate the token.
9090
* You'll extract real user information (ID, email) from the validated token.
@@ -278,4 +278,4 @@ Now that you have production authentication, consider:
278278

279279
1. Building a web UI with your preferred framework (see the [Custom Auth](https://github.com/langchain-ai/custom-auth) template for an example)
280280
2. Learn more about the other aspects of authentication and authorization in the [conceptual guide on authentication](/langsmith/auth).
281-
3. Customize your handlers and setup further after reading the [reference docs](/langsmith/langgraph-python-sdk#langgraph_sdk.auth.Auth).
281+
3. Customize your handlers and setup further after reading the @[reference docs][Auth].

src/langsmith/configuration-cloud.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ For more information on configurations, [see here](/langsmith/configuration-clou
5151
5252
### LangGraph SDK
5353
54-
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.
54+
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.
5555
5656
This example uses the same context schema as above, and creates an assistant with `model_name` set to `openai`.
5757
@@ -231,7 +231,7 @@ Inside your deployment, select the "Assistants" tab. For the assistant you would
231231
232232
### LangGraph SDK
233233
234-
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.
234+
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.
235235
236236
<Note>
237237
**Note**

src/langsmith/env-var.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,6 @@ Time-to-live in seconds for resumable stream data in Redis.
172172

173173
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`.
174174

175-
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.
175+
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.
176176

177177
Defaults to `120` seconds.

src/langsmith/observability-concepts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ You can delete a project with one of the following ways:
114114

115115
- In the [LangSmith UI](https://smith.langchain.com), select the **Delete** option on the project's overflow menu.
116116
- 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
117-
- With the `delete_project()` ([Python](/langsmith/smith-python-sdk)) or `deleteProject()` ([JS/TS](/langsmith/smith-js-ts-sdk)) in the LangSmith SDK.
117+
- 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.
118118

119119
LangSmith does not support self-service deletion of individual traces.
120120

src/langsmith/resource-auth.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Before you start this tutorial, ensure you have the [bot from the first tutorial
1212

1313
## 1. Add resource authorization
1414

15-
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.
15+
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.
1616

1717
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.
1818

@@ -107,7 +107,7 @@ async def add_owner(
107107

108108
The handler receives two parameters:
109109

110-
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")
110+
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")
111111
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.
112112

113113
Notice that the simple handler does two things:
@@ -317,4 +317,4 @@ Now that you can control access to resources, you might want to:
317317

318318
1. Move on to [Connect an authentication provider](/langsmith/add-auth-server) to add real user accounts.
319319
2. Read more about [authorization patterns](/langsmith/auth#authorization).
320-
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.
320+
3. Check out the @[API reference][Auth] for details about the interfaces and methods used in this tutorial.

src/langsmith/use-threads.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To run your graph and the state persisted, you must first create a thread.
1010

1111
### Empty thread
1212

13-
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.
13+
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.
1414

1515
<Tabs>
1616
<Tab title="Python">
@@ -58,7 +58,7 @@ Output:
5858

5959
### Copy thread
6060

61-
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.
61+
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.
6262

6363
<Tabs>
6464
<Tab title="Python">
@@ -239,11 +239,11 @@ Output:
239239

240240
### LangGraph SDK
241241

242-
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.
242+
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.
243243

244244
#### Filter by thread status
245245

246-
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:
246+
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:
247247

248248
<Tabs>
249249
<Tab title="Python">
@@ -490,7 +490,7 @@ Optionally, to view the state of a thread at a given checkpoint, simply pass in
490490

491491
#### Inspect full thread history
492492

493-
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.
493+
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.
494494

495495
### LangSmith UI
496496

0 commit comments

Comments
 (0)