Library · Chapter 04
Building an AI Agent
From a real job to an Agent that can be tested and improved.
Building an Agent does not start with choosing a model or writing a prompt.
It starts with a real job that needs to be done more reliably by AI.
The basic process:
Job → Input → Output → Workflow → Model → Knowledge → Tools → Test → Improve
- 6.1CHOOSE A JOB TO TURN INTO AN AGENTDon’t turn a job into an Agent if it happens only once and has no stable process.1 min read · Read →
- 6.2DEFINE THE OBJECTIVEWrite one sentence that clearly describes what the Agent exists to do.1 min read · Read →
- 6.3DEFINE THE INPUTThe clearer the Input, the easier the workflow is to design.1 min read · Read →
- 6.4DEFINE THE OUTPUTBefore writing the workflow, know what result the Agent must produce.1 min read · Read →
- 6.5DESIGN THE WORKFLOWA workflow describes how the job is carried out.1 min read · Read →
- 6.6SEPARATE MANDATORY AND OPTIONAL STEPSThis keeps the Agent from running unnecessary Tools or workflows.1 min read · Read →
- 6.7CHOOSE A MODELChoose the model based on the nature of the job.1 min read · Read →
- 6.8CHOOSE THE THINKING LEVELThinking depends on how hard the workflow is.1 min read · Read →
- 6.9PREPARE THE KNOWLEDGEProvide only the Knowledge the Agent truly needs.1 min read · Read →
- 6.10CHOOSE TOOLSTools are chosen according to the needs of the workflow.1 min read · Read →
- 6.11DESIGN HUMAN-IN-THE-LOOPNot every step should be left for the AI to decide on its own.1 min read · Read →
- 6.12DESIGN FAILURE BEHAVIORThe Agent needs to know when it must stop.1 min read · Read →
- 6.13TEST THE AGENTDon’t test an Agent with just one case.1 min read · Read →
- 6.14EVALUATE THE AGENT1 min read · Read →
- 6.15CREATE A TEST CASE SETSave the important cases.1 min read · Read →
- 6.16DEBUG THE AGENTWhen the Agent answers incorrectly, don’t fix everything at once.1 min read · Read →
- 6.17DON’T PATCH THE AGENT ENDLESSLYReview → Consolidate Rules → Remove duplicates → Refactor → Retest1 min read · Read →
- 6.18VERSIONING THE AGENTWhen the output changes, you can know exactly which component changed.1 min read · Read →
- 6.19DON’T CHANGE MULTIPLE VARIABLES AT ONCEFor example, an Agent is not performing well.1 min read · Read →
- 6.20WHEN SHOULD YOU SPLIT AN AGENT?1 min read · Read →
- 6.21MULTI-AGENTNot every problem needs Multi-Agent.1 min read · Read →
- 6.22DIFFERENT MODELS FOR DIFFERENT STEPSThe whole workflow isn’t required to use the same model.1 min read · Read →
- 6.23MEMORY AND STATEWhat the Agent knows over the long term.1 min read · Read →
- 6.24DON’T USE MEMORY TO STORE EVERYTHINGNot every conversation is worth remembering.1 min read · Read →
- 6.25FROM MANUAL TO AUTOMATIONDon’t automate an Agent from the very start.1 min read · Read →
- 6.26A SAMPLE WORKFLOWResearch a topic and produce a sourced report.1 min read · Read →
- 6.27AGENT-BUILDING CHECKLISTIf these parts are clear, the Agent has enough of a foundation to start running.1 min read · Read →
