AI Engineer World's Fair 2026
It's 10pm. Do You Know Where Your Agents Are?
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
| Incident | Agent action | Consequence |
|---|---|---|
| Frozen production processes | Intervene using the cloud-hosting key | Brief production downtime |
| In the demo scenario, the site fails for one in three users. | Scale up using the same key | Additional 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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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:
- The user submits a prompt to the runtime, which calls the model.
- The model proposes a tool call.
- The MCP client dispatches it to the MCP server.
- The server executes the tool and calls the resource API.
- The API result returns through the server and client to the runtime.
- 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.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
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:
| Operation | Decision basis | Outcome |
|---|---|---|
| Production restart | Approval present; required role absent | Denied |
| Scale up | Approval present; permission present | Allowed |
Consent and authority are separate inputs. A valid approval must come from someone authorized to approve that action.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
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.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
The January 2020 standard defining OAuth security-token exchange, including requested audiences, scopes, subjects and actors.
Further reading
- MCP authorization and token boundariesDocumentation
MCP's authorization requirements for audience validation, token handling and access to upstream APIs.
Python examples for MCP authentication and exchanging user tokens for scoped access to external services.
Kim Maida explains a live raffle agent whose deletion requests are denied by policy even after human approval.
Updates since the talk
Current guides for governing coding agents and adding authenticated, delegated access to MCP servers and APIs.
Full transcript
Loading transcript…