Agent Economic Action Gate
Pricing
from $0.002 / economic evaluation
Agent Economic Action Gate
Evaluate whether an AI agent should buy or execute a paid action. Deterministic expected-value math compares baseline, proposed action and substitutes. Returns BUY, SKIP, STOP or ESCALATE, a rational price ceiling and structured reasons.
Pricing
from $0.002 / economic evaluation
Rating
0.0
(0)
Developer
Alessandro Bonometti
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
21 hours ago
Last modified
Categories
Share
Should an agent buy or execute an action? Evaluate its marginal economic utility against doing nothing and using a substitute.
Deterministic, structured, no LLM inference. Returns BUY, SKIP, STOP, or ESCALATE, the break-even price ceiling, expected value, marginal value, and substitute comparisons. This tool never executes an action or moves money on your behalf.
Example
A task is worth $100 on success. Baseline success probability is 50%. A $3 verifier improves it by 15 percentage points. A substitute costs $2 and achieves 60% success.
- Baseline expected value: $50.
- Proposed action expected value after cost: $62.
- Substitute expected value after cost: $58.
- Result: BUY. Break-even price ceiling: $7. Advantage over best outside option: $4.
Use the included examples/input.json as a complete request. success_probability_delta: 0.15 means +15 percentage points, not +15% relative improvement.
Input contract
task_value: nonnegative net payoff if successful, excluding action costs and sunk costs; at most 1e12.currency: uppercase three-letter label shared by every amount. No currency conversion.baseline_success_probability: probability of success without purchasing an action.confidence: caller estimate reliability in [0,1]. Omitted or below 0.8 yields ESCALATE.action:id, nonnegative all-incost, andsuccess_probability_delta. Baseline + delta must be in [0,1].alternatives: up to 100 mutually exclusive substitutes, each withid,cost, absolutesuccess_probability, and optionalconfidence(inherits global confidence).
All estimates must refer to the same task, payoff, timeframe and currency. Unknown fields, strings in numeric fields, duplicate IDs and invalid probabilities are rejected.
Economic rules and limits
EV = probability * task_value - incremental_cost.
max_rational_price = max(0, gross_action_value - best_outside_EV).
BUY requires strictly greater value than baseline, substitutes and stopping. Ties prefer no purchase. SKIP may recommend a substitute. STOP means every modeled option has nonpositive expected value. ESCALATE requests better estimates; it does not recommend spending.
The model assumes zero payoff on failure, zero additional cost for the baseline, and zero payoff for stopping. It compares one action against individual substitutes; it does not model sequential purchases, dependencies, risk aversion or portfolios. Include only cases that fit these assumptions. Confidence is a policy gate, not a statistical confidence interval. Estimates are supplied by the caller and are not independently verified.
Decisions use 40-digit decimal arithmetic. Returned numeric amounts are rounded to 15 significant digits. max_rational_price is a break-even ceiling; purchase requires a strict advantage at the actual price. A zero ceiling with break_even_attainable: false means even a free action cannot match the best alternative.
Monetization
One valid, completed evaluation is one billable unit, regardless of decision. Invalid input is not an evaluation. Apify charges the economic-evaluation event and a separately disclosed start event when enabled. A valid ESCALATE is still a completed evaluation of insufficient confidence.
HTTP routes are protected: /rapidapi/v1/evaluate requires the private RapidAPI proxy secret; /x402/v1/evaluate uses verified payments. No public unpaid evaluation route exists. MCP forwards to the buyer's RapidAPI subscription and never runs a free local evaluation.
Run
Node 22+. npm ci, npm test, npm run evaluate -- examples/input.json.
npm start runs Apify. npm run serve runs HTTP with .env configuration; default binds only to localhost. For a production HTTPS host, set HOST=0.0.0.0, a reverse proxy/managed ingress, and channel credentials. Unconfigured channels return 503.
For x402 set CDP API credentials, a receiving wallet address, and explicitly choose development/testnet or production/Base mainnet. Bazaar metadata is included; actual indexing requires a successful settled payment and must be verified independently. Price defaults in configuration are deployment candidates, not evidence of live pricing.
For RapidAPI import openapi.json, configure the public base URL and proxy secret, and enable the provider's paid request plan. Do not expose the proxy secret to buyers. For MCP set CI002_RAPIDAPI_ENDPOINT to the HTTPS RapidAPI gateway evaluate URL and RAPIDAPI_KEY, then npm run mcp.
Canonical scope: CI-002_FREEZE_SPEC_v1.0.md. See IMPLEMENTATION_POLICY.md for explicit V1 conventions and deployment state.