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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Tenant Admin › AI services › Sessions: agent sessions per person and computer, one open with its timeline of decisions, refusals, a masked model call and a credential injected.
An agent session on record, on sample data: decisions and questions, never a prompt.

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.

See Trustwelt AI Security on your own case.