Skip to content

feat: Implement base framework adapter interface #7

@Robbe1991

Description

@Robbe1991

Description

Implement abstract base class for framework adapters (LangChain, AutoGen, CrewAI).

Acceptance Criteria

  • FrameworkAdapter ABC in src/agentgym/integrations/base.py
  • Abstract methods for conversion, tool extraction, environment creation
  • Type hints and docstrings
  • Documentation of adapter interface

Technical Details

from abc import ABC, abstractmethod
from typing import Any, List

class FrameworkAdapter(ABC):
    """Base adapter for framework integrations."""

    @abstractmethod
    def wrap_agent(self, trained_model) -> Any:
        """Wrap trained model for framework."""
        pass

    @abstractmethod
    def extract_tools(self, agent) -> List:
        """Extract tools from framework agent."""
        pass

    @abstractmethod
    def create_environment(self, agent):
        """Create training environment from agent."""
        pass

Estimated Time

2-3 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions