# Agents (/docs/concepts/agents)

<p>
  {agent}
</p>

## High-level overview [#high-level-overview]

An agent is a durable identity in a workspace. It is separate from credentials and from access. An API key or short-lived token lets a runtime authenticate as the agent. Allowed resources, gateway access grants, and rules decide what requests Dome permits. You can rotate a key without changing permissions, or change permissions without issuing a new key.

Agents use one of two execution models:

* **External agents** have a worker you run in your own runtime.
* **Managed agents** have a worker Dome runs.

Both use the same identity, gateway grants, rules, lifecycle, and audit model.

Registering an agent and calling through Dome looks like this:

1. An operator registers `data-pipeline`, allows a gateway and the tools behind it, and creates an API key.
2. The runtime exchanges the key for a session token and calls through the gateway.
3. Dome authenticates the agent, checks the access grant and resource membership, evaluates rules (and guards and quotas on the content path), and records the outcome against that agent identity.
4. Suspending the agent later stops traffic for that identity without deleting the record.

One agent identity covers authentication, authorization, and audit. Credentials and access stay separate.

### Identity is not permission [#identity-is-not-permission]

An agent credential identifies the caller. It does not contain the agent's permissions and is not bound to a specific gateway. The same agent credentials can use multiple gateways when the agent has an access grant to each one.

Three separate checks must allow a request:

| Check            | Asks                                                |
| ---------------- | --------------------------------------------------- |
| **Access grant** | May this agent use the gateway?                     |
| **Membership**   | Is this resource in the gateway?                    |
| **rule**         | May this agent perform this action on the resource? |

Allowed resources on the agent record are shorthand for creating rules in the agent's rule bundle. Changing them needs `rules.deploy` in addition to permission to edit the agent. When the shorthand cannot express a condition, author rules directly. Refer to [Rules](/concepts/controls/rules) concept and [External agents](/build/agents/external#allowed-resources).

### Credentials [#credentials]

Agents authenticate with an API key or a short-lived agent token minted from a key. Keys are issued once and cannot be retrieved again. Rotate or revoke a key to cut off that credential. Session tokens carry the agent UUID, tenant and workspace context, and the API key id that minted them, and each agent sets its own token lifetime. Details are on the [Agent Identity](/concepts/agents/identity) concept.

### Delegated identity [#delegated-identity]

An external or managed agent can act for a person rather than only for itself (**delegated identity**). When it presents an act-as claim, Dome verifies the claim before authorizing the request, and the audit trail records the end user alongside the agent. Interactive agents receive the signed-in person's identity through [interactive access](/build/gateways/interactive-mcp-access) instead. Workspace and per-agent settings control whether a claim is required and which verified identities the agent may present. Refer to [Delegated agents](/build/agents/delegated) and [Identity Patterns](/concepts/identity-patterns) concept.

### External agents [#external-agents]

An external agent is an agent whose worker you run in your own runtime. It authenticates to Dome with an agent credential and makes governed calls through a gateway. Refer to [External agents](/build/agents/external) to register and configure one.

### Managed agents [#managed-agents]

A managed agent is an agent whose execution worker Dome runs. You configure its system prompt, model, gateway, trigger, and [compute](/concepts/agents/compute) placement. The trigger starts runs manually, on a schedule, or from a signed webhook. Calls from the managed agent still use the agent's gateway grant and rules, so the same authorization and audit model applies. Refer to [Managed agents](/build/agents/managed) to configure one.

### Interactive access [#interactive-access]

Interactive access provisions a system agent record for signed-in human MCP traffic on one gateway. It does not run a worker and is not an external or managed agent. Refer to [interactive access](/build/gateways/interactive-mcp-access) to configure it.

### Lifecycle and hierarchy [#lifecycle-and-hierarchy]

Every agent has a lifecycle state: provisioned, active, suspended, or revoked. Provisioned and active agents can send traffic. Suspended and revoked agents are rejected. Revocation is permanent and always cascades to descendants. An agent can have a parent in the same tenant (max depth 10). Hierarchy grants no access on its own. Refer to [Agent Lifecycle](/concepts/agents/agent-lifecycle) concept.

## Next steps [#next-steps]

With the agent identity model in mind, continue with:

* [Architecture](/concepts/architecture#agents) concept for where agents sit among components and controls
* [Agent Identity](/concepts/agents/identity) concept for API keys, tokens, and act-as claims
* [Agent Lifecycle](/concepts/agents/agent-lifecycle) concept for states and transitions
* [Compute](/concepts/agents/compute) concept for managed-agent sandbox placement and lifecycle
* [Identity Patterns](/concepts/identity-patterns) concept for standing vs delegated design
* [Managed agents](/build/agents/managed) to configure agent execution on Dome
* [Gateways](/concepts/gateways) concept for reachability after identity
* [Rules](/concepts/controls/rules) concept for what an agent may do once it reaches a resource
* [External agents](/build/agents/external) to register, issue keys, and manage agents