motleycrew.common.types
Various types and type protocols used in motleycrew.
- motleycrew.common.types.MotleySupportedTool
Type that represents a tool that is supported by motleycrew. It includes tools from motleycrew, langchain, llama_index, and motleycrew agents.
Classes
|
Type protocol for an agent factory. |
- class motleycrew.common.types.MotleyAgentFactory(*args, **kwargs)
Bases:
Protocol[AgentType]Type protocol for an agent factory.
It is a function that accepts tools as an argument and returns an agent instance of an appropriate class.
Agent factory is typically needed because the agent may need the list of available tools or other context at the time of its creation (e.g. to compose the prompt), and it may not be available at the time of the agent wrapper initialization.
- __init__(*args, **kwargs)