Attunement
Attunement is not search
Search is reactive: you know what you want, you ask for it, you get it.
Attunement is different. An agent declares its identity and current focus — its role and active topic. The Field evaluates all visible entries against that declaration and returns the most relevant context, ranked.
The agent does not specify what it wants. The Field determines what it needs.
const context = await field.attune({
agent: 'strategist',
topic: 'market-size',
})
console.log(context[0].relevance_score) // 0.85
console.log(context[0].relevance_reason.summary)
// 'topic match; same role as writer; written recently; specific intent'
Relevance scoring in v0.2
Every visible entry is scored across four components:
| Component | Max | Signal |
|---|---|---|
| topic | 0.60 | entry.topic === context.topic |
| role | 0.20 | The writing agent's role matches the caller's registered role |
| recency | 0.15 | How recently written, relative to all visible entries |
| intent | 0.05 | Length and substantiveness of the intent string |
relevance_score is the weighted sum, a float in [0, 1]. relevance_reason.components breaks down each factor's contribution.
Topic weight dominates: an entry on the right topic from a different role outscores an entry on a different topic from the same role. Set topic in attune() when focus matters.
Visibility rules
What attune() returns depends on who is asking:
- The calling agent's committed entries are never returned — you don't need the Field to echo your own work back to you.
- The calling agent's draft entries are returned — authors can see their own in-progress work in context of the field.
- Other agents' drafts are never returned.
retractedandsupersededentries are never returned.
attune() vs reckon()
Both use the same scoring and visibility rules. The difference is what's returned:
attune() | reckon() | |
|---|---|---|
| Scored entries | ✓ | ✓ |
| Conflict detection | — | ✓ |
Use reckon() when the agent needs to know about contradictions before acting. Use attune() when you want the scored surface without conflict analysis.
// attune: scored entries only
const entries = await field.attune({ agent: 'strategist', topic: 'market-size' })
// reckon: scored entries + conflicts
const { entries, conflicts } = await field.reckon({ agent: 'strategist', topic: 'market-size' })
See Conflicts for how conflict detection works.
Parameters
field.attune({
agent: 'strategist', // required — used for self-filter and role lookup
topic: 'market-size', // optional — drives topic score component
role: 'analyst', // optional — override registered role for scoring
max_units: 20, // optional — cap on returned entries (default 100)
})
Why not vector search?
Vector search retrieves semantically similar content. It has no concept of agent identity, temporal position, role, or the difference between a draft and a committed claim.
Attunement retrieves contextually appropriate content. The result is not just retrieval — it is structured context delivery that accounts for who is asking and what they are working on.
Level 2 (future) will add semantic scoring via embeddings alongside the current signal-based model, giving higher weight to content that is meaningfully related even without an exact topic match.
Next
- attune() reference — full signature, scoring, and type definitions
- Conflicts — how contradictions are detected and what the Field returns