Don’t chase the hype. If you’ve spent the last two or three years of your studies creating CRUD applications, then you already have the basic building blocks. An AI Agent isn’t magical – it’s simply a smart wrapper around the code you already know how to write.
Think about it. Your Visual Studio and NetBeans projects have already been creating Reactive systems. A user clicks on a button and some function is called. But an AI Agent is Proactive. It doesn’t just call the function - it decides which function to call based on the goal that’s been set.
The Architecture of an AI Agent
Perception ➡️ Thought ➡️ Action đź§
In the professional world, the flow of an AI Agent’s activities is called a loop. This is basic Software Engineering and directly maps to the rubric of the unit on System Analysis and the unit on Advanced Programming.
The Brain (The LLM):
This is your Large Language Model (LLM), similar to GPT-4 or Llama 3. This isn’t something that “knows” anything - it’s simply logic.
The Tools (Your Functions):
This is the set of Python functions that you’ve learned how to program. A function to access an Oracle SQL database, a function to check the weather, or a function to send an email.
The Loop (The Agentic Cycle):
This is the “While Loop” that the AI Agent will execute until the goal is met.
The Student Level Use Case: The Smart Library Assistant 📚
Here is a simple example of a basic "Library Management System".
The Traditional CRUD Process:
A user enters the word "Peaceful" into the search box. Your SQL code will be executed as follows: SELECT * FROM Books WHERE Title LIKE '%Peaceful%'. If no book contains the word "Peaceful" in the title, the user will be presented with no search results.
The AI Agent
The user says to the AI Agent: "I've had a really stressful day at college. Find me something to help me relax."
The Agentic Process - Perception
The AI Agent "sees" the user's input.
Thought
The "Brain" of the AI recognises that the user is stressed and needs to be presented with topics related to "relaxation."
Action
The AI Agent will execute your search_database() function using its own set of keywords, such as "Meditation," "Nature Photography," or "Fiction."
The Tech Stack: Lead Dev Approved 🛠️
You don’t need to use high-end hardware for the Artificial Intelligence and Data Science unit. A standard setup, such as a Dell Vostro which I use, with lightweight APIs is fine.
Python:
This is the main industry standard for AI.
Claude/OpenAPI:
This is the “Brain.” Using an API prevents a bottleneck from my AMD integrated graphics.
LangChain:
This is a library to help you link ideas together. This library handles prompt engineering and tool calling logic, allowing you to focus on the structure.
The Code: Defining Your First Tool đź’»
In an agent-based system, your tools are just Python functions with a clear description. This is an important part, as the LLM reads this to determine when to use the function.
#a standard college level function (the tool)
def query_library_database(search_term: str):
"""
Queries the library SQL database for books based on a keyword.
Use this when the user is looking for specific reading material.
"""
# Imagine your Oracle SQL connection logic here
print(f"Searching database for: {search_term}")
return ["The Art of Stillness", "Nature Walks in Scotland"]
Why this is important for your Graded Unit 🎓
When you write this for your project, you are not just writing “I used AI.” What you are doing is showing Abstraction. What you are doing is applying the Single Responsibility Principle by keeping the “Reasoning” part separate from the “Execution” part.
If the user wants to search for books, the LLM is responsible for the goal, and your Python is responsible for the data, keeping your application secure and predictable.
Top comments (0)