mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
8ad66637d8
* Python: fix prek runner running fmt/lint in all packages on core change When a core package file changed, run_tasks_in_changed_packages.py ran fmt, lint, and pyright in ALL 22 packages (66 tasks). Only type-checking tasks (pyright, mypy) need to propagate to all packages since type changes in core affect downstream packages. File-local tasks (fmt, lint) only need to run in packages with actual file changes. This reduces a core-only change from 66 tasks to 24 tasks (2 local + 22 pyright). Also adds no-commit-to-branch builtin hook to protect the main branch from direct commits. * Python: add agent skills extracted from AGENTS.md and coding standards Add 5 skills to python/.github/skills/ following the Agent Skills format: - python-development: coding standards, type annotations, docstrings, logging - python-testing: test structure, fixtures, running tests, async mode - python-code-quality: linting, formatting, type checking, prek hooks, CI - python-package-management: monorepo structure, lazy loading, versioning - python-samples: sample structure, PEP 723, documentation guidelines * Python: deduplicate AGENTS.md and instructions with agent skills * updated skills * fixes from review * Python: increase timeout for web search integration test
3.8 KiB
3.8 KiB
AGENTS.md
Instructions for AI coding agents working in the Python codebase.
Key Documentation:
- DEV_SETUP.md - Development environment setup and available poe tasks
- CODING_STANDARD.md - Coding standards, docstring format, and performance guidelines
- samples/SAMPLE_GUIDELINES.md - Sample structure and guidelines
Agent Skills (.github/skills/) — detailed, task-specific instructions loaded on demand:
python-development— coding standards, type annotations, docstrings, logging, performancepython-testing— test structure, fixtures, async mode, running testspython-code-quality— linting, formatting, type checking, prek hooks, CI workflowpython-package-management— monorepo structure, lazy loading, versioning, new packagespython-samples— sample file structure, PEP 723, documentation guidelines
Maintaining Documentation
When making changes to a package, check if the following need updates:
- The package's
AGENTS.mdfile (adding/removing/renaming public APIs, architecture changes, import path changes) - The agent skills in
.github/skills/if conventions, commands, or workflows change
Quick Reference
Run uv run poe from the python/ directory to see available commands. See DEV_SETUP.md for detailed usage.
Project Structure
python/
├── packages/
│ ├── core/ # agent-framework-core (main package)
│ │ ├── agent_framework/ # Public API exports
│ │ └── tests/
│ ├── azure-ai/ # agent-framework-azure-ai
│ ├── anthropic/ # agent-framework-anthropic
│ ├── ollama/ # agent-framework-ollama
│ └── ... # Other provider packages
├── samples/ # Sample code and examples
├── .github/skills/ # Agent skills for Copilot
└── tests/ # Integration tests
Package Relationships
agent-framework-corecontains core abstractions and OpenAI/Azure OpenAI built-in- Provider packages (
azure-ai,anthropic, etc.) extend core with specific integrations - Core uses lazy loading via
__getattr__in provider folders (e.g.,agent_framework/azure/)
Package Documentation
Core
- core - Core abstractions, types, and built-in OpenAI/Azure OpenAI support
LLM Providers
- anthropic - Anthropic Claude API
- bedrock - AWS Bedrock
- claude - Claude Agent SDK
- foundry_local - Azure AI Foundry Local
- ollama - Local Ollama inference
Azure Integrations
- azure-ai - Azure AI Foundry agents
- azure-ai-search - Azure AI Search RAG
- azurefunctions - Azure Functions hosting
Protocols & UI
- a2a - Agent-to-Agent protocol
- ag-ui - AG-UI protocol
- chatkit - OpenAI ChatKit integration
- devui - Developer UI for testing
Storage & Memory
Infrastructure
- copilotstudio - Microsoft Copilot Studio
- declarative - YAML/JSON agent definitions
- durabletask - Durable execution
- github_copilot - GitHub Copilot extensions
- purview - Data governance
Experimental
- lab - Experimental features