Lesson 2 of 6
Designing an agent: goal, instructions, tools, boundaries
10 min
Listen to this lesson
Most weak agents are weak on paper before anyone opens the builder. Elena and Maria spend a morning writing the design: what the agent is for, what it must never do, which tools it gets, and when it hands over to a person. SAP's best practices for Joule agents say the same thing in builder terms: be clear and specific, use step-by-step logic, avoid conflicting rules, and restrict the toolset to what the job needs.
The agent design canvas
| Element | Question | Fleet Order Status agent |
|---|---|---|
| Goal | What outcome, for whom? | Give O2C clerks a correct status for a fleet customer's order in one answer |
| Users | Who may use it? | Maria's O2C team in sales area 1710 / 10 / 00; not customers directly |
| Inputs | What does a request contain? | Sales order number, customer PO number (e.g. GLF-PO-55120) or customer name |
| Tools | What may it read or change? | Read: order, delivery, billing status. Change: none directly; may start an expedite request process |
| Knowledge | What documents ground it? | Contoso's fleet service policy and shipping cut-off times |
| Boundaries | What must it refuse? | Price changes, credit decisions, anything for company code 1910 |
| Escalation | When does a human take over? | Credit block, missing order, customer complaint, or two failed lookups |
| Success | How will we know it works? | Evaluation set accuracy and time saved (lesson 5) |
Write the canvas before you write instructions; each row becomes a field, a tool, or a test case.
From canvas to the agent editor
In the classic agent builder you choose Create > Joule Agent, give a name and a description, and fill three text fields. SAP's tutorial explains that the description helps Joule decide when to activate the agent, so it must be specific and business-oriented. Expertise is a short summary of what the agent is good at. Instructions are the step-by-step behavior: what to collect first, how to evaluate results, how to conclude. Additional Context carries tone and rules. Together with the tool descriptions, these four elements form the agent's prompt, as course sap-ai-201 explained.
- Expertise: "You help Contoso Motor Co. order-to-cash clerks find the current status of fleet customer sales orders in sales area 1710 / 10 / 00."
- Instructions: "1. Identify the sales order from the order number or the customer purchase order number. 2. Retrieve order status. 3. If the order has a credit or delivery block, stop and escalate. 4. Otherwise retrieve delivery and billing status. 5. Answer with document numbers, quantities and dates. 6. Offer an expedite request only if delivery is not yet goods-issued."
- Additional Context: "Be brief and factual. Never promise delivery dates the documents do not show. Do not discuss prices, discounts or credit limits. If a request concerns company code 1910, say it is out of scope."
Tools and boundaries
The toolset is the hard boundary. An agent can only do what its tools allow, however its instructions are phrased, so Elena gives it read skills for status and one process skill that requests an expedite rather than changing the delivery. Write-capable tools need a confirmation step: SAP's skill guidance calls a confirmation before any create, update or delete a critical requirement. Keep tool descriptions precise, because the model chooses tools from their descriptions; two tools with overlapping descriptions produce random choices.
Designing the handover
Escalation is a feature, not a failure. Write down who receives the handover, through which channel, and what the agent passes on so the person does not start from zero: the order number, what the agent already looked up, the reason for escalation and the clerk’s question in the clerk’s words. For Contoso, credit blocks go to the credit team’s queue and complaints go to the O2C supervisor. The agent then tells the clerk who has the case and what happens next. Test the handover content as carefully as the answers: an escalation with missing details simply moves the work to someone else.
What would you do?
Maria wants the agent to release credit blocks for Great Lakes Fleet Services when the clerk asks, "because the customer always pays." What should Elena do?
- Write a design canvas: goal, users, inputs, tools, knowledge, boundaries, escalation, success.
- The agent editor's description, Expertise, Instructions and Additional Context plus tool descriptions form the prompt.
- The toolset is the real boundary: restrict it; write actions need confirmation; high-exposure actions stay out.
- Every branch of intended behavior becomes an evaluation case.
Check your understanding · not graded
Lesson check
1. Why does the agent description matter in the classic agent builder?
2. What is the most reliable way to stop an agent from changing prices?
3. Which field holds the step-by-step behavior the agent should follow?
4. Two tools have overlapping descriptions. What problem is most likely?