What should I put in cached prefix?
System prompt, project conventions, stable reference docs, anything identical across turns. Keep it byte-stable; edits bust the cache.
Glossary · Prompt Caching
Pay full price once for stable context.
The short answer
Prompt caching stores the stable prefix of a context (system prompt, conventions, reference docs) so repeat turns serve it at ~10% of fresh-token price on Claude-class APIs.
It never shrinks a single request, but across long sessions the 90% saving compounds hard, since stable layers re-bill every turn. Rule: keep unchanging context byte-stable and first, so cache hits; engineer the dynamic layers (retrieval, memory) separately.
Prompt Caching, working
Candidates are ranked and packed into a fixed budget by value per token; the rest stays on disk.
11 of 14 served, 3,310 of 4,096 tokens.
anvaya-mind-rs/crates/mind-services/src/quorum.rs · mind-types/src/config.rsIn Anvaya
Questions
System prompt, project conventions, stable reference docs, anything identical across turns. Keep it byte-stable; edits bust the cache.
No, cached noise still dilutes attention. Caching cuts price; curation protects quality. Do both.
Cached input ~10% of fresh price. In sessions with 20+ turns and large stable prefixes, totals drop dramatically.
23.4 MB median own-process memory, measured across 1030 runs (994 verified) and fourteen harnesses. One command installs the harness and the Mind together. Nothing leaves your machine on the Ollama path.
Developer beta. macOS on Apple Silicon and Linux on x86_64 or arm64. Memory figure: --no-mind, macOS/ARM, n=3 per cell. Pre-1.0, pricing not set.