Domain 2 β€” Module 5 of 11 45%
13 of 27 overall
Domain 2: Implement Generative AI and Agentic Solutions Free ⏱ ~14 min read

Agent Fundamentals: Roles, Goals & Tools

AI agents don't just chat β€” they plan, reason, and take action. Learn how to define agent roles, set goals, design conversation tracking, and configure tool schemas in Microsoft Foundry.

What makes an agent different?

Simple explanation

A chat model answers questions. An agent gets things done.

Think of the difference between asking a colleague β€œHow do I book a meeting room?” (chat) versus asking β€œBook Meeting Room B for Tuesday at 2pm, invite the marketing team, and send them the agenda” (agent). The agent understands the goal, figures out the steps, uses the right tools, and completes the task.

In Foundry, an agent is a model + instructions + tools + memory, working together to achieve goals autonomously.

The four pillars of an agent

New here? This course follows four teams: πŸ₯ NeuralMed (health-tech startup), 🏦 Atlas Financial (enterprise bank), πŸš€ MediaForge (content ops platform), and πŸ‘¨β€πŸ’» Kai (AI engineer at a logistics company). They’re introduced in Module 1.

PillarWhat It DefinesExample
RoleThe agent’s identity, expertise, and personality”You are a senior compliance analyst at Atlas Financial. You are thorough, cautious, and always cite regulations.”
GoalsWhat the agent should achieve”Review loan applications for regulatory compliance and produce assessment reports.”
Conversation trackingHow context is maintainedThread-based β€” each loan review is a separate thread with its own history
Tool schemasWhat actions the agent can performsearch_regulations, check_applicant_history, generate_assessment, flag_for_review

Defining agent roles (system instructions)

The role definition is the most critical part of an agent. It sets:

ComponentPurposeExample
IdentityWho is this agent?”You are NeuralMed’s patient information assistant.”
ExpertiseWhat does it know about?”You specialise in general health information from our medical knowledge base.”
BoundariesWhat should it NOT do?”Never provide specific diagnoses. Always direct patients to their doctor for medical advice.”
ToneHow should it communicate?”Be empathetic, clear, and use simple language. Avoid medical jargon.”
RulesOperational constraints”Always cite the source article. If unsure, say so.”
Exam tip: Role vs goal

The exam distinguishes between:

  • Role = WHO the agent is (system instructions defining identity, expertise, boundaries)
  • Goal = WHAT the agent should accomplish (the outcome it works toward)

A well-defined role prevents the agent from going off-script. A clear goal keeps it focused on the task.

Tool schemas

A tool schema tells the agent what functions it can call, what parameters they accept, and what they return:

Schema ElementWhat It SpecifiesExample
Function nameWhat the tool is calledsearch_knowledge_base
DescriptionWhen the agent should use it”Search the medical knowledge base for articles matching the query”
ParametersInput the function acceptsquery (string, required), max_results (integer, optional)
Return typeWhat comes backArray of articles with title, content, and relevance score
Good vs poor tool schema design
FeatureGood Tool SchemaPoor Tool Schema
Namesearch_regulations(query, jurisdiction, year_range)search(q)
DescriptionSearch regulatory database for compliance regulations matching the query within specified jurisdiction and year rangeSearch stuff
Parametersquery: string (required) β€” the regulatory topic to search forq: string
WhyAgent understands exactly when and how to use itAgent guesses when to use it and may pass wrong arguments

Conversation tracking approaches

ApproachHow It WorksBest For
Thread-basedEach conversation gets a unique thread ID with its own historyMulti-turn interactions, customer service
StatelessNo history preserved β€” each request is independentOne-shot tasks, high-volume processing
Session-basedHistory preserved for a session duration, then clearedTime-limited interactions
PersistentHistory and learned facts preserved across sessionsPersonal assistants, long-term relationships
Real-world example: Kai's logistics agent design

Kai designs a shipping assistant agent:

  • Role: β€œYou are a shipping logistics assistant for the operations team. You are precise with numbers, proactive about delays, and always confirm actions before executing.”
  • Goal: β€œHelp operations staff track shipments, estimate costs, and resolve delivery issues.”
  • Conversation tracking: Thread-based β€” each support ticket gets its own thread
  • Tools:
    • track_shipment(tracking_id) β€” returns current status and location
    • estimate_cost(origin, destination, weight, service_level) β€” calculates shipping cost
    • flag_delay(shipment_id, reason) β€” alerts the dispatch team
    • search_policies(query) β€” searches shipping policy docs

Key terms

Question

What is a tool schema in agent design?

Click or press Enter to reveal answer

Answer

A structured definition of a function the agent can call, including its name, description, parameters, and return type. Well-designed schemas help the agent understand when and how to use each tool.

Click to flip back

Question

What is the Responses API?

Click or press Enter to reveal answer

Answer

The successor to the Assistants API in Microsoft Foundry. It's the API for building and interacting with AI agents, supporting tool calling, conversation management, and memory. All new agent development uses this API.

Click to flip back

Question

What is thread-based conversation tracking?

Click or press Enter to reveal answer

Answer

Each conversation gets a unique thread ID with its own message history. The agent can reference earlier messages in the thread. New threads start fresh. Used for multi-turn interactions like customer service.

Click to flip back

Question

What are agent boundaries in role definition?

Click or press Enter to reveal answer

Answer

Explicit constraints in the system instructions that define what the agent should NOT do. Boundaries prevent the agent from overstepping its intended scope β€” critical for responsible AI and user trust.

Click to flip back

Knowledge check

Knowledge Check

NeuralMed's patient assistant sometimes provides specific diagnoses despite being told not to. Which agent component should they strengthen?

Knowledge Check

Atlas Financial's compliance agent needs to call a function that searches regulations. The agent sometimes passes the wrong parameters, causing errors. What's the most effective fix?