Skip to content

Commit 19a92d2

Browse files
howieleungM-Hietalaglharper
authored
Feature/azure ai agents/1.1.0b1 (#41234)
* Update CHANGELOG.md * Update _version.py * Update CHANGELOG.md * adding instrumentation for create_thread_and_run (#41224) * adding instrumentation for create_thread_and_run * updating changelog * removing empty sections from changelog since those prevent green build * prepare for 1.1.0b1 (#41203) * h -f prepare for 1.1.0b1 * comment out async tests * Add convenience code for preview tools and Fabric sample * add sharepoint sample * add bing custom search sample * update README with fabric sample * run black * Rebase, update readme, changelog, comments out test * resolve ci * fix CI * update changelog * Fix spelling --------- Co-authored-by: Glenn Harper <glharper@microsoft.com> * Record async tests (#41235) * Update CHANGELOG.md --------- Co-authored-by: M-Hietala <78813398+M-Hietala@users.noreply.github.com> Co-authored-by: Glenn Harper <glharper@microsoft.com> Co-authored-by: Glenn Harper <64209257+glharper@users.noreply.github.com>
1 parent d75b9ac commit 19a92d2

File tree

92 files changed

+1124
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1124
-198
lines changed

sdk/ai/azure-ai-agents/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1+
2+
13
# Release History
24

5+
## 1.1.0b1 (2025-05-20)
6+
7+
### Features Added
8+
9+
- API version is changed to 2025-05-15-preview.
10+
- Add FabricTool, SharepointTool, and BingCustomSearchTool classes along with samples.
11+
12+
### Bugs Fixed
13+
14+
- Adding instrumentation for create_thread_and_run
15+
316
## 1.0.0 (2025-05-15)
417

518
### Features Added

sdk/ai/azure-ai-agents/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ To report an issue with the client library, or request additional features, plea
3636
- [Function call](#create-agent-with-function-call)
3737
- [Azure Function Call](#create-agent-with-azure-function-call)
3838
- [OpenAPI](#create-agent-with-openapi)
39+
- [Fabric data](#create-an-agent-with-fabric)
3940
- [Create thread](#create-thread) with
4041
- [Tool resource](#create-thread-with-tool-resource)
4142
- [Create message](#create-message) with:
@@ -666,6 +667,35 @@ with agents_client:
666667
<!-- END SNIPPET -->
667668

668669

670+
### Create an Agent with Fabric
671+
672+
To enable your Agent to answer queries using Fabric data, use `FabricTool` along with a connection to the Fabric resource.
673+
674+
Here is an example:
675+
676+
<!-- SNIPPET:sample_agents_fabric.create_agent_with_fabric_tool -->
677+
678+
```python
679+
conn_id = os.environ["FABRIC_CONNECTION_ID"]
680+
681+
print(conn_id)
682+
683+
# Initialize an Agent Fabric tool and add the connection id
684+
fabric = FabricTool(connection_id=conn_id)
685+
686+
# Create an Agent with the Fabric tool and process an Agent run
687+
with agents_client:
688+
agent = agents_client.create_agent(
689+
model=os.environ["MODEL_DEPLOYMENT_NAME"],
690+
name="my-agent",
691+
instructions="You are a helpful agent",
692+
tools=fabric.definitions,
693+
)
694+
```
695+
696+
<!-- END SNIPPET -->
697+
698+
669699
### Create Thread
670700

671701
For each session or conversation, a thread is required. Here is an example:

sdk/ai/azure-ai-agents/apiview-properties.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@
1616
"azure.ai.agents.models.AzureFunctionDefinition": "Azure.AI.Agents.AzureFunctionDefinition",
1717
"azure.ai.agents.models.AzureFunctionStorageQueue": "Azure.AI.Agents.AzureFunctionStorageQueue",
1818
"azure.ai.agents.models.AzureFunctionToolDefinition": "Azure.AI.Agents.AzureFunctionToolDefinition",
19+
"azure.ai.agents.models.BingCustomSearchConfiguration": "Azure.AI.Agents.BingCustomSearchConfiguration",
20+
"azure.ai.agents.models.BingCustomSearchToolDefinition": "Azure.AI.Agents.BingCustomSearchToolDefinition",
21+
"azure.ai.agents.models.BingCustomSearchToolParameters": "Azure.AI.Agents.BingCustomSearchToolParameters",
1922
"azure.ai.agents.models.BingGroundingSearchConfiguration": "Azure.AI.Agents.BingGroundingSearchConfiguration",
2023
"azure.ai.agents.models.BingGroundingSearchToolParameters": "Azure.AI.Agents.BingGroundingSearchToolParameters",
2124
"azure.ai.agents.models.BingGroundingToolDefinition": "Azure.AI.Agents.BingGroundingToolDefinition",
2225
"azure.ai.agents.models.CodeInterpreterToolDefinition": "Azure.AI.Agents.CodeInterpreterToolDefinition",
2326
"azure.ai.agents.models.CodeInterpreterToolResource": "Azure.AI.Agents.CodeInterpreterToolResource",
2427
"azure.ai.agents.models.ConnectedAgentDetails": "Azure.AI.Agents.ConnectedAgentDetails",
2528
"azure.ai.agents.models.ConnectedAgentToolDefinition": "Azure.AI.Agents.ConnectedAgentToolDefinition",
29+
"azure.ai.agents.models.FabricDataAgentToolParameters": "Azure.AI.Agents.FabricDataAgentToolParameters",
2630
"azure.ai.agents.models.FileInfo": "Azure.AI.Agents.FileInfo",
2731
"azure.ai.agents.models.FileListResponse": "Azure.AI.Agents.FileListResponse",
2832
"azure.ai.agents.models.FileSearchRankingOptions": "Azure.AI.Agents.FileSearchRankingOptions",
@@ -68,6 +72,7 @@
6872
"azure.ai.agents.models.MessageTextFilePathDetails": "Azure.AI.Agents.MessageTextFilePathDetails",
6973
"azure.ai.agents.models.MessageTextUrlCitationAnnotation": "Azure.AI.Agents.MessageTextUrlCitationAnnotation",
7074
"azure.ai.agents.models.MessageTextUrlCitationDetails": "Azure.AI.Agents.MessageTextUrlCitationDetails",
75+
"azure.ai.agents.models.MicrosoftFabricToolDefinition": "Azure.AI.Agents.MicrosoftFabricToolDefinition",
7176
"azure.ai.agents.models.OpenApiAuthDetails": "Azure.AI.Agents.OpenApiAuthDetails",
7277
"azure.ai.agents.models.OpenApiAnonymousAuthDetails": "Azure.AI.Agents.OpenApiAnonymousAuthDetails",
7378
"azure.ai.agents.models.OpenApiConnectionAuthDetails": "Azure.AI.Agents.OpenApiConnectionAuthDetails",
@@ -87,6 +92,7 @@
8792
"azure.ai.agents.models.RunStep": "Azure.AI.Agents.RunStep",
8893
"azure.ai.agents.models.RunStepToolCall": "Azure.AI.Agents.RunStepToolCall",
8994
"azure.ai.agents.models.RunStepAzureAISearchToolCall": "Azure.AI.Agents.RunStepAzureAISearchToolCall",
95+
"azure.ai.agents.models.RunStepBingCustomSearchToolCall": "Azure.AI.Agents.RunStepBingCustomSearchToolCall",
9096
"azure.ai.agents.models.RunStepBingGroundingToolCall": "Azure.AI.Agents.RunStepBingGroundingToolCall",
9197
"azure.ai.agents.models.RunStepCodeInterpreterToolCallOutput": "Azure.AI.Agents.RunStepCodeInterpreterToolCallOutput",
9298
"azure.ai.agents.models.RunStepCodeInterpreterImageOutput": "Azure.AI.Agents.RunStepCodeInterpreterImageOutput",
@@ -120,13 +126,18 @@
120126
"azure.ai.agents.models.RunStepFunctionToolCallDetails": "Azure.AI.Agents.RunStepFunctionToolCallDetails",
121127
"azure.ai.agents.models.RunStepMessageCreationDetails": "Azure.AI.Agents.RunStepMessageCreationDetails",
122128
"azure.ai.agents.models.RunStepMessageCreationReference": "Azure.AI.Agents.RunStepMessageCreationReference",
129+
"azure.ai.agents.models.RunStepMicrosoftFabricToolCall": "Azure.AI.Agents.RunStepMicrosoftFabricToolCall",
123130
"azure.ai.agents.models.RunStepOpenAPIToolCall": "Azure.AI.Agents.RunStepOpenAPIToolCall",
131+
"azure.ai.agents.models.RunStepSharepointToolCall": "Azure.AI.Agents.RunStepSharepointToolCall",
124132
"azure.ai.agents.models.RunStepToolCallDetails": "Azure.AI.Agents.RunStepToolCallDetails",
133+
"azure.ai.agents.models.SharepointGroundingToolParameters": "Azure.AI.Agents.SharepointGroundingToolParameters",
134+
"azure.ai.agents.models.SharepointToolDefinition": "Azure.AI.Agents.SharepointToolDefinition",
125135
"azure.ai.agents.models.SubmitToolOutputsAction": "Azure.AI.Agents.SubmitToolOutputsAction",
126136
"azure.ai.agents.models.SubmitToolOutputsDetails": "Azure.AI.Agents.SubmitToolOutputsDetails",
127137
"azure.ai.agents.models.ThreadMessage": "Azure.AI.Agents.ThreadMessage",
128138
"azure.ai.agents.models.ThreadMessageOptions": "Azure.AI.Agents.ThreadMessageOptions",
129139
"azure.ai.agents.models.ThreadRun": "Azure.AI.Agents.ThreadRun",
140+
"azure.ai.agents.models.ToolConnection": "Azure.AI.Agents.ToolConnection",
130141
"azure.ai.agents.models.ToolOutput": "Azure.AI.Agents.ToolOutput",
131142
"azure.ai.agents.models.ToolResources": "Azure.AI.Agents.ToolResources",
132143
"azure.ai.agents.models.TruncationObject": "Azure.AI.Agents.TruncationObject",

sdk/ai/azure-ai-agents/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/ai/azure-ai-agents",
5-
"Tag": "python/ai/azure-ai-agents_dab4ae41b1"
5+
"Tag": "python/ai/azure-ai-agents_c924b708a0"
66
}

sdk/ai/azure-ai-agents/azure/ai/agents/_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ class AgentsClient(AgentsClientOperationsMixin): # pylint: disable=too-many-ins
5656
:type endpoint: str
5757
:param credential: Credential used to authenticate requests to the service. Required.
5858
:type credential: ~azure.core.credentials.TokenCredential
59-
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
60-
that overriding this default value may result in unsupported behavior.
59+
:keyword api_version: The API version to use for this operation. Default value is
60+
"2025-05-15-preview". Note that overriding this default value may result in unsupported
61+
behavior.
6162
:paramtype api_version: str
6263
"""
6364

sdk/ai/azure-ai-agents/azure/ai/agents/_configuration.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ class AgentsClientConfiguration: # pylint: disable=too-many-instance-attributes
2727
:type endpoint: str
2828
:param credential: Credential used to authenticate requests to the service. Required.
2929
:type credential: ~azure.core.credentials.TokenCredential
30-
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
31-
that overriding this default value may result in unsupported behavior.
30+
:keyword api_version: The API version to use for this operation. Default value is
31+
"2025-05-15-preview". Note that overriding this default value may result in unsupported
32+
behavior.
3233
:paramtype api_version: str
3334
"""
3435

3536
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
36-
api_version: str = kwargs.pop("api_version", "v1")
37+
api_version: str = kwargs.pop("api_version", "2025-05-15-preview")
3738

3839
if endpoint is None:
3940
raise ValueError("Parameter 'endpoint' must not be None.")

sdk/ai/azure-ai-agents/azure/ai/agents/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0"
9+
VERSION = "1.1.0b1"

sdk/ai/azure-ai-agents/azure/ai/agents/aio/_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ class AgentsClient(AgentsClientOperationsMixin): # pylint: disable=too-many-ins
5757
:type endpoint: str
5858
:param credential: Credential used to authenticate requests to the service. Required.
5959
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
60-
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
61-
that overriding this default value may result in unsupported behavior.
60+
:keyword api_version: The API version to use for this operation. Default value is
61+
"2025-05-15-preview". Note that overriding this default value may result in unsupported
62+
behavior.
6263
:paramtype api_version: str
6364
"""
6465

sdk/ai/azure-ai-agents/azure/ai/agents/aio/_configuration.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ class AgentsClientConfiguration: # pylint: disable=too-many-instance-attributes
2727
:type endpoint: str
2828
:param credential: Credential used to authenticate requests to the service. Required.
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
30-
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
31-
that overriding this default value may result in unsupported behavior.
30+
:keyword api_version: The API version to use for this operation. Default value is
31+
"2025-05-15-preview". Note that overriding this default value may result in unsupported
32+
behavior.
3233
:paramtype api_version: str
3334
"""
3435

3536
def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None:
36-
api_version: str = kwargs.pop("api_version", "v1")
37+
api_version: str = kwargs.pop("api_version", "2025-05-15-preview")
3738

3839
if endpoint is None:
3940
raise ValueError("Parameter 'endpoint' must not be None.")

sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ async def upload(
13621362
:paramtype file: Optional[FileType]
13631363
:keyword file_path: Path to the file. Required if `body` and `purpose` are not provided.
13641364
:paramtype file_path: Optional[str]
1365-
:keyword purpose: Known values are: "assistants", "assistants_output", and "vision".
1365+
:keyword purpose: Known values are: "assistants", "assistants_output", and "vision".
13661366
Required if `body` and `file` are not provided.
13671367
:paramtype purpose: Union[str, _models.FilePurpose, None]
13681368
:keyword filename: The name of the file.
@@ -1502,7 +1502,7 @@ async def upload_and_poll(
15021502
:paramtype file: Optional[FileType]
15031503
:keyword file_path: Path to the file. Required if `body` and `purpose` are not provided.
15041504
:paramtype file_path: Optional[str]
1505-
:keyword purpose: Known values are: "assistants", "assistants_output", and "vision".
1505+
:keyword purpose: Known values are: "assistants", "assistants_output", and "vision".
15061506
Required if `body` and `file` are not provided.
15071507
:paramtype purpose: Union[str, _models.FilePurpose, None]
15081508
:keyword filename: The name of the file.

sdk/ai/azure-ai-agents/azure/ai/agents/models/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@
2828
AzureFunctionDefinition,
2929
AzureFunctionStorageQueue,
3030
AzureFunctionToolDefinition,
31+
BingCustomSearchConfiguration,
32+
BingCustomSearchToolDefinition,
33+
BingCustomSearchToolParameters,
3134
BingGroundingSearchConfiguration,
3235
BingGroundingSearchToolParameters,
3336
BingGroundingToolDefinition,
3437
CodeInterpreterToolDefinition,
3538
CodeInterpreterToolResource,
3639
ConnectedAgentDetails,
3740
ConnectedAgentToolDefinition,
41+
FabricDataAgentToolParameters,
3842
FileInfo,
3943
FileListResponse,
4044
FileSearchRankingOptions,
@@ -80,6 +84,7 @@
8084
MessageTextFilePathDetails,
8185
MessageTextUrlCitationAnnotation,
8286
MessageTextUrlCitationDetails,
87+
MicrosoftFabricToolDefinition,
8388
OpenApiAnonymousAuthDetails,
8489
OpenApiAuthDetails,
8590
OpenApiConnectionAuthDetails,
@@ -98,6 +103,7 @@
98103
RunError,
99104
RunStep,
100105
RunStepAzureAISearchToolCall,
106+
RunStepBingCustomSearchToolCall,
101107
RunStepBingGroundingToolCall,
102108
RunStepCodeInterpreterImageOutput,
103109
RunStepCodeInterpreterImageReference,
@@ -131,14 +137,19 @@
131137
RunStepFunctionToolCallDetails,
132138
RunStepMessageCreationDetails,
133139
RunStepMessageCreationReference,
140+
RunStepMicrosoftFabricToolCall,
134141
RunStepOpenAPIToolCall,
142+
RunStepSharepointToolCall,
135143
RunStepToolCall,
136144
RunStepToolCallDetails,
145+
SharepointGroundingToolParameters,
146+
SharepointToolDefinition,
137147
SubmitToolOutputsAction,
138148
SubmitToolOutputsDetails,
139149
ThreadMessage,
140150
ThreadMessageOptions,
141151
ThreadRun,
152+
ToolConnection,
142153
ToolDefinition,
143154
ToolOutput,
144155
ToolResources,
@@ -219,13 +230,17 @@
219230
"AzureFunctionDefinition",
220231
"AzureFunctionStorageQueue",
221232
"AzureFunctionToolDefinition",
233+
"BingCustomSearchConfiguration",
234+
"BingCustomSearchToolDefinition",
235+
"BingCustomSearchToolParameters",
222236
"BingGroundingSearchConfiguration",
223237
"BingGroundingSearchToolParameters",
224238
"BingGroundingToolDefinition",
225239
"CodeInterpreterToolDefinition",
226240
"CodeInterpreterToolResource",
227241
"ConnectedAgentDetails",
228242
"ConnectedAgentToolDefinition",
243+
"FabricDataAgentToolParameters",
229244
"FileInfo",
230245
"FileListResponse",
231246
"FileSearchRankingOptions",
@@ -271,6 +286,7 @@
271286
"MessageTextFilePathDetails",
272287
"MessageTextUrlCitationAnnotation",
273288
"MessageTextUrlCitationDetails",
289+
"MicrosoftFabricToolDefinition",
274290
"OpenApiAnonymousAuthDetails",
275291
"OpenApiAuthDetails",
276292
"OpenApiConnectionAuthDetails",
@@ -289,6 +305,7 @@
289305
"RunError",
290306
"RunStep",
291307
"RunStepAzureAISearchToolCall",
308+
"RunStepBingCustomSearchToolCall",
292309
"RunStepBingGroundingToolCall",
293310
"RunStepCodeInterpreterImageOutput",
294311
"RunStepCodeInterpreterImageReference",
@@ -322,14 +339,19 @@
322339
"RunStepFunctionToolCallDetails",
323340
"RunStepMessageCreationDetails",
324341
"RunStepMessageCreationReference",
342+
"RunStepMicrosoftFabricToolCall",
325343
"RunStepOpenAPIToolCall",
344+
"RunStepSharepointToolCall",
326345
"RunStepToolCall",
327346
"RunStepToolCallDetails",
347+
"SharepointGroundingToolParameters",
348+
"SharepointToolDefinition",
328349
"SubmitToolOutputsAction",
329350
"SubmitToolOutputsDetails",
330351
"ThreadMessage",
331352
"ThreadMessageOptions",
332353
"ThreadRun",
354+
"ToolConnection",
333355
"ToolDefinition",
334356
"ToolOutput",
335357
"ToolResources",

sdk/ai/azure-ai-agents/azure/ai/agents/models/_enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ class AgentsNamedToolChoiceType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
2121
"""Tool type ``file_search``"""
2222
BING_GROUNDING = "bing_grounding"
2323
"""Tool type ``bing_grounding``"""
24+
MICROSOFT_FABRIC = "fabric_dataagent"
25+
"""Tool type ``fabric_dataagent``"""
26+
SHAREPOINT = "sharepoint_grounding"
27+
"""Tool type ``sharepoint_grounding``"""
2428
AZURE_AI_SEARCH = "azure_ai_search"
2529
"""Tool type ``azure_ai_search``"""
30+
BING_CUSTOM_SEARCH = "bing_custom_search"
31+
"""Tool type ``bing_custom_search``"""
2632
CONNECTED_AGENT = "connected_agent"
2733
"""Tool type ``connected_agent``"""
2834

0 commit comments

Comments
 (0)