motleycrew.agents.mixins
Classes
A mixin for Langchain-based agents that support output handlers. |
- class motleycrew.agents.mixins.LangchainOutputHandlingAgentMixin
Bases:
objectA mixin for Langchain-based agents that support output handlers.
- get_output_handlers: Callable[[], List[MotleyTool]] = None
- force_output_handler: bool = False
- aux_prompts: AuxPrompts = <motleycrew.common.aux_prompts.AuxPrompts object>
- agent_plan_decorator(func: Callable)
Decorator for Agent.plan() method that intercepts AgentFinish events
- agent_aplan_decorator(func: Callable)
Decorator for Agent.aplan() method that intercepts AgentFinish events
- take_next_step_decorator(func: Callable)
Decorator for
AgentExecutor._take_next_step()andAgentExecutor._atake_next_step()methods that catches DirectOutput exceptions.
- run_tool_direct_decorator(func: Callable)
Decorator of the tool’s run and arun methods, for intercepting a DirectOutput exception