Back to Course|AI Agent Orchestration Mastery: Build, Deploy & Sell Autonomous Systems
Lab

Build a Context-Aware Agent

35 min
Advanced
Unlimited free attempts

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 name
    • action: What the agent does during this step
    • At least one step should have a condition field (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)

Grading Rubric

user.md contains a complete profile with personal information (name, role, timezone), communication style (3+ specific preferences), current projects (3+ with descriptions), goals (3+ professional goals), and preferences (3+ tool/workflow preferences) — all structured with markdown headers and realistic for a content strategist20 points
identity.md contains exactly 5 key-value fields (name, role, serves, mission, style) that are concise, purposeful, and consistent with the user profile — the agent name is creative, the role is specific, serves references the user, mission is one clear sentence, and style describes a communication approach15 points
soul.md includes all four sections: core truths (4+ non-negotiable principles relevant to content strategy), autonomy levels (3 tiers with 3+ items each covering autonomous/requires-approval/never-allowed), communication vibe (5+ parameters like tone, humor, disagreement, bad_news, format_default), and continuity rules (4+ rules for session handling)25 points
memory.md has three structured sections: permanent facts (6+ specific, useful facts about the user/clients/workflow), project notes (4+ entries referencing user.md projects with status updates or decisions), and daily log (3+ entries with YYYY-MM-DD dates and specific content strategy activities)20 points
heartbeat.yaml is valid YAML with interval_minutes set, on_heartbeat containing 5+ steps (each with step name and action description, at least one with a condition field), and notification_rules with 3+ rules defining urgency-based notification behavior — all relevant to a content strategist workflow20 points

Checklist

0/5

Your Solution

Unlimited free attempts
FREE WEEKLY NEWSLETTER

Stay on the Nerd Track

One email per week — courses, deep dives, tools, and AI experiments.

No spam. Unsubscribe anytime.