---
type: "post"
id: "context-engineering-with-deep-agents-how-to-remember-b8169d"
slug: "context-engineering-with-deep-agents-how-to-remember-b8169d"
title: "Context Engineering with Deep Agents: How To Remember Without Keeping Everything In Context"
description: "LangChain’s guide describes five context-management techniques in Deep Agents: offloading large tool results, summarizing older messages, progressively loading skills, isolating noisy work in subagents, and retaining long-term memory in files."
retrieval_nugget: "LangChain’s guide describes five context-management techniques in Deep Agents: offloading large tool results, summarizing older messages, progressively loading skills, isolating noisy work in subagents, and retaining long-term memory in files."
published_at: "2026-10-14"
updated_at: "2026-10-14"
record_date: "2026-10-14"
date_kind: "published_at"
topics: ["context-engineering"]
source_urls: ["https://www.langchain.com/blog/context-engineering-deep-agents-remember"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:context-engineering-with-deep-agents-how-to-remember-b8169d"
status: "published"
visuals: []
editorial_provenance: {"schema_version":"newruntime-editorial-copy-v1","content_status":"source_grounded_final","final_copy_sha256":"sha256:1cd37666fc260c2cd98019d564baf31b8d81175ff8c27d8c06ba0c1489b457e3","reviewed_at":"2026-10-14T18:04:09.166Z","source_evidence_count":1,"verified_claim_count":3,"site_analysis_schema_version":"newruntime-site-analysis-v1","site_object_kind":"field_note","observed_fact_count":3,"implication_count":2,"watch_condition_count":1,"related_record_count":0}
analysis: {"schema_version":"newruntime-site-analysis-v1","object_kind":"field_note","thesis":"The guide makes the harness—not the model—the place where context is filtered, compressed, segmented, and persisted.","observed_facts":[{"text":"The post describes five techniques: offloading, summarization, progressive skill loading, subagents, and long-term memory files.","source_urls":["https://www.langchain.com/blog/context-engineering-deep-agents-remember"]},{"text":"It says tool results above roughly 20,000 tokens are offloaded and summarization runs at 85% context-window usage by default.","source_urls":["https://www.langchain.com/blog/context-engineering-deep-agents-remember"]},{"text":"LangChain says long-term memory is stored as plain files in operator-controlled storage and can be reused across model providers.","source_urls":["https://www.langchain.com/blog/context-engineering-deep-agents-remember"]}],"mechanism":"Middleware hooks around agent startup, model calls, and tool calls decide what enters the active context, what is stored externally, and what is retrieved later.","why_now":"Long-running agents accumulate tool output and intermediate work, so context-window capacity alone does not solve the problem of deciding what the model should see at each step.","implications":["Builders can treat context handling as an explicit, testable part of harness design rather than relying on a larger context window or an ever-growing prompt.","Portable file-based memory makes persistence less tied to a particular model provider."],"evidence_boundary":"What is documented is the mechanism and its example defaults; operational gains remain unquantified here. The post is a vendor implementation account, not an independent benchmark.","watch_conditions":["Whether Deep Agents or independent evaluations show how these middleware choices affect task success, retrieval errors, and cost on representative long-running workloads."],"related_records":[],"new_branch_reason":"No prior New Runtime analytical record was supplied; this source supports a distinct record on middleware-level context management and memory portability."}
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/context-engineering-with-deep-agents-how-to-remember-b8169d/","markdown":"https://newruntime.com/posts/context-engineering-with-deep-agents-how-to-remember-b8169d.md","json":"https://newruntime.com/posts/context-engineering-with-deep-agents-how-to-remember-b8169d.json"}
challenged_patterns: ["company-memory-needs-write-loops"]
---

# Context Engineering with Deep Agents: How To Remember Without Keeping Everything In Context

## Retrieval answer

LangChain’s guide describes five context-management techniques in Deep Agents: offloading large tool results, summarizing older messages, progressively loading skills, isolating noisy work in subagents, and retaining long-term memory in files.

LangChain’s guide describes five context-management techniques in Deep Agents: offloading large tool results, summarizing older messages, progressively loading skills, isolating noisy work in subagents, and retaining long-term memory in files. The post gives two operational thresholds: tool results above roughly 20,000 tokens are written to storage before the model sees them, and summarization runs at 85% context-window usage by default. These are design choices in a vendor’s own harness, not evidence that the thresholds are optimal across models or workloads.

Thesis: The guide makes the harness—not the model—the place where context is filtered, compressed, segmented, and persisted. Mechanism: Middleware hooks around agent startup, model calls, and tool calls decide what enters the active context, what is stored externally, and what is retrieved later. Why now: Long-running agents accumulate tool output and intermediate work, so context-window capacity alone does not solve the problem of deciding what the model should see at each step. The memory is described as plain files in storage controlled by the operator, which LangChain says can be reused when changing models or providers.

First implication: Builders can treat context handling as an explicit, testable part of harness design rather than relying on a larger context window or an ever-growing prompt. The guide is a vendor implementation account, not an independent benchmark, and it supplies no comparative measurements of accuracy, latency, or cost. Evidence boundary: What is documented is the mechanism and its example defaults; operational gains remain unquantified here. The post is a vendor implementation account, not an independent benchmark. First watch condition: Whether Deep Agents or independent evaluations show how these middleware choices affect task success, retrieval errors, and cost on representative long-running workloads.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Context Engineering](https://newruntime.com/topics/context-engineering.md): Explore the context-engineering topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Source Ledger](https://newruntime.com/source-ledger.json): Inspect the public source evidence graph.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
