Skip to main content
Rules decide which tool and model requests each agent is allowed to make. Dome evaluates them on every governed request, so you can grant, restrict, or deny access down to the specific action and condition.

Overview

Rules ship as scoped bundles of .cedar files. The gateway merges every active bundle that covers the agent and evaluates the request against that set. The typical workflow is:
  1. Write Rules manually or with the Rules assistant.
  2. Validate the Rules for Cedar errors and advisory warnings.
  3. Simulate representative decisions before changing production behavior.
  4. Apply the Rules to activate the change.
  5. Inspect the Rules that apply to an agent and roll back if the result is not expected.

Requirements

Before you begin:
  • Authenticate to Dome and select a workspace
  • Register at least one agent
  • Identify the tools or models the Rules will govern
  • Choose the workspace or agent scope where the Rules should apply

Permissions

Rule bundle operations require platform permissions. Each operation states its required permission inline.

Write Rules

Write each authorization requirement as a sentence before translating it to Cedar. For example, “Allow this agent to call the github/list_issues tool.” You can also use the Rules assistant to translate natural-language requirements into a draft. Assistant drafts never deploy automatically.
Writing local files requires no Dome permission. Using the Rules assistant to draft or apply changes requires rules.deploy.
Map the sentence to a Rule in five steps.
  1. Choose permit for an allowed request or forbid for a denied request.
  2. Set the principal to the agent’s UUID or use a broader form when the Rule should cover every agent in scope.
  3. Choose the action that represents the operation.
  4. Set the resource to the specific tool or model, or use a resource type when the Rule should cover every resource of that type.
  5. Add a when condition if the Rule should apply only under certain circumstances or add unless to define an exception.
Inside the parentheses, name principal, action, and resource. Omit a constraint to match every value. Use == for one entity, is for every entity of a type, and in for several actions. Common actions are mcp:call, mcp:discover, and LLM actions such as llm:invoke, llm:embed, and llm:moderate. Connection attributes appear as resource.<key>. Per-call values appear as resource.arguments.<key> after resource has arguments. The full action catalog and attribute tables are on the Rules reference.

Permit a tool call

Replace AGENT_ID with the registered agent’s UUID. The tool resource uses CONNECTION_NAME/TOOL_NAME.
rules.cedar
Discovery is a different action. A Rule that only permits mcp:discover does not allow tool calls.
discover.cedar

Forbid with an exception

Deny a sensitive tool for everyone, then carve out agents that declare a capability.
restrict-deploy.cedar

Condition on attributes or arguments

Gate an LLM call on a connection attribute (resource.<key>) or a per-call argument (resource.arguments.<key>). Guard argument reads with resource has arguments first. Dereferencing a missing argument errors the Rule out.
attribute-and-args.cedar
A .cedar file can contain multiple Rules. Include every user-authored file that should remain active at the target scope because Apply Rules replaces the current user-authored bundle. After writing the files, validate the Rules before simulation or deployment.

Validate Rules

Validate one or more Cedar files without deploying them. Validation returns blocking Cedar errors and advisory warnings for resource references.
Scoped validation and the MCP tool require rules.view. Scope-less CLI and API validation require authentication.
Add --agent data-pipeline to check tool references against that agent’s workspace catalog. Without --agent, the CLI checks Cedar syntax and semantics only.

Simulate Rules

Simulate an authorization decision against the Rules currently in effect without performing the requested action. Supply the agent, action, resource, and any request context the Rules inspect.
Requires rules.view.
Refer to Simulate Rules for request arguments, Agent Act-As claims, and historical replay.

Apply Rules

Apply one or more Cedar files to replace the active user-authored bundle at a target scope. Each successful apply creates a bundle with a new sequence number and content hash.
Requires rules.deploy.
Applying Rules replaces the active user-authored bundle at the selected scope. Include every user-authored file that should remain active. Dome also keeps generated bundles (allowed resources, Act-As, blocked tools, and similar). Change those through the feature that created them, not by applying over them.
The active workspace is the default scope. Add --agent data-pipeline to apply the bundle to one agent instead. The CLI preserves managed tool-*.cedar files when they are omitted.Advisory warnings identify MCP tool references that do not match the workspace catalog. Warnings do not block the apply.
Reference: dome rules apply
After applying Rules, show the effective Rules to confirm that the new bundle contributes to the expected agents. Gateways pick up the change through effective Rules caching. Allow time for the next sync before testing requests.

Show effective Rules

Show the Rules that apply to an agent after Dome assembles organization, tenant, workspace, agent, and generated bundles. The result includes a content hash for gateway synchronization and the contributing bundles that formed the effective Rules.
Requires rules.view.
Omit --agent to show the effective Rules for every agent in the active workspace.
Reference: dome rules show

Get active Rules at a scope

Get the currently active user-authored Rules at one scope when you need that scope’s files rather than the assembled effective Rules.
Requires rules.view.
Tool: dome_rules_get_active

List Rule history

List deployment history at a scope to retrieve IDs, names, sequence numbers, timestamps, and active status. Use an ID when you roll back Rules.
Requires rules.view.
Add --agent data-pipeline to list the history for one agent.
Reference: dome rules list

Roll back Rules

Roll back to a historical user-authored bundle when a deployment produces an unexpected authorization result. Rollback creates a new bundle from the selected historical content and preserves the original deployment.
Requires rules.rollback.
Rollback changes the active user-authored Rules at the bundle’s stored scope. You cannot roll back the currently active bundle or a system-generated bundle.
The bundle ID identifies its scope, so no scope flag is required.
After rollback, show the effective Rules to confirm that the restored content contributes at the expected scope.

Delete Rules

Delete the active user-authored Rules at a scope when that scope should no longer contribute custom Rules. Deletion preserves bundle history for later inspection.
Requires rules.deploy.
Deleting Rules removes the active authorization contribution from the selected scope. Broader, narrower, and system-generated Rules can still apply.
Reference: DeleteRules
After deletion, list Rule history and show effective Rules to confirm the resulting authorization state.

Generate starter Rules

dome rules generate is deprecated. It writes a static discovery permit and a commented tool-call example, and --from-tools does not change the output. Prefer writing Rules or the Rules assistant.
Generate a static Cedar template with one active Rule that lets every agent discover available tools. The template also includes a commented example for permitting calls to one MCP tool. The generated Rules do not permit tool calls, inspect registered tools, or change active Rules. The --from-tools flag produces the same static template.
The MCP tool requires rules.view. CLI generation runs locally.
Omit --output to print the generated Rules to standard output.
Validate and simulate the generated file before applying it.

Next steps