Home / Insights / AI Agents and Automation

AI Agents and Automation

Writing Requirements for an AI Agent: Tasks, Boundaries, Success Criteria and Fallbacks

Traditional requirements describe what software must do. Requirements for an AI agent also have to describe what it must never do, how good is good enough, and what happens when it is unsure. This guide gives product owners and QA leads a structure for writing agent requirements that a team can build, test and sign off.

TopicsAI Agents and Automation

Key takeaways

  • Write agent requirements in four parts: the task, the boundaries, the success criteria and the fallbacks. Gaps in any one of them tend to surface as surprises after launch.
  • Define boundaries as an explicit allow-list of tools, data and actions, with permissions enforced in the systems the agent calls, not only in the prompt.
  • Success criteria must be measurable on a written evaluation set before build starts; ‘it should be accurate’ is not a requirement.
  • Every agent needs designed fallbacks: when to ask a clarifying question, when to hand over to a human, and how to fail safely without leaving work half done.
  • Treat the requirements as a living document tied to evaluation results, and review them whenever the model, tools or workflow change.

When a team builds a conventional feature, the requirements say what the system does when a user clicks a button, and QA checks that it does exactly that. An AI agent is different. It decides which steps to take, calls tools on its own, and produces outputs that vary from run to run. A requirement like “the agent processes refund requests” leaves almost every important question unanswered: which requests, using which systems, up to what amount, measured how, and what happens when the request is ambiguous.

This article is for product owners, operations leads, CTOs and QA leads who are about to commission or build their first agent and need a requirements document that developers can build from and testers can sign off. I write it from the PM and QA side: the questions below are the ones we work through with clients during discovery for AI agent development, before anyone writes a prompt. The structure has four parts: task, boundaries, success criteria and fallbacks, followed by acceptance testing and a checklist.

Why agent requirements need a different structure

OpenAI’s white paper Practices for Governing Agentic AI Systems describes agentic systems as those that can pursue complex goals with limited direct supervision, and treats agenticness as a matter of degree. That framing is useful for requirements work. The more freedom an agent has to choose steps and act, the more of your requirements document has to be about limits, measurement and recovery rather than features.

Three properties drive the difference:

  • Non-determinism: the same input can produce different outputs, so a single passing test proves little. Requirements must be stated as rates over a representative set of cases.
  • Autonomy over steps: you specify the goal and the allowed means, not every step. Anything not explicitly excluded may eventually be attempted.
  • Action in real systems: once an agent can write to a CRM, send an email or update a ticket, errors have consequences outside the conversation.
Requirement areaConventional featureAI agent
BehaviourExact steps and outputsGoal, allowed tools, constraints and quality thresholds
AcceptancePass or fail per test casePass rates over an evaluation set, plus zero-tolerance cases
Error handlingValidation messages and exceptionsUncertainty detection, clarifying questions, human handover
SecurityRole-based access for usersLeast privilege for the agent itself, approval gates for actions
Change controlCode releasesCode, prompts, model versions and tool definitions

Action: before drafting, agree with stakeholders where the agent sits on the spectrum from “suggests, human acts” to “acts, human reviews later”. That one decision shapes every section that follows.

Part 1: Defining the task precisely

The task definition answers: what job does the agent do, for whom, starting from what, and ending where? Vague task statements are a frequent cause of scope creep in agent projects, because a capable model will happily attempt adjacent work.

Elements of a good task definition

  1. Trigger: what starts the task (a new email in a shared inbox, a ticket in a queue, a user request in an app).
  2. Inputs: what information the agent receives and in what formats, including attachments and their limits.
  3. Goal state: what “done” looks like in the target system, for example “ticket categorised, priority set, routed to the correct queue, with a summary note”.
  4. In-scope variations: the request types the agent must handle, ideally with their approximate share of volume.
  5. Out-of-scope cases: request types the agent must recognise and pass on rather than attempt.
  6. Users and stakeholders: who receives the output, who reviews it, and who owns the process.

A worked example (illustrative)

For example, a 40-person insurance broker might want an agent that handles inbound policy document requests. A weak task statement says “answer customer emails about policies”. A usable one says: “When an email arrives in the documents inbox from a verified client address, identify the policy and document type requested, retrieve the current document from the policy system, and draft a reply with the document attached for a staff member to approve. Requests for changes to cover, claims or complaints are out of scope and must be routed to the service queue unchanged.”

The second version tells the developer which systems to integrate, tells the tester which cases to include, and tells the business exactly what it will and will not get. If you are scoping several candidate tasks, our article on AI agents for IT service desks shows how splitting work into narrow tasks such as password resets and access requests keeps each one testable.

