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 property kv_store: dict
abstract invoke(input: dict, config: RunnableConfig | None = None, **kwargs: Any) Any

Transform a single input into an output.

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 as_tool(**kwargs) Any

Convert the agent to a tool to be used by other agents via delegation.

Parameters:

kwargs – Additional arguments to pass to the tool. See motleycrew.tools.tool.MotleyTool for more details.