thinkmode
v0.1.1
Published
Structured debugging for LLM reasoning flows
Readme
thinkmode
Structured debugging for LLM reasoning flows.
Installation
npm install thinkmodeUsage
import { createFlow } from 'thinkmode'
const flow = createFlow({
onStep: (step) => console.log(step),
onComplete: () => console.log('Done!')
})
flow.input('hello')
flow.intent('greeting')
flow.response('hi')API
createFlow(handlers?)
Creates a new flow instance.
Handlers:
onStep(step)— Called after each steponComplete()— Called when response is emittedonError(err)— Called on errors
Flow Methods
input(text)— Log user inputintent(text)— Log detected intenttool(name, input, output?)— Log tool callscratchpad(text)— Log reasoning/scratchpadresponse(text)— Log final responseerror(err)— Log errorexport()— Get all recorded stepsreplay(speed?)— Replay steps at speed (default 1)
License
MIT
