Skip to content

Migrate from pyautogen to ag2 Library #1767

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 1 commit into
base: next
Choose a base branch
from

Conversation

AG2AI-Admin
Copy link

@AG2AI-Admin AG2AI-Admin commented Jul 18, 2025

Hey there! This is AG2 👋

First of all, thank you for using AG2! We've seen you're using pyautogen, and we're here to help you migrate to ag2.

This pull request is designed to help update this codebase by smoothly transitioning from the pyautogen library to the new ag2 library.

Why the change? pyautogen is being deprecated, and ag2 is now the recommended successor for ongoing development.

The good news is, there is no syntax difference between pyautogen and ag2 – this migration primarily involves updating library imports and usage.

This update will ensure the project stays compatible with the latest tools and can benefit from all the improvements in the ag2 ecosystem.

Could you please take a moment to review and merge this at your earliest convenience? Your collaboration is much appreciated! Thank you!


EntelligenceAI PR Summary

This PR updates the autogen provider's dependencies to use the 'ag2' package instead of 'pyautogen'.

  • Replaced 'pyautogen>=0.2.19' with 'ag2>=0.2.19' in pyproject.toml and setup.py
  • No other code or configuration changes

@sohamganatra
Copy link

Walkthrough

This pull request updates the dependency management for the autogen provider by replacing the 'pyautogen' package with 'ag2' (both at version >=0.2.19) in both the pyproject.toml and setup.py files. This change likely reflects a package rename or migration and ensures that future installations and builds use the new package. No other logic or configuration changes are introduced in this update.

Changes

File(s) Summary
python/providers/autogen/pyproject.toml
python/providers/autogen/setup.py Updated dependency from 'pyautogen>=0.2.19' to 'ag2>=0.2.19' in the dependencies/install_requires list. No other changes made.

Sequence Diagram

This diagram shows the interactions between components:

sequenceDiagram
    title Package Dependency Change: pyautogen to ag2
    
    participant App as "Application"
    participant Provider as "Autogen Provider"
    participant PyAutogen as "pyautogen>=0.2.19"
    participant AG2 as "ag2>=0.2.19"
    participant Dependencies as "Other Dependencies"
    
    Note over Provider: Before Change
    App->>Provider: Import/Use
    activate Provider
    Provider->>PyAutogen: Import/Use
    activate PyAutogen
    PyAutogen-->>Provider: Provide functionality
    deactivate PyAutogen
    Provider->>Dependencies: Import/Use<br>(flaml, autogen_core, autogen_agentchat)
    activate Dependencies
    Dependencies-->>Provider: Provide functionality
    deactivate Dependencies
    Provider-->>App: Return results
    deactivate Provider
    
    Note over Provider: After Change
    App->>Provider: Import/Use
    activate Provider
    Provider->>AG2: Import/Use
    activate AG2
    AG2-->>Provider: Provide functionality
    deactivate AG2
    Provider->>Dependencies: Import/Use<br>(flaml, autogen_core, autogen_agentchat)
    activate Dependencies
    Dependencies-->>Provider: Provide functionality
    deactivate Dependencies
    Provider-->>App: Return results
    deactivate Provider
    
    Note over Provider, AG2: Package dependency changed<br>from pyautogen to ag2<br>while maintaining version requirement
Loading

▶️AI Code Reviews for VS Code, Cursor, Windsurf
Install the extension

Note for Windsurf Please change the default marketplace provider to the following in the windsurf settings:

Marketplace Extension Gallery Service URL: https://marketplace.visualstudio.com/_apis/public/gallery

Marketplace Gallery Item URL: https://marketplace.visualstudio.com/items

Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts below

Emoji Descriptions:

  • ⚠️ Potential Issue - May require further investigation.
  • 🔒 Security Vulnerability - Fix to ensure system safety.
  • 💻 Code Improvement - Suggestions to enhance code quality.
  • 🔨 Refactor Suggestion - Recommendations for restructuring code.
  • ℹ️ Others - General comments and information.

Interact with the Bot:

  • Send a message or request using the format:
    @entelligenceai + *your message*
Example: @entelligenceai Can you suggest improvements for this code?
  • Help the Bot learn by providing feedback on its responses.
    @entelligenceai + *feedback*
Example: @entelligenceai Do not comment on `save_auth` function !

Also you can trigger various commands with the bot by doing
@entelligenceai command

The current supported commands are

  1. config - shows the current config
  2. retrigger_review - retriggers the review

More commands to be added soon.

@sohamganatra
Copy link

LGTM 👍

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

Successfully merging this pull request may close these issues.

2 participants