Urgent.News

What's breaking now, across thousands of outlets.

Tech

[Sponsor] WorkOS: How to Give an Agent a Task Instead of a Token

Give an agent an access token and it spreads: into the context window, into tool call logs, into notes it keeps between steps. Each copy works from anywhere, long after the fact. Relay keeps the credential at WorkOS. Your agent names the user, WorkOS attaches that token, refreshes it, and releases it only to allowlisted hosts. A hijacked agent session is a live process you can kill. Learn how it…

WorkOS offers a solution to securely give agents tasks instead of tokens. Traditionally, developers build integrations by attaching an access token to outbound requests to act on behalf of users. However, with agents, this approach becomes problematic as the agent reads instructions from third-party sources, blurring the line between trusted code and untrusted input. This erases the boundary between the agent and the system prompt, potentially leading to security vulnerabilities.

The solution proposed by WorkOS is Relay, an early access feature. Instead of shipping long-lived OAuth tokens to agents, Relay allows agents to describe the call they want to make on behalf of a user. The agent sends the request to WorkOS, providing the provider and user details, and WorkOS handles attaching the credential securely.

WorkOS verifies the API key, fetches the credential from its credential store, refreshes it if expired, and injects the provider token into the request. The provider response is then streamed back untouched. This approach isolates the token, making it harder for agents to access and misuse. It also provides honest error semantics, allowing users to obtain an authorization URL when their token is revoked or the provider is unavailable.

Written by urgent.news from Daring Fireball's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at workos.com →

More in Tech

How to Install an MCP Server from the Official Registry

SAFi comes already packaged to handle MCP tool installation, including its own registry search, which looks for MCP servers published at the official MCP registry…

  • SAFi must be installed and virtual environment activated
  • Search registry for package name and version
  • Install server using scripts/safimcp.py add [package name]

More from Tuesday 1 September →