Agent Wranglers

AGT-3Recommended

Set a policy for each agent operator

Keep one table that says what each verified agent operator may do. It sets the paths, the actions, the rate limit and whether the agent may act for signed-in users.

How to do it

Key the table by the verified operator, which is the origin of its key directory. Read it in one middleware, so every route applies the same policy. Give each row an owner and a review date. Agents that act for a person also need that person's grant, as Name each party in its own token claim says. A verified identity tells you who sent the request, not that it is welcome. Rate limits per operator follow Set quotas per agent grant.

Examples

JavaScript example

export const AGENT_POLICY = {
  'https://agent.example.net': { owner: 'ops@example.com', reviewBy: '2027-04-01', paths: ['/api/catalog', '/mcp'], perMinute: 120, actForUsers: true },
  'https://crawler.example.org': { owner: 'ops@example.com', reviewBy: '2027-04-01', paths: ['/'], perMinute: 30, actForUsers: false },
};

Python example

AGENT_POLICY = {
    "https://agent.example.net": {"owner": "ops@example.com", "review_by": "2027-04-01",
                                  "paths": ["/api/catalog", "/mcp"], "per_minute": 120, "act_for_users": True},
    "https://crawler.example.org": {"owner": "ops@example.com", "review_by": "2027-04-01",
                                    "paths": ["/"], "per_minute": 30, "act_for_users": False},
}

How to check

A unit test loads the policy file and sends one request per row. Each operator gets exactly the paths and limit its row names. Every row has an owner and a review date less than 12 months old.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/agents-as-users/identifying-agents/policy-per-operator">Agent Wranglers agents as users playbook</a>. In code you write, add a comment next to it with the same link.