# azure/azure-sdk-for-python architecture

> Architecture diagram of the GitHub repository azure/azure-sdk-for-python, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azure/azure-sdk-for-python
- Repository: https://github.com/azure/azure-sdk-for-python

## Overview

Azure SDK for Python is a collection of service-specific client and management libraries, rather than one application. A developer creates a client, authenticates, and invokes an operation against an Azure service; shared core libraries provide the HTTP pipeline and common policies. The tree also shows agent-server packages, evaluation red teaming, and Cosmos semantic reranking as distinct capabilities. The README documents the shared client and management-library roles; sampled source confirms pipeline execution and several service operations, but does not establish wiring for every package.

Main entry points: [`sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/_base.py`](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/_base.py) (Agent server core), [`sdk/core/azure-core/azure/core/_pipeline_client_async.py`](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/_pipeline_client_async.py) (Azure Core), [`sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py`](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py) (Azure Identity), [`sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_blob_storage_token_store_create_or_update.py`](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_blob_storage_token_store_create_or_update.py) (Container Apps)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_packages["Service SDKs"]
  node_client_sdks["Service clients"]
  node_management_sdks["Management clients"]
  node_datafactory["Data Factory"]
  node_appcontainers["Container Apps"]
  node_frontdoor["Front Door"]
end

subgraph group_runtime["Shared Runtime"]
  node_azure_core["Azure Core"]
  node_async_pipeline["Async HTTP pipeline"]
  node_corehttp["Core HTTP"]
  node_identity["Azure Identity"]
end

subgraph group_agents["Agent Platform"]
  node_agent_core["Agent server core<br/>[_base.py]"]
  node_agent_activity["Activity adapter<br/>[_activity.py]"]
  node_agent_invocations["Invocations<br/>[_invocation.py]"]
  node_agent_copilot["GitHub Copilot"]
end

subgraph group_specialized["Specialized Features"]
  node_evaluation["Red team evaluation"]
  node_cosmos_inference["Cosmos reranking"]
end

node_developer(("SDK developer"))
node_azure_service{{"Azure services"}}
node_inference_service{{"Reranking endpoint"}}

node_developer -->|"creates client"| node_client_sdks
node_developer -->|"creates client"| node_management_sdks
node_client_sdks -->|"shares runtime"| node_azure_core
node_management_sdks -->|"shares runtime"| node_azure_core
node_azure_core -->|"builds pipeline"| node_async_pipeline
node_async_pipeline -->|"sends requests"| node_azure_service
node_corehttp -->|"sends requests"| node_azure_service
node_datafactory -->|"creates credential"| node_identity
node_datafactory -->|"queries runs"| node_azure_service
node_appcontainers -->|"creates credential"| node_identity
node_appcontainers -->|"configures auth"| node_azure_service
node_frontdoor -->|"creates credential"| node_identity
node_frontdoor -->|"updates rules"| node_azure_service
node_developer -->|"builds agent"| node_agent_core
node_agent_activity -.->|"adapts activity"| node_agent_core
node_agent_invocations -.->|"supports invocation"| node_agent_core
node_agent_copilot -.->|"adapts Copilot"| node_agent_core
node_developer -->|"runs evaluation"| node_evaluation
node_evaluation -.->|"runs attacks"| node_azure_service
node_developer -->|"reranks documents"| node_cosmos_inference
node_cosmos_inference -->|"sends inference"| node_inference_service

