retrieve stateless but exposes the handful of primitives those
loops need, all optional and capability-gated (absent ⇒ classic behaviour,
no wire break).
The primitives
Sessions
An opaque
sessionId threads many retrieves in one trajectory so the server
can dedup already-seen hits and cache frontier/plan state. Gated by
session. See retrieve §sessions.Confidence
A normalised
[0,1] Hit.confidence — comparable across calls — that
corrective and adaptive systems threshold on. Gated by retrieve.confidence.Granularity & level
unit (chunk · document · node · triplet · path · subgraph · community ·
tree-node · page) and level (RAPTOR depth, Leiden level) select what and
how abstract a hit is.Token budget
tokenBudget packs top hits until they fill N tokens instead of a fixed k
— long-context readers and the chunk-explosion problem.Provenance
Hit.provenance carries graph/tree lineage (path · nodes · edges · leaves)
for auditable, path-level citation.Mapping SOTA systems to RCP
The canonical loop
Every one of these is a client policy over standard RCP methods — RCP supplies the efficient state handle, not the agent:RCP deliberately does not prescribe an agent policy — when to stop, how to
route, what reward to assign. It exposes only the primitives (sessions,
confidence, granularity, budget, provenance, feedback, memory) that make an
agentic loop efficient and auditable. The reasoning stays in the client.