mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
7e9c043c4c
* Improve PR template and breaking-change label automation - Add a structured "Related Issue" section using GitHub closing keywords - Add a Review Guide prompt (major changes, impact, reviewer focus) with a note that the focus item is for human reviewers only - Add checklist items for issue linkage / no duplicate PRs and invert the breaking-change item (checked = not breaking) - Extend label-title-prefix to prepend [BREAKING] when the "breaking change" label is added - Add label-breaking-change workflow to apply the "breaking change" label when a PR title contains [BREAKING] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add pull-requests agent skill with dotnet/python links - Add root .github/skills/pull-requests/SKILL.md covering PR description authoring (following the PR template) and the review-comment workflow (review -> plan -> user review -> implement -> reply to all -> resolve) - Symlink the skill from python/.github/skills and dotnet/.github/skills - Reference the skill from python/AGENTS.md and dotnet/AGENTS.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fold breaking-change labeling into label-pr workflow Move the title -> 'breaking change' label logic into the existing label-pr workflow (which already applies the python/.NET labels) and drop the separate label-breaking-change workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR title prefix review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Pin patched MessagePack for .NET restore Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert MessagePack central pin Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Move title prefix tests out of tracked GitHub tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Exclude skill docs from CI path filters Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Match skill symlinks in CI path exclusions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Exclude AGENTS docs from CI path filters Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Scope title-prefix normalization to a real prefix The normalization branch in addTitlePrefix matched ^Python (no colon), so titles like "Python samples improvements" or "Pythonic refactor" were treated as already-prefixed and only re-cased, never receiving the "Python: " prefix. Scope the match to ^<prefix>:\s* so only an actual existing prefix is normalized; otherwise the prefix is prepended. Same fix applies to the .NET prefix (e.g. ".NETStandard bump"). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
113 lines
5.5 KiB
Markdown
113 lines
5.5 KiB
Markdown
# AGENTS.md
|
|
|
|
Instructions for AI coding agents working in the Python codebase.
|
|
|
|
**Key Documentation:**
|
|
- [DEV_SETUP.md](DEV_SETUP.md) - Development environment setup and available poe tasks
|
|
- [CODING_STANDARD.md](CODING_STANDARD.md) - Coding standards, docstring format, and performance guidelines
|
|
- [samples/SAMPLE_GUIDELINES.md](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, performance
|
|
- `python-testing` — test structure, fixtures, async mode, running tests
|
|
- `python-code-quality` — linting, formatting, type checking, prek hooks, CI workflow
|
|
- `python-feature-lifecycle` — package vs feature lifecycle stages, decorators, enums, and promotion guidance
|
|
- `python-package-management` — monorepo structure, lazy loading, versioning, new packages
|
|
- `python-samples` — sample file structure, PEP 723, documentation guidelines
|
|
- `pull-requests` — writing PR descriptions (template) and handling/resolving PR review comments
|
|
|
|
## Maintaining Documentation
|
|
|
|
When making changes to a package, check if the following need updates:
|
|
- The package's `AGENTS.md` file (adding/removing/renaming public APIs, architecture changes, import path changes)
|
|
- The agent skills in `.github/skills/` if conventions, commands, or workflows change
|
|
|
|
At the end of every run, re-read `AGENTS.md` and the relevant skill files and
|
|
update any guidance that the conversation revealed to be out of date,
|
|
incomplete, or misleading (renamed files, changed commands, new conventions
|
|
the user confirmed, etc.). **Before adding a new principle or rule, ask the
|
|
user whether they want it captured as a durable principle** — do not invent
|
|
team norms from a single conversation without explicit confirmation.
|
|
|
|
## Terminology
|
|
|
|
- **Avoid "GA" for Agent Framework code.** Reserve *GA* for hosted services
|
|
(e.g. "the Foundry service is GA"). For Agent Framework packages, features,
|
|
and APIs use **"released"** or **"stable"** depending on context — these
|
|
match the feature-lifecycle stages documented in the
|
|
`python-feature-lifecycle` skill.
|
|
|
|
## Pull Request Description Guidance
|
|
|
|
When preparing a PR description:
|
|
- Follow the repository PR template at `.github/pull_request_template.md` and keep its structure/headings.
|
|
- Describe the net change relative to `main` (this is implied; do not call it out explicitly as "vs main").
|
|
- Do not add ad-hoc validation sections (for example, "Validation" or "Tests run"); CI/CD and the template checklist cover validation status.
|
|
|
|
## Quick Reference
|
|
|
|
Run `uv run poe` from the `python/` directory to see available commands. See [DEV_SETUP.md](DEV_SETUP.md) for detailed usage.
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
python/
|
|
├── packages/
|
|
│ ├── core/ # agent-framework-core (main package)
|
|
│ │ ├── agent_framework/ # Public API exports
|
|
│ │ └── tests/
|
|
│ ├── foundry/ # agent-framework-foundry
|
|
│ ├── 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-core` contains core abstractions and OpenAI/Azure OpenAI built-in
|
|
- Provider packages (`foundry`, `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](packages/core/AGENTS.md) - Core abstractions, types, and built-in OpenAI/Azure OpenAI support
|
|
|
|
### LLM Providers
|
|
- [anthropic](packages/anthropic/AGENTS.md) - Anthropic Claude API
|
|
- [bedrock](packages/bedrock/AGENTS.md) - AWS Bedrock
|
|
- [claude](packages/claude/AGENTS.md) - Claude Agent SDK
|
|
- [foundry_local](packages/foundry_local/AGENTS.md) - Azure AI Foundry Local
|
|
- [ollama](packages/ollama/AGENTS.md) - Local Ollama inference
|
|
|
|
### Azure Integrations
|
|
- [foundry](packages/foundry/README.md) - Microsoft Foundry chat, agent, memory, and embedding integrations
|
|
- [azure-contentunderstanding](packages/azure-contentunderstanding/AGENTS.md) - Azure Content Understanding context provider
|
|
- [azure-ai-search](packages/azure-ai-search/AGENTS.md) - Azure AI Search RAG
|
|
- [azure-cosmos](packages/azure-cosmos/AGENTS.md) - Azure Cosmos DB-backed history provider
|
|
- [azurefunctions](packages/azurefunctions/AGENTS.md) - Azure Functions hosting
|
|
|
|
### Protocols & UI
|
|
- [a2a](packages/a2a/AGENTS.md) - Agent-to-Agent protocol
|
|
- [ag-ui](packages/ag-ui/AGENTS.md) - AG-UI protocol
|
|
- [chatkit](packages/chatkit/AGENTS.md) - OpenAI ChatKit integration
|
|
- [devui](packages/devui/AGENTS.md) - Developer UI for testing
|
|
|
|
### Storage & Memory
|
|
- [mem0](packages/mem0/AGENTS.md) - Mem0 memory integration
|
|
- [redis](packages/redis/AGENTS.md) - Redis storage
|
|
|
|
### Infrastructure
|
|
- [copilotstudio](packages/copilotstudio/AGENTS.md) - Microsoft Copilot Studio
|
|
- [declarative](packages/declarative/AGENTS.md) - YAML/JSON agent definitions
|
|
- [durabletask](packages/durabletask/AGENTS.md) - Durable execution
|
|
- [github_copilot](packages/github_copilot/AGENTS.md) - GitHub Copilot extensions
|
|
- [purview](packages/purview/AGENTS.md) - Data governance
|
|
|
|
### Experimental
|
|
- [lab](packages/lab/AGENTS.md) - Experimental features
|
|
- [monty](packages/monty/AGENTS.md) - Monty-backed CodeAct integrations (alpha)
|