Agents and the Agent API
Give scripts, CI pipelines and AI agents the secrets they need from vaults shared with them, decrypted on their own machine.
- Base URL
https://passkey-x.com/api/agent- Credential
- Agent token (pxa1.<id>.<secret>)
- Rate limit
- One request per second per agent
How agents work
Create an agent in the Admin console for each script, CI pipeline or AI agent. It reads only the vaults you share with it. The Agent API returns ciphertext; the passkey-x agent command decrypts it on the agent’s own machine with the private key part of its token, which is never sent. Every read appears in the audit log.
The agent token is pxa1.<agent id>.<secret>.<private key>; only pxa1.<agent id>.<secret> is sent to the API. Stop the agent to end its access at once.
Set up an agent
- In the Admin console, open Agents and create an agent for the script or pipeline.
- Copy the one-time agent token and store it as a secret in your CI system.
- Share the vaults the agent needs with it, as you would with a person.
- Run the passkey-x agent command with the token. It downloads ciphertext and decrypts it on that machine only.
- Stop the agent to end its access at once. Every read appears in the audit log.
passkey-x agent
| Command | What it does |
|---|---|
passkey-x agent read <px://reference>... | Print values, one per line. |
passkey-x agent run --env NAME=px://ref ... -- <command> [args] | Run a command with secrets in its environment (values never reach the terminal or shell history). |
passkey-x agent vaults | List the vaults and item names shared with the agent. |
| Variable | Meaning |
|---|---|
PASSKEY_X_SERVER | Passkey-X server address, found through /.well-known/passkey-x.json (overrides "server set" for this run). |
PASSKEY_X_AGENT_TOKEN | The agent token from Admin › Sharing & onboarding › Agents (keep it secret). |
PASSKEY_X_AGENT_URL | Agent API base URL; overrides the server. |
Prefer run: values go to the child process only, never to the terminal or shell history. References are described in Command line; on a developer’s own computer, pkx does the same with the desktop app.
In CI
# GitHub Actions: PASSKEY_X_AGENT_TOKEN is a repository secret; the passkey-x CLI (apps/cli) is on the runner
- name: Deploy with secrets from Passkey-X
env:
PASSKEY_X_AGENT_TOKEN: ${{ secrets.PASSKEY_X_AGENT_TOKEN }}
run: |
passkey-x agent run \
--env DATABASE_URL=px://Production/Database/password \
--env STRIPE_KEY=px://Production/Stripe/password \
-- ./deploy.shAgent API
Errors: 401 the token is invalid or was replaced; 403 agent_inactive the agent was stopped, or the organization’s plan or kill switch doesn’t allow agents.
| Method | Path | What it does | Scope or credential |
|---|---|---|---|
| GET | /v1/vaults | Read shared vaults | Agent token |
curl -sS -X GET 'https://passkey-x.com/api/agent/v1/vaults' \
-H "Authorization: Bearer $PASSKEY_X_AGENT_TOKEN"Need help building on Passkey-X?
Questions about the API, a bug or a missing endpoint? Our team replies by email, usually within one business day.