95 Comments
User's avatar
Lucas Mateus's avatar

Such a great article! Thanks a lot, I really needed that knowledge!

Harry Dang's avatar

The rule I keep applying from this is the pairing of two ideas: put the AI call at the end of the pipeline, and route the model to the task. In my own workflow I use the same split — a cheaper model for gathering and a stronger one only for the judgment step — and the savings come less from the price per token than from not re-running work because the instructions file was never read carefully. One question: when you tightened the CLAUDE.md after the self-improvement drift, did you end up with a written list of files the agent may never touch, or do you rely on per-project instruction files to enforce that boundary?

Pawel Jozefiak's avatar

Per-project files, no separate list. Each project in my agent has its own small instruction file and its own little memory file, and when self-improvement runs it touches those leaf files, never the core CLAUDE.md. The trunk stays protected and the branches can grow.

Franck PARIENTI's avatar

Really solid walkthrough. The part about starting with a single focused task before adding complexity is where most people go wrong. They try to build an agent that does everything on day one. Starting simple, proving the loop works, then expanding is the pattern I've seen work every time in enterprise deployments.

Pawel Jozefiak's avatar

Proving the loop works on a single focused task gets easier if the AI call sits at the end of the pipeline. Fetching email is a problem boring code has solved for 30 years, so in a first agent the model only does the summarizing instead of everything on day one.

Miss KP's avatar

What a lovely evening read. Thank you for sharing!

Team Thor AI's avatar

I love the c3p0 artwork even though it’s pixilated and drab. Captures the spirit of ai bots

Rafael's avatar

Contenido Excepcional

Alexander Everett's avatar

Step 1: have $100,000 you don’t mind setting on fire

Pawel Jozefiak's avatar

The first version is much less dramatic: your laptop is enough, and the only hard cost I put in the beginner guide is a $20 per month AI tier. New hardware comes later only if you want the agent to keep working while you sleep or while you are away from your desk.

Amber's avatar

interesting

Pawel Jozefiak's avatar

Thanks Amber! Hope it helps when you build one.

Shubhangee Desaee's avatar

Simply understandable, thanks

Njordplutus's avatar

One of the best articles on the basic understanding that I have come across

Pawel Jozefiak's avatar

Thank you, that means a lot. Glad the basics landed.

𓍼ོ پرستو's avatar

Phenomenal read. Thank you for graciously sharing your experiences.

Gianfranco Mileo's avatar

Sharing the real failure modes from the trenches is what actually moves the AI agent space forward. Great initiative, Pawel—demystifying day-one architecture will save a lot of builders months of rework.

Rayray's avatar

Hii, I’m a business lawyer with a big interest in AI. Maybe you will find this article I wrote interesting. Let me knock what you think!😄 https://substack.com/@curiouscurated/note/p-212901486?r=4y15ky&utm_medium=ios&utm_source=notes-share-action

Jason Colapietro | Suede AI's avatar

What's actually hard once you get past the tutorial is the tool schema, not the agent loop. Every weird model call traces back to a description that made sense to me and not to the model. I now write tool descriptions the way I'd explain the tool to a new hire who can't ask follow-up questions.

Mike Miller's avatar

This is a great walk-through. Thank you for this and your thoughts behind building agents. Seriously keep up the great work.

AI For Normal People's avatar

Bookmarking this! Transitioning from basic prompting to building structured, autonomous features is the exact technical hurdle I'm working through right now.

Pawel Jozefiak's avatar

Thx! Good luck!