# Ghost Gate Decide — AI Agent Task Budget & Go/No-Go Decision

> Ghost Gate Decide — AI Agent Task Budget & Go/No-Go Decision is a paid API for AI agents from ghost-identity.ghost-agent-os.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Evaluates whether an AI agent task is economically viable by computing a go/no-go gate decision based on task value, budget, costs, and revenue models, returning a recommended spend threshold.

## Facts

- Endpoint: POST https://ghost-identity.ghost-agent-os.workers.dev/v1/gate/decide
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ghost-gate-decide-ai-agent-task-budget-go-no-go-decision-fd7e9e6f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N05r4nOFXyGRL-IseUSFb

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 ghost-gate-decide-ai-agent-task-budget-go-no-go-decision-fd7e9e6f -d '<json body>'
```

Example prompt: Before you proceed with this lead qualification task, check with Ghost whether it's worth doing — the task type is 'lead_qualification', our max budget is $50, the value of a successful qualified lead is $500, and failure would cost us about $10 in wasted outreach.

## When to prefer this

Use this endpoint when an AI agent needs an economically-grounded go/no-go decision before committing spend to a task — especially when task value, ROI model, or failure cost are known. Prefer over simple budget checks when you have revenue model data (sales, affiliate, procurement, return, or credit) and want Ghost to derive safe spend thresholds without inventing conversion rates. Ideal for agent orchestration pipelines that need spend governance at the task level.

## Known failure modes

- Invalid or missing task_type causes pooled history lookup failure
- max_budget or value_of_success conflict with revenue_model derived values may return a warning
- revenue_model missing required fields (e.g. RETURN_ROI without expected_return) returns a schema validation error
- Payment not completed via x402 results in HTTP 402 response with payment terms
- Exceeding revenue_models maxItems of 6 returns a 422 validation error
- task_id exceeding 200 characters or task_type exceeding 120 characters returns 422

## How this service works

Paid per call via x402 (exact / eip155:8453 / USDC). Any x402-capable client pays automatically: agentcash, @x402/fetch, x402-fetch. Every paid operation carries x-payment-info; the same terms are served live as a 402.

## Output

Returns a go/no-go gate decision for the agent task, including a recommended maximum spend, computed value of success, derived margin, and any revenue model outputs (ROI ratios, derived budgets). Fields never invented — only ratios where denominators exist. Also includes payment metadata via x-payment-info header confirming the $0.01 USDC charge.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "task_id": {
   "type": "string",
   "title": "Task Id",
   "maxLength": 200
  },
  "currency": {
   "type": "string",
   "title": "Currency",
   "default": "USD",
   "maxLength": 16
  },
  "task_type": {
   "type": "string",
   "title": "Task Type",
   "maxLength": 120,
   "description": "What kind of job this is. Success history is pooled under it, so it must be stable."
  },
  "max_budget": {
   "anyOf": [
    {
     "type": "number",
     "maximum": 100000000,
     "minimum": 0
    },
    {
     "type": "null"
    }
   ],
   "title": "Max Budget",
   "default": null
  },
  "failure_cost": {
   "anyOf": [
    {
     "type": "number",
     "maximum": 100000000,
     "minimum": 0
    },
    {
     "type": "null"
    }
   ],
   "title": "Failure Cost",
   "default": null
  },
  "revenue_models": {
   "type": "array",
   "items": {
    "type": "object",
    "additionalProperties": true
   },
   "title": "Revenue Models",
   "maxItems": 6,
   "description": "Optional. Say what the task is worth in the terms you actually measure, and Ghost derives value_of_success / customer_revenue / max_budget from it — never overriding a value you stated yourself. Each entry needs a `type`: SALES_ROI (spend, qualified_leads?, meetings?, closed_deals?, realized_revenue?), AFFILIATE_ROI (commission_rate?, order_value?, conversion_probability?, tool_cost?, inference_cost?, transaction_cost?), PROCUREMENT_SAVINGS (current_total_cost?, alternative_total_cost?, switching_cost?, migration_cost?), RETURN_ROI (expected_return, data_cost?, model_cost?, execution_cost?, expected_risk_loss?; expected_return is YOURS to state and is never estimated by Ghost), CREDIT_AFFORDABILITY (available_credit, planned_spend?). Ratios are derived only where the denominator exists; conversion rates are never invented."
  },
  "switching_cost": {
   "anyOf": [
    {
     "type": "number",
     "maximum": 100000000,
     "minimum": 0
    },
    {
     "type": "null"
    }
   ],
   "title": "Switching Cost",
   "default": null
  },
  "required_margin": {
   "anyOf": [
    {
     "type": "number",
     "maximum": 1,
     "minimum": 0
    },
    {
     "type": "null"
    }
   ],
   "title": "Required Margin",
   "default": null
  },
  "customer_revenue": {
   "anyOf": [
    {
     "type": "number",
     "maximum": 100000000,
     "minimum": 0
    },
    {
     "type": "null"
    }
   ],
   "title": "Customer Revenue",
   "default": null
  },
  "value_of_success": {
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ghost-gate-decide-ai-agent-task-budget-go-no-go-decision-fd7e9e6f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ghost-identity.ghost-agent-os.workers.dev](https://www.zero.xyz/host/ghost-identity.ghost-agent-os.workers.dev/llms.txt)
