Building AI Agents with Open-Source LLM Platforms: Enterprise Selection and Deployment
Open-source LLM application platforms can support agents that plan tool calls, request user approval, and execute tasks in controlled stages. This article explains how to implement that workflow, where prototype capabilities fall short of production requirements, and how enterprises should evaluate observability, access control, dependency management, and integration when selecting a platform.
1. Start with a Practical Agent Requirement
Many development teams approach LLM application platforms with a similar goal: build an agent for an end-to-end business workflow. The agent should interpret a user’s request, decide which tools to call, present an execution plan, wait for approval, and then execute the plan step by step while reporting intermediate results.
Although this sounds straightforward, it involves a complete agent lifecycle:
- Intent understanding: Parse the user’s request and identify the task objective.
- Tool planning: Determine which tools are needed and the order in which to call them.
- Plan approval: Generate a structured execution plan for the user to review.
- Execution and feedback: Call tools according to the approved plan and report results incrementally.
- Error handling: Stop, roll back, or replan when execution fails.
Open-source LLM application platforms typically cover much of this lifecycle. Prompt orchestration, knowledge-base question answering, tool calling, and workflow orchestration can often be assembled visually into a working prototype.
However, the requirements become much more demanding when the goal shifts from “make it work” to “run it in production.”
2. Why Agent Features Alone Should Not Drive Platform Selection
Enterprise platform evaluations often begin with a checklist of visible features: Does the platform support model integration? Knowledge bases? Tool calling? Workflows? Application publishing?
For many platforms, the answers are broadly similar. What determines whether an AI application can move from a demo to production is often a different set of capabilities—ones that are easy to overlook during a demonstration but become critical after deployment.
- Knowledge-base access controls: Are retrieval results constrained by user roles and document permissions? Exposing executive-only documents to an ordinary employee is a serious security incident.
- Call-chain observability: Which tools, Model Context Protocol (MCP) services, or skill modules did the agent invoke during a session? What were the inputs and outputs of each call? Can the sequence be reconstructed when something goes wrong?
- Workflow-node transparency: Can teams inspect each node’s inputs, outputs, execution time, and errors, or can they see only the final result?
- Application-level access governance: After publication, can application visibility and usage permissions be controlled by organizational unit and role?
- Dependency management: Which model versions, knowledge bases, tools, and prompts does each application, agent, or workflow depend on? Can teams assess the impact of changes to an underlying resource?
These are engineering and governance requirements, rather than simply agent features.
Open-source development platforms offer rapid iteration, active ecosystems, and a practical foundation for prototyping and small-to-medium-scale use cases. Enterprise deployments place greater emphasis on private deployment, compatibility with required hardware and software stacks, deep integration with business systems, permission governance, resource dependency management, and source-level customization.
These approaches are not inherently substitutes for one another. They address different development stages and governance requirements.
3. Implementing an Agent with Plan Approval on an Open-Source Platform
To implement the workflow described above, divide autonomous decision-making into three controlled stages: planning, approval, and execution. Avoid allowing the model to plan and execute everything in a single unrestricted pass.
Step 1: Define Clear Tool Descriptions
The quality of tool planning depends on the clarity of tool descriptions. Each tool should document its purpose, applicable scenarios, input parameters using JSON Schema, and return-value structure.
For example, a tool’s name, description, and input schema could look like this:
{"name": "query_order_status","description": "Retrieve an order's current status, shipping information, and estimated delivery time using its order ID","parameters": {"type": "object","properties": {"order_id": {"type": "string","description": "Order ID"}},"required": ["order_id"]}}
Step 2: Generate a Structured Plan Before Execution
The system prompt should explicitly instruct the model to produce a plan before taking action, using a structured format such as JSON.
{"understanding": "The user wants to check the shipping status of order DX20240501 and request a refund","plan": [{"step": 1,"tool": "query_order_status","args": {"order_id": "DX20240501"}},{"step": 2,"tool": "submit_refund","args": {"order_id": "DX20240501","reason": "Shipping delay"},"condition": "Only if the order has not been delivered and the user confirms"}],"risks": ["The refund operation is irreversible and requires an additional user confirmation"]}
Step 3: Add a Human Approval Node
Insert a human approval node between the planning and execution nodes in the workflow.
The user reviews the proposed plan and can approve it, change parameters, or reject it entirely. The workflow enters the execution branch only after approval.
This is a practical application of human-in-the-loop design to agent workflows. It can significantly reduce the risks associated with irreversible actions.
Step 4: Execute the Plan and Record Results
During execution, call each tool according to the plan. Write each step’s result back into the conversation context so that subsequent steps and the final response can reference it.
If any step fails, stop the remaining steps and clearly explain the failure to the user. Do not silently suppress errors and continue executing.
4. Closing the Gap Between an Open-Source Prototype and Production
An open-source platform can support a prototype that plans tasks, requests approval, and executes tools. Enterprise production use requires additional engineering work.
- Observability: Record complete logs for each tool call and integrate them with centralized logging, monitoring, and alerting. Teams must be able to diagnose failures and audit execution paths.
- Permissions and data governance: Apply user-identity-based filtering to knowledge-base retrieval. Centrally manage credentials for external systems instead of leaving plaintext secrets scattered across workflow configurations.
- Environment isolation: Separate development, testing, and production configurations. Include model and prompt versions in version control.
- Evaluation: Build a regression test set and run automated evaluations whenever prompts or models change, preventing a local change from breaking other workflows.
- Staged rollout and rollback: Support percentage-based application rollouts and provide a fast way to return to a stable version when problems occur.
5. Conclusion: Select for Business Needs and Governance Requirements
Open-source LLM application platforms can be used to build an end-to-end agent with tool planning, execution-plan approval, and controlled execution. They are well suited to prototype validation and exploring business workflows.
Once an application moves into production, enterprises need to address the gap between prototype capabilities and production engineering requirements. Permission governance, execution auditing, dependency management, private deployment, and deep integration all become central concerns.
The right question is not simply which platform has more features, but which platform fits the organization’s current stage. During early validation, prioritize development speed. For deployment at scale, focus on governance and integration capabilities.
Where necessary, extend an open-source platform through source-level customization or evaluate enterprise-oriented offerings, such as the enterprise agent development capabilities provided by Baidu AI Cloud’s Qianfan platform.
Ultimately, platform selection should be driven by business objectives and governance requirements—not the length of a feature checklist.
