## Agent Types

This categorizes all the available agents along a few dimensions.

**Intended Model Type**

Whether this agent is intended for Chat Models (takes in messages, outputs message) or LLMs (takes in string, outputs string). The main thing this affects is the prompting strategy used. You can use an agent with a different type of model than it is intended for, but it likely won't produce results of the same quality.

**Supports Chat History**

Whether or not these agent types support chat history. If it does, that means it can be used as a chatbot. If it does not, then that means it's more suited for single tasks. Supporting chat history generally requires better models, so earlier agent types aimed at worse models may not support it.

**Supports Multi-Input Tools**

Whether or not these agent types support tools with multiple inputs. If a tool only requires a single input, it is generally easier for an LLM to know how to invoke it. Therefore, several earlier agent types aimed at worse models may not support them.

**Supports Parallel Function Calling**

Having an LLM call multiple tools at the same time can greatly speed up agents whether there are tasks that are assisted by doing so. However, it is much more challenging for LLMs to do this, so some agent types do not support this.

**Required Model Params**

Whether this agent requires the model to support any additional parameters. Some agent types take advantage of things like OpenAI function calling, which require other model parameters. If none are required, then that means that everything is done via prompting

**When to Use**

Our commentary on when you should consider using this agent type.

| Agent Type | Intended Model Type | Supports Chat History | Supports Multi-Input Tools | Supports Parallel Function Calling | Required Model Params | When to Use | API |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Tool Calling](https://python.langchain.com/docs/modules/agents/agent_types/tool_calling/) | Chat | ✅   | ✅   | ✅   | `tools` | If you are using a tool-calling model | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.tool_calling_agent.base.create_tool_calling_agent.html) |
| [OpenAI Tools](https://python.langchain.com/docs/modules/agents/agent_types/openai_tools/) | Chat | ✅   | ✅   | ✅   | `tools` | \[Legacy\] If you are using a recent OpenAI model (`1106` onwards). Generic Tool Calling agent recommended instead. | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.openai_tools.base.create_openai_tools_agent.html) |
| [OpenAI Functions](https://python.langchain.com/docs/modules/agents/agent_types/openai_functions_agent/) | Chat | ✅   | ✅   |     | `functions` | \[Legacy\] If you are using an OpenAI model, or an open-source model that has been finetuned for function calling and exposes the same `functions` parameters as OpenAI. Generic Tool Calling agent recommended instead | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.openai_functions_agent.base.create_openai_functions_agent.html) |
| [XML](https://python.langchain.com/docs/modules/agents/agent_types/xml_agent/) | LLM | ✅   |     |     |     | If you are using Anthropic models, or other models good at XML | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.xml.base.create_xml_agent.html) |
| [Structured Chat](https://python.langchain.com/docs/modules/agents/agent_types/structured_chat/) | Chat | ✅   | ✅   |     |     | If you need to support tools with multiple inputs | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.structured_chat.base.create_structured_chat_agent.html) |
| [JSON Chat](https://python.langchain.com/docs/modules/agents/agent_types/json_agent/) | Chat | ✅   |     |     |     | If you are using a model good at JSON | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.json_chat.base.create_json_chat_agent.html) |
| [ReAct](https://python.langchain.com/docs/modules/agents/agent_types/react/) | LLM | ✅   |     |     |     | If you are using a simple model | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.react.agent.create_react_agent.html) |
| [Self Ask With Search](https://python.langchain.com/docs/modules/agents/agent_types/self_ask_with_search/) | LLM |     |     |     |     | If you are using a simple model and only have one search tool | [Ref](https://api.python.langchain.com/en/latest/agents/langchain.agents.self_ask_with_search.base.create_self_ask_with_search_agent.html) |