diff --git a/docs/source/en/reference/agents.md b/docs/source/en/reference/agents.md index fa01878..bfe41fe 100644 --- a/docs/source/en/reference/agents.md +++ b/docs/source/en/reference/agents.md @@ -38,6 +38,7 @@ Both require arguments `model` and list of tools `tools` at initialization. ### Classes of agents + [[autodoc]] MultiStepAgent [[autodoc]] CodeAgent diff --git a/src/smolagents/agents.py b/src/smolagents/agents.py index 4dde2fc..416d221 100644 --- a/src/smolagents/agents.py +++ b/src/smolagents/agents.py @@ -162,6 +162,20 @@ class MultiStepAgent: """ Agent class that solves the given task step by step, using the ReAct framework: While the objective is not reached, the agent will perform a cycle of action (given by the LLM) and observation (obtained from the environment). + + Args: + tools (`list[[`Tool`]]`): List of tools that the agent can use. + model (Callable[[list[dict[str, str]]], [`ChatMessage`]]): Model that will generate the agent's actions. + system_prompt (`str`, *optional*): System prompt that will be used to generate the agent's actions. + tool_description_template (`str`, *optional*): Template used to describe the tools in the system prompt. + max_steps (`int`, default `6`): Maximum number of steps the agent can take to solve the task. + tool_parser (`Callable`, *optional*): Function used to parse the tool calls from the LLM output. + add_base_tools (`bool`, default `False`): Whether to add the base tools to the agent's tools. + verbosity_level (`int`, default `1`): Level of verbosity of the agent's logs. + grammar (`dict[str, str]`, *optional*): Grammar used to parse the LLM output. + managed_agents (`list`, *optional*): List of managed agents that the agent can call. + step_callbacks (`list[Callable]`, *optional*): List of callbacks that will be called at each step. + planning_interval (`int`, *optional*): Interval at which the agent will run a planning step. """ def __init__(