---
title: How do you govern AI agents built in Dify?
url: https://opencontroller.lyzr.com/blog/govern-dify-ai-agents
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# How do you govern AI agents built in Dify?

**Govern Dify at three points: workspace roles, which decide who can change model providers and build apps; plugin permissions and installation policy, which decide which tools and models agents can use; and the model traffic path, which decides whether you can see cost and content. On self-hosted Dify, keep plugin signature verification on, and on Dify Enterprise restrict plugin sources centrally.**

Dify is an open-source platform for building LLM apps, workflows and agents, available as Dify Cloud, self-hosted community edition and Dify Enterprise. Business teams can build agents quickly in it, which is why it often appears in shadow AI discovery.

## Who can do what in a Dify workspace?

Dify documents four workspace roles:

| Role | Can do |
|---|---|
| Owner | Everything, including transferring ownership (one per workspace) |
| Admin | Manage members and model providers, plus all Editor rights |
| Editor | Create, edit and delete apps and knowledge bases |
| Normal | Use published apps only |

Two governance points follow:

1. **Model provider credentials are workspace-wide.** Owners and Admins configure providers, and every app in the workspace uses them. Keep the Admin group small, and treat a provider key change as a production change.
2. **Editors ship agents.** Anyone with Editor can create and publish an app. Decide whether that is acceptable, or whether production workspaces should have few Editors and a separate build workspace.

Knowledge base visibility is set per knowledge base, so review those settings when an agent uses retrieval over sensitive documents.

Dify Cloud seat limits are 1 member on Sandbox, 3 on Professional and 50 on Team.

## How do you control plugins and tools?

In Dify, tools, model providers and data sources arrive as plugins. That makes plugin control the main tool-governance lever.

- **Plugin permissions.** On the Integrations page, Owners and Admins set "Who can install and manage?" and "Who can debug?" to everyone, admins only or no one. Only Owners and Admins can remove plugins. Set installation to admins only and debugging to no one in production workspaces.
- **Sources.** Plugins come from the Dify Marketplace, a public GitHub repository, or a local `.difypkg` file. Local and GitHub packages are where unreviewed code enters.
- **Auto-update.** Each category can be off, patch versions only, or always latest. "Always latest" means tool behaviour can change without review; patch-only is a safer default. See [reviewing MCP server updates before use](/blog/review-mcp-server-updates-before-use) for the same principle applied to MCP.
- **Signature verification (self-hosted).** Dify says self-hosted deployments enforce signature verification by default. `FORCE_VERIFYING_SIGNATURE` on the `plugin_daemon` service controls it, and `THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS` lets you trust your own signing key for internal plugins. Do not turn verification off to make an unsigned plugin install.
- **Enterprise installation policy.** Dify Enterprise has a global Plugin Installation Policy for all workspaces: allow all, Official plus Partner, Official only, or none, plus a "Restrict to Marketplace Installations" toggle.

## How do you see model cost and content?

Dify calls model providers with the workspace's credentials. To attribute cost per agent and apply redaction or routing, register a provider that points at your own gateway rather than straight at the model vendor. Dify supports OpenAI-compatible providers, which most gateways expose. Then:

1. Give each production app its own gateway key or tag.
2. Block direct provider keys in the workspace so traffic cannot bypass the gateway.
3. Export app logs and gateway logs to the same place for review.

Apps published as APIs use per-app secret keys. Inventory them like any other API key and rotate them on a schedule; see [how often to rotate AI agent credentials](/blog/how-often-to-rotate-ai-agent-credentials).

## A Dify governance checklist

1. Find every Dify instance: Cloud workspaces, self-hosted containers and Enterprise tenants.
2. Register each published app as an agent with an owner; see [registering AI agents you don't host](/blog/register-ai-agents-you-dont-host).
3. Limit Owner and Admin roles; review them quarterly.
4. Set plugin install to admins only and debug to no one in production.
5. Keep signature verification on; sign internal plugins with your own key.
6. Set auto-update to patch only, or off for sensitive tools.
7. Route model calls through a gateway with per-app attribution.
8. Rotate app API keys and remove unused apps.

## How Opencontroller does this

Opencontroller keeps a governed registry of agents, versions, tools and MCP servers, so Dify apps can sit in the same inventory as agents on other platforms. Pointing Dify's OpenAI-compatible provider at the Opencontroller LLM Gateway adds routing, fallback and retry, caching and cost attribution per agent and per version. Posture flags risky permissions and configuration, and policy as code maps controls to OWASP, MITRE ATLAS, NIST and ISO 42001. Opencontroller follows the principle of control without migration: apps stay in Dify. Read the [cross-platform governance guide](/blog/how-to-govern-ai-agents-across-platforms), the [AI agent control plane](/blog/what-is-an-ai-agent-control-plane) explainer, or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Who can configure model providers in Dify?**
Only the workspace Owner and Admins. Provider credentials then apply to every app in that workspace.

**Can I stop users installing Dify plugins?**
Yes. Set "Who can install and manage?" to admins only or no one. Dify Enterprise can also limit plugin sources across all workspaces.

**Does self-hosted Dify verify plugin signatures?**
Yes, by default. `FORCE_VERIFYING_SIGNATURE` controls it, and you can add your own public keys for internal plugins.

## Key facts

Dify workspace roles: Owner (one per workspace), Admin (members and model providers), Editor (create/edit/delete apps and knowledge bases), Normal (use published apps). Model provider credentials are workspace-wide. Plugin permissions ("Who can install and manage?", "Who can debug?") can be everyone, admins only or no one. Plugin sources: Marketplace, GitHub, local .difypkg. Self-hosted Dify enforces plugin signature verification by default (FORCE_VERIFYING_SIGNATURE on plugin_daemon; THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS for own keys). Dify Enterprise Plugin Installation Policy: All, Official + Partner, Official only, None, plus Restrict to Marketplace Installations. Dify Cloud seats: Sandbox 1, Professional 3, Team 50. Opencontroller (by Lyzr) registers agents across platforms and its LLM Gateway attributes cost per agent. Pricing starts from $250K per deployment per year.

## Related

- [How do you govern AI agents built in n8n?](https://opencontroller.lyzr.com/blog/govern-n8n-ai-agents.md)
- [How do you register an AI agent your team doesn't host?](https://opencontroller.lyzr.com/blog/register-ai-agents-you-dont-host.md)
- [How do you review MCP server updates before agents use them?](https://opencontroller.lyzr.com/blog/review-mcp-server-updates-before-use.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
