@zack/react-loop

Portable ReAct loop for reasoning over context, taking actions, reflecting on results, and iterating until completion or handoff.

Install
agentpm install @zack/react-loop@0.1.0
Load
import { loadLoop } from '@agentpm/sdk';
const loop = await loadLoop('@zack/react-loop@0.1.0');
Weekly installs
0
0%
Last publish
Today
v0.1.0
Phases
reason
Entry
Assess the current context, form the next action plan, and decide whether to proceed into execution, continue reasoning, or hand off.
Access intent
Tools: blockedKnowledge: allowedMemory read: allowedMemory write: allowed
Outcomes
  • act
    The next step is clear enough to move into execution.
  • reason-more
    The loop should continue reasoning because the next action plan is not yet strong enough.
  • handoff
    The work should hand off because the current runtime lacks authority, context, or the right surface to continue.
act
Implicit complete
Execute the current plan, gather the new observations, and update working state so the next reflection pass has concrete results to inspect.
Access intent
Tools: allowedKnowledge: allowedMemory read: allowedMemory write: allowed
This phase does not declare explicit outcomes, so it falls through to an implicit complete outcome.
reflect
Evaluate the latest action result, decide whether the work is complete, needs another reasoning pass, or should hand off.
Access intent
Tools: allowedKnowledge: allowedMemory read: allowedMemory write: allowed
Outcomes
  • complete
    The loop has enough result quality and evidence to finish cleanly.
  • reason-more
    The loop should return to reasoning because another plan/action pass is needed.
  • handoff
    The work should hand off because reflection surfaced a boundary another owner should resolve.
Transitions
reasononactact
reasononreason-morereason
reasononhandoff$handoff
actoncompletereflect
reflectoncomplete$end
reflectonreason-morereason
reflectonhandoff$handoff