The different abstractions involved in agents are:
Agent: this is where the logic of the application lives. Agents expose an interface that takes in user input
along with a list of previous steps the agent has taken, and returns either an AgentAction or AgentFinish
AgentAction corresponds to the tool to use and the input to that tool
AgentFinish means the agent is done, and has information around what to return to the user
Tools: these are the actions an agent can take. What tools you give an agent highly depend on what you want the agent to do
Toolkits: these are groups of tools designed for a specific use case. For example, in order for an agent to
interact with a SQL database in the best way it may need access to one tool to execute queries and another tool to inspect tables.
Agent Executor: this wraps an agent and a list of tools. This is responsible for the loop of running the agent
iteratively until the stopping criteria is met.
Getting Started: An overview of agents. It covers how to use all things related to agents in an end-to-end manner.
Agent Construction:
Although an agent can be constructed in many way, the typical way to construct an agent is with:
PromptTemplate: this is responsible for taking the user input and previous steps and constructing a prompt
to send to the language model
Language Model: this takes the prompt constructed by the PromptTemplate and returns some output
Output Parser: this takes the output of the Language Model and parses it into an AgentAction or AgentFinish object.
Additional Documentation:
Tools: Different types of tools LangChain supports natively. We also cover how to add your own tools.
Agents: Different types of agents LangChain supports natively. We also cover how to
modify and create your own agents.
Toolkits: Various toolkits that LangChain supports out of the box, and how to
create an agent from them.
rtdocs_stable/api.python.langchain.com/en/stable/modules/agents.html