Part 2: Setting boundaries on tools, data and actions

Boundaries are the requirements most often left implicit, and the ones that matter most when something goes wrong. The OWASP Top 10 for LLM Applications names Excessive Agency as a distinct risk and traces it to three root causes: excessive functionality (tools that can do more than the task needs), excessive permissions (access broader than required) and excessive autonomy (high-impact actions without independent verification). Your requirements should address each one directly.

Write an explicit allow-list

  • Tools: list each tool the agent may call and the specific operations allowed, for example “read policy record by ID” and “create draft email”, not “policy system access” or “email access”. OWASP advises avoiding open-ended tools such as arbitrary shell commands or URL fetching where a narrow purpose-built tool will do.
  • Data: which records, fields and documents the agent may read, and which it must never see, such as payment details or health information outside its task.
  • Actions: classify each action as read-only, reversible write or irreversible. Irreversible actions (sending externally, payments, deletions) need an approval step or should be excluded from the first release.
  • Limits: rate limits, maximum steps per task, maximum spend per task and time-outs.

Enforce boundaries outside the model

A requirement that only lives in the system prompt is a suggestion, not a control. OWASP recommends enforcing authorisation in downstream systems rather than relying on the model to decide what is allowed, and running actions under the scope of the specific user where possible. Write requirements such as “the agent’s service account has read-only access to the policy database” so they can be verified in a security review.

Action typeExampleSuggested control
ReadLook up order statusAllowed; scoped credentials; logged
Reversible internal writeSet ticket categoryAllowed with audit log and sampling review
External communicationSend email to customerDraft only, or human approval before send
Financial or irreversibleIssue refund, delete recordHuman approval required, or out of scope for release 1

Part 3: Writing measurable success criteria

“The agent should be accurate and helpful” cannot be tested. Success criteria need a metric, a threshold, a test set and a method of judging. The NIST AI Risk Management Framework (January 2023) places measurement alongside governing, mapping and managing risk; in requirements terms that means deciding how you will measure before you build.

Layers of success criteria

  • Task completion: the share of in-scope cases where the agent reaches the correct goal state without human correction. Example: at least 85% of document requests in the evaluation set produce a correct draft with the right attachment.
  • Correct refusal and routing: the share of out-of-scope cases correctly passed on. This often matters more than completion; an agent that confidently mishandles a complaint does more harm than one that routes it.
  • Zero-tolerance errors: cases that must never happen in testing, such as sending a document to the wrong client or exposing another customer’s data. These are pass or fail, not rates.
  • Efficiency: time to completion, number of steps and cost per task, with ceilings.
  • User experience: for drafts reviewed by staff, the share approved without edits, and reviewer feedback.

The thresholds in the example above are illustrative; set yours against the current human baseline. Measure how staff perform today on the same cases, including their error rate, before deciding what the agent must achieve.

Build the evaluation set into the requirements

Attach a representative evaluation set to the requirements document: real, anonymised cases covering common requests, edge cases and out-of-scope examples, each with the expected outcome. Decide who judges ambiguous outputs and with what rubric. Our guide to evaluation sets, regression checks and human review covers how to build and maintain this set as part of your release process.

Part 4: Designing fallbacks and escalation

Every agent will meet cases it cannot handle. The requirements must say what it does then. Google’s People + AI Guidebook chapter on errors and graceful failure recommends giving users a path forward, explaining limitations specifically, and returning control to a human with the information they need to take over. For an agent, that translates into explicit fallback requirements.

Fallback types to specify

  1. Clarify: when input is ambiguous but resolvable, ask one specific question. Define when this is allowed (for example, internal users only) and the maximum number of questions before handover.
  2. Hand over: route the case to a named queue or person with a summary of what the agent found and did. Specify the handover format so the human does not start from scratch.
  3. Stop safely: on tool errors, time-outs or step limits, stop without partial writes, or roll back. Specify what “safe” means for each workflow.
  4. Refuse: for requests outside policy, decline with a clear explanation and an alternative route.

Triggers for fallback

  • Low confidence in classification or extraction, where the model or a separate check can signal it.
  • Conflicting or missing data in source systems.
  • Any action that crosses an approval threshold.
  • Detection of sensitive topics such as complaints, legal threats or vulnerability indicators.

The OpenAI white paper also stresses that agents should be interruptible: users should be able to stop an agent at any point. Write that as a requirement, including who can pause the agent in production and how quickly.

Turning requirements into acceptance tests and sign-off

