bash, read, write, edit, glob and grep calls. mirage_tools(ws) gives that worker Mirage’s versions, so every call runs in the workspace, under its profile, mounts and policies. The worker only connects out to Anthropic, so it can run inside your own server.
Install
Run a worker
The workspace here keeps its files in Redis next to RAM, which needs a Redis server and theredis extra:
agent_toolset_20260401 toolset as Anthropic’s guide shows, then serve its sessions from the workspace:
How it behaves
- The tools keep the toolset’s names. One the session’s profile would always refuse is left out: a read-only workspace gets no
writeoredit. bashruns Mirage’s shell, so a line sees the workspace’s mounts and commands, not the worker’s machine. Arestartis refused, since the session keeps its directory and variables. A relative path resolves against the session’s working directory, whichcdmoves.writeoverwrites a file only after the agent read all of it, andwriteandeditrefuse a file that changed since the agent read it.stale_write_protection=Falseturns that off.session_id=runs the tools as another session, with its profile.web_searchandweb_fetchstill run on Anthropic’s servers. Turn them off in the agent’s toolset to keep the agent to the workspace.
Example
examples/python/agents/claude_managed_agents/redis_report.py creates the agent and a session, serves the session from a RAM and Redis workspace, asks the agent to total /workspace/orders.csv into /redis/report.md, and prints the report from Redis.