🗓 Planning
An AI agent can plans its actions. It does so by creating steps or procedures to achieve a goal. The model is the core, it is prompted to create this plan. This can also be referred to as reasoning capability.
Some of the earlier posts in this series talked about AI assistants. These AI Assistants use their training (and sometimes extra data) to answer questions, summarise information, and do small tasks. They are good at producing human-like responses, but they are not truly independent. Usually they follow a simple loop: take input, process it, then produce output.
Agents are the next step. Instead of just answering, an agent can make decisions, use external tools, act on its environment, and check whether those actions worked i.e more autonomous. If something does not go well, it can re-iterate and improve the outcome.
So, what is an agent? An agent is a software program that autonomously performs tasks, makes decisions, and learns from its experiences.
Let's take a closer look at agents: what are some key capabilities they offer, the main types you will meet, and where it makes sense to use them.
The definition above gives us a good idea of the 3 key characteristics of an agent:
An AI agent can plans its actions. It does so by creating steps or procedures to achieve a goal. The model is the core, it is prompted to create this plan. This can also be referred to as reasoning capability.
Agents can use external tools to perform tasks. These could be other software programs such as access to databases, APIs, search, other specific LLMs, etc. The model decides which tool to call and when to call it.
Agents can access memory to store and retrieve information. This allows the agent to remember past interactions and improve its outcomes. It can also help the agent to make the experience more personal and relevant.
Based on number of agents, agents can be categorised into two types - single agent and multi-agent.
These operate independently, without any coordination or collaboration with other agents. They fulfil a task or goal utilising their own capabilities and configured/accessible tools at hand.
We can categorise these single agents in a few different types - ranging from simple reflexive agents to more complex agents with learning capabilities. Let's have a look at some well known types of agents:
These agents are based upon condition-action rules i.e. agents understand the environment i.e. current state, based on existing rules, they plot their plan, and execute it. They do not hold any memory. They are reactive in nature.
flowchart LR
A[Perceive Current State] --> B{Rule Match?}
B -->|Yes| C[Execute Action]
B -->|No| D[No Action / Default]
When to use simple reflex agents? When the environment is well known, and predictable environments. Examples - monitoring and alerting systems, AI based settings in washer/dryers, thermostats, etc.
Model-based reflex agents add on the capability to memorise the environment and use it to make better decisions. They maintain a state of the environment and while the plan and execution is still based on condition-action rules, they are context-aware of the environment.
flowchart LR
A[Perceive Input] --> B[Update Internal State]
B --> C{Rule + State Match?}
C -->|Yes| D[Execute Action]
C -->|No| E[Wait / Re-evaluate]
When to use model-based reflex agents? These are useful in environments that are not well known, or dynamic. Example - Navigation systems, AI based workflow automation where previous steps are remembered and used to make better decisions.
Goal-based agents do not stop at "what does the current situation suggest I do next?", they also ask what they are trying to achieve. They choose actions that move them toward a defined goal, not only rules that fire on the present state. Planning fits naturally here: break the goal into steps, execute, and adjust when the world changes.
flowchart LR
A[Current State] --> B[Define Goal]
B --> C[Plan Steps]
C --> D[Execute Step]
D --> E{Goal Reached?}
E -->|No| C
E -->|Yes| F[Finish]
When to use goal-based agents? When success is "reach this outcome" rather than "follow this fixed playbook". Examples - trip planning, multi-step onboarding flows, research or coding assistants that must complete a task end-to-end.
These agents extend goal-based behaviour with trade-offs. Multiple actions might reach the goal, but some are faster, cheaper, safer, or less disruptive. The agent scores outcomes (a utility function) and picks the option that balances those preferences, not just the first plan that works.
flowchart LR
A[Current State] --> B[Define Goal]
B --> C[Plan Steps]
C --> U[Score options by utility]
U --> V[Pick best trade-off]
V --> D[Execute Step]
D --> E{Goal Reached?}
E -->|No| C
E -->|Yes| F[Finish]
When to use utility-based agents? When "good enough" is not enough and you care about multiple criteria such as cost, latency, risk, or user experience. Examples - a self-driving car that needs to balance speed, safety, energy efficiency, etc. This model would find good use case in personalisation algorithms as well.
Learning agents improve over time. They observe what happens when they act, compare results to what they expected, and update their rules, model, or policy. That feedback loop is what separates a static system from one that gets better with use—similar in spirit to how you iterate when a bake does not turn out quite right.
flowchart LR
A[Observe State] --> B[Choose Action]
B --> C[Receive Feedback]
C --> D[Update Policy / Model]
D --> A
When to use learning agents? When the environment change, and/or you cannot hand-write every rule up front. Examples - personalisation, conversational commerce assistants, medical diagnosis, etc.
These is essentially a committee of agents working together to achieve a common goal. Each of the agent brings to table their own capabilities and tools at their disposal. Such systems can operate for dynamic environments, and all the while continuously iterate to improve the outcome. Multi-agent systems can accomplish highly complex tasks and/or goals, making them highly intelligent.
As a software engineer, you are currently in a position where you are most likely either using agents to deliver value for your customers or for the purposes of your (or your team's) productivity. Understanding the types of agents and their capabilities will help you make better decisions for your customers and yourselves.
Another aspect to consider is applications of AI agents are not limited to simply chatbots or assistants. They can be used to automate complex tasks. Let's take a few examples in the context of software development and revisit which of the above agents fit best.
Lets look at some examples of agentic AI in our day to day work:
| Example | What it does | Potential agents | Why |
|---|---|---|---|
| 🎁 Agentic personalisation | Observe users' browsing patterns, choose to show search results and recommendations that build on previous browsing patterns, purchases, the user's persona, and so on. Continuously updates based on engagement. | Learning agents. | It continuously improves from feedback i.e. a classic learning loop. |
| Fraud detection agent | Monitor transactions, detect anomalies (location, velocity, patterns), and take action such as block transactions, flag for review, or trigger extra verification steps. | Utility-based agent (if it is rule-heavy, could also be goal-based). | You often need a clear outcome (stop fraud), trade-offs (false positives vs. customer friction). |
| 📦 Demand & inventory planning | Predict demand per region, take into account demand factors, weather, holidays, and similar signals. Order needed inventory to the relevant warehouse. | Utility-based agent. | It is not reacting instantly; rather it is forecasting and optimising—hence utility-driven. |
| 🔎 Incident triage agent | Watch logs, metrics, and alerts. Correlate signals across systems. Decide root-cause hypotheses, corrective action if identified, which team to notify, and so on. | Model-based agent (could also be goal-based). | Needs to maintain system state and leverage existing runbooks based on conditions to take actions. |
| 🤖 Agentic code generation | Generate code from user requirements, prompts, context, and agent instructions. Perform validations against test cases. | Multi-agent. | Would require models to plan, generate, validate, and review code. This could be a combination of goal-based agents, utility-based agents, and learning agents. |