
Python Package Management
Manage uv/poethepoet workflows when you add, version, or release packages in the Agent Framework Python monorepo.
Install
npx skills add https://github.com/microsoft/agent-framework --skill python-package-managementWhat is this skill?
- Documents monorepo layout: root agent-framework, packages/core, and provider connector packages
- Standardizes uv + poethepoet setup: poe setup, poe install, poe venv, and targeted uv lock upgrades
- Covers creating new connector packages, versioning, and the lazy-loading extension pattern
- Clarifies dependency graph: core abstractions vs provider packages vs root meta-package
Adoption & trust: 33 installs on skills.sh; 11.2k GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Microsoft Foundrymicrosoft/azure-skills
Azure Aimicrosoft/azure-skills
Azure Hosted Copilot Sdkmicrosoft/azure-skills
Lark Eventlarksuite/cli
Running Claude Code Via Litellm Copilotxixu-me/skills
Setup Matt Pocock Skillsmattpocock/skills
Journey fit
Primary fit
Package and connector lifecycle work happens while extending the agent framework codebase, not during launch or ops monitoring. The skill documents monorepo layout, connector packages, lazy-loading, and release mechanics—core agent-tooling maintenance for framework authors.
Common Questions / FAQ
Is Python Package Management safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Python Package Management
# Python Package Management ## Monorepo Structure ``` python/ ├── pyproject.toml # Root package (agent-framework) ├── packages/ │ ├── core/ # agent-framework-core (main package) │ ├── foundry/ # agent-framework-foundry │ ├── anthropic/ # agent-framework-anthropic │ └── ... # Other connector packages ``` - `agent-framework-core` contains core abstractions and OpenAI/Azure OpenAI built-in - Provider packages extend core with specific integrations - Root `agent-framework` depends on `agent-framework-core[all]` ## Dependency Management Uses [uv](https://github.com/astral-sh/uv) for dependency management and [poethepoet](https://github.com/nat-n/poethepoet) for task automation. ```bash # Full setup (venv + install + prek hooks) uv run poe setup # Install dependencies from lockfile (frozen resolution with prerelease policy) uv run poe install # Create venv with specific Python version uv run poe venv --python 3.12 # Intentionally upgrade a specific dependency to reduce lockfile conflicts uv lock --upgrade-package <dependency-name> && uv run poe install # Refresh all dev dependency pins, lockfile, and validation in one run uv run poe upgrade-dev-dependencies # First, run workspace-wide lower/upper compatibility gates uv run poe validate-dependency-bounds-test # Defaults to --package "*"; pass a package to scope test mode uv run poe validate-dependency-bounds-test --package core # Then expand bounds for one dependency in the target package uv run poe validate-dependency-bounds-project --mode both --package core --dependency "<dependency-name>" # Repo-wide automation can reuse the same task uv run poe validate-dependency-bounds-project --mode upper --package "*" # Add a dependency to one project and run both validators for that project/dependency uv run poe add-dependency-and-validate-bounds --package core --dependency "<dependency-spec>" ``` ### Dependency Bound Notes - Stable dependencies (`>=1.0`) should typically be bounded as `>=<known-good>,<next-major>`. - Prerelease (`dev`/`a`/`b`/`rc`) and `<1.0` dependencies should use hard bounds with an explicit upper cap (avoid open-ended ranges). - For `<1.0` dependencies, prefer the broadest validated range the package can really support. That may be a patch line, a minor line, or multiple minor lines when checks/tests show the broader lane is compatible. - Prefer supporting multiple majors when practical; if APIs diverge across supported majors, use version-conditional imports/paths. - For dependency changes, run workspace-wide bound gates first, then `validate-dependency-bounds-project --mode both` for the target package/dependency to keep minimum and maximum constraints current. The same task can also drive repo-wide upper-bound automation by using `--package "*"` and omitting `--dependency`. - Prefer targeted lock updates with `uv lock --upgrade-package <dependency-name>` to reduce `uv.lock` merge conflicts. - Use `add-dependency-and-validate-bounds` for package-scoped dependency additions plus bound validation in one command. - Use `upgrade-dev-dependencies` for repo-wide dev tooling refreshes; it repins dev dependencies, refreshes `uv.lock`, and reruns `check`, `typing`, and `test`. ## Lazy Loading Pattern Provider folders in core use `__getattr__` to lazy load from connector packages: ```python # In agent_framework/foundry/__init__.py _IMPORTS: dict[str, tuple[str, str]] = { "FoundryChatClient": ("agent_framework_foundry", "agent-framework-foundry"), } def __getattr__(name: str) -> Any: if name in _IMPORTS: import_path, package_name = _IMPORTS[name] try: return getattr(impor