Basic Concepts when building AI Agents
Let's cover some basic concepts that we will utilise in our AI agents. We start by calling through to an LLM (OpenAI) via code. Subsequently, we will introduce LiteLLM as a wrapper to access LLMs from
Search for a command to run...
Series
This is a research-driven journey into building an AI agent from first principles.
No frameworks. No abstractions hiding the mechanics. No magic.
This documentation captures lessons learned and hopefully acts as a useful tutorial for others.
Why Build From Scratch? Modern agent frameworks are powerful — but they can abstract away the core elements of all AI Agents have in common. By building and Agent from scratch we will develop an understanding of the fundamentals of AI Agents as a solid foundational learning.
Let's cover some basic concepts that we will utilise in our AI agents. We start by calling through to an LLM (OpenAI) via code. Subsequently, we will introduce LiteLLM as a wrapper to access LLMs from
When working with the non-deterministic nature of LLMs (the same prompt will return different responses each time, due to the probabilistic nature of LLMs) traditional means of software testing are no
To create our first AI agent, we will build upon the basic concepts we explored previously. To complete our agent, we need to complete a number of tasks: define our structured output response format

Despite their impressive capabilities, LLMs have inherent limitations that prevent them from functioning as fully autonomous agents. These limitations fall into three categories: temporal, interaction
