Skip to content

KnowledgeConfig

autogen.beta.agent.KnowledgeConfig dataclass #

KnowledgeConfig(store, expose_tool=True, write_event_log=True, compact=None, compact_trigger=None, aggregate=None, aggregate_trigger=None, bootstrap=None)

Groups knowledge-related Agent parameters.

The store is registered into context.dependencies[KnowledgeStore] so policies (e.g. WorkingMemoryPolicy, EpisodicMemoryPolicy) can read from it without an extra parameter. Everything else is a side effect of attaching a store; each is opt-out via its flag below.

ATTRIBUTE DESCRIPTION
store

The backing knowledge store.

TYPE: KnowledgeStore

expose_tool

If True (default), the agent gets an auto-injected knowledge action-group tool that lets the LLM call read / write / list / delete on the store. Set to False when policies are the only consumer of the store and the LLM should not see it.

TYPE: bool

write_event_log

If True (default), the agent persists its stream history to /log/{stream_id}.jsonl at the end of each ask call. Set to False to keep the store free of stream logs (useful when the store is purely user-facing memory).

TYPE: bool

compact,

Optional compaction strategy and its firing rules.

TYPE: compact_trigger

aggregate,

Optional aggregation strategy and its firing rules. Strategy failures emit AggregationFailed on the stream — subscribe to that event for observability.

TYPE: aggregate_trigger

bootstrap

Optional custom bootstrap. None falls back to DefaultBootstrap(mention_tool=expose_tool), so the generated SKILL.md text tells the LLM about the knowledge tool only when the tool is actually exposed.

TYPE: StoreBootstrap | None

store instance-attribute #

store

expose_tool class-attribute instance-attribute #

expose_tool = True

write_event_log class-attribute instance-attribute #

write_event_log = True

compact class-attribute instance-attribute #

compact = None

compact_trigger class-attribute instance-attribute #

compact_trigger = None

aggregate class-attribute instance-attribute #

aggregate = None

aggregate_trigger class-attribute instance-attribute #

aggregate_trigger = None

bootstrap class-attribute instance-attribute #

bootstrap = None