# @leumas/leviathan-runtime

The Leviathan runtime (API side): bots registry + chat router now; perception→rules→action + agent tools land in P5. Mounted by leumas-api at /leviathan.


The Leviathan runtime (API side), mounted at `/leviathan`. **P2-ready core:** a bots registry + a chat
router with a pluggable `complete()` LLM fn, so the `@leumas/leviathan` widget works end-to-end today.

**P5 grows this into:** the full perception→rules→action runtime + agent tools, feeding from
`x-leviathan-realtime` + `ollama` adapter + `ollama-tools` + `leumas-flow-recorder`.

```js
import { createLeviathanRouter } from '@leumas/leviathan-runtime';
app.use('/leviathan', createLeviathanRouter({ bots, complete: myOllamaComplete }));
```

Bots are programmed & priced in Studio; pass `gate: requirePassNode()` to meter each turn.


---
Source: shared/engines/leviathan/README.md
Canonical: https://docs.leumas.tech/p/engines/leviathan-runtime
