Skip to content

[EPIC] Establish a New Top-Level Namespace for AG2 Framework Transition to Version 1.x #1557

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
davorrunje opened this issue Apr 7, 2025 · 0 comments
Assignees

Comments

@davorrunje
Copy link
Collaborator

davorrunje commented Apr 7, 2025

Context:

The AG2 framework is currently operating under the autogen namespace in its 0.x versions. As we prepare for the major 1.x release, we plan to introduce a new top-level namespace, ag2, while maintaining backward compatibility with the existing 0.x codebase under the autogen namespace. This change will allow us to structure the framework in a more maintainable and scalable way while still supporting legacy code.

  • Namespace Transition: The ag2 namespace will contain asynchronous, MCP-first code for the new 1.x version, while the autogen namespace will continue to support legacy code in the 0.x version.
  • Async-Only Code: The new ag2 namespace will focus on asynchronous operations, leveraging Python’s asyncio for concurrency, ensuring better performance and scalability.
  • MCP-First Approach: By adopting a Model Context Protocol (MCP)-first approach in the ag2 namespace, we aim to reduce the number of dependencies that have become increasingly difficult to manage. MCP will simplify communication between AG2 and external systems, ensuring that dependencies are minimized and controlled.

Reasoning:

  1. Namespace Alignment and Maintainability:

    • The ag2 namespace will focus on modernizing the framework with asynchronous programming and MCP integration, while the legacy autogen namespace ensures that existing 0.x applications continue to work as-is. This dual-namespace approach allows us to cleanly separate new features from legacy code, making the system more maintainable.
  2. Asynchronous Programming Support:

    • Migrating the new code to be async-only within the ag2 namespace will enhance the framework’s ability to handle multiple concurrent tasks without blocking operations, leading to better performance and scalability.
  3. MCP-First Approach for Dependency Reduction:

    • The current framework has a large and growing number of dependencies that are difficult to manage. By adopting the MCP protocol, we aim to streamline the system’s communication architecture and reduce the number of external dependencies. This protocol ensures a standardized, context-driven communication model between AG2 and external systems, simplifying the codebase and making it easier to maintain.

Deliverables:

  • New ag2 Namespace: The ag2 namespace will contain asynchronous code and MCP integration, designed for performance and scalability in the 1.x version of the framework.
  • Backward Compatibility with autogen: The legacy autogen namespace will continue to support existing 0.x code, with no disruption to legacy applications.
  • Testing Suite: Tests to ensure both backward compatibility for autogen and the correctness of async behavior and MCP integration in ag2.
  • Updated Documentation: Clear documentation on the ag2 namespace and migration paths for developers, including instructions for using both namespaces effectively.

Impact:

This dual-namespace strategy allows AG2 to modernize and scale without breaking existing systems. By introducing the ag2 namespace with asynchronous features and MCP integration, we will significantly improve the framework’s maintainability and scalability. Meanwhile, legacy code in the autogen namespace will continue to work as expected, ensuring a smooth transition for users of the 0.x version.

@davorrunje davorrunje moved this to In Progress in ag2 Apr 7, 2025
@davorrunje davorrunje added this to ag2 Apr 7, 2025
@davorrunje davorrunje self-assigned this Apr 7, 2025
@davorrunje davorrunje changed the title [EPIC] New ag2 namespace for the new MCP-first API [EPIC] Establish a New Top-Level Namespace for AG2 Framework Transition to Version 1.x Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant