newsfilter.io
Interview, Podcast

Context Engineering Our Way to Long-Horizon Agents: LangChain’s Harrison Chase

The Shift from Scaffolding to Agent Harnesses

  • Long-horizon agents are now functional because LLMs have improved sufficiently and "harnesses" have replaced earlier, less effective scaffolding.
  • The core algorithm for successful agents remains simple: an LLM running in a loop that orchestrates its own context and tool usage.
  • Context Engineering has emerged as the dominant differentiator in recent agent performance (June/July 2024 inflection point).
  • Model vs. Harness evolution: Early agents required custom cognitive architectures; modern agents rely on optimized prompts, compaction strategies, and tool access.
  • File System Access is now considered essential for long-horizon agents, serving as a primary mechanism for context management and storage.
  • Virtual File Systems (e.g., Postgres-backed) are a scalable alternative for some tasks but lack the ability to execute scripts.

Current Agent Applications and Reliability

  • Coding is the leading domain for long-horizon agents, where PRs are generated for human review rather than direct production deployment.
  • AI SREs (e.g., Traversal) represent a key application, running long tasks to investigate incidents and produce first drafts for human validation.
  • Customer Support is evolving from simple first-line responses to long-horizon workflows where AI generates comprehensive reports for human escalations.
  • First Draft Paradigm: The most viable use cases involve agents producing initial outputs (code, reports, drafts) that undergo human review before finalization.
  • Agents are not yet reliable for "nine nines" reliability; they are best suited for tasks where humans curate the output.

Software Development vs. Agent Engineering

  • Source of Truth: In traditional software, logic resides in code; in agents, logic emerges from the model, making the "trace" the primary source of truth.
  • Non-Determinism: Agent behavior cannot be predicted solely by inspecting code; developers must run the system to observe behavior.
  • Testing Evolution:
    • Unit testing is insufficient; online testing via traces is critical because behavior emerges only with real-world inputs.
    • Debugging has shifted from code inspection to trace analysis (e.g., LangSmith traces).
  • Iterative Development: Agent development requires significantly more iteration than traditional software because the final behavior is unknown until deployment.
  • Memory acts as a learning mechanism to reduce the iteration burden on developers by allowing agents to retain context and learn from interactions.

Evaluation and Self-Improvement

  • Human-in-the-Loop: Evaluating agents requires human judgment to assess qualitative outcomes, leading to the rise of data labeling and annotation queues.
  • LLM as Judge: Proxy evaluators are used to grade traces, but they must be calibrated against human labels to ensure alignment.
  • Recursive Self-Improvement: Agents are increasingly using traces to diagnose errors, update their own system prompts, and modify their instructions.
  • Sleep Time Compute: Agents perform background processing (e.g., reviewing daily traces) to update their behavior without user intervention.
  • LangSmith Agent Builder: A no-code interface that allows agents to edit their own instruction files based on user feedback.

UI and Interaction Models

  • Async/Sync Hybrid: Long-horizon agents require an asynchronous mode for background execution and a synchronous mode for review and correction.
  • Agent Inbox: A unified interface where agents manage their background tasks but can be summoned for real-time, synchronous collaboration.
  • Workspace Framing: Users should define a specific environment (e.g., a code directory, Google Drive) as the agent's "workspace" for state management.
  • State Visibility: Tools must allow users to view the agent's evolving state (e.g., generated files) alongside the chat interface.

Future Trends and Infrastructure

  • Code Sandboxes: Access to a code execution environment is viewed as superior to browser automation for the majority of agent tasks.
  • Browser Use: Current models are not yet reliable enough for direct browser interaction; CLI-based approximations are preferred.
  • Company Advantage: Existing software companies retain value through proprietary data and APIs, which can be plugged into modern agent harnesses.
  • Vertical Startups: Companies with deep domain knowledge (e.g., finance) can outperform generalists by embedding specific patterns into agent instructions.
  • Harness Centralization: Most organizations will not build custom harnesses; they will adopt standardized frameworks (e.g., LangChain Deep Agents) to avoid complexity.