Session 5: Build AI-Powered Agents Fast with Foundry Local
Abstract
Design and orchestrate multi-role AI agents leveraging Foundry Local’s low-latency, privacy-preserving runtime. You’ll define agent roles, memory strategies, tool invocation patterns, and execution graphs. The session introduces scaffolding patterns you can extend with Chainlit or LangGraph. Starter project extends the existing agent architecture sample to add memory persistence + evaluation hooks.
Learning Objectives
- Define Roles: System prompts & capability boundaries
- Implement Memory: Short-term (conversation), long-term (vector / file), ephemeral scratchpads
- Scaffold Workflows: Sequential, branching, and parallel agent steps
- Integrate Tools: Lightweight function tool calling pattern
- Evaluate: Basic trace + rubric-driven outcome scoring
Prerequisites
- Sessions 1–4 completed
- Python with
foundry-local-sdk,openai, optionalchainlit - Local models running (at least
phi-4-mini)
Cross-Platform Environment Snippet
Windows:
powershell
py -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install foundry-local-sdk openaimacOS:
bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install foundry-local-sdk openaiIf running agents from macOS against a remote Windows host service:
bash