Skip to content

Commit 78cdad7

Browse files
hwchase17mdrxy
authored andcommitted
Harrison/changes (#851)
1 parent 7527332 commit 78cdad7

File tree

6 files changed

+32
-35
lines changed

6 files changed

+32
-35
lines changed

src/docs.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@
176176
{
177177
"group": "Advanced usage",
178178
"pages": [
179-
"oss/python/langchain/long-term-memory",
180-
"oss/python/langchain/context-engineering",
179+
"oss/python/langchain/middleware",
181180
"oss/python/langchain/structured-output",
181+
"oss/python/langchain/runtime",
182+
"oss/python/langchain/context-engineering",
182183
"oss/python/langchain/mcp",
183184
"oss/python/langchain/human-in-the-loop",
184185
"oss/python/langchain/multi-agent",
185186
"oss/python/langchain/retrieval",
186-
"oss/python/langchain/runtime",
187-
"oss/python/langchain/middleware"
187+
"oss/python/langchain/long-term-memory"
188188
]
189189
},
190190
{
@@ -1197,15 +1197,15 @@
11971197
{
11981198
"group": "Advanced usage",
11991199
"pages": [
1200-
"oss/javascript/langchain/long-term-memory",
1201-
"oss/javascript/langchain/context-engineering",
1200+
"oss/javascript/langchain/middleware",
12021201
"oss/javascript/langchain/structured-output",
1202+
"oss/javascript/langchain/runtime",
1203+
"oss/javascript/langchain/context-engineering",
12031204
"oss/javascript/langchain/mcp",
12041205
"oss/javascript/langchain/human-in-the-loop",
12051206
"oss/javascript/langchain/multi-agent",
12061207
"oss/javascript/langchain/retrieval",
1207-
"oss/javascript/langchain/runtime",
1208-
"oss/javascript/langchain/middleware"
1208+
"oss/javascript/langchain/long-term-memory"
12091209
]
12101210
},
12111211
{

src/oss/contributing/comarketing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Co-marketing
33
---
44

5-
With over 20 million monthly downloads, LangChain has a large audience of developers building LLM applications. Beyond just listing integrations, we aim to highlight high-quality, educational examples that inspire developers and advance the ecosystem.
5+
With over 60 million monthly downloads, LangChain has a large audience of developers building LLM applications. Beyond just listing integrations, we aim to highlight high-quality, educational examples that inspire developers and advance the ecosystem.
66

77
<Note>
88
While we occasionally share integrations, we prioritize content that provides

src/oss/langchain/agents.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ import AlphaCallout from '/snippets/alpha-lc-callout.mdx';
99
Agents combine language models with tools to create systems that can reason about tasks, decide which tools to use, and iteratively work towards solutions.
1010

1111
:::python
12-
`create_agent()` provides a production-ready ReAct (Reasoning + Acting) agent implementation based on the paper [ReAct: Synergizing Reasoning and Acting in Language Models](https://arxiv.org/abs/2210.03629).
12+
`create_agent()` provides a production-ready agent implementation.
1313
:::
1414
:::js
15-
`createAgent()` provides a production-ready ReAct (Reasoning + Acting) agent implementation based on the paper [ReAct: Synergizing Reasoning and Acting in Language Models](https://arxiv.org/abs/2210.03629).
15+
`createAgent()` provides a production-ready agent implementation.
1616
:::
1717

18-
ReAct frames an agent's behavior as an interleaving of `thought` -> `action` -> `observation` steps, where the model writes out its reasoning, picks a tool, sees the tool's result, and then repeats. ReAct reduces hallucinations and makes the decision process auditable: the agent can form hypotheses (`thought`), test them with tools (`action`), and update its plan based on feedback (`observation`).
19-
20-
A ReAct loop runs until a stop condition - i.e., when the model emits a final answer or an iteration limit is reached.
18+
[An LLM Agent runs tools in a loop to achieve a goal](https://simonwillison.net/2025/Sep/18/agents/).
19+
An agent runs until a stop condition is met - i.e., when the model emits a final output or an iteration limit is reached.
2120

2221
```mermaid
2322
%%{
@@ -31,10 +30,10 @@ A ReAct loop runs until a stop condition - i.e., when the model emits a final an
3130
}%%
3231
graph TD
3332
%% Outside the agent
34-
QUERY([query])
35-
LLM{thought}
33+
QUERY([input])
34+
LLM{model}
3635
TOOL(tools)
37-
ANSWER([answer])
36+
ANSWER([output])
3837
3938
%% Main flows (no inline labels)
4039
QUERY --> LLM
@@ -51,10 +50,10 @@ graph TD
5150
<Info>
5251

5352
:::python
54-
`create_agent()` builds a **graph**-based agent runtime using [LangGraph](/oss/langgraph/overview). A graph consists of nodes (steps) and edges (connections) that define how your agent processes information. The agent moves through this graph, executing nodes like the model node (which calls the model), the tools node (which executes tools), or pre/post model hook nodes.
53+
`create_agent()` builds a **graph**-based agent runtime using [LangGraph](/oss/langgraph/overview). A graph consists of nodes (steps) and edges (connections) that define how your agent processes information. The agent moves through this graph, executing nodes like the model node (which calls the model), the tools node (which executes tools), or middleware.
5554
:::
5655
:::js
57-
`createAgent()` builds a **graph**-based agent runtime using [LangGraph](/oss/langgraph/overview). A graph consists of nodes (steps) and edges (connections) that define how your agent processes information. The agent moves through this graph, executing nodes like the model node (which calls the model), the tools node (which executes tools), or pre/post model hook nodes.
56+
`createAgent()` builds a **graph**-based agent runtime using [LangGraph](/oss/langgraph/overview). A graph consists of nodes (steps) and edges (connections) that define how your agent processes information. The agent moves through this graph, executing nodes like the model node (which calls the model), the tools node (which executes tools), or middleware.
5857
:::
5958

6059
Learn more about the [graph API](/oss/langgraph/graph-api).

src/oss/langchain/philosophy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ With LangChain, we have two core focuses:
2424
Standardizing these model inputs and outputs is a core focus, making it easy for developer to easily change to the most recent state-of-the-art model, avoiding lock-in.
2525
</Step>
2626
<Step title="We want to make it easy to use models to orchestrate more complex flows that interact with other data and computation.">
27-
Models should be used for more than just *calling* - they should also be used to orchestrate more complex flows that interact with other data. LangChain makes it easy to define [tools](/oss/langchain/tools) that LLMs can use dynamically, as well as help with parsing of and access to unstructured data.
27+
Models should be used for more than just *text generation* - they should also be used to orchestrate more complex flows that interact with other data. LangChain makes it easy to define [tools](/oss/langchain/tools) that LLMs can use dynamically, as well as help with parsing of and access to unstructured data.
2828
</Step>
2929
</Steps>
3030

src/oss/langchain/structured-output.mdx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import AlphaCallout from '/snippets/alpha-lc-callout.mdx';
1010

1111
Structured output allows agents to return data in a specific, predictable format. Instead of parsing natural language responses, you get structured data in the form of JSON objects, Pydantic models, or dataclasses that your application can directly use.
1212

13-
LangChain's prebuilt ReAct agent `create_agent()` handles structured output automatically. The user sets their desired structured output schema, and when the model generates the structured data, it's captured, validated, and returned in the `'structured_response'` key of the agent's state.
13+
LangChain's `create_agent()` handles structured output automatically. The user sets their desired structured output schema, and when the model generates the structured data, it's captured, validated, and returned in the `'structured_response'` key of the agent's state.
1414

1515
```python
1616
def create_agent(
@@ -22,20 +22,19 @@ def create_agent(
2222
]
2323
```
2424

25-
<ParamField path="response_format">
26-
Controls how the agent returns structured data:
25+
## Response Format
26+
Controls how the agent returns structured data:
2727

28-
- **`ToolStrategy[StructuredResponseT]`**: `Uses tool calling for structured output
29-
- **`ProviderStrategy[StructuredResponseT]`**: Uses provider-native structured output
30-
- **`type[StructuredResponseT]`**: Schema type - automatically selects best strategy based on model capabilities
31-
- **`None`**: No structured output
28+
- **`ToolStrategy[StructuredResponseT]`**: Uses tool calling for structured output
29+
- **`ProviderStrategy[StructuredResponseT]`**: Uses provider-native structured output
30+
- **`type[StructuredResponseT]`**: Schema type - automatically selects best strategy based on model capabilities
31+
- **`None`**: No structured output
3232

33-
When a schema type is provided directly, LangChain automatically chooses:
34-
- `ProviderStrategy` for models supporting native structured output (OpenAI, Grok)
35-
- `ToolStrategy` for all other models
33+
When a schema type is provided directly, LangChain automatically chooses:
34+
- `ProviderStrategy` for models supporting native structured output (OpenAI, Grok)
35+
- `ToolStrategy` for all other models
3636

37-
The structured response is returned in the `structured_response` key of the agent's final state.
38-
</ParamField>
37+
The structured response is returned in the `structured_response` key of the agent's final state.
3938
:::
4039
:::js
4140
Structured output allows agents to return data in a specific, predictable format. Instead of parsing natural language responses, you get typed structured data.
@@ -54,7 +53,7 @@ const agent = createAgent({
5453
})
5554
```
5655

57-
<ParamField path="responseFormat">
56+
## Response Format
5857
Controls how the agent returns structured data. You can provide either a Zod object or JSON schema. By default, the agent uses a tool calling strategy, in which the output is created by an additional tool call. Certain models support native structured output, in which case the agent will use that strategy instead.
5958

6059
You can control the behavior by wrapping `ResponseFormat` in a `toolStrategy` or `providerStrategy` function call:
@@ -71,7 +70,6 @@ const agent = createAgent({
7170
```
7271

7372
The structured response is returned in the `structuredResponse` key of the agent's final state.
74-
</ParamField>
7573
:::
7674

7775
## Provider strategy

src/oss/langchain/supervisor.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ We will need to select a chat model from LangChain's suite of integrations:
6868

6969
<ChatModelTabsPy />
7070

71-
## 1. Define low-level API tools
71+
## 1. Define tools
7272

7373
Start by defining the tools that require structured inputs. In real applications, these would call actual APIs (Google Calendar, SendGrid, etc.). For this tutorial, you'll use stubs to demonstrate the pattern.
7474

0 commit comments

Comments
 (0)