azure-sdk-for-java
AGENTS.md2.6k starsChanged 21 months agoMITView on GitHub
This file provides guidance for AI agents (e.g., GitHub Copilot, Model Context Protocol servers, or other LLM-based assistants) interacting with the Azure SDK for Java repository. The Azure SDK for Java provides developers with libraries for accessing Azure services. The SDK is organized into client libraries, with each library corresponding to an Azure service. The repository follows a specific structure: AI agents interacting with this repository can assist with: Agents should NOT: Most client libraries are generated from TypeSpec specifications…
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about Azure/azure-sdk-for-java
- hashicorp/vault“Add go templating to Identity Policy Templating”GitHub · Mar 9, 2021 · 15 reactions
- spring-projects/spring-data-rest“Circular references problem when using RestTemplateBuilder on custom WebMvcConfigurer”GitHub · Oct 24, 2022 · 7 reactions
- nextflow-io/nextflow“Support Azure Batch as additonal executor”GitHub · Dec 20, 2019 · 7 reactions
- Azure/azure-sdk-for-android“[FEATURE REQ] Support Storage libraries on Android”GitHub · Jan 2, 2023 · 6 reactions
- spring-projects/spring-ai“Support structured output in Azure OpenAI as well”GitHub · Dec 3, 2024 · 5 reactions
The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 12
Talked about on GitHub (12 times).
On GitHub · 12
- Mar 9, 2021Add go templating to Identity Policy Templating — hashicorp/vault15 reactions · 4 comments
- Oct 24, 2022Circular references problem when using RestTemplateBuilder on custom WebMvcConfigurer — spring-projects/spring-data-rest7 reactions · 7 comments
- Dec 20, 2019Support Azure Batch as additonal executor — nextflow-io/nextflow7 reactions · 21 comments
- Jan 2, 2023[FEATURE REQ] Support Storage libraries on Android — Azure/azure-sdk-for-android6 reactions · 1 comment
- Dec 3, 2024Support structured output in Azure OpenAI as well — spring-projects/spring-ai5 reactions · 4 comments
7 more on GitHub
- Jun 26, 2023Azure Cosmos DB: support for hierarchical partition keys — Azure/azure-sdk-for-go5 reactions · 6 comments
- May 15, 2020[FEATURE REQ] Storage Migration Guide — Azure/azure-sdk-for-net5 reactions · 10 comments
- Sep 8, 2021Plugins: [repository-azure] plugin should use Azure Storage SDK v12 for Java — opensearch-project/OpenSearch4 reactions · 6 comments
- Jun 27, 2024[BUG] AcquireTokenSilentSupplier failed: Token not found in the cache — AzureAD/microsoft-authentication-library-for-java3 reactions · 3 comments
- Jul 23, 2021Azure Cosmos DB: Introduce CosmosDBEmulatorContainer — testcontainers/testcontainers-java3 reactions · 29 comments
- Nov 17, 2020Upgrade Azure repository SDK to v12 — elastic/elasticsearch3 reactions · 10 comments
- Dec 17, 2024[FEATURE REQ] Add dataSecurityMode to AzureDatabricksLinkedService — Azure/azure-rest-api-specs2 reactions · 1 comment
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository13 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- agentic-workflowsSkill
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-pipeline-analysisSkill
- azsdk-common-pipeline-fixerSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-breaking-changeSkill
- azsdk-common-sdk-releaseSkill
- azsdk-common-patch-mergebackSkill
- create-package-skillSkill
- find-package-skillSkill
- management-autopr-reviewSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 1 is common, 7 are distinctive, and 2 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 113
Follow semantic versioning: major.minor.patch[-beta.N]
- Very specific: line 114
Use the update_versions.py script for version updates
- Distinctive: line 130
All contributions must follow the Azure SDK Design Guidelines for Java.
- Distinctive: line 134
Idiomatic: Use natural Java patterns (try-with-resources, Streams, Optional)
- Distinctive: line 135
Consistent: Follow consistent naming and design patterns across all libraries
- Distinctive: line 138
Dependable: Ensure reliability through robust error handling and retries
- Distinctive: line 153
Best Practices: Use modern Java features where appropriate
- Common: line 165
Never commit secrets or credentials
- Distinctive: line 166
Use Azure Identity for authentication in samples
- Distinctive: line 167
Follow secure coding practices
≈ “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.
Files
AGENTS.md
This file provides guidance for AI agents (e.g., GitHub Copilot, Model Context Protocol servers, or other LLM-based assistants) interacting with the Azure SDK for Java repository.
Repository Purpose
The Azure SDK for Java provides developers with libraries for accessing Azure services. The SDK is organized into client libraries, with each library corresponding to an Azure service. The repository follows a specific structure:
- Client Libraries: Located in
/sdkdirectory, containing individual service clients - Data plane Libraries: Libraries with Maven group
com.azure - Management Libraries: Libraries with Maven group
com.azure.resourcemanager - Spring Libraries: Libraries with Maven group
com.azure.spring
Repository Structure
/sdk/ # Individual service client libraries
/eng/ # Engineering system files and automation
/doc/ # Documentation
/samples/ # Sample code and tutorials
/.github/ # GitHub-specific configuration
/copilot-instructions.md # Detailed Copilot-specific instructionsAgent Capabilities
Supported Actions
AI agents interacting with this repository can assist with:
- Code Generation and Modification
- Creating new client libraries following Azure SDK design guidelines
- Adding features to existing libraries
- Writing unit and integration tests
- Refactoring code while maintaining backward compatibility
- Documentation
- Writing and updating README files
- Creating JavaDoc comments for public APIs
- Updating CHANGELOG files
- Creating code samples and snippets
- Issue Triage and PR Review
- Analyzing and categorizing issues
- Suggesting labels and assignees
- Reviewing pull requests for adherence to guidelines
- Identifying potential breaking changes
- Build and Test Automation
- Running Maven builds
- Executing unit tests
- Analyzing test failures
- Checking code style with Checkstyle and SpotBugs
- SDK Release Support
- Checking package release readiness
- Updating version numbers following semantic versioning
- Verifying API review status
Boundaries and Limitations
Agents should NOT:
- Disable or modify Checkstyle or SpotBugs rules to resolve linting issues
- Re-record tests as a fix to failing tests
- Make breaking changes to GA'd APIs without explicit approval
- Turn off security checks or introduce security vulnerabilities
- Suggest third-party alternatives to Azure SDK packages in official samples
Key Workflows
Building the SDK
# Build all modules
mvn clean install -DskipTests
# Build a specific module
mvn -f sdk/{service}/pom.xml clean install -DskipTests
# Run tests for a specific module
mvn -f sdk/{service}/pom.xml testRunning Code Quality Checks
# Run Checkstyle
mvn checkstyle:check
# Run SpotBugs
mvn spotbugs:check
# Run both style checks
mvn checkstyle:check spotbugs:checkTesting
# Run unit tests for a specific module (playback by default)
mvn -f sdk/{service}/pom.xml test
# Run live tests for a specific module (requires Azure resources and environment variables)
AZURE_TEST_MODE=LIVE mvn -f sdk/{service}/pom.xml -Dmaven.wagon.http.pool=false --batch-mode --fail-at-end test
# See eng/common/TestResources/New-TestResources.ps1 for setting up test resourcesVersioning
- Version files are located in
/eng/versioning/ - Follow semantic versioning:
major.minor.patch[-beta.N] - Use the
update_versions.pyscript for version updates - See CONTRIBUTING.md for detailed versioning guidelines
SDK Generation
Most client libraries are generated from TypeSpec specifications using tsp-client. To re-generate a library after spec changes, run the following from the module directory (sdk/<service>/<module>/):
# Re-generate SDK from the configured TypeSpec source
tsp-client updateSee TypeSpec Quickstart for details.
Design Guidelines
All contributions must follow the Azure SDK Design Guidelines for Java.
Core Principles
- Idiomatic: Use natural Java patterns (try-with-resources, Streams, Optional)
- Consistent: Follow consistent naming and design patterns across all libraries
- Approachable: Provide clear documentation and intuitive APIs
- Diagnosable: Include comprehensive logging and telemetry
- Dependable: Ensure reliability through robust error handling and retries
API Design Requirements
- Service client classes with "Client" suffix
- Fluent builder patterns for client instantiation
- Synchronous and asynchronous clients (async suffixed with "AsyncClient")
- Options bags for additional parameters (e.g.,
<MethodName>Options) - Standard verbs: create, upsert, set, get, list, delete
- Comprehensive JavaDoc for all public APIs
Java Compatibility
- Baseline: Java 8
- Testing: Up to latest Java LTS (currently Java 21)
- Best Practices: Use modern Java features where appropriate
CI/CD Pipeline
The repository uses Azure Pipelines for continuous integration:
- Each service has a
ci.ymlfile defining its build pipeline - PRs must pass all CI checks before merging
- Daily builds publish to the dev feed at Azure Artifacts
Security and Compliance
- Never commit secrets or credentials
- Use Azure Identity for authentication in samples
- Follow secure coding practices
- Report security issues to secure@microsoft.com
- See SECURITY.md for more information
Contributing
See CONTRIBUTING.md for detailed contribution guidelines, including:
- Pull request requirements
- Code review process
- Testing requirements
- Documentation standards
- Version management
Agent-Specific Instructions
For detailed GitHub Copilot-specific instructions, including behavior guidelines, data sources, and SDK-specific patterns, see .github/copilot-instructions.md.
Resources
Documentation
- Azure SDK for Java Documentation
- Azure for Java Developers
- Azure SDK Design Guidelines
- Java Guidelines
- Building the SDK
Repository Links
External References
Feedback and Questions
- For issues or feature requests, file a GitHub Issue
- For questions, use Stack Overflow with the
azure-java-sdktag - For contributions, see CONTRIBUTING.md
This file aligns with the AGENTS.md standard and provides a comprehensive guide for AI agents interacting with the Azure SDK for Java repository.
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
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.

