Hello World of AI Agents

December 9, 2025
Tags: ai, agents, tiny example

My favorite guidebook of all time is ‘The C Programming Language’ by Kernighan and Ritchie. In the first chapter of the book are the immortal words:

The only way to learn a new programming language is by writing programs in it. The first program to write is the same for all languages: Print the words ‘hello, world’

I have always believed that a ‘hello world’ is the best way to understand the basics of a system. Given that AI agents are the hottest systems in the news all the time now, I decided to find out the ‘hello world of AI agents’.

Re-cap - what is an AI agent

There are many examples of AI agents today. Since they have the word AI in them, obviously they engage LLMs - because somehow these two words have become synonymous. But, they have to do something more than what an LLM can do.

So, for example, the ‘hello world’ of LLMs could be a software program that can satisfactorily do this task.

tell me a joke, starting with β€˜you won’t believe what happened’

You can try this with any LLM and you will get some answer that was not exactly rote learning.

An AI agent has to go beyond this

My definition of AI agent

Here’s my simplified take, at least for the purpose of this blog post. An AI agent is a software program which can answer your question, and in case it doesn’t know the answer it will consult a reference and find the answer, or ask you what to do next.

So, you could use a regular piece of software or maybe an LLM to commit a crime, but you would need an AI agent to solve the mystery and find out who did it.

generated by Nano Banana

Let’s get started

We’ll use python, Ollama and some python libraries for communication between the two, and also with the external reference. For simplicity we’ll consider the internet our external reference.

First the LLM needs to ask a question

    q = input("What would you like to know? \n")

Then, it needs to pass it to the agent and get the answer

    print(research_agent(q))

Our agent

Our agent follows these rules:

Here is the full ‘hello world’ source code. I asked chatgpt a few months ago and got a bigger version of this code, which I have simplified to its current form.

Using the AI agent

Here’s a conversation I had with my AI agent a while ago. I used qwen3:14b via Ollama as the LLM.

What would you like to know? 
who is the richest man in the world today?
[Checking with LLM...]
[Searching online...]
[Summarizing your answer...]
<think>
Okay, so the user is asking who the richest man in the world is today. Let me look through the provided sources.

First, the Wikipedia page on The World's Billionaires mentions that 
Jeff Bezos was the top in 2018 and held the position for four years until 2022. 
But the text cuts off there, so I don't know what happened after that. 
However, the Forbes Real-Time Billionaires page might have more up-to-date info. 

Looking at the Forbes link, it's about their real-time list. 
But the description doesn't specify the current top person. It does say that 
the list updates net worth based on stock market changes, but without 
current data, I can't tell who's on top now. The Bloomberg Billionaires 
Index is another source, but the info given there is about the index's 
methodology and history, not the current top individual.

Since the user is asking for today's richest person, and the sources don't 
provide current rankings beyond 2022, I might need to note that the latest info 
from the sources is up to 2022, where Bezos was the top. However, I should check 
if there's any recent data. But the sources provided don't have that. So the answer 
should mention that as of the latest info from the sources, Jeff Bezos was the richest, 
but note that the current status might be different and suggest checking the latest Forbes or Bloomberg reports.
</think>

As of the latest information available from the provided sources, 
**Jeff Bezos** was the richest person in the world in 2022, according to 
the **Forbes** rankings. He held the top position for four years until being 
surpassed by others in subsequent years. However, the sources do not specify the 
current (2023) ranking. For real-time updates, **Forbes' Real-Time Billionaires** 
list tracks daily changes in net worth, but the exact current top individual is not detailed in the provided text. 

For the most up-to-date information, refer to the latest editions 
of **Forbes** or **Bloomberg Billionaires Index**. 

References:  
- [The World's Billionaires (Wikipedia)](https://en.wikipedia.org/wiki/The_World's_Billionaires)  
- [Bloomberg Billionaires Index (Wikipedia)](https://en.wikipedia.org/wiki/Bloomberg_Billionaires_Index)  
- [Forbes Real-Time Billionaires](https://www.forbes.com/real-time-billionaires/)

Conclusion

Since we moved to software 3.0 there is almost no limit to what software can do. Quite naturally, there could be many more versions of this ‘hello world’. So, I cannot claim that this is the canonical ‘hello world of ai agents.

Note: If you change the one-question-one-answer structure of my AI agent into a loop, you can create a chatgpt or perplexity of your own!

Made using Hugo (source)