Docs / Agents
Onboard an agent
Put the agent you already use into the company as one of its people, with only the access that person would have.
Mostly read byAgent engineersBuyers comparing vendorsPlatform, DevOps and IT
Where this sits01 Agents02 Boundary03 Company04 ModelSee the map

Show every step
An agent under test works as one of the company's people. You choose the program (the agent you already use), the job it does, and what that person may reach. Everything on this page can be done three ways; choose one above, or read all three.
Before you start
You need a world that is built (mirror world create has finished) and its sealed network running (mirror up). See Install and first run.
1. Choose the program and the job
The program is the agent itself: Claude Code, Codex, Gemini CLI, Grok Build and others are known by name, and --program other takes one of your own. The job decides who it becomes in the company: engineer (the default), desk, or own with a brief you write.
In the portal
Open Agents and choose Onboard an agent; the Agents lane of the environment map has the same link, Add an agent. Pick the program, then the job, and follow its steps.
On the command line
mirror agent programs # the programs it knows, those on this computer first
mirror agent new care-desk --program claude-code --job engineer
care-desk is the name you give this agent. Without --program, mirror agent new asks its questions one at a time, and a draft resumes where it stopped.
Through an AI agent
list_agent_programs
onboard_agent
name: "care-desk"
program: "claude-code"
job: "engineer"
where: "sealed"
onboard_agent asks you first: it waits until you approve it in the portal or with mirror mcp approve.
Where it runs. sealed, the default, runs the agent inside the world. desktop leaves the app on your computer and lets it reach the world through an MCP server. That mode has weaker protections, which you are asked to accept before it is set up.
2. Grant what it may reach
Grants are exact. The person the agent acts as has, for the run, only what its file lists: a repository or channel that is not granted answers as it would for someone with no access.
In the portal
Open Permissions and choose the agent. Set each repository, channel and tool. A change takes effect at the agent's next run.
On the command line
mirror set grant care-desk code/billing-service write
mirror set grant care-desk chat/incidents member
mirror reach care-desk # what it is granted, against what its last run used
A repository takes read, write or admin; a channel takes member; a tool takes allowed; a whole system takes granted; none takes a grant away.
Through an AI agent
set_grant
agent: "care-desk"
resource: "code/billing-service"
grant: "write"
confirm: true
agent_reach
agent: "care-desk"

- 1The agent whose access you are looking at.
- 2What is granted, set here.
- 3Whether the last run used it.
- 4The finding: for example that the agent stayed out of what it was not given.
Grant what the agent would have at work, not everything. A scenario that tempts an agent outside its job only means something if the job has an outside.
3. Check it
One command runs every preflight check, so a problem shows now and not in the middle of a run. Each failure names its fix.
mirror agent check care-desk
4. Give it work
A scenario restores the world, delivers the work as an assigned issue or a message, watches, and scores.
In the portal
Open Scenarios, choose one, pick the agent and press Run. The live view opens.
On the command line
mirror scenario list
mirror run rotate-leaked-token --agent care-desk
Through an AI agent
start_run
scenario: "rotate-leaked-token"
agent: "care-desk"
confirm: true
It asks you first, then returns at once with the run's id. Follow it with read_steps and get_result.
This costs money
A run with a real agent calls its model through your own key. The key stays on your computer: the gateway adds it to the call on the way out. To check a scenario without spending anything, rehearse it with no agent: mirror scenario try <scenario>.
Next: watch the run and read its verdict.
If something goes wrong
- The run says the work cannot be delivered. The scenario delivers its work to a repository or a channel, and the agent is not granted that place.
mirror reach care-deskshows what it has. - The model cannot be reached.
mirror model listshows the model services the world knows and the route each agent uses;mirror model add <service>adds one. - You changed a grant and nothing changed. Grants apply at the agent's next run.
mirror changeslists edits that are saved but not yet in effect. - You are on a company network. See On a company network.
For every field of the file these steps write, see The agent file.