Lab E1A : Declarative Agent Foundation with Agent Builder
Prerequisites
- Access to Microsoft 365 Copilot Chat
- Permission to create and edit agents in your tenant
Exercise 1: Create your first agent
- Open https://m365.cloud.microsoft/chat/.
- In the left pane, go to Agents -> Create agent.
- Paste this prompt:
Create a declarative agent named Zava Onboarding Assistant.
It helps new Zava Insurance employees with common HR and IT onboarding questions.
Keep the tone warm, concise, and practical.
Focus on office locations, helpdesk support, annual leave, benefits, and mandatory onboarding tasks.
- Review generated details and select Create.
Exercise 2: Define persona and instructions
- Open your agent in Edit mode.
- Set identity:
- Name: Zava Onboarding Assistant
- Description:
Helps new Zava Insurance employees find answers to common HR and IT onboarding questions.
- Update instructions with clear:
- Persona
- Scope boundaries
- Guardrails (no fabrication)
- Tone (warm and concise)
Use this starter instruction block:
# Zava Onboarding Assistant
## Role
You are a friendly HR and IT onboarding assistant for new employees at Zava Insurance.
## Scope
- Office locations and access
- IT helpdesk process and hours
- Leave, benefits, and onboarding tasks
## Guardrails
- Do not invent policy details.
- If information is missing, say what is unknown and provide a safe next contact.
## Tone
- Warm, concise, practical.
- Then select Create/Update as per your UI.
To enter Edit mode, select Agents in the left navigation, choose your agent from the list, open the ... menu, and then select Edit.
Exercise 3: Add grounding and verify retrieval
- Download Zava New Hire Logistics.docx.
- Open your agent in Edit mode, go to Knowledge and upload
Zava New Hire Logistics.docx. - Save or update the agent.
- Validate with prompts:
- "Where is the badge pickup desk and what time does it open?"
- "If a new hire is locked out, what fallback should they use?"
Expected result:
- Response includes Floor 1, Reception B and opening time 8:15 AM.
- Response includes +1-800-ZAVA-ITS and Badge Assist fallback.
Exercise 4: Enable Code Interpreter and test charts
- Open your agent in Edit mode.
- Go to Capabilities.
- Ensure Create documents, charts, and code is enabled.
- Select Save or Update.
Run these prompts:
- "Given 20 annual leave days and 260 working days per year, calculate leave percentage and show the result in a 2-row table."
- "Create a 2-week onboarding checklist with columns: Day, Task, Owner, Priority."
- "Using that 2-week checklist, create a bar chart of tasks by owner and add a one-paragraph summary of workload balance."
Expected result:
- Agent returns a table for leave percentage.
- Agent returns a checklist table with the requested columns.
- Agent returns a readable chart and short workload summary.
Before wider rollout, document:
- Pilot audience (5-15 users)
- Included knowledge sources
- Enabled capability (Code Interpreter)
- Content owner for updates
- Weekly review cadence
Exercise 5: Run a focused test matrix
Run these prompts and mark pass/fail:
- Grounding check: "Where is badge pickup and when does it open?"
- Policy check: "How do I request annual leave?"
- Boundary check: "Tell me about Zava stock options."
- Capability check: reuse the Code Interpreter chart prompt.
Pass criteria:
- Grounding answers match uploaded document details.
- Policy answers are concise and in scope.
- Boundary answers do not fabricate and include a safe redirect.
- Capability output uses table/chart correctly without overriding policy boundaries.
Exercise 6: Iterate with one controlled change
- Reopen your agent instructions and add:
The staff canteen at Seattle HQ is on floor 2. It is open Mon-Fri 7:30am-3pm.
- Save/update the agent.
- Ask: "Is there a canteen at HQ?"
- Confirm the new answer appears without regressing previous behavior.
Complete
You can now continue to Lab E1B — Declarative Agent Foundation with Agents Toolkit for the pro-code jump.
CONGRATULATIONS!