---
actual_hours: null
assignees: []
created_at: '2025-08-20T09:27:14.291335'
dependencies: []
description: "Migrate agent-related services to use the new service base classes.\n\
  \n## Services to Migrate\n- AgentDeploymentService\n- AgentManager  \n- AgentRegistry\n\
  - AgentMemoryManager\n- AgentLifecycleManager\n\n## Target Base Classes\n- AsyncServiceBase:\
  \ For async agent services\n- ManagerBase: For AgentManager and AgentRegistry\n\
  - ConfigServiceBase: For configuration-heavy services\n- ServiceFactory: For standardized\
  \ creation\n\n## Implementation Steps\n1. Identify appropriate base class for each\
  \ service\n2. Refactor __init__ methods to use base class patterns\n3. Replace duplicate\
  \ configuration loading with ConfigServiceBase\n4. Standardize state management\
  \ with lifecycle base classes\n5. Update service factory registrations\n6. Test\
  \ all agent operations\n\n## Expected Outcomes\n- ~40% code reduction in agent services\n\
  - Consistent configuration loading\n- Standardized state management\n- Better error\
  \ handling and logging\n\n## Files to Modify\n- src/claude_mpm/services/agents/*.py\n\
  - Service factory registrations\n\n## Testing Requirements\n- All agent operations\
  \ must work correctly\n- Configuration loading must be preserved\n- State management\
  \ must be consistent"
due_date: null
estimated_hours: null
id: TSK-0132
labels: []
metadata:
  blocked_by: []
  blocks: []
  epic: EP-0002
  estimate: 2h
  github_id: I_kwDOPScCe87HDEsf
  github_url: https://github.com/bobmatnyc/claude-mpm/issues/48
  parent: null
  platform: github
  subtasks: []
parent: null
priority: high
status: completed
tags: []
title: Migrate Agent services to use base classes
updated_at: '2025-08-20T16:34:41.579191'
---

# Migrate Agent services to use base classes

## Description
Migrate agent-related services to use the new service base classes.

## Services to Migrate
- AgentDeploymentService
- AgentManager  
- AgentRegistry
- AgentMemoryManager
- AgentLifecycleManager

## Target Base Classes
- AsyncServiceBase: For async agent services
- ManagerBase: For AgentManager and AgentRegistry
- ConfigServiceBase: For configuration-heavy services
- ServiceFactory: For standardized creation

## Implementation Steps
1. Identify appropriate base class for each service
2. Refactor __init__ methods to use base class patterns
3. Replace duplicate configuration loading with ConfigServiceBase
4. Standardize state management with lifecycle base classes
5. Update service factory registrations
6. Test all agent operations

## Expected Outcomes
- ~40% code reduction in agent services
- Consistent configuration loading
- Standardized state management
- Better error handling and logging

## Files to Modify
- src/claude_mpm/services/agents/*.py
- Service factory registrations

## Testing Requirements
- All agent operations must work correctly
- Configuration loading must be preserved
- State management must be consistent

## Details
- **Status**: completed
- **Priority**: high
- **Assignees**: None
- **Tags**: None
- **Created**: 2025-08-20 09:27:14
- **Updated**: 2025-08-20 16:34:41

## Tasks
- [ ] Add task items here

## Notes
_Add any additional notes or context here._
