Agents

An agent is an identity of its own. It reads and proposes, a person decides, and no role can change that.

An agent is an AI worker with an identity in your organization: a runtime (Claude Code, Codex, Hermes, OpenClaw, Grok bot or Custom), a placement (local or cloud), an owning team, the roles it holds, how much it may do on its own and how fast it may call. Agents use your own model key, so Wardn never bills for them.

What an agent can never do

An agent proposes and a person decides. These limits are built into the permission check, not into the roles an agent is given:

  • It can never approve anything (a release, a restore, an app, a remediation, a sign-off).
  • It can never bypass a guardrail or a restore preflight.
  • It can never edit a guardrail, an exception or a freeze, or the rules that auto-approve proposals.
  • It can never merge.
  • It can never read a secret's value. Secrets reach an agent only as references that Wardn resolves.
  • It can never change who may do what: organization settings, teams, roles, other agents or API tokens.

You can still give an agent a role that names these permissions, for example one that holds everything. They have no effect, and the agent's page lists them as locked on that role so nobody assumes otherwise. The permission matrix in the test suite gives an agent every role at once and fails if any locked permission is allowed.

An agent holds only the roles given to it. It does not take the roles of its owning team.

Autonomy

Each agent has a most-allowed level, and each pipeline stage can set a lower one:

LevelMeaning
RecommendReads and advises. Changes nothing.
Act with approvalProposes changes that a person approves before Wardn makes them.
AutonomousProposes changes that Wardn makes without waiting when an auto-approve rule matches. Locked kinds never match.

A stage with no setting takes the agent's most, and a stage can never allow more than that. An agent that is paused is Recommend everywhere. An agent working across several deployments gets the lowest level among the stages they reach.

Rate limits

Every agent has a calls-per-minute rate and a burst. The count is one shared bucket in Postgres, so the limit holds however many replicas answer. If the bucket cannot be reached, the call is refused rather than let through.

Credentials are references

An agent has three credentials: its model key, its Wardn service credential, and a read-only git token. Each is the name of a secret in the secret store, such as agents/qa/model-key. The API, logs, audit and events carry the name only, and a value pasted by mistake is refused.

Rotation

Set rotateEveryDays (1 to 365) on a credential to have it replaced on a schedule. Wardn's own service credential is replaced by Wardn: it makes a new value and puts it in the secret store under the same name, so an agent that resolves it when it starts gets the new one. The model key and the read-only git token are yours, so Wardn cannot make a new one. It looks at the secret's fingerprint instead: when you have changed the secret it records the rotation, and when you have not it marks the credential overdue, tells you once through an event, and looks again the next day. A fingerprint identifies a value without revealing it, and is never shown.

A credential's value is read in exactly one place, the launch of an agent's sandbox, and arrives in a type that prints as [redacted]. A test runs an agent, sets, rotates and reads back all three credentials with a debug logger, and searches every log line, tool output, API answer, audit entry and event for each value, old and new, and finds none.

Agent settings

Each agent keeps its own configuration, in the format its software reads: settings.json for Claude Code, config.toml for Codex, config.yaml for Hermes and openclaw.json for OpenClaw. A Custom agent lists the files its image expects and where they go in the sandbox. Grok bot is run by its vendor and has none. Wardn has no model layer of its own: use any provider and model the software supports, and set it the way the software documents.

Wardn only packages what you write:

  • It adds its own pieces when the agent starts. Its MCP server (named wardn, which your file may not use) and the job's token are merged into the file at launch. What you saved is never changed.
  • Secrets stay in the secret store. Write ${OPENROUTER_API_KEY} in the file and list OPENROUTER_API_KEY under Credentials with the name of the secret that holds it. The agent only ever holds a placeholder in that variable; Wardn attaches the real value to requests for the model host, outside the sandbox. A file that holds what looks like a key is refused.
  • Only the model hosts you name are opened. Wardn reads the addresses and providers from the file, and you can add a host it cannot see. A credential is sent to one host: the one its table in the file names, the provider its variable is for, or the host you give it.
  • Private model hosts are off until you allow them. A model on a private address (10.0.0.5, 192.168.1.20) or an internal name (ollama, ollama.models.svc.cluster.local, models.corp.internal) is refused when you save. Turn on Private model hosts for the agent, with the switch in its settings, to allow them: it is recorded in Activity with who did it. Turning it on opens nothing else. The agent still reaches only the hosts its configuration names, through Wardn. The cloud metadata addresses and names, link-local addresses, loopback, the Kubernetes API and Wardn's own control plane are refused whatever the switch says.
  • An agent without settings still runs. Claude Code uses Anthropic and Codex uses OpenAI, with the model key kept on the agent. Hermes and OpenClaw have no default and need their settings first.

Each save is a new version, checked first: the file must parse (the error says which line), name no secret's value, and the credentials and hosts must be valid. A change applies to the next job. In the API this is GET and PUT /agents/{agentId}/harness-settings, and POST .../check runs the checks without saving. Reading needs agent:read and changing needs agent:manage, which includes the private model hosts switch (allowPrivateHosts).

Activity and track record

Every tool call an agent makes is recorded as done, proposed, declined or failed, with the tool, the error code and the job, and never the arguments or the result. Declined means Wardn refused the call: the agent's roles, its autonomy at that stage, or a read-only job. The decisions people make about what an agent proposed or recommended are recorded beside them as approved, overruled, taken or ignored.

