Skip to content

New Python Agents SDK #40633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

New Python Agents SDK #40633

wants to merge 5 commits into from

Conversation

dargilco
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 21, 2025 18:43
@github-actions github-actions bot added the AI label Apr 21, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the new Python Agents SDK for Azure AI Agents with both asynchronous and synchronous clients, along with configuration, type definitions, and helper modules. It also adds documentation for the FunctionTool for defining and invoking functions in agents.

  • Added aio and sync client implementations.
  • Introduced new configuration, types, and vendor modules.
  • Provided documentation and examples with FunctionTool and updated version information.

Reviewed Changes

Copilot reviewed 143 out of 146 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/ai/azure-ai-agents/azure/ai/agents/aio/_operations/init.py Initialization for async operations module.
sdk/ai/azure-ai-agents/azure/ai/agents/aio/_configuration.py New configuration class for async client.
sdk/ai/azure-ai-agents/azure/ai/agents/aio/_client.py Added asynchronous client; potential endpoint bug.
sdk/ai/azure-ai-agents/azure/ai/agents/aio/init.py Updated async module initialization.
sdk/ai/azure-ai-agents/azure/ai/agents/_version.py Version constant added.
sdk/ai/azure-ai-agents/azure/ai/agents/_vendor.py Added vendor helpers and types.
sdk/ai/azure-ai-agents/azure/ai/agents/_types.py New type definitions.
sdk/ai/azure-ai-agents/azure/ai/agents/_operations/_patch.py Patch module for SDK customizations.
sdk/ai/azure-ai-agents/azure/ai/agents/_operations/init.py Initialization for sync operations module.
sdk/ai/azure-ai-agents/azure/ai/agents/_configuration.py New configuration class for sync client.
sdk/ai/azure-ai-agents/azure/ai/agents/_client.py Added synchronous client; potential endpoint bug.
sdk/ai/azure-ai-agents/azure/ai/agents/init.py Package initialization and version exposure.
sdk/ai/azure-ai-agents/azure/ai/init.py Package path extension.
sdk/ai/azure-ai-agents/azure/init.py Package path extension.
sdk/ai/azure-ai-agents/LICENSE License file added.
sdk/ai/azure-ai-agents/FunctionTool.md Documentation for using FunctionTool.
sdk/ai/azure-ai-agents/CHANGELOG.md Initial changelog with release notes.
Files not reviewed (3)
  • sdk/ai/azure-ai-agents/MANIFEST.in: Language not supported
  • sdk/ai/azure-ai-agents/apiview-properties.json: Language not supported
  • sdk/ai/azure-ai-agents/assets.json: Language not supported
Comments suppressed due to low confidence (1)

sdk/ai/azure-ai-agents/FunctionTool.md:20

  • The sample function 'fetch_weather' uses json.dumps without importing the json module. Consider adding 'import json' at the beginning of the code snippet to ensure the example runs as intended.
weather_json = json.dumps({"weather": weather})

def __init__(
self, endpoint: str, credential: Union[AzureKeyCredential, "AsyncTokenCredential"], **kwargs: Any
) -> None:
_endpoint = "{endpoint}"
Copy link
Preview

Copilot AI Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base URL is set to the literal string '{endpoint}' instead of using the actual endpoint value. Consider using the provided endpoint parameter (for example, by directly using endpoint or formatting it as an f-string: f"{endpoint}").

Suggested change
_endpoint = "{endpoint}"
_endpoint = endpoint

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

"""

def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
_endpoint = "{endpoint}"
Copy link
Preview

Copilot AI Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The synchronous client is also setting _endpoint to the literal string '{endpoint}'. It should use the actual endpoint value provided, for example via f-string formatting or directly assigning endpoint.

Suggested change
_endpoint = "{endpoint}"
_endpoint = endpoint

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants