Writing Instructions and Defining an Agent’s Role

 Writing Instructions and Defining an Agent’s Role
Lesson 5 

Course 4: AI Agents: From Basics to Building Practical Agents
Module 2: Planning and Building Your First Agent

Introduction

An AI agent needs more than a task to perform. It needs clear instructions explaining what it should do, how it should behave, and what limits it must follow.

Think about hiring a new employee. You would explain their job responsibilities, expected behaviour, working methods, and the results you expect.

An AI agent needs similar guidance.

In this lesson, you will learn how to define an agent’s role, write effective instructions, establish boundaries, and guide its behaviour through a well-structured instruction set.

1. What Are AI Agent Instructions?

Instructions are directions that tell an AI agent how to perform its assigned responsibilities.

They explain:

  • What role the agent has.

  • What tasks it should perform.

  • Who it is helping.

  • How it should communicate.

  • What information it should use.

  • What actions it should avoid.

For example, consider an AI learning assistant.

A general instruction might be:

“Help students learn about artificial intelligence.”

This is a starting point, but it is too broad. It does not explain the agent’s responsibilities or how it should help students.

A better instruction would be:

“You are an AI learning assistant for beginners. Explain artificial intelligence concepts in simple English, provide practical examples, answer learning questions, and guide students through educational resources. Avoid unnecessary technical language.”

The second instruction gives the agent a clearer identity and direction.

2. Defining an Agent’s Role

The role describes the identity and primary responsibility of an AI agent.

It answers a simple question:

Who is this agent, and what is its main responsibility?

Examples of agent roles include:

Agent Defined Role
Customer Support Agent Helps customers with common questions and service information
Research Agent Collects and organizes relevant information
Writing Agent Helps users prepare and improve written content
Learning Assistant Explains subjects and guides students
Marketing Agent Assists with marketing content and campaign planning

A clearly defined role helps prevent confusion and keeps the agent focused on its purpose.

Example: Learning Assistant

Weak role:

“You are a helpful AI.”

Better role:

“You are an educational assistant who helps beginners understand AI concepts through simple explanations, practical examples, and step-by-step guidance.”

The second version establishes a specific responsibility.

3. Five Important Elements of Effective Instructions

When writing instructions for an AI agent, consider these five elements.

A. Role

Tell the agent who it is.

Example:

“You are an experienced educational assistant specializing in beginner-friendly AI learning.”

B. Goal

Explain what the agent should achieve.

Example:

“Your goal is to help beginners understand AI concepts and develop practical digital skills.”

C. Tasks

List the activities the agent should perform.

Example:

  • Explain AI concepts.

  • Answer students’ questions.

  • Provide practical examples.

  • Recommend relevant learning lessons.

  • Create simple practice exercises.

D. Communication Style

Explain how the agent should communicate.

Example:

  • Use simple English.

  • Keep explanations clear and organized.

  • Use examples wherever helpful.

  • Avoid unnecessary technical terminology.

  • Maintain a friendly and professional tone.

E. Boundaries

Define what the agent should not do.

Example:

  • Do not invent information.

  • Do not present uncertain information as fact.

  • Do not request unnecessary personal information.

  • Do not provide unrelated recommendations.

  • Ask for clarification when a question is unclear.

Boundaries help keep an agent’s responses appropriate and reliable.

4. How to Write Better Instructions

Good instructions should be clear, specific, organized, and easy to understand.

Consider these practical guidelines:

1. Use direct language

Instead of writing:

“Try to help people with different learning needs.”

Write:

“Explain each topic according to the learner’s level of understanding.”

2. Avoid vague instructions

Instead of:

“Give good answers.”

Write:

“Provide accurate, relevant answers supported by simple examples.”

3. Break complex responsibilities into smaller tasks

If an agent has several responsibilities, list them separately.

4. Define the expected output

Tell the agent whether you expect a short explanation, a numbered list, a summary, or step-by-step instructions.

5. Explain when the agent should ask questions

If important information is missing, instruct the agent to ask the user for clarification instead of guessing.

5. A Practical Example: Building an AI Success Academy Learning Assistant

Let’s create an instruction set for a beginner-friendly educational assistant.

Imagine that visitors to AI Success Academy want help understanding artificial intelligence, exploring courses, and finding learning resources.

We can define the agent as follows.

Agent Name

AI Success Academy Learning Assistant

Role

You are an educational assistant for AI Success Academy, an online learning platform.

Main Goal

Help beginners understand artificial intelligence and develop practical AI skills.

Responsibilities

  1. Explain AI concepts in simple English.

  2. Answer questions about beginner AI topics.

  3. Guide learners towards relevant courses and lessons.

  4. Suggest practical exercises.

  5. Explain unfamiliar technical terms.

  6. Help learners identify suitable learning resources.

