---
title: "Discussion on \"Day 00: Learn AI agents by building one, in 30 days\" | Hashnode"
description: "Discussion on \"Day 00: Learn AI agents by building one, in 30 days\". Someone hands you an empty file and says: build an agent. Perhaps you have read the explainers and can recite that an agent is \"an LLM in a loop with tools\". Perhaps you have read none of them, and th"
url: "https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Day 00: Learn AI agents by building one, in 30 days](https://harshakatkam.dev/pilot-thirty-days-one-agent?utm_source=hashnode&utm_medium=feed)

Someone hands you an empty file and says: build an agent. Perhaps you have read the explainers and can recite that an agent is "an LLM in a loop with tools". Perhaps you have read none of them, and th

Oct 6 · 7 min read · harshakatkam.dev  
Read the article

-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#python](https://hashnode.com/tag/python)
-   [#llm](https://hashnode.com/tag/llm)
-   [#ai](https://hashnode.com/tag/ai)
-   [#agentic-ai](https://hashnode.com/tag/agentic-ai)

## Written by

[Harshavardhan Katkam](https://hashnode.com/@harshakatkam)

@harshakatkam · Hyderabad, India

  
[View profile](https://hashnode.com/@harshakatkam)

Senior Backend Engineer | Java | Distributed Systems | GenAI & AI Agents

## Responses 8

Markdown supported · ⌘↵ to post

[Oct 8](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac73c234628abaa49ccd9dc)

This is such a refreshing approach to learning AI agents. I really like the decision to build one thing for 30 days instead of jumping between a dozen small demos.

The “build it by hand before using a framework” idea especially resonates. It’s easy to get something working with a framework and still have no real understanding of what’s happening underneath. Struggling with the loop, tool calls, context, failures, and cost first makes the abstractions much more meaningful later.

I also love that you’re being honest about the possibility of things not working. That makes this feel less like a tutorial and more like someone actually learning in public—which is probably much more valuable.

Looking forward to seeing how Cartographer evolves, especially once it starts getting tested against real codebases. 🙌

[Harshavardhan Katkam](https://hashnode.com/@harshakatkam)

[Oct 8](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac73c234628abaa49ccd9dc#reply-6ac7d34cb4c7ee7f010db65e)

Thanks! Real codebases are the point. Day 07 is the first full run, on a well-known open-source Python project pinned to one release, so anyone can reproduce the result and check the map against the actual source. Later it gets scored against a second project too.

[Kartik N V J K](https://hashnode.com/@kartik-nvj)

[Oct 7](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac695995f0354844ab4418b)

Building cartographer's loop by hand in forty lines of raw HTTP, before any SDK, is the approach I wish more guides took. When I hand-rolled mine, the detail that clicked was the stop-reason field: a truncated answer and a finished one look identical until you check it yourself. Do you handle tool-call failures in the week-one loop, or defer them to the week-four hardening part?

[Harshavardhan Katkam](https://hashnode.com/@harshakatkam)

[Oct 8](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac695995f0354844ab4418b#reply-6ac73ddf23ed085b3a0a6c23)

Thanks, Kartik. The stop-reason trap is a good one; a truncated answer that looks finished is exactly the kind of bug the series is about.

Tool-call failures are handled in week one, not deferred. On day 06 a bad call doesn't crash the loop: an invented tool name, arguments cut off mid-JSON, or a wrong parameter go back to the model as the tool's result, an error message listing what's valid, so it can correct itself next turn. The loop is also capped at a fixed number of turns, so a model that keeps calling tools can't run forever.

Week four's hardening (day 28) is about the failures that don't raise anything: a run that finishes cleanly with a map that's quietly wrong.

On truncation: day 05 sets max\_tokens so a cut-off answer surfaces as malformed JSON rather than passing as finished. You've convinced me it's worth checking finish\_reason explicitly as well.

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Oct 7](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac61cd542b3d61ebed7fe68)

The “build it by hand first” part is spot on. I’ve found the same thing with agents — frameworks make sense much faster once you’ve fought with the loop yourself.

[Oct 7](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac61cd542b3d61ebed7fe68#reply-6ac65b72a37bf56d1860b76d)

Thanks, Julian. That's exactly the bet. Once you've written the loop yourself, a framework stops being magic and becomes a set of choices you can judge. That's why LangGraph only shows up in week 3, after the hand-built version has already hit the problems it solves.

Curious which part of the loop fought you hardest?

[indiainfranotes](https://hashnode.com/@indiainfranotes)

[Oct 6](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac50d41227b5fbb0e892d14)

Day zero is the right start because the loop is the skill, not the model. If the first agent cannot name the tool output that proves it acted, the 30 days just teach narration. What would you refuse to call done on day 30? iin1006ev

[Harshavardhan Katkam](https://hashnode.com/@harshakatkam)

[Oct 7](https://hashnode.com/posts/pilot-thirty-days-one-agent/6ac4990972f4e3cdcb5f87f2/comment/6ac50d41227b5fbb0e892d14#reply-6ac5f11af8b91a9254605cdc)

Agreed, and that's the bar I'm holding it to. From day 01 the loop only counts a step when a tool result comes back, and the map has to point at what it read: a file and a line, not a summary of a summary.

What I'd refuse to call done on day 30:

-   a map whose claims don't cite a file and line the agent actually opened
-   a "better" version that hasn't been scored against the eval set
-   any version that can write to the repo it's reading. It writes docs, never code.

If it can't show its evidence, it's narration, and you're right that 30 days of that would teach the wrong thing. Thanks for pushing on it.
