Building AI Agents · Part 1 of 7 · Definitions, Environments & Examples · Oct 2026
Quick answer: An AI agent is a software system that uses a large language model (LLM) to work towards a goal on a user's behalf. It follows instructions, plans its steps, calls tools to act on the world, remembers context and repeats this loop until the job is done.
Introduction
AI agents are being productised and packaged as the next generation of software products. They have great potential to transform work and influence daily life because they can plan and carry out complex tasks, not just answer questions. They lower transaction costs, influence market structures and reshape individual workflows, changing how we live and work.
This series is a practical guide to building them. It starts with the concepts and works up to multi-agent systems and the protocols that let agents talk to each other. The code examples use TypeScript and the Vercel AI SDK, but the ideas apply to any agent framework.
Defining an AI Agent
AI agents are specialised AI-based software systems that interact with users and large language models through instructions. They carry out reliable, autonomous operations across different domains, environments and industries on behalf of a user or another agent. They do this through workflow patterns (planning and taking steps), access to resources and the use of available tools.
An agent shapes how an LLM makes decisions through four capabilities as it interacts with its environment to achieve complex goals:
- Perception: taking in information from the user, files, tools and the environment.
- Reasoning: deciding what to do next based on that information.
- Collaboration: working with users and with other agents.
- Action: calling tools that change something in the world, such as booking, posting or saving.
At a basic level, agents are just prompts and tool calls. To build them you need to understand the different ways of prompting a model and the types of tools available to you. At an advanced level, agent building involves multi-agent orchestration and graph-based workflows, which later parts of this series cover.
Key Terms
| Term | What it means |
|---|---|
| Workflow patterns | Structures such as sequential, parallel and routing flows that give an agent reliability when it acts autonomously (Part 6). |
| Memory | Lets an agent save information and recall it later. Without memory, every conversation starts afresh (Part 4). |
| Tools | Functions an agent can call to act beyond text generation: searching, querying a database, sending an email (Part 4). |
| Agent framework | A software toolkit that provides standard components, abstractions and orchestration to simplify agent development. |
| Agent development tools (ADTs) | The SDKs and frameworks used to build agents, such as the Vercel AI SDK, Mastra, the Laravel AI SDK and Google's Agent Development Kit (Part 2). |
| Vector embeddings | Numeric representations of text stored in a database so an agent can search by meaning, the basis of retrieval-augmented generation, or RAG (Part 6). |
| Agent development lifecycle | The stages of building an agent: design, implementation, testing, deployment and maintenance. |
How Agent Development Tools Define an Agent
Most agent development tools define an agent with the same core parameters. An agent is usually a single object that combines:
- A name, so it can be identified, especially when several agents work together.
- A model from an AI provider, such as Anthropic, OpenAI or Google.
- Instructions that describe its role, rules and goals.
- Tools it is allowed to use.
- Provider settings, such as temperature, reasoning level and output limits.
Most of these tools now also support building agents with coding agents. You install the framework's Agent Skills and its documentation MCP server, and your coding assistant gets an accurate, up-to-date reference. That gives you a solid starting setup and a big productivity boost.
Advertisement
Agents Are Software
Because agents are built in programming languages like TypeScript and Python, anything you can do in code you can also do in an agent: handle events, stream data, use data structures and algorithms, call databases and APIs. What an agent adds on top of traditional software is a reasoning layer that decides which of those capabilities to use, and when, based on the situation in front of it.
That flexibility comes with a responsibility. When you build an agent, define three things clearly:
- How the agent makes decisions: its instructions, rules and the tools it may choose from.
- The environment it interacts with: what it can see and change.
- The goals it needs to achieve: what "done" looks like.
Agent Environments
An agent's environment is where it perceives and acts. Common environments include:
| Environment | Example |
|---|---|
| Personal computer | A desktop agent that organises files or operates applications. |
| Browser and the open web | Research agents, such as Perplexity's, that browse and read the web. |
| Database | An agent that queries and updates business records. |
| Servers | An agent that runs commands, deploys code or monitors systems. |
| Mobile devices | On-device agents that run models locally, using runtimes such as Google's LiteRT. |
Each environment brings its own performance challenges, such as latency, limited memory on devices or unreliable web pages. These must be solved before AI can be used to its full potential there.
Examples of AI Agents
A Travel Agent
Helps users find destinations that match their preferences, compares flight and hotel costs, makes bookings and adjusts plans when things change.
A Loan Agent
Helps a customer take out a loan. With permission, it reviews their salary information and credit history, then talks with them to find the loan that fits what they need it for.
A Shopping Agent
Listens to a customer's preferences, looks at their previous purchases and presents options, helping them find, for example, the right sports coat for an event.
What's Next
In Part 2 we look at the toolkits used to build agents, focusing on the Vercel AI SDK, Mastra and how to connect to AI providers.
Building AI Agents: the series
- Part 1: What Are AI Agents? (you are here)
- Part 2: Agent Development Tools, Vercel AI SDK and Providers
- Part 3: Prompts: Text, Instructions and Messages
- Part 4: Context, Memory and Tools
- Part 5: The Agent Loop, Skills and Subagents
- Part 6: Workflow Patterns, RAG and Events
- Part 7: Agent Protocols: MCP, A2A and Beyond
Cover photo: Cash Macanaya on Unsplash
Chainbook builds intelligent business systems for African professionals, and AI agents are at the heart of how we build them.