Skip to main content

Ratatosk

Platform session runtime for the Willow fleet — the process that runs agent turns on any node (desk, laptop, Termux phone) and speaks MCP to willow-mcp.

Role

Ratatosk is not memory (Nestor), not the desk (Grove). It is the session process: prompt → tools → loop, Grove lifecycle events, JSONL working set, tier-0 deposit sync.

Install

pip install "willow-ratatosk[mcp,cloud,local]"
# development
pip install -e ".[dev]"

Run

ratatosk --local
ratatosk --mcp
ratatosk --mcp --listen
ratatosk --mcp --deposit

--onescript — the one script's model seat

ratatosk --onescript --served served.json --out proposals.jsonl \
    [--model gemma3:4b] [--rung ollama] [--ctx 4096] "<task>"

One local model turn over a document serve wrote. It is a different program sharing the entry point: no MCP, no Grove events, no session JSONL, no hooks, no CLAUDE.md or repo file in the prompt, none of the built-in tools. The model sees one fixed system prompt, the served document as framed data in the user turn, and one tool.

Rule What it means
Local rungs only A rung is local when its base_url is loopback and its dialect is ollama or openai (an OpenAI-compatible server such as llama.cpp). A cloud rung, a cloud model name, or a ladder with no local rung is refused with exit 2 before any request.
One tool, one write propose(path, data, cites, claim) appends one line {"path", "data", "cites", "claim"} to --out. That file is the only thing written. Any other tool name is refused and recorded in the transcript, never run. A malformed call (absolute or .. path, non-list cites, over-size field) is handed back as refused: and not written. At most 16 proposals per run.
Three states populated, empty and unreachable reach the model as themselves. A missing, unreadable or non-served file is unreachable; serve's own empty stays empty. < is escaped so served text cannot close the frame, and serve's return line is carried through.
Budget The served block is sized from the model's context: --ctx, else the rung's own answer (Ollama /api/show num_ctx, llama.cpp /props), else 4096 (the phone budget), minus the frame, the task and an answer reserve. Over budget the block becomes empty ("narrow the stack"). It is never truncated. For Ollama the measured window is sent as num_ctx, so the budget is the window the model runs with.
Bounded --max-turns (default 4) and --wall-clock seconds (default 180). A cap or a timeout ends the turn with a recorded reason.
No path The served file's path is read by code and goes nowhere else: not into the prompt, not into the summary line.

The last line printed is the summary: [onescript] model=… rung=… ctx=… (flag|rung|default) served=… proposals=N turns=T end=…. -v prints the transcript (including refused tool calls) to stderr; nothing is written for it. End reasons: done, turn_cap, wall_clock, timeout, provider_error:<kind>, crash:<Class>. Exit status: 0 the model finished, 1 the turn ended early, 2 refused before any request. --out is created empty when the run starts, so "ran, proposed nothing" differs from "never ran".

Environment

Var Default Purpose
RATATOSK_GROVE_CHANNEL (disabled) Grove channel for session events
RATATOSK_MCP_COMMAND python -m willow_mcp MCP server command
RATATOSK_APP_ID ratatosk MCP app_id
WILLOW_HOME $WILLOW_HOME or XDG share Session data under $WILLOW_HOME/ratatosk/
OLLAMA_URL http://localhost:11434 Local inference
ANTHROPIC_API_KEY — Cloud mode

willow-mcp registration

Ratatosk is a platform session identity, not a dispatch specialist. Install its manifest under $WILLOW_HOME/mcp_apps/ratatosk/manifest.json (example in docs/mcp-manifest.example.json). Without this, Grove tools deny with app_id=ratatosk.

Org home

Canonical repo: willow-memory/ratatosk (Platform face, sibling to willow-mcp and kartikeya).

Playground launcher: safe-app-store-public/apps/ratatosk.

Metadata

Release files for willow-ratatosk 1.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for willow-ratatosk 1.13.0
File Size Uploaded
willow_ratatosk-1.13.0.tar.gz 292.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for willow-ratatosk 1.13.0
File Interpreter ABI Platform
willow_ratatosk-1.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 426.7 kB

Release files / willow_ratatosk-1.13.0.tar.gz

Download URL willow_ratatosk-1.13.0.tar.gz
Size 292.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a191167f703d61fde826b6051c9a95b0b93a0d7dd82023edd9c44efd73be2454
BLAKE2b-256 checksum
How to use checksums
7f72a47c5978c403d03cb4a1edf4eb2b97cda02714b1230358dcdc60b75a96ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / willow_ratatosk-1.13.0-py3-none-any.whl

Download URL willow_ratatosk-1.13.0-py3-none-any.whl
Size 134.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd5079e63b05b802dd2008513890b9780672b910e09b615a7aec1a056c8ef7dc
BLAKE2b-256 checksum
How to use checksums
a2332c0b0ff810e32b63509f42278596a5eebe082c8aec72dfa28d8417db1ab6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page