Human Approval Belongs in Code, Not the Prompt
The support agent drafts a reply and waits for a human to approve it. Why that approval cannot be a line in a prompt or skill, since a small model follows it only most of the time, and how a check in code plus traces shows who approved and what the agent read.
#claudecode #aiagents #softwareengineering
Chapters
Transcript
Running the demo
So, the manager reads a card and it will say if it is an issue, it will it will redirect, it will orchestrate to okay, support resolver agent and support resolver agent will draft the reply and human approves and the GitHub shows reply replied and it is done. Unless and until GitHub shows reply, then it is not done. Okay, the question, if it is just a question, not an issue, then it will go into engineering analyst and it will cite what it reads. So it will check how to how to answer that question from the documentation. So in our case, it is either linearly or linear or wherever it is documented, it will find and cite that answer, and then it will say, Okay, it is done. Now a reply to so in the board, we had two actually three issues. One of the issues is actually duplicate question, like it is asking, hey, is this issue already been reported? Then it says, Yes, it has been already reported. The manager agent says like it has been reported, so and so ticket. it's a duplicate of it. And one of the tickets is a company called Globex, which is asking like yeah, CSV export, which is timing out for my task. The number of tasks is quite large, like 61,000 records because of that it is failing. so can you check what needs to be done? Then it goes to you know goes to the engineering agent, and engineering agent says, Okay, this ticket is in progress. So in product, we are aware of it and it is in progress, and you can reply. So then it goes to support agent, and support agent is actually saying, like, okay, I will draft a reply based on what is the finding. Now the support agent has added a reply in our mission control. We define the support agent won't directly send it, it will always come back, and we need to have a verification with human in the loop, and it is asking for that verification. Usually Grogboat or or those you know commercially available generic mission control agents or AI employees agents employee softwares. What they do is they you can connect with Telegram, you can connect with Slack, you can connect with email and you can you know chat with those applications. In this case, this is a pure demo, so it is on just the UI UX, but again, like UI can be like from where we can listen to those events and we can able to reply through Telegram as well. So it processed that and it was able to reply, and after the after the reply has been done, it was just listing down, and that decision actually need need not be just a prompt, that decision needs to be like approval process need to happen that need to be on the code as a verification layer.
Why approval lives in code
Why I am saying this because oftentimes the biggest problem with verification is like when you are actually defining it in agent MD or you know agent skill or somewhere where you say you know every message need to go with an approval. Most of the time, maybe the frontier models are very well capable enough, and every time it will go and read the skill and it will be able to produce. Okay. But what if you are using a small model where it won't read all the context, or every time it won't go and read your skills and rules what needs to be done. So eight out of ten times it will be able to decide. okay, it needs a human review, but it's still probabilistic. So the two out of ten times it can still execute it. So you need to have a deterministic check on the code level that okay, if this decision is made for that, it requires an approval. So if you say that, then it is not about just prompt, but you are actually writing the deterministic check for that agent that a prompt like prompt alone is not enough. you need to write the check, and that check will say you need to have this approval logic for that.
Who approved, and how
Okay, and we will click approve over here, and yes, it is approved, and it will I approve on the board, the card moves to done only because GitHub now shows the reply with my name on on it, like board param. So, who has approved it? The he is the signer who signed for it and it is approved. What if you know this is also very important when you are actually doing a agent, you need to make sure who is approving it and what process has been followed. You need to be well aware of that run. So, in this case, the agent is able to show what is the exact process that has been done, the manager handled the card to support resolver and support resolver called read issue, support resolver called search linear and search docs, it search for the information and then support resolver called request reply. So these are the tools it has access to, and it calls those tools and it reads some of these details, like EXP41. This is from linear's you know documentation and GH 412. So in this case, it is the GitHub issue and then the document as well like docs as well, it reads and then it replies according to the cited source of information. So this is how it has run, it does two things. One is it verifies who has approved, and also it creates the traces back so that even after something has happened, some reply has been happened, you can able to go back and trace back if some incident or anything happened because of that, or even for the human to approve, if they wanted to understand how this reply has happened, they will be able to read it. Now, what has been reduced in this case, instead of human going and finding what reply need to be drafted, or what is the solution for that, everything has been taken care of by the AI agent. But the final step, instead of directly sending the email, the email sending process again, it's a mock at this point, it is replying to just GitHub. but in actual scenario, the support ticket will send an email. That is where the human comes into picture, and human will read only the specific parts of it, like what they exactly need to know related to that issue. They don't need to know the entire history of what has happened or what has been done, they just need to read the traces and they find okay, this is fine, and I will approve and go from there.
This lesson comes with Pro, $149 a year: Get Pro. This lesson is cut from the free Lightning session Build a Mission Control for AI Agents. The Live Labs build the same system with you, free, on Thursdays: see the Live Labs.
