Free Resource · guide

Agents Do the Work, Hooks Make Sure It Happened

At our September AI workshop I walked through the two pieces that turn AI from a helpful chat window into something you can actually trust with real work. Agents are the AI workers you assign to a task, each with its own rules. Hooks are the guardrails that fire automatically, every time, whether the AI remembers to follow the procedure or not. One of those two can forget. The other cannot, and that difference is the whole point of this article.

At the last workshop I covered skills, the standard operating procedures you hand to AI. This session picked up the other two layers: the agents that use those skills, and the hooks that check the work. If skills are the how, agents are the who, and hooks are the “prove it actually happened.”

What is an AI agent, really?

An agent is the AI person you assign to a specific task, with its own rules for how that task gets done. Not a general chatbot you re-explain things to every morning, but a named worker with a written role. The agent carries its instructions, and it calls on skills to do the actual work.

My image reviewer agent is a good example. Every AI generated image that heads for our website goes through it, and its rules are oddly specific because AI image mistakes are oddly specific. Check that the finger count is correct. Check for a natural grip on objects, because sometimes the hand holding the laptop is just limp against it. Check that glasses have exactly two lenses, not three. Those checks live in the agent, permanently, so I never have to remember to ask.

And agents can run in parallel. One agent researches a topic while another drafts the blog article. The research comes back and feeds the writer. A reviewer agent then checks for typos, citations, and whether the images sit in the right places. It works like a small staff, each member with a job description, instead of one assistant juggling everything.

What is a hook, and why can it not be forgotten?

A hook is a rule that fires automatically when something happens, and that automatic part is what makes it different from every instruction you have ever given an AI. When the trigger event occurs, the hook runs. There is no step where the AI decides whether to bother.

That matters because AI instructions get skipped. Anyone who has run multi step procedures with AI has hit this: you gave it the procedure, the step was right there, and it still sailed past. You call it out and get back something like “I know it’s in the procedure, I just forgot this time.” Charming, and useless. An employee who said that weekly would get a performance plan. A hook is how you give the AI one.

Here is my working example. When we publish an article to braintek.com, a hook triggers an SEO audit before anything goes live. The writing agents draft the post, we generate and review the images, and then, every single time, the auditor validates that the page will be found and relevant on Google and in AI search. Not because an agent remembered. Because publishing is the trigger and the audit is the hook.

The line I want you to keep: the AI can forget, a hook cannot.

What can a hook actually save you from?

The honest answer is data loss, and I have a firsthand story. During the workshop Q&A, someone asked about the risk of letting AI touch files on your computer, and one of our engineers answered plainly: it had wiped his machine more than once. In the worst case, the AI was cleaning up a single directory, mistyped one character, landed in the wrong context, and deleted everything his user account had access to.

A hook would have caught it. Set up a rule that says any time you are going to delete something, stop and ask me first. The hook halts the command before it runs. He would have seen the confirmation, said no, I only want this one directory, and the AI would have corrected itself and proceeded. The mistake still happens inside the AI’s head. It just never reaches the disk.

We are an IT company, so I will add the sermon: back up whatever folder AI works in. And know that OneDrive is a synchronizing tool, not a backup. If AI deletes files in a synced folder, that deletion replicates to every device before you notice.

What guardrails belong on an AI that spends money?

The same kind, with a dollar figure attached. A client asked whether AI could go into his email, find all the invoices, and pay them. Absolutely it could. The better question, which I asked back, was: do you want it to?

The workable answer is yes, inside rails. You can pay invoices up to $500, and that is your limit. Then a hook watches every payment, and when the $501 invoice shows up, it stops, escalates to a human, and waits. “What do you want me to do about this one?” The AI keeps the tedious volume, the human keeps the judgment calls, and the hook is the tripwire between them.

That pattern generalizes to anything with consequences. Deletes, payments, emails to clients, changes to production systems. Agents and skills are probabilistic, they do the right thing almost every time. Hooks are the deterministic layer underneath, the part that behaves identically on the ten thousandth run.

How do you get started with agents and hooks?

Ask the AI to build them, then restart your session. You do not hand write these files. Tell Claude, or ChatGPT, “I want a hook that stops any delete and asks me first,” and it builds the file in the correct format and wires it into your settings.

Two practical notes from doing this daily. First, nothing you build loads in the session where you built it. Close out, start a new conversation, then verify the skill, agent, or hook shows up in the loaded list. If it is missing, restart again or dig into why. Second, keep descriptions specific. If two agents or skills overlap, the AI can grab the wrong one, and the fix is a sharper description of exactly when each applies.

Start with one hook on whatever scares you most, probably deletes. Then add an agent for the task you repeat weekly. This is exactly the kind of setup we build with clients: the agents that do the work, and the hooks that make sure it happened.

Want guardrails on the AI your business uses?

Everything in this article came from our own working setup, the same agents and hooks we run every day. If your team is starting to hand real work to AI and you want it done with checkpoints instead of crossed fingers, tell us what you are automating and we will help you build the rails.

By submitting, you agree to be contacted by Braintek about your inquiry.

FAQs

What is the difference between an agent and a hook?

An agent is the AI person assigned to a specific task, carrying its own rules and calling on skills to do the work. A hook is a rule that fires automatically when something happens. The agent does the job; the hook makes sure the job was done right, or stops it before it goes wrong.

Why not just put the rule in the AI's instructions?

Because instructions can be skipped. AI working through a multi step procedure will sometimes miss a step, and when you call it out you get "I know it's in the procedure, I just forgot this time." A hook is not an instruction the AI reads, it is a trigger the system enforces, so it cannot be forgotten.

Do I have to write the hook or agent files myself?

No. Tell Claude or ChatGPT what you want, for example "stop and ask me before any delete," and it will build the correct file and attach it to your settings. You describe the guardrail in plain English and the AI writes its own leash.

Why isn't my new hook or agent working?

The most common reason is that you have not restarted your session. New skills, agents, and hooks do not load in the conversation where you built them. Close out, start a new session, then check the loaded list. If it still is not there, that is when you troubleshoot.

Can a hook really stop an AI from deleting my files?

Yes. A hook set to intercept delete operations halts the command before it executes and asks you first. One of our engineers had an AI mistype one character while cleaning a single directory and wipe everything his user account could access. A delete hook would have stopped at the confirmation instead.

Ready for IT that just works?

Book a no-pressure discovery call. We'll review your setup and show you exactly where you stand.