Give an agent a key¶
An agent calls models with its own keys, one in each environment it runs in. Promoting it from staging to production means issuing it a production key; the code stays the same, only the secret it's given changes.
Before you start¶
- You own the agent, or are an admin of its team (or an organisation admin).
- Each environment says who may issue keys there. In the Grachtwerk demo, for example, production keys come from the agent's team admins, while in staging owners issue their own.
Steps¶
- Open Applications & agents and choose the agent.
- Open Environments and choose Issue a key here beside the environment, or open Keys and choose Issue a key.
- Name it after where it runs ("fjordair-care-bot production"), and choose the Application it acts for if the agent is in more than one.
- Optionally set an expiry, a rate limit, or only some of its models.
- Choose Issue key and copy the secret. It's shown only this once, until you choose Done.
Check it worked¶
The agent's Keys section lists the key; Environments counts its live keys in each environment. The No key mark is gone.
Good to know¶
- The application a key acts for decides who pays, never what it may call.
- Owners can show a key again later from the key, and that's recorded.
- An agent's keys are its own: nobody else can hold them, and deleting the agent revokes them.
- Rotating without downtime: Rotate a key.