What a Belief Is
A belief is a structured assertion your agent holds about the world. It has a type, a confidence score, and an optional label for richer categorization.
1{
2 id: 'belief_market_size',
3 text: 'Market size is $4.2B',
4 type: 'assumption',
5 confidence: 0.85,
6 label: 'risky-assumption',
7 createdAt: '2024-03-15T10:30:00Z',
8}- text. The natural language assertion.
- type. What kind of belief:
claim,assumption,risk,evidence,gap,goal. - confidence. A 0–1 score reflecting the current evidence balance.
- label. A semantic label for richer categorization:
risky-assumption,load-bearing,limiting-belief,pain-point,opportunity, etc.
Belief Types
| Type | Use case |
|---|---|
claim | An assertion supported or refuted by evidence |
assumption | Something taken as true without direct evidence |
risk | A potential negative outcome |
evidence | A data point or source that supports/refutes other beliefs |
gap | Something the agent has not investigated yet |
goal | What the agent is pursuing |
The system assigns types automatically during extraction. You can also specify a type when adding beliefs manually via beliefs.add(text, { type: 'assumption' }).
How Confidence Works
Confidence reflects the balance of evidence behind a belief. When new evidence arrives, confidence shifts. How much depends on the evidence quality.
A Gartner report citing $4.2B market size carries more weight than an agent's inference from incomplete data. Both update beliefs, but by different amounts.
Evidence Types
Different evidence types carry different weight:
| Type | Description |
|---|---|
measurement | Audited metric, verified data point |
citation | Research report, external source with provenance |
user-assertion | User explicitly stated this |
expert-judgment | Expert opinion with rationale |
inference | Agent-derived inference from available data |
assumption | Explicit assumption, no supporting evidence |
A single verified measurement shifts confidence more than several inferences. The SDK calibrates the weight of each type so that evidence quality matters, not just volume.
Direction
Every piece of evidence has a direction:
- supports. Increases confidence in the claim.
- refutes. Decreases confidence in the claim.
- neutral. Adds information weight without shifting direction.
When the research agent finds a Gartner report supporting "Market size is $4.2B," confidence increases. When it finds an SEC filing showing a smaller number, that refuting evidence decreases confidence. Both are captured. Nothing is discarded.
Extraction
The SDK extracts beliefs automatically when you pass output to after. You do not need to parse agent outputs yourself.
1// Beliefs are extracted from the output automatically
2const delta = await beliefs.after(result.text)With an adapter, the lifecycle is wired up for you:
1const agent = createAgent({
2 hooks: beliefsHooks(beliefs, { capture: 'all' }),
3})Manual Assertion
When you have domain-specific knowledge, you can add beliefs explicitly:
1await beliefs.add('Market size is $4.2B', {
2 confidence: 0.85,
3 type: 'assumption',
4})Manual assertions and automatic extraction feed the same update pipeline.