Engineering Open-Source LLM Agents: From Code Generation to Deliverable Software
This article explains how to move open-source LLM agents from benchmark scores to production-ready delivery. It covers reading evaluation results correctly, turning vague requirements into executable specifications, reproducing frontend visual effects, handling state and concurrency in the backend, building a controlled delivery pipeline, and managing cost and risk. Readers will find practical acceptance criteria, code examples, and a checklist for stable, verifiable output.
1. From Answering Questions to Shipping Products
Recent progress in open-source large models has shifted the discussion from “is the answer correct?” to “can it deliver a complete product?” The recurring keyword in the source material is not a score but “it runs”: a commercial spaceflight website with virtual cabin seat selection and flight booking, a deep-sea research institute site, and a perfume brand showcase page were all produced within a single task, complete with visual systems and interactive logic.
The engineering takeaway is clear: the unit of value for an agent is not tokens but an acceptance-ready deliverable. To judge whether an AI coding tool is usable, look at whether it can close the loop: understand requirements, generate code, run and verify, and fix errors.
2. How to Read Benchmark Scores
Public leaderboards (such as high-difficulty general knowledge tests, software engineering bug-fixing benchmarks, and terminal command operation benchmarks) are often used for comparison, but three caveats matter in practice:
- Benchmarks are not equivalent to real scenarios. Fix-oriented benchmarks measure locating and patching defects in an existing repository; building a site from scratch tests architecture choices and visual design. The two skill sets only partially overlap.
- Scores are an upper-bound reference, not a delivery guarantee. Context length, dependency complexity, and private conventions in real projects all reduce effective performance.
- Build your own evaluation set. Turning your team’s historical requirements into 20–50 automatically verifiable tasks is more useful than tracking external rankings.
An example internal evaluation record:
{"task_id": "site_booking_001","acceptance": ["build_pass", "e2e_pass", "a11y_score>=0.9"],"attempts": 3,"human_minutes": 12}
3. Turning Vague Requirements into Executable Specifications
Descriptions like “premium feel” and “extreme aesthetics” in the source cases were implementable because they were translated into verifiable constraints. A recommended requirement template has five sections:
- Goal and audience: brand positioning, target devices;
- Visual tone: color range, font families, motion pacing;
- Information architecture: hero section, narrative sections, detail page hierarchy;
- Functional contract: inputs, outputs, boundary conditions;
- Acceptance criteria: checks that can run automatically.
For example, “spacecraft seat selection” written as a contract:
Input: flight number, date, passenger countConstraints: capacity 6 per flight; selected seats cannot be reused; lock when sold outOutput: order ID + persisted recordAcceptance: no overselling under 20 concurrent requests
4. Reproducing Frontend Expressiveness Reliably
The “cinematic feel” that recurs in the cases is a decomposable technical combination, not something mystical:
- Full-screen dynamic background: video or sequence frames as the base layer, with a static image fallback via
prefers-reduced-motion; - Scroll-driven narrative: timeline anchors (such as T-60:00 to T+92:00) trigger section transitions, and key data uses monospace fonts to reinforce an instrument-panel feel;
- Vector interactive graphics: the seat map is drawn in SVG, with state exposed to accessibility tools and test scripts through
aria-selectedanddata-state; - Light and texture: caustics, gradients, and highlights are implemented with CSS gradients and blend modes, avoiding uncontrolled use of large images.
.seat[aria-selected="true"] { fill: #ff7a1a; }@media (prefers-reduced-motion: reduce) {.bg-video { display: none; }}
5. The Key to Full-Stack Delivery: State and Concurrency
What really separates a “demo” from something that can go live is the backend. Persistence, capacity limits, and duplicate submissions are the three things that must be handled.
# Pseudocode: ordering under a capacity constraintasync def book(flight_id, seat, user):async with db.transaction():row = await db.lock(flight_id) # row-level lockif row.sold >= row.capacity: # capacity 6raise SoldOut()if await db.exists(flight_id, seat):raise Conflict()await db.insert_order(flight_id, seat, user)row.sold += 1
The key points: acquire the lock before validating, use a unique index as a backstop against duplicates, and keep the order and inventory updates in the same transaction. Missing any of these leads to overselling or double-booked seats under high concurrency.
6. The Delivery Pipeline: Keeping Agents on a Controllable Track
It is advisable to fix the process into a four-stage pipeline, each with a point where humans can intervene:
- Specification generation: produce the requirements document and acceptance checklist for human confirmation;
- Code generation: produce output module by module, with frontend and APIs separated;
- Automated verification: build, unit tests, end-to-end scripts, accessibility and performance checks;
- Fix loop: feed failure logs back to the model and cap the maximum number of iterations to prevent infinite loops.
In the Baidu AI Cloud environment, this pipeline is typically hosted on a container platform for build and runtime, with object storage holding static assets and materials, logging and monitoring/alerting services providing observability, and a message queue used for peak shaving and asynchronous task decoupling. Evaluate such services by general capability category rather than binding to specific interfaces.
7. Cost and Risk Checklist
- Context cost: feed only relevant files and interface definitions, and load retrieval on demand;
- Hallucinated dependencies: run dependency audits and license checks uniformly after generation;
- Security baseline: input validation, parameterized queries, and no secrets in the code repository;
- Compliance requirements: asset licensing, privacy notices, and data retention periods must be confirmed upfront;
- Rollback capability: keep a version snapshot for each generation and support one-click rollback.
8. Conclusion
The maturity of open-source models and agents has made “generate a runnable site from a description” a routine operation. Real competitiveness lies in engineering constraints: turn aesthetics into specifications, turn specifications into acceptance criteria, and make concurrency and state handling solid. Replacing the pursuit of leaderboards with a verifiable pipeline is the path to stable output.
