The licence and the runtime
The stalwart-agents wheel carries Stalwart's runtime, compiled: the reader that turns each turn into a plan, the tool check, the reply checks, the code checks, the licence and its lease, and the meters. It runs on the machine that runs your agents, so nothing a turn needs waits on the network, and your users' turns, your agents' calls and your documents stay there.
What a licence is
A licence is this machine, activated against your Stalwart account with your API key. Activation opens a lease: the runtime's permission to run for a period, renewed while the machine can reach Stalwart, and kept for a grace period when it cannot. Your plan sets how many machines may hold a lease at once, how long the lease and the grace run, and the monthly caps every machine of your account counts against together. What each plan includes is on stalwart.it.
Activating a machine
$ export QLS_API_KEY=qls_live_...
$ stalwart licence activate # once on each machine
$ stalwart licence status # the licence, the lease, the grace and the quota left
$ stalwart licence release # frees this machine's place, for another to take
A machine that cannot reach Stalwart is activated through one that can, where your plan includes offline activation:
$ stalwart licence request # on the machine to activate: writes activation-request.json
$ stalwart licence answer activation-request.json # on a machine that reaches Stalwart: writes activation-answer.json
$ stalwart licence install activation-answer.json # back on the first machine
What works without a key
Nothing in the package works without an API key and an activated licence, except what you need to get them:
stalwart licence ..., to activate, inspect and release the licence;stalwart doctor, which says that there is no key, or no licence, and how to get one;stalwart --helpandstalwart --version;stalwart check certificate.json, which checks a certificate offline, with the carried reference checker: a certificate's reader may hold no key at all.
Everything else needs both: stalwart sources build and ask, trace, verify, serve,
redteam, gateway, rules compile and catalogue import, and in Python Agent.chat, the
client's plans and checks, the reply check, the answers and the code check. Without them, each
stops with LicenceRequired (from stalwart_agents.errors), which names
stalwart licence activate and where to get a key.
The library holds the keys
The runtime holds the lease in its own memory, and checks it inside every operation it runs. The
keys that sign your tenant's bundles and histories never cross into Python, and the runtime reads
the clock and counts each operation itself. stalwart_agents._runtime, the loader underneath,
is internal: the client, the agents and the commands call it for you, and it is not a surface to
build on.
Only counts leave the machine: how many turns were read, calls checked and replies held, reported against your account's monthly caps. One total is kept for your whole account, however many machines share it.
A process holds one licence: every check, answer and plan in it is counted against that licence's
lease. A client for a second service (another base_url) in the same process is refused, saying
so; run it in a process of its own. Several processes of one machine -- a server's workers -- share
its lease and its record safely.
Computations
A plan that needs a calculation -- a total, an average, a date difference -- runs it on your own
host, in the qls-sandbox container image, when a container engine and the image are present.
Every plan includes compute runs: 100 runs and 300 seconds a month on the free plan, 10,000 runs
and 30,000 seconds on the paid plan, and no limit on enterprise. Client.compute,
AsyncClient.compute and the LangGraph compute node run on the same path. The runtime builds the
prompt from the data's shape, never its values; your own model writes the function; the runtime
admits it -- no socket, no file, no import outside a short list -- and the sandbox runs it, with no
network. Nothing of it leaves your host: the runs are counted, and the count goes in the usage
report. python -m stalwart_agents.sandbox fetches the image this release runs. Where the image is not
there, plans say compute off: in their reason, and the agent's on_unread decides what happens
to the turn (worked examples).
Where the runtime cannot run
The runtime ships for Linux (x86-64 and arm64), macOS on Apple silicon and Windows (x86-64).
Anywhere else, plans and tool checks come from the enterprise qls-router you run in your own
environment: set QLS_ROUTER_URL, or Client(router_url=...). The router holds its own lease,
so the process that calls it needs no local one for plans and checks. The same library is
embedded in the router, which serves /v1/plans, /v1/tool-checks and /v1/tool-receipts, so
an answer is the same bytes wherever it is computed. Stalwart's hosted API serves none of the
three.