You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/langsmith/add-auth-server.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ sidebarTitle: Connect an authentication provider
4
4
---
5
5
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).
6
6
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:
8
8
9
9
1. Replace test tokens with real JWT tokens
10
10
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:
82
82
83
83
## 3. Implement token validation
84
84
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).
86
86
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:
88
88
89
89
* Instead of checking against a hard-coded list of tokens, you'll make an HTTP request to Supabase to validate the token.
90
90
* You'll extract real user information (ID, email) from the validated token.
@@ -278,4 +278,4 @@ Now that you have production authentication, consider:
278
278
279
279
1. Building a web UI with your preferred framework (see the [Custom Auth](https://github.com/langchain-ai/custom-auth) template for an example)
280
280
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].
Copy file name to clipboardExpand all lines: src/langsmith/configuration-cloud.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ For more information on configurations, [see here](/langsmith/configuration-clou
51
51
52
52
### LangGraph SDK
53
53
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.
55
55
56
56
This example uses the same context schema as above, and creates an assistant with `model_name` set to `openai`.
57
57
@@ -231,7 +231,7 @@ Inside your deployment, select the "Assistants" tab. For the assistant you would
231
231
232
232
### LangGraph SDK
233
233
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.
Copy file name to clipboardExpand all lines: src/langsmith/env-var.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,6 +172,6 @@ Time-to-live in seconds for resumable stream data in Redis.
172
172
173
173
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`.
174
174
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.
Copy file name to clipboardExpand all lines: src/langsmith/observability-concepts.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ You can delete a project with one of the following ways:
114
114
115
115
- In the [LangSmith UI](https://smith.langchain.com), select the **Delete** option on the project's overflow menu.
116
116
- 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.
118
118
119
119
LangSmith does not support self-service deletion of individual traces.
Copy file name to clipboardExpand all lines: src/langsmith/resource-auth.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Before you start this tutorial, ensure you have the [bot from the first tutorial
12
12
13
13
## 1. Add resource authorization
14
14
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.
16
16
17
17
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.
18
18
@@ -107,7 +107,7 @@ async def add_owner(
107
107
108
108
The handler receives two parameters:
109
109
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")
111
111
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.
112
112
113
113
Notice that the simple handler does two things:
@@ -317,4 +317,4 @@ Now that you can control access to resources, you might want to:
317
317
318
318
1. Move on to [Connect an authentication provider](/langsmith/add-auth-server) to add real user accounts.
319
319
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.
Copy file name to clipboardExpand all lines: src/langsmith/use-threads.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ To run your graph and the state persisted, you must first create a thread.
10
10
11
11
### Empty thread
12
12
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.
14
14
15
15
<Tabs>
16
16
<Tabtitle="Python">
@@ -58,7 +58,7 @@ Output:
58
58
59
59
### Copy thread
60
60
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.
62
62
63
63
<Tabs>
64
64
<Tabtitle="Python">
@@ -239,11 +239,11 @@ Output:
239
239
240
240
### LangGraph SDK
241
241
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.
243
243
244
244
#### Filter by thread status
245
245
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:
247
247
248
248
<Tabs>
249
249
<Tabtitle="Python">
@@ -490,7 +490,7 @@ Optionally, to view the state of a thread at a given checkpoint, simply pass in
490
490
491
491
#### Inspect full thread history
492
492
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.
0 commit comments