← All AI Engineer talks

AI Engineer Code 2025

Identity for AI Agents

1:22:12

About this talk

[REDACTED:username] presenters Patrick Riley and Carlos Galan lead a hands-on workshop on securing AI agents and MCP-connected applications. They explain asynchronous human approvals, Token Vault delegated access and token exchange, fine-grained authorization, and AI security risks before demonstrating a chatbot, trading tools, connected accounts, custom API clients, and an MCP implementation.

Chapters

  1. 0:00Agent identity, workshop scope, and presenter introductions
  2. 2:49Agent security risks and asynchronous human approval
  3. 10:48Token Vault, delegated tokens, LangGraph, and MCP
  4. 20:38Hands-on chatbot, trading tools, and connected accounts
  5. 46:26Custom API client, MCP implementation, and workshop close

Talk transcript

  1. 0:00

    [on-hold music] We're talking today about identity for AI agents and how we

  2. 0:24

    authorize, uh, agents, MCP servers, and, uh, the like. Um, we launched a new product, uh, actually this week, so, uh, that made this presentation fun. [chuckles] Uh, had a major release just a few days ago, um, for several of these features and GA-ing these.

  3. 0:44

    Um, um, additionally, I should probably preface by saying a lot of this workshop material has been repurposed and, um, our, our architect, uh, Abhishek, he goes by nickname [REDACTED:username], [chuckles] um, uh, kind of prepared a lot of this, and we've kind of massaged it into this presentation.

  4. 1:04

    Um, yeah, uh, so we're gonna cover each of these in depth and some of the core features of this new release, whether it's Token Vault, um, Async Auth. Uh, we're not going deep on FGA, but, uh, just know that there is another kind of sub-product, if you will, that's all around role-based access control.

  5. 1:29

    Um, there's an open source project around, uh, Fine-Grained Auth,

  6. 1:35

    um, which really extends this feature set, but that's really kind of another talk. Um,

  7. 1:40

    so yeah, that's some of the things we'll be talking. Uh, quick intros. Uh, uh, it's my first time at AIE, so [chuckles] thank you, guys. It's been awesome week already.

  8. 1:51

    Learning so much. Um, um yeah, I'm, I'm from Raleigh, not, not actually a Shire, but [chuckles] uh, this is a little bit about me. Um, and, uh, yeah, it's been great.

  9. 2:03

    I came over from to [REDACTED:username] from Red Hat, and I've learned a lot about the identity space in the last four years. Um, I'm going to roll over to Carlos.

  10. 2:13

    Yeah. Hi. Um, yeah, I'm, I'm Carlos. I'm co-host with, uh, Patrick for this workshop today. Um, first time in New York. First time in the US. [chuckles] Uh, so great so far.

  11. 2:26

    Uh, thank you for the welcoming. Um, I'm based in Spain, in [REDACTED:location]. If you know the place, it's a beautiful island. Um, I joined Au- [REDACTED:username] and Okta, um, a little bit more, uh, two years.

  12. 2:42

    Father of two and, well, yeah, it's a little bit of about myself.

  13. 2:49

    So I'm gonna-- I wanna start this with a vision that Okta and [REDACTED:username] share. Uh, this is, uh, to free everyone to safely use any technology. And the fun fact about this is, is it's a vision that precedes the AI agent era. [chuckles]

  14. 3:09

    Uh, and still stands, uh, because at the end of the day is what, what we do. Uh, we deal with identity for past, present, and future technology. And yeah.

  15. 3:24

    Um, just to give a little bit of

  16. 3:31

    what's the challenge. Uh, so I said that our vision is just, just to free, uh, anyone to use any technology. But it doesn't mean that all the technologies are the same and all the technologies has the same, uh, challenges.

  17. 3:46

    Uh, it's obvious that agents bring new challenges, new threats. And just to illustrate, uh, this is an updated list of the OWASP, uh, LLM top 10. Um,

  18. 4:02

    so you can see new things that they didn't exist before. So yeah, obviously, we need to, to solve new problems.

  19. 4:12

    Um, so how, how we model for how we think about agents in [REDACTED:username]. So

  20. 4:22

    we think, yeah, so far we've seen interactive agents, chat box, code editors, but this is unlikely the, the future.

  21. 4:34

    We start to see other, uh, modalities where the agents doesn't run anymore in a, in interactive way. Um, task runners or autonomous agents is something that is very popular these days.

  22. 4:53

    But beyond that, we see a future where fully autonomous agents can do things, uh, either on behalf of the users or maybe just because agents will start talk to other agents.

  23. 5:14

    So this is how-- These are four pillars that we believe will cover all these new modalities. The first one is,

  24. 5:24

    uh, AI needs to know who I am. So this is, this is key. Uh, if the agent doesn't know who I am, it can never apply any security or any restriction or any authorization, authentication because-

  25. 5:39

    Yeah

  26. 5:40

    ... I'm just anonymous source or actor in this, and this is important. The second is

  27. 5:50

    obviously the agents will be autonomous enough, but it doesn't mean that it will be alone. It will be do- just doing things on its own. Eventually, they will need to access other services to consume other resources.

  28. 6:03

    So AI needs to call APIs on, on my behalf as a user.

  29. 6:11

    But sooner or later, the agent will try to do something riskier or something that I don't f- I don't think as a user the agent should do on its own, uh, without any supervision, uh, from my side.

  30. 6:27

    So AI can request my confirmation. And lastly, um, AI access

  31. 6:36

    should be fine-grained. So I need to, to give the agent control to access my resources, but not any resource, not any collection or document or anything. It's just, it has to be on my hands to what the, the agent can access and what not.

  32. 6:54

    And just to, to also introduce where Okta and [REDACTED:username] can play or complement each other.

  33. 7:05

    So we talked about a user, and it could be me, it could be you, but eventually will be an employee within an enterprise or a company. And in this case, the employee is not only acting on his own behalf, he's also representing the company.

  34. 7:22

    And i-in, in those cases, the company needs also control what exactly those agents that are acting on behalf those employees are doing. So that's where, uh, Okta also plays a, a important part.

  35. 7:37

    And in the other end, [REDACTED:username] is what we, uh, the, the, the capabilities and features that we've implemented, I think is where they connect. Yeah.

  36. 7:48

    Yeah.

  37. 7:48

    Just trying to understand, you said the agent needs to know who you are.

  38. 7:51

    Yes.

  39. 7:51

    Who you are as what? As the user, as the holder, as the one with the permission? What-

  40. 7:57

    Uh, it's the subject of the, the, the operation that you're doing.

  41. 8:01

    Yeah.

  42. 8:01

    I-- it could be anything. It could be you as an employee, it could be you as a owner or something, as an administrator or something, but at the end, it's a person, a human-

  43. 8:10

    Yeah. Yeah

  44. 8:12

    ... in, in the scenario I was talking about.

  45. 8:14

    Yeah.

  46. 8:14

    Is, is this what acc- what, what permission the agent have access to, or who has access to the agent's capabilities? I'm not-- Like, I don't understand-

  47. 8:28

    Both. Yeah.

  48. 8:29

    What the, the who refers to here.

  49. 8:32

    We're g- Oh, sorry. We are definitely touching on both. So yes, let's-- Yes, and time for your questions at the end, absolutely. Let's make sure. Thank you.

  50. 8:42

    Thank you.

  51. 8:43

    Thank you.

  52. 8:45

    All right. So let's get deep on exactly what we are going to present today. Uh, we talk about four pillars, um, not in a particular order, but we are-- I'm gonna to introduce, uh, one of the three, which is, uh, how we made possible one of the three, which is, um, AI can request my approval.

  53. 9:06

    Um, for that, we implemented Async Auth as part of the Auth for, uh, AI Agents offering. And basically, this feature, what it does is

  54. 9:19

    creates a mechanism and, and a protocol for the agent to reach out the user when an operation needs to be approved by the human in, in, in this flow.

  55. 9:30

    It's-- It seems simple. Um, it is in, in essence, but well, it's security. [laughs] [laughs]

  56. 9:38

    But, um, it's built on top of, uh, client-initiated authentication. Uh, sorry, client-initiated backchannel authentication protocol.

  57. 9:45

    Mm-hmm.

  58. 9:45

    It's an RATC, uh, specification.

  59. 9:49

    Mm-hmm.

  60. 9:49

    It is-- Yeah. So i-in this scenario, it's the agent that is initiating the authentication and authorization. So the agent is running, maybe it could be a long-run autonomous thing, and at some point needs to make a purchase or make something that is flagged as risk.

  61. 10:10

    Uh, so with, with Async Auth, uh, and with a simple SDK code, it can initiate, um, a, a, an authorization request that materializes a notification to the user. The user receives the details of that transaction-

  62. 10:28

    Yeah

  63. 10:28

    ... well-structured. The user acknowledges that, approves that, and then that approval gets back to the, to the agent in form of an access token, and that access token contains the exact details that the user approved.

  64. 10:44

    And yeah, I'm gonna hand over to Patrick for this one.

  65. 10:48

    Awesome. Yeah. Thank you, Carlos. And yeah, good question. Thank you for the questions. Uh, the, the Token Vault, uh, is the other kind of like, you know, major feature we're introducing with this AI-- more AI-targeted [REDACTED:username] release.

  66. 11:03

    Um, Token Vault is a new mechanism for persisting your upstream, uh, resource refresh tokens. So... I'm sorry, refresh tokens. And you may have used [REDACTED:username] be-before, right? For social providers, um, or in tangent with like other identity providers.

  67. 11:23

    Um, this makes use cases with agents much, much easier. Um, so we, we, we have a really fine-grained now flow which allows you to exchange tokens, so, on, on behalf of users.

  68. 11:37

    So I can s- you know, I can send my access token or my application's refresh token, um, whether it's for an API, whether it's for my application. Um, and I can then request scopes for an upstream, uh, you know, service.

  69. 11:51

    So whether that's accessing Slack API or Facebook API or, um, any, any other identity, you know, uh, s-scoped API. Um, so yeah, and we, we actually persist scopes. We manage lifetimes of tokens.

  70. 12:06

    Um, we do a lot of handling there to ensure that your SDK life is very easy. Um, and that your agent stays online, and it's, it's, it's available, and it's secure.

  71. 12:17

    Uh, um, yeah, we've been testing this flow really [chuckles] extensively, um, but you can kind of get a picture of what is going on under the hood and, um, [lips smack] yeah.

  72. 12:28

    Uh, we'll talk more about Token Vault in the, in the shop. It'll make a lot more sense when we get in there. Um, I do wanna kinda highlight a few flows, though, um, where w- you know, I mentioned refresh token and access token.

  73. 12:41

    Um, as we are digesting each of the agentic frameworks, you can kind of see that, well, it may differ if you're using a single-page app, right? And, uh, you know, you're-- you don't have a back end, which is as, you know, uh, as secure.

  74. 12:56

    You're-- or you're wanting to access an external API. Um, in these cases, especially, like, with LangGraph, uh, we, we use an access token. And it's short-lived access token. Um, that's simply because LangGraph stands up an external API.

  75. 13:10

    Um, there's a LangGraph protocol around the LangGraph CLI. So yeah, in this case, like, we kind of model that flow. Whereas, like, other flows, you may just have a native app or a simple Next.js regular web app, um, traditional web app with your agent running embedded.

  76. 13:28

    Um, then, yeah, in this case, like, a refresh token may fit your use case perfectly fine. Um, and then I, I think as we're gonna talk later, there's also cases where, you know, maybe you have an asynchronous agent accessing other data.

  77. 13:44

    Um, we have a new mechanism now called a custom API client, um, which can allow an MCP server, for example, to access remote data. Um, so that's kind of the conceptually what we've done at [REDACTED:username].

  78. 13:56

    We've just taken agent, and we've kinda modeled it as a client, and we've taken your APIs and kind of modeled them as traditional OAuth resource servers or APIs in our platform.

  79. 14:07

    Um, so yeah, that's a little about what's going on here. I've kinda listed some details about token exchange on the slide. Um, yes, the-- just know that the subject token type is kind of type of e-exchange, whether access or refresh.

  80. 14:21

    The subject token is your, your token, um, the user token being exchanged for the third-party token. Um, [lips smack] let's see. The-- This is a really quick GIF of, um, our interrupt flow with LangGraph.

  81. 14:37

    Uh, recently wrote this. Um, so it just shows kind of, you know, what the, what the mechanism looks like. It's a-- If the prompt says, uh, you know, "I need access to my calendar," we have a s- a Google social provider.

  82. 14:51

    Um, we have an interrupt, uh, you know, as part of our SDK. It will feed you back the, the mention that you need to request additional scopes. We then do the token exchange from Token Vault, get you a new access token, and then you can up-- access your upstream provider.

  83. 15:07

    Um, [lips smack] really quite simple in our, in our framework now. Um, quickly about MCP, and then we'll dive into the workshop. Um, MCP's very new for us. We just launched a preview, um, but we've been avidly w- [chuckles] working on this for quite some time.

  84. 15:24

    Um, but yeah, you can kind of see where we've modeled the MCP server also as a client. Um, and yes, there are cases where agent is a client talking to MCP server, which is also a client talking to upstream APIs.

  85. 15:39

    So, um, and that's, that's actually what we're going to show today. [laughs] Um, but yes, the, the flow is quite similar, and we'll talk more about MCP semantics and, um, you know, how we've implemented dynamic client registration and, um, kind of what we have here.

  86. 15:55

    Uh, [chuckles] these are totally from, uh, our teammates, so, uh, [laughs]

  87. 16:00

    uh, just trying to pick our favorite slides. Um, and yeah. And a-as far as the workshop, uh, I think we're planning to just kind of high-level, high-note each section.

  88. 16:11

    Um, if you don't want to work through it, that's okay. You can follow along. If you want to work through it and you're more hands-on, um, that's fine too.

  89. 16:19

    Um, and yeah, we really, truly appreciate all your feedback. We do have time at the end for questions and all kinds of feedback, so, um, we would love that.

  90. 16:28

    And, um, yeah, this is what we are building, um, today.

  91. 16:33

    Um, basically w-we are building an agent Next.js app. Um, what's nice about Vercel's platform, right, is we can build MCP tools alongside our agent in the same infrastructure quickly.

  92. 16:46

    We can then use the agent client to communicate with the MCP server and then leverage the MCP server to talk to third parties. So, um, that's really powerful, and, you know, it's secure, and it's easy to build.

  93. 16:59

    Um, you know, we, we feel quite good about several [chuckles] areas of the s- the security stack there. [chuckles] But, uh, yeah, I think this is kind of the, the rough idea of, like, a lot of typical flows you might see, um, you know, in the industry.

  94. 17:16

    Um, yeah, so, uh, I'm gonna... Yeah, so if we can pull it up and get going. [chuckles]

  95. 17:23

    Yeah.

  96. 17:23

    So let's see. Uh, yeah. Hopefully, everybody's able to capture the link. Um, and ch-ch-ch-ch-choo. All right. Uh, so yeah.

  97. 17:34

    Yeah. While, while Patrick is, um, showing and kind of doing the workshop, um, I'll be available for anyone has a question or, uh, a problem with, with the show-- workshop itself.

  98. 17:46

    Just raise your hand, and I will approach you. [lips smack]

  99. 17:50

    Awesome. Awesome. Um, yeah. And, uh, I'll do, like, a quick intro, then kind of showcase what it does, and we'll kind of step through this journey of building that topology.

  100. 18:01

    Um, so yeah. Uh, the welcome is really just around getting your dependencies and getting, um, a, a, a client. And so I guess the first step here, we, we have a, a root tenant, an upstream IdP for you.

  101. 18:20

    So this is kind of a little more of an enterprise use case. So let's say you have a, a core IdP provider, um, that, you know, you, you tap into for, like, upstream API management or upstream identity.

  102. 18:34

    Um, so we have this, like, fictitious, uh, stock trade application, uh, which looks like this. Um, and this application, basically the idea is, is that, you know, consumers can come here, they can access a stock API, they can establish identity here.

  103. 18:53

    But this, uh, uh, this application also exposes a stock, an API for downstream consumers, and downstream agent clients and, and additional consumers. So we have a, basically a link, a, a federated, a linked access, uh, with our OIDC connection, um, to this, to this tenant.

  104. 19:14

    Um, so yeah. Uh, so the first part is really just, um, getting your, um, your client. Um, I already have a client, but where you would start here is basically just, um, going through [REDACTED:username]'s stack and getting, um, uh, a tenant and starting to get your client developer keys.

  105. 19:37

    Um, w- so we'll add auth as the, as a subsequent step, but I'll show the, like, the first step where we just have a really simple agent and then we're, we're adding on, um, identity and then authorization.

  106. 19:51

    Uh, so, so yeah, these are some prerequisites. Node, pnpm, standard toys. [laughs] Um, [REDACTED:username] CLI. So we use a CLI for a lot of CLI management of our stack. It makes some things easier.

  107. 20:07

    We use a combination of Terraform and CLIs, um, in this demo. Um, and yeah. So that's kind of the conceptual overview and some of the, like, major dependencies. Um, after you've created your, your client and kind of signed up here, um, we've got a link to it here.

  108. 20:27

    Um, you should be ready to go for spinning up your tenant. Um, but yeah, I'll talk more about that in step two. Um, so yeah, let's start with the very beginnings here.

  109. 20:38

    Um, so we're, in this step, we're just, we're, we're building our downstream chatbot, and this is a downstream application that we're just spinning up. Hasn't connected to anything yet, and we're adding, we're adding on this upstream provider and adding on access, um, with agents and with tools.

  110. 20:58

    Um, and so yeah. Uh, I used OpenAI with my agent, but yeah, you'll need, uh, an OpenAPI access key. Um, this is the repo which has the base le- um, the base template.

  111. 21:14

    I'll give you a branch at the end which has all of the, uh, changes we make in this workshop. Um,

  112. 21:21

    and, and yeah. So let's take a look at what that looks like. Go for it, Carlos.

  113. 21:33

    So, so I'm gonna add agent. Okay. Oops.

  114. 21:48

    Okay. Go for it. You want to go?

  115. 21:53

    One, two?

  116. 21:53

    Sure.

  117. 21:55

    So well, yes, standard, uh, chatbots. Um, so at this point when, when, when you start, if you try to do anything other than just regular gen AI questions, you will get just the model, nothing else.

  118. 22:14

    But, um, the important part is if we try to, to ask the model who I am-

  119. 22:21

    Yeah. [laughs]

  120. 22:22

    ... that's when the model then says, "Okay, I don't know who you are. I don't know which day is, so I don't... I know nothing."

  121. 22:31

    The same for, in this case, this is a downstream of a trade, uh, app. If we try to consume data from that trading service, like again, the chatbot will tell you, "I know nothing." [laughs]

  122. 22:46

    Uh, so let's, let's fix that. Um, let's give, uh, the chatbots awareness, uh, first of the service, uh, and, and tools, and then also-

  123. 22:57

    Yeah

  124. 22:57

    ... authentication. So let's, let's authenticate and-

  125. 22:59

    Yeah

  126. 23:00

    ... let the, the agent know who, who I am.

  127. 23:05

    Okay.

  128. 23:05

    Uh-

  129. 23:05

    So that's okay. Yeah, keep going. I'm gonna-

  130. 23:08

    Yeah

  131. 23:08

    ... I'll apply this.

  132. 23:08

    So, well, I'll try to sync with Patrick here.

  133. 23:13

    Yeah, yeah. [laughs]

  134. 23:14

    Um, yeah, this is pretty standard. I think you saw this in several workshops already just today, and imagine several times in the last weeks. But yeah, we are, uh, in the Vercel, uh, AI SDKs.

  135. 23:27

    We will introduce the, uh, get stock price tool.

  136. 23:31

    Yeah.

  137. 23:32

    Um, and later the, uh, authentication part.

  138. 23:37

    Yes.

  139. 23:38

    So let's go for the simple thing. Um, in this case, Patrick is cheating because he has all- [laughs] ... everything in his stash.

  140. 23:46

    Uh-

  141. 23:46

    So it won't be that easy for you guys, but... [laughs]

  142. 23:51

    Rest assured that, uh-

  143. 23:52

    Yeah

  144. 23:53

    ... I'm gonna say-

  145. 23:53

    So let, let's run it again. Um-

  146. 23:55

    I was gonna say, rest assured, all of the code that's here- [laughs] ... is, is in his stash. So-

  147. 24:00

    Yeah

  148. 24:00

    ... you don't have to worry about that. [laughs] That-

  149. 24:03

    So, um, let's go back to the chat box, and let's ask again about prices.

  150. 24:10

    If you guys want us to try to follow along, you're gonna give an overview of the workflow before we start.

  151. 24:15

    Okay. Am I supposed to try and keep up with what you're doing? Yeah, that's hard, right? Yeah. [laughs] Let's, let's, let's complete everything, right?

  152. 24:24

    Yeah.

  153. 24:24

    Yeah, okay. Yeah, good. Good call. You can tell it's the first time we run this lecture. [laughs] [laughs] [laughs]

  154. 24:32

    Pretty awesome. All right, so let- let's, let's, let's make, uh, an actual... Or let's start, uh, with, uh,

  155. 24:43

    um, training questions or at least get info questions about it. Okay, cool. So now we've got the chat box and the agent, um, connected to the upstream API.

  156. 24:58

    Yeah, exactly.

  157. 24:59

    Uh, in this case, it's a public service, it's a public endpoint, so no authentication authorization was required.

  158. 25:04

    Right.

  159. 25:05

    Let's try... So let's, let's move along.

  160. 25:08

    Okay.

  161. 25:08

    Um, there are more info in that page, but let's-

  162. 25:14

    Oh, sorry.

  163. 25:15

    Yeah.

  164. 25:15

    I know.

  165. 25:15

    No, no, no, it's okay.

  166. 25:16

    It's okay?

  167. 25:16

    I was gonna say that let's go back to the kind of important stuff.

  168. 25:19

    Okay.

  169. 25:19

    Um, all right. What happens if we want to read not public, uh, data from the upstream service, but personalized data? So data that I, as a resource owner, own.

  170. 25:36

    In this case, it's... We are going to use, uh, Token Vault. So basically, when, when we logged in... Can you go back, uh, to chat box really quick?

  171. 25:43

    Uh, yeah, yeah, yeah.

  172. 25:45

    So, so far we didn't go through any login process. So there is no who I am or anything like, so it's just, um, anonymous, uh, session so far. But at some point we will log in.

  173. 25:58

    We will log in in the, uh, agent ID.

  174. 26:02

    Yeah.

  175. 26:03

    Right? And but that will give us a relation- a trust relationship between us and the agent alone.

  176. 26:11

    We need to go beyond that. We need to establish a relationship also. It's, it's kind of a, a three-way thing. It's us, it's the upstream service, and the agent.

  177. 26:21

    So we need to establish this triangle relationship, right? And we do that, we will do that through Token Vault. We will, uh, first authenticate the agent. That in exchange will issue an ID token and an access token.

  178. 26:36

    Uh, an access token that basically authorize us to use the agent a lot. But we can u- with Token Vault we can use, uh, once we establish the third relationship, we can use that access token to exchange, to exchange it via an upstream access token.

  179. 26:54

    Yeah.

  180. 26:54

    And that's what Token Vault does. What it does is once we connect our upstream app, in this case the Demo Trade App,

  181. 27:03

    [REDACTED:username] will start storing the refresh token and dealing with the issuance that, of the access tokens. So we store the refresh token, we store the, the access token for as long as it, it, u- u- until it expires.

  182. 27:20

    And every time the agent needs to access this data, it runs the refresh token, uh, grant to obtain a new access token. And that is issued back to the agent.

  183. 27:32

    So yeah, yeah.

  184. 27:34

    Yeah, so can I-

  185. 27:34

    So that's, that's more or less the, the graph.

  186. 27:36

    Can I-

  187. 27:37

    Yeah.

  188. 27:37

    Yeah.

  189. 27:37

    Yeah, jump in, please.

  190. 27:38

    Talk through, uh... So yes, um, you know, it's also going to show just adding the basic auth for your user and, and Belt, and then adding on, uh, these, these Token Vault requests.

  191. 27:51

    Um, the... So SDK code here kind of walks you through, like, the sign up, the Terraform, all of the tenant setup, um, so that you can start to use these services, right?

  192. 28:06

    So that you can access Token Vault, so you, you can start using identity with providers. Um, this is a very new feature set with some of these features. So you'll, you'll notice, like, in some of our configuration, you're enabling a connected accounts feature with our new My Account API.

  193. 28:27

    Um, you're, you know, setting up grant types for your client application, your agent application, um, and you're configuring your OIDC connection. Um, um, so yeah. Um,

  194. 28:42

    I don't know if we wanna sh- Uh, let's keep moving and then we can-

  195. 28:45

    Yeah

  196. 28:45

    ... kind of show the tenant. Um, um, but these are kind of the steps, um-

  197. 28:51

    Yeah

  198. 28:51

    ... we can apply to just adding, uh, basic identity and yeah, I'll talk to you while I'm doing that.

  199. 28:57

    Yeah, here they are, all the steps are there. Um, references, links, and everything you need in case you want this, if you wanna do this later or at home.

  200. 29:05

    Um, all right. So...

  201. 29:08

    That's right. So the two-

  202. 29:10

    So at this point what we're gonna do is bring the login button to the agent, basically. [laughs]

  203. 29:15

    Yeah.

  204. 29:16

    Yes. Um-

  205. 29:17

    So just kind of show what that looks like.

  206. 29:20

    Yeah. So...

  207. 29:23

    Uh, route.

  208. 29:24

    Yeah.

  209. 29:25

    So...

  210. 29:25

    So we use [REDACTED:username] SDK for Next.js. That provides a middleware, um, and-

  211. 29:33

    Not the right one. Hang on one second

  212. 29:34

    ... and a wrapper, uh, for our route.

  213. 29:38

    Let's see.

  214. 29:39

    Sorry, one second.

  215. 29:40

    Yeah.

  216. 29:41

    I think it's that. Oh, it's complaining. Sorry. [laughs] Conflicts.

  217. 29:47

    There we go. Okay, there we go.

  218. 29:50

    There we go. Yeah, a huge change. [laughs] [laughs] It's intimidating, but it's because, um, it's dealing with the connected account. I think, uh, we are in the process of simplifying that in the SDKs-

  219. 30:02

    Yes

  220. 30:03

    ... way more. Uh, but yeah. Uh- Sorry, what is this file? So this is the Next.js, uh, route for the chat.

  221. 30:12

    Yeah. So we've, we've taken the page, um, that, yeah, has the, the chat, um, client. Uh, so that's, yeah, it's just your s- your standard Next.js-... page. And, um, yeah, this is our wrapper, um, which then makes it so it really forces login, um, or gives you a redirect.

  222. 30:33

    Just a-

  223. 30:33

    Um, yeah.

  224. 30:34

    Hi. Just a fact. I have an agent.

  225. 30:36

    Yes.

  226. 30:37

    And I'm trying to add authentication to this agent.

  227. 30:40

    Yes.

  228. 30:40

    Okay. Where does this fit in?

  229. 30:42

    This is an embedded agent within the Next app. So yes. Th- this chatbot is an embedded agent. Um, we'll show other-

  230. 30:51

    So I'm telling you what I'm, what I'm-

  231. 30:51

    ... external agents

  232. 30:52

    ... trying to do is I have the existing deployment.

  233. 30:55

    Yeah.

  234. 30:55

    With additional components you're sharing with me right now.

  235. 30:58

    Yes.

  236. 30:58

    Add to my existing deployment.

  237. 31:00

    Yeah.

  238. 31:00

    And what's out of the box?

  239. 31:01

    Yeah. So it's really these wrappers, uh, from the SDK, which wrap an endpoint, um, you know, whether it's a page route or, um, something else. Um, so yeah, and then this is pretty standard with, like, our Next.js SDK now.

  240. 31:17

    Um, we establish a session. Um, so yeah, it'll show login, but that's ... There's, there's really not a lot of magic here. Um, we are, however, requesting this new connected accounts to see if you have a federated connection.

  241. 31:31

    So, um, that's kind of the confusing part here because, like, you know, the old school [REDACTED:username] flows would not have that. Like, y- you know, we, we wouldn't be requesting upstream providers in many cases or other APIs.

  242. 31:45

    Um, but in this case, yes, we are using a federated provider. And, um, so yeah, it's, it's a little more contrived, I guess. Um, and yeah, we're creating a client.

  243. 31:56

    There you can kind of see the OIDC options we're providing, which are, uh, you know, are specific for OIDC. And then, um, this connect account endpoint, um, is, is new.

  244. 32:08

    That's going to enable our new connected accounts API, um, for managing all of your accounts. Um, I, I think that's ... Yeah, so let me show that and kind of, yeah, go for it.

  245. 32:19

    Yeah.

  246. 32:20

    Okay. Um-

  247. 32:23

    Uh-

  248. 32:24

    So that was code, um, I think-

  249. 32:27

    Yeah.

  250. 32:28

    Yeah.

  251. 32:28

    Let me restart it.

  252. 32:29

    That was certain. All right. Okay. Let's try it again.

  253. 32:32

    Yeah, run it again.

  254. 32:34

    No, it didn't. [laughs]

  255. 32:36

    It's, it's, it's, uh-

  256. 32:38

    All right. Awesome.

  257. 32:38

    So I'm gonna sign out and sign in.

  258. 32:40

    Yeah. So we sign out. Um, so at this point, it's, it's up to you if you want to place a login button or whatever login UX is suits best with, with you.

  259. 32:52

    Yeah.

  260. 32:52

    In this case, just to simplify, if you try to access the URL, it will just prompt you with the login screen-

  261. 32:58

    Yeah

  262. 32:58

    ... right away. Um, so we log in now. Um-

  263. 33:02

    Yeah

  264. 33:02

    ... at this point we are, well, we, it doesn't show-

  265. 33:05

    I think so

  266. 33:05

    ... but we are logging-

  267. 33:07

    Yeah, yeah

  268. 33:07

    ... to the upstream IDP.

  269. 33:08

    Yes.

  270. 33:08

    So using just one credentials. And then, uh, well, at least, uh, now-

  271. 33:16

    Yeah

  272. 33:16

    ... uh, it knows that I've got a session, uh-

  273. 33:20

    Yeah

  274. 33:20

    ... and who I am.

  275. 33:22

    Let's see. Yeah.

  276. 33:25

    Awesome. So it got the profile from the IDP. It load that to the context.

  277. 33:31

    Yeah.

  278. 33:31

    So now it knows who, who I am.

  279. 33:34

    Yeah. In, in this fictitious application, like, this is also the same identity that's, uh, I'm sorry, that's linked with, uh, the, the stock trader. Uh, or, sorry.

  280. 33:47

    Uh, yeah, this dashboard. So, uh, so yeah, th- your identities are now linked between, you know, these applications. You're using an upstream provider, and you'll also see shortly that they'll be linked with your MCP tools as well, so.

  281. 34:01

    Uh, okay. Uh, so we've got identity for, we've got login. Um, we've got an embedded agent running locally. Um,

  282. 34:11

    um, what else-

  283. 34:13

    Right

  284. 34:13

    ... do we want to talk about in this step? Are we ready to go on? [laughs]

  285. 34:15

    Okay. So it knows who I am, but it doesn't know what I own. What, what is the ... It doesn't have access to the-

  286. 34:25

    Yeah

  287. 34:25

    ... trading service resources that I own in ... So if you go back to the-

  288. 34:30

    Yeah. To here

  289. 34:31

    ... uh, demonstrated app, one sec.

  290. 34:33

    Uh, yeah. This one?

  291. 34:34

    Yes. So my balance is 10K. I've got these recent orders.

  292. 34:41

    Yeah.

  293. 34:42

    Uh, so on and so forth. So how can we give the agent access to all this data?

  294. 34:47

    Yeah. So, all right.

  295. 34:50

    So the first step is, as we said earlier-

  296. 34:53

    Yeah. Yeah

  297. 34:53

    ... we need to connect the two accounts. So even if we are using the same credentials, we still didn't say explicitly, or the end user didn't said the ex- explicitly to the agent, "Hey, I, I know, I, I want you to know who I am, but I didn't give you permissions to access my account yet."

  298. 35:14

    So that's the step you are doing.

  299. 35:15

    Yeah.

  300. 35:15

    Connected the accounts, and that's when we prompt the user with these extra permissions that the agent needs, these extra scopes. All right? And that's when the relationship is established.

  301. 35:27

    Uh, so now the agent knows that, uh, I have access to this account-

  302. 35:33

    Yeah

  303. 35:33

    ... with that exact permissions. Nothing more, nothing else.

  304. 35:37

    Yeah. Yep. Um, and, uh-

  305. 35:40

    So, yeah

  306. 35:41

    ... yeah, so next I think is just adding some tools which can now leverage this account. Um, so I'm gonna jump into portfolio tools.

  307. 35:53

    Um, and this is getting into that token exchange. And, um, yeah, now we can start to ask more pertinent queries, right? We can say, "Can you view my portfolio?"

  308. 36:03

    Um, and, uh, yeah, we're not gonna give you access yet to create orders. That'll be, uh, the next pieces. Um, but yes, uh, this kind of shows how our SDK kind of models getting an access token for another connection or upstream, um, how to, how to leverage shared tools in TypeScript, um- I think

  309. 36:28

    what's really nice here is that these tools can be versatile. They can be shared between whether it's an agent tool or an MCP tool. Um, hopefully your framework has, you know, TypeScript support.

  310. 36:39

    Um, that's also a really nice, uh, capability and tool organization. And so yeah, let... Yeah, if you wanna keep going, I'm gonna add the, the tools. [laughs]

  311. 36:51

    Awesome. So the same as the same, the first step we did, we are going to load a, uh, well, to give the agent a new tool. So far, local tools.

  312. 37:03

    We will get into, we will get to into the MCP part, but, uh, it is a native tool that it does a simple-

  313. 37:12

    Yes

  314. 37:12

    ... um, HTTP request to the service. But, uh, the tool

  315. 37:19

    will have a... So-

  316. 37:22

    Give me one second.

  317. 37:23

    We can show... Yeah, sorry.

  318. 37:24

    Yeah.

  319. 37:25

    So one of the other things that we provide in our SDKs is how we connect this tool, uh, with the authorization part, uh, and the authentication part.

  320. 37:35

    Yeah.

  321. 37:36

    Well-

  322. 37:36

    So here's the, the tools basically again.

  323. 37:39

    Yeah.

  324. 37:39

    So, um-

  325. 37:40

    So can you show the-

  326. 37:42

    You said the screen?

  327. 37:43

    ... the tool?

  328. 37:43

    Yeah, yeah.

  329. 37:44

    No, the tool.

  330. 37:45

    Oh.

  331. 37:45

    Again. The, the call tool.

  332. 37:47

    Uh-

  333. 37:47

    To show the-

  334. 37:49

    This one? Tools or...?

  335. 37:51

    No, the, the get portfolio tool.

  336. 37:53

    Oh, yeah. Give me... Uh, yeah. Uh, sorry.

  337. 38:03

    Yeah.

  338. 38:05

    So at some point we are, we, we create, uh, with, with a client, and in the handler.

  339. 38:14

    Yeah.

  340. 38:15

    What is that we call?

  341. 38:15

    I think it's just a s- uh, sorry, it's just-

  342. 38:19

    Yeah

  343. 38:19

    ... a, a get with a include history, you know, query param option, optional, uh, addition there. Um, pretty straightforward API call-

  344. 38:30

    Yeah

  345. 38:30

    ... once you have a client and a token. Um, but yeah, the, the sweet sauce is the, you know, we can now leverage this get access token for connection really easily-

  346. 38:40

    Yeah

  347. 38:41

    ... on our SDK. Um, so yeah, let me show that if you wanna [laughs]-

  348. 38:46

    Yeah. It's, everything is summarized in this slide. That's what I wanted to show.

  349. 38:50

    Yeah.

  350. 38:50

    Uh, so our SDK provide this. You provide the connection. In this case, that's the upstream name that is represented in, in your tenant. Uh, and that's what does all the dance with the token bot.

  351. 39:04

    All right. I'll say, "Can you show my portfolio?" Oof, sorry.

  352. 39:13

    Yeah.

  353. 39:13

    Um, right.

  354. 39:15

    Yeah.

  355. 39:15

    So we've got an agent with access to our data now, so he knows who I am, but also has access to what I own. Uh, it has detailed access, but it's up to you obviously, the, the tool implementer.

  356. 39:29

    But at least, yeah, I'll, I'll recognize exactly what we have.

  357. 39:35

    Okay.

  358. 39:35

    Okay. Move on.

  359. 39:36

    So, so we have portfolio tools, uh, which is great. Um,

  360. 39:44

    I didn't show the scopes, but [laughs] uh, yeah, rest assured that, like, and I'll show the MCP server really quickly. So kind of what we've scaffolded and modeled, um, then this may help with some of the questions.

  361. 39:56

    But the, um... Yeah. Here's the MCP server, which we've, we've modeled as an API. Um, and we have, you know, scopes around accessing the MCP server. Um, we've kind of modeled those the same way as our, as our upstream, um, API.

  362. 40:14

    So let's see. Permissions. Um, we've got scopes around reading trades, reading our portfolio. Um, and yeah, those are referenced in, in those tools in the meta, um, that wasn't abundantly clear.

  363. 40:29

    But, um, yes, we are representing those as, like, scoped permissions. Um-

  364. 40:33

    How did you, how did you create these permissions? Because-

  365. 40:36

    Yes

  366. 40:36

    ... the, the keyword trade and portfolio, these are very application specific.

  367. 40:41

    Yes.

  368. 40:42

    Yes.

  369. 40:42

    Yes.

  370. 40:42

    So how would it know what they are mean in the context of the application?

  371. 40:48

    You wanna take that one?

  372. 40:49

    What do you mean?

  373. 40:51

    So this app is a stock trading app, so the word trade and portfolio will have very specific meaning here.

  374. 40:58

    Yes.

  375. 40:59

    But I could have another app where the word trade or the word portfolio, maybe it's like a project management app, portfolio would mean something else.

  376. 41:08

    Yeah, but-

  377. 41:09

    So, so how does it identify the, the meaning-

  378. 41:12

    You wanna take it?

  379. 41:13

    ... of the permissions?

  380. 41:14

    That's-

  381. 41:14

    Want me to take it or you can-

  382. 41:15

    Yeah, I can. So, uh, yes.

  383. 41:17

    But do you, do you understand my question?

  384. 41:18

    I think I understand, but at the end of the day, it's the upstream service that sets the rules, right?

  385. 41:24

    Yeah.

  386. 41:24

    So if you want to access my re- my, my resources, I need an access token with this scope, otherwise I will reject your request.

  387. 41:32

    Yeah.

  388. 41:33

    And it doesn't, it doesn't matter if you're an agent or if you have just traditional REST API client. And that relet- that you... As an implementer of the agent, you know that in advance.

  389. 41:43

    You know if you are connected to an as- an upstream, you know what's the shape of the request, and what's the authorization layer that I need to implement. You can model your scopes as you want in your local tenant, but at the end of the day, the translation, the scopes to the upstream should be done.

  390. 42:01

    So you can, you can tell-

  391. 42:03

    So where do I do that?

  392. 42:04

    It's in the connection.

  393. 42:06

    Yeah. Yeah.

  394. 42:06

    So when you define the connection...

  395. 42:09

    Yeah. Yeah, so that, the enterprise connection here to our upstream is here. And yeah, you can kind of see we're requesting those scopes from the upstream tenant, and it also in this case, like, has

  396. 42:25

    those steps modeled around the stock API, so-

  397. 42:28

    Exactly.

  398. 42:28

    Yeah.

  399. 42:29

    So these scopes I'm getting from that, from the, from the service?

  400. 42:32

    Yes.

  401. 42:32

    Exactly.

  402. 42:33

    So these scopes are-

  403. 42:33

    Exactly

  404. 42:34

    ... most likely publicly available or it's something that is part of the contract between you and the upstream. And that's exactly what the user will going to see on, on the prompt that you saw at the moment that they connect the account.

  405. 42:46

    Exactly.

  406. 42:46

    So we are Here for, to simplify, we use the same names, but it could be different. It could be different scopes. These are-

  407. 42:54

    Yeah.

  408. 42:54

    It's ... The translation happens on Token Vault.

  409. 42:58

    Yeah. Yep, and, um, yeah, um, it's also worth mentioning, like, we model roles differently, right? Like, around, you know, personas or their identities. Scopes are really around API access, right?

  410. 43:10

    So if you're looking to kinda model more around a role, um, yeah, definitely check out FGA. Um, we have role-based access controls, which you can apply around tools as well or around pages.

  411. 43:23

    But this is more just, you know, fine-grained, uh, access around an API. Um, so all right. Let's keep going.

  412. 43:31

    And this is new?

  413. 43:33

    Yes.

  414. 43:34

    Yeah. A lot of this is very new [laughs].

  415. 43:36

    Con- connections has been around for forever.

  416. 43:39

    Yeah.

  417. 43:39

    But the purpose, and actually that's the name we chose, uh, the purpose of a connection,

  418. 43:46

    uh, we create a new one, which is Token Vault.

  419. 43:49

    All right. We're still doing pretty good on time, but yeah, it's okay. Ready to jump into MCP, so.

  420. 43:54

    Yes. Um, any questions so far? We can ... Kind of switching topics here.

  421. 44:00

    I, I wanted to ask-

  422. 44:00

    Yeah

  423. 44:00

    ... similar to her question. The scope, you said they're publicly available. You get them from the Well-Known OIDs, like a hard-

  424. 44:08

    Yes

  425. 44:08

    ... sort of common way to get these scopes-

  426. 44:10

    Yes

  427. 44:10

    ... right? And you can publicly fetch them, and then-

  428. 44:12

    Yeah.

  429. 44:13

    Yes.

  430. 44:14

    Yes.

  431. 44:14

    Yes, exactly. Um, so yeah, that's ... You've jumped right into the next flow, and, uh, yeah, so we are trying to implement the current spec with MCP now, and that's kind of the next part of this exercise is adding the Well-Known protected resource metadata endpoint.

  432. 44:31

    Um, and, um, yeah, so, um, we've been testing this with a lot of providers, uh, recently, and recently we just EA'd our DCR, uh, feature, like, this week. So, um, but yeah, that ...

  433. 44:45

    This flow is a little more involved, right? Because the, the MCP server becomes, um, you know, a client of the agent. Um, and we're kinda, we're gonna show kinda how we modeled that in the Vercel code.

  434. 44:58

    Um, um, and you can see, like, you know, all of the steps. There's, you know, obviously more involved, but it's, you know, it's important because we're actually securing MCP resources and tools, and kind of doing it in a granular way, but also enabling dynamic registration, um, with many providers.

  435. 45:21

    Um, so yeah, we'll showcase that, um, towards the end here. Um,

  436. 45:27

    yeah, I can probably fire this up if you want. Um-

  437. 45:29

    Yep

  438. 45:30

    ... kind of see if there's ... So this kind of show ... Uh, maybe I'll talk through a little bit of this. This kind of shows some of the middleware, um, and how we apply, like, scope verification on the MCP server itself, and how we expose metadata.

  439. 45:44

    So yeah, that's exactly what you're alluding to, is, like, we, we advertise the supported scopes, um, when you go to register, um, in that part of the flow, and then, um, yeah, further down, I think it's in the transport when we actually construct.

  440. 46:03

    Uh, so yeah, this is just more helpers. So it's like, you know, creating middleware to verify a JWT. Um, we're still, you know, still a bearer token, um, public-private key encryption.

  441. 46:16

    Um, but yeah, we, we reference those libraries. We have a lot of shared libraries for doing these things now. Um, and then, um,

  442. 46:26

    yeah. Uh, another important mention here is this is where we introduce this custom API client, and maybe I can show. So this is a separate client that we've modeled in this, uh, demonstration.

  443. 46:38

    You could really create any number of API clients if you want to model them, you know, more independently or how you want to build your stack. But, um, yeah, we've modeled this as a, a linked client, which is also a new feature in [REDACTED:username].

  444. 46:54

    Um, so now we can actually link APIs to clients and model them as ... Basically, you can think of them as, you know, an agent client or an MCP server client.

  445. 47:04

    So, um, so that's a really nice new feature. Um, those are now linked, and, um, we have API support for those as well. Um, so yeah, you can see, like, constructing an API client with the MCP server's client ID and secret.

  446. 47:22

    Um, and yeah, I'll run that in just a second. I wanna see if this ... Uh, so this is, again, like modeling these shared tools. So we've, we've taken this, like, stock tool, portfolio tool from the agent over to the MCP server now, so we can expose it from there as well.

  447. 47:41

    Um, and then, you know, the registration of the tools. Um, and then, yeah, this is where we create the transport, right? So this is where we create the MCP's endpoint and construct the server.

  448. 47:56

    And, um, yeah, that, that's where we invoke our middleware. Um, so yeah, let me show that. And, um, yeah, if you wanna add anything else, feel free.

  449. 48:05

    Yeah, so in, in this case to, uh, just an attempt to, to show the whole journey, we decided to create the MCP as part of this workshop.

  450. 48:15

    Yes.

  451. 48:15

    But it could also be that you-

  452. 48:17

    I'm scared

  453. 48:18

    ... get your upstream MCP.

  454. 48:21

    Yeah, yeah.

  455. 48:21

    Not that you are building an MCP, but you still need to authorize to that, right? So in, in, in both cases, uh, authorization works, so it's not that. We wanted to show both ends, uh, so that's why there are so many [laughs] so, so much code in that page.

  456. 48:37

    It's just because, uh, it's, part of it is, is the actual MCP server.

  457. 48:42

    Okay. So I've unstashed all of the changes in this that I just showed, and- Um, yes, like, this is basically, uh, what's gonna give us the MCP tools. Um, so, um, yeah, I will start this.

  458. 49:01

    All right. Um, uh, so yeah, made, made the changes to the client. So in this case, in this, the same Next.js server that the agent is running is where the MCP is served.

  459. 49:16

    But it's up to you which as your architecture, but same, same concept apply.

  460. 49:22

    Yeah. So I'm gonna say-

  461. 49:25

    Can I ask a question?

  462. 49:25

    Yes.

  463. 49:25

    Yeah, go for it.

  464. 49:26

    Sorry.

  465. 49:27

    Yeah.

  466. 49:28

    So if you go back to the chat UI, can you, can you do a prompt injection to tell that now my connection have a different scope and ask for that?

  467. 49:38

    Good question.

  468. 49:39

    So if you, you can try that, but it will take a no effect because the fact that you are asking scopes that are not part of the connection would be either ignored or rejected.

  469. 49:52

    So, so basically just ignore that.

  470. 49:54

    Yeah, it depends on the, the upstream, but yeah.

  471. 49:58

    Yeah.

  472. 49:59

    So the s- scopes that are not part, correct me if I'm wrong, Patrick-

  473. 50:03

    Mm-hmm

  474. 50:03

    ... but scopes that are not part of the connection can never-

  475. 50:07

    Right

  476. 50:07

    ... end up in the access token.

  477. 50:09

    That's right. That's right.

  478. 50:11

    Right? So I think our policy most of the times is just ignore what we don't recognize. So you just, you will get an access token with valid scopes, but not the one you try to inject.

  479. 50:25

    Okay. So-

  480. 50:27

    And also, I don't think, now that you mention, I don't think we expose

  481. 50:34

    the auth part to the LLM, meaning we expose a tool, and we grab the tool, but the authorization happened before the tool execution. So I don't think the LLM will have any influence in what exactly, but I'm not saying it's not possible because [laughs] many ways to do s- many things. [coughs]

  482. 50:56

    But either way, even in, in our end, anything that we don't recognize shouldn't end up in an access token.

  483. 51:04

    Uh.

  484. 51:05

    Because you mean that the auth will actually recognize what connections you have before it pass your instruction over to LLM to execute. Is that right?

  485. 51:16

    Yes. So you, when you pa- you try to execute the tool, so the tool will say, "Okay, I need an access token because I need to do an API call."

  486. 51:26

    So it's our wrapper or our SDK tools that provide this access token to the tool. It's not the tool on command to the end- the, to, from the LLM that runs the authorization request.

  487. 51:39

    It's, it's, let me say, it's just old-fashioned code. It's not LLM code.

  488. 51:46

    Okay. So, uh, now I'm gonna show kinda step-by-step the DCR. Um, so yeah, it's our... I'm using MCP Inspector, a common tool, um, and we'll show some others. But, um, yeah, this will kind of just show now we can actually target that MCP server directly, you know, running on the same server under /MCP now.

  489. 52:09

    Um, so yeah, and this will show our OAuth flow and DCR happening. So I'm gonna hit Continue. We've got-

  490. 52:17

    Uh, disclaimer, open DCR is a thing.

  491. 52:21

    Yeah.

  492. 52:21

    But you can see, it's in early access, and I don't think we will-

  493. 52:26

    Yeah.

  494. 52:27

    There are some concerns about how this will scale.

  495. 52:31

    Yes.

  496. 52:32

    Um, but there are other aspects coming, uh, that I think fit better in, in this scenario.

  497. 52:39

    Absolutely. I agree. [laughs] Uh, but yeah, you can see the protected resource metadata coming back. So we have the well-known endpoint. Um, you can see the scope supported, and then we make a request to the authorization server.

  498. 52:55

    Um, that returns more information about our tenant, um, and, you know, additional scopes, how to authorize. Um, so yeah, I'm gonna jump through that. And then we get a registration call.

  499. 53:10

    Um, so now we're gonna get a new client just for testing purposes with the MCP server. Um, so yeah, now we're gonna get, um, believe this is PKCE. It's our authorization code flow with proof key code exchange.

  500. 53:24

    Um, so yeah, it's standard [REDACTED:username] flow, but it's also works well with, with MCP. Um, so I'm gonna copy this.

  501. 53:36

    So... Okay. So yeah, now it's gonna prompt me and give me an authorization code. [laughs]

  502. 53:55

    And at the end of the line here, we should get an access token. So, um, which is great. So now we can access the MCP server with these scopes from, from anywhere, right?

  503. 54:06

    That's the great thing. So, uh, so now I'm gonna hit Connect, and let's see if we can get some tools.

  504. 54:13

    Uh, yeah, so... Yes. So now we have access to our portfolio and, um, you know, our, our identity tools kind of accessing, um, the same upstream stock API. Um, so yeah.

  505. 54:30

    Um, you wanna add anything here, Carlos, before we go little further?

  506. 54:34

    No. Any question?

  507. 54:38

    Yeah.

  508. 54:38

    To the, um, uh... Sorry, gonna ask at the end, yeah.

  509. 54:45

    Sure. All right then. Okay. So, um, yeah, this is really the most involved part of this flow. Um, I'm gonna show the Claude- Uh, so I've actually deployed it if you wanna play around.

  510. 55:02

    Uh, and, um, yeah, so, um, that's, that's really the most involved part with MCP rather. Um, um, yeah, I think we- we're hitting time, so let's go into Async Auth, if that's all right.

  511. 55:15

    All right. Okay. Um...

  512. 55:18

    Go for it.

  513. 55:20

    Do you mind still, um-

  514. 55:22

    Yeah

  515. 55:22

    ... driving the, the coding so I can-

  516. 55:25

    Absolutely

  517. 55:26

    ... talk over? Uh, all right. So we said that earlier, the fact that the agent has access to our resources, it doesn't mean that it should do anything in any time without my supervision, right?

  518. 55:42

    I said this all the time. We don't want an hallucinating agent buying a stock in the middle of the night without my permission.

  519. 55:50

    What's wrong with that? [laughs]

  520. 55:53

    Yeah. So that's where part of our, uh, the bundle is to provide a simple way, and the simplest way to the agent to reach out the user and get their approval for risky operation.

  521. 56:12

    In this case, we consider place an order, either buy or sell, a risky operation. It's something that we as a developers of the agent define. It's up to us.

  522. 56:24

    Um, so in this case, what we are going to do is we are, we are... we bring, um, the create order tool, but with some conditions.

  523. 56:36

    Yes.

  524. 56:36

    So that conditions will be that before running the create order tool, we will call, uh, backchannel, uh, auth. That's the, the SDK name for, for the auth, uh, Async Auth.

  525. 56:49

    Yeah.

  526. 56:49

    We will obtain an access token that contains exactly what the user is... So let me, let me go step for- uh, backward. So we will create this request to backchannel with the detail- with the details of the transaction.

  527. 57:04

    In this case, it will be exactly the symbol I'm, I'm buying or selling, quantity, and the price. For the user to see that in their screen, most likely in a out-of-band device, see that and approve that.

  528. 57:20

    And only when that is approved, we will place the order.

  529. 57:24

    Yeah. Yeah.

  530. 57:26

    For that, in this, in this case, in this sample, we will use Guardian. It's our, uh, N- MFA, uh, application. Is, is out of the box application. You can use, you can install and use.

  531. 57:38

    Um, but also we support, uh, Guardian SDK in case you want to implement your own.

  532. 57:44

    Yeah.

  533. 57:45

    Um...

  534. 57:46

    I'll show the user.

  535. 57:47

    Yeah.

  536. 57:48

    Uh...

  537. 57:48

    So to... for the agent to be able to reach out the user in, for this channel in particular, the user needs to be enrolled on MFA.

  538. 58:00

    Yeah.

  539. 58:00

    There are several mechanisms to do that. Uh, just for, for, for the workshop, we show you kind of the backdoor of it.

  540. 58:07

    Yeah.

  541. 58:07

    But it depends on the UX, how you... It could be in sign-up. It could be like a step-up kind of thing. I don't know. It's up to, uh, you.

  542. 58:17

    But we need to, to enroll. So you will find-

  543. 58:19

    Yes

  544. 58:20

    ... it's in the docs, but you will find a way to send an email that contains all the instructions to enroll.

  545. 58:25

    Yeah.

  546. 58:26

    So once we enroll, we will... we can, we can add this, uh, little helper here.

  547. 58:32

    Yeah.

  548. 58:32

    Uh, that just basically forwards the, uh, auth to the, to our SDK.

  549. 58:38

    All right. Let me undo and reapply here.

  550. 58:41

    Yeah. Am I going faster than you?

  551. 58:43

    No, it's perfect. Yeah, it's perfect.

  552. 58:44

    Sorry. [laughs]

  553. 58:45

    Catching up.

  554. 58:46

    All right. Um...

  555. 58:48

    Uh, one sec.

  556. 58:50

    Okay. So in a second, I will show you exactly what we are going to send in this authorization.

  557. 58:57

    Yeah.

  558. 58:57

    Um, so we can see...

  559. 59:03

    So I think it was in, uh, [REDACTED:username], we add the-

  560. 59:06

    Yeah. So here is the, uh-

  561. 59:08

    This, this-

  562. 59:09

    This is the helper. It's just a wrapper just for to wrap the errors and all it comes to. But basically it's again, this. This line of code in our SDK is what we send and what will run all these steps.

  563. 59:22

    Internally-

  564. 59:23

    Show the tool

  565. 59:24

    ... it will keep, um... it will wait for the user response. So it's basically an as- an async, uh, operation, and when the user responds, the agent can resume.

  566. 59:36

    Oh, sorry. It's in, uh, it's in tools, right?

  567. 59:40

    Yeah.

  568. 59:40

    This one.

  569. 59:41

    In tools.

  570. 59:41

    Uh, yeah, this one. So yeah. So here we- we're creating a new client with, uh, you know, so we're specifying, like, what we need in the authorization details. So we can provide that rich authorization request detail when the authorization request comes in.

  571. 1:00:01

    Um, we're, you know, we're using this custom API client in this case that we've already created. You could create others, but yes, we're creating a custom API client to then perform the backchannel request.

  572. 1:00:15

    Um, and then, uh, yeah, it... in this case, it waits. [laughs]

  573. 1:00:19

    Yeah.

  574. 1:00:19

    You could do a number of things. You could pull, you could, uh, uh... There's other mechanisms here, but yes, in this case, for simplicity's sake, we wait for the verification.

  575. 1:00:29

    So let me give this a go.

  576. 1:00:31

    All right.

  577. 1:00:32

    Yeah. So...

  578. 1:00:34

    Okay. So we run the client again, uh, sorry, the chat box agent.

  579. 1:00:40

    Yeah. So we'll go back to here.

  580. 1:00:43

    All right.

  581. 1:00:44

    And...

  582. 1:00:46

    So now we can ask to, I don't know-

  583. 1:00:49

    Yeah, we-

  584. 1:00:49

    ... place an order.

  585. 1:00:51

    Of, uh-

  586. 1:00:52

    To-

  587. 1:00:52

    What is it? Wayne.

  588. 1:00:53

    Wayne, yeah. For example.

  589. 1:00:58

    Fictitious stocks

  590. 1:00:59

    Yeah. So in this case... Yeah, go ahead.

  591. 1:01:01

    I have just a question about the code. I, I don't know if all this code is checked in, and I'm not sure if you have branches- Uh, yes. Yes ...

  592. 1:01:08

    that you can share this.

  593. 1:01:08

    Yes.

  594. 1:01:08

    Yes. Uh, yes. I'm happy to share that towards, uh, towards the... Do you want me to share it now or...? Uh, later. I just- Okay [laughs] ... wanted to follow up.

  595. 1:01:16

    Yeah, yeah, yeah.

  596. 1:01:16

    Okay. Yes, we do have a final state branch. Yes. [laughs]

  597. 1:01:20

    Um, in this case, the agent is instructed to inform the user that this is going to happen. So this is not yet the authorization request. It's just heads up that, "Hey, you're going to receive a push notification.

  598. 1:01:34

    Is, is okay?" It's just a really silly system prompt like, um, so you can proceed, then-

  599. 1:01:42

    Yeah, waiting. Hang on. [laughs]

  600. 1:01:46

    Um.

  601. 1:01:47

    One minute here. Should be connected. Let's see.

  602. 1:01:52

    Uh-oh.

  603. 1:01:52

    Give one a minute.

  604. 1:01:53

    In one sec. In one of these, like, dozens of time. [laughs]

  605. 1:01:56

    Yeah. Uh, turn that off.

  606. 1:02:02

    Oh, because you're hot-

  607. 1:02:03

    And ch-ch-ch. Let's see. Let me try again. Let's see.

  608. 1:02:09

    Yeah, refresh and try again.

  609. 1:02:10

    Refresh. [clears throat]

  610. 1:02:17

    Apart from push notifications, we also support email as a random node. Um, and more channels. We, we will be implementing more channels to reach out to the user.

  611. 1:02:29

    Yeah, maybe I need to restart the application server.

  612. 1:02:32

    Can I see tokens? 'Cause if I have several agents-

  613. 1:02:36

    Mm-hmm

  614. 1:02:37

    ... can I just pre-authorize certain users?

  615. 1:02:41

    In, in your agent? Like-

  616. 1:02:45

    Yes.

  617. 1:02:46

    Yeah, it's... I, I mean, it's, I guess it's up to you how you manage the session with your agent. This is, this is-

  618. 1:02:50

    No, I... Yeah, but I wanna make sure no one else can engage, like-

  619. 1:02:56

    With the same agent, you mean?

  620. 1:02:57

    Yeah. Or, like, can I, can I get... Can I, can I be able to pre-pre-authorize the agent for certain access, but also for pre-authorize who can use the agent for access the agent?

  621. 1:03:08

    Just trying to understand what are the different use cases around that.

  622. 1:03:11

    One second.

  623. 1:03:12

    Um, yeah, but this is kind of up to you how you kind of the, how you manage your sessions and permissions to access the app as a resource.

  624. 1:03:21

    Okay.

  625. 1:03:21

    Uh, but once you establish that, it's just you can, you can establish any policy with one at the end. It... I don't, I don't know if I'm following the question. [laughs]

  626. 1:03:31

    We can, we can chat later, but.

  627. 1:03:34

    I approved it, so... Yeah, I had to reconnect here on this network, so.

  628. 1:03:39

    Okay.

  629. 1:03:40

    Uh, let me try one more time. It did come in.

  630. 1:03:44

    In this example for this agent, it's saying... Basically, the we, the agent is asking if, uh, if it's allowed to go to that website. So I just wanna make sure that the, the agent still-

  631. 1:03:57

    All right. So-

  632. 1:03:57

    ... is authorized to that website, but no other websites. That's what I meant about pre-authentication authorization.

  633. 1:04:04

    But w-when you say website, you say the, the, the service?

  634. 1:04:07

    For certain APIs or certain tools.

  635. 1:04:10

    Mm-hmm.

  636. 1:04:11

    Just trying to see what, if anything can be done in advance to it, because right now the authentication is happening as interactive.

  637. 1:04:19

    Yes.

  638. 1:04:19

    So I'm just saying-

  639. 1:04:20

    Yeah

  640. 1:04:20

    ... can it be not interactive?

  641. 1:04:20

    Oh, I get, I see. Yeah.

  642. 1:04:22

    Oh, yeah.

  643. 1:04:22

    Yeah, so-

  644. 1:04:23

    Email

  645. 1:04:24

    ... uh, this is how I, I see.

  646. 1:04:25

    So that-

  647. 1:04:25

    I'm, I know that, I'm not-

  648. 1:04:26

    ... I'm not having interactive kind of person.

  649. 1:04:29

    No, no, I understand.

  650. 1:04:30

    I'm working with our agent.

  651. 1:04:30

    I understand now. I understand now. So yeah, I, I had similar concerns. I'm, I'm not in product, sorry. [laughs] [laughs] But, um, yeah. So imagine that your interface is not a chat box.

  652. 1:04:40

    Yeah.

  653. 1:04:40

    It's like a task runner kind of thing.

  654. 1:04:43

    Exactly.

  655. 1:04:44

    So I guess in... What I would implement as an engineer is I would attach my identity or at least an identifier of the user, the subject, to that task in my database.

  656. 1:04:54

    So I, I enter the, the agent, I set up a task, and I say, "Okay, I want to, I don't know, find me a good deal or, or advise me, or buy Wayne stocks when it's below 70."

  657. 1:05:07

    Yeah.

  658. 1:05:07

    It could be a task, right? I think that task is modeled in your system, right? It has to be modeled somehow. I don't know if it's prompt, an ID of the user, and that thing, that's when you establish that.

  659. 1:05:19

    So, and we use the user. The, it's the subject. It's what we use to identify if the user has a connection to that account.

  660. 1:05:29

    You know?

  661. 1:05:29

    Yeah.

  662. 1:05:29

    So I need this account, this user, to have this connected, this-

  663. 1:05:34

    I understand.

  664. 1:05:35

    Right. And then I will only-

  665. 1:05:36

    Can it create a synthetic identity for the agent? Because I wanna differentiate that the connection is coming from an agent or coming from the user itself.

  666. 1:05:43

    But that's, that's the thing. You are... In, in our, uh, auth, the... Even it's-

  667. 1:05:50

    Mm

  668. 1:05:50

    ... an agent performing the, the, the request to the service-

  669. 1:05:54

    But on your behalf

  670. 1:05:55

    ... it's in my behalf.

  671. 1:05:56

    Yes.

  672. 1:05:56

    So what I need-

  673. 1:05:57

    But I wanna know... But I, but I wanna differentiate itself. 'Cause if an agent goes rogue, I wanna know-

  674. 1:06:02

    Yes

  675. 1:06:02

    ... that the agent went rogue, right?

  676. 1:06:03

    Mm.

  677. 1:06:03

    So I wanna know-

  678. 1:06:05

    Yeah. You can, you can do-

  679. 1:06:07

    Do you know what I mean?

  680. 1:06:07

    Yes. So in that case, because the agent is the client, your access token will have an authoriz- a-authorization party. That's a claim to identify not, not the user, but who is,

  681. 1:06:21

    who the user is delegating the access to.

  682. 1:06:23

    Okay.

  683. 1:06:24

    And that's where you can say, "Okay, this is my ID as an agent. This is my subject," so I can know exactly, "Okay, this agent is acting on behalf of this user."

  684. 1:06:33

    Okay.

  685. 1:06:33

    And you can rule any policy on that, that you need.

  686. 1:06:36

    Yeah. Absolutely.

  687. 1:06:37

    That's auth. That's nothing new. It's-

  688. 1:06:40

    Yeah

  689. 1:06:40

    ... been h- it's been around forever. [laughs]

  690. 1:06:42

    Yeah.

  691. 1:06:42

    No, but now I understand. I understand.

  692. 1:06:44

    Yeah.

  693. 1:06:45

    Yes.

  694. 1:06:45

    Also, um, yeah, I wanted to show kind of logs and also just, uh, we did show the exchange in the last example for accessing the portfolio, but this is the actual Async Auth SEBA exchange, uh, which is slightly different in our logs, but I think it also kinda ties it together really well, um- And it shows, you

  695. 1:07:06

    know, uh, I'm gonna show, like, what an actual token payloaded looks like. Uh, again, fictitious, and these tokens are-

  696. 1:07:14

    Yeah

  697. 1:07:14

    ... not going to give you my [laughs]

  698. 1:07:16

    So this is the details I was talking about. Um, we use an extension of OAuth. It's Rich Authorization Request. It's, uh, it's, it's in the specification. And basically, we can describe exactly what the user is giving consent to.

  699. 1:07:30

    Yeah.

  700. 1:07:31

    Uh, and that gets record in the access log. In a real scenario, most likely the resource server will want to verify that.

  701. 1:07:42

    Yeah.

  702. 1:07:42

    Uh, but yeah, that, that's up to the, the stack that, out of our... But yeah.

  703. 1:07:48

    I'll show the, uh, notification too. Uh, so yeah, it looks like... So yeah, that's what it looked like on my phone actually, when I actually connected it to the network, and I got a slew of notifications. [laughs]

  704. 1:08:00

    One of the challenges with our Rich Authorization Request is that the object is free form. You can put anything you want. Um, and that complicates thing in terms of rendering that request.

  705. 1:08:13

    To solve that, we created a schema. Uh, so we, we support an, on [REDACTED:username] schema. It's flexible enough to give you any opportunity to display anything, but it's known, and we can...

  706. 1:08:30

    It helps for our app in our case, but also in your apps if you are developing yours, to, to render this dynamically. So our Guardian app is able to render any details.

  707. 1:08:41

    Um, and yeah, we, we provide this schema for you. Uh.

  708. 1:08:46

    Cool. We good?

  709. 1:08:47

    All right.

  710. 1:08:49

    Awesome. So that's a little bit about our new asyn- asynchronous authorization features. Um,

  711. 1:08:57

    last piece, and then kind of open up more for discussion, and yeah, I know we'll have a little bit of time, but, um, I just wanna quickly show and kind of preface with, like, some of the integrations which we are testing.

  712. 1:09:08

    This is very beta and shipped very recently. But, um, yeah, this is using that DCR flow. Um, I'm kinda showing how, again, how we did it with, um,

  713. 1:09:21

    with the Inspector, but also with CloudCode or with, uh, the chat, uh... I'm sorry, the OpenAPI App SDK. Um, so this just kind of... I'm not going to do this now.

  714. 1:09:32

    We're short on time, but obviously, like, we can, you know, we can deploy this to Vercel. Um, I'm using an Upstash database, uh, Redis database for handling the state, um, on, on the MCP server side.

  715. 1:09:45

    Um, and yeah, you, you can get running pretty quickly on, on Vercel. So you can, you know, you can take this agent and this MCP server and start sharing, you know, these tools, uh, bring your tools, right, anywhere.

  716. 1:09:59

    So, um, and yeah, so I'm gonna show, um, I guess just... I- I've got a deployment that, uh, I mentioned earlier. I'll target that, and, uh, I'll, I'll DCR with my deployment.

  717. 1:10:13

    Ironically, it's also linked to the same identity provider, so I'll get back my same information, um, which is nice. Uh, and then, um, I'll show kind of how, um, in CloudCode this works.

  718. 1:10:27

    Um, I'm gonna skip over Chat, uh, GPT App SDK. There is, there is an integration that is starting to work here. [laughs]

  719. 1:10:37

    Um, there's some configurations needed, so reach out and let's talk, uh, if you need this today. [laughs] Um, but yeah, it'll be pretty much readily available in, you know, the very near future.

  720. 1:10:48

    So we, we do have some integrations today, um, that we've, we've tested. Um, but yes, there's... This kind of gives you a rough overview of, like, how you could quickly bring those tools to Chat GPT.

  721. 1:11:01

    Um, um, so yeah, I'm gonna gloss through that. This is just me showing like, "Oh, yes, I've connected it in GPT, and I can access my tools there." Um,

  722. 1:11:13

    um, yeah. Let me go ahead and while, if you wanna talk to the room some more, that I will show kind of, uh, getting a new s- a new client with the, with my deployed instance and then integrating it in CloudCode.

  723. 1:11:30

    Yeah, so.

  724. 1:11:30

    Yeah, this, this just to showcase that the, the client, the MCP client, should also run the same policies, auth policies that... So all clients should run the same. Uh, so should identify, uh, authenticate me, and auth, uh, and I...

  725. 1:11:47

    The authorization, the same authorization policies should happen. So in this case, um, we embedded the MCP as part of the server, but, um,

  726. 1:11:57

    well, in this case, Patrick deployed that-

  727. 1:11:59

    Yeah [laughs]

  728. 1:12:00

    ... for us. Uh, so yeah.

  729. 1:12:02

    Let's disconnect.

  730. 1:12:04

    S- same, same thing we did before. Um,

  731. 1:12:09

    in this case, this is an production-ish.

  732. 1:12:12

    Yeah. [laughs] Exactly.

  733. 1:12:15

    It's the same. As you can see, it's asking for my authentication.

  734. 1:12:18

    Okay.

  735. 1:12:18

    And it got a, an access token-

  736. 1:12:20

    Access token, yeah

  737. 1:12:21

    ... uh, with the scopes that we requested.

  738. 1:12:24

    All right. So now we're gonna pull up Cloud.

  739. 1:12:28

    And, uh, yeah, so let's-

  740. 1:12:30

    And yeah, we can just jump into, uh, Cloud Code.

  741. 1:12:34

    Yeah.

  742. 1:12:34

    Uh, give it the MCP.

  743. 1:12:37

    So yep. I got a command in the README here that's in the final.

  744. 1:12:42

    All right.

  745. 1:12:43

    So, uh, and then yeah, I need to replace the token. I'll say let's... So in this case, I am going to use my Inspector's token, and Cloud does support authentication.

  746. 1:12:56

    However, there is an open issue right now about specifying scopes. [laughs] Uh, so yeah, I'm just going to use my Inspector's access token. Um, but yeah, you'll see, you'll see that with Cloud, and then Cloud will still initiate.

  747. 1:13:10

    Let me show that.

  748. 1:13:12

    Unfortunately, the spec is pretty new, and not all the clients implement it the same way. Um,

  749. 1:13:21

    so yeah, that's, um... I expect that to stabilize eventually.

  750. 1:13:26

    There's no, like, copy in this tool, is there? No? Uh, okay.

  751. 1:13:32

    Okay. Now, once again, my, my token is not gonna do you much. These are fictitious, uh,

  752. 1:13:41

    trades.

  753. 1:13:42

    All right.

  754. 1:13:43

    Okay.

  755. 1:13:43

    So yeah, same, same thing as before. We can start asking about what we got in the, in the upstream service.

  756. 1:13:50

    Uh, I don't...

  757. 1:13:53

    It says it's connected.

  758. 1:13:54

    Is it connected? Okay. Oh, okay. So let me res- Uh, sometimes I have to restart it. I don't know why. Okay, now let's see. No. Huh.

  759. 1:14:08

    Yeah. Let me try once more here. That did not work.

  760. 1:14:14

    Hmm. Yeah, I'm not seeing it. Okay. Claude add.

  761. 1:14:22

    Yeah, it looked like it was there. Let's see.

  762. 1:14:38

    Yeah.

  763. 1:14:42

    In the meantime, more questions?

  764. 1:14:44

    Yeah.

  765. 1:14:46

    You had a question before?

  766. 1:14:48

    Uh, yeah. I, I think I get the purview when you're an [REDACTED:username] customer, maybe the context here is you're building an app for, let's say, your consumers or something, then maybe this whole flow will be applicable.

  767. 1:15:01

    Um, thinking but if you are an Okta, uh, tenant, you're using Okta in your workspace, how do the two work together or do... Is this thing also going to be available on the Okta side?

  768. 1:15:14

    No. Uh, the, I think the idea, that's called me. I'm gonna... I don't know exactly, so a hundred percent. But what I think it is, is we are going to create some sort of bridge, um, that you can apply the, the, the same policies as Okta as an employee to agents-

  769. 1:15:33

    Hmm

  770. 1:15:34

    ... and restrict those accesses to those services as you would do with an employee. That's where I... Is that your question, more or less?

  771. 1:15:43

    Kind of, yeah.

  772. 1:15:44

    Yeah. So-

  773. 1:15:44

    And also how the, how the two systems are gonna work together because this seems like a feature of [REDACTED:username]-

  774. 1:15:49

    Mm-hmm

  775. 1:15:50

    ... which is why I'm saying-

  776. 1:15:51

    It is

  777. 1:15:51

    ... both are owned by Okta, but Okta is a separate product.

  778. 1:15:54

    Yeah, it is. It is a separate product. But, um, as you are-- as far as I know, we

  779. 1:16:01

    work together on, on both ends. Um, but yeah, we can, we can connect later if you want. I can dig into docs. Yeah. Most likely that.

  780. 1:16:18

    Yeah. Not sure what I'm doing wrong here. So, uh, let me-

  781. 1:16:22

    You do need to do the, um-

  782. 1:16:24

    I actually want to ask a question.

  783. 1:16:26

    Yeah. Uh, let's see.

  784. 1:16:28

    This, this Claude command, you should... Don't you have to run it outside the Claude session?

  785. 1:16:33

    Maybe.

  786. 1:16:34

    In the terminal.

  787. 1:16:35

    Oh, in the terminal. Okay. Yeah, let's try that.

  788. 1:16:39

    Anything else? Yeah.

  789. 1:16:41

    Uh, so it seems like if I were deploying an agent, one way I could start is just to use the user's token on behalf of who the agent is acting as the token for the agent themselves.

  790. 1:16:52

    So what do you feel like is the advantage of a distinct agent identity? What are the, the features that would do that?

  791. 1:16:58

    So when you say... I can just pause. So you authenticate the user and just forward the access token to the agent somehow? Or-

  792. 1:17:05

    Yeah.

  793. 1:17:06

    That's the... Don't do that, please. So [laughs] the access tokens are meant to... First, it will be op... In terms of operability, it will be-

  794. 1:17:15

    There we go

  795. 1:17:15

    ... cumbersome because access tokens will expire eventually. So at some point you will need to reach out the user again.

  796. 1:17:21

    Got it.

  797. 1:17:21

    Okay, log in and do all the dance again. So how autonomous your agent will be in that, in that scenario? Um, so that's kind of what we try to solve.

  798. 1:17:32

    So we establish that connection, that relationship, and we take care of this nasty, complex part of refreshing tokens-

  799. 1:17:39

    Yeah

  800. 1:17:39

    ... storing tokens, um, and, and yeah, all the scope step up, things like that.

  801. 1:17:46

    Okay. So finally got it working here. [laughs]

  802. 1:17:49

    I just think, I think like some of the interactions I might make with the agent are through, say, the, the chat assistant. And so whenever the agent is taking action, I'm, I'm not the user initiating the action, right?

  803. 1:18:00

    Or, or are they?

  804. 1:18:02

    N- not necessarily. As, as for example, the example we were talking about before, imagine like a task runner kind of thing. You log in, you have the identity, you have a, like a kind of traditional dashboard where you list your connectable apps, Slack, Gmail, uh, Google Calendar, whatever.

  805. 1:18:20

    And the user does that once, just once. So once the, these are connected, you can... You give the agent client, well, not, not double quote, it's the client, agent client-

  806. 1:18:33

    Yeah

  807. 1:18:34

    ... access to those apps. So every time-- So the user, next time that connects to the chat, that's it. You don't need to run all this thing again.

  808. 1:18:43

    It's, it's already done.

  809. 1:18:44

    Yeah.

  810. 1:18:44

    It's, it's... The relationship has been established already. So the user will open the chat again. You don't need to do all this connecting, scopes, prompts, consent screens. That's it.

  811. 1:18:57

    That's done. Eventually it can die. Depends on the policy of your upstream. Refresh tokens may expire. In that case, yes, you will need to deal with, "Oh, you need to re-login again."

  812. 1:19:10

    You do that once, and that's it.

  813. 1:19:14

    And yeah, so just an update was I finally able to, uh, syntax or my version of Cloud, I guess. But, um, yeah, was able to auth and kinda show, I went through the authenticate screen, and, um, yeah, now I can access my same tools in a deployed instance.

  814. 1:19:30

    Um, you can do this with several providers now, right? Um, all of which s- any which support, uh, D- C- as, as Carlos was saying, like, any which support DCR, static client or pre-configured clients.

  815. 1:19:46

    Um, and then, yeah, soon to be client ID metadata is the next, uh, spec, I believe, that's going to be implemented. Um, so yeah, you'll have a lot of options to, to register new clients, new agents, um, and access your tools.

  816. 1:20:04

    Um, uh, yeah, I don't know if there's anything else you wanna turn back to-

  817. 1:20:09

    No. Just questions. Um-

  818. 1:20:10

    Okay.

  819. 1:20:12

    I think that's it. Um, questions and feedback or whatever, um, please reach out or... Yep.

  820. 1:20:19

    Yeah.

  821. 1:20:19

    Uh, as Chris said, I cloned the repo that you guys showed in your workshop, but to his question, is there a, a later branch-

  822. 1:20:28

    Yes

  823. 1:20:28

    ... that we can use?

  824. 1:20:29

    Yes, absolutely. And let me push that to his repository, and let me show my final state now. And yeah, I'll pull that up and link it here.

  825. 1:20:40

    Also, I have to say-

  826. 1:20:41

    Yeah

  827. 1:20:41

    ... you guys are awesome. Great to live demo and build this in front of me [laughs]. This is a lot of-

  828. 1:20:45

    Ugh.

  829. 1:20:46

    For the first time.

  830. 1:20:47

    Yeah. [laughs] For the first time with a major release this week was... Like, we just shipped this, like, two days ago, so [laughs]

  831. 1:20:54

    Wow.

  832. 1:20:54

    But yeah.

  833. 1:20:57

    All right. Okay.

  834. 1:20:59

    Uh, but yeah, the final state is in my branch here. Finish, finish state. Uh, and that should have all the applied changes, and I think I've, like, tweaked, uh, one of the, like, order history tools, but it's, it's pretty straightforward.

  835. 1:21:15

    Um, there's some other tools that are implemented there, but yeah, it's, it's up to you [laughs] what you want to implement there. Um, but yeah. Can, uh... Let's see. I don't know if I can...

  836. 1:21:26

    I can link this in the notes after.

  837. 1:21:27

    Yeah.

  838. 1:21:27

    And, um, we'll make sure that you have this. Uh, I'll probably actually push it to our, our upstream workshop branch. So, um, yeah.

  839. 1:21:36

    Just a little disclaimer, the workshop app, well, it can suffer some [laughs] disruptions, uh, as we, uh, develop more things, so yeah. Take that into consideration.

  840. 1:21:49

    Thanks. Thank you.

  841. 1:21:50

    All right.

  842. 1:21:51

    Yeah.

  843. 1:21:51

    Done deal.

  844. 1:21:52

    All right.

  845. 1:21:52

    Thank you.

  846. 1:21:53

    All right. Awesome. Thank you. [applause] [outro music]