Skip to main content

Tool use and agents

An exciting use case for LLMs is building natural language interfaces for other β€œtools”, whether those are APIs, functions, databases, etc. LangChain is great for building such interfaces because it has:

  • Good model output parsing, which makes it easy to extract JSON, XML, OpenAI function-calls, etc. from model outputs.
  • A large collection of built-in Tools.
  • Provides a lot of flexibility in how you call these tools.

There are two main ways to use tools: chains and agents.

Chains lets you create a pre-defined sequence of tool usage(s).

chain

Agents let the model use tools in a loop, so that it can decide how many times to use tools.

agent

To get started with both approaches, head to the Quickstart page.


Help us out by providing feedback on this documentation page: