> ## Documentation Index
> Fetch the complete documentation index at: https://agentclientprotocol.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Security Considerations

> Trust model and security guidance for Agents and Clients

This page describes ACP's trust model and security guidance that spans features. Guidance for a single feature is on that feature's page. See [Feature Guidance](#feature-guidance).

## Trust Model

* The Agent runs with whatever permissions its process is given. ACP itself does not sandbox it.
* Files, web pages, tool results, and MCP servers can influence Agent output. Treat every Agent-authored string, URI, and path as untrusted, including replayed content.
* Permission requests are advisory: the Agent performs operations and is responsible for honoring the user's decision. A Client cannot prevent an operation the Agent performs without asking.
* `info` in `initialize` is self-reported. Implementations **SHOULD NOT** use it for security decisions, and Clients **SHOULD** identify the Agent from their own launch configuration.

Out of scope: a malicious Agent binary, detecting prompt injection, and operating-system sandboxing.

## Rendering Agent content

This applies to all Agent-authored display text, including messages, thoughts, tool calls, plans, commands, config options, notices, session titles, authentication methods, permission requests, and elicitations.

* Clients **SHOULD NOT** run scripts from Agent content, and **SHOULD** disable or sanitize raw HTML when rendering Markdown.
* Clients **SHOULD NOT** automatically run active content, such as diagram renderers, that can fetch resources or execute code.
* Clients **SHOULD NOT** open links from Agent content without user action, and **SHOULD** show the full target and get user confirmation before handing a link with a scheme other than `http` or `https` to the operating system or another handler.
* Clients **SHOULD** show the full link target when it differs from the link text.
* Clients **SHOULD** reveal or remove bidirectional, zero-width, and tag characters in commands, paths, URLs, diffs, and permission requests.
* Clients that print Agent text to a terminal **SHOULD** neutralize terminal control sequences in it.
* Clients **SHOULD** keep Agent [slash commands](https://agentclientprotocol.com/protocol/v2/slash-commands.md) distinguishable from their own commands.
* Clients **MAY** bound or throttle permission requests, elicitations, and output.

## URIs and remote resources

This applies to `uri` on images, resource links, and embedded resources, to icon `src`, and to URLs in Markdown.

* Clients **SHOULD** render images from `data` and **SHOULD NOT** fetch Agent-supplied remote URIs without user action. A request can leak data through its URL.
* Icon `src` is the only URI a Client may fetch without user action. For icons, as in MCP, Clients **MUST** accept only `https:` and `data:` URIs and reject other schemes, including `file:`. They **MUST** fetch without credentials, **MUST NOT** follow redirects that change the scheme or origin, and **MUST** apply these checks to every redirect hop. Clients that display icons **MUST** support PNG and JPEG.
* Automatic fetches **SHOULD** use only `https:` or `data:` URIs, **SHOULD NOT** carry credentials, **SHOULD** refuse loopback and private-network targets, and **SHOULD** bound the response size.
* Clients **SHOULD NOT** run scripts in SVG images from Agent content.
* Apart from icons, which never use `file:`, Clients **SHOULD NOT** read a `file:` URI from Agent content outside the session's [root set](https://agentclientprotocol.com/protocol/v2/session-setup.md#workspace-root-security) without user action.
* Agents **SHOULD** apply the root set and these fetch rules to URIs in prompts.

## Credentials

* Implementations **SHOULD NOT** put credentials in `_meta`, including `traceparent`, `tracestate`, and `baggage`. [Preserving unknown values](https://agentclientprotocol.com/protocol/v2/extensibility.md#enum-and-tagged-union-variants) does not require storing or replaying credentials.
* Session, message, tool-call, and terminal IDs are not credentials.

## Prompt injection

* Agents **SHOULD** treat embedded resources, files, tool results, and MCP results as data, not as user instructions.
* Agents **SHOULD** request permission before sending data off the machine after reading untrusted content.
* Agents **SHOULD** request permission before writing files that control execution or approval, such as version-control hooks, editor or Agent settings, and MCP configuration.
* Clients **SHOULD NOT** open links, run commands, change settings, or send data based only on Agent-authored text.
* A [system prompt](https://agentclientprotocol.com/protocol/v2/session-setup.md#system-prompt) carries more weight than user turns. Clients **SHOULD** only send content they trust at that level, and Agents **MAY** reject it.

## Intermediaries

* An intermediary between the Client and the Agent, such as a proxy, can read and change every message, and each side treats it as the other. Clients **SHOULD** only use intermediaries the user trusts.
* Intermediaries **SHOULD NOT** answer permission requests or elicitations for the user except under user-configured policy, and **SHOULD** forward `subject` unchanged.
* An Agent serving more than one user **SHOULD** scope `session/list`, every request that names a session (such as `session/resume` and `session/delete`), permission requests, and elicitations to the user that owns the session. It treats another user's session as one that does not exist, so it is not listed, resuming it fails with `-32002`, and deleting it does nothing. Such an Agent **SHOULD** also authorize `cwd`, `additionalDirectories`, and `mcpServers` against the requesting user, and **SHOULD NOT** launch stdio MCP servers that user isn't permitted to run.

## Transports

[Custom transports](https://agentclientprotocol.com/protocol/v2/transports.md#custom-transports) **SHOULD** document their security considerations, including how peers authenticate.

## Feature guidance

* [Workspace roots](https://agentclientprotocol.com/protocol/v2/session-setup.md#workspace-root-security)
* [Terminal authentication](https://agentclientprotocol.com/protocol/v2/authentication.md#launch-safety)
* [MCP servers](https://agentclientprotocol.com/protocol/v2/session-setup.md#security)
* [Permission requests](https://agentclientprotocol.com/protocol/v2/tool-calls.md#security)
* [Display-only terminals](https://agentclientprotocol.com/protocol/v2/tool-calls.md#display-only-terminals) and [diffs](https://agentclientprotocol.com/protocol/v2/tool-calls.md#diffs)
* [Elicitation](https://agentclientprotocol.com/protocol/v2/elicitation.md#user-interaction-requirements) and [URL security](https://agentclientprotocol.com/protocol/v2/elicitation.md#url-security)

## Residual risk

A user can approve a harmful operation, prompt injection can steer operations the user allowed, and an Agent can act without asking.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.