agentleFS
Microsoft AzureKnown publisherAzure/azure-sdk-for-python/AGENTS.md

azure-sdk-for-python

AGENTS.md5.6k starsChanged 21 months agoMITView on GitHub

This file describes how AI agents (e.g., GitHub Copilot, MCP servers, or LLM-based assistants) should interact with this repository. Purpose: This repository contains the active development of the Azure SDK for Python, providing client libraries and management libraries for Azure services. Scope: - 100+ Python packages for Azure services - Client libraries for data plane operations - Management libraries for Azure Resource Manager (ARM) - Shared core functionality (authentication, retries, logging, transport) - TypeSpec-based SDK generation from API specifications -…

Trending

Quiet since April.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Azure/azure-sdk-for-python repository that our weekly crawl found: only 13 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about Azure/azure-sdk-for-python

The biggest 5 of 13 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 13

Talked about on GitHub, Hacker News and Bluesky (13 times).

On GitHub · 11

6 more on GitHub

On Hacker News · 1

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

24 rules. About 0 are common, 18 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow the complete workflow in .github/copilot-instructions.md

    line 47
  2. Distinctive:

    Use MCP tools for environment verification, code generation, and validation

    line 48
  3. Distinctive:

    Follow official guidelines and existing patterns

    line 53
  4. Distinctive:

    Documentation: Update CHANGELOG.md, README files, and API documentation

    line 56
  5. Distinctive:

    Follow existing formatting conventions

    line 57
  6. Distinctive:

    Static Analysis: Run and fix issues from:

    line 65
  7. Distinctive:

    PR Creation: Create draft PRs with descriptive titles and descriptions

    line 73
  8. Very specific:

    Environment Verification: - Use verify_setup MCP tool

    line 97
  9. Distinctive:

    SDK Generation: - Use azure-sdk-python-mcp generation tools (~2 minutes)

    line 98
  10. Distinctive:

    Static Validation: - Run sequential validation steps (~3-5 minutes each):

    line 99
  11. Distinctive:

    Documentation Update: - Update CHANGELOG.md and version files

    line 103
  12. Distinctive:

    PR Creation: - Create draft PR with generated description

    line 105
  13. Distinctive:

    Avoid adding new dependencies or large refactoring

    line 128
  14. Very specific:

    Use CheckPackageReleaseReadiness MCP tool

    line 134
  15. Distinctive:

    Check build logs for failures

    line 206
  16. Distinctive:

    Use Black for formatting

    line 227
  17. Very specific:

    Test recordings in tests/recordings/

    line 234
  18. Very specific:

    Always verify environment first: - Run verify_setup before SDK operations

    line 286
  19. Distinctive:

    Make minimal changes: - Only modify files with validation errors

    line 288
  20. Distinctive:

    Create draft PRs: - Never create PRs in ready-for-review state

    line 292
  21. Distinctive:

    Report progress frequently: - Use incremental commits

    line 293
  22. Distinctive:

    Don't repeat instructions - reference documentation links

    line 303
  23. Distinctive:

    Use markdown formatting for commands and code

    line 305
  24. Very specific:

    Label: Use Agent label for agent-related issues

    line 313

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md - Azure SDK for Python

This file describes how AI agents (e.g., GitHub Copilot, MCP servers, or LLM-based assistants) should interact with this repository.

Repository Overview

Purpose: This repository contains the active development of the Azure SDK for Python, providing client libraries and management libraries for Azure services.

Scope:

  • 100+ Python packages for Azure services
  • Client libraries for data plane operations
  • Management libraries for Azure Resource Manager (ARM)
  • Shared core functionality (authentication, retries, logging, transport)
  • TypeSpec-based SDK generation from API specifications
  • Comprehensive testing, validation, and documentation infrastructure

Main Branch: main

Key Documentation:

Repository Structure

azure-sdk-for-python/
├── sdk/                    # Service-specific libraries (e.g., sdk/storage/, sdk/ai/)
├── eng/                    # Engineering system tools and configurations
├── doc/                    # Developer documentation and guides
├── scripts/                # Automation scripts
├── .github/                # GitHub workflows, Copilot instructions, skills, and prompts
│   ├── copilot-instructions.md  # Detailed Copilot-specific guidance
│   ├── skills/             # Reusable Copilot skills (e.g., find-package, fix-pylint)
│   └── prompts/            # Copilot prompt files for common tasks
└── tools/                  # Development tools

