Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build AI applications on Microsoft Foundry using the azure-ai-projects SDK.
.claude/skills/azure-ai-projects-py/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✗→✓ | ▲ Improved | — | — |
| case-09 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-12 | ✗→✓ | ▲ Improved | — | — |
Build AI applications on Microsoft Foundry using the azure-ai-projects SDK.
bashpip install azure-ai-projects azure-identity
bashAZURE_AI_PROJECT_ENDPOINT="https://<resource>.services.ai.azure.com/api/projects/<project>" AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
pythonimport os from azure.identity import DefaultAzureCredential from azure.ai.projects import AIProjectClient credential = DefaultAzureCredential() client = AIProjectClient( endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"], credential=credential, )
| Operation | Access | Purpose | |-----------|--------|---------| | client.agents | .agents.* | Agent CRUD, versions, threads, runs | | client.connections | .connections.* | List/get project connections | | client.deployments | .deployments.* | List model deployments | | client.datasets | .datasets.* | Dataset management | | client.indexes | .indexes.* | Index management | | client.evaluations | .evaluations.* | Run evaluations | | client.red_teams | .red_teams.* | Red team operations |
pythonfrom azure.ai.projects import AIProjectClient client = AIProjectClient( endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), ) # Use Foundry-native operations agent = client.agents.create_agent( model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], name="my-agent", instructions="You are helpful.", )
python# Get OpenAI-compatible client from project openai_client = client.get_openai_client() # Use standard OpenAI API response = openai_client.chat.completions.create( model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], messages=[{"role": "user", "content": "Hello!"}], )
pythonagent = client.agents.create_agent( model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], name="my-agent", instructions="You are a helpful assistant.", )
pythonfrom azure.ai.agents import CodeInterpreterTool, FileSearchTool agent = client.agents.create_agent( model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], name="tool-agent", instructions="You can execute code and search files.", tools=[CodeInterpreterTool(), FileSearchTool()], )
pythonfrom azure.ai.projects.models import PromptAgentDefinition # Create a versioned agent agent_version = client.agents.create_version( agent_name="customer-support-agent", definition=PromptAgentDefinition( model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], instructions="You are a customer support specialist.", tools=[], # Add tools as needed ), version_label="v1.0", )
See references/agents.md for detailed agent patterns.
| Tool | Class | Use Case | |------|-------|----------| | Code Interpreter | CodeInterpreterTool | Execute Python, generate files | | File Search | FileSearchTool | RAG over uploaded documents | | Bing Grounding | BingGroundingTool | Web search (requires connection) | | Azure AI Search | AzureAISearchTool | Search your indexes | | Function Calling | FunctionTool | Call your Python functions | | OpenAPI | OpenApiTool | Call REST APIs | | MCP | McpTool | Model Context Protocol servers | | Memory Search | MemorySearchTool | Search agent memory stores | | SharePoint | SharepointGroundingTool | Search SharePoint content |
See references/tools.md for all tool patterns.
python# 1. Create thread thread = client.agents.threads.create() # 2. Add message client.agents.messages.create( thread_id=thread.id, role="user", content="What's the weather like?", ) # 3. Create and process run run = client.agents.runs.create_and_process( thread_id=thread.id, agent_id=agent.id, ) # 4. Get response if run.status == "completed": messages = client.agents.messages.list(thread_id=thread.id) for msg in messages: if msg.role == "assistant": print(msg.content[0].text.value)
python# List all connections connections = client.connections.list() for conn in connections: print(f"{conn.name}: {conn.connection_type}") # Get specific connection connection = client.connections.get(connection_name="my-search-connection")
See references/connections.md for connection patterns.
python# List available model deployments deployments = client.deployments.list() for deployment in deployments: print(f"{deployment.name}: {deployment.model}")
See references/deployments.md for deployment patterns.
python# List datasets datasets = client.datasets.list() # List indexes indexes = client.indexes.list()
See references/datasets-indexes.md for data operations.
python# Using OpenAI client for evals openai_client = client.get_openai_client() # Create evaluation with built-in evaluators eval_run = openai_client.evals.runs.create( eval_id="my-eval", name="quality-check", data_source={ "type": "custom", "item_references": [{"item_id": "test-1"}], }, testing_criteria=[ {"type": "fluency"}, {"type": "task_adherence"}, ], )
See references/evaluation.md for evaluation patterns.
pythonfrom azure.ai.projects.aio import AIProjectClient async with AIProjectClient( endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), ) as client: agent = await client.agents.create_agent(...) # ... async operations
See references/async-patterns.md for async patterns.
python# Create memory store for agent memory_store = client.agents.create_memory_store( name="conversation-memory", ) # Attach to agent for persistent memory agent = client.agents.create_agent( model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"], name="memory-agent", tools=[MemorySearchTool()], tool_resources={"memory": {"store_ids": [memory_store.id]}}, )
async with AIProjectClient(...) as client:client.agents.delete_agent(agent.id)create_and_process for simple runs, streaming for real-time UX| Feature | azure-ai-projects | azure-ai-agents | |---------|---------------------|-------------------| | Level | High-level (Foundry) | Low-level (Agents) | | Client | AIProjectClient | AgentsClient | | Versioning | create_version() | Not available | | Connections | Yes | No | | Deployments | Yes | No | | Datasets/Indexes | Yes | No | | Evaluation | Via OpenAI client | No | | When to use | Full Foundry integration | Standalone agent apps |
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.