Source: Levelica
Canonical: https://www.levelica.com/en/guides/ai-agent-building

# AI Agent Building

## Summary

Designing language models to do multi-step work with tools, and running them with evals and safeguards.

## Description

AI agent building is giving a large language model (LLM) tools, retrieval, and memory so it can carry out multi-step tasks. You start by connecting tools to a model, then move up in complexity: workflows that chain calls in a set order, autonomous agents that decide their own next action, and systems of several agents. As you climb, you also need eval sets, guardrails, human approval steps, and risk management. Unlike AI utilization, which is about using existing AI tools well, this guide covers building and operating agents yourself.

---

## Level Overview

| Level | Proficiency Stage    | Hashtags                                                         |
| ----- | -------------------- | ---------------------------------------------------------------- |
| Lv.1  | Agent Explorer       | #AugmentedLLM #AgentLoop #ToolUse #TaskFit                       |
| Lv.2  | Tool-Calling Builder | #ToolDefinitions #FunctionCalling #Retrieval #StructuredOutput   |
| Lv.3  | Workflow Builder     | #PromptChaining #Routing #Parallelization #Guardrails            |
| Lv.4  | Agent Engineer       | #AutonomousAgents #EvalSets #AgentMemory #HumanApproval          |
| Lv.5  | Agent Architect      | #OrchestratorWorkers #MultiAgent #EvaluatorOptimizer #RedTeaming |
| Lv.6  | Agent Platform Owner | #AgentPlatform #RiskProfile #AgentRegistry #IncidentResponse     |
| Lv.7  | Agent Pioneering     | #AgentProtocols #OpenBenchmarks #NovelArchitectures #AgentSafety |

> Proficiency stages are role-based names drawn from each level's key behavior. The field has no recognized grading scheme yet, so the order of complexity Anthropic lays out (augmented LLM, workflows, autonomous agents) serves as the backbone of the level boundaries.

> **Integrated Framework:** This guide's 7-level structure integrates four independent axes. Anthropic's Building effective agents provides the **system complexity axis** (the augmented LLM, five workflow patterns, autonomous agents), OpenAI's A practical guide to building agents provides the **design element axis** (models, tools, instructions, orchestration, guardrails), the survey by Wang et al. provides the **architecture module axis** (profiling, memory, planning, action) along with evaluation methods, and CLTC's Agentic AI Risk-Management Standards Profile provides the **risk management axis** (Govern, Map, Measure, Manage). Levels are divided by the complexity of the system you build and the scope you answer for, and each level's items are drawn from the design element and risk management axes.

> Cross-Validation: Level boundaries were set by checking that independent sources converge on the same point.
>
> - L2/L3 boundary: Anthropic's move from the augmented LLM to workflows (prompt chaining, routing, parallelization) converges with the point where OpenAI's guide brings in guardrails. You go from implementing a single tool call to chaining several calls along a set path and deploying the result.
> - L3/L4 boundary: the line Anthropic draws between workflows (predefined code paths) and agents (the model directs its own process) converges with the planning and memory modules Wang et al. describe. You go from a person fixing the path to letting the model choose the path and controlling it with evals.
> - L4/L5 boundary: the criteria in OpenAI's guide for moving from a single agent to multiple agents converge with Anthropic's orchestrator-workers pattern. You go from building one agent to designing a production system made of several.

---

## Level 1

#AugmentedLLM #AgentLoop #ToolUse #TaskFit

### Summary

Telling what an agent is and how it differs from a plain model call.

### Description

You're getting the concepts straight before you build. You tell apart a single model call, a workflow that makes several calls in a set order, and an agent where the model decides its own next action. You understand that the augmented LLM, a model extended with retrieval, tools, and memory, is the basic unit, and you watch which tools existing agent products call. You don't write code yet; you write instructions and compare the results.

### Checklist

- [ ] Can explain how a single model call, a workflow, and an agent differ, with 1 example of each
- [ ] Can explain what each of the 3 augmentations of the augmented LLM (retrieval, tools, memory) adds
- [ ] Can draw the agent loop as a flowchart: the model picks a tool, gets the result, and decides the next action
- [ ] Can write instructions with a role, goal, and constraints and get answers in a consistent format across 5 runs of the same task
- [ ] Can give an existing agent product 3 tasks and record which tool it called at each step
- [ ] Can judge whether a given task fits a single call without an agent and write 2 or more reasons

> If you've checked off most of this list, you're ready to enter the Tool-Calling Builder stage of the proficiency model, where you'll connect tools to a model yourself. Define one simple tool, such as a weather lookup or a calculator, and get the model to call it. Anthropic (2024) recommends starting with the simplest solution and adding complexity only when needed, and a model with one tool attached is that starting point.

---

## Level 2

#ToolDefinitions #FunctionCalling #Retrieval #StructuredOutput

