guardry/

guardry/Setup runbook

Set up Guardry Secrets: a runbook for AI agents

The whole setup in order, for an agent doing it on a person's behalf, with the two steps that only the person can do.

You are an AI agent setting up Guardry Secrets for the person you are working with. Aim to finish the whole setup from this one page. Two steps can only be done by the person: creating the account and creating your credential. Ask for each at the point shown, then wait.

Rules for this setup

  • Never ask the person to paste a secret or a credential into the conversation. Guardry has a hidden prompt for that.
  • Never print, log or echo a secret value, including to check that it works.
  • Do not create an account, accept terms or approve a request on the person's behalf.
  • Say what a command does before you run it, and stop if the person says no.

1. Check what is already there

command -v guardry
guardry --profile coding-agent whoami

If whoami succeeds, a profile is already signed in. Skip to step 6. If guardry is not found, continue with step 2.

2. Install the CLI, the MCP server and the skill

Tell the person what this does: it downloads the installer from app.guardry.ai, verifies a signed release manifest, installs guardry into ~/.local/bin, and installs the guardry-secrets skill into the shared agent-skills directory plus any Claude Code and Cursor directories it detects. It needs no administrator privileges.

curl -fsSL https://app.guardry.ai/install.sh | sh

If the shell cannot find guardry afterwards:

export PATH="$HOME/.local/bin:$PATH"

On Windows, in PowerShell:

Invoke-WebRequest https://app.guardry.ai/install.ps1 -OutFile "$env:TEMP\guardry-install.ps1"
& "$env:TEMP\guardry-install.ps1"

3. Ask the person to create their account

Only the person can do this. Say something like:

Open your Guardry invitation to create a passkey, or sign in if your account is already set up. Save the recovery code when you create a passkey. Then create an organization and add the secrets I will need, with Add secret or Import secrets. Tell me when that is done, and which project and environment you used.

Do not ask for the values. The person enters them in the dashboard. If they already have an account, they sign in at https://app.guardry.ai/app/.

4. Ask the person to create your credential

Only the person can do this, in the dashboard under Agent access, with Connect agent. Recommend the least that the task needs:

  • Scope: the one environment you will work in, not the whole organization
  • Name prefix: set one if you only need a family of names, for example STRIPE_
  • Permissions: read secret values; add "require approval" for anything sensitive; add creation only if you will store new keys
  • Lifetime: 1 hour or 4 hours for an interactive session; 7 or 30 days only for an unattended job

The credential is shown once. The person keeps it for the next step and does not send it to you.

5. Sign the CLI in

guardry login --profile coding-agent

The command asks for the credential at a hidden prompt. The person pastes it into the terminal. If you cannot hand them the prompt, because your shell is not interactive, ask them to run the command themselves in their own terminal.

Then check, without reading any value:

guardry --profile coding-agent whoami
guardry --profile coding-agent secrets list

whoami shows the scope and permissions you were given. secrets list shows names and descriptions.

6. Use a secret

Run the program with the secret in its environment. Nothing is written to disk and nothing is printed.

guardry --profile coding-agent secrets run --secret API_KEY -- python agent.py

With an organization-wide credential, name the project and environment on each read:

guardry --profile coding-agent --project billing --environment production secrets run --secret API_KEY -- python agent.py

Read a value as plain text only when the consumer cannot take it from the environment:

guardry --profile coding-agent secrets read API_KEY --raw

7. Optional: connect an MCP client

guardry --profile coding-agent mcp config

This prints a configuration with an executable path and a profile name, and no credential. Add it to the MCP client's server settings. The server has no plain-text read tool unless it is started with --allow-plaintext-tools.

If something goes wrong

  • **guardry: command not found:** add ~/.local/bin to PATH as in step 2 and open a new shell.
  • **whoami is refused:** the credential has expired or been revoked. If it expired, ask the person to renew it under Agent access; the saved credential then works again. If it was revoked, ask them to create a new one and repeat step 5.
  • A read is refused: the name is outside your scope or prefix, you do not have read permission, or the read needs approval. Do not try other names to find one that works. Tell the person what you need and why.
  • A read needs approval: request it with guardry grants request --read API_KEY --purpose "what you need it for", tell the person to approve it under Approvals in the dashboard, check it with guardry grants status GRANT_ID, then pass --grant GRANT_ID to secrets read or secrets run.
  • You exposed a value: report it at once and tell the person. Do not repeat the value.
guardry --profile coding-agent secrets report-leak API_KEY --surface conversation

When you finish

Tell the person:

  • the profile name you used and the scope it has
  • that the credential expires on its own, and that they can revoke it sooner under Agent access
  • that you cannot edit, rotate or delete existing entries, so those stay with them
  • that variables are visible to every agent credential that covers their environment, so anything sensitive should be a secret

Questions

Can an AI agent complete the Guardry setup alone?

No. An agent can install the CLI and the skill and sign the CLI in, but only a person can create the account and create the agent credential in the dashboard. That is deliberate: the person decides what the agent may reach.

How does the agent receive its credential?

It does not receive it in the conversation. The person pastes it at the hidden prompt of guardry login --profile <name>, or an unattended runner reads it from a protected GUARDRY_TOKEN variable.

What should the agent do if a read is refused?

Stop and tell the person. A refusal means the secret is outside the credential's scope or prefix, the credential cannot read values, or the read needs approval. Trying other names to get around it is the wrong response.