from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime, timezone


@dataclass(slots=True)
class AgentSession:
    session_id: str
    active_rag_session_id: str | None
    created_at: datetime
    updated_at: datetime

    @classmethod
    def create(cls, session_id: str) -> "AgentSession":
        now = datetime.now(timezone.utc)
        return cls(
            session_id=session_id,
            active_rag_session_id=None,
            created_at=now,
            updated_at=now,
        )
