Keychains.dev — Secure credential delegation for AI agents

Give your agent API access. Without giving away your keys.

One command. Your agent can call any API. Your users approve each permission. Credentials never leave the server.

Install Keychains

Install the CLI globally, or use npx to run it directly.

npm i -g keychains

Call any API

Just prefix curl with keychains. The only change vs. a classic curl call: replace hard-coded credentials with template variables.

Example CLI SDK

keychains curl https://api.github.com/user/repos \
  -H "Authorization: Bearer {{GITHUB_TOKEN}}"

> 200 OK — 42 repositories

How the permission flow works

With wildcard tokens, permissions are approved on the fly. Here's what happens the first time your agent needs a new scope:

  1. Your agent calls an API

    keychains curl https://api.github.com/user/repos
    

    403

  2. First call? Keychains asks for permission:

  3. Your user approves — one click:

    • Permission Request
    • my-agent wants access to:
      • github::repo
      • Read & write repositories
      • Deny / Approve
  4. Same call again — it just works:

    keychains curl https://api.github.com/user/repos
    

    200 OK — 42 repositories

  5. New scope needed:

    • User approves
    • Access granted

Go further

Now that you have the basics, explore what else Keychains can do.