### Summary

Wiring tools and retrieval to a model to handle a single request.

### Description

You connect tools to a model in code. You write tool definitions with a name, description, and input schema so the model picks the right tool, and you finish the answer from the function calling result. You implement retrieval that pulls relevant content from documents, get structured output, and handle tool failures. You work on simple flows that end within one request, and you check quality by hand.

### Checklist

- [ ] Can define 3 tools with a name, description, and input schema and get the model to pick the tool that fits the request
- [ ] Can write and run a program in which the model calls a tool, receives the result, and gives the final answer
- [ ] Can implement retrieval that searches a document set for relevant passages and puts them into the answer as grounding
- [ ] Can receive model output in a set schema (e.g., JSON) and re-request when the format is wrong
- [ ] Can catch 2 kinds of tool call failure (timeouts and bad arguments) and return the error content to the model
- [ ] Can implement a rule that trims conversation history and tool results so they stay within the context limit
- [ ] Can grade whether the model's tool choice was right on 10 test inputs and calculate the accuracy

> If you've checked off most of this list, you're ready to enter the Workflow Builder stage of the proficiency model, where you'll chain several calls to automate real work. Split what your program does into two steps and put a check between them. Anthropic (2024) lists prompt chaining as the first workflow pattern and says it fits when a task can be cleanly broken into fixed subtasks.

---

## Level 3

#PromptChaining #Routing #Parallelization #Guardrails

### Summary

Deploying workflows that chain model calls, with guardrails.

### Description

You build workflows that automate real work and get other people using them. You implement prompt chaining that breaks a task into steps, routing that splits the path by input type, and parallelization that runs independent work at the same time. You attach guardrails to inputs and outputs, trace every call in logs, and compare before and after a change with eval inputs. A person fixes the path in advance.

### Checklist

- [ ] Can implement prompt chaining that splits one task into 3 or more steps and put a validation gate between steps
- [ ] Can implement routing that classifies the input type and sends it to different instructions or models
- [ ] Can run independent subtasks in parallel, merge the results, and measure the time saved against running them in sequence
- [ ] Can deploy a workflow that automates 1 real task and get 5 or more users to use it for 2 weeks or more
- [ ] Can attach 2 or more kinds of guardrails to inputs and outputs (e.g., off-topic and personal data checks)
- [ ] Can trace every model call and tool call in logs and find the step that caused a failure case
- [ ] Can build 30 or more eval inputs with grading criteria and compare the success rate before and after a change

> If you've checked off most of this list, you're ready to enter the Agent Engineer stage of the proficiency model, where you'll build agents in which the model chooses its own path. Pick one task whose number of steps can't be known in advance and hand the loop to the model. Anthropic (2024) separates workflows, which follow predefined code paths, from agents, which are systems where the model directs its own process and tool use.

---

## Level 4

#AutonomousAgents #EvalSets #AgentMemory #HumanApproval

### Summary

Building autonomous agents and controlling them with evals.

### Description

You build autonomous agents in which the model plans for itself and calls tools in a loop. Since the path can't be fixed in advance, you set stop conditions and cost limits and put human approval in front of irreversible actions. You measure quality with large eval sets and automated graders, design agent memory that lasts across sessions, and rewrite tool descriptions to cut misuse. You also make the call not to use an agent when a workflow is enough.

### Checklist

- [ ] Can implement an autonomous agent that plans for itself and calls tools in a loop to finish tasks of 10 or more steps
- [ ] Can set 3 limits (a maximum number of turns, a cost limit, stop conditions) so the agent can't loop forever
- [ ] Can put a human approval step in front of irreversible actions such as payments, deletions, and outbound messages
- [ ] Can build an eval set of 100 or more tasks with an automated grader and report its agreement rate with human grading
- [ ] Can design memory that lasts across sessions and set rules for what to store and what to drop
- [ ] Can rewrite tool descriptions and return formats and show the drop in tool misuse with before-and-after numbers
- [ ] Can judge whether a workflow or an autonomous agent fits a task by its predictability and cost, and record the decision

> If you've checked off most of this list, you're ready to enter the Agent Architect stage of the proficiency model, where you'll design production systems made of several agents. Find the part of your agent where tools get confused most and split it off into a separate agent. OpenAI (2025) recommends getting the most out of a single agent first and splitting into multiple agents when instructions grow complex or tool selection becomes unreliable.

---

## Level 5

#OrchestratorWorkers #MultiAgent #EvaluatorOptimizer #RedTeaming

### Summary

Designing multi-agent systems and running them in production.

### Description

You put systems of cooperating agents into production. You choose between the orchestrator-workers and evaluator-optimizer patterns to fit the task, and you manage success rate, cost, and latency as metrics. You run red teaming against threats such as prompt injection and tool misuse, and you operate a release process that checks for regressions when the model changes. You review other developers' multi-agent designs.

