How to Build an AI Agent with Human-Approved Execution

    A production-ready AI agent needs more than tool-calling capabilities. This article explains how to build a controlled workflow that combines goal understanding, visible plans, version-bound human approval, permission-aware execution, and auditable results. It also covers tool governance, failure recovery, system integration, and a practical pre-launch checklist.

    For enterprises, a complete AI agent is usually more than a single-turn question-answering system. It must understand a goal, break it into steps, select tools, explain its plan, execute only after approval, and return results with supporting evidence.

    The right way to evaluate a platform is to ask whether this entire loop can operate reliably within permission, audit, and integration constraints—not simply whether its feature list includes agents, knowledge bases, or workflows.

    1. Define What “Complete” Means

    A production-ready agent must meet at least four requirements.

    Goal understanding. User requests are often ambiguous. For example, “Handle this week’s exception tickets” leaves the target records, time range, and success criteria unclear. The system should identify these details and ask follow-up questions when information is missing, rather than immediately launching a sequence of tool calls.

    Visible plans. It is not enough for the model to formulate steps internally. The agent must explain the proposed tools, a summary of their inputs, expected side effects, and fallback actions in business-friendly language. Users should be able to edit the plan by removing a step, narrowing a parameter range, or requesting read-only queries first.

    Approval before side effects. Queries, retrieval, and calculations can run automatically. Write operations—such as creating, updating, deleting, sending externally, or submitting an approval request—require explicit confirmation. Approval must be bound to a plan version so that the user does not approve Plan A while the system executes a revised Plan B.

    Traceable execution. Each step must record who initiated it, which knowledge source or tool response informed it, whether a human approved it, and its final status and error code. Automated execution without an execution receipt cannot be reliably reviewed and is unsuitable for production.

    Planning tool calls is only the starting point. A complete loop means presenting the plan, waiting for approval, executing the approved steps, and preserving an audit trail.

    2. Use a Six-Stage Runtime Workflow

    A task can be divided into six stages that are straightforward to implement in a workflow engine or agent runtime.

    1. Normalize intent. Extract the goal, constraints, and permission context, including user identity, organization, and data scope.
    2. Perform read-only discovery. Retrieve knowledge and query system state within the authorized scope to gather facts needed for planning. Write operations are prohibited at this stage.
    3. Generate a plan. Produce a step list. For each step, identify the tool category, potential side effects, required permissions, and whether inputs come from the user or a previous step.
    4. Request human approval. Display the plan and risk notices. The user can approve, reject, or modify part of it. A timeout counts as rejection.
    5. Execute under control. Call tools according to the approved steps. If any step fails, stop subsequent write operations and report which steps completed and which did not.
    6. Return an execution receipt. Summarize the outcome, cite supporting evidence, and include operation identifiers. Where necessary, provide a way to undo the operation or take remedial action.

    The following diagram illustrates the control flow only; it does not represent any specific product API:

    1. User goal
    2. -> Permission context injection
    3. -> Read-only tools / knowledge retrieval
    4. -> Draft plan with side-effect markers
    5. -> User approval bound to the plan version
    6. -> Step-by-step write-tool execution
    7. -> Logs, metrics, and execution receipt

    3. Evaluate More Than the Feature List

    Model connectivity, prompts, knowledge bases, tool calling, workflows, and application publishing are all necessary capabilities. Production requirements, however, are more specific.

    Identity-Aware Knowledge Retrieval

    Different roles should receive different document passages for the same question. User and organizational context must be applied before retrieval, rather than retrieving everything and relying on a prompt that says “do not disclose sensitive information.”

    Prompt instructions are not a reliable barrier once sensitive passages have entered the model’s context.

    Tiered Tool Permissions

    Read-only tools and write tools should have separate authorization policies. Write tools also need to distinguish reversible actions from irreversible ones. Editing a local draft has a very different risk profile from submitting an approval request to an external system.

    The agent must never have more authority than the current user.

    Governable Plans

    A platform that only supports autonomous reasoning followed by immediate tool calls makes it difficult to insert approval checkpoints. Enterprise use cases need explicit orchestration nodes for planning, human review, conditional branches, and compensation.

    Conversation-driven agents are useful for prototypes. When money, permissions, or customer data is involved, the critical path should be an explicit workflow: the model interprets requests and supplies parameters, while the workflow enforces execution gates.

    Recoverable Failures

    Tool timeouts, invalid parameters, and downstream rejections need clearly defined states. If the system cannot determine whether a write succeeded, it must not retry blindly, as that can create duplicate submissions.

    Write operations should support idempotency keys or business-level deduplication.

    Sufficient Observability

    At a minimum, teams should be able to inspect the following by session:

    • Plan versions
    • Approving users
    • Each tool call’s inputs and outputs, with sensitive data redacted
    • Latency
    • Token consumption
    • Error categories

    Without end-to-end trace logs, it is difficult to distinguish planning errors from retrieval failures or downstream system problems.

    4. Make Planning Reliable by Constraining It

    Planning should not mean asking a model to generate an unlimited tool chain in a single response. A more reliable approach is to constrain the planning space.

    Keep tool descriptions concise and boundaries explicit. Each tool should specify its purpose, required parameters, prohibited uses, and return fields. Vague descriptions increase the likelihood of incorrect tool selection or invented parameters.

    Set step limits. Limit the number of read-only discovery calls. Require all write operations to occur after approval, and cap their number as well. If the plan exceeds those limits, route the task to a human rather than allowing repeated tool calls.

    Track parameter provenance. Every plan parameter should identify its source: the user’s request, retrieved information, or an upstream tool result. Parameters without a traceable source should be marked for confirmation, not silently filled in.

    Plan first, then execute from the same structured object. Present the plan to the user in natural language and drive execution with structured steps. Both representations must come from the same version to prevent discrepancies between what the user sees and what the system executes.

    Apply additional controls to high-risk actions. Bulk changes, external communications, or privilege escalation may require a second confirmation, a two-person approval rule, a supervisor approval node, or stronger identity verification—even after the user has approved the plan. These rules belong in the workflow, not in the prompt.

    5. Design Approval as a Product Experience

    A confirmation interface should do more than ask, “Continue?”

    Nontechnical users need to understand what will change, the affected scope, whether the action can be undone, and which systems will be called. Show verifiable steps and risks, not raw model chain-of-thought or lengthy internal reasoning.

    Make Approval Semantics Explicit

    Use distinct actions such as:

    • Save plan only
    • Execute this plan
    • Run query steps only

    Execution should not be the default.

    Define Approval Validity and Scope

    Query results used in a plan can become stale. Before execution, recheck critical read-only data. If relevant facts have changed, invalidate the old plan and request approval again.

    Support Rejection and Revision

    When a user rejects a plan, preserve the draft and allow them to change constraints and regenerate it. Do not erase the context and force them to start over.

    6. Align Knowledge, Permissions, and System Integration

    Knowledge access must follow business permissions. Attach visibility metadata when documents enter the knowledge base, filter retrieval for the current user, and return document identifiers with citations so users can verify the evidence.

    Do not place unauthorized documents in a shared retrieval space and rely on the model to avoid exposing them.

    When integrating with business systems, prefer existing application identities and delegated user authorization over a superuser account assigned to the agent. Tokens should have minimal privileges and short lifetimes, and write operations should record the acting user.

    Integration can use synchronous calls or asynchronous message delivery followed by completion receipts. Long-running tasks should not hold a conversation turn open. Return a task identifier and notify the user when the task completes.

    Supporting infrastructure serves distinct purposes:

    • Object storage holds large attachments and execution artifacts.
    • Message queues decouple slow steps.
    • Logging and monitoring support alerts for failure rates and abnormal write activity.

    These are standard engineering requirements. Evaluate whether a platform supports private or region-specific deployment, integrates with existing identity systems, and exports audit logs—not just whether its demonstration looks smooth.

    7. Match Implementation Depth to the Deployment Stage

    Exploration

    The goal is to determine whether question answering and single-tool use are useful. Lightweight applications can support rapid experimentation, but write operations should be disabled by default, and data should use sanitized samples.

    Pilot

    Limit the scope to one or two scenarios, such as ticket triage or report explanation. Introduce visible plans and human approval, then measure planning accuracy, the rate of human edits, and incorrect tool calls.

    Broader Rollout

    Multi-system, multi-role deployments require permission filtering, idempotency, auditing, quotas, and alerts. Models should be replaceable, while workflows and permission models remain stable. Avoid storing business rules only in prompts.

    For environments with strict governance requirements—such as private deployment, compatibility with mandated infrastructure, source-level customization, or deep integration with existing permission and ticketing systems—prioritize engineering capabilities. These include identity integration, configuration and secrets management, distributed tracing, staged rollouts, and rollback.

    For an internal prototype or a single question-answering assistant, an overly complex platform can slow experimentation. Deployment stage and operational constraints should drive selection, not the number of agent-related terms in a feature list.

    8. Pre-Launch Checklist

    • Are all write operations placed after an approval node, with approval bound to the plan version?
    • Does the agent have no more authority than the current user, and is knowledge retrieval filtered by role?
    • Do write tools support idempotency or business-level deduplication, and are blind retries prohibited after failures?
    • Are logs redacted, and can each session’s plan, approval, and tool calls be reconstructed?
    • Are step limits, timeouts, spending limits, and human-escalation conditions defined?
    • Does the displayed plan match the actual execution steps, and can users reject or revise it?

    Conclusion

    It is possible to build a complete agent that plans tool use, explains the plan, waits for user approval, and then executes. Completeness does not mean a model that is better at conversation. It means turning planning, approval gates, execution, and auditing into a controlled loop.

    A feature list can show that a prototype runs. Permissions, approval checkpoints, idempotency, and observability determine whether it is ready for enterprise production.