Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 2 additions & 37 deletions src/oss/langchain/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,47 +29,11 @@ We recommend you use LangChain if you want to quickly build agents and autonomou

LangChain [agents](/oss/langchain/agents) are built on top of LangGraph in order to provide durable execution, streaming, human-in-the-loop, persistence, and more. You do not need to know LangGraph for basic LangChain agent usage.

## <Icon icon="download" size={20} /> Install

:::python
<CodeGroup>
```bash pip
pip install -U langchain
# Requires Python 3.10+
```

```bash uv
uv add langchain
# Requires Python 3.10+
```
</CodeGroup>
:::
:::js
<CodeGroup>
```bash npm
npm install langchain @langchain/core
```

```bash pnpm
pnpm add langchain @langchain/core
```

```bash yarn
yarn add langchain @langchain/core
```

```bash bun
bun add langchain @langchain/core
```
</CodeGroup>
:::

## <Icon icon="wand-magic-sparkles" /> Create an agent

:::python
```python
# pip install -qU "langchain[anthropic]" to call the model

# pip install -qU langchain "langchain[anthropic]"
from langchain.agents import create_agent

def get_weather(city: str) -> str:
Expand Down Expand Up @@ -119,6 +83,7 @@ console.log(
```
:::

See the [Installation instructions](/oss/langchain/install) and [Quickstart guide](/oss/langchain/quickstart) to get started building your own agents and applications with LangChain.

## <Icon icon="star" size={20} /> Core benefits

Expand Down
22 changes: 17 additions & 5 deletions src/oss/langchain/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@ title: Quickstart

This quickstart takes you from a simple setup to a fully functional AI agent in just a few minutes.

## Requirements

For these examples, you will need to:

* [Install](/oss/langchain/install) the LangChain package
* Set up a [Claude (Anthropic)](https://www.anthropic.com/) account and get an API key
* Set the `ANTHROPIC_API_KEY` environment variable in your terminal

<Tip>
**LangChain Docs MCP server**

If you're using an AI coding assistant, you should install the [LangChain Docs MCP server](/use-these-docs) to get the most out of it. This ensures your agent has access to the latest documentation and examples.
</Tip>

## Build a basic agent

Start by creating a simple agent that can answer questions and call tools. The agent will use Claude Sonnet 4.5 as its language model, a basic weather function as a tool, and a simple prompt to guide its behavior.

<Info>
For this example, you will need to set up a [Claude (Anthropic)](https://www.anthropic.com/) account and get an API key. Then, set the `ANTHROPIC_API_KEY` environment variable in your terminal.
</Info>

:::python
```python
from langchain.agents import create_agent
Expand Down Expand Up @@ -205,7 +215,7 @@ Let's walk through each step:
:::
</Step>
<Step title="Configure your model">
Set up your [language model](/oss/langchain/models) with the right [parameters](/oss/langchain/models#parameters) for your use case:
Set up your [language model](/oss/langchain/models) with the right parameters for your use case:

:::python

Expand All @@ -232,6 +242,8 @@ Let's walk through each step:
);
```
:::

Depending on the model and provider chosen, initialization parameters may vary; refer to their reference pages for details.
</Step>
<Step title="Define response format">
:::python
Expand Down