Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /python /limit_request_rate /microsoft_agent-governance-toolkit.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Entity", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Callers of the api-gateway (agents sending X-Agent-DID, read at agent-governance-python/agent-mesh/src/agentmesh/server/api_gateway.py:84) are outside the repo. The only in-repo X-Agent-DID sender (agent-os/modules/nexus/client.py:457) targets the Nexus service, not this gateway; tests ignored." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "proxy", | |
| "file": "agent-governance-python/agent-mesh/src/agentmesh/server/api_gateway.py", | |
| "lines": "116", | |
| "notes": "FastAPI catch-all route /api/v1/{path} (registered at api_gateway.py:111) in the api-gateway server. It extracts the agent DID via _extract_agent_did (api_gateway.py:124), calls _rate_limiter.allow(agent_did) at api_gateway.py:127 and raises HTTP 429 with Retry-After when denied, otherwise forwards upstream." | |
| }, | |
| { | |
| "role": "Limiter", | |
| "status": "present", | |
| "symbol": "allow", | |
| "file": "agent-governance-python/agent-mesh/src/agentmesh/services/rate_limiter.py", | |
| "lines": "137", | |
| "notes": "Reached from proxy at api_gateway.py:127. RateLimiter.allow fetches the per-agent token bucket and returns False if either the per-agent bucket or the global bucket cannot consume a token (TokenBucket.consume, rate_limiter.py:68)." | |
| }, | |
| { | |
| "role": "HistoryProvider", | |
| "status": "present", | |
| "symbol": "_get_agent_bucket", | |
| "file": "agent-governance-python/agent-mesh/src/agentmesh/services/rate_limiter.py", | |
| "lines": "123", | |
| "notes": "Called by allow at rate_limiter.py:139; returns (or creates, with oldest-eviction) the per-DID TokenBucket from the in-memory _agent_buckets dict. The history is the bucket's token count, updated by TokenBucket.consume/_refill (rate_limiter.py:68/61) at rate_limiter.py:140." | |
| }, | |
| { | |
| "role": "PolicyProvider", | |
| "status": "present", | |
| "symbol": "RATE_LIMIT_PER_MIN", | |
| "file": "agent-governance-python/agent-mesh/src/agentmesh/server/api_gateway.py", | |
| "lines": "33", | |
| "notes": "No get_policy method exists; the policy is the env-configured AGENTMESH_RATE_LIMIT_PER_MIN (default 1000) used to build the global bucket of _rate_limiter at api_gateway.py:36-39, plus per-agent defaults (10/s, burst 20) set in RateLimiter.__init__ (rate_limiter.py:104) and copied into each bucket by _get_agent_bucket." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "proxy", | |
| "file": "agent-governance-python/agent-mesh/src/agentmesh/server/api_gateway.py", | |
| "lines": "116", | |
| "notes": "Same method as the Enforcer: after allow passes, proxy forwards the request via _client.request (api_gateway.py:146) to the in-repo upstream components (trust-engine e.g. register_agent trust_engine.py:152, policy-server, audit-collector) and returns their response; no separate in-process handler exists." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.04 kB
- Xet hash:
- 115a19807307d37d2ea4f5e32062ea4f4a266ef2b5650511b8f67488c6a92ea9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.