/** * buildAgentMessageApiChart — the Agent (ReAct) form of the messageAPI * merge-tree, as ONE FLAT main chart (no inner LLM-call sub-box). * * The whole ReAct cycle lives directly in the single Agent chart: * * Context (ROOT selector — inits + picks which context slots to engineer) * ├─ system-prompt ┐ * ├─ messages ─────┼─→ messageAPI → Call-LLM * └─ tools ────────┘ * → Route (decider) → [ ToolCalls (execute) → loop ] / Final (response) * loopTo(Context) * * WHY flat (the user's call): the entire agent — context engineering, the LLM * call, routing, tool execution, the loop, and the final response — is ONE * visible flowchart in ONE Agent box. No nested LLM-call box: Lens wraps the * whole chart in the Agent main-box and renders the slots as pills. This is * simpler than the composed (sf-llm-call subflow) shape and avoids box-in-box * nesting entirely. * * The three context slots are DIRECT children of Context; all converge at * messageAPI (which assembles system-prompt + messages); Call-LLM then sends * the assembled payload plus the tool schemas. Route decides tool-calls (loop) * vs final (terminate). The same chart serves Static and Dynamic agents — only * which slots the Context selector lights per iteration differs. */ import type { FlowChart } from 'footprintjs'; import type { LLMProvider, LLMToolSchema } from '../../adapters/types.js'; export interface AgentMessageApiChartDeps { readonly provider: LLMProvider; readonly model: string; readonly systemPrompt: string; readonly tools: readonly LLMToolSchema[]; readonly maxIterations?: number; readonly structureRecorders?: readonly import('footprintjs').StructureRecorder[]; } /** * Build the Agent merge-tree chart as one flat ReAct flowchart. */ export declare function buildAgentMessageApiChart(deps: AgentMessageApiChartDeps): FlowChart;