from pydantic import BaseModel


class AgentCreate(BaseModel):
    name: str
    role: str
    description: str | None = None
    system_prompt: str


class AgentOut(BaseModel):
    id: str
    name: str
    role: str
    description: str | None
    is_active: bool
    is_default: bool

    model_config = {"from_attributes": True}


class AgentMessageOut(BaseModel):
    id: str
    agent_id: str
    conversation_id: str
    role: str
    content: str

    model_config = {"from_attributes": True}


class AgentStats(BaseModel):
    agent_id: str
    call_count: int
    current_task: str | None
    status: str  # active | idle | disabled


class AgentConfigUpdate(BaseModel):
    name: str | None = None
    description: str | None = None
    system_prompt: str | None = None
    enabled: bool | None = None


class AgentConfigOut(BaseModel):
    id: str
    name: str
    role: str
    description: str | None
    system_prompt: str
    enabled: bool
    is_active: bool

    model_config = {"from_attributes": True}