AI Agent Guidelines

Supported Actions

AI agents can assist with the following activities:

Code Generation & Development

  • TypeSpec SDK Generation: Generate Python SDKs from TypeSpec specifications
    • Follow the complete workflow in .github/copilot-instructions.md
    • Use MCP tools for environment verification, code generation, and validation
    • Time estimate: 10-15 minutes for full generation workflow
  • Code Fixes: Address linting, type checking, and validation issues
    • Pylint, MyPy, Pyright, Verifytypes, Sphinx warnings
    • Follow official guidelines and existing patterns
    • Make minimal, surgical changes
  • Documentation: Update CHANGELOG.md, README files, and API documentation
    • Follow existing formatting conventions
    • Include version information and release dates

Testing & Validation

  • Run Tests: Execute test suites using the azpysdk test runner
    • Unit tests, integration tests, samples
    • Support both local and CI environments
  • Static Analysis: Run and fix issues from:
    • Pylint (code quality)
    • MyPy, Pyright (type checking)
    • Bandit (security)
    • Black (formatting)
    • Sphinx (documentation)

Pull Request Management

  • PR Creation: Create draft PRs with descriptive titles and descriptions
  • PR Review: Analyze PR feedback and make requested changes
  • Status Checks: Monitor CI/CD pipeline status and address failures

Issue Triage & Labeling

  • Issue Analysis: Review and categorize issues
  • Service Labels: Validate and create service labels (e.g., Azure.AI.Projects)
  • CODEOWNERS: Validate and update CODEOWNERS entries

Relationship to Copilot Instructions

This AGENTS.md file is the primary reference for AI agents working in this repository. It follows the AGENTS.md standard that most AI coding tools recognize automatically. For additional Copilot-specific guidance (e.g., TypeSpec generation details, MCP tool usage), see .github/copilot-instructions.md. Reusable skills are available in .github/skills/ and prompt templates in .github/prompts/.

Key Workflows

1. TypeSpec SDK Generation Workflow

Prerequisites:

  • GitHub CLI authenticated (gh auth login)
  • Feature branch (not main)
  • PowerShell installed (for MCP tools)
  • Python virtual environment active

Steps:

  1. Environment Verification - Use verify_setup MCP tool
  2. SDK Generation - Use azure-sdk-python-mcp generation tools (~2 minutes)
  3. Static Validation - Run sequential validation steps (~3-5 minutes each):
    • Pylint, MyPy, Pyright, Verifytypes
    • Sphinx, Mindependency, Bandit, Black
    • Samples, Breaking changes
  4. Documentation Update - Update CHANGELOG.md and version files
  5. Commit & Push - Stage, commit, and push changes
  6. PR Creation - Create draft PR with generated description
  7. Handoff - Provide PR link for azure-rest-api-specs agent

Estimated Time: 10-15 minutes

2. Code Quality Workflow

Running Validation:

# Use azpysdk with appropriate environment from the package directory
azpysdk <environment> .

# Examples:
azpysdk pylint .
azpysdk mypy .

Fixing Issues:

3. SDK Release Workflow

Check Release Readiness:

  • Use CheckPackageReleaseReadiness MCP tool
  • Validates: API review status, changelog, package approval, release date

Release Package:

  • Use ReleasePackage MCP tool
  • Triggers release pipeline (requires approval)

Release Blocking Checks:

  • MyPy: PASS
  • Pylint: PASS
  • Sphinx: PASS
  • Tests - CI: PASS

Automation Boundaries

Safe Operations

✅ Generate SDK code from TypeSpec specifications
✅ Run linting and static analysis tools
✅ Fix code quality warnings (with high confidence)
✅ Update documentation (CHANGELOG, README)
✅ Create and update PRs in draft mode
✅ Run existing test suites
✅ Validate CODEOWNERS entries

Restricted Operations

⚠️ Modifying generated code (requires review)
⚠️ Adding new dependencies (requires justification)
⚠️ Changing API signatures (requires design review)
⚠️ Disabling or removing tests (requires explanation)
⚠️ Large-scale refactoring (requires approval)
⚠️ Modifying CI/CD pipeline definitions (requires explicit human prompting)

Prohibited Operations

❌ Merging PRs without human review
❌ Releasing packages to PyPI
❌ Changing security or authentication logic without security review
❌ Committing secrets or credentials
❌ Force pushing to protected branches

