From 04241cdc4c89482a0b8e146595af9c89061cc0d3 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Wed, 26 Nov 2025 12:49:11 -0500 Subject: [PATCH] oss: slight rfc on quickstart --- src/oss/langchain/overview.mdx | 39 ++------------------------------ src/oss/langchain/quickstart.mdx | 22 ++++++++++++++---- 2 files changed, 19 insertions(+), 42 deletions(-) diff --git a/src/oss/langchain/overview.mdx b/src/oss/langchain/overview.mdx index 03172686aa..e0f9b5f0af 100644 --- a/src/oss/langchain/overview.mdx +++ b/src/oss/langchain/overview.mdx @@ -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. -## Install - -:::python - -```bash pip -pip install -U langchain -# Requires Python 3.10+ -``` - -```bash uv -uv add langchain -# Requires Python 3.10+ -``` - -::: -:::js - -```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 -``` - -::: - ## 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: @@ -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. ## Core benefits diff --git a/src/oss/langchain/quickstart.mdx b/src/oss/langchain/quickstart.mdx index 64fc997aae..4231c85ce2 100644 --- a/src/oss/langchain/quickstart.mdx +++ b/src/oss/langchain/quickstart.mdx @@ -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 + + + **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. + + ## 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. - - 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. - - :::python ```python from langchain.agents import create_agent @@ -205,7 +215,7 @@ Let's walk through each step: ::: - 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 @@ -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. :::python