# This file was auto-generated by Fern from our API Definition.

from ..core.unchecked_base_model import UncheckedBaseModel
import pydantic
from .manager_type import ManagerType
import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class Group(UncheckedBaseModel):
    id: str = pydantic.Field()
    """
    The id of the group. Assigned by the database.
    """

    manager_type: ManagerType = pydantic.Field()
    """
    
    """

    agent_ids: typing.List[str] = pydantic.Field()
    """
    
    """

    description: str = pydantic.Field()
    """
    
    """

    shared_block_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    
    """

    manager_agent_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    
    """

    termination_token: typing.Optional[str] = pydantic.Field(default=None)
    """
    
    """

    max_turns: typing.Optional[int] = pydantic.Field(default=None)
    """
    
    """

    sleeptime_agent_frequency: typing.Optional[int] = pydantic.Field(default=None)
    """
    
    """

    turns_counter: typing.Optional[int] = pydantic.Field(default=None)
    """
    
    """

    last_processed_message_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    
    """

    max_message_buffer_length: typing.Optional[int] = pydantic.Field(default=None)
    """
    The desired maximum length of messages in the context window of the convo agent. This is a best effort, and may be off slightly due to user/assistant interleaving.
    """

    min_message_buffer_length: typing.Optional[int] = pydantic.Field(default=None)
    """
    The desired minimum length of messages in the context window of the convo agent. This is a best effort, and may be off-by-one due to user/assistant interleaving.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
