Glossary · Just-in-Time Retrieval

Just-in-Time Retrieval.

Look it up the moment it matters.

Direct answer

Instead of preloading everything relevant up front, the agent holds lightweight identifiers (paths, symbols, queries) and pulls full data through tools at runtime — grep/glob navigation, definition lookups, scoped searches. It mirrors human engineering (index in head, details on demand) and keeps the window task-shaped: identifiers travel cheaply, source appears once, briefly, where located. Hybrid form: instruction files up front, everything else on demand.

In Anvaya

How We Implement It.

01Just-in-Time RetrievalAnvaya pairs repomap PageRank (who-calls-what without reading files) with Prism's six-stage retrieval — locate first, read last, read little.

Questions

Asked About Just-in-Time Retrieval.

Q

When should I preload instead?

Standing conventions and the active task spec — small, stable, always-relevant. Everything else just-in-time.

Q

Doesn't exploration cost tokens too?

Far less than preloading: identifiers and short lists cost hundreds of tokens; the files they replace cost tens of thousands.

Q

What breaks just-in-time?

Stale indexes (must track the branch) and semantic questions ('where is retry handled conceptually') — pair graph traversal with meaning search.

Stop Starting From Zero.

One binary. 11+9 Rust crates. 545 tests. Hand-written HNSW index. Three transport modes. Four providers, Ollama, Anthropic, OpenAI, Siemens. Zero API keys required to start. Mind remembers everything after the first session.