⏱️ Time to complete: 10 minutes
Let's set up your development environment for building AI agents with Microsoft Agent Framework.
By the end of this phase, you will:
- Create a Python virtual environment
- Install required packages
- Set up your project structure
Before starting, ensure you have:
- Python 3.10 or higher installed
- A code editor (VS Code recommended)
- Terminal/command line access
- A GitHub account
Open your terminal and check your Python version:
python --versionYou should see Python 3.10 or higher. If not, download Python.
Create a new folder for the workshop:
mkdir agent-framework-workshop
cd agent-framework-workshopCreate an isolated Python environment:
python -m venv .venvActivate it:
| OS | Command |
|---|---|
| macOS/Linux | source .venv/bin/activate |
| Windows (CMD) | .venv\Scripts\activate.bat |
| Windows (PowerShell) | .venv\Scripts\Activate.ps1 |
You'll know it's active when you see (.venv) at the start of your terminal prompt.
💡 Tip: To exit the virtual environment later, simply run
deactivate.
Create a file called requirements.txt with our core dependencies:
touch requirements.txtAdd the following content:
# Microsoft Agent Framework (preview)
agent-framework==1.0.0b260107
# Web UI
chainlit>=2.9.4
# Environment variables
python-dotenv>=1.2.1
# HTTP client for tools
httpx>=0.28.0
# OpenAI async client (for GitHub Models)
openai>=2.14.0
Install the packages:
pip install -r requirements.txtOr using uv (faster):
uv pip install -r requirements.txtThis installs:
- agent-framework - Microsoft's AI agent framework
- chainlit - Chat UI framework
- python-dotenv - Environment variable management
- httpx - HTTP client for API calls
- openai - OpenAI client (used with GitHub Models)
Create a .env file for secrets:
touch .envAdd this template (we'll fill it in next phase):
# GitHub Models API Token
GITHUB_TOKEN=your_token_here
# WeatherAPI Key (for Phase 5)
WEATHER_API_KEY=your_key_here
⚠️ Important: Never commit.envto git! Add it to.gitignore.
Your folder should look like this:
agent-framework-workshop/
├── .venv/ # Virtual environment
├── .env # Environment variables (secrets)
└── requirements.txt # Dependencies
| Check | Status |
|---|---|
| Python 3.10+ installed | ☐ |
| Virtual environment created and activated | ☐ |
| Dependencies installed | ☐ |
.env file created |
☐ |
You're all set up! Let's connect to AI models.
👉 Next: Phase 2: GitHub Models
Make sure Python is in your PATH. Try python3 --version on macOS/Linux.
Use python -m pip install -r requirements.txt instead.
On Windows PowerShell, you may need to run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser