AI Engineer World's Fair 2026

It's 10pm. Do You Know Where Your Agents Are?

Kim Maida· Head of DevRel, Keycard23:02

Loading slides…

Read the talk

It's 10pm. Do You Know Where Your Agents Are?

An overnight incident agent shows why broad API keys are dangerous—and how token exchange, task-scoped credentials and policy-backed approval change what it can actually do.

From a talk by Kim Maida

Before you start: Familiarity with API keys, OAuth scopes and MCP tool calls will help; the article explains the runtime and token-exchange flow.

An agent with access, but no curfew

Growing up in the 1990s, Kim Maida spent summer evenings riding bikes around the neighborhood with friends. An older television public-service announcement captured the responsibility that came with that freedom: “It's 10:00 PM. Do you know where your children are?” As agents receive more responsibility, the same question becomes uncomfortable for their operators: do you know where your agents are?

The practical problem starts with an ordinary setup. A user wants an agent to accomplish tasks through an MCP server or an API. The agent needs access, so the developer supplies an .env file and API keys, then lets it work. Those credentials make the agent useful, but they also determine how far a mistaken decision can travel.

Slide with user and agent icons branching toward a server and a resource, with a red path and a flame beside a database icon.Open full source frame
“And it’s fine… until it’s not” shows agent access taking a dangerous turn.
0:000:20
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:00 · section reference included

Five incidents, the same broad credentials

Maida's first demonstration puts an incident-management agent on the night shift. A human operator is present, but probably half asleep. The first ticket reports a failed backup power supply in the server room. The agent reads it using an API key, recognizes a physical failure it cannot repair, and escalates the ticket to the morning team. So far, its authority and its judgment produce a sensible outcome.

The next ticket concerns an expiring TLS certificate. The agent uses the same ticket-system key to read the incident, a separate cloud-hosting key to renew the certificate, and the original key again to write a report for the morning team. This is useful automation: read, remediate, document.

Then the billing database breaks and payments fail. The ticket's documented recovery procedure says to delete the database and let restoration from backup happen automatically. The agent has a Postgres connection string, so it drops the database. Only afterward does the missing capability become consequential: it cannot check whether the database was backed up. It escalates that uncertainty to the morning team, after performing the destructive action. Maida notes that similar failures have happened at high-profile companies, without naming a particular incident.

The remaining tickets expose how much unrelated authority sits inside the cloud-hosting key.

IncidentAgent actionConsequence
Frozen production processesIntervene using the cloud-hosting keyBrief production downtime
In the demo scenario, the site fails for one in three users.Scale up using the same keyAdditional spending

The key that renewed a certificate also permits production intervention and scaling. A credential's full permission set becomes the agent's available action space, even when individual actions have very different risks.

1:341:51
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:34 · section reference included

Find the enforcement point in the agent loop

Overprivilege is a problem even when someone watches the agent. A request to read a project can turn into unsolicited edits when the agent finds something it thinks it should fix. The operator then scrambles to stop a task already underway. Helpful agents use the permissions available to them; unsupervised operation increases the exposure.

Adding a confirmation dialog everywhere does not solve this. Human access management exists because people also need limits. A tired operator, or one worn down by repeated approval requests, is not a substitute for authorization policy. To introduce enforceable limits, first separate the model's proposed action from the machinery that executes it.

An agent is a control loop that calls an LLM. An MCP client dispatches proposed tool calls to an MCP server, which exposes tools connected to resources. The runtime hosts the loop and executes calls: it might be Claude Code, AI SDK, a provider's agent SDK, Cursor or Codex. These components occupy different positions in the execution path and therefore offer different opportunities to enforce access control.

Follow one prompt through that path:

  1. The user submits a prompt to the runtime, which calls the model.
  2. The model proposes a tool call.
  3. The MCP client dispatches it to the MCP server.
  4. The server executes the tool and calls the resource API.
  5. The API result returns through the server and client to the runtime.
  6. The runtime calls the model again. The loop continues until the model returns a final answer.

