Ways to build an AI agent
Some work is better handed to an agent than done one prompt at a time. An agent is AI that pursues a goal by taking steps on its own, choosing and running tools, reading the result, and deciding what to do next, all within the bounds you set. This page is about designing that well: what the agent can reach, how it decides, and where it has to stop and hand back to a person.
Say it another way
What is an agent, in plain words? Usually you tell the AI one thing and it does that one thing. An agent is AI you hand a goal to instead, and it works out the steps itself, does them, checks how they went, and decides what to do next, until the goal is met. It is the difference between talking someone through a recipe step by step and simply asking them to make dinner. The real skill is deciding what it may do on its own, and where it has to stop and check with you.
The pages in this group
- The agent loop. The loop is your code, not the model’s. What each pass does and how it stops.
- Write tool descriptions the model can choose from. The description is not documentation, it is how the model chooses.
- Which tools each agent gets. More tools means worse selection. The cost is in the choosing.
- Work out the steps before you split the work. Whether you hold the pattern already or have to go and find it.
- Let one agent hold the whole picture. The coordinator is the only thing holding the whole job.
- Pass everything the helper needs. If a fact is not passed, it does not exist for that helper.
- Send independent work out together. Parallel is not a setting, it is where the calls sit.
- Hooks that always run. A prompt gives a tendency and a hook gives a guarantee.
- How much to let AI decide. You do not choose a shape, you choose what to decide.
- Guaranteeing the steps that matter. A prompt asks, code guarantees.
- What kind of failure is it. Saying which kind it was is what makes the next move obvious.