AI Agent Core Concepts Explained: Model, Tool, Skill, and Harness
This article breaks down the core architecture of AI Agents, explaining why an agent is a system built around an LLM rather than the model itself. It details four key components—Model, Tool, Skill, and Harness—shows how they collaborate in a complete task flow, and offers practical guidance on common pitfalls and implementation best practices.
1. Start With the Basics: An Agent Is Not the Model Itself
The easiest way to remember what an AI Agent is: it is a system that uses a large model as its decision-making core, can call external tools, receives runtime feedback, and keeps advancing a task until the goal is achieved.
Two words in that sentence deserve attention: core and system. The model is only the core, not the whole thing. What makes an Agent work is the entire engineering structure built around the model.
A conventional conversational model follows a “one question, one answer” pattern: you input a prompt, it outputs a response, and the interaction ends there. An Agent follows a goal-driven loop: the user states the final goal, and the system decomposes the task, chooses methods, executes actions, reads results, and revises its plan, repeating until it converges.
A minimal pseudocode example highlights the difference between these two paradigms:
# Single-turn question-answering paradigmanswer = model(prompt)# Agent loop paradigmgoal = parse(user_input)while not is_done(goal):plan = model.plan(goal, history)result = tool.call(plan.action, plan.args)history.append((plan, result))goal = update(goal, result)
Though simplified, this code exposes the real engineering challenges of an Agent: how to determine the loop’s termination condition, how to trim the history context, and how to ensure the model correctly interprets errors returned by tools. None of these can be solved by “switching to a bigger model”; they must be solved through structural design.
2. Four Core Components: Model, Tool, Skill, and Harness
When discussing Agents, the industry typically breaks them into four layers. They differ in abstraction level and responsibility.
2.1 Model: The Engine for Decision-Making and Reasoning
The model is responsible for understanding intent, making plans, deciding the next action, and making semantic judgments about results. What it outputs is a structured decision, not the final answer.
Three things must be clear from an engineering standpoint: first, the model’s context window is limited and must be paired with memory management; second, model output is nondeterministic and requires format constraints and validation; third, the model is highly sensitive to tool descriptions—vague tool documentation noticeably reduces call accuracy.
2.2 Tool: The Hands and Feet for Interacting With the Outside World
Tools are the physical extension of the model’s capabilities, typically involving read and write operations on external systems, such as retrieving from a knowledge base, querying a database, calling a business API, manipulating files, or executing code snippets.
A few general principles are recommended when designing tools:
- Single semantics: one tool does one thing; avoid “universal interfaces.”
- Clear descriptions: the name, purpose, parameter meanings, and return structure must all be accurately understood by the model.
- Readable errors: on failure, return a structured error reason rather than a generic exception.
- Least privilege: grant only the minimum operation scope required to complete the task.
{"name": "query_order_status","description": "Query the current status and latest logistics node of an order by order ID","parameters": {"order_id": "string, the unique order identifier","with_logistics": "boolean, whether to return logistics details, default false"}}
2.3 Skill: A Reusable Encapsulation of Methodology
Tools solve “whether it can be done”; Skills solve “how to do it well.” A Skill distills the proven workflow, precautions, and judgment criteria for a class of tasks into a reusable knowledge unit that is loaded into context when needed.
For example, “troubleshooting online API timeouts” can be encapsulated as a Skill: first confirm the scope of impact, then check the access layer, application layer, and dependency layer in sequence, and finally provide a conclusion and rollback recommendation. After loading this Skill, the model’s behavior shifts from random exploration to following a defined path, significantly improving stability.
The key difference between a Skill and a Tool: a Tool is an action; a Skill is a process and experience.
2.4 Harness: The Framework That Makes the Loop Actually Run
The Harness is the runtime framework wrapped around the model. It handles context assembly, loop scheduling, tool registration and invocation, state persistence, timeouts and retries, log tracing, and cost and rate-limit control. It does not directly produce intelligence, but it determines whether intelligence can be reliably delivered.
A simplified illustration of a Harness main loop:
while step < MAX_STEPS:context = build_context(goal, memory, skills, budget)decision = model.invoke(context, tools_schema)if decision.type == "final":return decision.answerobservation = executor.run(decision.tool, decision.args)memory.record(decision, observation)step += 1return fallback()
3. How the Four Collaborate: The Flow of a Complete Task
Take “organize last week’s online alerts and provide improvement suggestions” as an example:
- The Harness receives the goal and initializes the budget and memory.
- The Model determines that historical data is needed and selects the log query tool.
- The Tool returns structured alert records, and the Harness writes them into memory.
- The Model finds that the alerts concentrate on the same type of error and loads the “fault attribution” Skill.
- Following the Skill’s guidance, it continues to call the metrics query and change-record query tools.
- Once the evidence is sufficient, it outputs conclusions and suggestions, and the Harness ends the loop and persists the results.
As you can see, the model is invoked only at “decision points,” tools handle deterministic operations, Skills constrain the reasoning path, and the Harness keeps the process under control.
4. Common Pitfalls and Implementation Advice
- Pitfall 1: Equating an Agent with a large model. Without a Harness, the model can only chat and cannot complete tasks.
- Pitfall 2: Assuming more tools are better. Tool bloat reduces selection accuracy, so tools should be scoped down per scenario.
- Pitfall 3: Ignoring observability. Without complete step logs and tracing, online issues are nearly impossible to locate.
- Pitfall 4: Setting no boundaries. You must preset a maximum number of steps, timeouts, budget caps, and a human-takeover mechanism.
For implementation, it is recommended to start with a single scenario, a small set of tools, and clear acceptance criteria—get the loop working first, then gradually expand capabilities. On the infrastructure side, you can rely on a container platform to host the runtime, a message queue for asynchronous decoupling, object storage to save artifacts, and logging services with monitoring and alerting to ensure observability; if you use a cloud model service, you should also abstract it through a unified model access layer to avoid coupling business logic to a specific implementation. Baidu AI Cloud offers a fairly complete combination of these general capabilities, making it easy for teams to build what they need on demand.
5. Summary
The Model provides judgment, the Tool provides execution, the Skill provides methodology, and the Harness provides order. Only when the four each perform their roles and mesh together do they form a reliable Agent system. Understanding this layered structure is more valuable in the long run than memorizing any single framework.
