Skip to content

refactor(agents): migrate 3 agents to StandardizedAgent base class (#3387)#3989

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-3387
Apr 8, 2026
Merged

refactor(agents): migrate 3 agents to StandardizedAgent base class (#3387)#3989
mrveiss merged 1 commit intoDev_new_guifrom
issue-3387

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 8, 2026

Summary

Migrated 3 high-priority agents to inherit from StandardizedAgent base class:

  • JSONFormatterAgent — JSON parsing utility (parse, validate actions)
  • InteractiveTerminalAgent — PTY/terminal wrapper (start session, send input, signals)
  • SystemCommandAgent — Command execution wrapper (execute, install tools, validate)

Changes

  • Added StandardizedAgent base class inheritance to all 3 agents
  • Registered action handlers for each agent's primary operations
  • Implemented _get_system_prompt() and get_capabilities() abstract methods
  • Preserved all existing public methods and module-level singletons for backward compatibility
  • Integrated with StandardizedAgent's error handling and performance tracking

Migration Pattern

All 3 agents now follow the standard pattern:

class MyAgent(StandardizedAgent):
    def __init__(self):
        super().__init__("agent_type_id")
        self.register_actions({
            "action_name": ActionHandler(handler_method="handle_action", ...)
        })
    
    async def handle_action(self, request: AgentRequest) -> Any:
        # Action handler implementation
        return result
    
    def _get_system_prompt(self) -> str:
        return "agent system prompt"
    
    def get_capabilities(self) -> List[str]:
        return ["capability1", "capability2"]

Remaining Work

20+ agents remain to be migrated in follow-up PRs. Complex agents (HierarchicalAgent, OverseerAgent, StepExecutorAgent) should be handled separately due to intricate task delegation logic.

Test Plan

  • Code syntax verified
  • Existing methods preserved
  • Action handlers properly registered
  • Integration tests (existing test suite)

Closes #3387

🤖 Generated with Claude Code

…3387)

Migrated JSONFormatterAgent, InteractiveTerminalAgent, and SystemCommandAgent
to inherit from StandardizedAgent. All existing methods and module-level
singletons preserved for backward compatibility.

- Added action handler registration for each agent's primary operations
- Added _get_system_prompt() and get_capabilities() implementations
- Preserved per-session instantiation pattern (InteractiveTerminalAgent)
- Integrated with StandardizedAgent's error handling and performance tracking

20+ agents remain for follow-up PRs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss mrveiss merged commit a11363e into Dev_new_gui Apr 8, 2026
1 of 4 checks passed
@mrveiss mrveiss deleted the issue-3387 branch April 8, 2026 10:02
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.

1 participant