thinkn
  • Product
    Manifesto
    The reason we exist
    Founder Studioprivate beta
    Make better product decisions faster
    Belief SDKinvite only
    Add belief states to your AI system
    Request Access →Join the private beta waitlist
  • Docs
  • Pricing
  • FAQ
  • Docs
  • Pricing
  • FAQ
Sign In
Welcome
  • Hack Guide
  • Introduction
  • Install
  • Quickstart
  • FAQ
  • The Problem
  • Memory vs Beliefs
  • Drift
  • Examples
why/example.mdx

Example

How beliefs reveal what agents don't know yet — and guide them toward discovery.

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 suggested

Multiple 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 getMemoryBeliefs
What you don't know yetNothingGaps + thinking moves
Hidden assumptionsSilentlimiting-belief, risky-assumption labels
Connections across sourcesManualEdges: supports, contradicts, derives
What to investigate nextNothingRanked moves with expected info gain
Multi-agent understandingSeparate storesFused world state
How understanding evolvedAppend-only logPer-belief trace with confidence shifts

Core API

The full SDK reference.

Learn more

Patterns

Integration patterns for your agent.

Learn more
PreviousDrift
NextBeliefs

On this page

  • Codebase Understanding
  • 1. Code analyst reads the auth module
  • 2. Architecture agent maps dependencies
  • 3. Runtime profiler discovers the unexpected
  • 4. The world reveals itself
  • User Intent Discovery
  • 1. Researcher captures what users say
  • 2. Behavior analyst reveals what users actually do
  • 3. The hidden need emerges
  • Market Reality
  • 1. Research agent captures the consensus
  • 2. Signal analyst finds what the reports miss
  • 3. The hidden market appears
  • Customer Understanding
  • 1. Support agent reads the complaint
  • 2. Usage analyst reveals the real story
  • 3. The opportunity surfaces
  • What Beliefs Reveal