Sandwalk
Dashboard & Settings

Context & Prompt Budget

Live input-token estimator across system prompts, Memory/Wiki snapshots, Skills, Tools, and MCP schemas.

Dashboard Context: live input token estimate, Knowledge Level slider, Specialist selector, and bucket breakdown

Dashboard → Context (/dashboard/context) gives you a live, byte-accurate breakdown of what is consuming your model's input context window before you even send a message.

How to Use the Context Inspector

  1. Knowledge Level Slider (Low · Medium · High):
    • Controls how much background context and tool metadata is injected by default. Prefer High for complex multi-step research, Medium for everyday tasks, and Low for fast, lightweight chats.
  2. Specialist Preview Selector:
    • Pick None (defaults) to see the token footprint of an un-scoped session, or select any Specialist (e.g., Otium, Soren, Fast Computational Scientist) to see how scoping tools, skills, and MCP servers to that Specialist reduces the input token footprint.
  3. Tokenizer Switch (tiktoken vs. Provider):
    • Compare local tiktoken (o200k_base) counts against provider-reported token counts.

Context Bucket Breakdown

The horizontal distribution bar and table break down your session-start context into six buckets:

BucketWhat it containsHow to optimize
System prompt (USER + BASE)Sandwalk base instructions, Deep Agents base prompt, and your frozen Memory, Wiki TOC & Ontology snapshot (USER.md + MEMORY.md + PRIORS.md)Bounded automatically (~3.5k chars max) so it stays around ~1–1.5k tokens and keeps KV prefix caches warm.
Deep Agents middleware promptsLightweight planning and runtime coordination rulesFixed minimal overhead (~25 tokens).
Domain / runtime tool schemasJSON schemas for enabled Core and Extra Sandwalk toolsKeep extra tools disabled globally in Dashboard → Tools and enable them per Specialist.
MCP tool schemasTool definitions exported by active MCP servers in ~/.sandwalk/mcp.jsonLarge MCP catalogs (300+ tools) can consume 100k+ tokens if all enabled at once. Toggle unused MCPs off in Dashboard → MCPs or scope MCPs to specific Specialists.
Deep Agents builtin tool schemasBuilt-in file/todo/execution primitivesMinimal fixed footprint (~700 tokens).
Skills index (progressive disclosure)Compact name + 1-line description list of installed skillsOnly the compact index (~2k tokens) is in the prompt; full SKILL.md bodies load on demand when invoked.

Last updated on