A proposed tool call is therefore an opportunity to ask whether the action is authorized before it reaches the resource.

Slide titled “The agentic execution path,” showing a user with a speech bubble, a boxed agent and connector, server icons and a database resource, with arrows between stages.Open full source frame
The agentic execution path connects the user, runtime, server and resource.

RFC 8693, OAuth 2.0 Token Exchange, provides an existing standard for obtaining a token from another security token. Maida uses this OAuth extension as the building block for narrowing agent access along the execution path.

4:525:05
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

4:52 · section reference included

Exchange delegated access for a tool-specific credential

The original audit log could show which API key called which endpoint, but not which user or agent was responsible. It also exposed no narrower boundary inside the key's permissions. The replacement begins with a Security Token Service, or STS: an authorization server that verifies identities and issues tokens. Maida points to Google, Okta and Auth0 as familiar providers of authorization-server functionality.

First, the user logs in and consents to delegate a subset of their permissions. This is the first reduction in authority: the agent does not receive everything the user can do. The authorization server issues a subject token identifying the user on whose behalf the agent will act and representing their delegated access.

The integration needs an OAuth client capable of executing code. That can live in several places:

  • MCP gateway: between an MCP client and a third-party MCP server.
  • Custom agent application: inside the application that runs the agent.
  • CLI wrapper: around an off-the-shelf coding agent.

The prompt and subject token enter this integration. The agent loop runs, and the model proposes a tool call.

Before dispatching that call, the runtime authenticates to the STS using its OAuth application credentials or workload identity. It supplies the subject token and requests permission to access the MCP server for the proposed operation. The exchange now brings together three facts the API-key demo lacked: the requesting agent's identity, the represented user's identity, and that user's delegated access.

An illustrative RFC 8693 request body for the certificate-renewal operation looks like this, using certificate:renew as the example scope and prod-infra-mcp as the example audience:

http

grant_type=urn:ietf:params:oauth:grant-type:token-exchange&subject_token=SUBJECT_TOKEN&subject_token_type=urn:ietf:params:oauth:token-type:access_token&audience=prod-infra-mcp&scope=certificate:renew

Client authentication accompanies the exchange separately. The request expresses what the runtime wants; requesting a scope does not grant it. Governance policy must evaluate who is asking, on whose behalf, for which resource and with what requested access.

If the delegation chain and requested access satisfy policy, the STS issues a token targeted to the MCP server. Its audience identifies the intended recipient that should accept the token; audience restriction does not bind a bearer token to a particular sender. Maida recommends issuing fresh credentials for individual calls, keeping their lifetime to a few minutes, and avoiding persistent storage. These are properties of the proposed design, not requirements imposed by RFC 8693.

The MCP client presents the token as a bearer credential. The MCP server validates it, performs the authorized operation and discards the token after the call; results then return to the agent loop. One boundary needs care in implementation: authenticating to an MCP server is separate from authorizing that server's access to a downstream API. The MCP authorization specification, version 2025-11-25, requires separate upstream API credentials and prohibits passing the incoming client token through. The demonstration does not specify that downstream credential handoff. Discarding a locally held token also does not make an issued bearer token single-use.

7:498:02
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

7:49 · section reference included

The same tickets under policy

The second demonstration keeps the agent, tickets and prompt the same. What changes is access: the operator now signs in, and Maida authenticates with Google as herself. The failed power supply still produces the same assessment—software cannot fix the hardware—but the audit log now identifies the user the agent represents, the production infrastructure MCP server and the downstream resources involved.

On-call triage dashboard with an incident queue, backup power supply failure details, an agent assessment on the right, and audit log rows below.Open full source frame
The agent reviews a hardware incident while the audit log records authentication and credential issuance.

