The Evolving Agents Toolkit (EAT) currently utilizes beeai-framework==0.1.4. This version is significantly outdated compared to the latest releases of the BeeAI framework (e.g., v0.1.23 or newer). This migration aims to update EAT to the latest stable version of beeai-framework to leverage new features, bug fixes, performance improvements, and ensure better long-term maintainability and compatibility.
This is a significant undertaking due to the potential for breaking API changes in BeeAI and EAT's deeply integrated custom architecture (MongoDB backend, SmartLibrary, SmartAgentBus, SmartMemory, etc.).
2. Motivation & Benefits
Migrating to the latest BeeAI framework will provide EAT with:
- Access to Latest LLM Integrations & Features: Broader LLM provider support (via LiteLLM), advanced LLM capabilities (e.g., new modalities,
tool_choice).
- Improved Core Agent Capabilities: Enhancements to BeeAI's
ReActAgent (used by EAT's SystemAgent, ArchitectZero, etc.) and access to new agent types (e.g., ToolCallingAgent).
- Bug Fixes, Security, and Performance Improvements: Benefit from numerous fixes and optimizations in BeeAI.
- Enhanced BeeAI Tooling: Access to new built-in tools (
SandboxTool, CodeInterpreterTool) and improvements to existing ones.
- Modernized Framework Internals: Stricter type safety, improved event system (
Emitter, Run.on()), and potentially better agent/tool templating mechanisms.
- Potential for EAT Code Simplification: Evaluate if newer BeeAI features (e.g., caching) can replace or simplify parts of EAT's custom code, particularly the
LLMCache.
- Stay Aligned with Dependency Evolution: Reduce technical debt and make it easier to get community support.
- Enhanced Interoperability: Potential to leverage newer BeeAI communication protocols (e.g., ACP).
3. Proposed Plan & Tasks
This migration will be approached in phases:
Phase 1: Preparation & Investigation (Target BeeAI Version: TBD - e.g., 0.1.23+)
Phase 2: Core Component Migration
- LLMService (
evolving_agents.core.llm_service):
- BeeAI Provider (
evolving_agents.providers.beeai_provider):
- EAT Agents (ReActAgent-based):
- For
SystemAgent, ArchitectZero, MemoryManagerAgent, IntentReviewAgent:
- EAT Tools (BeeAI-based):
- EAT Adapters (OpenAI specific):
Phase 3: Integration & System-Level Adjustments
Phase 4: Testing
Phase 5: Documentation & Finalization
4. Acceptance Criteria
- EAT successfully builds and runs using the target version of
beeai-framework.
- All core EAT functionalities are verified and working as expected:
SystemAgent orchestration.
SmartLibrary operations (create, search, evolve BeeAI components).
SmartAgentBus operations (register, discover, request for BeeAI agents).
SmartMemory operations.
IntentReview system.
LLMCache (EAT's or BeeAI's, as decided).
- All Python examples in the
examples/ directory execute successfully and produce expected outcomes.
- The existing EAT test suite (once fully migrated to MongoDB) passes.
- EAT documentation (
README.md, ARCHITECTURE.md, etc.) is updated to reflect the changes.
- No major performance regressions are observed in key EAT operations.
- Code is well-documented and follows EAT's coding standards.
5. Potential Risks & Challenges
- Extensive Refactoring: Significant code changes will be required across multiple EAT modules.
- Unforeseen Breaking Changes: BeeAI changelogs might not capture all subtle breaking changes or behavioral differences.
- Caching Strategy: Deciding on and implementing the correct caching strategy (EAT's custom vs. BeeAI's internal) will be complex.
- Compatibility with EAT's Custom Systems: Ensuring EAT's MongoDB-centric architecture (SmartLibrary, SmartAgentBus, SmartMemory) integrates smoothly with the new BeeAI version.
- Testing Complexity: Thoroughly testing all aspects of the complex EAT system will be time-consuming.
- Resource Allocation: This migration will require significant, dedicated developer time.
6. Relevant Context & Links
This issue will serve as the main tracker for the migration effort. Sub-tasks can be created for specific components or phases as needed.
The Evolving Agents Toolkit (EAT) currently utilizes
beeai-framework==0.1.4. This version is significantly outdated compared to the latest releases of the BeeAI framework (e.g.,v0.1.23or newer). This migration aims to update EAT to the latest stable version ofbeeai-frameworkto leverage new features, bug fixes, performance improvements, and ensure better long-term maintainability and compatibility.This is a significant undertaking due to the potential for breaking API changes in BeeAI and EAT's deeply integrated custom architecture (MongoDB backend, SmartLibrary, SmartAgentBus, SmartMemory, etc.).
2. Motivation & Benefits
Migrating to the latest BeeAI framework will provide EAT with:
tool_choice).ReActAgent(used by EAT'sSystemAgent,ArchitectZero, etc.) and access to new agent types (e.g.,ToolCallingAgent).SandboxTool,CodeInterpreterTool) and improvements to existing ones.Emitter,Run.on()), and potentially better agent/tool templating mechanisms.LLMCache.3. Proposed Plan & Tasks
This migration will be approached in phases:
Phase 1: Preparation & Investigation (Target BeeAI Version: TBD - e.g., 0.1.23+)
beeai-framework.v0.1.4to the target version to identify all breaking changes, new features, and deprecations.feat/beeai-latest-migration).requirements.txt: Updatebeeai-frameworkto the target version. Resolve any immediate dependency conflicts. Test basic installation and import.LLMServiceor a basicReActAgent). Document major API signature changes, import path errors, etc.Phase 2: Core Component Migration
evolving_agents.core.llm_service):ChatModel,EmbeddingModelinterfaces in BeeAI (likely viaLiteLLMChatModeland potentially new embedding abstractions in BeeAI).ChatModel/Toolin the target version) against EAT's custom MongoDBLLMCache.LLMCache.LLMCachecontinues to function correctly and, if necessary, disable/override BeeAI's internal caching to prevent conflicts.generate(),embed(),embed_batch(),generate_applicability_text()methods.evolving_agents.providers.beeai_provider):create_agent_instance) to align with new BeeAIAgentFactoryor agent instantiation patterns.execute_agent_instance) to use new BeeAI agentrunmethods or invocation patterns.SystemAgent,ArchitectZero,MemoryManagerAgent,IntentReviewAgent:beeai_framework.agents.react.ReActAgent.AgentMeta,Memory(e.g.,TokenMemory), orRunContextare handled.beeai_framework.tools.tool.Toolare compatible with the latest interface.evolving_agents.tools.tool_factory.DynamicToolandToolFactoryif base BeeAI tool structures have changed.OpenAIToolAdapter,OpenAIGuardrailsAdapter,OpenAITracingAdapter.Phase 3: Integration & System-Level Adjustments
DependencyContainer.evolving_agents.agents.agent_factory.AgentFactoryandevolving_agents.tools.tool_factory.ToolFactorybased on changes inBeeAIProviderand tool/agent interfaces.evolving_agents/templates/beeai_agent_template.txtandevolving_agents/templates/beeai_tool_template.txtto generate code compatible with the new BeeAI version.evolving_agents.config.pyand.env.examplefor any new or changed configuration variables required by the new BeeAI framework or EAT's adaptations.importstatements frombeeai_frameworkthroughout the EAT codebase (ref: BeeAI v0.1.12 breaking changes).Phase 4: Testing
SmartLibrarycomponent creation and retrieval (especially for BeeAI-based components).SmartAgentBusregistration and capability requests involving BeeAI agents.SystemAgent's core orchestration loop with migrated components.SmartMemoryinteractions (ContextBuilderTool,ExperienceRecorderToolviaMemoryManagerAgent).IntentReviewsystem for BeeAI-related plans.examples/directory.examples/invoice_processing/architect_zero_comprehensive_demo.pyas a full system test.examples/smart_memory_enhancement_real_evolution_demo.py(andscripts/test_smart_memory.py).Phase 5: Documentation & Finalization
README.md: Update BeeAI version, any relevant architectural diagrams or descriptions.docs/ARCHITECTURE.md: Reflect any changes due to BeeAI updates.docs/MONGO-SETUP.md,docs/TUTORIAL.md: Ensure they remain accurate.4. Acceptance Criteria
beeai-framework.SystemAgentorchestration.SmartLibraryoperations (create, search, evolve BeeAI components).SmartAgentBusoperations (register, discover, request for BeeAI agents).SmartMemoryoperations.IntentReviewsystem.LLMCache(EAT's or BeeAI's, as decided).examples/directory execute successfully and produce expected outcomes.README.md,ARCHITECTURE.md, etc.) is updated to reflect the changes.5. Potential Risks & Challenges
6. Relevant Context & Links
requirements.txt: [link to EAT's requirements.txt on GitHub]evolving_agents/core/llm_service.pyevolving_agents/providers/beeai_provider.pyevolving_agents/agents/(SystemAgent, ArchitectZero, etc.)evolving_agents/tools/tool_factory.py&evolving_agents/agents/agent_factory.pyevolving_agents/templates/This issue will serve as the main tracker for the migration effort. Sub-tasks can be created for specific components or phases as needed.