nxm-tui — Agentic Loop Workflow

nxm-tui — Agentic Loop Workflow A workflow diagram generated by Archify. 01 / User 02 / TUI / UI 03 / Agent Runtime EX / Policy & Recovery 05 / Tool Execution & Evidence Intake Plan + route Execute + report Planning loop Halt / resume Evidence path Tool work User Input · message or /command · User › Intake User Input message or /command Chat Surface · streaming tokens · TUI / UI › Intake Chat Surface streaming tokens Final Reply · rendered markdown · TUI / UI › Execute + report Final Reply rendered markdown Agent Planner · plan next step · Agent Runtime › Planning loop › Plan + route · context aware Agent Planner plan next step context aware Tool Router · choose capability · Agent Runtime › Planning loop › Plan + route Tool Router choose capability /continue · fresh Agent, same transcript · Policy & Recovery › Intake /continue fresh Agent, same transcript Approval Gate · scope + consent · Policy & Recovery › Halt / resume › Plan + route · block risky ops Approval Gate scope + consent block risky ops Loop Halted · budget cap or stagnation · Policy & Recovery › Halt / resume › Execute + report Loop Halted budget cap or stagnation Trace Log · events + output · Tool Execution & Evidence › Intake Trace Log events + output Context Store · transcript + memory · Tool Execution & Evidence › Evidence path › Intake Context Store transcript + memory Tool Call · shell / browser / MCP · Tool Execution & Evidence › Tool work › Execute + report · structured result Tool Call shell / browser / MCP structured result LLM Server · tool result → next turn · Tool Execution & Evidence › Tool work › Execute + report LLM Server tool result → next turn budget / stagnation plan resume with fresh budget /continue record result needs approval? trace + memory Legend User UI Agent logic Policy Tool action Context / trace Cloud service External system