> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/cli/guides/ai-agents.md).

# Work with AI agents

Two ways to work with AI agents in Devolutions CLI: launch tools through devo secret run, or connect an MCP client. Pick based on what the model may see.

AI coding agents, such as Claude Code or GitHub Copilot, often need a credential to finish a task: a database password, an API token, a deployment key. Devolutions CLI gives you two ways to let an agent work with your vault. The difference is whether the secret value can reach the model.

## Pick the right approach

<table><thead><tr><th width="220">CHOOSE</th><th>WHAT HAPPENS</th><th>USE IT WHEN</th></tr></thead><tbody><tr><td><strong>The agent runs <code>devo secret run</code></strong></td><td>The agent only handles <code>devo://</code> references. Devolutions CLI resolves them when the tool starts, gives the values to that tool only, and hides them in what the tool prints. The value stays out of the conversation.</td><td>The agent needs to <strong>use</strong> a credential: run a migration, call an API, deploy. This is the safer default.</td></tr><tr><td><strong>The agent connects with MCP</strong></td><td>Your AI client starts <code>devo mcp</code> and gets tools to list, search, and manage vaults and entries. One of these tools returns a secret value to the client, so the value can reach the model.</td><td>The agent needs to <strong>work on</strong> your workspace: find entries, review access, organize vaults. Restrict the tools to what the task needs.</td></tr></tbody></table>

{% hint style="info" %}
You can combine both. Connect the MCP server with the secret-resolution tool turned off so the agent can explore your vaults, and have it launch tools through `devo secret run` when it needs a credential.
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Give an agent a credential without exposing it</strong></td><td>Let the agent find references and launch tools through <code>devo secret run</code>.</td><td><a href="/cli/guides/ai-agents/run-an-agent.md">Give an agent a credential without exposing it</a></td></tr><tr><td><strong>Connect an AI client with MCP</strong></td><td>Add <code>devo mcp</code> to your MCP client and see what the model can do.</td><td><a href="/cli/guides/ai-agents/connect-mcp.md">Connect an AI client with MCP</a></td></tr><tr><td><strong>Limit what an agent can do</strong></td><td>Keep the MCP server read-only, hide destructive tools, or keep secret values out of the model.</td><td><a href="/cli/guides/ai-agents/limit-tools.md">Limit what an agent can do</a></td></tr><tr><td><strong>What stays hidden, and what doesn't</strong></td><td>Which commands hand a secret over, and where Devolutions CLI's protection stops.</td><td><a href="/cli/guides/understand/security-model.md">What stays hidden, and what doesn't</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/cli/guides/ai-agents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