click node_client_sdks "https://github.com/azure/azure-sdk-for-python/tree/main/sdk"
click node_management_sdks "https://github.com/azure/azure-sdk-for-python/tree/main/sdk"
click node_datafactory "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py"
click node_appcontainers "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_blob_storage_token_store_create_or_update.py"
click node_frontdoor "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/network/azure-mgmt-frontdoor/generated_samples/frontdoor_rules_engine_create.py"
click node_azure_core "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/_pipeline_client_async.py"
click node_async_pipeline "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/_pipeline_client_async.py"
click node_corehttp "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/core/corehttp/corehttp/runtime/_pipeline_client_async.py"
click node_identity "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py"
click node_agent_core "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/_base.py"
click node_agent_activity "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-activity/azure/ai/agentserver/activity/_activity.py"
click node_agent_invocations "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-invocations/azure/ai/agentserver/invocations/_invocation.py"
click node_agent_copilot "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-ghcopilot/azure/ai/agentserver/githubcopilot/_copilot_adapter.py"
click node_evaluation "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_orchestrator_manager.py"
click node_cosmos_inference "https://github.com/azure/azure-sdk-for-python/blob/main/sdk/cosmos/azure-cosmos/azure/cosmos/_inference_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client_sdks,node_management_sdks,node_datafactory,node_appcontainers,node_frontdoor toneBlue
class node_azure_core,node_async_pipeline,node_corehttp,node_identity toneAmber
class node_agent_core,node_agent_activity,node_agent_invocations,node_agent_copilot toneMint
class node_evaluation,node_cosmos_inference toneRose
class node_developer,node_azure_service,node_inference_service toneIndigo
```

## Components

### Service SDKs

- [Service clients](https://github.com/azure/azure-sdk-for-python/tree/main/sdk): `sdk`
- [Management clients](https://github.com/azure/azure-sdk-for-python/tree/main/sdk): `sdk`
- [Data Factory](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py): `sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py`
- [Container Apps](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_blob_storage_token_store_create_or_update.py): `sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_blob_storage_token_store_create_or_update.py`
- [Front Door](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/network/azure-mgmt-frontdoor/generated_samples/frontdoor_rules_engine_create.py): `sdk/network/azure-mgmt-frontdoor/generated_samples/frontdoor_rules_engine_create.py`

### Shared Runtime

- [Azure Core](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/_pipeline_client_async.py): `sdk/core/azure-core/azure/core/_pipeline_client_async.py`
- [Async HTTP pipeline](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/_pipeline_client_async.py): `sdk/core/azure-core/azure/core/_pipeline_client_async.py`
- [Core HTTP](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/core/corehttp/corehttp/runtime/_pipeline_client_async.py): `sdk/core/corehttp/corehttp/runtime/_pipeline_client_async.py`
- [Azure Identity](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py): `sdk/datafactory/azure-mgmt-datafactory/generated_samples/pipeline_runs_query_by_factory.py`

### Agent Platform

- [Agent server core](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/_base.py): `sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/_base.py`
- [Activity adapter](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-activity/azure/ai/agentserver/activity/_activity.py): `sdk/agentserver/azure-ai-agentserver-activity/azure/ai/agentserver/activity/_activity.py`
- [Invocations](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-invocations/azure/ai/agentserver/invocations/_invocation.py): `sdk/agentserver/azure-ai-agentserver-invocations/azure/ai/agentserver/invocations/_invocation.py`
- [GitHub Copilot](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-ghcopilot/azure/ai/agentserver/githubcopilot/_copilot_adapter.py): `sdk/agentserver/azure-ai-agentserver-ghcopilot/azure/ai/agentserver/githubcopilot/_copilot_adapter.py`

### Specialized Features

- [Red team evaluation](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_orchestrator_manager.py): `sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_orchestrator_manager.py`
- [Cosmos reranking](https://github.com/azure/azure-sdk-for-python/blob/main/sdk/cosmos/azure-cosmos/azure/cosmos/_inference_service.py): `sdk/cosmos/azure-cosmos/azure/cosmos/_inference_service.py`

### Other components

- **SDK developer**
- **Azure services**
- **Reranking endpoint**

## Connections

- SDK developer → Service clients: creates client
- SDK developer → Management clients: creates client
- Service clients → Azure Core: shares runtime
- Management clients → Azure Core: shares runtime
- Azure Core → Async HTTP pipeline: builds pipeline
- Async HTTP pipeline → Azure services: sends requests
- Core HTTP → Azure services: sends requests
- Data Factory → Azure Identity: creates credential
- Data Factory → Azure services: queries runs
- Container Apps → Azure Identity: creates credential
- Container Apps → Azure services: configures auth
- Front Door → Azure Identity: creates credential
- Front Door → Azure services: updates rules
- SDK developer → Agent server core: builds agent
- Activity adapter → Agent server core: adapts activity
- Invocations → Agent server core: supports invocation
- GitHub Copilot → Agent server core: adapts Copilot
- SDK developer → Red team evaluation: runs evaluation
- Red team evaluation → Azure services: runs attacks
- SDK developer → Cosmos reranking: reranks documents
- Cosmos reranking → Reranking endpoint: sends inference
