Skip to main content
On Dome, a developer owns the agent as a workload: you register it, mint its credentials, point it at a Gateway, and verify that governed calls succeed or fail for the reasons you expect. Operators usually attach shared backends. Security usually owns the baseline Rules. In this sandbox you finish the loop yourself so you can see the full path.

Hand this to an AI agent. It stands up a sandbox agent, then hands you curl or Python calls that prove allow and deny.

Open in Cursor
In this tutorial, you will register an agent, attach the demo HR tools behind Default, deploy a narrow Cedar allowlist, and prove allow vs deny from curl or Python — then see both decisions in audit. To do this, you will:
1

Provision a sandbox

Create a disposable workspace for this role walk.
2

Register an agent

Mint identity and an API key for the workload.
3

Attach tools and grant access

Put demo-hr on Default and admit the agent.
4

Deploy authorization rules

Allow directory tools; deny compensation.
5

Verify allow and deny

Call the gateway with curl or Python.
6

Confirm in audit

Read the decisions attributed to your agent.

Prerequisites

For this tutorial, you will need:
  • The Dome CLI installed and authenticated (dome auth login, then dome auth status)
  • A role that can provision a sandbox and deploy rules in that sandbox (admin, operator, or equivalent — refer to Permissions concept)
This tutorial runs entirely in a sandbox. In a production workspace, attaching backends is typically an operator action and deploying rules a security action. A developer still needs enough Connect and Govern context to integrate and debug.

Provision a sandbox

A sandbox is a disposable workspace with the same capabilities as production. Provision one for this role track:
The server prefixes the name, creating sandbox-role-developer. Sync contexts and switch into it:
Confirm the workspace reads sandbox-role-developer before continuing.

Register an agent

An agent is the workload identity every governed call is attributed to. Register one, then mint a credential the gateway will accept as Authorization: Bearer:
Save the Token: dome_… value once into a gitignored .env. Tokens are shown once and cannot be recovered — mint another key if you lose it.

Attach tools and grant access

A tool is a backend the gateway calls on the agent’s behalf. The agent never sees its URL. Register the public demo HR server and attach it to Default:
The connection name prefixes every tool (demo-hr/hr/list_employees, and so on). Admit the agent at Default so the gateway accepts its requests:
That grant admits the agent and permits resources currently in Default. The next step narrows what the agent may actually call.

Deploy authorization rules

Cedar decides every mcp:call. This allowlist keeps directory tools open and blocks compensation (and everything else) with forbid … unless:
role-dev-agent.cedar
Deploy it scoped to this agent:
Expect Bundle deployed: role-dev-agent. Optionally simulate before a live call:
Expect ALLOW, then DENY.

Verify allow and deny

Build the tools ingress URL from your sandbox gateway host and Default’s id:
Export once:
Post MCP JSON-RPC tools/call to $DOME_GATEWAY_URL/mcp. Use curl or Python — same payloads, same outcomes.
List employees — allowed:
Expect demo employees in result, including E001.Get salary — denied:
Expect a JSON-RPC error (authorization deny), not payroll data.

Confirm in audit

Every decision is attributed to the agent. List recent events:
Focus on denials:
You should see the allowed list_employees call and the denied get_salary call under role-dev-agent.

Clean up

Delete the sandbox to remove the agent, rules, and grants together:

Next steps

You learned how to register an agent, call tools through a Gateway, and confirm allow and deny in audit. Continue with: