<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MOHIT MISHRA on Medium]]></title>
        <description><![CDATA[Stories by MOHIT MISHRA on Medium]]></description>
        <link>https://medium.com/@mohitmishra3333?source=rss-e0e374ba3608------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wwU43d9upNxXWcXcvpbgRw.png</url>
            <title>Stories by MOHIT MISHRA on Medium</title>
            <link>https://medium.com/@mohitmishra3333?source=rss-e0e374ba3608------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 01:33:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohitmishra3333/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[#Announcement: A new 7-Part Hands-On Learning Series on MLOps.]]></title>
            <link>https://medium.com/@mohitmishra3333/announcement-a-new-7-part-hands-on-learning-series-on-mlops-a3beb88b7e55?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3beb88b7e55</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[mlops]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 16:11:04 GMT</pubDate>
            <atom:updated>2026-10-02T16:11:04.055Z</atom:updated>
            <content:encoded><![CDATA[<p>After the 7-part AI Agent series, lets explore MLOps. A Model’s journey from Training to Prod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M6KKYowZ7KEGdzFv6gbn1g.png" /></figure><p>This one is a very special and serious topic that i want to explore more, learn more, implement more, note down properly, make more mistakes, correct it and share all of this with you all.</p><p>Let’s explore how a ML model travels from a Data Scientist’s laptop to Production servers and what are its lifecyles that we as CLoud/Devops/MLOps person need to know in todays AI world 🚀</p><p>And we don’t have to be data scientists to learn MLOps. Yes there will be things i know we have to be familiar and for some topice may be we have to get our hands dirty as well.</p><p>DevOps helps us build, deliver, and operate “software” reliably. Now in AI world, with machine learning, we also need to manage its: datasets, training experiments, model versions, and prediction quality.</p><p>MLOps builds on those DevOps practices to handle the additional challenges of operating ML systems.</p><p>A model can make predictions on a laptop. That’s exciting. But running it reliably for other people brings a new set of questions from Manager or CTO like</p><p>“Which training run produced this model? What data did we use? Can someone else reproduce the result? How do we turn it into an API? And after deploying it, how do we know whether it’s still working well?”</p><p>That’s the journey we’ll explore in our next LearningOps series.</p><p>After building an AI agent one layer at a time, we’ll now take a small machine learning model through training, experiment tracking, data versioning, API development, automated checks, Kubernetes deployment, and monitoring.</p><p>MLflow, DVC, Docker, CI/CD, Kubernetes… there are plenty of tools here too. We’ll introduce them as the project needs them, so we understand what problem each one solves.</p><p>One project. Seven parts. Enough time to understand &amp; learn what we’re building.</p><h3>What will we build?</h3><p>We’ll build a small prediction service that estimates delivery time from inputs such as distance, order size, and time of day.</p><p>We’ll use a synthetic dataset for learning. It will help us practise the workflow; the predictions won’t be validated estimates for a real delivery business.</p><p>We’ll start locally with Python and a lightweight model. No GPU needed for the training labs.</p><p>Then, part by part, we’ll build the system around it.</p><h3>Part 1: Train Our First Model and Understand the Baseline</h3><p>Before we automate anything, we need something that works.</p><p>We’ll prepare our data, separate training and test examples, train a simple model, and measure its errors. We’ll explain the concepts as we use them.</p><p>💡 Real-world example: Our model estimates a delivery will take 35 minutes. The recorded delivery took 42 minutes. We’ll learn how to measure that difference across many examples rather than judging the model by one prediction.</p><h3>Part 2: Track Experiments with MLflow</h3><p>We’ll try different training settings and record their parameters, metrics, and model artifacts.</p><p>Instead of wondering which file was our best model, we’ll have a history of what we tried and what happened.</p><p>💡 Real-world example: We train three models. One performs better on our evaluation data. MLflow helps us compare the runs and find the settings and artifact behind that result.</p><h3>Part 3: Version Our Data and Reproduce Training</h3><p>A Git commit tells us which code we used. But which dataset went with it?</p><p>We’ll use DVC alongside Git to version our data and record the inputs needed to reproduce training.</p><p>💡 Real-world example: A teammate checks out an earlier project version and retrieves its corresponding dataset. They can rerun that experiment instead of accidentally training on today’s changed data.</p><h3>Part 4: Turn the Model into an API</h3><p>We’ll put our model behind a FastAPI endpoint, validate inputs, and package the service with Docker.</p><p>We’ll also make sure that the preprocessing used during training is applied consistently when a request arrives.</p><p>💡 Real-world example: An application sends delivery details to our API and receives an estimated duration without needing to run the training script.</p><h3>Part 5: Add Automated Checks and Build Our Release</h3><p>We’ll automate application checks, model evaluation, and container image builds.</p><p>We’ll define a baseline comparison for model changes and discuss why passing one evaluation metric doesn’t guarantee a useful release.</p><p>💡 Real-world example: A new training change makes prediction errors worse on our fixed evaluation dataset. The pipeline flags the regression before we promote that version.</p><h3>Part 6: Deploy Our Prediction Service on Kubernetes</h3><p>We’ll move from a local container to a Kubernetes deployment, add health checks and resource settings, and practise updating and rolling back the service.</p><p>💡 Real-world example: We deploy a new version of the prediction API. If it fails its health checks or behaves incorrectly, we can return to the previous application and model version.</p><h3>Part 7: Monitor What Happens After Deployment</h3><p>We’ll monitor latency, errors, and service health, then look at changes in incoming data.</p><p>We’ll distinguish between a healthy API and a useful model. To measure prediction quality, we need actual outcomes to compare with predictions.</p><p>💡 Real-world example: The API responds successfully, but incoming journeys are now much longer than those in our training data. We’ll investigate that input change and, when actual delivery times arrive, check whether prediction errors have increased.</p><h3>What Will We Learn?</h3><ul><li>Model training and evaluation: Python, scikit-learn, preprocessing pipelines, baselines, and data leakage.</li><li>Experiment tracking and model management: MLflow experiments, artifacts, model signatures, and model registry.</li><li>Data versioning and reproducible pipelines: DVC and Git to connect data, code, configuration, and training runs.</li><li>Model serving: FastAPI and Docker, with validated inputs and consistent preprocessing.</li><li>ML delivery pipelines: Automated data checks, model evaluation gates, release promotion, and CI/CD.</li><li>Model deployment: Kubernetes, versioned releases, health checks, and rollback.</li><li>Operational monitoring: Prometheus and Grafana for latency, errors, and service health.</li><li>Model monitoring: Evidently for drift analysis, prediction quality when labels arrive, and informed retraining decisions.</li></ul><p>Each part will include explanations, runnable code, practical commands, verification steps, and troubleshooting notes. When we introduce cloud resources, we’ll also cover costs and cleanup.</p><p>Whether we’re Cloud Engineers, DevOps Engineers, Backend Developers, or ML practitioners exploring deployment, we’ll work through the project together.</p><p>By the end, we’ll have a working learning system and a clearer understanding of what it takes to operate a model. We’ll also discuss the additional security, scale, and governance work a real production environment needs.</p><p>See you in Part 1. Until then, keep learning, try things out, and share what you discover.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3beb88b7e55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 7/7 — Deploying our AI Agent]]></title>
            <link>https://aws.plainenglish.io/part-7-7-deploying-our-ai-agent-7e0527153c95?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e0527153c95</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 21:24:12 GMT</pubDate>
            <atom:updated>2026-10-01T21:24:12.597Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we are going to deploy the our application on Kubernetes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tl8-bR-JCNXzOZVAjVtHbQ.png" /></figure><p>So finally we made it.</p><p>Six parts ago, we started with something very small:</p><pre>User<br> ↓<br>Local Text File<br> ↓<br>LLM<br> ↓<br>Answer</pre><p>Today, we are going to deploy the same application on Kubernetes.</p><p>But a lot has happened between those two points.</p><pre>Part 1<br>Local RAG<br>   ↓<br>Part 2<br>Tool Calling<br>   ↓<br>Part 3<br>Memory<br>   ↓<br>Part 4<br>Multi-Tool Reasoning<br>   ↓<br>Part 5<br>LangGraph<br>   ↓<br>Part 6<br>MCP<br>   ↓<br>Part 7<br>Kubernetes</pre><p>Our agent can now:</p><pre>Understand a request<br>        ↓<br>Reason through LangGraph<br>        ↓<br>Choose local tools<br>        ↓<br>Search RAG knowledge<br>        ↓<br>Remember persistent information<br>        ↓<br>Use conversation context<br>        ↓<br>Call external systems through MCP<br>        ↓<br>Perform dependent calculations<br>        ↓<br>Return the final answer</pre><p>Until now, however, one thing has remained almost unchanged.</p><p>We still start everything with:</p><pre>python app.py</pre><p>on my Ubuntu laptop. That is fine while learning.</p><p>It is not how I want to run an application in production.</p><p>So our final challenge is:</p><blockquote><em>How do we take the exact AI Agent we built across Parts 1–6 and turn it into a service that can be containerized and deployed on Kubernetes?</em></blockquote><p>And more importantly:</p><blockquote><em>What actually changes when an AI Agent moves from a developer laptop into Kubernetes?</em></blockquote><p>This is not going to be:</p><pre>docker build<br>kubectl apply<br>done</pre><p>The interesting part is everything around those commands.</p><h3>What We Already Have</h3><p>Let us first look at the important parts of the application we finished in Part 6.</p><p>Our project is approximately:</p><pre>local-rag-agent/<br>│<br>├── app.py<br>├── rag_engine.py<br>├── memory_store.py<br>│<br>├── mcp_client.py<br>├── mcp_lab_server.py<br>├── mcp_smoke_test.py<br>│<br>├── requirements.txt<br>│<br>├── data/<br>│   └── mohit.txt<br>│<br>├── external_system/<br>│   └── cloud_lab_catalog.json<br>│<br>└── storage/<br>    ├── index.json<br>    └── user_memory.json</pre><p>The good news is that our app.py already has a reusable function:</p><pre>run_agent(<br>    user_input,<br>    conversation_history,<br>)</pre><p>The CLI is only wrapping that function. Internally the agent already contains:</p><pre>Qwen<br>+<br>LangGraph<br>+<br>RAG<br>+<br>Calculator<br>+<br>Time Tool<br>+<br>Short-Term Memory<br>+<br>Persistent Memory<br>+<br>Guardrails<br>+<br>MCP</pre><p>Our MCP server currently exposes:</p><pre>get_gpu_offer<br>list_gpu_models</pre><pre>cloudlab://catalog</pre><pre>gpu_budget_planning</pre><p>and the agent dynamically discovers the MCP tools.</p><p>In Part 6, MCP runs over stdio: the MCP client launches mcp_lab_server.py as a subprocess and communicates over the process streams.</p><p>That architecture is perfect for local development.</p><p>But Kubernetes changes some assumptions.</p><h3>Step 1 — Freeze Part 6</h3><p>Before changing anything:</p><pre>cd ~/work/agent/local-rag-agent</pre><pre>cp app.py app_part6.py</pre><p>I always like doing this in a learning series.</p><p>Now:</p><pre>app_part6.py</pre><p>is our working Part 6 snapshot.</p><p>Everything we do next belongs to Part 7.</p><h3>Our Target Architecture</h3><p>Instead of placing everything inside one giant container, I want clear responsibility boundaries.</p><p>Our target architecture will look like this:</p><pre>Internet<br>                             │<br>                             ▼<br>                     Agent API Service<br>                             │<br>                             ▼<br>                       FastAPI Pod<br>                             │<br>                             ▼<br>                         run_agent()<br>                             │<br>                             ▼<br>                         LangGraph<br>                    ┌────────┴─────────┐<br>                    │                  │<br>                    ▼                  ▼<br>               Local Tools        MCP Client<br>                    │                  │<br>        ┌───────────┼───────┐          │<br>        │           │       │          ▼<br>       RAG      Calculator  Memory   MCP Service<br>        │                              │<br>        ▼                              ▼<br>     Ollama                    Cloud Lab MCP Pod<br>        │                              │<br>   ┌────┴────┐                         ▼<br>   │         │                 cloud_lab_catalog<br> Qwen     all-minilm</pre><p>Kubernetes sees three main workloads:</p><pre>ai-agent<br>ollama<br>cloud-lab-mcp</pre><p>Only one should be publicly reachable:</p><pre>ai-agent</pre><p>Ollama stays internal.</p><p>MCP stays internal.</p><p>That separation is intentional.</p><h3>Why Not Put Ollama Inside the Agent Pod?</h3><p>We could technically run:</p><pre>Pod<br>├── Agent<br>└── Ollama</pre><p>But I do not want to. The model server and agent have very different lifecycles.</p><p>The agent might need:</p><pre>500 MB - 2 GB RAM</pre><p>while model inference may need much more CPU, RAM or eventually GPU.</p><p>We may want:</p><pre>3 Agent Pods<br>      ↓<br>1 Model Serving Service<br>      ↓<br>GPU</pre><p>later. If we put Ollama inside every Agent Pod:</p><pre>Agent Pod 1 → its own Qwen<br>Agent Pod 2 → another Qwen<br>Agent Pod 3 → another Qwen</pre><p>we may unnecessarily duplicate model memory.</p><p>So our architecture becomes:</p><pre>Agent<br>  │<br>  │ HTTP<br>  ▼<br>Ollama Service<br>  │<br>  ├── qwen3:1.7b<br>  └── all-minilm</pre><p>This is actually a small change because our existing RAG code already talks to Ollama through HTTP. We only need to stop hardcoding:</p><pre>http://localhost:11434/api</pre><p>and make it configurable.</p><p>Ollama’s container documentation also uses a persistent volume for /root/.ollama, which is exactly what we need so that model downloads do not disappear whenever its Pod is recreated.</p><h3>Why MCP Also Becomes a Separate Service</h3><p>Part 6 had:</p><pre>Agent<br>  ↓<br>stdio<br>  ↓<br>MCP Server subprocess</pre><p>That was correct.</p><p>The MCP specification defines stdio around exactly this relationship: the client launches the MCP server as a subprocess and communicates through its standard streams.</p><p>But now I want:</p><pre>Agent Pod<br>    │<br>    │ Kubernetes Network<br>    ▼<br>MCP Service<br>    │<br>    ▼<br>MCP Pod</pre><p>A process in one Pod cannot launch and communicate with a process in another Pod over stdio.</p><p>So we move the MCP transport to:</p><pre>Streamable HTTP</pre><p>The current MCP specification describes Streamable HTTP as the transport for an independently running MCP server and identifies it alongside stdio as the standard transport model.</p><p>Notice what did not change:</p><pre>LangGraph</pre><p>still orchestrates the agent.</p><pre>MCP</pre><p>still provides external capabilities.</p><p>Exactly the architectural lesson from Part 6 survives.</p><h3>Do We Need Django?</h3><p>I mentioned earlier that I also own a domain and could create a Django application and host it on Kubernetes.</p><p>We absolutely could.</p><p>But I am deliberately not doing that in this article.</p><p>Why?</p><p>Because our problem is:</p><pre>CLI Agent<br>   ↓<br>Network-accessible Agent</pre><p>The smallest solution is an API layer.</p><p>FastAPI gives us exactly that.</p><p>Adding:</p><pre>Django<br>ORM<br>Templates<br>Admin<br>Application settings<br>Database integration</pre><p>would turn the final part of an AI Agent series into a Django tutorial.</p><p>Later, Django could easily become another Kubernetes Deployment:</p><pre>Gateway<br>                     /       \<br>                    /         \<br>        agent.devtoprod.in   app.devtoprod.in<br>                │                  │<br>                ▼                  ▼<br>             FastAPI             Django</pre><p>But today we stay focused on our agent.</p><h3>Step 2 — Make Runtime Configuration External</h3><p>Containers should not depend on environment-specific addresses compiled into Python files.</p><p>Currently we have values like:</p><pre>OLLAMA_BASE_URL = &quot;http://localhost:11434/api&quot;</pre><p>We want the same code to work in three places:</p><pre>Ubuntu<br>Docker Compose<br>Kubernetes</pre><p>Change the configuration section in rag_engine.py.</p><p>First add:</p><pre>import os</pre><p>Then replace the fixed configuration with:</p><pre>PROJECT_DIR = Path(__file__).resolve().parent</pre><pre>DATA_FILE = Path(<br>    os.getenv(<br>        &quot;DATA_FILE&quot;,<br>        str(PROJECT_DIR / &quot;data&quot; / &quot;mohit.txt&quot;),<br>    )<br>)</pre><pre>INDEX_FILE = Path(<br>    os.getenv(<br>        &quot;INDEX_FILE&quot;,<br>        str(PROJECT_DIR / &quot;storage&quot; / &quot;index.json&quot;),<br>    )<br>)</pre><pre>OLLAMA_BASE_URL = os.getenv(<br>    &quot;OLLAMA_BASE_URL&quot;,<br>    &quot;http://localhost:11434/api&quot;,<br>).rstrip(&quot;/&quot;)</pre><pre>EMBEDDING_MODEL = os.getenv(<br>    &quot;EMBEDDING_MODEL&quot;,<br>    &quot;all-minilm&quot;,<br>)</pre><pre>LLM_MODEL = os.getenv(<br>    &quot;LLM_MODEL&quot;,<br>    &quot;qwen3:1.7b&quot;,<br>)</pre><p>Now local development behaves exactly as before.</p><p>But Kubernetes can inject:</p><pre>OLLAMA_BASE_URL=http://ollama:11434/api</pre><p>without changing our Python code.</p><h3>Externalize the Persistent Memory Path</h3><p>Do the same thing in:</p><pre>memory_store.py</pre><p>Add:</p><pre>import os</pre><p>and replace:</p><pre>MEMORY_FILE = PROJECT_DIR / &quot;storage&quot; / &quot;user_memory.json&quot;</pre><p>with:</p><pre>MEMORY_FILE = Path(<br>    os.getenv(<br>        &quot;MEMORY_FILE&quot;,<br>        str(<br>            PROJECT_DIR<br>            / &quot;storage&quot;<br>            / &quot;user_memory.json&quot;<br>        ),<br>    )<br>)</pre><p>Our memory implementation already writes to a temporary file and atomically replaces the memory file, which is a nice property for a single-process deployment.</p><p>But remember this sentence:</p><blockquote><em>Single-process deployment.</em></blockquote><p>It will become important when we discuss scaling.</p><h3>Step 3 — Preserve Local MCP and Add Kubernetes MCP</h3><p>I do not want Part 7 to destroy our Part 6 workflow.</p><p>So we will support both:</p><pre>No MCP_SERVER_URL<br>        ↓<br>stdio</pre><pre>MCP_SERVER_URL configured<br>        ↓<br>Streamable HTTP</pre><p>That gives us:</p><pre>Ubuntu Part 6<br>    ↓<br>stdio</pre><pre>Kubernetes Part 7<br>    ↓<br>Streamable HTTP</pre><p>Beautiful continuity.</p><p>Replace mcp_client.py with:</p><p><a href="https://docs.google.com/document/d/1aHE8XlwJVNtecImWwtQVBZKgk6J4ChgpNcTaIbiIVMM/edit?usp=sharing">mcp-client py CODE</a></p><p>The official Python MCP SDK provides Streamable HTTP clients and servers, so we are still using MCP rather than replacing it with an ordinary REST endpoint.</p><h3>Step 4 — Run Our MCP Server Over HTTP</h3><p>Our Cloud Lab catalog currently contains our simulated external GPU system.</p><p>First add:</p><pre>import os</pre><p>to mcp_lab_server.py.</p><p>Make the catalog location configurable:</p><pre>CATALOG_FILE = Path(<br>    os.getenv(<br>        &quot;CATALOG_FILE&quot;,<br>        str(<br>            PROJECT_DIR<br>            / &quot;external_system&quot;<br>            / &quot;cloud_lab_catalog.json&quot;<br>        ),<br>    )<br>)</pre><p>Then replace the current entry point with:</p><pre>if __name__ == &quot;__main__&quot;:</pre><pre>    transport = os.getenv(<br>        &quot;MCP_TRANSPORT&quot;,<br>        &quot;stdio&quot;,<br>    )</pre><pre>    if transport == &quot;streamable-http&quot;:</pre><pre>        mcp.run(<br>            transport=&quot;streamable-http&quot;,<br>            host=&quot;0.0.0.0&quot;,<br>            port=int(<br>                os.getenv(<br>                    &quot;MCP_PORT&quot;,<br>                    &quot;8001&quot;,<br>                )<br>            ),<br>            stateless_http=True,<br>            json_response=True,<br>        )</pre><pre>    else:</pre><pre>        mcp.run()</pre><p>Locally:</p><pre>python app.py</pre><p>still uses stdio.</p><p>Inside Kubernetes:</p><pre>MCP_TRANSPORT=streamable-http</pre><p>turns the exact same MCP implementation into a network service.</p><h3>Step 5 — Convert Our CLI into an API</h3><p>Now comes the key upgrade.</p><p>We are not replacing:</p><pre>run_agent()</pre><p>We are wrapping it.</p><p>Create:</p><pre>api.py</pre><pre>and COPY the entore code from below link</pre><p><a href="https://docs.google.com/document/d/1aHE8XlwJVNtecImWwtQVBZKgk6J4ChgpNcTaIbiIVMM/edit?usp=sharing">api py CODE LINK</a></p><p>We did not rewrite LangGraph.</p><p>We did not rewrite RAG.</p><p>We did not rewrite MCP.</p><p>We did not rewrite the memory tools.</p><p>We simply changed:</p><pre>Terminal<br>   ↓<br>run_agent()</pre><p>into:</p><pre>HTTP<br> ↓<br>FastAPI<br> ↓<br>run_agent()</pre><p>This is exactly the kind of productionization change I wanted for this series.</p><h3>Why Did I Add a session_id?</h3><p>Our old CLI had:</p><pre>conversation_history = []</pre><p>One terminal process meant one conversation.</p><p>HTTP is different.</p><p>Imagine:</p><pre>User A → request<br>User B → request<br>User A → follow-up</pre><p>Without a session identifier, their histories would mix together.</p><p>So:</p><pre>{<br>  &quot;message&quot;: &quot;Hello&quot;,<br>  &quot;session_id&quot;: &quot;...&quot;<br>}</pre><p>gives us a minimal way to separate conversations.</p><p>But our session dictionary is still:</p><pre>in Python memory</pre><p>which means:</p><pre>Pod dies<br>   ↓<br>short-term history disappears</pre><p>That is intentional for now.</p><p>We will return to this later because it teaches us something extremely important about scaling AI Agents.</p><h3>Step 6 — Update Python Dependencies</h3><p>Our Part 6 dependencies currently include:</p><pre>numpy<br>requests<br>langgraph<br>mcp&gt;=2,&lt;3</pre><p>Update requirements.txt to:</p><pre>numpy<br>requests<br>langgraph<br>mcp&gt;=2,&lt;3<br>fastapi<br>uvicorn[standard]</pre><p>Install:</p><pre>source .venv/bin/activate</pre><pre>pip install -r requirements.txt</pre><h3>Step 7 — Test the API Before Docker</h3><p>This step matters.</p><p>Do not debug:</p><pre>Python<br>+<br>Docker<br>+<br>Kubernetes<br>+<br>AWS</pre><p>at the same time.</p><p>First prove the API itself works.</p><p>Make sure local Ollama is running:</p><pre>systemctl status ollama</pre><p>Then:</p><pre>uvicorn api:app \<br>  --host 127.0.0.1 \<br>  --port 8000</pre><p>Test liveness:</p><pre>curl http://127.0.0.1:8000/health</pre><p>Expected:</p><pre>{<br>  &quot;status&quot;: &quot;alive&quot;<br>}</pre><p>Test readiness:</p><pre>curl http://127.0.0.1:8000/ready</pre><p>Then send an agent request:</p><pre>curl -X POST \<br>  http://127.0.0.1:8000/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;What is my name from my local knowledge file?&quot;<br>  }&#39;</pre><p>The response should contain:</p><pre>session_id<br>answer<br>duration_ms</pre><p>Copy that session_id and send a follow-up using the same ID.</p><p>That proves:</p><pre>HTTP<br> ↓<br>FastAPI<br> ↓<br>run_agent()<br> ↓<br>LangGraph<br> ↓<br>RAG</pre><p>works before containers enter the story.</p><h3>Step 8 — Containerize the Agent</h3><p>Now create:</p><pre>Dockerfile</pre><p><a href="https://docs.google.com/document/d/1aHE8XlwJVNtecImWwtQVBZKgk6J4ChgpNcTaIbiIVMM/edit?usp=sharing">CODE</a></p><p>There is something interesting here:</p><pre>--workers 1</pre><p>That is deliberate.</p><p>Our short-term conversation history lives inside one Python process.</p><p>If we start:</p><pre>4 Uvicorn workers</pre><p>then Request 1 might reach Worker A while Request 2 reaches Worker B.</p><p>Worker B does not have Worker A’s conversation dictionary.</p><p>So even inside one Pod, multiple application processes already expose the same state problem that multiple Kubernetes replicas will expose later.</p><p>This is why understanding state matters more than blindly increasing replicas.</p><h3>Add .dockerignore</h3><p>Create:</p><pre>.dockerignore</pre><pre>.venv<br>__pycache__<br>*.pyc<br>.git<br>.gitignore</pre><pre>storage/<br>data/<br>external_system/</pre><pre>*.log</pre><p>Why exclude those directories?</p><p>Because I do not want:</p><pre>personal memory<br>RAG indexes<br>knowledge data<br>external configuration</pre><p>silently baked into an immutable container image.</p><p>Kubernetes will provide them separately.</p><h3>Step 9 — Use Docker Compose as an Integration Test</h3><p>Docker Compose is not our production orchestrator.</p><p>Kubernetes will be.</p><p>But Compose gives us a useful bridge:</p><pre>Python<br> ↓<br>Containers<br> ↓<br>Kubernetes</pre><p>Create:</p><pre>docker-compose.yml</pre><p><a href="https://docs.google.com/document/d/1aHE8XlwJVNtecImWwtQVBZKgk6J4ChgpNcTaIbiIVMM/edit?usp=sharing">CODE</a></p><p>Build everything:</p><pre>docker compose build</pre><p>Start:</p><pre>docker compose up -d</pre><p>Check:</p><pre>docker compose ps</pre><p>Now pull our models into the Ollama container:</p><pre>docker compose exec \<br>  ollama \<br>  ollama pull qwen3:1.7b</pre><p>and:</p><pre>docker compose exec \<br>  ollama \<br>  ollama pull all-minilm</pre><p>Test:</p><pre>curl http://localhost:8000/health</pre><p>Then:</p><pre>curl http://localhost:8000/ready</pre><p>Then test MCP through the agent:</p><pre>curl -X POST \<br>  http://localhost:8000/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;What is the current external Cloud Lab offer for NVIDIA L4?&quot;<br>  }&#39;</pre><p>Our logs should still show something conceptually like:</p><pre>[graph] entering agent node</pre><pre>[graph] route:<br>agent -&gt; tools</pre><pre>[graph] entering tool node</pre><pre>[tool]<br>mcp_cloud_lab__get_gpu_offer</pre><pre>[result]<br>...</pre><pre>[graph] route:<br>tools -&gt; agent</pre><pre>[graph] route:<br>agent -&gt; END</pre><p>If this works, we have crossed an important boundary:</p><pre>Local Processes<br>      ↓<br>Multiple Containers<br>      ↓<br>Network Communication</pre><p>Now we are ready for Kubernetes.</p><h3>Step 10 — Our Kubernetes Platform</h3><p>For this final article I considered:</p><pre>kind<br>minikube<br>k3d<br>kOps on AWS</pre><p>If the only objective was learning basic Kubernetes YAML, I would probably use kind.</p><p>But I already own:</p><pre>devtoprod.in</pre><p>and I want to learn:</p><pre>Route 53<br>DNS<br>EC2<br>ECR<br>Persistent Volumes<br>Cloud Load Balancers<br>Kubernetes networking<br>real node recovery</pre><p>So I am going to use:</p><pre>kOps + AWS</pre><p>for the main deployment.</p><h3>Important: Our Cluster Is a Learning Cluster</h3><p>I want to be very explicit here.</p><p>I am going to build:</p><pre>1 Control Plane EC2<br>+<br>1 Worker EC2</pre><p>This keeps the hands-on environment relatively small.</p><p>But this is not a highly available production cluster.</p><p>A real production architecture should generally look more like:</p><pre>Multiple AZs<br>     │<br>     ├── Control Plane<br>     ├── Control Plane<br>     └── Control Plane</pre><pre>Multiple Worker Nodes<br>     │<br>     ├── Worker<br>     ├── Worker<br>     └── Worker</pre><p>The point of our cluster is to learn production deployment patterns without pretending we created Netflix infrastructure with two EC2 instances.</p><h3>Step 11 — Use devtoprod.in Safely</h3><p>My domain is registered with GoDaddy.</p><p>One option would be:</p><pre>devtoprod.in<br>   ↓<br>Route 53 nameservers</pre><p>for the entire domain.</p><p>That works.</p><p>But I prefer a smaller blast radius.</p><p>I will delegate:</p><pre>k8s.devtoprod.in</pre><p>to Route 53.</p><p>Then:</p><pre>GoDaddy<br>   │<br>   └── devtoprod.in</pre><pre>Route 53<br>   │<br>   └── k8s.devtoprod.in</pre><p>Our cluster becomes:</p><pre>agent.k8s.devtoprod.in</pre><p>and our public API could become:</p><pre>api.k8s.devtoprod.in</pre><p>kOps specifically documents this scenario for domains registered outside AWS: create a Route 53 hosted zone for the subdomain and delegate that subdomain from the external registrar using the Route 53 NS records.</p><h3>Create the Route 53 Hosted Zone</h3><p>For example:</p><pre>aws route53 create-hosted-zone \<br>  --name k8s.devtoprod.in \<br>  --caller-reference &quot;$(date +%s)&quot;</pre><p>Retrieve its Route 53 nameservers.</p><p>Then inside GoDaddy DNS create NS delegation for:</p><pre>k8s</pre><p>pointing to the four Route 53 nameservers.</p><p>After DNS propagation, verify:</p><pre>dig NS k8s.devtoprod.in</pre><p>Do not continue until this returns the Route 53 nameservers.</p><p>DNS is not cosmetic here.</p><p>kOps needs working DNS for the cluster.</p><h3>Step 12 — Install kOps and kubectl</h3><p>For Linux AMD64:</p><pre>curl -Lo kops \<br>  https://github.com/kubernetes/kops/releases/download/$(curl -s \<br>  https://api.github.com/repos/kubernetes/kops/releases/latest \<br>  | grep tag_name \<br>  | cut -d &#39;&quot;&#39; -f 4)/kops-linux-amd64</pre><p>Then:</p><pre>chmod +x kops</pre><pre>sudo mv kops \<br>  /usr/local/bin/kops</pre><p>Verify:</p><pre>kops version</pre><p>Also verify:</p><pre>kubectl version --client<br>aws --version</pre><p>and ensure your AWS CLI identity has the required permissions:</p><pre>aws sts get-caller-identity</pre><h3>Step 13 — Create the kOps State Store</h3><p>kOps keeps the cluster specification in an external state store, typically S3 on AWS. The kOps documentation calls this the source of truth for the cluster configuration and strongly recommends enabling S3 versioning.</p><p>Set variables:</p><pre>export AWS_REGION=ap-south-1<br>export AWS_ZONE=ap-south-1a</pre><pre>export CLUSTER_NAME=agent.k8s.devtoprod.in</pre><pre>export STATE_BUCKET=learningops-kops-state-UNIQUE_NAME</pre><pre>export KOPS_STATE_STORE=s3://${STATE_BUCKET}</pre><p>For a region other than us-east-1:</p><pre>aws s3api create-bucket \<br>  --bucket &quot;${STATE_BUCKET}&quot; \<br>  --region &quot;${AWS_REGION}&quot; \<br>  --create-bucket-configuration \<br>  LocationConstraint=&quot;${AWS_REGION}&quot;</pre><p>Enable versioning:</p><pre>aws s3api put-bucket-versioning \<br>  --bucket &quot;${STATE_BUCKET}&quot; \<br>  --versioning-configuration \<br>  Status=Enabled</pre><h3>Step 14 — Create the kOps Cluster</h3><p>Make sure an SSH public key exists:</p><pre>ls ~/.ssh/id_ed25519.pub</pre><p>If not:</p><pre>ssh-keygen -t ed25519</pre><p>Now create the cluster configuration:</p><pre>kops create cluster \<br>  --name=&quot;${CLUSTER_NAME}&quot; \<br>  --cloud=aws \<br>  --zones=&quot;${AWS_ZONE}&quot; \<br>  --control-plane-zones=&quot;${AWS_ZONE}&quot; \<br>  --control-plane-count=1 \<br>  --control-plane-size=t3.medium \<br>  --node-count=1 \<br>  --node-size=t3.xlarge \<br>  --node-volume-size=40 \<br>  --dns=public \<br>  --dns-zone=k8s.devtoprod.in \<br>  --networking=cilium \<br>  --ssh-public-key=~/.ssh/id_ed25519.pub</pre><p>Current kOps exposes explicit options for control-plane count/size, node count/size, zones and Cilium networking.</p><p>Review:</p><pre>kops get cluster</pre><p>Then create the AWS infrastructure:</p><pre>kops update cluster \<br>  --name=&quot;${CLUSTER_NAME}&quot; \<br>  --yes \<br>  --admin</pre><p>Once ready:</p><pre>kops validate cluster \<br>  --wait 10m</pre><p>Check:</p><pre>kubectl get nodes -o wide</pre><p>We should eventually see:</p><pre>Control Plane<br>Worker</pre><p>Both:</p><pre>Ready</pre><h3>Step 15 — Create Amazon ECR</h3><p>Our application image now needs somewhere to live.</p><p>Create:</p><pre>export AWS_ACCOUNT_ID=$(<br>  aws sts get-caller-identity \<br>    --query Account \<br>    --output text<br>)</pre><pre>export ECR_REGISTRY=&quot;${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com&quot;</pre><pre>export ECR_REPOSITORY=learningops-ai-agent</pre><p>Create the repository:</p><pre>aws ecr create-repository \<br>  --repository-name &quot;${ECR_REPOSITORY}&quot; \<br>  --region &quot;${AWS_REGION}&quot;</pre><p>Login:</p><pre>aws ecr get-login-password \<br>  --region &quot;${AWS_REGION}&quot; \<br>  | docker login \<br>      --username AWS \<br>      --password-stdin \<br>      &quot;${ECR_REGISTRY}&quot;</pre><p>This is the authentication flow documented by Amazon ECR for Docker clients.</p><p>Build:</p><pre>docker build \<br>  -t learningops-ai-agent:part7 .</pre><p>Tag:</p><pre>export AGENT_IMAGE=&quot;${ECR_REGISTRY}/${ECR_REPOSITORY}:part7&quot;</pre><pre>docker tag \<br>  learningops-ai-agent:part7 \<br>  &quot;${AGENT_IMAGE}&quot;</pre><p>Push:</p><pre>docker push \<br>  &quot;${AGENT_IMAGE}&quot;</pre><h3>Step 16 — Create a Dedicated Namespace</h3><p>Create:</p><pre>k8s/namespace.yaml</pre><pre>apiVersion: v1<br>kind: Namespace<br>metadata:<br>  name: learningops-ai</pre><p>Apply:</p><pre>kubectl apply \<br>  -f k8s/namespace.yaml</pre><p>Everything belonging to this application will live inside:</p><pre>learningops-ai</pre><h3>Step 17 — Decide Where Every File Belongs</h3><p>This is one of the most useful Kubernetes lessons in the entire article.</p><p>We currently have:</p><pre>data/mohit.txt<br>storage/index.json<br>storage/user_memory.json<br>cloud_lab_catalog.json</pre><p>They have different meanings.</p><h3>data/mohit.txt</h3><p>This is input/configuration data.</p><p>For our demo:</p><pre>ConfigMap</pre><p>makes sense.</p><h3>cloud_lab_catalog.json</h3><p>This is configuration for our fake external Cloud Lab system.</p><p>Again:</p><pre>ConfigMap</pre><h3>storage/user_memory.json</h3><p>This is real state.</p><p>If the Pod disappears, we want it to survive.</p><p>So:</p><pre>PersistentVolumeClaim</pre><h3>storage/index.json</h3><p>This one is interesting.</p><p>It is derived state.</p><p>If it disappears:</p><pre>mohit.txt<br>   ↓<br>chunking<br>   ↓<br>embeddings<br>   ↓<br>index rebuilt</pre><p>So it does not have the same durability requirement as user memory.</p><p>For our simple implementation, however, both files already live inside:</p><pre>storage/</pre><p>so we will mount one PVC there.</p><p>That also avoids rebuilding embeddings on every Pod restart.</p><p>In a larger production system I would probably separate persistent user data from rebuildable vector/index data.</p><h3>Step 18 — Create ConfigMaps from the Real Files</h3><p>Instead of copying the contents manually into YAML:</p><pre>kubectl create configmap \<br>  agent-knowledge \<br>  --namespace learningops-ai \<br>  --from-file=mohit.txt=data/mohit.txt \<br>  --dry-run=client \<br>  -o yaml \<br>  &gt; k8s/knowledge-configmap.yaml</pre><p>Do the same for Cloud Lab:</p><pre>kubectl create configmap \<br>  cloud-lab-catalog \<br>  --namespace learningops-ai \<br>  --from-file=cloud_lab_catalog.json=external_system/cloud_lab_catalog.json \<br>  --dry-run=client \<br>  -o yaml \<br>  &gt; k8s/cloud-lab-configmap.yaml</pre><p>Apply:</p><pre>kubectl apply \<br>  -f k8s/knowledge-configmap.yaml</pre><pre>kubectl apply \<br>  -f k8s/cloud-lab-configmap.yaml</pre><p>This lets the same source files we used locally become Kubernetes configuration.</p><h3>Step 19 — Application Configuration</h3><p>Create:</p><pre>k8s/agent-config.yaml</pre><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: agent-config<br>  namespace: learningops-ai</pre><pre>data:</pre><pre>  OLLAMA_BASE_URL:<br>    <a href="http://ollama:11434/api">http://ollama:11434/api</a></pre><pre>  MCP_SERVER_URL:<br>    <a href="http://cloud-lab-mcp:8001/mcp">http://cloud-lab-mcp:8001/mcp</a></pre><pre>  DATA_FILE:<br>    /app/data/mohit.txt</pre><pre>  INDEX_FILE:<br>    /app/storage/index.json</pre><pre>  MEMORY_FILE:<br>    /app/storage/user_memory.json</pre><pre>  LLM_MODEL:<br>    qwen3:1.7b</pre><pre>  EMBEDDING_MODEL:<br>    all-minilm</pre><pre>  LOG_LEVEL:<br>    INFO</pre><p>Apply:</p><pre>kubectl apply \<br>  -f k8s/agent-config.yaml</pre><p>Look at what we achieved:</p><pre>Container image<br>     ↓<br>environment independent</pre><pre>ConfigMap<br>     ↓<br>environment specific</pre><p>That is a much healthier deployment boundary.</p><h3>Step 20 — Kubernetes Secret</h3><p>Our original application did not actually contain credentials.</p><p>I do not want to create a fake Secret merely to tick a Kubernetes checkbox.</p><p>But now our public API has optional API-key authentication, so we have a real secret to protect.</p><p>Generate:</p><pre>export AGENT_API_KEY=$(<br>  openssl rand -hex 24<br>)</pre><p>Create:</p><pre>kubectl create secret generic \<br>  agent-api-secret \<br>  --namespace learningops-ai \<br>  --from-literal=API_KEY=&quot;${AGENT_API_KEY}&quot;</pre><h3>Step 21 — Persistent Volumes</h3><p>Create:</p><pre>k8s/storage.yaml</pre><pre>apiVersion: v1<br>kind: PersistentVolumeClaim<br>metadata:<br>  name: agent-storage<br>  namespace: learningops-ai</pre><pre>spec:</pre><pre>  accessModes:<br>    - ReadWriteOnce</pre><pre>  resources:<br>    requests:<br>      storage: 2Gi<br></pre><pre>---</pre><pre>apiVersion: v1<br>kind: PersistentVolumeClaim<br>metadata:<br>  name: ollama-models<br>  namespace: learningops-ai</pre><pre>spec:</pre><pre>  accessModes:<br>    - ReadWriteOnce</pre><pre>  resources:<br>    requests:<br>      storage: 10Gi</pre><p>Apply:</p><pre>kubectl apply \<br>  -f k8s/storage.yaml</pre><p>Check:</p><pre>kubectl get pvc \<br>  -n learningops-ai</pre><p>Eventually we want:</p><pre>Bound</pre><p>Now we have persistent homes for:</p><pre>Agent memory/index<br>Ollama models</pre><h3>Step 22 — Deploy Ollama</h3><p>Create:</p><pre>k8s/ollama.yaml</pre><p><a href="https://docs.google.com/document/d/1aHE8XlwJVNtecImWwtQVBZKgk6J4ChgpNcTaIbiIVMM/edit?usp=sharing">CODE</a></p><p>Notice:</p><pre>type: ClusterIP</pre><p>Ollama is not public.</p><p>Only Pods inside Kubernetes need it.</p><p>Apply:</p><pre>kubectl apply \<br>  -f k8s/ollama.yaml</pre><p>Watch:</p><pre>kubectl get pods \<br>  -n learningops-ai \<br>  -w</pre><h3>Step 23 — Pull Qwen and Embedding Models</h3><p>Once the Ollama Pod is running:</p><pre>kubectl exec \<br>  -n learningops-ai \<br>  deployment/ollama \<br>  -- ollama pull qwen3:1.7b</pre><p>Then:</p><pre>kubectl exec \<br>  -n learningops-ai \<br>  deployment/ollama \<br>  -- ollama pull all-minilm</pre><p>Verify:</p><pre>kubectl exec \<br>  -n learningops-ai \<br>  deployment/ollama \<br>  -- ollama list</pre><p>These files live on:</p><pre>ollama-models PVC</pre><p>not inside the temporary container filesystem.</p><p>So:</p><pre>Ollama Pod dies<br>       ↓<br>new Pod starts<br>       ↓<br>PVC reattaches<br>       ↓<br>models still exist</pre><p>This is exactly why persistent storage matters for model serving.</p><h3>Step 24 — Deploy the MCP Server</h3><p>Our MCP server is actually using the same Python project image.</p><p>We simply give the container a different command.</p><p>Create:</p><pre>k8s/mcp.yaml.tpl</pre><p>CODE IN DOC FILE</p><p>Apply with our ECR image:</p><pre>envsubst \<br>  &lt; k8s/mcp.yaml.tpl \<br>  | kubectl apply -f -</pre><p>Check:</p><pre>kubectl get pods \<br>  -n learningops-ai</pre><p>Again:</p><pre>ClusterIP</pre><p>means this MCP server is not directly reachable from the public internet.</p><p>For sensitive remote MCP services, the MCP specification also defines authorization patterns; for our internal learning service, Kubernetes-internal networking keeps the initial design intentionally small.</p><h3>Step 25 — Deploy the AI Agent</h3><p>Now the star of the series.</p><p>Create:</p><pre>k8s/agent.yaml.tpl</pre><p>CODE IN DOC FILE</p><p>Apply:</p><pre>envsubst \<br>  &lt; k8s/agent.yaml.tpl \<br>  | kubectl apply -f -</pre><p>Check:</p><pre>kubectl get all \<br>  -n learningops-ai</pre><h3>Liveness vs Readiness</h3><p>This distinction deserves attention.</p><p>Our liveness endpoint:</p><pre>/health</pre><p>answers:</p><blockquote><em>Is my application process alive?</em></blockquote><p>Our readiness endpoint:</p><pre>/ready</pre><p>answers something closer to:</p><blockquote><em>Can this Pod actually handle agent requests right now?</em></blockquote><p>Our readiness check also verifies that:</p><pre>knowledge file exists<br>Ollama is reachable</pre><p>That means a Pod can be:</p><pre>Alive</pre><p>but:</p><pre>Not Ready</pre><p>Kubernetes then stops routing Service traffic to it instead of immediately killing it.</p><p>That is much more useful than a generic:</p><pre>GET / = 200</pre><p>health check.</p><h3>Step 26 — Test Everything Internally First</h3><p>Before exposing anything publicly:</p><pre>kubectl port-forward \<br>  -n learningops-ai \<br>  service/ai-agent \<br>  8000:80</pre><p>From another terminal:</p><pre>curl \<br>  http://localhost:8000/health</pre><p>Then:</p><pre>curl \<br>  http://localhost:8000/ready</pre><p>Now test the agent:</p><pre>curl -X POST \<br>  http://localhost:8000/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -H &quot;X-API-Key: ${AGENT_API_KEY}&quot; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;What is my name from my local knowledge file?&quot;<br>  }&#39;</pre><p>This is our first Kubernetes RAG test.</p><h3>Step 27 — Calculator Tool Test</h3><pre>curl -X POST \<br>  http://localhost:8000/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -H &quot;X-API-Key: ${AGENT_API_KEY}&quot; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;Calculate 4750 divided by 25.&quot;<br>  }&#39;</pre><p>Watch logs:</p><pre>kubectl logs \<br>  -n learningops-ai \<br>  deployment/ai-agent \<br>  -f</pre><p>We want to see:</p><pre>Agent Node<br>   ↓<br>Calculator<br>   ↓<br>Agent<br>   ↓<br>END</pre><p>LangGraph did not disappear because we deployed Kubernetes.</p><p>Kubernetes is hosting the application.</p><p>LangGraph is still orchestrating what happens inside the application.</p><h3>Step 28 — MCP Test</h3><p>Now ask:</p><pre>curl -X POST \<br>  http://localhost:8000/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -H &quot;X-API-Key: ${AGENT_API_KEY}&quot; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;What is the current external Cloud Lab offer for NVIDIA L4?&quot;<br>  }&#39;</pre><p>Conceptually:</p><pre>curl<br> ↓<br>FastAPI<br> ↓<br>run_agent<br> ↓<br>LangGraph<br> ↓<br>MCP Tool<br> ↓<br>MCP Client<br> ↓<br>Kubernetes Service<br> ↓<br>MCP Pod<br> ↓<br>Cloud Lab catalog<br> ↓<br>response</pre><p>This is the exact capability from Part 6 — but distributed across Kubernetes.</p><h3>Step 29 — Our Full-Series Test</h3><p>Now let us test almost the entire series at once.</p><p>Ask something like:</p><pre>Search my local Cloud Lab notes for my available budget.</pre><pre>Then check the current external NVIDIA L4 offer using Cloud Lab.</pre><pre>Finally calculate how many full GPU hours I can afford.</pre><p>If everything works, our trace should conceptually become:</p><pre>User<br> ↓<br>LangGraph Agent<br> ↓<br>RAG<br> ↓<br>Agent<br> ↓<br>MCP<br> ↓<br>Agent<br> ↓<br>Calculator<br> ↓<br>Agent<br> ↓<br>Final Answer</pre><p>That one request represents almost our entire journey:</p><pre>RAG<br>+<br>Tool Calling<br>+<br>Multi-Step Reasoning<br>+<br>LangGraph<br>+<br>MCP<br>+<br>Kubernetes</pre><h3>Step 30 — Persistent Memory Test</h3><p>First save a memory:</p><pre>curl -X POST \<br>  http://localhost:8000/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -H &quot;X-API-Key: ${AGENT_API_KEY}&quot; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;Remember that my preferred GPU is NVIDIA L4.&quot;<br>  }&#39;</pre><p>Inspect:</p><pre>kubectl exec \<br>  -n learningops-ai \<br>  deployment/ai-agent \<br>  -- cat \<br>  /app/storage/user_memory.json</pre><p>Now comes the fun part.</p><p>Find the Pod:</p><pre>kubectl get pods \<br>  -n learningops-ai \<br>  -l app=ai-agent</pre><p>Delete it:</p><pre>kubectl delete pod \<br>  -n learningops-ai \<br>  $(kubectl get pod \<br>      -n learningops-ai \<br>      -l app=ai-agent \<br>      -o jsonpath=&#39;{.items[0].metadata.name}&#39;)</pre><p>Watch:</p><pre>kubectl get pods \<br>  -n learningops-ai \<br>  -w</pre><p>The Deployment notices:</p><pre>Desired replicas = 1<br>Actual replicas = 0</pre><p>and creates another Pod.</p><p>This is one of those moments where Kubernetes becomes much more tangible than a diagram.</p><h3>Step 31 — Did the Memory Survive?</h3><p>After the replacement Pod becomes ready:</p><pre>kubectl exec \<br>  -n learningops-ai \<br>  deployment/ai-agent \<br>  -- cat \<br>  /app/storage/user_memory.json</pre><p>The memory should still be there.</p><p>Then ask:</p><pre>curl -X POST \<br>  http://localhost:8000/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -H &quot;X-API-Key: ${AGENT_API_KEY}&quot; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;What is my remembered GPU preference?&quot;<br>  }&#39;</pre><p>This demonstrates:</p><pre>Pod<br>   ↓<br>ephemeral</pre><pre>PersistentVolume<br>   ↓<br>durable</pre><p>Our code did not magically become stateful because it runs in Kubernetes.</p><p>We explicitly gave its durable state somewhere durable to live.</p><h3>But Something Else Did NOT Survive</h3><p>Remember our API session history?</p><pre>conversation_sessions = {}</pre><p>That was inside the deleted Python process.</p><p>So:</p><pre>Pod deleted<br>      ↓<br>process memory deleted<br>      ↓<br>conversation history deleted</pre><p>while:</p><pre>Persistent memory<br>      ↓<br>PVC<br>      ↓<br>survives</pre><p>This gives us a beautiful demonstration of the difference between:</p><pre>short-term conversation state</pre><p>and:</p><pre>persistent durable state</pre><p>which we first learned about in Part 3.</p><h3>Step 32 — Why We Cannot Simply Set replicas: 5</h3><p>Suppose we change:</p><pre>replicas: 1</pre><p>to:</p><pre>replicas: 5</pre><p>Now:</p><pre>Request 1<br>   ↓<br>Pod A</pre><pre>Request 2<br>   ↓<br>Pod C</pre><pre>Request 3<br>   ↓<br>Pod B</pre><p>Each Pod has its own:</p><pre>conversation_sessions</pre><p>So follow-up conversations become inconsistent.</p><p>We also have another problem.</p><p>Our persistent memory is currently a JSON file.</p><p>Running multiple writers against the same file-based state is not the architecture I would choose for a horizontally scaled production service.</p><p>So before scaling the agent, I would move state outward:</p><pre>Agent Pods<br>    │<br>    ├── Redis<br>    │     ↓<br>    │ short-term/session state<br>    │<br>    ├── Database / durable store<br>    │     ↓<br>    │ persistent memories<br>    │<br>    └── Vector database/object storage<br>          ↓<br>       production RAG</pre><p>Another option for LangGraph applications is checkpointing/persistence designed around graph execution.</p><p>The big lesson is:</p><blockquote><em>Stateless application replicas scale much more cleanly than replicas that secretly own user state inside process memory.</em></blockquote><h3>Why Our Deployment Strategy Uses Recreate</h3><p>You may have noticed:</p><pre>strategy:<br>  type: Recreate</pre><p>instead of celebrating Kubernetes RollingUpdate immediately.</p><p>That is also deliberate.</p><p>If Kubernetes briefly runs:</p><pre>Old Agent Pod<br>+<br>New Agent Pod</pre><p>during an update, both could interact with our simple file-based state.</p><p>I would rather teach the safe limitation than hide it.</p><p>Once conversation and persistent state move into concurrency-safe external services, our Agent Pods become much more stateless and then a normal rolling strategy makes sense.</p><p>Kubernetes Deployments support gradual rolling replacement and rollout monitoring, but whether that rollout is safe depends on the application architecture being deployed.</p><p>Again:</p><blockquote><em>Kubernetes cannot make an unsafe application-level state model safe for us.</em></blockquote><h3>Step 33 — Expose the Agent</h3><p>At the moment:</p><pre>ai-agent</pre><p>is a ClusterIP Service.</p><p>That was intentional.</p><p>We tested the entire architecture internally first.</p><p>Now, for our single public HTTP workload, the simplest next step is to change the Service to:</p><pre>type: LoadBalancer</pre><p>For example:</p><pre>apiVersion: v1<br>kind: Service</pre><pre>metadata:<br>  name: ai-agent-public<br>  namespace: learningops-ai</pre><pre>spec:</pre><pre>  type: LoadBalancer</pre><pre>  selector:<br>    app: ai-agent</pre><pre>  ports:</pre><pre>    - name: http<br>      port: 80<br>      targetPort: http</pre><p>Apply:</p><pre>kubectl apply \<br>  -f k8s/agent-public-service.yaml</pre><p>Check:</p><pre>kubectl get svc \<br>  -n learningops-ai</pre><p>AWS should eventually provide an external load-balancer hostname.</p><h3>Step 34 — Connect the Load Balancer to Our Domain</h3><p>Suppose AWS gives us something conceptually like:</p><pre>xxxxx.elb.amazonaws.com</pre><p>Inside the Route 53 hosted zone:</p><pre>k8s.devtoprod.in</pre><p>create:</p><pre>api.k8s.devtoprod.in</pre><p>pointing to the AWS load balancer.</p><p>Now:</p><pre>api.k8s.devtoprod.in<br>        ↓<br>AWS Load Balancer<br>        ↓<br>Kubernetes Service<br>        ↓<br>Agent Pod</pre><p>Our test becomes:</p><pre>curl -X POST \<br>  http://api.k8s.devtoprod.in/chat \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -H &quot;X-API-Key: ${AGENT_API_KEY}&quot; \<br>  -d &#39;{<br>    &quot;message&quot;:<br>      &quot;What is the current external Cloud Lab offer for NVIDIA L4?&quot;<br>  }&#39;</pre><p>Now the agent we built on a laptop has a real network endpoint.</p><h3>Why I Am Not Installing Ingress-NGINX</h3><p>A few years ago, the next line in many tutorials would have been:</p><pre>Install ingress-nginx</pre><p>I am deliberately not doing that.</p><p>The Kubernetes project retired the community Ingress-NGINX project on March 24, 2026; it no longer receives releases, bug fixes or security fixes.</p><p>Also, we currently have:</p><pre>one public HTTP service</pre><p>Adding another controller simply so we can say:</p><pre>Look, we have an Ingress!</pre><p>does not improve the architecture.</p><p>If we later add:</p><pre>Agent<br>Django<br>Grafana<br>another API</pre><p>then I would introduce:</p><pre>Gateway API</pre><p>and route:</p><pre>api.k8s.devtoprod.in<br>        ↓<br>Agent</pre><pre>app.k8s.devtoprod.in<br>        ↓<br>Django</pre><p>kOps’ default networking has used Cilium for several releases, and kOps supports enabling Cilium’s Gateway API integration.</p><p>That can become a separate article.</p><h3>What About HTTPS?</h3><p>Our learning path above proves Kubernetes networking.</p><p>For an internet-facing production system, I would not stop at:</p><pre>HTTP + API key</pre><p>The edge should have:</p><pre>HTTPS<br>TLS certificate management<br>real authentication<br>rate limiting<br>request limits<br>auditability</pre><p>A Gateway/API gateway/load balancer layer is normally a good place to implement several of these controls.</p><p>The public HTTP endpoint in this article should therefore be considered a learning endpoint, not the final security posture for sensitive production traffic.</p><h3>Step 35 — Observe the Agent</h3><p>We already built something useful without installing a huge observability platform.</p><p>Our Part 6 application prints:</p><pre>Graph node entered<br>Tool requested<br>Tool arguments<br>Tool result<br>Routing decision</pre><p>and our FastAPI wrapper adds:</p><pre>request received<br>session id<br>completion<br>latency<br>errors</pre><p>So Kubernetes immediately gives us:</p><pre>kubectl logs \<br>  -n learningops-ai \<br>  deployment/ai-agent</pre><p>Follow logs:</p><pre>kubectl logs \<br>  -n learningops-ai \<br>  deployment/ai-agent \<br>  -f</pre><p>MCP logs:</p><pre>kubectl logs \<br>  -n learningops-ai \<br>  deployment/cloud-lab-mcp \<br>  -f</pre><p>Ollama logs:</p><pre>kubectl logs \<br>  -n learningops-ai \<br>  deployment/ollama \<br>  -f</pre><p>For a real platform I would next add:</p><pre>Prometheus<br>Grafana<br>Loki<br>OpenTelemetry</pre><p>and capture measurements such as:</p><pre>request latency<br>LLM latency<br>tool latency<br>MCP latency<br>token usage<br>tool-call count<br>tool errors<br>RAG retrieval time<br>model failures<br>request rate<br>CPU<br>memory<br>GPU utilization</pre><p>But I do not need to install four more platforms just to teach the principle.</p><h3>Step 36 — Resource Requests and Limits Matter More for AI</h3><p>Normal web services might have relatively predictable CPU and memory usage.</p><p>AI workloads can behave differently.</p><p>An inference server may suddenly consume:</p><pre>large memory<br>CPU<br>GPU memory<br>model loading time</pre><p>That is why I gave Ollama different resources from the agent.</p><p>Conceptually:</p><pre>Agent<br>Requests:<br>  CPU: 500m<br>  RAM: 512Mi</pre><pre>Ollama<br>Requests:<br>  CPU: 2<br>  RAM: 4Gi</pre><p>The scheduler can now make decisions based on declared resource requirements rather than hoping the node happens to have enough capacity.</p><p>The exact values should eventually come from measurement.</p><p>Not from copying my YAML.</p><h3>Step 37 — What Changes When We Need GPU?</h3><p>Our current learning deployment can run the small models on CPU.</p><p>But imagine our production model requires NVIDIA GPU inference.</p><p>The architecture should not become:</p><pre>Every Agent Pod<br>      ↓<br>GPU</pre><p>unless every agent genuinely needs its own GPU.</p><p>A cleaner architecture might be:</p><pre>Agent Pods<br>          /      |       \<br>         /       |        \<br>        ▼        ▼         ▼<br>               Ollama<br>            Model Service<br>                 │<br>                 ▼<br>              GPU Node</pre><p>Kubernetes supports scheduling GPUs as extended resources through vendor device plugins. For NVIDIA hardware, workloads commonly request a resource such as:</p><pre>resources:</pre><pre>  limits:</pre><pre>    nvidia.com/gpu: 1</pre><p>Kubernetes documents GPU scheduling through device plugins as a stable capability.</p><p>We might create a dedicated GPU node group:</p><pre>CPU Workers<br>    ↓<br>Agent / API / MCP</pre><pre>GPU Workers<br>    ↓<br>Ollama / Model Serving</pre><p>Then label the GPU nodes:</p><pre>workload=gpu</pre><p>and schedule Ollama using:</p><pre>nodeSelector:</pre><pre>  workload: gpu</pre><p>Potentially combined with:</p><pre>taints<br>tolerations<br>NVIDIA GPU Operator<br>device plugin<br>DCGM metrics</pre><p>Now our AI infrastructure and application infrastructure can scale independently.</p><p>That becomes especially important when GPU is the expensive resource.</p><h3>Security Lessons from This Deployment</h3><p>Kubernetes security deserves much more than one YAML object.</p><p>But even our learning application can follow several good habits.</p><p>We did not bake our API secret into the image.</p><p>We run our own Python container as a non-root UID.</p><p>We dropped Linux capabilities that our agent does not need.</p><p>Ollama is not publicly exposed.</p><p>MCP is not publicly exposed.</p><p>Configuration comes from ConfigMaps.</p><p>Persistent data goes to volumes.</p><p>For a real production environment I would continue with:</p><pre>NetworkPolicies<br>RBAC<br>restricted ServiceAccounts<br>image scanning<br>pinned container digests<br>TLS<br>external secret manager<br>pod security controls<br>API authentication<br>MCP authorization<br>audit logging<br>egress restrictions</pre><p>A particularly important AI-Agent security boundary is:</p><pre>Which tools can this agent call?</pre><p>because a compromised or badly instructed agent with:</p><pre>read-only price lookup</pre><p>is very different from an agent capable of:</p><pre>delete database<br>terminate EC2<br>transfer money<br>send email</pre><p>MCP makes tool integration standardized.</p><p>It does not remove the need for authorization.</p><h3>What Is Stateful and What Is Stateless Now?</h3><p>Let us summarize our architecture.</p><h3>Agent Container</h3><p>Mostly application code.</p><p>But currently still has in-process session history.</p><h3>Ollama</h3><p>Stateful model storage.</p><p>PVC:</p><pre>ollama-models</pre><h3>Persistent User Memory</h3><p>Stateful.</p><p>PVC:</p><pre>agent-storage</pre><h3>RAG Index</h3><p>Derived state.</p><p>Also currently stored on:</p><pre>agent-storage</pre><p>but rebuildable.</p><h3>Knowledge File</h3><p>Configuration/input data.</p><pre>ConfigMap</pre><h3>Cloud Lab Catalog</h3><p>Configuration for our MCP demo.</p><pre>ConfigMap</pre><h3>Kubernetes Secret</h3><p>API credential.</p><pre>Secret</pre><p>Understanding those distinctions is far more important than memorizing YAML syntax.</p><h3>Container Restart vs Pod Restart vs Node Failure</h3><p>Another subtle lesson.</p><p>Containers are temporary.</p><p>Pods are temporary.</p><p>Even worker nodes can disappear.</p><p>Our target should therefore not depend on:</p><pre>the filesystem inside one container</pre><p>for important durable data.</p><p>Kubernetes gives us the abstraction:</p><pre>Workload<br>   +<br>Persistent Volume</pre><p>so the application process can change while state survives.</p><p>Production databases go even further because they solve:</p><pre>concurrency<br>transactions<br>replication<br>backup<br>querying<br>multi-replica access</pre><p>which our JSON files deliberately do not.</p><h3>Updating the Application</h3><p>Imagine we change our agent.</p><p>Build:</p><pre>docker build \<br>  -t learningops-ai-agent:part7-v2 .</pre><p>Tag:</p><pre>export AGENT_IMAGE_V2=&quot;${ECR_REGISTRY}/${ECR_REPOSITORY}:part7-v2&quot;</pre><pre>docker tag \<br>  learningops-ai-agent:part7-v2 \<br>  &quot;${AGENT_IMAGE_V2}&quot;</pre><p>Push:</p><pre>docker push \<br>  &quot;${AGENT_IMAGE_V2}&quot;</pre><p>Then update:</p><pre>kubectl set image \<br>  deployment/ai-agent \<br>  ai-agent=&quot;${AGENT_IMAGE_V2}&quot; \<br>  -n learningops-ai</pre><p>Watch:</p><pre>kubectl rollout status \<br>  deployment/ai-agent \<br>  -n learningops-ai</pre><p>View history:</p><pre>kubectl rollout history \<br>  deployment/ai-agent \<br>  -n learningops-ai</pre><p>Rollback if necessary:</p><pre>kubectl rollout undo \<br>  deployment/ai-agent \<br>  -n learningops-ai</pre><p>Our current Recreate strategy means this is not yet a zero-downtime rolling replacement.</p><p>That is a limitation created by our current state architecture — not by Kubernetes.</p><p>Once state is properly externalized, changing to a normal RollingUpdate strategy becomes much safer.</p><h3>Our Final Architecture</h3><p>We started this article with:</p><pre>python app.py</pre><p>We now have:</p><pre>Internet<br>                            │<br>                            ▼<br>                   api.k8s.devtoprod.in<br>                            │<br>                            ▼<br>                  AWS Load Balancer<br>                            │<br>                            ▼<br>                    Kubernetes Service<br>                            │<br>                            ▼<br>                    ┌───────────────┐<br>                    │   AI Agent    │<br>                    │   FastAPI     │<br>                    │               │<br>                    │   LangGraph   │<br>                    └───────┬───────┘<br>                            │<br>             ┌──────────────┼──────────────┐<br>             │              │              │<br>             ▼              ▼              ▼<br>            RAG         Local Tools      MCP Client<br>             │                              │<br>             │                              ▼<br>             │                       MCP Service<br>             │                              │<br>             ▼                              ▼<br>       Ollama Service                 MCP Server Pod<br>             │                              │<br>       ┌─────┴─────┐                        ▼<br>       │           │                Cloud Lab Catalog<br>       ▼           ▼<br> Qwen3:1.7b    all-minilm<br></pre><pre>Persistent storage:</pre><pre>Agent<br>  ↓<br>agent-storage PVC<br>  ├── index.json<br>  └── user_memory.json</pre><pre>Ollama<br>  ↓<br>ollama-models PVC</pre><p>And surrounding everything:</p><pre>Route 53<br>ECR<br>EC2<br>kOps<br>Kubernetes<br>ConfigMaps<br>Secrets<br>PVCs<br>Health Probes<br>Resource Limits<br>Logging<br>Recovery</pre><p>That is a very different application from the one we started with.</p><p>And yet the core agent is still recognizably ours.</p><h3>The Entire 7-Part Journey</h3><p>Let us go all the way back.</p><h3>Part 1 — RAG</h3><p>We gave the model knowledge.</p><pre>Question<br> ↓<br>Knowledge<br> ↓<br>Answer</pre><h3>Part 2 — Tool Calling</h3><p>We gave the model capabilities.</p><pre>Question<br> ↓<br>Which tool?<br> ↓<br>Tool<br> ↓<br>Answer</pre><h3>Part 3 — Memory</h3><p>We gave the agent continuity.</p><pre>Conversation<br>+<br>Persistent Memory</pre><h3>Part 4 — Multi-Tool Agent</h3><p>We allowed dependent reasoning.</p><pre>Tool A<br> ↓<br>Result<br> ↓<br>Tool B<br> ↓<br>Result<br> ↓<br>Tool C</pre><h3>Part 5 — LangGraph</h3><p>We made orchestration explicit.</p><pre>Agent<br> ↕<br>Tools<br> ↕<br>Guardrails</pre><h3>Part 6 — MCP</h3><p>We connected external systems through a standard protocol.</p><pre>Agent<br> ↓<br>MCP Client<br> ↓<br>MCP Server<br> ↓<br>External System</pre><h3>Part 7 — Kubernetes</h3><p>We finally learned how to operate the whole thing as an application.</p><pre>Containers<br>+<br>Services<br>+<br>Storage<br>+<br>Networking<br>+<br>Health<br>+<br>Security<br>+<br>Recovery</pre><h3>The Architecture We Actually Built</h3><p>Another way of looking at the complete series is:</p><pre>Knowledge<br>      +<br>Tools<br>      +<br>Memory<br>      +<br>Multi-Step Reasoning<br>      +<br>LangGraph Orchestration<br>      +<br>MCP External Systems<br>      +<br>Production-Style Deployment<br>             │<br>             ▼<br>          AI Agent</pre><p>This was the real objective of the series.</p><p>Not:</p><blockquote><em>Install another AI framework.</em></blockquote><p>Not:</p><blockquote><em>Copy a giant agent repository.</em></blockquote><p>Not:</p><blockquote><em>Call an LLM API and rename it an agent.</em></blockquote><p>Instead we built the layers ourselves so that we could understand what each one was actually doing.</p><h3>Final Thoughts</h3><p>When we started, our application knew a few facts from a text file.</p><p>Today that same project has:</p><pre>RAG<br>Tool Calling<br>Short-Term Memory<br>Persistent Memory<br>Dependent Multi-Tool Workflows<br>LangGraph<br>Guardrails<br>MCP<br>External Systems<br>HTTP API<br>Containers<br>Kubernetes<br>Persistent Storage<br>Health Checks<br>Configuration<br>Secrets<br>Cloud Networking<br>Recovery</pre><p>But perhaps the most valuable lesson is that an AI Agent is not one magical component.</p><p>It is a system.</p><p>The LLM is one part.</p><p>The tools are another.</p><p>The knowledge system is another.</p><p>Memory is another.</p><p>Orchestration is another.</p><p>External integrations are another.</p><p>And once we move from a laptop to production:</p><pre>Infrastructure<br>Security<br>Persistence<br>Observability<br>Scaling<br>Reliability</pre><p>become part of the AI system as well.</p><p>That is where this series ends.</p><p>But it is probably also where building real AI systems begins.</p><pre>Part 1 → Knowledge<br>Part 2 → Capabilities<br>Part 3 → Memory<br>Part 4 → Reasoning<br>Part 5 → Orchestration<br>Part 6 → External Systems<br>Part 7 → Production Deployment</pre><p>Seven parts.</p><p>One agent.</p><p>Built layer by layer.</p><p>From:</p><pre>python app.py</pre><p>to:</p><pre>AI Agent<br>   ↓<br>Kubernetes<br>   ↓<br>Cloud</pre><p>And the Series is complete.</p><p>Thank you being till here. See you soon in next article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e0527153c95" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/part-7-7-deploying-our-ai-agent-7e0527153c95">Part 7/7 — Deploying our AI Agent</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 6/7 — Connect External Systems with MCP]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aws.plainenglish.io/part-6-7-connect-external-systems-with-mcp-6f8c93da9494?source=rss-e0e374ba3608------2"><img src="https://cdn-images-1.medium.com/max/1170/1*mBlUl7i27PPpWk1nhcVKCg.png" width="1170"></a></p><p class="medium-feed-snippet">In the previous five parts, we slowly upgraded a very simple local AI assistant into something that is beginning to look like a real AI&#x2026;</p><p class="medium-feed-link"><a href="https://aws.plainenglish.io/part-6-7-connect-external-systems-with-mcp-6f8c93da9494?source=rss-e0e374ba3608------2">Continue reading on AWS in Plain English »</a></p></div>]]></description>
            <link>https://aws.plainenglish.io/part-6-7-connect-external-systems-with-mcp-6f8c93da9494?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f8c93da9494</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 20:44:28 GMT</pubDate>
            <atom:updated>2026-10-01T20:44:28.890Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Part 5/7- Orchestrate Everything with LangGraph]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aws.plainenglish.io/part-5-7-orchestrate-everything-with-langgraph-e84a9b7dda6f?source=rss-e0e374ba3608------2"><img src="https://cdn-images-1.medium.com/max/1672/1*hFB76FWJvbZgnVpdJXf5XA.png" width="1672"></a></p><p class="medium-feed-snippet">Lets give our Agent some Orchestration help by LanGgraph.</p><p class="medium-feed-link"><a href="https://aws.plainenglish.io/part-5-7-orchestrate-everything-with-langgraph-e84a9b7dda6f?source=rss-e0e374ba3608------2">Continue reading on AWS in Plain English »</a></p></div>]]></description>
            <link>https://aws.plainenglish.io/part-5-7-orchestrate-everything-with-langgraph-e84a9b7dda6f?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/e84a9b7dda6f</guid>
            <category><![CDATA[langgraph]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 13:21:06 GMT</pubDate>
            <atom:updated>2026-08-30T13:21:06.919Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Part 4/7- Build a Multi-Tool AI Agent: From Tool Calling to Tool Chaining]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aws.plainenglish.io/part-4-7-build-a-multi-tool-ai-agent-from-tool-calling-to-tool-chaining-9a152f28241b?source=rss-e0e374ba3608------2"><img src="https://cdn-images-1.medium.com/max/1672/1*4b4SDSrzVZays7yeCSD2Dw.png" width="1672"></a></p><p class="medium-feed-snippet">An Agent need multiple tools to execute our tasks. Lets learn it.</p><p class="medium-feed-link"><a href="https://aws.plainenglish.io/part-4-7-build-a-multi-tool-ai-agent-from-tool-calling-to-tool-chaining-9a152f28241b?source=rss-e0e374ba3608------2">Continue reading on AWS in Plain English »</a></p></div>]]></description>
            <link>https://aws.plainenglish.io/part-4-7-build-a-multi-tool-ai-agent-from-tool-calling-to-tool-chaining-9a152f28241b?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a152f28241b</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 13:14:49 GMT</pubDate>
            <atom:updated>2026-08-30T13:14:49.430Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Part 3/7- Giving AI Agent Memory: Conversations, Short-Term Context & Persistent User Memory]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aws.plainenglish.io/part-3-7-giving-ai-agent-memory-conversations-short-term-context-persistent-user-memory-619c39ca6869?source=rss-e0e374ba3608------2"><img src="https://cdn-images-1.medium.com/max/1672/1*49KD59yAb0BmIkqyqbXtaQ.png" width="1672"></a></p><p class="medium-feed-snippet">Our AI Agent will now remember things.</p><p class="medium-feed-link"><a href="https://aws.plainenglish.io/part-3-7-giving-ai-agent-memory-conversations-short-term-context-persistent-user-memory-619c39ca6869?source=rss-e0e374ba3608------2">Continue reading on AWS in Plain English »</a></p></div>]]></description>
            <link>https://aws.plainenglish.io/part-3-7-giving-ai-agent-memory-conversations-short-term-context-persistent-user-memory-619c39ca6869?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/619c39ca6869</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 18:17:57 GMT</pubDate>
            <atom:updated>2026-08-16T18:17:57.658Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Part 2/7 -Upgrading Local RAG Assistant by adding Tool Calling]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aws.plainenglish.io/part-2-7-upgrading-local-rag-assistant-by-adding-tool-calling-273293f8a48e?source=rss-e0e374ba3608------2"><img src="https://cdn-images-1.medium.com/max/1672/1*xMBZdg3oTkvu8af0Dc_BBw.png" width="1672"></a></p><p class="medium-feed-snippet">Let AI Decide Which Tool It Needs</p><p class="medium-feed-link"><a href="https://aws.plainenglish.io/part-2-7-upgrading-local-rag-assistant-by-adding-tool-calling-273293f8a48e?source=rss-e0e374ba3608------2">Continue reading on AWS in Plain English »</a></p></div>]]></description>
            <link>https://aws.plainenglish.io/part-2-7-upgrading-local-rag-assistant-by-adding-tool-calling-273293f8a48e?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/273293f8a48e</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 12:46:19 GMT</pubDate>
            <atom:updated>2026-08-12T12:46:19.509Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Part 1/7: Build a “Local RAG Assistant”]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aws.plainenglish.io/part-1-7-build-a-local-rag-assistant-a5bf3efe102d?source=rss-e0e374ba3608------2"><img src="https://cdn-images-1.medium.com/max/1672/1*QeH_kA7apWQK4tW1ISIyag.png" width="1672"></a></p><p class="medium-feed-snippet">&#x1F680; Ai Agent Series : Building AI Agents: A 7-Part Practical Series.</p><p class="medium-feed-link"><a href="https://aws.plainenglish.io/part-1-7-build-a-local-rag-assistant-a5bf3efe102d?source=rss-e0e374ba3608------2">Continue reading on AWS in Plain English »</a></p></div>]]></description>
            <link>https://aws.plainenglish.io/part-1-7-build-a-local-rag-assistant-a5bf3efe102d?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5bf3efe102d</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Thu, 06 Aug 2026 12:15:09 GMT</pubDate>
            <atom:updated>2026-08-06T12:16:53.561Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Announcement: A 7-Part Hands-On Series to Build an AI Agent from Scratch]]></title>
            <link>https://medium.com/@mohitmishra3333/announcement-a-7-part-hands-on-series-to-build-an-ai-agent-from-scratch-52430b1a6945?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/52430b1a6945</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[machine-learning-ai]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 20:30:29 GMT</pubDate>
            <atom:updated>2026-08-04T20:30:29.952Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wD24_Ca02ufLmaAfVf4olQ.png" /></figure><p>We dont have to be an expert , but being aware is also not bad.</p><p>So AI Agents are everywhere. AI has so many masks now.</p><p>LangGraph, MCP, CrewAI, AutoGen… every week a new framework appears, making it easy to feel overwhelmed.</p><p>Instead of jumping directly into advanced frameworks, we’ll build an AI Agent the same way we would have build any software system, one layer at a time.</p><p>By the end of this series, you’ll understand not only how to build an AI Agent, but why each component exists and where it fits into a production architecture.</p><p>Here’s our learning roadmap. And if it will take time, we will give it. No hush hush.</p><p>⤵️I will be publishing here and on my Linkedin Newsletter as well⤵️⤵</p><p><a href="https://www.linkedin.com/newsletters/learningops-7486707879467659264">https://www.linkedin.com/newsletters/learningops-7486707879467659264</a></p><h3>Part 1: Build the Foundation: Local RAG Assistant</h3><p>We’ll start by building a local RAG application that reads our own documents and answers questions using a local LLM. NO GPU.</p><p>💡 Real-world example: We will ask <em>“What does Mohit love?”</em> and the assistant searches oour knowledge file before answering <em>“Mohit loves cloud.”</em></p><h3>Part 2: Upgrade It into a Real AI Agent with Tool Calling</h3><p>Instead of always searching the same file, we’ll give the model multiple tools and let it decide which one to use.</p><p>💡 Real-world example: Ask <em>“What’s the current time?”</em> and the agent chooses the Time Tool instead of just keep searching our documents.</p><h3>Part 3: Add Memory and Conversations</h3><p>Our agent will start remembering previous conversations and user preferences instead of treating every question as brand new.</p><p>💡 Real-world example: We will say, <em>“My favourite cloud is AWS.”</em> Later you ask, <em>“Which cloud do I prefer?”</em> The agent remembers without you repeating it.</p><h3>Part 4: Build a Multi-Tool AI Agent</h3><p>We’ll expand from one or two tools to many, allowing the agent to combine multiple capabilities to solve a bit bigger tasks.</p><p>💡 Real-world example: The agent searches our documents, performs calculations, checks the current time, and combines everything into one response.</p><h3>Part 5: Orchestrate Everything with LangGraph</h3><p>Now we’ll introduce “workflows” so the agent can think in multiple steps, make decisions, recover from failures, and pause for human approval when required.</p><p>💡 Real-world example: Before restarting a Kubernetes deployment, the agent first checks logs, analyses metrics, verifies the root cause, and only then recommends an action.</p><h3>Part 6: Connect External Systems with MCP</h3><p>We’ll connect our agent to real systems like DB, Kubernetes, GitHub, or AWS using the Model Context Protocol (MCP).</p><p>💡 Real-world example: Instead of reading only local files, the agent can fetch live information from our infrastructure or business applications.</p><h3>Part 7: Deploy a Prod-Ready AI Agent on Kubernetes</h3><p>Finally, we’ll package everything with Docker, deploy it on Kubernetes, add monitoring, authentication, persistence, and scaling.</p><p>💡 Real-world example: Your local learning project becomes a prod-ready AI service that our entire team can use.</p><h3>What we will Learn</h3><p>Throughout this series we’ll cover:</p><ul><li>Python</li><li>Ollama</li><li>Local LLMs</li><li>RAG</li><li>Embeddings</li><li>Tool Calling</li><li>Agent Memory</li><li>LangGraph</li><li>MCP</li><li>Docker</li><li>Kubernetes</li><li>Production AI Agent Architecture</li></ul><p>Whether we’re a Cloud Engineer, DevOps Engineer, Backend Developer, or Software Engineer looking to tap somehting into AI, i will try to make this learnign series designed by building, not just reading.</p><p>Let’s build an AI Agent from scratch , one practical step at a time. 🚀</p><p>See you in next blog . Till then, keep positive attitude, keep learning and sharing.</p><p>#AIAgents #GenerativeAI #RAG #Python #Ollama #LangGraph #MCP #LLM #ArtificialIntelligence #MachineLearning #DevOps #MLOps #SoftwareEngineering #BuildInPublic</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52430b1a6945" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Really Happens When a Machine Learning Model Is Trained?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://aws.plainenglish.io/what-really-happens-when-a-machine-learning-model-is-trained-792a47c08deb?source=rss-e0e374ba3608------2"><img src="https://cdn-images-1.medium.com/max/1672/1*7uadM_6Qz9exrQf_qn9T_w.png" width="1672"></a></p><p class="medium-feed-snippet">Lets see how the AI does the magic.</p><p class="medium-feed-link"><a href="https://aws.plainenglish.io/what-really-happens-when-a-machine-learning-model-is-trained-792a47c08deb?source=rss-e0e374ba3608------2">Continue reading on AWS in Plain English »</a></p></div>]]></description>
            <link>https://aws.plainenglish.io/what-really-happens-when-a-machine-learning-model-is-trained-792a47c08deb?source=rss-e0e374ba3608------2</link>
            <guid isPermaLink="false">https://medium.com/p/792a47c08deb</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[MOHIT MISHRA]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 13:07:46 GMT</pubDate>
            <atom:updated>2026-09-24T13:48:15.637Z</atom:updated>
        </item>
    </channel>
</rss>