This page covers governance and incident response. For what agents do, how to assess each one and a pre-deployment checklist, see our agentic AI security guide. Prompt injection and technical controls are in securing AI agents.
Shadow agents in your organisation
The shadow AI problem has moved on. In 2023 the main risk was staff pasting sensitive documents into consumer chatbots. In 2026 it includes business units building agents with write access to production systems, using low-code platforms, without a security review.
Power Automate, Copilot Studio, n8n, Zapier and similar tools let non-technical staff build agents. Depending on the platform and configuration, these agents may run through delegated user connections, service accounts, app identities or shared credentials, and can often reach everything that identity can reach. For each agent, identify which identity runs each action and what its effective permissions are. A marketing team might build an agent that reads CRM contacts, writes outreach and posts to social media, with no access review and only the platform's default logging.
Some of these agents leave an OAuth consent record in your identity provider. Many do not: agents built inside Power Platform use connections under the maker's account, API keys never touch your identity provider, and self-hosted tools may connect through service accounts. Use several discovery sources.
| Source | What it can reveal |
|---|---|
| Entra ID enterprise applications and consent grants (or Google Workspace equivalents) | Third-party apps with delegated or application permissions, especially broad mail, file and contact scopes |
| Power Platform inventory | Agents, apps and flows built in Copilot Studio, Power Apps and Power Automate, with owners and connectors |
| Workload identities and service principals | Non-human identities with credentials, recent sign-ins and assigned permissions |
| SaaS admin consoles | Integrations, API keys and connected apps inside CRM, ticketing and collaboration tools |
| API gateway and cloud logs | Automated calls to internal APIs and model endpoints from unknown clients |
| Endpoint and browser discovery | Local agent tools, browser extensions and traffic to AI services |
See our guide to shadow AI for the wider discovery and policy approach.
Many acceptable use policies cover what data staff can share with AI chatbots. Fewer cover what systems staff can give AI agents access to. Add a clear rule: any agent with write access to a production system needs a security review before it goes live, and personal API keys must not be used for business agents.
Governance framework for AI agents
Agent inventory
Keep a register of every production agent. For each one, record the model, its tools and permissions, the data it can reach, the actions it can take without approval, its identity and credentials, the owning team, who approved it and when it was last reviewed. An agent missing from the register is one you cannot easily revoke, monitor or audit. A spreadsheet with a set review cycle is a workable start.
Risk-based human approval
Requiring approval for every action makes agents slow and trains approvers to click through. Match the approval to the risk of the action instead.
| Action risk | Examples | Approval |
|---|---|---|
| Low | Reading permitted data, drafting text for a person to send | None; logged |
| Medium | Updating internal records, sending internal messages | Policy checks and limits; sampled review |
| High | External emails, record deletion, account or permission changes | Human approval before execution |
| Critical | Payments, new payees, privileged access, irreversible bulk changes | Human approval plus a second check, such as dual approval or a call-back |
The matrix is illustrative. Adjust the approval level to the sensitivity of the data, the recipient, the impact, the volume and whether the action can be reversed: an agent confirming a routine appointment is not comparable to one emailing an export of the customer database.
The approval screen must show the exact action and its parameters (recipient, amount, account, records affected), taken from the tool call itself. An agent's own summary of what it is about to do can be wrong or manipulated, so it is not a sound basis for approval.
Logging and observability
Each tool call should produce a log entry you can use in an investigation: the agent identity and the user it acted for, timestamp, the task or purpose, the tool called, the resource and parameters, the result, a correlation ID linking the steps of one run, and the authorisation decision with its reason. Send these logs to your SIEM with your other security telemetry. If a platform cannot produce logs detailed enough to reconstruct what an agent did, it is not ready for sensitive data.
Agent logs often contain personal data, so they fall under the UK GDPR. Log what you need for security and no more, mask secrets and tokens, restrict who can read the logs and set a retention period you can justify.
Reviews and drift checks
Agent permissions grow as features are added and old access is rarely removed. Review each agent periodically, at a frequency that matches its risk, and every time its tools, permissions, model or prompts change. For critical agents, add drift checks: compare current permissions and behaviour with the approved baseline and alert on differences. Decommission agents whose project has ended, together with their identities and credentials.
Responding to a compromised agent
Plan for an agent being manipulated or its credentials leaking. Stopping the chat interface is not enough: the agent's tools, scheduled runs and credentials can keep working without it.
| Step | Action |
|---|---|
| Identify | Confirm which agent, identity and runs are involved, using correlation IDs and tool call logs |
| Stop | Trigger the kill switch: halt running and scheduled runs and disable the agent's tools |
| Revoke | Revoke tokens, rotate secrets and API keys, and remove consent grants for the agent's identity |
| Contain | Block the source of injected content, quarantine poisoned documents or memory, and restrict connected accounts |
| Preserve | Keep logs, prompts, memory contents and tool outputs before anything is cleaned up |
| Investigate | Reconstruct what the agent read and did, and what data left the organisation |
| Recover | Reverse changes, restore data, and assess notification duties if personal data was affected |
| Validate | Fix the root cause, retest, and only then restore the agent with reviewed permissions |
The steps are not strictly sequential. Stopping, containing and preserving evidence can happen in parallel; preservation must not delay urgent containment, and each containment action should be documented as it is taken so the investigation can account for it.
Our guide to AI incident response covers how to build these steps into your wider incident plan.
Ryland has delivered cybersecurity, compliance, and IT management programmes for regulated organisations across the UK and the Netherlands for over 20 years. View full profile