Skip to content

mgpiller/mandate-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Runtime Authority Mandate

Patents pending. (c) 2026 Marina Piller / OTIS Labs.

A live service an autonomous AI agent uses to check human authority before it acts.

Credential services answer who an agent is. This service answers a different question: is THIS action, right now, inside a live human mandate? An agent asks before any consequential act, and gets back one of four verdicts.

approve    inside the mandate. act.
confirm    above the ask-first limit. stop and route to the human.
escalate   the shared daily total is reached. back to the human.
block      not authorized. refuse, with reasons.

Built for NandaHack 2026 (MIT Media Lab, Project NANDA, HCLTech).

Live service: https://mandate-check.onrender.com

Why

Agents are being handed the ability to act in the real world: to pay, post, write, and call other tools. Identity tells you which agent showed up. It does not tell you whether t he thing the agent is about to do was authorized by a human who had the right to authorize it. That check has to happen at the moment of action, every time, because mandates expire and humans change their minds. This service is that check.

What makes it different

Live action authorization, checked at execution time. Identity and static policy are verified once. A mandate is verified on every action.

Four decisions instead of a binary yes or no. Approve executes. Confirm and escalate route to the human. Block refuses and says why.

Delegation-tree aware. A sub-agent mandate can only shrink, never grow. The daily total is shared across the whole tree, so a family of agents cannot do together what none of them may do alone. One revocation halts every branch, including work already in motion.

A hash-linked audit trail. Every grant, check, delegation, and revocation lands in a chain the human can verify by re-hashing. It is the agent's proof that it stayed inside its authority.

Quickstart

Bootstrap a working mandate in one call:

curl -X POST https://mandate-check.onrender.com/v1/bootstrap \
  -H "Content-Type: application/json" \
  -d '{"principal_name":"demo","agent_name":"agent-1"}'

The response includes your mandate_id, your limits, and literal example bodies for every next call.

Check an action before you take it:

curl -X POST https://mandate-check.onrender.com/v1/check \
  -H "Content-Type: application/json" \
  -d '{"mandate_id":"mnd_abc","action":"pay","amount":30,"presenter":"agent-1"}'

{"decision":"approve","execute":true,"reasons":[],"latency_ms":0.2}

Act only when execute is true.

Endpoints

POST /v1/bootstrap           one call, a working mandate
POST /v1/check               ask before a consequential action, gate on "execute"
POST /v1/delegate            mint a narrower mandate for a sub-agent
POST /v1/revoke              revoke a mandate, every descendant halts with it
POST /v1/revoke_principal    the human withdraws authority, every tree halts
GET  /v1/audit/{principal}   hash-linked event chain and a chain_verified flag
GET  /healthz                liveness
GET  /skill.md               the agent-facing skill file

How an agent should use this

  1. Bootstrap once. Save mandate_id and principal from the response.
  2. Before every consequential action, POST it to /v1/check. If execute is true, act.
  3. If the decision is confirm or escalate, stop and route to your human with the reasons. Do not retry with a smaller amount to sneak under a limit.
  4. If the decision is block, do not act. The reasons say why.
  5. Spawning sub-agents? Give each one a delegated mandate, never your own. The daily total is shared across all of you.
  6. Never cache an approve. Mandates expire and humans revoke. Ask each time.
  7. When your run ends, fetch the audit chain and hand your human the verified receipt.

Run locally

pip install fastapi uvicorn
python main.py

Deploy anywhere that runs Python. No config beyond python main.py.

Notes

Demo service. In-memory, rate-limited at 120 calls per minute. Each principal is its own sandbox, with no persistence beyond the hash-linked audit chain of your own session. A companion reference implementation of the same semantics lives in the Nanda Town repo as the NandaHack pull request.

Attribution

Concepts follow the AIHAPI working draft, OTIS Labs. Patents pending. otislabs.ai

(c) 2026 Marina Piller / OTIS Labs. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages