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

# Deployment topologies

> Choose local Nika, the resident firer, authenticated HTTP, an OS bridge or model serve by job.

> [!NOTE]
>
> **Live project control plane.** The released engine
> discovers `nika.yaml` from the working directory toward its
> ancestors. The file is optional when built-in defaults are enough. Its
> project-shape grammar is closed: `nika` ·
> `ceiling` · `arm` · `traces` ·
> `registry`. Direct runs and the cadence path
> (`nika arm` · `nika serve`) read the same file.

The word “server” hides several boundaries. Start with who initiates work and
what protocol crosses the process edge.

## Decision table

| Need | Use | Status | Boundary |
| - | - | - | - |
| Product code starts a workflow | local `Nika` | Published npm 0.124.1 (bundled engine) | native process |
| The project clock starts work | `nika serve` (no `--bind`) | Live | `nika.yaml arm[]` to the resident firer |
| An application admits jobs over HTTP | `Nika` + `nika serve --bind` | Published SDK · released engine | Bearer + OpenAPI · cancellation requests an action |
| The host scheduler starts work | `nika arm --emit` | Live | launchd or systemd to `nika arm fire` |
| The engine needs local inference | `nika model serve` | Live | Loopback OpenAI-compatible model API |

## Request-driven application

> [!TIP]
>
> **One client, local by default.** Import `Nika` from
> the package root and omit `url`. The client takes the engine
> from `bin`, then `NIKA_BIN` (both absolute paths), then
> the platform package npm installed with it; it never uses a
> `nika` found on your `PATH`. These examples target
> the published [0.124.1 SDK release](https://github.com/supernovae-st/nika-client/tree/v0.124.1).

```ts theme={"system"}
const run = await nika.run('workflows/support.nika', {
  inputs: { ticket: request.id },
})

for await (const event of run.events()) render(event)
const result = await run.result()
```

The application owns the user experience and cancellation. The engine owns
workflow admission, execution and the receipt. `inputs` carries literal
typed values — see [configuration](https://docs.nika.sh/sdk/reference/configuration.md) for why
the deprecated `vars` operator channel is not the app door.

## Clock-driven project

```text theme={"system"}
container / bare VM ── nika serve ──────┐
                                         ├── one firer ── run + ledger
managed host ───────── launchd / systemd ┘
```

Both lanes consume the same `arm:` registry. Choose based on who should own
process lifetime and wakeups, not because one lane changes workflow semantics.

## Inference provider

```sh theme={"system"}
nika model pull unsloth/Qwen3-4B-Instruct-2507-GGUF
nika model serve --model unsloth/Qwen3-4B-Instruct-2507-GGUF --port 8712
```

This process serves a pulled Qwen3-family model on loopback for the engine to
call (`NIKA_LLAMACPP_BASE_URL=http://127.0.0.1:8712`, then
`model: llamacpp/<model id>`). It does not accept Nika workflow jobs.

## Loopback HTTP (opt-in)

> [!NOTE]
>
> **The same client selects HTTP when `url` and
> `token` are present.** A served name such as
> `workflows/release.nika` (its path from the project root) goes
> directly to the server and needs no local engine or file. An explicit local
> path such as `./release.nika` needs a compatible local engine to
> capture an immutable snapshot. The released OpenAPI of
> `nika serve` 0.124.1 covers jobs, SSE events,
> cancellation, trace verification, the artifacts a settled job's sealed
> journal records (behind `run.artifacts()`), workflow listing,
> schedule read and write, and stateless authoring
> (`POST /v1/compile`, behind `compile()`). It has no
> `POST /v1/run`, job-list, or schedule list, delete, trigger
> or backfill route. The server owns its engine version; check its
> compatibility separately from the bundled local engine.

`nika serve --bind` is not `nika model serve`, and it is not bare `nika serve`.
The pinned OpenAPI exposes cancellation as an action; the runtime's
settlement determines the result. A settled job's artifacts, listed from its
sealed journal, download over the same door
([Outputs and artifacts](https://docs.nika.sh/sdk/remote/artifacts.md)). Job listing and
`POST /v1/run` remain absent.

## Architecture view

PROCESS TOPOLOGY · NAME THE EDGE

<pre tabIndex="0">
  application ── Nika ── native process ── nika run                 \[ LIVE ]

  &#x20;   nika.yaml ──── nika serve / OS ─────────── arm fire              \[ LIVE ]

  &#x20;   nika serve --bind ── Bearer ── jobs / SSE / cancel / workflows    \[ LIVE · artifacts · no run route ]

  &#x20;   nika engine ── OpenAI-compatible loopback ─ model serve          \[ LIVE ]
</pre>

## Continue

> [card] [Server surfaces](https://docs.nika.sh/sdk/operations/server-surfaces.md)
>
> The compact truth table for similarly named commands.

> [card] [Resident server](https://docs.nika.sh/sdk/operations/resident-server.md)
>
> Run the stable project clock.

> [card] [Remote client](https://docs.nika.sh/sdk/remote/client.md)
>
> Typed client. Measure it against the OpenAPI of the binary you hold.

> [card] [Project setup](https://docs.nika.sh/sdk/start/project-setup.md)
>
> Place control, intent, application code and state.


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