> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Ollaya

Run AFM-D decision models locally with [Ollaya](https://github.com/ariacompute/ollaya): install the binary, pull afm-de or afm-dd, run presets, call /api/decide, and serve a System One daemon.

[Ollaya](https://github.com/ariacompute/ollaya) runs **open decision models** locally the way Ollama runs LLMs. Give it a text or JSON **state** plus typed questions (`choice`, `score`, `noul`), and it returns calibrated probabilities in one forward pass; it never generates chat text. Pull AFM-D checkpoints by catalog name: `afm-de` (Encoder), `afm-dd` (Decoder). Weights come from Hugging Face (`ariacompute/*`) or ModelScope (`AriaCompute/*`); set `OLLAYA_HUB` to use the China mirror.

## Install

Download the binary for your platform from **[GitHub Releases](https://github.com/ariacompute/ollaya/releases)** (or `curl -fsSL https://raw.githubusercontent.com/ariacompute/ollaya/main/scripts/install.sh | OLLAYA_REPO=ariacompute/ollaya sh`).

## Ollaya CLI

Pull a checkpoint, then run a preset or call the daemon directly over HTTP.

**Encoder (`afm-de`)**

```bash theme={null}
ollaya pull afm-de
ollaya run afm-de --preset triage "I was charged twice for my subscription this month and want a refund."
curl -s http://localhost:11435/api/decide \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "afm-de",
  "state": "I was charged twice for my subscription this month and want a refund.",
  "questions": {
    "department": {
      "type": "choice",
      "instructions": "Which team should handle this?",
      "criteria": {
        "billing": "Payments, invoices and refunds",
        "technical": "Bugs, errors and outages",
        "account": "Login, profile and settings"
      }
    },
    "refund": {
      "type": "noul",
      "instructions": "Is the customer asking for a refund?"
    }
  }
}'
```

**Decoder (`afm-dd`)**

```bash theme={null}
ollaya pull afm-dd
ollaya run afm-dd --preset triage "I was charged twice for my subscription this month and want a refund."
curl -s http://localhost:11435/api/decide \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "afm-dd",
  "state": "I was charged twice for my subscription this month and want a refund.",
  "questions": {
    "department": {
      "type": "choice",
      "instructions": "Which team should handle this?",
      "criteria": {
        "billing": "Payments, invoices and refunds",
        "technical": "Bugs, errors and outages",
        "account": "Login, profile and settings"
      }
    },
    "refund": {
      "type": "noul",
      "instructions": "Is the customer asking for a refund?"
    }
  }
}'
```

The request body is the same **System One** shape as `POST /v1/systemone`: a `state` plus typed `questions`. Ollaya selects the model via the `model` field and serves the daemon at `http://localhost:11435` by default.

## Serve

Run Ollaya as a resident daemon with `ollaya serve`. It exposes a System One-compatible `POST /api/decide` endpoint and listens on `http://localhost:11435` by default. Point existing System One clients at that base URL.

## Ollaya vs Aria Engine

| | [Aria Engine](https://docs.ariacompute.com/sdks/engine-runtime.md) | Ollaya |
| - | - | - |
| Focus | Official AFM System One runtime (`aria-engine`) | Ollama-like UX for many open decision models |
| AFM-D | `afm-de` / `afm-dd` | Catalog pull + local daemon |
| Wire format | `POST /v1/systemone` | Same System One shape (`/api/decide`) |

Use Engine for the Aria Compute release binary and FFI. Use Ollaya when you want a local decision-model daemon with pull, list, and run commands.

## Related

* [AFM Foundation Models](https://docs.ariacompute.com/concepts/models.md): Encoder vs Decoder, hubs, primitives
* [Aria Engine](https://docs.ariacompute.com/sdks/engine-runtime.md): official System One runtime


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.