Skip to content

Document how to restrict what AI agents can do - #3544

Open
rhysparry wants to merge 3 commits into
mainfrom
rhys/lev-2025/how-restrict-agent
Open

rhysparry wants to merge 3 commits into
mainfrom
rhys/lev-2025/how-restrict-agent

Conversation

@rhysparry

@rhysparry rhysparry commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Background

Octopus now has several controls that restrict what AI agents can do with runbooks. Each control has its own docs. No page explains how the controls fit together. No page helps someone who needs to respond after an agent ran something they didn't expect.

Results

Adds a guide page at /docs/octopus-ai/restricting-ai-agents. The page serves two readers:

  • Someone who wants to restrict AI agents before anything goes wrong
  • Someone whose agent ran something unexpected and who wants to stop it happening again

The page explains how Octopus identifies an AI agent and how to find an agent run in the audit log. It then covers least-privilege permissions and the three run controls. It says once that the controls are advisory and that permissions are the real boundary. OAuth for Remote MCP is rolling out now. The page treats OAuth connections as available.

Smaller changes:

  • The policy examples page gains an example that blocks AI agent runbook runs.
  • The auditing page now uses the real filter labels. It also says Octopus records a masked key for every API key, not only for agent API keys.
  • The runbook permissions and Remote MCP pages link to the new page.

How to review this PR

Start with the new page. It follows the guide page standard in contributing/standards. The most useful feedback is on product accuracy and on whether the investigation path reads well.

Navigation paths use > as the standards ask. Most existing pages use ➜.

Reducing risk

  • Site build passes
  • Link crawl passes
  • Anchors on every changed page checked
  • UI labels and behavior checked against the Octopus Server source

🤖 Generated with Claude Code

🤖 Agent's description, endorsed by Rhys

@rhysparry
rhysparry marked this pull request as ready for review October 30, 2026 02:52
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3544.z22.web.core.windows.net/.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.


To stop agents from running a runbook, use the runbook's [AI agent access](/docs/runbooks/runbooks-vs-deployments#ai-agent-access) setting. The MCP server returns no environments for a blocked runbook, so agents don't try runs that would fail.

To limit what agents can do across Octopus, see [Restricting what AI agents can do](/docs/octopus-ai/restricting-ai-agents).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea linking the pages.

@@ -0,0 +1,237 @@
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This document is very complete but also quite long. I think it is alright to merge as is but if you are keen check if there are ways to break it down.

} if {
input.Actor.Type == "Agent"
}
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aneita asked in the showcase thread how to make AI agent runs include a manual intervention step. The existing "Require a manual intervention step" example is almost that already. Could we add a note under it?

To apply this only to runs started by an AI agent, add input.Actor.Type == "Agent" to the conditions.

That example also misses two cases. Worth adding these checks to its step match:

step.Enabled
step.IsRequired
Without Someone can
step.Enabled disable the step. It's still in Steps, but it doesn't run.
step.IsRequired skip the step by name. SkippedSteps keeps whatever the caller sent, so a name never matches step.Id. A required step can't be skipped at all.

I'll raise the server side (turning names into IDs before policies run) separately.

layout: src/layouts/Default.astro
pubDate: 2026-10-29
modDate: 2026-10-30
title: Restricting what AI agents can do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about "Restricting and investigating AI agent activity"? The page covers both limiting agents and looking into runs they started, so the current title only covers half of it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit wordy. Perhaps we could split the two, but there are definitely benefits to having a single page.


6. Select **Save**.

Runs started by an AI agent pause at the step until a person responds, and runs started by a person skip the step. AI agents that try to respond are told a person needs to respond. Learn more about [preventing AI agents from responding](/docs/projects/built-in-step-templates/manual-intervention-and-approvals#prevent-ai-agents-from-responding).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up, not blocking. docs#3543 renames this section to "Block AI agents" to match the new UI copy. The anchor changes to #block-ai-agents, and "Agent Responses" / "respond" become "Block AI agents" / "action".

No need to wait for mine. Feel free to merge this as is, and I'll do the renaming on this page in docs#3543 once yours is in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants