Building a Controllable AI Agent with a Low-Code Platform: A Complete Practical Guide

    This article walks through building a controllable AI Agent on a low-code orchestration platform, covering capability boundaries, a four-layer architecture, and key implementation details for a plan–confirm–execute workflow. You will learn how to make the model output structured execution plans, implement human confirmation before execution, design and orchestrate tools, manage state across turns, and troubleshoot common issues. The result is a practical pattern that balances agent autonomy with business safety for enterprise scenarios.

    Background and Requirements

    As large language models become more capable, more developers want to build agents that can “think autonomously and call tools on demand.” A number of low-code LLM application orchestration platforms have emerged, lowering the barrier to building agents through visual interfaces. But a common question remains: can such a platform alone be used to build an agent that covers a complete business loop?

    Consider a typical requirement. After a user asks a question, the agent needs to do three things:

    1. Understand the question and create an execution plan: analyze the user’s intent and plan which tools to call and in what order.
    2. Show the plan to the user and wait for confirmation: present the execution plan clearly and let the user decide whether to proceed.
    3. Execute automatically after confirmation: call the tools in sequence, aggregate the results, and report back to the user.

    This flow looks simple, but in practice it involves intent recognition, task planning, tool orchestration, human–machine interaction, state management, and exception handling. The following sections cover everything from architecture design to implementation details.

    Capability Boundaries: What a Low-Code Platform Can Do

    To answer whether a complete agent can be built, first clarify the general capabilities of a low-code orchestration platform:

    • Prompt orchestration: define the agent’s role, behavioral boundaries, and output format through system prompts.
    • Tool (plugin/function) integration: register external APIs or internal services as tools the model can call, typically exposed to the model as function descriptions (name, description, parameter schema).
    • Workflow orchestration: define logic such as conditional branches, loops, and variable passing by connecting nodes.
    • Model invocation and inference configuration: configure the underlying LLM, temperature, maximum output length, and other common parameters.
    • Human-in-the-loop nodes: some platforms support inserting an “await user input” interaction node into the flow, which is key to implementing “confirm before execution.”

    The conclusion: as long as the platform provides three foundational capabilities—tool calling, interactive conversation, and workflow orchestration—building an agent with a plan–confirm–execute loop is feasible, though it requires some design trade-offs and techniques.

    Overall Architecture Design

    The recommended agent architecture has four layers:

    1. Conversation and interaction layer: receives user input, displays the execution plan, and collects confirmation instructions.
    2. Planning and decision layer: the LLM handles intent understanding and task decomposition, outputting a structured execution plan.
    3. Tool execution layer: encapsulates various tools (retrieval, calculation, data queries, external API calls, etc.) and executes them in sequence according to the plan.
    4. State management layer: records session state (planning, awaiting confirmation, executing, completed/failed) to keep multi-turn interactions coherent.

    The core state transitions are as follows:

    1. Awaiting planning → Planning complete → Awaiting user confirmation → (Confirmed) Executing → Output result
    2. ↘ (Rejected/Modified) Re-plan

    Key Implementation Points

    1. Make the Model Output a Structured Execution Plan

    Telling the user the execution plan presupposes that the plan is structured and parseable. It is recommended to constrain the model in the system prompt to output the plan in JSON format, for example:

    1. {
    2. "understanding": "The user wants to query last month's sales data and generate an analysis report",
    3. "plan": [
    4. {"step": 1, "tool": "data_query", "params": {"period": "last_month"}, "reason": "Retrieve raw sales data"},
    5. {"step": 2, "tool": "calculator", "params": {"metric": "growth_rate"}, "reason": "Calculate the month-over-month growth rate"},
    6. {"step": 3, "tool": "report_generator", "params": {"type": "monthly"}, "reason": "Generate the analysis report"}
    7. ],
    8. "need_confirm": true
    9. }

    Structured output offers two benefits: first, the frontend can render the plan as a friendlier confirmation card; second, the execution layer can drive tool calls directly from the plan field without the model improvising again.

    2. Implement Human Confirmation Before Execution

    This is the part of the flow that most needs careful design. There are three common approaches:

    • Option 1: Interaction node. If the platform’s workflow supports an “await user input” node, insert it after planning completes, send the plan text to the user, and treat the next input as a confirmation signal. A conditional node then decides whether to proceed to execution or re-plan. This is the most recommended approach: the logic is clear and auditable.
    • Option 2: Multi-turn conversation convention. Agree in the prompt that the model only outputs the plan in the first turn and asks “Should I proceed?”, and only calls tools when the user replies with a confirmation word (such as “confirm” or “execute”). This is simple to implement but depends on the model’s instruction-following ability, so the prompt must emphasize that “no tool may be called without confirmation.”
    • Option 3: External business code manages state. Use the platform only as the planning and execution engine, and keep the confirmation logic in your own business backend: pause the session after receiving the plan, and trigger the execution flow only after the user confirms. This suits scenarios that demand high reliability and where the platform’s interaction capabilities are limited.

    Regardless of the approach, it is recommended to support three user responses: confirm and execute, modify the plan and then execute, and cancel.

    3. Tool Design and Orchestration

    The quality of the tool layer directly determines the agent’s execution effectiveness. A few best practices:

    • Single responsibility: each tool does one thing, with a clear description and few, well-defined parameters, reducing the chance of the model passing wrong parameters.
    • Idempotent and retryable: tools involving write operations should be designed to be idempotent where possible, making retries on failure easier.
    • Permission tiers: query tools can run automatically, while high-risk operations such as deletion, payment, and sending must always go through the confirmation flow.
    • Return values that can be passed on: tool return values should be structured so later steps can reference them (for example, passing a query result as input to report generation).

    4. State Management and Context Passing

    State must be preserved properly across multiple turns to avoid the model “forgetting” the earlier plan after the user confirms. Feasible approaches include:

    • Store the plan JSON in a session variable and read it directly for execution after confirmation, rather than having the model regenerate it.
    • Carry the current state marker in each turn’s context (such as state=awaiting_confirm) so the model can decide its behavior accordingly.
    • Summarize and compress long flows to avoid context overflow that could lose plan information.

    Debugging and Common Issues

    • The model executes without confirmation: usually caused by insufficient prompt constraints. State clearly that “tools may be called only after the user explicitly agrees,” and enforce a hard block with a conditional node at the workflow level as a double safeguard.
    • Unstable plans with inconsistent output formats: lower the temperature parameter and provide a complete output example in the prompt.
    • Tool call failures: configure an exception branch for each tool node so that, on failure, the reason is explained to the user along with options to retry or modify the plan.
    • Difficulty recognizing confirmation words: do not rely on the model to guess whether the user agrees; use explicit buttons or fixed keywords as the confirmation signal.

    Summary

    Back to the original question: can a complete agent be built on a low-code platform? The answer is yes, provided the platform has foundational capabilities such as tool calling, workflow orchestration, and human-interaction nodes, and provided the developer does three things in the design: constrain planning results with structured output, implement pre-execution confirmation with interaction nodes or state management, and isolate planning from execution with a layered architecture.

    This “plan–confirm–execute” pattern is essentially a balance between agent autonomy and business safety: it lets the model fully exercise its reasoning and planning abilities while using a human confirmation mechanism to gate high-risk operations. For enterprise scenarios, this is often a more pragmatic and deployable form of agent than a “fully automatic” one. Readers are encouraged to start with a simple scenario (such as a data query), gradually add tools and flows, and iterate toward a complete agent suited to their own business.