Microsoft Azure AI Projects Client Library for Python
Project description
Azure AI Projects client library for Python
Use the AI Projects client library (in preview) to:
- Enumerate connections in your Azure AI Foundry project and get connection properties. For example, get the inference endpoint URL and credentials associated with your Azure OpenAI connection.
- Get an authenticated Inference client to do chat completions, for the default Azure OpenAI or AI Services connections in your Azure AI Foundry project. Supports the AzureOpenAI client from the
openaipackage, or clients from theazure-ai-inferencepackage. - Develop Agents using the Azure AI Agent Service, leveraging an extensive ecosystem of models, tools, and capabilities from OpenAI, Microsoft, and other LLM providers. The Azure AI Agent Service enables the building of Agents for a wide range of generative AI use cases. The package is currently in preview.
- Run Evaluations to assess the performance of generative AI applications using various evaluators and metrics. It includes built-in evaluators for quality, risk, and safety, and allows custom evaluators for specific needs.
- Enable OpenTelemetry tracing.
Product documentation | Samples | API reference documentation | Package (PyPI) | SDK source code | AI Starter Template
Reporting issues
To report an issue with the client library, or request additional features, please open a GitHub issue here. Mention the package name "azure-ai-projects" in the title or content.
Table of contents
- Getting started
- Key concepts
- Examples
- Enumerate connections
- Get an authenticated ChatCompletionsClient
- Get an authenticated AzureOpenAI client
- Agents (Preview)
- Evaluation
- Tracing
- Troubleshooting
- Next steps
- Contributing
Release History
1.0.0b8 (2025-03-28)
Features added
- New parameters added for Azure AI Search tool, with corresponding sample update.
- Fabric tool REST name updated, along with convenience code.
Sample updates
- Sample update demonstrating new parameters added for Azure AI Search tool.
- Sample added using OpenAPI tool against authenticated TripAdvisor API spec.
Bugs Fixed
- Fix for a bug in Agent tracing causing event handler return values to not be returned when tracing is enabled.
- Fix for a bug in Agent tracing causing tool calls not to be recorded in traces.
- Fix for a bug in Agent tracing causing function tool calls to not work properly when tracing is enabled.
- Fix for a bug in Agent streaming, where
agent_idwas not included in the response. This caused the SDK not to make function calls when the thread run status isrequires_action.
1.0.0b7 (2025-03-06)
Features added
- Add support for parsing URL citations in Agent text messages. See new classes
MessageTextUrlCitationAnnotationandMessageDeltaTextUrlCitationAnnotation. - Add enum value
ConnectionType.API_KEYto support enumeration of generic connections that uses API Key authentication.
Sample updates
- Update sample
sample_agents_bing_grounding.pywith printout of URL citation. - Add new samples
sample_agents_stream_eventhandler_with_bing_grounding.pyandsample_agents_stream_iteration_with_bing_grounding.pywith printout of URL citation.
Bugs Fixed
- Fix a bug in deserialization of
RunStepDeltaFileSearchToolCallreturned during Agent streaming (see GitHub issue 48333). - Fix for Exception raised while parsing Agent streaming response, in some rare cases, for multibyte UTF-8 languages like Chinese.
Breaking Changes
- Rename input argument
assistant_idtoagent_idin all Agent methods to align with the "Agent" terminology. Similarly, rename allassistant_idproperties on classes.
1.0.0b6 (2025-02-14)
Features added
- Added
trace_functiondecorator for conveniently tracing function calls in Agents using OpenTelemetry. Please see the README.md for updated documentation.
Sample updates
- Added AzureLogicAppTool utility and Logic App sample under
samples/agents, folder to make Azure Logic App integration with Agents easier. - Added better observability for Azure AI Search sample for Agents via improved run steps information from the service.
- Added sample to demonstrate how to add custom attributes to telemetry span.
Bugs Fixed
- Lowered the logging level of "Toolset is not available in the client" from
warningtodebugto prevent unnecessary log entries in agent application runs.
1.0.0b5 (2025-01-17)
Features added
- Add method
.inference.get_image_embeddings_clientonAIProjectClientto get an authenticatedImageEmbeddingsClient(from the package azure-ai-inference). You need to have azure-ai-inference package version 1.0.0b7 or above installed for this method to work.
Bugs Fixed
- Fix for events dropped in streamed Agent response (see GitHub issue 39028).
- In Agents, incomplete status thread run event is now deserialized into a ThreadRun object, during stream iteration, and invokes the correct function
on_thread_run(instead of the wrong functionon_unhandled_event). - Fix an error when calling the
to_evaluator_model_configmethod of classConnectionProperties. See new input argumentinclude_credentials.
Breaking Changes
submit_tool_outputs_to_runreturnsNoneinstead ofThreadRun(see GitHub issue 39028).
1.0.0b4 (2024-12-20)
Bugs Fixed
- Fix for Agent streaming issue (see GitHub issue 38918)
- Fix for Agent async function
send_email_asyncis not called (see GitHub issue 38898) - Fix for Agent streaming with event handler fails with "AttributeError: 'MyEventHandler' object has no attribute 'buffer'" (see GitHub issue 38897)
Features Added
- Add optional input argument
connection_nameto methods.inference.get_chat_completions_client,.inference.get_embeddings_clientand.inference.get_azure_openai_client.
1.0.0b3 (2024-12-13)
Features Added
- Add support for Structured Outputs for Agents.
- Add option to include file contents, when index search is used for Agents.
- Added objects to inform Agents about Azure Functions.
- Redesigned streaming and event handlers for agents.
- Add
parallel_tool_callsparameter to allow parallel tool execution for Agents. - Added
BingGroundingToolfor Agents to use against a Bing API Key connection. - Added
AzureAiSearchToolfor Agents to use against an Azure AI Search resource. - Added
OpenApiToolfor Agents, which creates and executes a REST function defined by an OpenAPI spec. - Added new helper properties in
OpenAIPageableListOfThreadMessage,MessageDeltaChunk, andThreadMessage. - Rename "AI Studio" to "AI Foundry" in package documents and samples, following recent rebranding.
Breaking Changes
- The method
.agents.get_messageswas removed. Please use.agents.list_messagesinstead.
1.0.0b2 (2024-12-03)
Bugs Fixed
- Fix a bug in the
.inferenceoperations when Entra ID authentication is used by the default connection. - Fixed bugs occurring during streaming in function tool calls by asynchronous agents.
- Fixed bugs that were causing issues with tracing agent asynchronous functionality.
- Fix a bug causing warning about unclosed session, shown when using asynchronous credentials to create agent.
- Fix a bug that would cause agent function tool related function names and parameters to be included in traces even when content recording is not enabled.
1.0.0b1 (2024-11-15)
Features Added
First beta version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file azure_ai_projects-1.0.0b8.tar.gz.
File metadata
- Download URL: azure_ai_projects-1.0.0b8.tar.gz
- Upload date:
- Size: 310.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e48bf15710cdf40dd3fa1ac0448266bf599dc10c6477aa69ac5c250daef236e
|
|
| MD5 |
2cf28c67f6e5c3a353f10b60a2d810e5
|
|
| BLAKE2b-256 |
838566da3fe4affd182aa7788f212a1936a56a700bcbcafe157147a416f38e11
|
File details
Details for the file azure_ai_projects-1.0.0b8-py3-none-any.whl.
File metadata
- Download URL: azure_ai_projects-1.0.0b8-py3-none-any.whl
- Upload date:
- Size: 190.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9636aeaa573449d4cff6a38c44cfc16ad08a4f7a598e953654eece5a9f209ec2
|
|
| MD5 |
b5a67bde10866f06931fb411c845e382
|
|
| BLAKE2b-256 |
9cc39071dcf8e383cf193253baccbbcdd5eeab181a388628ce51f98a7fb4c104
|