| name | create-mas-agent |
| description | Create a new MAS agent following the BaseAgent pattern. Use when adding a new agent to the Multi-Agent System, creating a specialized agent, or extending agent capabilities. |
Create a New MAS Agent
Pattern
All agents inherit from BaseAgent and follow a consistent structure.
Steps
Agent Creation Progress:
- [ ] Step 1: Create agent file
- [ ] Step 2: Update agents/__init__.py
- [ ] Step 3: Register in system registry
- [ ] Step 4: Test the agent
Step 1: Create the agent file
Create mycosoft_mas/agents/your_agent.py:
"""Your Agent - Brief description of what this agent does."""
from typing import Any, Dict, List, Optional
from mycosoft_mas.agents.base_agent import BaseAgent
class YourAgent(BaseAgent):
"""Description of agent's purpose and capabilities."""
def __init__(self, agent_id: str, name: str, config: Dict[str, Any]):
super().__init__(agent_id=agent_id, name=name, config=config)
.capabilities = [, ]
() -> [, ]:
task_type = task.get(, )
handlers = {
: ._handle_action_1,
: ._handle_action_2,
}
handler = handlers.get(task_type)
handler:
handler(task)
{: , : }
() -> [, ]:
{: , : {}}