Zero runtime dependencies, a core you can read in one sitting, a bounded autonomous tool loop, streaming, async, conversation memory — and an honest feature list. The page below runs the real wheel from PyPI inside your browser.
No install, no API keys. Click Boot runtime and this page loads CPython (WASM)
plus nexusagent-runtime==1.9.1 straight from PyPI.
The “model” is a small scripted router so everything stays offline and deterministic — the
agent loop, tool execution, memory and streaming are the real package code, traced line by line.
who start first in chess? black or white or why is the sky blue? — routes arithmetic like
what is 144 / 12 through the real calculator tool loop, remembers
my name is … across runs, suggests the closest topic when it misses, and falls back honestly on
anything else — deterministic, zero API keys.
Everything below is contract-tested; the public surface is pinned by CI (ADR 0010).
The whole core is the Python standard library. pip install nexusagent-runtime pulls nothing else.
Providers request tools; the agent executes and re-invokes them, bounded by max_iterations.
Opt-in Memory: in-process FIFO or persisted SQLiteMemory — remembered turns compose into each prompt.
SSE text deltas from OpenAI, Anthropic and Gemini adapters, sync and async, through on_delta.
AsyncAgent/AsyncRuntime mirror every sync contract; sync providers keep working via a thread bridge.
Transient HTTP failures retried with exponential backoff, full jitter and Retry-After support.
SemVer over the full root surface; a CI-pinned test fails on any accidental removal, rename or silent addition.
py.typed, mypy --strict clean, 1350+ offline tests, 99.6%+ coverage with a 95% CI floor.
from nexusagent import create_application_runtime
runtime = create_application_runtime() # offline `fake` provider
result = runtime.run("Hello NexusAgent")
print(result.output) # fake response: Hello NexusAgent
print(runtime.execute_tool("calculator", "2 + 3")) # 5
from nexusagent import SQLiteMemory, create_runtime
memory = SQLiteMemory("session.db", max_turns=50)
runtime = create_runtime(memory=memory)
runtime.run("My name is Sara")
memory.close() # a later process…
memory = SQLiteMemory("session.db", max_turns=50)
runtime = create_runtime(memory=memory)
print(runtime.run("What is my name?").output)
# the model still knows — the file remembers
Every decision that shaped the runtime is recorded, dated and linked.