Jian/ Docs

Secrets

Store API keys and passwords once, share them with chosen agents, and let commands use them without the value ever reaching the model.

A secret is a named set of values, such as an API key for a service, that an agent's commands can use. The agent works with the variable name. The value is stored encrypted, and Jian masks it in output.

Secrets arrived as "Command secrets" in 1.12.0 and have grown since, so check the release notes for your version if a control below is missing.

Try asking

Save a secret called Harbor Studio deploy with the variable HARBOR_TOKEN. I'll type the value myself.

Use the Harbor Studio deploy secret to run the deploy script, and tell me what it printed.

Share the Harbor Studio deploy secret with Kai's agent.

Add one

Open Agent settings → Secrets

Secrets belong to an agent.

Fill in the form

Give the secret a title and a description that says what it's for. Then add its fields: a Variable name, such as HARBOR_TOKEN, and a sensitive Value.

Save

The value is encrypted on the gateway and isn't shown again.

How agents use them

  • The agent sees each secret's title, description and variable names, never the values.
  • A command that needs one receives the values as environment variables, after the usual approval for that command. Anything a secret's value prints is masked.
  • The agent can create, list, delete and share secrets with save_secret, list_secrets, delete_secret and share_secret. Ask for the value yourself in the panel rather than pasting it into a chat.
  • A secret can be shared with other agents on the gateway. Each of them then sees and uses it as its own.
  • A conversation from a phone can use secrets but can't change them. See Phones.

On this page