Skip to content
Architecture

Credential Mediation

Updated Oct 20261 min read
Definition

Credential mediation is an architectural pattern in which AI agents never see or hold real authentication tokens. A gateway or proxy holds each credential in encrypted form and injects it into the outbound request at the moment of execution. The agent receives the result of the call and never the credential itself.

Why It Matters

AI agents are vulnerable to prompt injection: adversarial inputs that manipulate the agent into performing unintended actions. If an agent holds real credentials, a successful prompt injection can exfiltrate those credentials to an attacker.

Credential mediation eliminates this attack surface. Because the agent never possesses real tokens, a compromised agent context cannot leak credentials. The gateway holds the credential in encrypted form, decrypts it server side at the moment of the call and injects it into the outbound request. The credential never travels back to the agent.

This is the structural mitigation for credential theft in agent architectures. It does not depend on the agent platform's security, the downstream app's protections or the user's vigilance. The credential simply never exists in a context the agent can access.