Skip to content

looptech-ai/sot-runtime

v0.1.0MIT

External State-of-Thought controller with evidence routing, explicit state checkpoints, uncertainty tracking, and stop/continue policy.

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_start
  • sot_add_evidence
  • sot_update_evidence
  • sot_context
  • sot_checkpoint
  • sot_status
  • sot_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:

  1. SOT_DATA_DIR
  2. PLUGIN_DATA
  3. CLAUDE_PLUGIN_DATA
  4. ~/.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