Requirements are only useful if QA can check them. For each requirement, write how it will be verified and by whom.

RequirementVerification methodOwner
Task completion at or above thresholdRun full evaluation set; score with agreed rubricQA with business reviewer
Out-of-scope cases routedDedicated out-of-scope subset, 100% reviewedQA
Zero-tolerance errors absentTargeted adversarial and edge-case tests, including prompt injection in inputsQA and security
Permissions enforcedAttempt disallowed actions directly against tools and APIsSecurity reviewer
Fallbacks workSimulated tool failures, time-outs and ambiguous inputsQA
Actions logged and attributableInspect audit logs for sample runsOperations

Run each case more than once

Because outputs vary, run key cases several times and report consistency, not a single result. A case that passes four times out of five is a different risk from one that passes every time.

Plan a staged release

Start in shadow mode, where the agent proposes actions that staff carry out, then move to approval mode, and only then consider autonomy for low-risk actions. Each stage should have its own exit criteria in the requirements. Remember that switching models changes behaviour; if you are comparing providers, our model evaluation method explains how to rerun the same set against each candidate.

A requirements checklist for your first agent

Use this as the outline of your requirements document. If any item is blank, the project is not ready to build.

Task

  • Trigger, inputs and goal state described in one paragraph.
  • In-scope request types listed, with rough volumes.
  • Out-of-scope types listed, with where each should go.

Boundaries

  • Tool allow-list with specific operations.
  • Data the agent may and may not access.
  • Every action classified as read, reversible write or irreversible, with controls.
  • Permissions enforced in downstream systems; service account scopes documented.
  • Limits on steps, time and cost per task.

Success criteria

  • Human baseline measured on the same cases.
  • Thresholds for completion, routing, efficiency and reviewer approval.
  • Zero-tolerance error list.
  • Evaluation set attached, with expected outcomes and a scoring rubric.

Fallbacks

  • Clarify, hand over, stop safely and refuse behaviours specified.
  • Fallback triggers listed.
  • Handover format agreed with the receiving team.
  • Pause and shutdown procedure, with named owners.

Operations

  • Audit logging of every tool call and decision.
  • Monitoring metrics and alert thresholds for production.
  • Change control covering prompts, models and tools, with re-testing on every change.
  • Review date for the requirements themselves.

Frequently asked questions

How long should an AI agent requirements document be?

For a first, narrowly scoped agent, a focused document of a few pages plus an attached evaluation set is usually enough. Length matters less than completeness: every section of the checklist should have a concrete answer, and the evaluation set should cover real cases including out-of-scope ones.

Who should write the requirements: the business or the developers?

Both. The process owner defines the task, success criteria and acceptable risk; engineers and security define how boundaries are enforced; QA defines how each requirement is verified. In our projects the product owner leads the document and QA reviews every requirement for testability before sign-off.

How many cases do we need in the evaluation set?

Enough to cover each in-scope request type, the main edge cases and the out-of-scope types with several examples each. A practical starting point is often one or two hundred real, anonymised cases and grow the set from production feedback. Expand it whenever you find a new failure.

Can we rely on the system prompt to enforce boundaries?

No. Prompts guide behaviour but can be overridden by unexpected inputs, including prompt injection in emails or documents. OWASP recommends limiting tools and permissions and enforcing authorisation in the downstream systems, so a disallowed action fails even if the model attempts it.

What should happen when the agent’s accuracy drops after launch?

Your requirements should define monitoring thresholds that trigger action, such as moving the agent back to approval mode or pausing it. Investigate with the evaluation set, add the new failure cases, fix and re-test before restoring autonomy.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. OpenAI: Practices for Governing Agentic AI Systems (white paper, December 2023) — accessed 9 November 2026. Definition of agentic systems; practices including constraining the action space, requiring approval, legibility, attributability and interruptibility.
  2. OWASP Top 10 for LLM Applications v1.1: LLM08 Excessive Agency — accessed 9 November 2026. Root causes (excessive functionality, permissions, autonomy) and mitigations such as minimal tools, scoped permissions, human approval and downstream authorisation.
  3. Google People + AI Guidebook: Errors and Graceful Failure — accessed 9 November 2026. Providing paths forward, explaining limitations, returning control to a human and collecting feedback after errors.
  4. NIST: AI Risk Management Framework (released January 2023) — accessed 9 November 2026. Voluntary framework structuring AI risk work around govern, map, measure and manage.

Need help turning an agent idea into requirements your team can test?

We run short discovery workshops that map the workflow, tools, permissions and review points, and produce a requirements document with an evaluation set and a measurable pilot plan.