---
title: "How do you make an AI agent check its prerequisites before it acts?"
description: "Put the check in the tool call, not the system prompt: a required field the agent must answer honestly. The Proof of Work pattern we use in Kazi."
url: "https://kazi.apifunnel.ai/answers/make-an-ai-agent-check-prerequisites-before-it-acts"
updated: "2026-11-14"
---

# How do you make an AI agent check its prerequisites before it acts?

Put the check in the tool call itself, as a required field the agent has to fill in at the moment it acts, instead of a reminder buried in the system prompt. We call it the Proof of Work pattern and use it in Kazi: the tool takes an enum with two values, verified or not verified. If the agent picks not verified, the code stops the call.

## Why the system prompt fails here

"IMPORTANT: always check X before calling Y" sits at the top of context. Forty thousand tokens into a chain of tool calls, it's background noise. The model isn't ignoring you. It's focused on the step in front of it.

## The pattern

Add a required parameter to the tool's schema with two values: VERIFIED_SAFE_TO_PROCEED and NOT_VERIFIED_UNSAFE_TO_PROCEED. Describe the second one as what a careless assistant would pick.

When the agent builds the call, it has to choose. The models want to do a good job, really want to, and to honestly pick the good value it has to have done the check. The check happens at the exact moment it matters.

If it ever picks the negative value, your code catches it and short-circuits with "verify the prerequisites first." A hard stop, no interpretation.

## What it doesn't replace

It's a steering technique, not a security boundary. Anything that must never happen without permission, like writing through a read-only connection, belongs in a platform check the model can't talk its way past. The full write-up, with code: [The Proof of Work pattern](https://kazi.apifunnel.ai/blog/proof-of-work-pattern).

## Related questions

- [Do positive instructions work better than prohibitions in agent prompts?](https://kazi.apifunnel.ai/answers/positive-instructions-vs-prohibitions-in-agent-prompts)
- [How do I give an AI agent read-only access to my business apps?](https://kazi.apifunnel.ai/answers/give-an-ai-agent-read-only-access-to-business-apps)
- [How do you stop MCP tool definitions from filling an agent's context window?](https://kazi.apifunnel.ai/answers/stop-mcp-tool-definitions-filling-the-context-window)
