Plugin
autogen.beta.plugin.Plugin #
Plugin(*, prompt=(), hitl_hook=None, tools=(), middleware=(), observers=(), dependencies=None, variables=None)
Bases: PromptObserverMixin
Source code in autogen/beta/plugin.py
hitl_hook #
Source code in autogen/beta/plugin.py
add_tool #
prompt #
prompt(func: None = None) -> Callable[[PromptHook], PromptHook]
Source code in autogen/beta/plugin.py
observer #
Source code in autogen/beta/plugin.py
tool #
tool(function=None, *, name=None, description=None, schema=None, sync_to_thread=True, middleware=())
Source code in autogen/beta/plugin.py
add_middleware #
Append middleware as the innermost wrapper in the chain.
The added middleware is called last on turn entry and first on turn exit, executing closer to the LLM call than any middleware already registered.
Source code in autogen/beta/plugin.py
insert_middleware #
Insert middleware as the outermost wrapper in the chain.
The inserted middleware is called first on turn entry and last on turn exit, executing before all middleware already registered.
Source code in autogen/beta/plugin.py
add_policy #
Append an assembly policy to the chain.
Policies run in order; a newly added policy runs after existing ones. Construction-time ordering validation (warning on suspicious sequences) only runs over policies passed via assembly= — late additions skip the check, so callers should be confident in the ordering they introduce.