Skip to content

ConversationPolicy

autogen.beta.policies.conversation.ConversationPolicy #

Only conversation and tool events reach the LLM.

Opt-in policy that re-creates plain-loop semantics: only conversation and tool events reach the LLM, everything else is filtered out. CompactionSummary is included so compacted summaries remain visible.

name class-attribute instance-attribute #

name = 'conversation'

apply async #

apply(prompts, events, context)
Source code in autogen/beta/policies/conversation.py
async def apply(
    self,
    prompts: list[str],
    events: list[BaseEvent],
    context: Context,
) -> tuple[list[str], list[BaseEvent]]:
    filtered = [e for e in events if isinstance(e, CONVERSATION_TYPES)]
    return prompts, filtered