Quick start
Run the Warden and an agent in a few minutes
Two ways to run Mandate:
- On Fly.io Sprites (the real thing): the agent and the Warden on separate Sprites, credentials in Sprites connectors, the agent's network locked to the Warden, checkpoints and restores.
- With Docker, anywhere: the same Warden and agent, with the Warden holding the credentials.
Option A: Docker in five minutes
You need Docker, a GitHub token for a repository you're happy to let an agent touch, and an Ollama (local, or an ollama.com API key).
git clone https://github.com/1888-Labs/Mandate && cd Mandate
cp .env.example .envIn .env, set:
WARDEN_ADMIN_TOKEN=change-me-to-something-long
GITHUB_TOKEN=github_pat_... # fine-grained, scoped to one repository
OLLAMA_URL=https://ollama.com # or http://host.docker.internal:11434
OLLAMA_API_KEY=... # only for ollama.com
MANDATE_REPO=you/your-repo
MANDATE_MODEL=gpt-oss:120b # any model with tool callingStart the Warden and give the agent a key:
docker compose up -d warden # dashboard on http://localhost:8080
docker compose run --rm agent warden-call keygen # prints MANDATE_AGENT_KEY and addressPut MANDATE_AGENT_KEY in .env. Then, as the owner, grant the agent two mandates: think with one model, and read the repository.
export WARDEN=http://localhost:8080 WARDEN_ADMIN_TOKEN=change-me-to-something-long AGENT=0x...
curl -X POST "$WARDEN/v1/admin/mandates" -H "authorization: Bearer $WARDEN_ADMIN_TOKEN" \
-H 'content-type: application/json' \
-d "{\"subject\":\"$AGENT\",\"action\":\"model.chat\",\"resource\":\"ollama:cloud\",\"allowedRecipients\":[\"gpt-oss:120b\"]}"
curl -X POST "$WARDEN/v1/admin/mandates" -H "authorization: Bearer $WARDEN_ADMIN_TOKEN" \
-H 'content-type: application/json' \
-d "{\"subject\":\"$AGENT\",\"action\":\"read\",\"resource\":\"github:you/your-repo\"}"Give it a task it's allowed, then one it isn't:
docker compose run --rm agent mandate-agent "Summarise the open issues"
docker compose run --rm agent mandate-agent "Open an issue saying hello"The second is denied with NO_MANDATE: the agent may read, but nobody gave it issues.create. Watch both on the dashboard, then grant issues.create from the dashboard's Grant a mandate form (paste your admin token first) and try again.
More in Self-hosting.
Option B: on Fly.io Sprites
You need the sprite CLI logged in to your Fly.io organization, and Rust to build.
- Create two Sprites:
mandate-warden(labelrole:warden) andmandate-agent(labelrole:agent). - Connect GitHub and Ollama in Sprites, and give each connection an access policy that admits only
role:warden. - Set the agent Sprite's network policy to allow only the Warden's URL.
- Put
WARDEN_ADMIN_TOKEN,GITHUB_CONNECTION_ID,OLLAMA_CONNECTION_IDandSPRITES_TOKENin.env.sprites, and runscripts/deploy-warden.sh. - On the agent Sprite, run
warden-call keygen, then grant mandates as above (against the Warden's*.sprites.appURL) and runmandate-agent.
Each step, with how to check it, is in Setting up two Sprites.
What to try next
- Grant
contents.writewithallowedRecipients: ["agent/work"], then ask the agent to edit a file onmain. It's denied withRECIPIENT_NOT_ALLOWED; ask again foragent/workand it goes through. - Revoke a mandate from the dashboard mid-task and watch the next call fail with
REVOKED. - Change
MANDATE_MODELto a model you didn't grant: the agent can't even think.