Skip to content

Commit 572b2f4

Browse files
authored
copy edits for agent harness (#1162)
## Overview <!-- Brief description of what documentation is being added/updated --> ## Type of change **Type:** [Replace with: New documentation page / Update existing documentation / Fix typo/bug/link/formatting / Remove outdated content / Other] ## Related issues/PRs <!-- Link to related issues, feature PRs, or discussions (if applicable) To automatically close an issue when this PR is merged, use closing keywords: - "closes #123" or "fixes #123" or "resolves #123" For regular references without auto-closing, just use: - "#123" or "See issue #123" Examples: - closes #456 (will auto-close issue #456 when PR is merged) - See #789 for context (will reference but not auto-close issue #789) --> - GitHub issue: - Feature PR: <!-- For LangChain employees, if applicable: --> - Linear issue: - Slack thread: ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [x] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [ ] I have used **root relative** paths for internal links - [x] I have updated navigation in `src/docs.json` if needed - I have gotten approval from the relevant reviewers - (Internal team members only / optional) I have created a preview deployment using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes <!-- Any other information that would be helpful for reviewers -->
1 parent fc31401 commit 572b2f4

File tree

2 files changed

+33
-42
lines changed

2 files changed

+33
-42
lines changed

src/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,13 @@
268268
"group": "Get started",
269269
"pages": [
270270
"oss/python/deepagents/quickstart",
271-
"oss/python/deepagents/harness",
272271
"oss/python/deepagents/customization"
273272
]
274273
},
275274
{
276275
"group": "Core capabilities",
277276
"pages": [
277+
"oss/python/deepagents/harness",
278278
"oss/python/deepagents/backends",
279279
"oss/python/deepagents/subagents",
280280
"oss/python/deepagents/human-in-the-loop",

src/oss/deepagents/harness.mdx

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
---
2-
title: Harness Capabilities
3-
description: Description of what capabilities come in the deepagents Agent Harness
2+
title: Agent harness capabilities
3+
sidebarTitle: Agent harness
44
---
55

6-
We think of `deepagents` as an "agent harness".
7-
It is the same core tool calling loop as other agent frameworks, but with built-in tools and capabilities.
8-
Here we list out the components that make up this agent harness
6+
We think of `deepagents` as an "agent harness". It is the same core tool calling loop as other agent frameworks, but with built-in tools and capabilities.
97

10-
## Filesystem Access
8+
This page lists out the components that make up the agent harness.
119

12-
Provides 6 tools for file system operations, making files first-class citizens in the agent's environment.
10+
## File system access
1311

14-
**Tools provided:**
15-
- `ls` - List files in a directory with metadata (size, modified time)
16-
- `read_file` - Read file contents with line numbers, supports offset/limit for large files
17-
- `write_file` - Create new files
18-
- `edit_file` - Perform exact string replacements in files (with global replace mode)
19-
- `glob` - Find files matching patterns (e.g., `**/*.py`)
20-
- `grep` - Search file contents with multiple output modes (files only, content with context, or counts)
12+
The harness provides six tools for file system operations, making files first-class citizens in the agent's environment:
13+
14+
| Tool | Description |
15+
|---|---|
16+
| `ls` | List files in a directory with metadata (size, modified time) |
17+
| `read_file` | Read file contents with line numbers, supports offset/limit for large files |
18+
| `write_file` | Create new files |
19+
| `edit_file` | Perform exact string replacements in files (with global replace mode) |
20+
| `glob` | Find files matching patterns (e.g., `**/*.py`) |
21+
| `grep` | Search file contents with multiple output modes (files only, content with context, or counts) |
2122

22-
---
2323

24-
## Large Tool Result Eviction
24+
## Large tool result eviction
2525

26-
Automatically dumps large tool results to the filesystem when they exceed a token threshold, preventing context window saturation.
26+
The harness automatically dumps large tool results to the file system when they exceed a token threshold, preventing context window saturation.
2727

2828
**How it works:**
29+
2930
- Monitors tool call results for size (default threshold: 20,000 tokens)
3031
- When exceeded, writes the result to a file instead
3132
- Replaces the tool result with a concise reference to the file
3233
- Agent can later read the file if needed
3334

34-
---
35-
## Pluggable Storage Backends
35+
## Pluggable storage backends
3636

37-
Abstracts filesystem operations behind a protocol, allowing different storage strategies for different use cases.
37+
The harness abstracts file system operations behind a protocol, allowing different storage strategies for different use cases.
3838

3939
**Available backends:**
4040

@@ -59,11 +59,10 @@ Abstracts filesystem operations behind a protocol, allowing different storage st
5959
- Example: `/` → StateBackend, `/memories/` → StoreBackend
6060
- Longest-prefix matching for routing
6161
- Enables hybrid storage strategies
62-
63-
---
64-
## Task Delegation (Subagents)
6562

66-
Allows the main agent to spawn ephemeral "subagents" for isolated multi-step tasks.
63+
## Task delegation (subagents)
64+
65+
The harness allows the main agent to create ephemeral "subagents" for isolated multi-step tasks.
6766

6867
**Why it's useful:**
6968
- **Context isolation** - Subagent's work doesn't clutter main agent's context
@@ -88,11 +87,9 @@ Allows the main agent to spawn ephemeral "subagents" for isolated multi-step tas
8887
- Example: code-reviewer, web-researcher, test-runner
8988
- Configure via `subagents` parameter
9089

91-
---
92-
93-
## Conversation History Summarization
90+
## Conversation history summarization
9491

95-
Automatically compresses old conversation history when token usage becomes excessive.
92+
The harness automatically compresses old conversation history when token usage becomes excessive.
9693

9794
**Configuration:**
9895
- Triggers at 170,000 tokens
@@ -104,11 +101,9 @@ Automatically compresses old conversation history when token usage becomes exces
104101
- Preserves recent context while compressing ancient history
105102
- Transparent to the agent (appears as a special system message)
106103

107-
---
108-
109-
## Dangling Tool Call Repair
104+
## Dangling tool call repair
110105

111-
Fixes message history when tool calls are interrupted or cancelled before receiving results.
106+
The harness fixes message history when tool calls are interrupted or cancelled before receiving results.
112107

113108
**The problem:**
114109
- Agent requests tool call: "Please run X"
@@ -126,23 +121,20 @@ Fixes message history when tool calls are interrupted or cancelled before receiv
126121
- Gracefully handles interruptions and errors
127122
- Maintains conversation coherence
128123

129-
---
124+
## To-do list tracking
130125

131-
## Todo List Tracking
132-
133-
Provides a `write_todos` tool that agents can use to maintain a structured task list.
126+
The harness provides a `write_todos` tool that agents can use to maintain a structured task list.
134127

135128
**Features:**
136129
- Track multiple tasks with statuses (pending, in_progress, completed)
137130
- Persisted in agent state
138131
- Helps agent organize complex multi-step work
139132
- Useful for long-running tasks and planning
140133

141-
---
142134

143135
## Human-in-the-Loop
144136

145-
Pauses agent execution at specified tool calls to allow human approval/modification.
137+
The harness pauses agent execution at specified tool calls to allow human approval/modification.
146138

147139
**Configuration:**
148140
- Map tool names to interrupt configurations
@@ -154,11 +146,10 @@ Pauses agent execution at specified tool calls to allow human approval/modificat
154146
- User verification before expensive API calls
155147
- Interactive debugging and guidance
156148

157-
---
158149

159-
## Prompt Caching (Anthropic)
150+
## Prompt caching (Anthropic)
160151

161-
Enables Anthropic's prompt caching feature to reduce redundant token processing.
152+
The harness enables Anthropic's prompt caching feature to reduce redundant token processing.
162153

163154
**How it works:**
164155
- Caches portions of the prompt that repeat across turns

0 commit comments

Comments
 (0)