Add agent role management system for Bees-AgenticWorkers integration
Backend: - Database migration for agent role fields and predefined roles - AgentRole and AgentCollaboration models - Updated Agent model with role-based fields Frontend: - AgentRoleSelector component for role assignment - CollaborationDashboard for monitoring agent interactions - AgentManagement interface with role analytics 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from sqlalchemy import Column, Integer, String, DateTime, JSON
|
||||
from sqlalchemy import Column, Integer, String, DateTime, JSON, Text
|
||||
from sqlalchemy.sql import func
|
||||
from sqlalchemy.orm import relationship
|
||||
from ..core.database import Base
|
||||
@@ -24,6 +24,14 @@ class Agent(Base):
|
||||
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|
||||
last_seen = Column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
# Role-based collaboration fields
|
||||
role = Column(String, nullable=True) # Role from Bees-AgenticWorkers
|
||||
system_prompt = Column(Text, nullable=True) # Role-specific system prompt
|
||||
reports_to = Column(JSON, nullable=True) # Array of roles this agent reports to
|
||||
expertise = Column(JSON, nullable=True) # Array of expertise areas
|
||||
deliverables = Column(JSON, nullable=True) # Array of deliverables
|
||||
collaboration_settings = Column(JSON, nullable=True) # Collaboration preferences
|
||||
|
||||
# Relationships
|
||||
tasks = relationship("Task", back_populates="assigned_agent")
|
||||
|
||||
@@ -45,5 +53,13 @@ class Agent(Base):
|
||||
"performance_targets": self.performance_targets,
|
||||
"created_at": self.created_at.isoformat() if self.created_at else None,
|
||||
"updated_at": self.updated_at.isoformat() if self.updated_at else None,
|
||||
"last_seen": self.last_seen.isoformat() if self.last_seen else None
|
||||
"last_seen": self.last_seen.isoformat() if self.last_seen else None,
|
||||
|
||||
# Role-based fields
|
||||
"role": self.role,
|
||||
"system_prompt": self.system_prompt,
|
||||
"reports_to": self.reports_to,
|
||||
"expertise": self.expertise,
|
||||
"deliverables": self.deliverables,
|
||||
"collaboration_settings": self.collaboration_settings
|
||||
}
|
||||
Reference in New Issue
Block a user