Stop Giving Your AI Agents API Keys
Video by AI Engineer on YouTube. The summary below is ours, in plain English; we're not connected to the channel.
A hands-on workshop on giving AI agents their own identity and short-lived access instead of a shared password.
In plain English
Many teams give an AI agent (software that acts on its own) an API key, which works like a master password. The speakers point out three problems. The key does not say who is acting, the agent can use everything the key allows, and a person cannot approve every step.
Their fix is to give the agent its own identity and have it request a short-lived pass for each action, tied to the person it is working for. In the demo, an expense-approval agent can only approve small amounts on its own, cannot approve its own claims, and every action is recorded against both the agent and the person.
Three ideas worth keeping
- A shared key leaves no record of who did what, so the audit trail is empty.
- Access should be narrow and brief: one pass per action, limited to what that action needs.
- Long-running agents can crash mid-task, so a second tool saves their progress and keeps secrets out of the saved history.
What it means for your business
Ask who or what an AI tool is signed in as, and what it could do if it misbehaved. Prefer setups where you can see “this agent did this, for this person”. Keep limits, such as approval amounts, in the system and not just in the agent’s instructions.
What it means for software teams
Replace long-lived keys with per-call tokens issued by an identity service, and keep credentials in a vault, not on disk. Log the full chain of who acted for whom. For long-running agents, a durable execution tool such as Temporal can resume after a failure without repeating completed steps, but check that secrets stay out of its history.
What we found, and what we did
Our guide to building agents says an agent can only touch the tools and data you grant it, and that every action should be logged and replayable. Our zero-trust handover guide makes the same case for least-privilege, named access and secrets in a vault. We have not used the products shown in this workshop.
Worth watching
- 01:26: why API keys are a poor way to give agents access.
- 26:20: the demo where the agent files a $75 expense above its own limit.
- 47:47: a crash mid-task, and the agent resuming without redoing earlier steps.


