Discussion about this post

User's avatar
Pawel Jozefiak's avatar

The loop description is exactly right and also the part most people skip when they talk about agents in public. They show the outputs, not the architecture.

Running this loop in production across hundreds of sessions changes how you think about context management. The biggest practical lesson: what you put in the system prompt matters less than what you do with accumulated context mid-loop. That's where most agents start failing on longer tasks.

I built a night shift system where the agent runs autonomously for hours. The loop patterns you describe here are exactly what I had to learn the hard way before it ran reliably: https://thoughts.jock.pl/p/building-ai-agent-night-shifts-ep1

Good explainer. The production layer section especially.

No posts

Ready for more?