The LLM Technology Stack Explained: From Prompts to Agents

    This article breaks down the LLM technology stack into distinct abstraction layers—large language models, prompts, skills, agents, and AI coding tools—and explains why these terms are often confused. It shows how each layer works, how they cooperate in a typical workflow such as generating unit tests for legacy code, and which engineering constraints matter at each level. Readers will also find common misconceptions, practical adoption advice, and notes on running this architecture on cloud infrastructure.

    1. Why These Concepts Get Confused

    In the context of generative AI, a set of terms is used constantly: large language models, prompts, skills, agents, and a handful of “code names” and “nicknames” that circulate in developer communities. What they share is that all of them relate to “getting a model to complete more complex tasks.” Where they differ is the abstraction level they sit at. Put them on the same capability stack, and the confusion dissolves on its own.

    It is worth noting that some of the code names and nicknames circulating in the community are in-group slang for particular AI coding tools, not industry-standard terminology. This article does not revolve around any specific product. Instead, it abstracts the discussion to the general category of “AI coding tools,” so the mental model you build transfers to any comparable solution.

    2. Layered Understanding: From Model to Agent

    2.1 Large Language Model (LLM)

    The large language model is the foundation of the entire stack. Trained on massive text corpora, it learns a probability distribution over token sequences, which gives it general capabilities such as continuation, summarization, translation, extraction, and code generation. Two points are key. First, the model itself is stateless: one inference is simply “predicting what comes next based on the preceding text.” Second, the model’s knowledge stops at its training data; it has no real-time perception and no ability to act on external systems.

    2.2 Prompt

    A prompt is the sum of the instructions and context fed to the model. It determines the direction, format, and boundaries of that particular output. In engineering practice, a prompt is usually split into several parts:

    1. [Role] You are a senior backend engineer
    2. [Task] Rewrite the function below as an async implementation
    3. [Constraints] Keep the public signature unchanged; add error handling
    4. [Input] def load_data(path): ...
    5. [Output format] Code block only, plus three bullet points explaining the changes

    The core of prompt engineering is not phrasing tricks. It is turning a vague requirement into a verifiable specification: explicit inputs, outputs, constraints, and acceptance criteria. Because the context window is limited, you also need to trim, order, and summarize the material so the most relevant information sits in the most effective position.

    2.3 Skill

    A skill is a package of reusable capability. When a class of tasks requires a fixed sequence of tool calls, a fixed data format, and fixed validation rules, capturing it as a skill is more reliable than rewriting the prompt every time. A skill typically has four elements: a description of when it applies, an input/output contract, the external capabilities it depends on (such as retrieval, computation, or file read/write), and a fallback strategy for failures. The value of a skill is that it upgrades a one-off prompt into an asset that can be versioned and tested.

    2.4 Agent

    An agent is a system that plans autonomously and calls tools to achieve a goal. Its essential difference from a single question-and-answer exchange is the introduction of a loop: observe, plan, act, verify—repeated until a termination condition is met or a budget limit is hit. A minimal working agent skeleton looks like this:

    1. def run_agent(goal, tools, max_steps=8):
    2. state = {"goal": goal, "history": []}
    3. for _ in range(max_steps):
    4. plan = llm(state, tools) # decide the next action
    5. if plan.type == "final":
    6. return plan.answer
    7. result = tools[plan.name](**plan.args) # execute the tool
    8. state["history"].append((plan, result))
    9. return "Step limit reached; returning intermediate findings"

    Three things must be handled in engineering: least-privilege tool permissions, an auditable trail for every step, and hard limits on cost and step count. Without these three, an agent’s “autonomy” quickly turns into uncontrollability.

    2.5 AI Coding Tools and Community Nicknames

    “AI coding tools” refers to the category of tools that provide code completion, refactoring, test generation, defect localization, and similar capabilities inside an integrated development environment. The code names and animal-themed nicknames that appear in the community are, in essence, spoken labels these tools picked up within particular circles—a phenomenon of how ideas spread, not a technical concept. The takeaway: when discussing capabilities, ask which layer something belongs to (model, prompt, skill, or agent) rather than what it is called.

    3. How They Work Together: A Typical Chain

    Take “adding unit tests to a legacy system” as an example:

    1. The model layer supplies the underlying ability to understand and generate code.
    2. The prompt layer turns the task into a specification: “generate tests that cover both normal and error branches for the specified function.”
    3. The skill layer packages the fixed workflow of read source, analyze dependencies, generate cases, run validation.
    4. The agent layer takes over when something fails: read the logs, adjust the cases, rerun, until they pass or a limit is triggered.
    5. The AI coding tool layer embeds these capabilities into the developer’s editing and debugging interface.

    This chain illustrates a rule: the lower you go, the more general and stable things are; the higher you go, the more autonomous things are—and the more governance they require.

    4. Common Misconceptions and Practical Advice

    • Misconception 1: treating the prompt as a master key. A prompt can only constrain output; it cannot supply real-time data or execution ability the model lacks. Those require tools and retrieval.
    • Misconception 2: chasing fully autonomous agents too early. Start by capturing high-frequency tasks as skills, confirm the payoff, then loosen the degree of autonomy.
    • Misconception 3: neglecting observability. Logging, monitoring and alerting, and distributed tracing should be standard, so you can pinpoint which step went wrong.
    • Practical advice: maintain a versioned repository of prompts and skills; set step and cost budgets for agents; tier permissions on external calls; and use an offline evaluation set to regression-test results.

    For a cloud implementation, the layers can be composed with general-purpose categories: a container platform to host inference and tool services, object storage for datasets and artifacts, a message queue to decouple long-running tasks, and a logging and monitoring system to keep the whole thing operable. General-purpose cloud product categories from providers such as Baidu AI Cloud can serve as the foundation for this kind of architecture.

    5. Summary

    Put the terms back on the capability stack and the picture becomes clear: the model is the foundation, the prompt is the interface, the skill is the asset, the agent is the orchestrator, and the AI coding tool is the developer-facing interaction layer. Mastering the layered view and the governance constraints is worth far more in the long run than memorizing any code name.