@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.0Load
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
EntryAssess 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
- actThe next step is clear enough to move into execution.
- reason-moreThe loop should continue reasoning because the next action plan is not yet strong enough.
- handoffThe work should hand off because the current runtime lacks authority, context, or the right surface to continue.
act
Implicit completeExecute 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
- completeThe loop has enough result quality and evidence to finish cleanly.
- reason-moreThe loop should return to reasoning because another plan/action pass is needed.
- handoffThe work should hand off because reflection surfaced a boundary another owner should resolve.
Transitions
reasonon
act→actreasonon
reason-more→reasonreasonon
handoff→$handoffacton
complete→reflectreflecton
complete→$endreflecton
reason-more→reasonreflecton
handoff→$handoff