In the previous post, we built a dev.bg job-search agent with Agno and MLX that supports Human-in-the-Loop (HITL) control flow, meaning the agent pauses when it needs missing fields, asks for structured user input, and resumes from exactly where it left off. But there’s a recurring question in any agent project: How do we know the system prompt is actually good? You write something that works in your head, you tweak it a few times, and you ship it. But you’re essentially doing manual trial-and-error on natural language. In this post, we’ll do something more principled: use Microsoft’s Agent Lightning (agentlightning) to automatically optimize the system prompt for the same job-search agent. Instead of guessing the best prompt, we will let the model learn it.
Comments