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
  • Start Here
  • Introduction
  • Install
  • Quickstart
  • Hack Guide
  • FAQ
  • 1. The Problem
  • 2. Memory vs Beliefs
  • 3. Drift
  • 4. Worked Examples
  • Overview
  • Core API
  • Reads
  • Moves
  • Forecast
  • Tools
  • Trust
  • Streaming
  • Auth
  • Scoping
  • Loop Patterns
  • Patterns
sdk/trust.mdx

Trust

Override agent and source reliability at runtime.

beliefs.trust.* lets the user adjust how much weight an agent or evidence source carries during fusion. Every override is a stated rating (confidence, strength) that the engine combines with other overrides at fusion time — see behavioral contract #13 for the guarantee.

When to use it

  • A user disables an agent: set confidence: 0, strength: 100, lock: true.
  • A user trusts a domain expert agent above the default: confidence: 0.95, strength: 50.
  • A source category (e.g. social media) should attenuate weight: set on { kind: 'source', id: 'social' }.

Without an override, agents start from the engine's calibrated prior. Overrides replace that prior for the targeted entity only — every other agent and source is unaffected.

beliefs.trust.set(target, options)

Idempotent upsert.

1await beliefs.trust.set(
2  { kind: 'agent', id: 'risk-bot' },
3  { confidence: 0.4, strength: 25 },
4)
5
6// Hard-disable an unreliable source (locked overrides never drift):
7await beliefs.trust.set(
8  { kind: 'source', id: 'rumor-mill' },
9  { confidence: 0.0, strength: 100, lock: true },
10)

Parameters:

FieldTypeWhat it does
target.kind'agent' | 'source'Which entity type.
target.idstringEntity identifier.
options.confidencenumberMean of the user prior, in [0, 1].
options.strengthnumberHow sure you are in this rating (higher → harder for learned data to drift it). Typical 10–500.
options.lockbooleanWhen true, the engine never drifts this rating with newly-learned data.

Returns the persisted TrustOverride.

beliefs.trust.list(options?)

1const all = await beliefs.trust.list()
2const agentsOnly = await beliefs.trust.list({ kind: 'agent' })

Returns TrustOverride[].

beliefs.trust.get(target)

1const override = await beliefs.trust.get({ kind: 'agent', id: 'risk-bot' })
2if (override) console.log(override.confidence, override.strength)

Returns TrustOverride | null (null when no override exists).

beliefs.trust.unset(target)

Remove an override. The entity reverts to the engine's calibrated prior at the next fusion step.

1const { removed } = await beliefs.trust.unset({ kind: 'agent', id: 'risk-bot' })

Returns { removed: boolean }.

TrustEntity and TrustOverride shapes

1interface TrustEntity {
2  kind: 'agent' | 'source'
3  id: string
4}
5
6interface TrustOverride {
7  entity: TrustEntity
8  confidence: number      // [0, 1]
9  strength: number        // ≥ 0
10  locked: boolean
11  updatedAt: string
12}

Auth

The trust namespace requires apiKey or scopeToken auth. serviceToken callers cannot mutate user-scoped trust. See Auth.

Validation

set() validates inputs synchronously — confidence must be in [0, 1], strength must be non-negative, and target.kind must be 'agent' or 'source'. Invalid inputs throw TypeError before any network call.

PreviousTools
NextStreaming

On this page

  • When to use it
  • beliefs.trust.set(target, options)
  • beliefs.trust.list(options?)
  • beliefs.trust.get(target)
  • beliefs.trust.unset(target)
  • TrustEntity and TrustOverride shapes