Skip to main content

Command Palette

Search for a command to run...

Part 1: The Blueprint of a Modern Agentic System

Updated
Part 1: The Blueprint of a Modern Agentic System
N

I have a Bachelor's degree in computer science from University of Delhi and I like to work on small open source projects from time to time.

Let’s be honest for a second: The world doesn't need another RAG chatbot.

If I see one more tutorial on "How to Chat with your PDF," I might scream. Don’t get me wrong, Retrieval Augmented Generation (RAG) is useful. It’s practical. But it is also incredibly mundane. It feels... fake.

There is a profound disconnect when you are just typing text into a box and getting text back. It feels like a very advanced search engine, not an intelligent being.

But the moment you write code that lets an AI reach out of that screen and touch the physical world? That changes everything. When an AI decides (on its own) to blink a tiny red LED light on your desk, or when it physically sounds an alarm because a server went down. It feels real. It feels tangible. It feels like the Sci-Fi future we were promised.

This series is not about building a toy. It is about bridging the gap between Bits (Software/AI) and Atoms (Hardware/Reality). Over the next week, I am going to build a "Frankenstein" monster in the best way possible.

I am going to take you from an empty IDE to a fully Dockerized, multi-agent system that can reason, remember, and control physical hardware using the Model Context Protocol (MCP).

Why This Series Exists

The ecosystem for Agentic AI is exploding, but it is messy. You have people writing spaghetti code in Python scripts, hardcoding API keys, and ignoring safety. You have "agents" that hallucinate wild commands with no oversight.

We are going to build this the Production Ready way.

This 7-part series is designed for AI Engineers, Full Stack Developers, and CTOs who want to understand the architecture of scalable systems. We are touching on everything: IoT, LLM Orchestration, Vector Databases, DevOps, and Hardware Safety.

Architecture of a Modern Agentic System

If you read the introduction, you know we aren't here to build another chatbot that summarizes emails. We are here to build a system that does things.

But before we plug in the Arduino and start blasting electricity through LEDs (that’s Part 2), we need to talk about Architecture.

Most AI tutorials fail because they start writing code without a plan. They end up with a single main.py file that is 800 lines of if/else statements and a prompt that looks like a novel.

In this post, we will set up our environment, define our state schema, and understand the Supervisor Pattern that will govern our multi-agent swarm.

Why "Chatbots" are Dead and "Agents" are the Future

Standard RAG (Retrieval Augmented Generation) applications are boring.

In 2025, we will be transitioning to Agentic Workflows. This is "Reason-and-Act". An agent doesn't just answer; it uses tools. It iterates. It makes mistakes, catches them, and fixes them. It operates in a loop:

Reason-and-Act LLM Agent Workflow

However, a single agent has its limits. If you give one LLM 50 different tools (e.g., Web Search, File System, Hardware Control, Math), it becomes confused and hallucinates. If you give it a moderately complex problem, then it might try to use a hammer to write an email.

This is why we are building a Multi-Agent System. We are going to split our brain into specialised lobes.

The Tech Stack for Agentic Workflow

We aren't just picking random tools. Every piece of this stack was chosen for a reason.

1. LangGraph (The Orchestrator)

Why not just standard LangChain chains? Because chains are linear (DAGs). Real life is messy and cyclic.
LangGraph allows us to define loops. "Try to code this. Did it fail? Loop back and try again." It gives us fine-grained control over state and memory, which is non-negotiable when we start touching hardware.

2. The Supervisor Pattern (The Strategy)

According to the LangChain documentation on Multi-Agent architecture, there are two main ways to organize agents:

  1. Handoffs: Agent A talks to Agent B, who talks to Agent C. It’s decentralized (like a group chat).

  2. Supervisor (Tool Calling): A central "Boss" agent decides who works next.

For this project, we are choosing the Supervisor Pattern. When you have an agent that can control physical hardware (Arduino), you don't want a random sub-agent deciding to fire the lasers. You want a central Supervisor to route that request explicitly. The Supervisor treats the sub-agents (Researcher, Coder, Hardware) as "tools" to be called.

3. MCP (The Interface)

The Model Context Protocol is the new standard. Instead of hardcoding API wrappers, we treat our Arduino API as an MCP resource. It’s like USB-C for AI because when you plug it in, the LLM instantly knows how to use it.

Architecture Diagram for Multi-Agent Platform

Before we write a line of code, look at what we are building. In the following architecture, we can see that the Supervisor is the only one talking to the user. Everyone else works in the background.

Architecture Diagram for Multi-Agent Platform

Setting the Project Structure

Let’s stop yapping and start setting up. I recommend using uv (it's blazing fast) or Poetry for dependency management. I don’t recommend using pip in 2026 anymore as it is painfully slow and hard to manage.

If you plan to follow along, then run the following commands in your terminal to start setting up your development environement.

Summary & What's Next

We have the theory and configured the necessary dependencies for launching an agent.
However, our agent is currently trapped in the digital world. It can generate text, but it can't do anything.

In Part 2, we are going to change that. We are grabbing the Arduino, writing some C++, and building an API server on Arduino. We will make an LED blink using a POST request.

More from this blog

B

Bit Byte Blog - Code, Sass, and Everything in Between

14 posts

Explore the exciting world of Artificial Intelligence, Cloud Technologies, and Software Development on my blog. I write simple, engaging articles that break down tech trends into everyday language.