GET /agents/{agentId}/activity lists the rows, newest first, and can be narrowed to one outcome. GET /agents/{agentId}/track-record?days=90 counts them: calls and how each ended, what people approved and overruled, and how many recommendations were taken, so taken over decided is the share people followed. The record is counted from the stored rows and nothing else, and a test holds the numbers to exactly what was done. Both take the right to see the agent.

Pausing everyone

PUT /agent-kill-switch with {"paused": true, "reason": "…"} pauses every agent of the organization at once. It takes agent:manage across the organization (Owner and Admin). While it is on, no agent holds a role and none gets through the MCP endpoint, so nothing new starts. Every API process hears the change over pub/sub and forgets what it remembered, so the other replicas refuse within milliseconds, not after the cache window, and the test suite holds that to three seconds. A job that is running stops at its next call, and the agents.all_paused event tells the job runner to end the rest. {"paused": false} resumes everyone except agents that were paused on their own. GET /agent-kill-switch says whether it is on, who turned it on and why.

Pausing one agent

POST /agents/{agentId}/pause takes the agent's roles away: every call it makes is refused once the permission caches forget, within seconds in every replica. Resuming gives it the roles it had.

In the API

OperationNeeds
GET /agents, GET /agents/{agentId}agent:read on the owning team
POST /agents, PUT /agents/{agentId}agent:manage on the owning team
POST /agents/{agentId}/pause, …/resumeagent:manage
PUT and DELETE /agents/{agentId}/credentials/{kind}agent:manage

Give an agent a role with POST /role-bindings and subject.kind set to agent, as for a person. You can only give what you hold yourself.

Browser

An agent can drive a headless Chromium to look at a preview or staging page and take screenshots, for UI checks and docs. The browser is off by default and is a capability of the agent: turn it on in the agent's Connect step (Capabilities › Browser), or set browser in its sandbox policy with PUT /agents/{agentId}/sandbox ("browser": {"production": false}; leave it out to turn the browser off). The setting is part of the policy, so it needs agent:manage and each change is a new version.

  • Playwright's MCP server. Wardn adds it to the agent's MCP configuration as a second server, playwright, running inside the agent's own sandbox with an in-memory profile. Wardn writes no browser driver. The runtime image must carry it: Wardn's default is ghcr.io/future-pirate-king/agent-<runtime>-browser:1, built on Playwright's MCP image, and a Custom agent's image must include playwright-mcp.
  • Pages come from the job. A job names the pages it lets the agent open (up to 10). The sandbox's network policy allows each page's host and port and nothing else, so the agent cannot browse anywhere it was not sent. A job that names pages for an agent whose browser is off is refused.
  • Production is a second switch, and read-only. A page marked as production is accepted only if the agent's browser allows production, and its host is then reached with GET, HEAD and OPTIONS only. Addresses, localhost and URLs with credentials are refused. Wardn's safeguards (no cloud metadata, no Kubernetes API, no private addresses) still apply on top.
  • No credentials in the browser. The browser holds no secret. The only credential injected into the box is the job token for Wardn's MCP endpoint, and the box never holds that either, as the sandbox adds it to requests for that one host.
  • Screenshots are kept as job evidence. When the agent ends, up to 10 screenshots (PNG or JPEG, 2 MB each) are copied out of the box and kept with the job.

What is built

The browser, its network rules, the production switch and the screenshot evidence are built. They are tested only against fakes: a fake sandbox, not yet a live Playwright image. The jobs API does not return screenshots yet, so they are not shown in the web app.

MCP tools

Agents reach Wardn through one MCP endpoint, POST /mcp, with a job token as the bearer. Each tool is one use case, and every call runs the same permission check as the REST API, as the agent.

ToolDoesNeeds
get_appRead an app.app:read
list_deploymentsList deployments with sync, health and drift.deployment:read
read_logsRead the end of a container's logs, once.deployment:read
read_eventsRead a deployment's timeline.deployment:read
raise_releaseRaise a release. Guardrails, freezes and approvals decide it.release:raise
advance_waveLet a waiting release go on.release:raise
pause_releasePause a release.release:raise
rollbackRaise a release that puts back an earlier state.release:raise
propose_changePropose taking drift into Git, pending for a person.drift:adopt
propose_remediationPropose a fix, a config change, a cluster action or a release step for a person to approve, or for an auto-approve rule to cover.remediation:propose
run_testsStart test suites.test:run
report_resultEnd a job by reporting what it found, once. See Agent jobs.none: it changes only the job's own result

There is no tool to approve, bypass a rule, edit a guardrail or a freeze, merge, grant access or read a secret, and the server refuses to register one. A tool the agent's roles do not grant is refused, and one for a place the agent cannot see answers as if it did not exist.

A job token is scoped to one organization, one agent and one job, and is good only while that job runs, at the attempt it was made for: once the job ends, or a newer attempt begins, the next call is refused like any bad token. It is signed with WARDN_AGENT_JOB_TOKEN_KEY, a key only the server holds (production requires it, at least 32 characters and not the web app's secret). It is read-only unless the job allows proposals, it ends with the job (24 hours at the very most), and it stops working at once if the agent is paused. A tool that changes something or proposes is refused to a read-only job. Calls count against the agent's rate limit.

Agents run in a sandbox, one box per job, and are started by Wardn: see Agent jobs and runtimes for the jobs, how to connect Claude Code or your own image, and how to stop them. What an agent proposes is decided by a person, or by a rule that covers it: see Remediations.

On this page