Communication Style

  • Use simple and friendly English.

  • Organize answers with headings and examples.

  • Explain difficult concepts step by step.

  • Be encouraging and professional.

  • Avoid unnecessarily long answers.

Boundaries

  • Do not invent course information.

  • Do not claim that a resource exists unless it has been verified.

  • Do not make unsupported promises about AI tools.

  • Ask questions when a learner’s request is unclear.

  • Respect user privacy.

Expected Output

Provide clear explanations, practical examples, and relevant learning suggestions.

This instruction set gives our imaginary learning assistant a defined role, goal, responsibilities, communication style, and boundaries.

Notice that we have not yet connected it to external tools or given it permission to perform actions. Those are separate stages of agent building.

6. A Reusable Instruction Template

You can use the following template when planning your own AI agent.

AI Agent Instruction Template

Agent Name: [Enter the agent’s name]

Role: You are [describe the agent’s identity and responsibility].

Goal: Your main objective is to [describe the desired result].

Tasks:

  1. [First responsibility]

  2. [Second responsibility]

  3. [Third responsibility]

Audience: You are helping [identify the intended users].

Communication Style: Use [describe the preferred tone and language].

Boundaries:

  • Do not [identify restricted behaviour].

  • Avoid [identify unwanted actions].

  • Ask for clarification when necessary.

Output Format: Present your responses as [explanations, lists, reports, or another format].

This template can be adapted for customer support agents, research agents, writing assistants, marketing agents, and educational agents.

7. Common Mistakes When Writing Agent Instructions

Beginners often make the following mistakes:

Mistake 1: Giving the agent too many responsibilities

An agent with an unclear or excessively broad role may produce inconsistent results.

Solution: Begin with one main purpose and a manageable set of responsibilities.

Mistake 2: Using vague instructions

Instructions such as “be intelligent” or “do everything perfectly” do not explain what the agent should actually do.

Solution: Describe specific tasks and expected behaviour.

Mistake 3: Forgetting boundaries

Without clear restrictions, an agent may attempt actions beyond its intended responsibility.

Solution: Define what the agent can and cannot do.

Mistake 4: Ignoring the audience

An agent designed for technical professionals may communicate poorly with beginners.

Solution: Identify the intended users and adjust the language accordingly.

Mistake 5: Never testing the instructions

Instructions may appear good on paper but produce unexpected responses in practice.

Solution: Test different questions, review the answers, and improve the instructions.

8. Testing and Improving Your Instructions

After writing instructions, test the agent with several realistic questions.

For our Learning Assistant, we might ask:

  1. What is artificial intelligence?

  2. Explain machine learning using a simple example.

  3. Which lesson should a complete beginner start with?

  4. Can you explain a technical term in simple English?

  5. What should I do if I do not understand a lesson?

Review the responses.

Ask yourself:

  • Did the agent understand its role?

  • Were the answers relevant?

  • Was the language suitable for beginners?

  • Did it follow the instructions?

  • Did it respect its boundaries?

If the answers are not satisfactory, revise the instructions and test again.

Remember: Building a useful AI agent is an iterative process. You write instructions, test behaviour, identify weaknesses, and improve the design.

9. Practical Exercise

Now it is your turn to write instructions for a simple AI agent.

Your task: Design an AI Study Assistant for students.

Define the following:

  1. Agent Name

  2. Role

  3. Main Goal

  4. Three Main Tasks

  5. Communication Style

  6. Two Boundaries

  7. Expected Output

You can use the reusable instruction template from this lesson.

After writing your instructions, test them by asking the agent three questions that a student might ask.

Compare the responses and identify one improvement.

10. Key Takeaways

In this lesson, you learned that:

  • Instructions define how an AI agent should behave.

  • The role establishes the agent’s identity and responsibility.

  • A clear goal gives the agent direction.

  • Specific tasks explain what the agent should do.

  • Communication guidelines improve the user experience.

  • Boundaries help prevent inappropriate or unsupported behaviour.

  • Testing and improving instructions are essential parts of agent development.

Remember: A powerful AI model does not automatically make a useful AI agent. Clear instructions help turn its capabilities into focused and purposeful behaviour.

Conclusion

Writing instructions is one of the most important stages in planning an AI agent.

Before connecting tools, configuring permissions, or building complex workflows, define what your agent is supposed to do.

Start with a clear role, establish a specific goal, list its responsibilities, choose an appropriate communication style, and define its boundaries.

Then test and improve the instructions.

In the next lesson, we will explore another important part of agent development: Understanding Knowledge, Tools, and Permissions.

You will learn how agents use information, interact with external tools, and operate within defined permissions.

Keep learning, keep experimenting, and start building your first practical AI agent!

Lesson 4 | course 4 | Lesson 6

Scroll to Top