Beliefs don't just track what's true. They surface what's unknown, what's assumed without evidence, and what connections nobody has made yet.
Every example below follows the same loop:
1Agent observes → Beliefs extracted → Contradictions detected → Understanding deepens → Next move suggestedMultiple agents contribute to the same belief state. Each sees a different slice. The fused world state reveals what no single agent could see alone.
In each example, the agents share a namespace and use writeScope: 'space' so every observation lands in one fused belief state.
Codebase Understanding
Three agents explore a legacy codebase: a code analyst, an architecture agent, and a runtime profiler.
1. Code analyst reads the auth module
1import Beliefs from 'beliefs'
2
3const analyst = new Beliefs({
4 apiKey: process.env.BELIEFS_KEY,
5 agent: 'code-analyst',
6 namespace: 'legacy-auth-audit',
7 writeScope: 'space',
8})
9
10const delta = await analyst.after(
11 'Auth module has 3 token validation paths. Path A uses JWT with RS256. ' +
12 'Path B uses custom HMAC with hardcoded keys. Path C checks a session cookie ' +
13 'but never validates expiry. 14 services import this module.'
14)
15// delta.changes.length → 5
16// delta.readiness → 'low'A blind-spot surfaces: nobody has asked whether Path C is intentional. "14 services import this module" is labeled load-bearing.
2. Architecture agent maps dependencies
1const architect = new Beliefs({
2 apiKey: process.env.BELIEFS_KEY,
3 agent: 'architecture-agent',
4 namespace: 'legacy-auth-audit',
5 writeScope: 'space',
6})
7
8const delta = await architect.after(
9 'Only 6 of 14 services use JWT. 5 use HMAC for internal auth. ' +
10 '3 services use Path C — all are customer-facing payment APIs. ' +
11 'Path C has no test coverage. HMAC keys last rotated 18 months ago.'
12)
13// delta.changes.length → 6
14// delta.readiness → 'medium'Path C handles payment flows with no expiry validation. The infrastructure labels this tension.
3. Runtime profiler discovers the unexpected
1const profiler = new Beliefs({
2 apiKey: process.env.BELIEFS_KEY,
3 agent: 'runtime-profiler',
4 namespace: 'legacy-auth-audit',
5 writeScope: 'space',
6})
7
8const delta = await profiler.after(
9 'Path C handles 73% of all auth requests. It was a "temporary bypass" added during ' +
10 'a migration 2 years ago. The migration completed but the bypass was never removed. ' +
11 '4.2M active sessions use this path right now.'
12)
13// delta.changes.length → 5
14// delta.readiness → 'medium'A limiting-belief is identified: the team assumed "JWT is our auth." In reality, 73% of traffic runs on a forgotten bypass.
4. The world reveals itself
1const world = await analyst.read()
2
3world.beliefs
4// [
5// { text: 'Path C handles 73% of auth traffic', confidence: 0.92, label: 'load-bearing' },
6// { text: 'JWT is the primary auth mechanism', confidence: 0.15, label: 'limiting-belief' },
7// { text: 'Path C has no session expiry', confidence: 0.85, label: 'blind-spot' },
8// ]
9
10world.edges
11// [
12// { type: 'contradicts', source: 'JWT is the primary auth...', target: 'Path C handles 73%...' },
13// { type: 'supports', source: 'Deploy changed cache headers...', target: 'Root cause: CDN...' },
14// ]
15
16world.clarity // 0.58
17world.moves
18// [{ action: 'research', target: 'Audit Path C session security', reason: 'Payment-facing path with no expiry on 4.2M sessions', value: 0.96 }]Three agents, each seeing a different slice, built a picture none of them could have seen alone.
What Beliefs Reveal
| What you get | Memory | Beliefs |
|---|---|---|
| What you don't know yet | Nothing | Gaps + thinking moves |
| Hidden assumptions | Silent | limiting-belief, risky-assumption labels |
| Connections across sources | Manual | Edges: supports, contradicts, derives |
| What to investigate next | Nothing | Ranked moves with expected info gain |
| Multi-agent understanding | Separate stores | Fused world state |
| How understanding evolved | Append-only log | Per-belief trace with confidence shifts |