Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c37d769
First
dargilco Jan 30, 2026
108bdd1
Re-emit. Apply some post-emitter-fixes
dargilco Jan 31, 2026
f630bc7
Update samples to show pip install `azure-ai-projects>=2.0.0b4`
dargilco Jan 31, 2026
3bedda2
Update README.md
dargilco Jan 31, 2026
3545a8d
Re-emit. Fixes due to class rename and new v1 version
dargilco Feb 2, 2026
2e70601
Add foundry_beta=FoundryPreviewOptInKeys.MEMORY_STORES_V1 to Memory S…
dargilco Feb 2, 2026
9410796
Restore Schedules variable name
dargilco Feb 2, 2026
971bc2e
Fix some mypy errors
dargilco Feb 3, 2026
01eba32
Fix missing import. Comment out debug flag
dargilco Feb 3, 2026
0f6788e
web search samples (#44981)
howieleung Feb 3, 2026
a9892e0
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 4, 2026
a28537e
Re-emit from my TypeSpec branch dargilco/rename-optin-http-request-he…
dargilco Feb 4, 2026
f2f7f73
Fix mypy (renames)
dargilco Feb 4, 2026
8bed441
Fix pyright. Fix install comment in samples
dargilco Feb 4, 2026
68f366c
Fix pyright
dargilco Feb 4, 2026
910ab6f
Update code snippets in README.md. Add emitter-package*.json files
dargilco Feb 4, 2026
3a7a95b
Hand fix some Sphinx errors
dargilco Feb 4, 2026
7eac57b
Fix one more Shpinx issue
dargilco Feb 4, 2026
a06aba3
Fix typos
dargilco Feb 4, 2026
c48087c
Disable all tests
dargilco Feb 4, 2026
a9eb01c
Re-enable a few tests that don't use network traffic
dargilco Feb 4, 2026
0439065
Re-emit
dargilco Feb 4, 2026
48b13bd
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 5, 2026
e6efeb6
revert changes to /eng/emitter-package-lock.json, as openai-typespec …
dargilco Feb 5, 2026
97fb06b
Re-emit from TypeSpec, after updateing client.tsp to remove @@usage d…
dargilco Feb 5, 2026
20f596e
Manual fix for doc string issue
dargilco Feb 5, 2026
c69cb98
Make sure caller can get an OpenAI client from `get_openai_client()` …
dargilco Feb 5, 2026
ffe039a
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 6, 2026
c15ac89
Fix merge from Main
dargilco Feb 6, 2026
63dd135
Disable new tests by default, until we have new recordings
dargilco Feb 6, 2026
fae78a0
Re-emit from latest TypeSpec, which removed AgentReference
dargilco Feb 6, 2026
fb6468c
Fix some quality gates
dargilco Feb 6, 2026
fd6b157
Allow more keyword overrides when calling get_openai_client() (#45067)
dargilco Feb 7, 2026
c11e828
Add 'black' to post-emitter-fixes.cmd
dargilco Feb 8, 2026
b146497
Re-emit from latest TypeSpec. Update samples & tests to use ".beta" s…
dargilco Feb 10, 2026
2956e4b
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 10, 2026
51143d8
Re-emit from TypeSpec, and remove "foundry-feature" from public API s…
dargilco Feb 12, 2026
0bd3fd1
-fRefactor agent reference structure in API response creation (#45184)
howieleung Feb 13, 2026
b2117bf
Refactor samples and tests for Azure AI Projects
howieleung Feb 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions sdk/ai/azure-ai-projects/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
# 3. Run the tests (`pytest`) or run samples in the `samples` folder
#

# Set to true for console logging
AZURE_AI_PROJECTS_CONSOLE_LOGGING=

#######################################################################
#
# Used in samples
#
#######################################################################

# Project endpoint has the format:
# `https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>`
AZURE_AI_PROJECT_ENDPOINT=
Expand All @@ -23,12 +28,8 @@ CONNECTION_NAME=
AZURE_AI_PROJECTS_AZURE_SUBSCRIPTION_ID=
AZURE_AI_PROJECTS_AZURE_RESOURCE_GROUP=
AZURE_AI_PROJECTS_AZURE_AOAI_ACCOUNT=

# Used in Memory Store samples
MEMORY_STORE_CHAT_MODEL_DEPLOYMENT_NAME=
MEMORY_STORE_EMBEDDING_MODEL_DEPLOYMENT_NAME=

# Used in Agent tools samples
IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME=
BING_PROJECT_CONNECTION_ID=
MCP_PROJECT_CONNECTION_ID=
Expand All @@ -50,6 +51,7 @@ A2A_USER_INPUT=
#######################################################################
#
# Used in tests
#
#######################################################################

# Used for recording or playback
Expand Down
10 changes: 9 additions & 1 deletion sdk/ai/azure-ai-projects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
* Rename class `MemorySearchTool` to `MemorySearchPreviewTool`.
* Rename class `MicrosoftFabricAgentTool` to `MicrosoftFabricPreviewTool`.
* Rename class `SharepointAgentTool` to `SharepointPreviewTool`.
* Rename class `ItemParam` to `InputItem`.
* Other class renames:
* Rename class `ItemParam` to `InputItem`.
* Rename class `PromptAgentDefinitionText` to `PromptAgentDefinitionTextOptions`
* Rename class `EvaluationComparisonRequest` to `InsightRequest`
* Tracing: workflow actions in conversation item listings are now emitted as "gen_ai.conversation.item" events (with role="workflow") instead of "gen_ai.workflow.action" events in the list_conversation_items span.
* Tracing: response generation span names changed from "responses {model_name}" to "chat {model_name}" for model calls and from "responses {agent_name}" to "invoke_agent {agent_name}" for agent calls.
* Tracing: response generation operation names changed from "responses" to "chat" for model calls and from "responses" to "invoke_agent" for agent calls.
Expand All @@ -30,6 +33,11 @@
* Tracing: "gen_ai.provider.name" attribute value changed to "microsoft.foundry".
* Tracing: the format of the function tool call related traces in input and output messages changed to {"type": "tool_call", "id": "...", "name": "...", "arguments": {...}} and {"type": "tool_call_response", "id": "...", "result": "..."}

### Sample updates

* Add and update samples for `AzureFunctionTool`, `WebSearchTool`, and `WebSearchPreviewTool`
* All samples for agent tools call `responses.create` API with `agent_reference` instead of `agent`

## 2.0.0b3 (2026-01-06)

### Features Added
Expand Down
98 changes: 80 additions & 18 deletions sdk/ai/azure-ai-projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resources in your Microsoft Foundry Project. Use it to:
* Agent Memory Search
* Agent-to-Agent (A2A)
* Azure AI Search
* Azure Functions
* Bing Custom Search
* Bing Grounding
* Browser Automation
Expand All @@ -20,7 +21,7 @@ resources in your Microsoft Foundry Project. Use it to:
* Model Context Protocol (MCP)
* OpenAPI
* SharePoint
* Web Search
* Web Search/Web Search Preview
* **Get an OpenAI client** using `.get_openai_client()` method to run Responses, Conversations, Evals and FineTuning operations with your Agent.
* **Manage memory stores** for Agent conversations, using the `.memory_stores` operations.
* **Explore additional evaluation tools** to assess the performance of your generative AI application, using the `.evaluation_rules`,
Expand All @@ -32,7 +33,7 @@ resources in your Microsoft Foundry Project. Use it to:
* **Upload documents and create Datasets** to reference them using the `.datasets` operations.
* **Create and enumerate Search Indexes** using methods the `.indexes` operations.

The client library uses version `2025-11-15-preview` of the AI Foundry [data plane REST APIs](https://aka.ms/azsdk/azure-ai-projects-v2/api-reference-2025-11-15-preview).
The client library uses version `v1` of the AI Foundry [data plane REST APIs](https://aka.ms/azsdk/azure-ai-projects-v2/api-reference-v1).

[Product documentation](https://aka.ms/azsdk/azure-ai-projects-v2/product-doc)
| [Samples][samples]
Expand Down Expand Up @@ -64,12 +65,6 @@ To report an issue with the client library, or request additional features, plea
pip install --pre azure-ai-projects
```

Note that the packages [openai](https://pypi.org/project/openai) and [azure-identity](https://pypi.org/project/azure-identity) also need to be installed if you intend to call `get_openai_client()`:

```bash
pip install openai azure-identity
```

## Key concepts

### Create and authenticate the client with Entra ID
Expand Down Expand Up @@ -167,8 +162,7 @@ with project_client.get_openai_client() as openai_client:

response = openai_client.responses.create(
conversation=conversation.id,
extra_body={"agent": {"name": agent.name, "type": "agent_reference"}},
input="",
extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
print(f"Response output: {response.output_text}")

Expand All @@ -180,8 +174,7 @@ with project_client.get_openai_client() as openai_client:

response = openai_client.responses.create(
conversation=conversation.id,
extra_body={"agent": {"name": agent.name, "type": "agent_reference"}},
input="",
extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
print(f"Response output: {response.output_text}")

Expand Down Expand Up @@ -288,20 +281,50 @@ if image_data and image_data[0]:

See the full sample in file `\agents\tools\sample_agent_image_generation.py` in the [Samples][samples] folder.

**Web Search**
**Web Search/Web Search Preview**

Perform general web searches to retrieve current information from the internet. [OpenAI Documentation](https://platform.openai.com/docs/guides/tools-web-search)
Discover up-to-date web content with the GA Web Search tool or try the Web Search Preview tool for the latest enhancements. Guidance on when to use each option is in the documentation: https://learn.microsoft.com/azure/ai-foundry/agents/how-to/tools/web-overview?view=foundry#determine-the-best-tool-for-your-use-cases.

<!-- SNIPPET:sample_agent_web_search.tool_declaration -->

```python
tool = WebSearchPreviewTool(user_location=ApproximateLocation(country="GB", city="London", region="London"))
tool = WebSearchTool(
user_location=WebSearchApproximateLocation(type="approximate", country="GB", city="London", region="London")
)
```

<!-- END SNIPPET -->

See the full sample in file `\agents\tools\sample_agent_web_search.py` in the [Samples][samples] folder.

<!-- SNIPPET:sample_agent_web_search_preview.tool_declaration -->

```python
tool = WebSearchPreviewTool(user_location=ApproximateLocation(country="GB", city="London", region="London"))
```

<!-- END SNIPPET -->

See the full sample in file `\agents\tools\sample_agent_web_search_preview.py` in the [Samples][samples] folder.

Use the GA Web Search tool with a Bing Custom Search connection to scope results to your custom search instance:

<!-- SNIPPET:sample_agent_web_search_with_custom_search.tool_declaration -->

```python
tool = WebSearchTool(
custom_search_configuration=WebSearchConfiguration(
project_connection_id=os.environ["BING_CUSTOM_SEARCH_PROJECT_CONNECTION_ID"],
instance_name=os.environ["BING_CUSTOM_SEARCH_INSTANCE_NAME"],
)
)
```

<!-- END SNIPPET -->

See the full sample in file `\agents\tools\sample_agent_web_search_with_custom_search.py` in the [Samples][samples] folder.


**Computer Use**

Enable agents to interact directly with computer systems for task automation and system operations:
Expand Down Expand Up @@ -346,7 +369,7 @@ Call external APIs defined by OpenAPI specifications without additional client-s

```python
with open(weather_asset_file_path, "r") as f:
openapi_weather = jsonref.loads(f.read())
openapi_weather = cast(dict[str, Any], jsonref.loads(f.read()))

tool = OpenApiTool(
openapi=OpenApiFunctionDefinition(
Expand Down Expand Up @@ -393,6 +416,45 @@ tool = FunctionTool(

See the full sample in file `\agents\tools\sample_agent_function_tool.py` in the [Samples][samples] folder.

**Azure Functions**

Integrate Azure Functions with agents to extend capabilities via serverless compute. Functions are invoked through Azure Storage Queue triggers, allowing asynchronous execution of custom logic.

<!-- SNIPPET:sample_agent_azure_function.tool_declaration -->

```python
tool = AzureFunctionTool(
azure_function=AzureFunctionDefinition(
input_binding=AzureFunctionBinding(
storage_queue=AzureFunctionStorageQueue(
queue_name=os.environ["STORAGE_INPUT_QUEUE_NAME"],
queue_service_endpoint=os.environ["STORAGE_QUEUE_SERVICE_ENDPOINT"],
)
),
output_binding=AzureFunctionBinding(
storage_queue=AzureFunctionStorageQueue(
queue_name=os.environ["STORAGE_OUTPUT_QUEUE_NAME"],
queue_service_endpoint=os.environ["STORAGE_QUEUE_SERVICE_ENDPOINT"],
)
),
function=AzureFunctionDefinitionFunction(
name="queue_trigger",
description="Get weather for a given location",
parameters={
"type": "object",
"properties": {"location": {"type": "string", "description": "location to determine weather for"}},
},
),
)
)
```

<!-- END SNIPPET -->

*After calling `responses.create()`, the agent enqueues function arguments to the input queue. Your Azure Function processes the request and returns results via the output queue.*

See the full sample in file `\agents\tools\sample_agent_azure_function.py` and the Azure Function implementation in `\agents\tools\get_weather_func_app.py` in the [Samples][samples] folder.

* **Memory Search Tool**

The Memory Store Tool adds Memory to an Agent, allowing the Agent's AI model to search for past information related to the current user prompt.
Expand Down Expand Up @@ -594,7 +656,7 @@ Call external APIs defined by OpenAPI specifications using project connection au

```python
with open(tripadvisor_asset_file_path, "r") as f:
openapi_tripadvisor = jsonref.loads(f.read())
openapi_tripadvisor = cast(dict[str, Any], jsonref.loads(f.read()))

tool = OpenApiTool(
openapi=OpenApiFunctionDefinition(
Expand Down Expand Up @@ -954,7 +1016,7 @@ You can add an Application Insights Azure resource to your Microsoft Foundry pro
Make sure to install OpenTelemetry and the Azure SDK tracing plugin via

```bash
pip install "azure-ai-projects>=2.0.0b1" azure-identity opentelemetry-sdk azure-core-tracing-opentelemetry azure-monitor-opentelemetry
pip install "azure-ai-projects>=2.0.0b4" opentelemetry-sdk azure-core-tracing-opentelemetry azure-monitor-opentelemetry
```

You will also need an exporter to send telemetry to your observability backend. You can print traces to the console or use a local viewer such as [Aspire Dashboard](https://learn.microsoft.com/dotnet/aspire/fundamentals/dashboard/standalone?tabs=bash).
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"apiVersion": "2025-11-15-preview"
"apiVersion": "v1"
}
4 changes: 0 additions & 4 deletions sdk/ai/azure-ai-projects/_tsp-location.yaml

This file was deleted.

Loading
Loading