### Checklist

- [ ] Can design a multi-agent system with an orchestrator and 3 or more workers and deploy it to production
- [ ] Can set criteria for splitting a single agent into several (number of tools, instruction complexity) and apply them across a team
- [ ] Can manage the success rate, cost, and latency of an agent handling 1,000 or more tasks a month on a dashboard
- [ ] Can implement an evaluator-optimizer structure that repeats generation and evaluation and state the quality gain as a number
- [ ] Can run red teaming for prompt injection, tool misuse, and privilege escalation and put fixes in place for what you find
- [ ] Can document and operate a release process that checks for regressions with the eval set when swapping or upgrading the model
- [ ] Can review the designs of 3 or more agent developers and guide their revisions

> If you've checked off most of this list, you're ready to enter the Agent Platform Owner stage of the proficiency model, where you'll build the foundation and rules that several teams share. Collect the tool connections and eval code each team wrote separately and look for the common parts. CLTC's (UC Berkeley) agentic AI risk-management profile groups its guidance under Govern, Map, Measure, and Manage, and at the organization level Govern has to come first.

---

## Level 6

#AgentPlatform #RiskProfile #AgentRegistry #IncidentResponse

### Summary

Owning the organization's agent platform and risk policy.

### Description

You answer for the foundation of agent development and operations across the organization, beyond any single system. You design a shared agent platform (tool registration, permissions, tracing, evals) and set each agent's permission scope and approval steps. You issue the risk management policy, keep an agent registry of what's in production, and drill the incident response procedure. You measure the effect of adoption and report it to executives.

### Checklist

- [ ] Can design an agent platform with tool registration, permissions, tracing, and evals and get 3 or more teams using it
- [ ] Can issue the organization's agent risk management policy organized under the four functions of the NIST AI RMF (Govern, Map, Measure, Manage)
- [ ] Can set criteria for each agent's permission scope and approval steps and apply them to every agent in production
- [ ] Can keep a registry recording the owner and risk rating of 10 or more agents in production
- [ ] Can write the response procedure for agent malfunctions or data leaks and run a drill at least once a year
- [ ] Can measure the effect of agent adoption (time saved, cost, quality) at the organization level and report it to executives
- [ ] Can design the job levels and development course for agent engineers and develop 2 or more people to lead level

> If you've checked off most of this list, you're ready to enter the Agent Pioneering stage of the proficiency model, where you'll create architectures and standards used outside your organization. Publish one design pattern or eval set you've reused on your platform. The survey by Wang et al. (2023) sorts agent evaluation into subjective and objective evaluation, and adding public evaluation criteria is one way to contribute to the field's knowledge.

---

## Level 7

#AgentProtocols #OpenBenchmarks #NovelArchitectures #AgentSafety

### Summary

Creating widely adopted agent architectures and benchmarks.

### Description

You advance how agents are built, beyond one organization's platform. Frameworks, agent protocols, or design patterns you published are adopted by other organizations, and your papers and technical reports are cited. You create open benchmarks other researchers use, and you take part in writing agent safety and interoperability standards. You propose novel architectures that solve task types existing ones couldn't and validate them on public benchmarks.

### Checklist

- [ ] Can prove that an agent framework or protocol you published has been adopted by 3 or more outside organizations
- [ ] Can show that your peer-reviewed papers or technical reports on agents have been cited 10 or more times
- [ ] Can create and publish an agent evaluation benchmark and present 3 or more cases of outside research using it
- [ ] Can present a record of being named as a contributor to an agent safety or interoperability standard
- [ ] Can present a record of 5 or more invited talks at international academic or industry conferences
- [ ] Can propose a new agent architecture that solves a task type existing ones couldn't and validate it on a public benchmark

> If you've checked off most of this list, you're at the stage of widening the methods and standards for building agents. Collect and publish the tasks your architecture fails on and use them as the starting point for the next one. As OWASP's agentic threats and mitigations document and CLTC's (UC Berkeley) risk-management profile show, the field's standards are still in their first editions, which leaves plenty of room to contribute.

---

## References

- [Building effective AI agents](https://www.anthropic.com/engineering/building-effective-agents) — Anthropic
- [A practical guide to building agents](https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf) — OpenAI
- [A Survey on Large Language Model based Autonomous Agents](https://arxiv.org/html/2308.11432v7) — Wang et al. (Renmin University of China) — arXiv:2308.11432v7
- [Agentic AI Risk-Management Standards Profile (Version 1.0)](https://cltc.berkeley.edu/agentic-ai-risk-management-standards-profile) — Center for Long-Term Cybersecurity (CLTC), UC Berkeley
- [Agentic AI – Threats and Mitigations (v1.0)](https://genai.owasp.org/resource/agentic-ai-threats-and-mitigations) — OWASP GenAI Security Project
