SoT Runtime
SoT Runtime is an external State-of-Thought controller that works as a Claude Code plugin and as an OpenAI Agent Plugin for Codex/Astra.
Why external state
Closed model APIs do not expose the hidden activations needed to implement hidden-state SoT exactly. This plugin instead gives the host model a durable, explicit state machine:
- progress
- consistency
- uncertainty
- state change
- evidence selection
- contradiction pressure
- stop / continue / revisit policy
The host model never needs to reveal private chain-of-thought. It checkpoints concise task state only.
MCP tools
sot_startsot_add_evidencesot_update_evidencesot_contextsot_checkpointsot_statussot_finish
Runtime
Node.js 20+ is the only runtime requirement. There are no npm dependencies and no outbound network calls.
Run it with npx
The package exposes a sot-runtime bin, so any MCP client can start the server without a checkout once it is published to npm:
npx -y @looptech-ai/sot-runtime
{ "mcpServers": { "sot": { "command": "npx", "args": ["-y", "@looptech-ai/sot-runtime"] } } }
The core, store and tool modules are also importable for embedding or testing:
import { newSession, checkpoint, selectContext } from '@looptech-ai/sot-runtime/core';
Persistence
The server uses, in order:
SOT_DATA_DIRPLUGIN_DATACLAUDE_PLUGIN_DATA~/.sot-runtime
Session files are written with user-only permissions where the platform supports them.
Test
npm test
npm run validate
npm run bench # deterministic policy scenarios + micro-benchmarks; see ../../docs/BENCHMARKS.md