An Illustrated Guide To AI Agents
An Illustrated Guide To AI Agents
2025 EDITION EE
AI AGENTS
THE ILLUSTRATED
GUIDEBOOK
Scan the QR code below or open this link to start the assessment. It will only take
2 minutes to complete.
https://bit.ly/agents-assessment
1
DailyDoseofDS.com
Table of contents
AI Agents....................................................................................................... 4
What is an AI Agent?...................................................................................5
Agent vs LLM vs RAG................................................................................... 8
LLM (Large Language Model)..............................................................................8
RAG (Retrieval-Augmented Generation).........................................................9
Agent.............................................................................................................................. 9
Building blocks of AI Agents.....................................................................10
1) Role-playing...........................................................................................................10
2) Focus/Tasks............................................................................................................ 11
3) Tools.......................................................................................................................... 11
#3.1) Custom tools.................................................................................................. 12
#3.2) Custom tools via MCP...............................................................................17
4) Cooperation...........................................................................................................21
5) Guardrails.............................................................................................................22
6) Memory................................................................................................................. 22
5 Agentic AI Design Patterns...................................................................24
#1) Reflection pattern.......................................................................................... 25
#2) Tool use pattern.............................................................................................25
#3) ReAct (Reason and Act) pattern........................................................... 26
#4) Planning pattern........................................................................................... 28
#5) Multi-Agent pattern.....................................................................................29
5 Levels of Agentic AI Systems................................................................30
#1) Basic responder................................................................................................31
#2) Router pattern.................................................................................................31
#3) Tool calling.......................................................................................................32
#4) Multi-agent pattern.....................................................................................32
#5) Autonomous pattern....................................................................................33
2
DailyDoseofDS.com
AI Agents Projects..................................................................................... 34
#1) Agentic RAG........................................................................................................... 35
#2) Voice RAG Agent..................................................................................................41
#3) Multi-agent Flight finder................................................................................ 46
#4) Financial Analyst.................................................................................................54
#5) Brand Monitoring System................................................................................ 59
#6) Multi-agent Hotel Finder.................................................................................67
#7) Multi-agent Deep Researcher........................................................................75
#8) Human-like Memory for Agents...................................................................82
#9) Multi-agent Book Writer................................................................................. 89
#10) Multi-agent Content Creation System..................................................... 98
#11) Documentation Writer Flow.........................................................................106
#12) News Generator................................................................................................ 112
3
DailyDoseofDS.com
AI Agents
4
DailyDoseofDS.com
What is an AI Agent?
Imagine you want to generate a report on the latest trends in AI research. If you
use a standard LLM, you might:
This iterative process takes time and effort, requiring you to act as the
decision-maker at every step.
5
DailyDoseofDS.com
● A Filtering Agent scans the retrieved papers, identifying the most relevant
ones based on citation count, publication date, and keywords.
6
DailyDoseofDS.com
Here, the AI agents not only execute the research process end-to-end but also
self-refine their outputs, ensuring the final report is comprehensive, up-to-date,
and well-structured - all without requiring human intervention at every step.
To formalize AI Agents are autonomous systems that can reason, think, plan,
figure out the relevant sources and extract information from them when needed,
take actions, and even correct themselves if something goes wrong.
7
DailyDoseofDS.com
It can reason, generate, summarize but only using what it already knows (i.e., its
training data).
8
DailyDoseofDS.com
It’s smart, but static. It can’t access the web, call APIs, or fetch new facts on its
own.
RAG makes the LLM aware of updated, relevant info without retraining.
Agent
An Agent adds autonomy to the mix.
An Agent uses an LLM, calls tools, makes decisions, and orchestrates workflows
just like a real assistant.
9
DailyDoseofDS.com
1. Role-playing
2. Focus
3. Tools
4. Cooperation
5. Guardrails
6. Memory
Let’s explore each of these concepts and understand why they are fundamental to
building great AI agents.
1) Role-playing
One of the simplest ways to boost an agent’s performance is by giving it a clear,
specific role.
A generic AI assistant may give vague answers. But define it as a “Senior contract
lawyer,” and it responds with legal precision and context.
Why?
Because role assignment shapes the agent’s reasoning and retrieval process. The
10
DailyDoseofDS.com
more specific the role, the sharper and more relevant the output.
2) Focus/Tasks
Focus is key to reducing hallucinations and improving accuracy.
Giving an agent too many tasks or too much data doesn’t help - it hurts.
For example, a marketing agent should stick to messaging, tone, and audience
not pricing or market analysis.
3) Tools
Agents get smarter when they can use the right tools.
11
DailyDoseofDS.com
12
DailyDoseofDS.com
CrewAI supports several tools that you can integrate with Agents, as depicted
below:
Below, let's look at how you can build one for your custom needs in the CrewAI
framework.
13
DailyDoseofDS.com
Next, we define the input fields the tool expects using Pydantic.
14
DailyDoseofDS.com
Every tool class should have the _run method which we will execute whenever
the Agents wants to make use of it.
In the above code, we fetch live exchange rates using an API request. We also
handle errors if the request fails or the currency code is invalid.
Now, we define an agent that uses the tool for real-time currency analysis and
attach our CurrencyConverterTool, allowing the agent to call it directly if needed:
15
DailyDoseofDS.com
Finally, we create a Crew, assign the agent to the task, and execute it.
Works as expected!
16
DailyDoseofDS.com
Instead of embedding the tool directly in every Crew, we’ll expose it as a reusable
MCP tool—making it accessible across multiple agents and flows via a simple
server.
We’ll now write a lightweight server.py script that exposes the currency converter
tool. We start with the standard imports:
17
DailyDoseofDS.com
To make the tool accessible, we need to run the MCP server. Add this at the end
of your script:
18
DailyDoseofDS.com
This starts the server and exposes your convert_currency tool at:
http://localhost:8081/sse.
Now any CrewAI agent can connect to it using MCPServerAdapter. Let’s now
consume this tool from within a CrewAI agent.
First, we import the required CrewAI classes. We’ll use Agent, Task, and Crew
from CrewAI, and MCPServerAdapter to connect to our tool server.
Next, we connect to the MCP tool server. Define the server parameters to
connect to your running tool (from server.py).
This agent is assigned the convert_currency tool from the remote server. It can
now call the tool just like a locally defined one.
19
DailyDoseofDS.com
Finally, we create the Crew, pass in the inputs and run it:
20
DailyDoseofDS.com
4) Cooperation
Multi-agent systems work best when agents collaborate and exchange feedback.
Instead of one agent doing everything, a team of specialized agents can split tasks
and improve each other’s outputs.
21
DailyDoseofDS.com
5) Guardrails
Agents are powerful but without constraints, they can go off track. They might
hallucinate, loop endlessly, or make bad calls.
Guardrails ensure that agents stay on track and maintain quality standards.
For example, an AI-powered legal assistant should avoid outdated laws or false
claims - guardrails ensure that.
6) Memory
22
DailyDoseofDS.com
Without memory, an agent would start fresh every time, losing all context from
previous interactions. With memory, agents can improve over time, remember
past actions, and create more cohesive responses.
23
DailyDoseofDS.com
The following visual depicts the 5 most popular design patterns employed in
building AI agents.
24
DailyDoseofDS.com
The AI reviews its own work to spot mistakes and iterate until it produces the
final response.
25
DailyDoseofDS.com
This is helpful since the LLM is not solely reliant on its internal knowledge.
26
DailyDoseofDS.com
As shown above, the Agent is going through a series of thought activities before
producing a response.
27
DailyDoseofDS.com
More specifically, under the hood, many such frameworks use the ReAct
(Reasoning and Acting) pattern to let LLM think through problems and use tools
to act on the world.
This enhances an LLM agent’s ability to handle complex tasks and decisions by
combining chain-of-thought reasoning with external tool use like in this ReAct
implementation from scratch.
● Subdividing tasks
● Outlining objectives
28
DailyDoseofDS.com
● There are several agents, each with a specific role and task.
● Each agent can also access tools.
All agents work together to deliver the final outcome, while delegating tasks to
other agents if needed.
29
DailyDoseofDS.com
30
DailyDoseofDS.com
The LLM is just a generic responder that receives an input and produces an
output. It has little control over the program flow.
The LLM makes basic decisions on which function or path it can take.
31
DailyDoseofDS.com
A human defines a set of tools the LLM can access to complete a task.
LLM decides when to use them and also the arguments for execution.
A manager agent coordinates multiple sub-agents and decides the next steps
iteratively.
A human lays out the hierarchy between agents, their roles, tools, etc.
32
DailyDoseofDS.com
The most advanced pattern, wherein, the LLM generates and executes new code
independently, effectively acting as an independent AI developer.
33
DailyDoseofDS.com
AI Agents
Projects
34
DailyDoseofDS.com
Tech stack:
Workflow:
35
DailyDoseofDS.com
CrewAI seamlessly integrates with all popular LLMs and providers. Here's how
we set up a local Qwen 3 via Ollama:
This Agent accepts the user query and retrieves the relevant context using a
vectorDB tool and a web search tool powered by Firecrawl.
36
DailyDoseofDS.com
Next, the Writer Agent accepts the insights from the Researcher Agent to
generate a response.
Once we have defined the Agents and their tasks, we orchestrate them into a
crew using CrewAI and put that into a setup method.
37
DailyDoseofDS.com
With that, we have orchestrated the Agentic RAG workflow, which will be
executed upon an incoming request. Next, from the incoming request body, we
extract the user query. Check the highlighted code below:
38
DailyDoseofDS.com
#6) Predict
We use the decoded user query and pass it to the Crew defined earlier to generate
a response from the model. Check the highlighted code below:
Here, we can post-process the response & send it back to the client.
39
DailyDoseofDS.com
Next, we have the basic client code to invoke the API we created using the
requests Python library. Check this:
Done! We have deployed our fully private Qwen 3 Agentic RAG using LitServe.
40
DailyDoseofDS.com
Tech stack:
Workflow:
41
DailyDoseofDS.com
This ensures we can load configurations from .env and keep track of everything
in real time.
This is where your documents get indexed for search and retrieval, powered by
LlamaIndex. The agent's answers would be grounded to this knowledge base.
42
DailyDoseofDS.com
43
DailyDoseofDS.com
44
DailyDoseofDS.com
Finally, we tie it all together. We run our agent with, specifying the prewarm
function and main entrypoint.
45
DailyDoseofDS.com
Tech stack:
Workflow:
● Parse the query (SF to New York on 21st September) to create a Kayak
search URL
● Visit the URL and extract top 5 flights
● For each flight, go to the details to find available airlines
● Summarize flight info
46
DailyDoseofDS.com
CrewAI nicely integrates with all the popular LLMs and providers out there.
Here's how you set up a local DeepSeek using Ollama:
This agent mimics a real human searching for flights by browsing the web,
powered by Browserbase’s headless-browser tool and can look up flights on sites
like Kayak.
47
DailyDoseofDS.com
After retrieving the flight details, we need a concise summary of all available
options.
This is where our Summarization Agent steps in to make sense of the results for
easy reading.
Now that we have both our agents ready, it's time to understand the tools
powering them.
1. Kayak tool
2. Browserbase tool
48
DailyDoseofDS.com
A custom Kayak tool to translate the user input into a valid Kayak search URL.
49
DailyDoseofDS.com
The flight search agent uses the Browserbase tool to simulate human browsing
and gather flight data.
To be precise it automatically navigates the Kayak website and interacts with the
web page. Check this out:
Once the agents and tools are defined, we orchestrate them using CrewAI.
Define their tasks, sequence their actions, and watch them collaborate in real
time. Check this out:
50
DailyDoseofDS.com
Note: here the ‘planning = True’ is using the planning pattern we discussed in the 5
Agentic AI Design Patterns above.
Finally, we feed the user’s request (departure city, arrival city, travel dates) into
the Crew and let it run:
51
DailyDoseofDS.com
Streamlit UI
It’s a simple chat-like UI where you enter your flight details and see the results in
real time.
52
DailyDoseofDS.com
53
DailyDoseofDS.com
Tech stack:
Workflow:
54
DailyDoseofDS.com
This agent accepts a natural language query and extracts structured output using
Pydantic. This guarantees clean and structured inputs for further processing!
55
DailyDoseofDS.com
This agent writes Python code to visualize stock data using Pandas, Matplotlib,
and Yahoo Finance libraries.
This agent reviews and executes the generated Python code for stock data
visualization.
It uses the code interpreter tool by CrewAI to execute the code in a secure
sandbox environment.
56
DailyDoseofDS.com
We set up and kick off our financial analysis crew to get the result shown below!
Now, we encapsulate our financial analyst within an MCP tool and add two more
tools to enhance the user experience.
57
DailyDoseofDS.com
Go to: File → Preferences → Cursor Settings → MCP → Add new global MCP
server. In the JSON file, add what's shown below
Done! Our financial analyst MCP server is live and connected to Cursor.
58
DailyDoseofDS.com
Tech stack:
Workflow:
59
DailyDoseofDS.com
Thus, we'll first gather recent search results from Bright Data's SERP API.
60
DailyDoseofDS.com
The above output will contain links to web pages, X posts, YouTube videos,
Instagram posts, etc.
To do this:
61
DailyDoseofDS.com
We will have multiple Crews, one for each platform (X, Instagram, YouTube, etc.)
62
DailyDoseofDS.com
This Agent analyzes the posts scraped by Bright Data and extracts key insights. It
is also assigned a task to do so.
The Agent takes the output of the X analyst agent and generates insights.
63
DailyDoseofDS.com
64
DailyDoseofDS.com
Finally, we wrap the app in a clear Streamlit interface for interactivity and run
the Flow.
65
DailyDoseofDS.com
Done!
You're now ready to monitor any brand, track all mentions, and generate insights
about a company.
66
DailyDoseofDS.com
Tech stack:
Workflow:
● Parse the query (location, dates etc.) to create a Kayak search URL
● Visit the URL and extract top 5 flights
● For each hotel, find pricing and more info
● Summarize hotel info
67
DailyDoseofDS.com
CrewAI nicely integrates with all the popular LLMs and providers out there!
This agent mimics a real human searching for hotels by browsing the web. It's
powered by browserbase's headless-browser tool and can look up hotels on sites
like Kayak.
68
DailyDoseofDS.com
After retrieving the hotel details, we need a concise summary of all available
options.
This is where our Summarization Agent steps in to make sense of the results for
easy reading.
69
DailyDoseofDS.com
Now that we have both our agents ready, it's time to understand the tools
powering them.
1. Kayak tool
2. Browserbase tool
70
DailyDoseofDS.com
A custom Kayak tool to translate the user input into a valid Kayak search URL.
71
DailyDoseofDS.com
The hotel search agent uses the Browserbase tool to simulate human browsing
and gather hotel data.
To be precise it automatically navigates the Kayak website and interacts with the
web page.
72
DailyDoseofDS.com
Once the agents and tools are defined, we orchestrate them using CrewAI.
Define their tasks, sequence their actions, and watch them collaborate in real
time! Check this out:
Finally, we feed the user’s request (location, dates etc.) into the Crew and let it
run! Check this out:
73
DailyDoseofDS.com
Streamlit UI
It’s a simple chat-like UI where you enter your location and other details and see
the results in real time!
74
DailyDoseofDS.com
Tech stack:
Workflow:
75
DailyDoseofDS.com
We'll use Linkup platform's powerful search capabilities, which rival Perplexity
and OpenAI, to power our web search agent. This is done by defining a custom
tool that our agent can use.
76
DailyDoseofDS.com
The web search agent gathers up-to-date information from the internet based on
user query. The linkup tool we defined earlier is used by this agent.
77
DailyDoseofDS.com
This agent transforms raw web search results into structured insights, with
source URLs. It can also delegate tasks back to the web search agent for
verification and fact-checking.
It takes the analyzed and verified results from the analyst agent and drafts a
coherent response with citations for the end user.
78
DailyDoseofDS.com
Finally, once we have all the agents and tools defined we set up and kickoff our
deep researcher crew.
Now, we'll encapsulate our deep research team within an MCP tool. With just a
few lines of code, our MCP server will be ready.
79
DailyDoseofDS.com
Go to: File → Preferences → Cursor Settings → MCP → Add new global MCP
server
80
DailyDoseofDS.com
Done! Your deep research MCP server is live and connected to Cursor.
81
DailyDoseofDS.com
Tech stack:
Workflow:
82
DailyDoseofDS.com
We'll use a locally served Qwen 3 via Ollama. Check this out:
83
DailyDoseofDS.com
Create a Zep client session for the user, which the agent will use to manage
memory. A user can have multiple sessions. Here’s how it looks:
Our Zep Memory Agent builds on Autogen's Conversable Agent, drawing live
memory context from Zep Cloud with each user query.
84
DailyDoseofDS.com
85
DailyDoseofDS.com
86
DailyDoseofDS.com
#7) Streamlit UI
We can interactively map users' conversations across multiple sessions with Zep
Cloud's UI.
This powerful tool allows us to visualize how knowledge evolves through a graph.
Take a look:
87
DailyDoseofDS.com
88
DailyDoseofDS.com
Tech stack:
Workflow:
89
DailyDoseofDS.com
● Using Firecrawl, Outline Crew scrapes data related to the book title and
decides the chapter count and titles.
● Multiple writer Crews work in parallel to write one chapter each.
● Combine all chapters to get the book.
Books demand research. Thus, we'll use Firecrawl's SERP API to scrape data.
Tool usage:
90
DailyDoseofDS.com
91
DailyDoseofDS.com
● Research Agent → Uses the Firecrawl scraping tool to scrape data related
to the book's title and prepare insights.
● Outline Agent → Uses the insights to output total chapters and titles as
Pydantic output.
92
DailyDoseofDS.com
● Research Agent → Uses the Firecrawl Scraping tool to scrape data related
to a chapter's title and prepare insights.
● Write Agent → Uses the insights to write a chapter.
93
DailyDoseofDS.com
94
DailyDoseofDS.com
Once all Writer Crews have finished execution, we save the book as a Markdown
file.
95
DailyDoseofDS.com
● First, the Outline Crew is invoked. It utilizes the Firecrawl scraping tool to
prepare the outline.
● Next, many Writer Crews are invoked in parallel to write one chapter each.
96
DailyDoseofDS.com
This workflow runs for ~2 minutes, and we get a neatly written book about the
specified topic—"Astronomy in 2025." Here's the book our Agentic workflow
wrote:
97
DailyDoseofDS.com
Tech stack:
98
DailyDoseofDS.com
Workflow:
99
DailyDoseofDS.com
With that understanding in mind, let's start building our content creation
workflow.
We start our content generation workflow by defining an API step that takes in a
URL from the user via a POST request.
100
DailyDoseofDS.com
This step scrapes the article content using Firecrawl and emits the next step in
the workflow.
Steps can be connected together in a sequence, where the output of one step
becomes the input for another.
101
DailyDoseofDS.com
The scraped content gets fed to the X and LinkedIn agents that run in parallel
and generate curated posts.
We define all our prompting and AI logic in the handler that runs automatically
when a step is triggered.
102
DailyDoseofDS.com
#4) Scheduling
After the content is generated we draft it in Typefully where we can easily review
our social media posts.
Motia also allows us to mix and match different languages within the same
workflow providing great flexibility.
103
DailyDoseofDS.com
After defining our steps, we install required dependencies using `npm install` and
run the Motia workbench using `npm run dev` commands.
104
DailyDoseofDS.com
105
DailyDoseofDS.com
Tech stack:
Workflow:
106
DailyDoseofDS.com
This ensures data validation and integrity before generating the documentation
files. Check this code:
107
DailyDoseofDS.com
● Code explorer agent -> Analyzes codebase for key components, patterns
and relationships.
● Doc planner agent -> Creates outline based on codebase analysis as
pydantic output.
● Doc writer agent -> Generates a high-level draft based on the planned
outline.
108
DailyDoseofDS.com
● Doc reviewer agent -> Reviews the draft for consistency, accuracy and
completeness.
109
DailyDoseofDS.com
Finally, when we have everything ready, we kick off our documentation flow with
the GitHub repo URL.
110
DailyDoseofDS.com
111
DailyDoseofDS.com
Tech stack:
Workflow:
112
DailyDoseofDS.com
#1) Setup
113
DailyDoseofDS.com
The web-search agent takes a user query and then uses the Serper web search
tool to fetch results from the internet and consolidate them. Check this out:
This is the research task that we assign to our senior research analyst agent, with
description and expected output.
114
DailyDoseofDS.com
The role of content writer is to use the curated results and turn them into a
polished, publication-ready news article .
This is how we describe the writing task with all the details and expected output:
115
DailyDoseofDS.com
116