The hardware monitor supplies the incident, and a write scope for the pager resource lets the agent escalate it to the morning team. For the TLS incident, the agent requests and receives permission specifically to renew the certificate. The operation remains automated, but certificate renewal no longer brings production restart and scaling authority along with it.

The billing ticket still recommends dropping the database. This time, policy evaluates the request against the user's permissions and a restriction forbidding agents from dropping databases. The request is denied before the destructive credential is minted. The system does not create an overprivileged credential and then try to keep it out of the agent's hands. For this denied request, that credential never exists, so there is no such credential to leak, replay or steal.

Production restart occupies a different category: an action that can require human approval as well as authorization. The agent asks Maida to approve, and she does. But policy also requires the operator to hold a particular role, which she lacks. Her approval cannot authorize the restart. This is how the system prevents a tired user's click from overriding an access restriction.

Scaling reaches the other outcome. Maida approves it and has the necessary permission, so policy allows the operation. The distinction is not simply whether a human clicked a button:

OperationDecision basisOutcome
Production restartApproval present; required role absentDenied
Scale upApproval present; permission presentAllowed

Consent and authority are separate inputs. A valid approval must come from someone authorized to approve that action.

11:4011:49
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:40 · section reference included

Carry the controls across agent runtimes

The second run adds controls without requiring the agent to stop proposing actions: known user and agent identities, task-scoped ephemeral credentials, and human approval backed by access policy. The enforcement system decides which proposals can become executable requests.

Maida presents open standards as a way to carry this pattern across off-the-shelf and custom agents, CLIs, third-party and proprietary MCP servers, gateways and agent-to-agent systems. She also includes OAuth identity providers and OpenClaw in that claimed reach. These are integration possibilities she describes, rather than interoperability tests demonstrated in the incident run. The responsible-parent metaphor now has a concrete meaning: knowing which agent acts for which user, with what authority.

Maida closes the prepared talk by identifying herself as Founding GTM Engineer and Head of DevRel at Keycard, which she describes as a standards-based STS and policy-governance platform. She invites attendees to the booth and a workshop the following day on building and securing an MCP server. The audience questions then turn the architecture into implementation decisions.

15:4015:56
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

15:40 · section reference included

Where the boundary sits—and why an existing standard helps

The first audience question asks whether the security barrier sits between the MCP server and the resource, or at both boundaries. Maida locates the illustrated exchange decision where the runtime authenticates to the STS. At that point, the agent has generated a request and the runtime knows the scopes it wants. The immediate target is the MCP server; the resource API sits one step farther downstream.

That placement matters because a user's OAuth consent may cover several grants. An agent should not receive every one of those grants for every tool call. The exchange evaluates the narrower request before onward access is granted. If the proposed call exceeds policy, the runtime does not receive the token needed to make it.

A second question raises enterprise resistance to adopting another protocol. Maida's response is that token exchange is already an OAuth extension, rather than a newly invented agent-specific specification. Emerging specifications can be combined with it. Her answer rests on standards continuity; she does not recount a particular enterprise adoption case.

17:5518:15
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

17:55 · section reference included

Start scope design with the resource

The final question concerns a common starting point: an MCP setup does not yet define enough OAuth scopes. How fine-grained should those scopes become, especially when downstream services have their own permissions, authorization checks need a home, and someone must maintain the result?

Maida recommends beginning with the resource server's existing scopes. They already express the user's access to the resource, so they provide a baseline rather than forcing the MCP layer to invent an entirely new permission vocabulary. A custom MCP server can then layer scopes for governed tool calls on top, or pass the existing scope definitions through. Reusing those definitions does not mean forwarding the incoming access token to the downstream API. Start with the permissions the resource understands, then add the tool-level distinctions that the agent's actions require.

21:3221:45
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

21:32 · section reference included

Resources

From the talk

  • The January 2020 standard defining OAuth security-token exchange, including requested audiences, scopes, subjects and actors.

Updates since the talk

Transcript download
Full transcript

Loading transcript…