Skip to content
aityx
Esc
↑↓navigate↵open⌘Jpreview
On this page

Decisions with calculated answers

The six console examples: three native decisions and three Jev + aityx decisions.

Return the outcome and the calculation together. Use structured application facts directly, or combine Jev’s interpretation with amounts, dates and conditions in an aityx model.

The console offers six original examples with fictional terms. The table below contains actual results recorded on the local development API on October 6, 2026.

Pure aityx: application facts in, calculated answers out

These examples send a native decision and matching state to System One. They use no Jev or AI reader.

Console example Case Recorded answer Complete request
Invoice payment Approved $25,000 invoice, paid on day 10 Discount $500; pay $24,500 JSON
Expense claims $184 for three people, submitted after 41 days Manager review; cost per person about $61.33 JSON
SLA outage credit 98.5% uptime, $200 fee, claim after three days 25% credit; $50 JSON

Jev + aityx: read the message, apply the calculation

These examples send top-level Jev questions, a native decision, and one shared state to System One. Jev supplies evidence; aityx computes the result from it and the business facts.

Console example Case Recorded answer Complete request
Refund or store credit Damaged-item email, $129 order, reported after three days Refund; $129 JSON
Travel delay claim Weather delay of 5h40, Silver tier, no overnight stay €35 payout JSON
Discount approval 22% requested, three years, 400 seats, competitor pressure and upfront payment Allowed band 21%; VP review JSON

Jev evidence can vary on a new call. Each native model explicitly handles the evidence it uses, including a 0.8 threshold for affirmative Noul observations. The API does not turn probabilities into booleans automatically. See Using Jev with aityx.

Run any example from code

Replace sla with invoice, expense, refund, travel or discount:

curl --fail -sS https://aityx.ai/docs/examples/sla-request.json > example-request.json

curl --fail-with-body -sS https://api.aityx.ai/v1/systemone \
  -H "Authorization: Bearer $AITYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d @example-request.json > example-response.json

jq '{answers, receipt, usage, decision_error}' example-response.json

All six use System One rates. A combined request includes Jev in the same charge; check status for a partial failure. In the console, open Examples, choose a card and Execute.

Subscription refunds: the homepage walkthrough

The homepage uses a separate original subscription model built with the Assistant. Its quickstart returns a $20 refund and October 28 deadline, then changes unused days and acceptance date to show $30 and October 29.

It demonstrates both native System One execution and System Two interpretation of a customer message. The console’s Refund or store credit example instead uses Jev to assess damage. These are two different examples, with different terms and execution paths.

Service credits

The console’s SLA example credits 50% below 95% uptime, 25% below 99%, and 10% below 99.9%. Scheduled maintenance is excluded, and claims must arrive within 30 days. At 98.5% uptime on a $200 fee, the calculation is $200 × 25% = $50. Exactly 99.9% earns zero.

Uptime and dates come from monitoring/account facts. A complaint alone should not supply those values. If those facts are instead in evidence your application needs interpreted, use System Two decisions.

Expense claims

The console example uses a $75 per-person limit, a $500 total limit, a receipt requirement above $75 total and a 30-day submission window. A $184 claim for three people is within the per-person limit, but submission after 41 days requires manager review.

The native cost_per_person calculation returns 61.333333333333336; $61.33 is its display rounded to cents. This console model returns elapsed_days, not a submission deadline. The homepage’s illustrative April 1 deadline is March 2 plus 30 days; add a Date decision if your application needs that answer too.

The recorded invoice guide supplies a second native model with a calculated discount deadline. Your application performs any payment, refund or other action; aityx returns the answer.

Was this page helpful?