# Nomos Tool Access Decision API

> Nomos Tool Access Decision API is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Performs a preflight risk and authorization assessment for an agent attempting to use a specific tool, returning a risk score and flags before execution.

## Facts

- Endpoint: POST https://base-agent-preflight.bytoken2023.workers.dev/x402/v1/decision/tool-access
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nomos-tool-access-decision-api-d369af97
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lSfJ2NAnO0xK5pbrn3ibY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nomos-tool-access-decision-api-d369af97 -d '<json body>'
```

Example prompt: Before my agent 'agent-abc123' runs the 'send-email' tool with action type 'compose' in the production environment, check the Nomos tool access decision API to see if the risk level is acceptable and whether there are any flags I should know about.

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-request preflight decision on whether an autonomous agent should be permitted to invoke a specific tool before execution occurs. Prefer this over full IAM or policy engines when you need fast, per-call risk scoring integrated into an agent loop with x402 micropayment support on Base.

## Known failure modes

- Missing required query parameters (agent_id, tool_name, action_type) returns a 400 validation error
- Invalid or unauthorized agent_id may return a rejection or elevated risk score
- Payment failure or missing x402 payment header results in 402 Payment Required
- Unknown tool_name or action_type may result in a generic assessment with no specific flags
- Network or Cloudflare Worker timeout may result in a 503 or empty response

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

Returns a JSON object containing the network (e.g. eip155:8453), product identifier, and an assessment object with risk_score (numeric), risk_level (e.g. 'low'), and a flags array listing any concerns. May also include identity, activity, and provenance objects for deeper context.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "agent_id",
      "tool_name",
      "action_type"
     ],
     "properties": {
      "agent_id": {
       "type": "string",
       "maxLength": 128,
       "minLength": 1
      },
      "tool_name": {
       "type": "string",
       "maxLength": 160,
       "minLength": 1
      },
      "action_type": {
       "type": "string",
       "maxLength": 120,
       "minLength": 2
      },
      "environment": {
       "enum": [
        "local",
        "preview",
        "staging",
        "production"
       ],
       "type": "string"
      },
      "idempotency_key": {
       "type": "string",
       "maxLength": 128
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "nomos-tool-access",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nomos-tool-access-decision-api-d369af97/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