Environment Requirements

Required Tools:

  • Python 3.10 or later
  • Node.js (for TypeSpec generation)
  • azpysdk (test runner and automation)
  • GitHub CLI (for PR operations)
  • PowerShell (for MCP server on Windows)

MCP Server Tools:

  • azure-sdk-python-mcp - Python-specific SDK operations
  • azure-sdk-mcp - Cross-language SDK operations
  • azsdk-tools - Engineering system utilities

Virtual Environment:

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
.venv\Scripts\activate      # Windows

CI/CD Integration

Pipeline System: Azure DevOps

Key Pipelines:

  • Python CI: Core library tests and validation
  • SDK Generation: TypeSpec-based code generation
  • Release: Package publication to PyPI

Status Monitoring:

  • Use get_pipeline_status MCP tool
  • Check build logs for failures
  • Analyze failed tests with get_failed_test_cases tool

Artifact Analysis:

  • Download artifacts with get_pipeline_llm_artifacts
  • Review TRX test results
  • Analyze log files with analyze_log_file tool

SDK-Specific Conventions

Package Naming

  • Client libraries: azure-<service>-<component> (e.g., azure-storage-blob)
  • Management libraries: azure-mgmt-<service> (e.g., azure-mgmt-compute)

Version Conventions

  • Semantic versioning: MAJOR.MINOR.PATCH
  • Preview versions: MAJOR.MINOR.PATCHbN (e.g., 1.0.0b1)
  • Pre-release format in CHANGELOG: ## 1.0.0b1 (YYYY-MM-DD)

Code Style

  • Follow PEP 8
  • Use Black for formatting
  • Type hints required (PEP 484)
  • Docstrings in NumPy/Google style

Testing

  • Use pytest framework
  • Separate live and recorded tests
  • Test recordings in tests/recordings/
  • Environment variables for credentials (never hardcode)

Cross-References

Detailed Copilot Instructions: See .github/copilot-instructions.md for:

  • Complete TypeSpec SDK generation workflow
  • Detailed validation steps and commands
  • Pylint and MyPy fixing guidelines
  • SDK health status interpretation
  • SDK release procedures

Developer Documentation: See doc/dev/ for:

Example Prompts

SDK Generation

"Generate a Python SDK using TypeSpec from tspconfig.yaml at <path>"
"Start TypeSpec SDK generation workflow"
"Generate SDK from my local TypeSpec project at sdk/cognitiveservices/azure-ai-projects"

Validation & Fixes

"Run pylint validation and fix any warnings"
"Check if my SDK passes all static validation steps"
"Fix the mypy errors in the generated SDK"

Release Management

"Check if azure-ai-projects is ready for release"
"What is the health status of azure-storage-blob?"
"Release azure-ai-inference version 1.0.0"

Repository Health

"Show me the health status for azure-ai-projects"
"Which checks are blocking the release of this library?"
"Are there any open customer issues for this package?"

Agent Behavior Guidelines

Best Practices

  1. Always verify environment first - Run verify_setup before SDK operations
  2. Inform users of time expectations - SDK generation takes 10-15 minutes
  3. Make minimal changes - Only modify files with validation errors
  4. Reference official documentation - Link to Azure SDK design guidelines
  5. Run validation iteratively - Fix and rerun each step before proceeding
  6. Use MCP tools when available - Leverage specialized SDK tooling
  7. Create draft PRs - Never create PRs in ready-for-review state
  8. Report progress frequently - Use incremental commits

Error Handling

  • For TypeSpec errors: Direct users to fix in source repository
  • For authentication failures: Guide through gh auth login
  • For missing dependencies: Provide installation instructions with links
  • For validation failures: Reference specific fixing guidelines
  • For pipeline failures: Analyze logs and provide actionable feedback

Communication Style

  • Don't repeat instructions - reference documentation links
  • Be concise and actionable
  • Use markdown formatting for commands and code
  • Provide time estimates for long operations
  • Highlight release-blocking issues clearly

Reporting Issues

To report issues with AI agent interactions or suggest improvements:

  • GitHub Issues: Azure SDK for Python Issues
  • Label: Use Agent label for agent-related issues
  • Include: Agent name/version, prompt used, expected vs actual behavior

Version

AGENTS.md Version: 1.0.0
Last Updated: 2025-01-22
Specification: Follows the AGENTS.md canonical structure

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.