Use case
Let engineers use Claude Code and Codex without handing them a key
An engineer starts an AI agent in a repository. The agent runs as them: it can read the SSH key, the AWS credentials file and the .env, run any command, and send whatever it read to a model. Blocking the agent sends the work to a laptop nobody manages.
Why it is hard
What goes wrong today.
The agent's prompt is the widest channel out of a computer: the code it read, the file it opened, the output of the command it ran, all of it goes to the model.
Keys for agents end up in files: an API key in .env, a token in an MCP server's settings, an SSH key without a passphrase. Every agent, and every program, can read them.
A destructive command looks like any other to the agent: a force-push, a dropped table, a deleted folder, with no one asked.
The policy
What a policy says, whatever tool you use.
- Name the agents people may use, and what happens to the ones you do not know.
- Decide per kind of call: reads, writes, commands, destructive and exfiltrating steps; ask a person before the last two.
- Keep keys out of files and out of the agent: the vault signs or puts the key in for the call.
- Allow only your model providers and models; check prompts for the same data you keep out of a paste.
- Keep each session on record without its prompts or arguments.
Trustwelt AI Security
How Trustwelt does it.
See what is there
Each managed computer reports its agents, the MCP servers their settings name, and how many secrets of each kind lie in files; the person sees each finding in their Portal with the step that removes it.
Publish the agent rules
Allowed agents, the action per risk tier, rules on tools and commands, folders no agent reads, providers and models, workspaces and network; test against a sample call, then publish with versions and rollback.
Move the keys into the vault
API keys, model keys, cloud roles and SSH keys become vault items with an agent-use rule. The gateway puts the key into the call on the computer; the agent never receives it.
Let the agent work
Started through Trustwelt, the agent runs confined to its workspace and connects through the gateway; a question from a rule appears in Trustwelt Desktop; the session, its decisions, model calls and cost show in Tenant Admin and in the person's Portal.

Where it runs
Trustwelt AI Security runs on these computers.
Managed computers with Trustwelt Desktop and its browser extension: the Chromium family and Firefox on Linux, Firefox on Windows; the AI agent gateway on managed Linux computers; other programs through the network filter, sites only.
Read next
The modules behind it.
- Trustwelt AI Security
Agent gateway
About Agent gateway about Agent gatewayEach tool call of Claude Code, Codex, Copilot, Cursor and Gemini CLI decided on the computer: allow, ask or refuse.
- Trustwelt AI Security
Model gateway and keys
About Model gateway and keys about Model gateway and keysModel calls through a gateway on the computer: your providers, one data gate, keys the agent never sees.
- Trustwelt AI Security
Workspaces and network
About Workspaces and network about Workspaces and networkA confined agent writes one folder, reads the toolchains and connects only through Trustwelt.
- Trustwelt AI Security
AI agents on the computers
About AI agents on the computers about AI agents on the computersWhich agents and MCP servers each computer holds, and which keys lie in files they can read.