Agent Nodes

Applies to: ChengOS v0.2.0+ | Last verified: 2026-09-25 | Source: crates/cheng-nodes/src/nodes/builtin/agent

Only one node here goes on the canvas: agent/react_agent. The other three are the internal stages of its loop — plan, execute, review — and they are hidden from the node palette on purpose. They are documented anyway, because their inputs and outputs are the clearest description of what an iteration actually does, and their fields explain the agent's own knobs: iteration budget, task run mode, and the safety policy that decides when a long task is still making progress.

ReAct Agent — agent/react_agent

Intelligent decision agent that automatically plans, executes and evaluates tasks

Inputs

FieldTypeRequiredDefaultDescription
contextobject (port)—nullExisting AgentContext (optional, for continuing historical conversation). Connection port, not a form field. Control: text
taskstring—nullTask description to accomplish (optional, auto-extracted from context conversation history if empty). Control: textarea
llm_configobject (port)✅—LLM configuration (JSON string or object). Connection port, not a form field. Control: text
max_iterationsinteger—40Maximum Plan/Execute/Review iterations for each user message. Control: number
max_tool_calls_per_turninteger——Optional maximum number of tool calls allowed for each user message. Control: number
execution_modeenum—lightLegacy loop execution mode. Prefer Task Run Mode. Control: select. Options: light (Backward-compatible fixed iteration behavior.), adaptive (Future policy-renewed mode for medium/uncertain tasks.), heavy (Future long-task mode with stricter ledger and review safety rails.)
task_run_modeenum—nullShort task pauses at chunk exhaustion; long task continues while progress is being made. Control: select. Options: short (Bounded task chunk; pause for user confirmation when exhausted.), long (Progress-driven task loop; renew internal windows while making progress.)
short_task_budget_chunkinteger—40Legacy short-task chunk size. Prefer Iteration Budget. Control: number
long_task_safety_policyobject——Advanced long-task safety limits
toolsarray<any>—[]Available tools (populated from connected tool nodes via tools port)
use_function_callingboolean—trueUse native function calling mode. Control: switch
use_llm_evaluationboolean—falseEnable LLM evaluation. Control: switch
max_checkpointsinteger—3Max checkpoint count (LLM may request extension when iterations exhausted). Control: number
instruction_promptstring—nullCustom instruction prompt (overrides default system prompt). Control: textarea
user_messagestring—nullUser additional instruction (prepended to task, e.g.: Before starting, read SKILLS_INDEX.md first). Control: textarea
reviewer_promptstring—nullReviewer criteria / prompt (used when LLM evaluation is enabled). Control: textarea
reviewer_llm_configobject (port)—nullReviewer LLM configuration (optional, falls back to main LLM config). Connection port, not a form field. Control: text
max_review_roundsinteger—1Max LLM review rounds. Control: number
min_tool_calls_for_skillinteger—3Min successful tool calls to emit skill summary (0 = disabled). Control: number
transparent_agent_streamingboolean—trueStream agent planning (text, reasoning, tool-call progress) live. Control: switch
reminder_policyobject——Advanced: Todo nudge/gate reminder policy
compaction_presetenum—standardHow eagerly this agent compacts its working context: standard (balanced), aggressive (compacts earlier and archives used tool schemas; large one-shot data results and MCP/skill discovery), lenient (keeps more recent tool history; long coding and reasoning tasks). Control: select. Options: standard, aggressive, lenient

Outputs

FieldTypeDescription
final_answerstring (port)Final answer. Connection port, not a form field.
contextobject (port)Agent context (contains conversation history). Connection port, not a form field.
session_idstring (port)Session ID (consistent with context.session_id, convenient for downstream direct connection). Connection port, not a form field.
tracestring (port)Execution trace. Connection port, not a form field.
total_tokensintegerCumulative token consumption
iterations_usedintegerNumber of iterations executed
successbooleanWhether task was completed successfully
statusstringStatus message
requires_reviewbooleanWhether human review is required
pause_reasonstringPause reason
suggested_next_actionstringSuggested next action
interim_reportstringInterim report
continuation_policyobjectCompact continuation policy state
skill_summaryobjectLean AgentContext for skill distillation (conditional: absent when not needed)
artifactsarray<object> (port)Artifact references produced by tools during this run. Connection port, not a form field.

ReAct Plan — agent/react_plan

Analyze task status and decide next action

Inputs

FieldTypeRequiredDefaultDescription
taskstring✅—Task description to accomplish. Control: textarea
llm_configobject (port)✅—LLM configuration (JSON string or object). Connection port, not a form field.
max_iterationsinteger—10Maximum iterations allowed. Control: number
toolsarray<any>—[]Available tools (populated from connected tool nodes via tools port). Control: multi-select
use_function_callingboolean—trueUse native function calling mode. Control: switch

Outputs

FieldTypeDescription
decisionenumAction decision made by the agent
contextobjectUpdated execution context
tokens_usedintegerTokens consumed in this planning step

ReAct Execute — agent/react_execute

Execute tool calls and get observation results

Inputs

FieldTypeRequiredDefaultDescription
decisionenum✅—Action decision from Plan node
contextobject—{"checkpoint_count":0,"execution_mode":"light...Current execution context

Outputs

FieldTypeDescription
resultobjectTool execution result
contextobjectUpdated execution context
is_finalbooleanWhether this is a final decision
observationstringObservation result (fed back to Plan node)
decisionenumOriginal decision (passed through to Review node)

ReAct Review — agent/react_review

Evaluate execution results and decide whether to continue iteration

Inputs

FieldTypeRequiredDefaultDescription
taskstring✅—Original task description. Control: textarea
resultobject✅—Tool execution result
decisionenum✅—Original action decision
contextobject✅—Current execution context

Outputs

FieldTypeDescription
reviewenumReview decision
contextobjectUpdated execution context
should_continuebooleanWhether to continue iterating
observationstringObservation for next iteration
final_answerstringFinal answer (if completed)
tokens_usedintegerTokens consumed in evaluation

Next steps