Letting an AI agent near production
3 min read
Agents are good at the questions support and ops spend their day on: "which customers on the old plan had a failed payment this week?", "did the 2pm deploy cause these errors?". The obvious way to let one answer them is to give it your Stripe key, your database URL and your hosting token. This post is about why that's a bad trade, and what Baseboard does instead.
What goes wrong when an agent holds the keys
A key in an agent's context is a key in its transcript, its logs and anything it writes to disk. It can be pasted into a tool call you didn't expect. And a Stripe secret key doesn't know the difference between "list failed payments" and "refund everything".
The usual fix is a restricted key per provider. That helps, but now you're managing scopes in five dashboards, none of which know who on your team the agent is working for.
Scoped tokens, one place
In Baseboard an agent gets a single access token, made on the Agents & CLI page. The token says what it can do:
- Read sees projects, connections and data.
- Change runs tools that change data, such as refunds, bans and rollbacks.
- Set up creates projects and connects providers.
Or skip scopes and pick single tools by name. Either way you can keep a token to the projects it
needs. Tokens start with bb_, are shown once and are stored only as a hash.
A token also can't do more than the person who made it. If you're not allowed to issue refunds, neither is your agent, whatever scope you gave it. See Permissions.
The agent never sees a key
Agents can connect a new provider without seeing its key. For providers with a one-click sign-in, the agent gets a link for you to open. For the rest it gets a CLI command for you to run in your own terminal, where the key is read at a hidden prompt. The CLI refuses to run without a terminal, so an agent can't feed it a key either.
Every call is written down
Every call an agent makes goes through the same broker as the dashboard, so it lands in the same audit log, under the token that made it. When someone asks why a subscription was cancelled at 3am, the answer is one filter away.
Trying it
Make a read-only token first. Point Claude Code or any MCP client at /mcp on your Baseboard with
the token as a bearer header, and ask it something you'd normally answer with three dashboards.
The full setup is in Agents and the CLI.