AI Agents: 4 Step Approach

This framework outlines a simple approach when thinking about building any AI agent.

The Goal: The starting point for every AI agent project is the goal. Each agentic workflow must have a goal. The goal may be simple or complex to reach, but reach it we must.

Specify tasks: Once we know what the goal is, we define the steps required to get from the beginning of the agent's work to the end of it. These are the tasks the agent must perform.

Implement tasks: Each of the tasks is created and tested to make sure it independently does what it needs to do. Sometimes a human check is put at the end of a task, so we can be sure the agent is doing the right thing.

Implement workflow: Once all of the tasks are working as expected, we stitch them together into a workflow. This is the process the agent will follow to do its job.

Agent Workflow Design Considerations

* Main agent - great for keeping context and state of the overall workflow, but eventually you run into some form of context rot. You can compress the parts that aren’t important later, but the risk is that you lose something useful. 

* Subagent - great for specific types of knowledge, system prompts, specialized tool use, and specific roles in of a workflow. The benefit with a subagent is that you can truly align an agent for a step in a process that can be called at the right time. The downside is the loss of context and finding the right division of agents so you don’t have too many that slow things down.

* Tool - obviously necessary and great for anything you want to reliably happen the same way every time or to interact with an external system or data. The more tools you have, the more confused the main or subagent can get on what to use. Even a human with access to multiple conflicting tools will often use the wrong one of the job, so some degree of constraints here is key.