Skip to content

participant

Participant ORM Model

Defines the Participant class, which represents common metadata for agents and users within the Eleanor framework.

Attributes

ParticipantType module-attribute

ParticipantType = Literal['user', 'agent']

Classes

Participant

Bases: Base

Conversation participant metadata, a participant can be either a human user or AI agent.

The main constraint to understand is that for a given namespace a participant (again an agent or user) must have a globally unique name. This is to ensure there is no confusion regarding the identify of any combination of agents and users within a given namespace.

Attributes

__tablename__ class-attribute instance-attribute
__tablename__ = 'participant'
activity_sessions class-attribute instance-attribute
activity_sessions: Mapped[List[ActivitySession]] = (
    relationship(
        secondary="activity_session_participant",
        back_populates="participants",
    )
)
deleted class-attribute instance-attribute
deleted: Mapped[bool] = mapped_column(
    default=False, comment="Participant soft delete flag"
)
description class-attribute instance-attribute
description: Mapped[Optional[str]] = mapped_column(
    Text,
    nullable=True,
    comment="Free-form description of the participant",
)
enabled class-attribute instance-attribute
enabled: Mapped[bool] = mapped_column(
    default=True,
    comment="Flag indicating whether the participant is enabled or not",
)
managed class-attribute instance-attribute
managed: Mapped[bool] = mapped_column(
    default=False,
    comment="When true, indicates that this resource is managed by the system and should not be modified by users.",
)
name class-attribute instance-attribute
name: Mapped[str] = mapped_column(
    String(RESOURCE_NAME_LEN), comment="Participant name"
)
namespace class-attribute instance-attribute
namespace: Mapped[Namespace] = relationship(
    back_populates="participants"
)
namespace_pkid class-attribute instance-attribute
namespace_pkid: Mapped[str] = mapped_column(
    ForeignKey("namespace.pkid"),
    comment="Reference to the owning namespace",
)
participant_create_ts class-attribute instance-attribute
participant_create_ts: Mapped[datetime] = mapped_column(
    server_default=now(), comment="Record create timestamp"
)
participant_type class-attribute instance-attribute
participant_type: Mapped[ParticipantType] = mapped_column(
    String(25), comment="Participant type, user or agent"
)
participant_update_ts class-attribute instance-attribute
participant_update_ts: Mapped[datetime] = mapped_column(
    server_default=now(),
    onupdate=current_timestamp(),
    comment="Record update timestamp",
)
pkid class-attribute instance-attribute
pkid: Mapped[str] = mapped_column(
    String(PKID_LEN),
    primary_key=True,
    default=prefixed_uuid(__tablename__),
    comment="Conversation participant identifier",
)

Functions

__mapper_args__
__mapper_args__()
__table_args__
__table_args__()

Functions