đ€  For pipe admins
đ Â Available on all plans with AI Credits
đŻ Â For those who have already created an AI Agent and want to refine its behavior
Â
An AI Agent without a custom instruction acts like a new colleague with no briefing: it does something, but rarely the right way for your process. It interprets, assumes and delivers inconsistent results. The problem is not the AI, it is the absence of criteria.
Configuring instructions is not writing a creative prompt. It is encoding the operational policy of your process: what the agent does, how it responds, in what format it delivers and when it escalates to a human. By the end of this article, you will know how to write instructions that make the agent predictable, auditable and truly useful.
Â
đ What you'll understand here:
Â
From the generic agent to the specialist
The difference between a generic agent and a specialist is in the instruction. An agent without a custom instruction uses only the card context to decide what to do. An agent with a well-defined instruction acts within a clear scope, with specific criteria and standardized behavior.
Think of the instruction as a colleague's scope. When you hire someone for ticket triage, you do not just say "resolve the tickets". You explain what is urgent, what language to use with the client, when to escalate to level 2 and how to record the resolution. The agent's instruction is exactly that: the set of criteria that defines its work.
Â
What a custom instruction controls:
- Tone and language in the responses to the requester.
- Decision criteria: when to approve, reject or escalate.
- Output format: how the agent fills the card fields.
- Scope limit: what the agent does and what it passes to a human.
Â
Anatomy of a good instruction
An effective instruction has four components. They do not need to appear in this order, but all of them need to be present when the process requires precision.
Â
Context
What this process is and what the agent's role is within it. Without context, the agent infers. With context, it acts within the correct scope.
Example: "You work in the IT ticket triage process. Your role is to classify the urgency of each ticket received and route it to the correct queue."
Â
Decision criteria
The rules the agent should apply to make decisions. The more specific, the more predictable the result.
Example: "Classify as urgent when the ticket mentions loss of access to critical systems, a production failure or impact on more than 5 users. Classify as normal in the other cases."
Â
Output format
How the agent should fill the card fields. Specify the exact values when the field is a select field.
Example: "Fill the @Urgency field with the values 'High', 'Medium' or 'Low'. Fill the @Summary field with a sentence of up to 20 words describing the problem."
Â
Scope limit
What the agent should not do. Explicit is better than implicit.
Example: "Do not respond to the requester directly. Do not move the card to the resolution phase. Only classify and fill the fields."
Â
 Instructions with concrete examples of what is expected generate more consistent results than abstract instructions. If the @Summary field should have up to 20 words, say so. If the tone should be formal, give an example sentence in the correct tone.
Â
Defining what the agent can and cannot do
Each agent behavior can run up to 3 actions per trigger: update fields, create a card, move the card to another phase, create a record or create a connected card. If the process requires more than 3 actions for the same trigger, split it into a second behavior or combine it with a complementary automation.
The scope limit should be explicit in the instruction. Agents without a limit tend to overstep the scope when the context is ambiguous. An instruction that says "analyze the document and fill the fields" may result in the agent also moving the card, if that is not explicitly forbidden.
Â
A single AI Agent can have up to 5 behaviors configured, each with its own trigger and instruction. Use separate behaviors for situations with different triggers, not to increase the number of actions of the same trigger.
Â
The instruction is also the right place to define the behavior in cases of ambiguity. If the agent cannot determine the urgency of a ticket with the available information, what should it do? Fill in with "Undefined"? Escalate to a human? Leave the field blank? If the instruction does not say, the agent decides on its own.
Â
Testing and refining
After saving the agent, test it with real cards before activating it at scale. Pipefy records the agent's activity in two places: in the card's Activities tab, to see the result of each run, and in the automation Logs, to investigate failures and unexpected behaviors.
The refinement cycle is: run, check the result, adjust the instruction, run again. The two most common errors are:
Â
- Field filled with an incorrect value: the instruction did not specify the values accepted by the field. Add the exact values the field accepts, especially in select fields.
- Agent ran an action beyond the scope: the instruction had no explicit limit. Add a sentence like "run only these actions and no others".
Â
The agent's Description field is not just informative. The AI uses this description to improve performance. Write a description that explains the agent's purpose precisely, not just the name of the process.
Â
Instruction examples by use case
IT ticket triage
You work in IT ticket triage. Read the @Problem description field.
Classify as urgent if there is loss of access, a production failure or impact on more than 5 users.
Fill @Urgency with "High", "Medium" or "Low". Fill @Category with the type of problem.
Do not move the card. Do not respond to the requester.
Â
Resume analysis for recruiting
Read the file in @Resume. Compare it with the job requirements in your knowledge base.
If the profile meets 70% or more of the mandatory requirements, fill @Result with "Approved".
If it does not meet them, fill in with "Rejected" and @Reason with an objective sentence.
Do not create cards and do not move the current card.
Â
Purchase request categorization
Read the @Item description and @Requested amount fields.
Classify in @Category: "Office supplies", "IT", "Services" or "Other".
If the amount exceeds R$ 10,000, fill @Requires managerial approval with "Yes". Otherwise, fill in with "No".
Do not change any other field.
Â
Each agent run consumes 2 AI credits. If the behavior includes reading documents (PDF), consumption is 3 credits per run. Monitor consumption in Admin panel > Usage statistics > AI credits.
Â
Before proceeding, confirm that you understand:
â The four components of an effective instruction
â The difference between an action limit and a decision criterion
â How many actions and behaviors an agent can have
â How to check the agent's results in the logs
â How to refine the instruction when the agent makes mistakes


