Secrets and keys
Covers: the Keys page, the keys poema's gateway adds to your instances' calls, and the CLI commands that save them.
For: Admins who give agents access to models and services without handing them a key.
Your agents call models and services with your keys, but never hold them. You save a key once on the Keys page, and poema's gateway adds it to the requests bound for the one service it belongs to, on the way out.
How a key reaches a service
You save a key once and attach it to the instances that may use it, on each instance's page. Two kinds need no attaching: a model key, which reaches an instance through the Model it names, and the GitHub token, which every instance clones with unless it is given a GitHub key of its own.
Swipe sideways to see all of it.
The path of a key: saved on the Keys page, attached to an instance, kept encrypted, and added by the gateway to that instance's calls to its service. The instance sends no key and sees none.
Keys are saved encrypted and are write-only: you can replace or remove a key, but never read it back. Only an Admin adds, replaces or removes keys.
Kinds of keys
The dashboard's Keys page lists the keys your instances use, and what uses each:
- Model providers: a key for Anthropic, OpenAI or Google. Choose Add key on the provider's row; the key is sent to the provider's own host only. Saving it makes the Models your instances name, one for the provider and one for each of its models (Concepts). Only the providers' own APIs are supported: a custom endpoint, or a Model that points at another base URL, is not.
- Services and hosts: a key for a service your agents call, such as GitHub, or for any host. For a host you choose how the gateway sends the key: as a bearer token, as the password of basic authentication with a username you give, or in a header of your own. A key is 1 to 4096 printable characters on one line. The GitHub token works for git over HTTPS and the GitHub API. On GitHub's row, Add key takes a fine-grained token (for cloning), an SSH key, a token for GitHub's MCP server, your GitHub App's private key and installation ID, or, where poema has a GitHub sign-in app, Sign in with GitHub. Some services take a sign-in instead of a key: Add key offers Sign in, and poema keeps and renews the sign-in. An AWS key is an access key pair that poema signs requests with, for up to 8 AWS hosts.
- SSH keys: for git or ssh to your servers. An instance given one holds a stand-in, and poema signs with the real key on the way.
A service of your own (its hosts and how to get its token) is described in Add key: type its host as a new host and
answer Short-lived token. Add key then lists it under Your organization's services, to add keys to it, edit it or remove
it; Services and hosts lists only keys. The CLI's poema service does the same.
Add a key
- On Keys, choose Add key: its first screen lists poema's services and has a field for a new host.
- Pick a service, or type a host, and fill the form that follows.
A key for a host your instances may not reach yet is saved and waits, unused, until you allow the host on
Network (Network rules). GitHub's API, api.github.com, is such a host: a GitHub
App key, or a token for the GitHub API, needs it on Network, where it counts as one of your own hosts. Cloning from
github.com needs nothing more. A model key is checked with its provider when you save
it, and the save is refused if the provider calls it invalid; other keys are saved as they are, not checked.
Attach a key to an instance
A key reaches an instance only once you attach it to that instance, on the instance's page; saving alone does not attach it. Then it is added whatever methods the rule allows (Network rules).
A key attached to a running instance reaches its agent's commands from the next one it runs, and an open interactive shell at its next prompt. A program that is already running sees it only when it reads its environment again.
From the CLI
Give a value from a file or from stdin, never typed on the command line, so it stays out of your shell's history:
poema credential add -f github-key.yaml value=@github-token.txt
poema credential list
poema credential replace CREDENTIAL_ID value=@github-token.txt
poema credential remove CREDENTIAL_ID
For a key sent as basic authentication, add username=@user.txt. github-key.yaml says what the key is:
kind: static_key
label: GitHub key
service: github-token
poema credential add prints the key's id. poema secret set NAME KEY=@FILE saves a Secret that a Model names with
secretKey, and poema secret list shows their names and keys, never their values (CLI).
Last checked: unreleased checkout.
