beliefs SDK
A structured world model your agent keeps across turns. It tracks claims, confidence, evidence, contradictions, and ranked next moves to manage drift and seek the truth.
npm i beliefsWorks withClaude Agent SDK·Vercel AI SDK·OpenAI·any LLM
thinkn.ai/llms.txt—give this to your coding agent
The core loop
before loads what your agent currently believes. after updates it from the turn's output.
clarity 0.42 → 0.71 · 2 contradictions surfaced · 1 gap closed
Go deeper
Get your key, install, and build — framework recipes for Vercel AI, Anthropic, OpenAI, and more.
Why memory and RAG don't fix multi-turn drift, and what beliefs change.
5-minute install. Your first belief turn.
The five primitives that make up a world model: beliefs, intent, clarity, moves, world.
The full API: before, after, add, read, and the patterns that compose them.
Drop-in for Claude Agent SDK, Vercel AI SDK, OpenAI, and any LLM.
How beliefs play out in finance, health, engineering, and science.
How fusion math, freshness decay, and the append-only ledger actually work. Trust-weighted, order-independent, replayable.
30-minute build: a research agent that knows what it doesn't know.