Module 10 Lesson 2: Agent Instructions
·AWS Bedrock

Module 10 Lesson 2: Agent Instructions

Defining the Mission. How to write effective 'Agent Instructions' that guide an autonomous AI through complex workflows.

The Mission Statement: Agent Instructions

The Instruction is the most important part of a Bedrock Agent. It is the "North Star" that the agent follows during its reasoning loop. If your instructions are vague, the agent will get lost or use the wrong tools.

1. Components of a Great Instruction

A professional agent instruction should include:

  • Role: "You are a Travel Booking Concierge."
  • Goal: "Your objective is to help users find and book flights and hotels within their budget."
  • Constraints: "Always confirm the price before booking. Never book if the total exceeds $1,000."
  • Step-by-step logic: "1. Search flights. 2. Suggest top 3. 3. Ask for choice. 4. Process payment."

2. Example: The Support Agent

Instruction: "You are an Customer Support Agent for Vortex Corp. Your mission is to resolve order status queries. Use the 'get_order_status' tool to look up data. If an order is delayed, offer a 10% discount code: SAVE10. Be polite and professional at all times."


3. Visualizing Instruction Enforcement

graph TD
    User[Is my order late?] --> Agent[Agent Brain]
    Agent --> I{Read Instructions}
    I -->|Found Rule| Tool[Call get_order_status]
    Tool -->|Result: Late| I2{Read Late Policy}
    I2 -->|Action| Offer[Offer SAVE10 Code]
    Offer --> Response[User Reply]

4. Why Verbs Matter

When writing instructions for agents, use Direct Verbs:

  • Bad: "You can help with orders."
  • Good: Retrieve order status. Communicate delays. Offer discount codes.

Summary

  • Instructions define the scope and goal of the agent.
  • Clearly defined Roles and Constraints improve reliability.
  • Step-by-step flows help the agent navigate complex tasks.
  • Active Verbs provide better guidance for autonomous reasoning.

Subscribe to our newsletter

Get the latest posts delivered right to your inbox.

Subscribe on LinkedIn