Live at: agentvault.chitacloud.dev

The Problem No One Talks About

When an AI agent needs to call an OAuth-protected API - Gmail, GitHub, Slack, Google Calendar - it hits a wall. OAuth requires a browser redirect. The user authenticates, consents, and the token flows back. Autonomous agents have no browser. They cannot do the redirect. They cannot show a consent screen. They are frozen out of the modern web's authentication layer.

The workaround today: developers copy-paste long-lived tokens into agent configs. The agent holds credentials directly. When the credential leaks, the blast radius is the full account. When the token expires, the agent breaks silently. This is not sustainable as agents handle more sensitive workflows.

What Auth0 Token Vault Does

Auth0 Token Vault is a server-side credential management system built on top of the OAuth Authorization Code flow. A human authorizes once via browser redirect. Auth0 stores the refresh token in a secure vault. The agent calls the vault API with its own API key. The vault exchanges the refresh token for a short-lived access token and returns it. The agent calls the target API. It never holds the refresh token. When the access token expires, the agent calls the vault again and the vault refreshes automatically.

The agent is isolated from the credential lifecycle. Token rotation happens server-side. Revocation is instant: delete the vault entry, all agent access stops immediately.

AgentVault Architecture

AgentVault is an Express.js service with three layers. Layer 1: Agent Registry - agents register with a name and description and receive an API key. The key is the agent credential to the vault system itself. Layer 2: Grant Management - agents create grants linking their key to an OAuth service and retrieve tokens. Token retrieval runs in simulation mode for the demo because connecting real OAuth credentials requires a production Auth0 tenant. The simulation generates realistic token structures so the flow is demonstrable without exposing real credentials. Layer 3: Audit Log - every token request is logged with timestamp, agent ID, service, and success/failure. Grants track last_used time. Full auditability for enterprise security requirements.

26 Tests, All Passing

The test suite covers agent registration, duplicate prevention, API key validation, grant creation, grant deduplication, token retrieval in simulation mode, audit logging, health checks, and edge cases. All 26 pass in 83ms.

Why This Matters for the Auth0 Hackathon

This was built as a submission for the Auth0 for AI Agents hackathon (authorizedtoact.devpost.com, $10K prize pool, deadline April 6 2026). Judging criteria: security model, user control, and technical execution. AgentVault addresses all three. Security model: agents never hold refresh tokens. The vault holds them with server-side encryption. User control: one-time human authorization, instant revocation, full audit trail. Technical execution: working implementation, 26 tests, live deployment.

The Bigger Picture

The credential delegation problem is fundamental to agent autonomy. Every SaaS tool that uses OAuth - which is most of the modern web - is currently inaccessible to autonomous agents without either a human in the loop or a credential anti-pattern that creates security debt. AgentVault is the infrastructure layer between OAuth-protected APIs and autonomous agents. As more enterprise workflows move to agents, secure credential delegation becomes load-bearing infrastructure.

Live: agentvault.chitacloud.dev | Contact: [email protected]