dynamic_persona_service
Eleanor Framework Dynamic Persona Service Module.
Dynamic personas are generated by compressing passed memories via a map-reduce operation. The resulting summary represents the agent’s new and updated persona and will be used in place of the Agent’s original persona configured in the RDBMS. This has the effect of allowing the agent to evolve its persona over time based on past learnings ane experiences. The dynamic persona operation is expensive and is triggered via a job.
Attributes
Classes
DynamicPersonaService
Bases: BaseService
Attributes
activity_session_dao
instance-attribute
activity_session_dao = ActivitySessionDao(
session=sa_session
)
activity_session_participant_dao
instance-attribute
activity_session_participant_dao = (
ActivitySessionParticipantDao(session=sa_session)
)
chain_service
instance-attribute
chain_service = ChainService(
sa_session=sa_session, neo4j_session=neo4j_session
)
memory_collection_dao
instance-attribute
memory_collection_dao = MemoryCollectionDao(
session=sa_session
)
Functions
generate_dynamic_persona
generate_dynamic_persona(
agent_pkid: str,
min_memories: int | None = None,
max_memories: int | None = None,
collections: List[MemoryCollection] | None = None,
reduce_batch_size: int | None = None,
trace_session_id: Optional[str] = None,
) -> str