The Core of AI Task Definition: Six Fields
Deploying AI agents, especially those with access to tools and data, requires meticulous setup. A common pitfall is providing vague instructions, leading to unintended consequences. Mehmet Kocaba, a developer, proposes a straightforward, six-field "task card" that acts as a critical control layer before an AI agent is granted any operational capabilities. This system, born from personal experience with a near-disastrous e-commerce automation, emphasizes clarity and control.
The six fields are:
- goal: The primary objective of the task.
- may read: Specifies which data or systems the agent can access for reading information.
- may write: Defines the data or systems the agent is permitted to modify.
- ask me before: Lists specific actions or decisions that require human approval.
- stop if: Sets conditions under which the agent must halt execution.
- show me: Indicates what information or results the agent should present to the user.
This minimalist approach, typed into a simple notes application, aims to prevent agents from becoming "clever systems" with "foggy jobs and far too many keys." It’s about establishing guardrails from the outset.
Learning Through a Costly Mistake
Kocaba recounts an early attempt at e-commerce automation. The initial idea was to automate the most time-consuming process. However, upon mapping out the workflow, he realized the task involved sensitive areas like payments and refunds. A single wrong decision by the AI could lead to complex and difficult-to-rectify errors. The potential for a polished-looking but incorrect outcome was a significant risk.
This led to a strategic pivot. Instead of tackling the most complex or time-consuming task, Kocaba opted for a "boring" but safer one: drafting replies to common customer service messages. This initial, low-stakes application proved the value of structured AI task definition. It allowed for learning and iteration without high-risk consequences.
The Rationale Behind Each Field
Each of the six fields serves a distinct purpose in shaping the AI agent's behavior and scope:
Goal: The North Star
This is the most fundamental field. It clearly articulates what success looks like for the task. A well-defined goal prevents the AI from going off on tangents or misinterpreting the overall objective. It is the primary directive that guides all other actions.
May Read: Controlled Information Access
This field acts as a gatekeeper for data retrieval. By explicitly listing what the agent *can* read, developers ensure sensitive information remains protected. It prevents the AI from indiscriminately accessing databases, customer records, or internal documents that are not relevant to the task or are classified.
May Write: The Write Protection Switch
Complementary to "may read," this field dictates where the AI can make changes. This is crucial for preventing accidental data corruption, unauthorized modifications, or the creation of unwanted content. For tasks involving databases, file systems, or external applications, this field is paramount.
Ask Me Before: Human-in-the-Loop Decisions
This field introduces critical human oversight for high-stakes actions. It designates specific operations, such as processing a payment, issuing a refund, deleting a record, or sending a sensitive communication, that require explicit user confirmation. This acts as a vital safety net, preventing autonomous execution of potentially damaging commands.
Stop If: Defining Failure Conditions
This field establishes clear boundaries for when the AI must cease its operation. It can include conditions like encountering an unexpected error, a data anomaly, a security alert, or reaching a state where the goal is no longer achievable. This prevents the agent from continuing to operate in a detrimental or nonsensical state.
Show Me: Transparency and Reporting
This field ensures that the user remains informed about the AI's progress and findings. It specifies what information, logs, or summaries the agent should present. This is vital for auditing, debugging, and understanding the AI's decision-making process. It fosters trust and accountability.
Why This Simple Framework Works
The power of Kocaba's framework lies in its simplicity and universality. It doesn't require complex tooling or deep technical expertise to implement. By forcing the user to think critically about the AI's scope, permissions, and interaction points, it surfaces potential issues early in the development cycle. It's akin to writing a clear, concise job description for an employee before they even start—defining responsibilities, access levels, and reporting requirements.
The "task card" approach shifts the focus from simply telling an AI *what* to do, to carefully defining *how* it can do it, what it can see, what it can change, and when it needs to ask for help. This structured approach minimizes the "blast radius" of any errors and builds a foundation of trust for more complex AI deployments.
Referenced Sources
- verified
