{"slug": "an-agent-runtime-where-context-is-explicit-state-you-can-read-change-and-put", "title": "An Agent Runtime Where Context Is Explicit State You Can Read, Change, and Put Back", "summary": "Developer ljedrz released nachalnik, a Rust agent runtime that treats context, tools, permissions, and requests as explicit state rather than framework-internal decisions. The runtime offers a /context view listing every item with its token cost and the reason it is excluded or elided, a /step state machine that stops at Ready so decided calls run none, and an append-only event log, with five transcripts published at ljedrz.github.io/nachalnik. The project's budget feature uses a Calibrating counter that learns from what providers actually charge, and its tool registry is live, so /tools drop shell stops offering a tool on the next request.", "body_md": "**TL;DR:** A Rust agent runtime where the context, tools, permissions, and requests are *explicit state* — not decisions made inside a framework and reported afterwards. You get a `/context` view showing every item (what it is, its token cost, whether it’s going to the model, and *why not*), a state machine you can step through one transition at a time (`/step`), and an append-only event log. The agent is  not the boss. You are.\n\nWhy It’s Different\n\n| most runtimes | nachalnik | \n|---|---|\n| Context = list of strings | Context = data structure (id, kind, source, label, content, size, state, note, metadata) | \n| “Agent decided this is relevant” | You see every item, its cost, and the *reason* it’s excluded/elided | \n| Turn = content + tool calls (flattened) | Turn preserves production order: reasoning → text → call → reasoning → call… | \n| Approve command? | `/step` stops at`Ready` — calls decided,**none run** . Read, prune, drop, or continue. | \n| Session = chat history | Session = snapshot (items, states, pins, notes, call IDs) + append-only event log | \n| Budget = estimate | Budget = `Calibrating` counter that learns from what providers*actually charge* | \n| Tools = fixed at startup | Registry is live: `/tools drop shell` stops offering it next request | \n| Model manages context? | `--introspect` hands the model`amend` (elide/exclude/revise/note/undo) — same API the UI calls | \n\nFive transcripts at **[https://ljedrz.github.io/nachalnik/](https://ljedrz.github.io/nachalnik/)**:", "url": "https://wpnews.pro/news/an-agent-runtime-where-context-is-explicit-state-you-can-read-change-and-put", "canonical_source": "https://discuss.huggingface.co/t/an-agent-runtime-where-context-is-explicit-state-you-can-read-change-and-put-back/180520#post_1", "published_at": "2026-09-16 13:20:16+00:00", "updated_at": "2026-09-16 13:43:20.962007+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["ljedrz", "nachalnik", "Rust"], "alternates": {"html": "https://wpnews.pro/news/an-agent-runtime-where-context-is-explicit-state-you-can-read-change-and-put", "markdown": "https://wpnews.pro/news/an-agent-runtime-where-context-is-explicit-state-you-can-read-change-and-put.md", "text": "https://wpnews.pro/news/an-agent-runtime-where-context-is-explicit-state-you-can-read-change-and-put.txt", "jsonld": "https://wpnews.pro/news/an-agent-runtime-where-context-is-explicit-state-you-can-read-change-and-put.jsonld"}}