motleycrew.agents.abstract_parent

Classes

MotleyAgentAbstractParent()

Abstract class for describing agents.

class motleycrew.agents.abstract_parent.MotleyAgentAbstractParent

Bases: Runnable, ABC

Abstract class for describing agents.

Agents in motleycrew implement the Langchain Runnable interface.

abstract invoke(input: dict, config: RunnableConfig | None = None, **kwargs: Any) Any

Transform a single input into an output. Override to implement.

Parameters:
  • input – The input to the Runnable.

  • config – A config to use when invoking the Runnable. The config supports standard keys like ‘tags’, ‘metadata’ for tracing purposes, ‘max_concurrency’ for controlling how much work to do in parallel, and other keys. Please refer to the RunnableConfig for more details.

Returns:

The output of the Runnable.

abstract call_as_tool(*args, **kwargs) Any

Method that is called when the agent is used as a tool by another agent.