← Back to Tutorials

2. Environment Setup

Prerequisites

Installing the MAF SDK

For JavaScript/TypeScript (npm)

mkdir my-agent
cd my-agent
npm init -y
npm install @microsoft/agents @azure/identity

For .NET

dotnet new console -n MyAgent
cd MyAgent
dotnet add package Microsoft.Agents
dotnet add package Azure.Identity

Project Structure

my-agent/
├── src/
│   ├── agent.ts          # Agent definition
│   ├── tools/            # Custom tool implementations
│   └── memory/           # Memory providers
├── config/
│   └── settings.json     # Agent configuration
├── package.json
└── .env               # Environment variables

Course Setup & Lab Enrollment

Many MAF courses include interactive lab environments. To enroll:

  1. Navigate to the lab portal provided by your instructor or course
  2. Sign in with your Microsoft or GitHub account
  3. Select the "Agent Framework Fundamentals" lab module
  4. Follow the setup wizard to provision your sandbox
📘 Note: Lab environments include pre-installed SDKs, sample code, and an Azure sandbox. No credit card required for course labs.

Verifying Your Setup

# Node.js
node -e "const maf = require('@microsoft/agents'); console.log('MAF SDK loaded:', !!maf);"

# .NET
dotnet list package | findstr Agents
✏️ Exercise: Create a new project using the MAF SDK. Initialize a Git repository, create the project structure above, and run the verification command to confirm the SDK loads without errors.