Agents All the Way Down; A Methodology for Building Custom AI Agents from Substrate to Production

📅 2026-06-10
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the lack of a systematic methodology for constructing customized AI agents, a process currently fragmented across informal resources. The authors propose a framework-agnostic, end-to-end construction methodology grounded in two foundational prerequisites—base design and building blocks—and iteratively refined through three core practices: prototyping, CLI encapsulation, and agent-driven testing. Key innovations include the introduction of the “Turtle mode,” the conceptual insight that multi-agent orchestration fundamentally amounts to CLI composition, and the novel practice of “agent-testing-agent.” To validate the approach, a single developer leveraged AI pair programming to implement AAC, a production-grade open-source agent, within ten days, demonstrating both the feasibility and transferability of the proposed methodology.
📝 Abstract
Custom AI agents areagents that live inside their own application, talk to their own data and tools, enforce their own security boundaries, and carry their own brand and audit trail. What separates them from the general-purpose tier is fit, not capability: each is built for one job, by the engineer who will maintain it. No published practice sets out how to build one end to end. The pieces are everywhere (function-calling APIs, the Model Context Protocol, code agents to pair with), but the practice that chains them lives in podcasts, blogs, and leaked system prompts. This paper writes that practice down as a methodology, Agents All the Way Down: two preconditions crossed once and kept, then three practices repeated for the agent's life. The preconditions are (P1) Substrate, the LLM as a software component, framed as tools, then system, then messages under prompt-caching; and (P2) Building blocks: function calling, MCP, CLI orchestration, the liteshell pattern, the agent loop, skills, characters, hooks, and scaffolding. The practices are (P3) prototype with a general-purpose agent; (P4) harvest, fold, and ship the result as a CLI, the Turtle pattern; and (P5) agent-tests-agent, in which a general-purpose agent drives it through behavioural scenarios, a complement to classical testing, not a replacement. The working loop is P3 to P4 to P5 and back, and one corollary falls out for free: multi-agent orchestration is just CLI composition. The methodology is framework-free by construction. It was distilled from the AAC, a custom agent for the open-source LAMB platform, built in about ten days by one developer with an AI pair-programmer and in production . We present it as a transferable practice, independent of any language or framework.
Problem

Research questions and friction points this paper is trying to address.

custom AI agents
agent methodology
end-to-end development
production deployment
software engineering practice
Innovation

Methods, ideas, or system contributions that make the work stand out.

custom AI agents
Agent methodology
CLI composition
agent-tests-agent
Model Context Protocol
💼 Related Jobs
No related jobs found.
M
Marc Alier Forment
Universitat Politècnica de Catalunya (UPC), Barcelona, Spain
J
Juanan Pereira
Universidad del País Vasco / Euskal Herriko Unibertsitatea (UPV/EHU), Donostia-San Sebastián, Spain
F
Francisco José García-Peñalvo
Universidad de Salamanca (USAL), Salamanca, Spain
M
María José Casañ Guerrero
Universitat Politècnica de Catalunya (UPC), Barcelona, Spain