---
title: Introduction
description: Create rules you can inspect. Send your model with each case and receive an answer you can trace.
icon: book-open
---

aityx is a **decision API for AI applications and agents**. Turn your business rules into a model you can
inspect and test. Send that model with a case to get an answer, calculated amounts and dates, and a
**receipt** showing the inputs and rules behind the result.

You control the rules your application runs. Keep the reviewed model in your own code or storage, test a
revision against the same cases, and switch when the results meet your expectations.

## Create the rules. Send them with every case.

<figure className="aityx-diagram">
  <picture className="aityx-diagram-light">
    <source media="(max-width: 640px)" srcSet="/docs/diagrams/how-aityx-works-mobile.svg" width="520" height="1140" />
    <img src="/docs/diagrams/how-aityx-works.svg" alt="Build and review a model, then keep its content and questions in your application. Each execution sends that model with state to aityx and returns answers with an inline receipt. Your application keeps the original inputs and receipts for comparison." width="920" height="590" decoding="async" />
  </picture>
  <picture className="aityx-diagram-dark">
    <source media="(max-width: 640px)" srcSet="/docs/diagrams/how-aityx-works-mobile-dark.svg" width="520" height="1140" />
    <img src="/docs/diagrams/how-aityx-works-dark.svg" alt="Build and review a model, then keep its content and questions in your application. Each execution sends that model with state to aityx and returns answers with an inline receipt. Your application keeps the original inputs and receipts for comparison." width="920" height="590" decoding="async" />
  </picture>
  <figcaption>Matching JSON runs directly on the decision engine. Text or unresolved facts may need AI extraction first.</figcaption>
</figure>

**[Run your first policy](/docs/quickstart)**

Calculate an invoice payment, test the date cutoff and check a new discount.

**[Call it from code](/docs/guides/call-from-code)**

Send your complete model from JavaScript or Python and keep the receipt.

## Start with what you have

- **Questions and a sample case.** Get a model, answers and a receipt in your first call.
- **A prompt or policy document.** Draft a model, then inspect and test it before your application uses it.
- **Rules you write yourself.** Define the JSON or edit a generated model, and validate it before execution.

Already using Jev? Keep the questions-and-state request format as your starting point. See
[Coming from Jev](/docs/coming-from-jev) for response, confidence and pricing differences.

## Run the model you reviewed

Keep the complete returned `model`: **`content` contains the executable rules; `questions` defines the
answers to return**. Every execution submits that object with `state`, the facts for the current case.
See [Models](/docs/concepts/models) for the distinction.

With matching JSON inputs, the engine executes directly, with no AI reader or generator. Text or other
data may need the reader to establish typed facts first. The receipt separates supplied facts from
extracted ones; unresolved required facts stop execution. See [State](/docs/concepts/state).

Supplying the full model selects System One execution pricing. Questions-based calls use System Two
pricing, including cache hits. Input extraction is an additional System Two charge. The endpoint name
does not determine the rate; [Pricing and limits](/docs/resources/pricing-and-limits) explains the details.

## Keep the evidence. Check a change.

Save the **model, original input and receipt** together. The receipt identifies the rules that fired; your
application keeps the original case for later tests. Run saved inputs against the original and revised
models to see what changes before replacing the file your application uses.

The console holds decision data during the current session. Download your work before refreshing or
leaving. Temporary model caches speed up repeated requests, but are not a saved-model library or receipt
history. Accounts and billing records are retained separately.

## Go deeper

**[Questions](/docs/concepts/questions)**

Define choices, yes/no answers, scores, numbers and dates.

**[Receipts](/docs/concepts/receipts)**

Read the evidence behind the recorded invoice result.

**[Compare revised rules](/docs/guides/revise-and-replay)**

Run the same cases against two model files.

**[Model format](/docs/resources/model-format)**

Read and write the executable definition.
