Build a Context-Aware Agent
Instructions
In this lab, you will configure the full identity and context stack for an autonomous AI agent. Instead of writing code, you will create the configuration files that transform a generic AI into a personalized, purpose-driven assistant with persistent memory and proactive behavior.
These are the same file types used by real agent harnesses — user profiles, identity definitions, soul configurations, memory systems, and heartbeat schedules. By the end of this lab, you will have a complete agent context stack ready for deployment.
Architecture Overview
┌─────────────────────────────────────────────────┐
│ Agent Context Stack │
│ │
│ ┌──────────┐ ┌──────────────┐ ┌───────────┐ │
│ │ user.md │ │ identity.md │ │ soul.md │ │
│ │ (who you │ │ (what the │ │ (how it │ │
│ │ are) │ │ agent is) │ │ behaves) │ │
│ └──────────┘ └──────────────┘ └───────────┘ │
│ │
│ ┌──────────────┐ ┌─────────────────────────┐ │
│ │ memory.md │ │ heartbeat.yaml │ │
│ │ (persistent │ │ (proactive scheduled │ │
│ │ knowledge) │ │ triggers and actions) │ │
│ └──────────────┘ └─────────────────────────┘ │
└─────────────────────────────────────────────────┘
Scenario
You are configuring an agent for Nadia Qadir, a freelance content strategist who manages multiple client blogs, social media accounts, and content calendars. She needs an agent that understands her work, communicates the way she prefers, remembers ongoing projects, and proactively checks for tasks without being asked.
Use this scenario throughout all five files. The details should be consistent — the agent's identity should reference the user, the soul should reflect the user's communication preferences, the memory should contain facts about the user's projects, and the heartbeat should automate tasks relevant to the user's workflow.
Step 1: User Profile (user.md)
Create a comprehensive user profile for Nadia. This file teaches the agent who it serves. Include the following sections using markdown headers:
- Personal information: Name, role, timezone
- Communication style: At least 3 preferences for how Nadia likes to receive information (e.g., concise bullet points, no jargon, tables for comparisons)
- Current projects: At least 3 active projects with brief descriptions (e.g., client names, content types, deadlines)
- Goals: At least 3 professional goals for the current quarter
- Preferences: At least 3 tool/workflow preferences (e.g., preferred writing tools, scheduling habits, content formats)
Use YAML-style key-value pairs within a markdown document, similar to the format shown in the course lessons.
Step 2: Agent Identity (identity.md)
Create a concise 5-line identity definition for the agent. This answers the question: "What am I, and what am I here to do?"
Include exactly these five fields:
- name: A creative but professional agent name
- role: What the agent does (one phrase)
- serves: Who the agent serves (reference the user from Step 1)
- mission: A one-sentence mission statement
- style: The agent's communication style (one descriptive phrase)
Keep it concise. The identity file should be brief and focused — five lines of meaningful content, not paragraphs.
Step 3: Soul Configuration (soul.md)
Create the soul configuration that defines the agent's personality, values, and operating boundaries. Include all four sections:
Core Truths
Write at least 4 non-negotiable principles the agent must always follow. These should be specific to a content strategist's assistant (e.g., accuracy in published content, respecting client confidentiality, never publishing without approval).
Autonomy Levels
Define three tiers of autonomy with at least 3 items each:
- autonomous: Actions the agent can take without asking (e.g., researching topics, drafting outlines, checking analytics)
- requires_approval: Actions that need explicit permission (e.g., publishing posts, sending client emails, scheduling meetings)
- never_allowed: Actions the agent must never take (e.g., sharing client data between accounts, making financial commitments, accessing personal accounts)
Communication Vibe
Define at least 5 communication parameters (e.g., tone, humor, disagreement handling, bad news delivery, default format).
Continuity Rules
Write at least 4 rules for how the agent handles session restarts, context gaps, and ongoing work.
Step 4: Memory File (memory.md)
Create a structured memory file with three distinct sections:
Permanent Facts
Include at least 6 persistent facts about the user, their clients, or their workflow that the agent should always know.
Project Notes
Include at least 4 project-specific notes with status updates, decisions made, or next steps. Reference the projects mentioned in the user file.
Daily Log
Include at least 3 example daily log entries with dates and specific actions taken. Use the format: YYYY-MM-DD: description of what happened.
Step 5: Heartbeat Configuration (heartbeat.yaml)
Create a heartbeat configuration that makes the agent proactive. Include:
- interval_minutes: Set an appropriate check interval
- on_heartbeat: A list of at least 5 steps the agent performs on each heartbeat cycle. Each step should have:
step: A descriptive nameaction: What the agent does during this step- At least one step should have a
conditionfield (e.g.,only_if_actionable)
- notification_rules: At least 3 rules defining when and how the agent should notify the user (e.g., urgent items via direct message, weekly summaries via email, silence when nothing is actionable)
What to Submit
The editor has 5 file sections with TODO comments. Replace each TODO with your configuration content. The AI grader will evaluate each section against the rubric.
Hints
- Keep the user profile detailed but realistic — think about what a real content strategist would need their agent to know
- The identity file should be exactly 5 lines of key-value pairs, not a long document
- Soul configuration is where you encode the "personality" — make it specific, not generic
- Memory should feel like a real working document with specific dates, names, and facts
- The heartbeat should automate tasks that a content strategist would actually benefit from (checking content calendars, monitoring analytics, reviewing drafts)