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:
- Write Rules manually or with the Rules assistant.
- Validate the Rules for Cedar errors and advisory warnings.
- Simulate representative decisions before changing production behavior.
- Apply the Rules to activate the change.
- 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 thegithub/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.- Choose
permitfor an allowed request orforbidfor a denied request. - Set the principal to the agent’s UUID or use a broader form when the Rule should cover every agent in scope.
- Choose the action that represents the operation.
- Set the resource to the specific tool or model, or use a resource type when the Rule should cover every resource of that type.
- Add a
whencondition if the Rule should apply only under certain circumstances or addunlessto define an exception.
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
ReplaceAGENT_ID with the registered agent’s UUID. The tool resource uses CONNECTION_NAME/TOOL_NAME.
rules.cedar
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
.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.- CLI
- MCP
- API
- Agent
--agent data-pipeline to check tool references against that agent’s workspace catalog. Without --agent, the CLI checks Cedar syntax and semantics only.Reference:
dome rules validateSimulate 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.- CLI
- MCP
- API
- Agent
Reference:
dome rules simulateApply 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.- CLI
- MCP
- API
- Agent
--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 applyShow 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.- CLI
- API
- Agent
--agent to show the effective Rules for every agent in the active workspace.Reference:
dome rules showGet 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.- MCP
- API
- Agent
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.- CLI
- MCP
- API
- Agent
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.- CLI
- MCP
- API
- Agent
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.- API
- Agent
Reference:
DeleteRulesGenerate starter Rules
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.- CLI
- MCP
- Agent
Next steps
- Rules concept for how authorization decisions work
- Rules reference for actions and attributes
- Draft with the Rules assistant when you prefer natural-language drafts
- Simulate Rules to probe decisions and replay history
- Authorization model concept for evaluation semantics