Implementation:Microsoft Agent framework Pyproject Workspace Configuration
| Knowledge Sources | |
|---|---|
| Domains | Build_System, Python_Packaging, CI_CD |
| Last Updated | 2026-02-11 17:00 GMT |
Overview
Root workspace configuration file for the Microsoft Agent Framework Python monorepo, defining the meta-package, workspace members, shared tooling rules, and CI/CD task automation.
Description
The pyproject.toml at the Python root defines the agent-framework meta-package (version 1.0.0b260210) that depends on agent-framework-core[all]. It configures a uv workspace with all sub-packages under packages/ as members, mapping approximately 20 workspace sources (a2a, ag-ui, azure-ai, anthropic, bedrock, chatkit, etc.). It also establishes shared configurations for ruff (linting and formatting), pytest (test discovery), pyright (strict type checking), mypy, bandit (security scanning), and coverage. A comprehensive set of poethepoet tasks orchestrate installation, formatting, linting, type-checking, building, publishing, and sample validation across the entire monorepo.
Usage
Reference this file when setting up the development environment, adding new sub-packages to the workspace, modifying shared linting or formatting rules, or understanding how CI/CD tasks are orchestrated across the Python monorepo.
Code Reference
Source Location
- Repository: Microsoft_Agent_framework
- File: python/pyproject.toml
- Lines: 1-362
Signature
[project]
name = "agent-framework"
description = "Microsoft Agent Framework for building AI Agents with Python."
requires-python = ">=3.10"
version = "1.0.0b260210"
dependencies = [
"agent-framework-core[all]==1.0.0b260210",
]
[tool.uv.workspace]
members = [ "packages/*" ]
[tool.poe.tasks]
install = "uv sync --all-packages --all-extras --dev -U --prerelease=if-necessary-or-explicit"
test = "python scripts/run_tasks_in_packages_if_exists.py test"
fmt = "python scripts/run_tasks_in_packages_if_exists.py fmt"
lint = "python scripts/run_tasks_in_packages_if_exists.py lint"
pyright = "python scripts/run_tasks_in_packages_if_exists.py pyright"
build = ["build-packages", "build-meta"]
check = ["check-packages", "samples-lint", "samples-syntax", "test", "markdown-code-lint"]
Import
# Install the meta-package (pulls in all core dependencies)
pip install agent-framework
# Or for development setup using uv and poethepoet
poe setup
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| project.name | string | Yes | Package name published to PyPI |
| project.version | string | Yes | Semantic version of the meta-package |
| project.dependencies | array | Yes | Core dependency on agent-framework-core[all] |
| tool.uv.workspace.members | array | Yes | Glob patterns for workspace sub-packages |
| tool.uv.sources | table | Yes | Maps sub-package names to workspace sources |
| tool.ruff.lint.select | array | Yes | Linting rule categories to enable |
| tool.pytest.ini_options.testpaths | array | Yes | Glob patterns for test discovery |
Outputs
| Name | Type | Description |
|---|---|---|
| Meta-package | Distributable | Published agent-framework package on PyPI |
| Workspace resolution | Lock file | Resolved dependencies for all sub-packages |
| poe tasks | CLI commands | install, test, fmt, lint, pyright, build, check, publish |
Usage Examples
Development Setup
# Clone the repository
git clone https://github.com/microsoft/agent-framework.git
cd agent-framework/python
# Full setup: creates venv, installs all packages, installs pre-commit hooks
poe setup
# Or step by step
poe venv --python 3.13
poe install
poe prek-install
Running Quality Checks
# Run all checks (formatting, linting, type checking, tests, markdown lint)
poe check
# Run individual checks
poe fmt # Auto-format code
poe lint # Run ruff linter
poe pyright # Type checking with pyright
poe test # Run all tests
Building and Publishing
# Build all packages
poe build
# Publish to PyPI
poe publish