Code Archaeology
Author

Code Archaeology

Learn from the past to understand the present

54
Articles
0
Likes
12
Views
0
Comments
Recent Articles

Latest from Code Archaeology

54 recent articles
Code Archaeology
Code Archaeology
Mar 26, 2026 · Artificial Intelligence

How Deep Agents Implements Memory: AGENTS.md Injection as Procedural Memory

This article maps cognitive psychology's semantic, episodic, and procedural memory to AI agent architecture, then details Deep Agents' MemoryMiddleware implementation that loads AGENTS.md files at initialization and injects their content into system prompts, functioning as procedural memory with semantic elements.

AGENTS.mdAI agentsDeep Agents
0 likes · 10 min read
How Deep Agents Implements Memory: AGENTS.md Injection as Procedural Memory
Code Archaeology
Code Archaeology
Mar 23, 2026 · Artificial Intelligence

How Deep Agents Implements Skills: Progressive Disclosure & Middleware Ordering

This article analyzes Deep Agents' Skills implementation, revealing a three-layer progressive disclosure loading pattern where metadata loads at startup, full instructions load on activation, and resources load on demand. It explains how before_agent and wrap_model_call hooks inject skill metadata into system prompts, and why SkillsMiddleware positioning differs between main agents (early for coordination) and sub-agents (late for separation of concerns).

AI agentsAgent ArchitectureDeep Agents
0 likes · 12 min read
How Deep Agents Implements Skills: Progressive Disclosure & Middleware Ordering
Code Archaeology
Code Archaeology
Mar 18, 2026 · Artificial Intelligence

Deep Agents Context Management: How SummarizationMiddleware Auto-Compresses History

This article details Deep Agents' context management implementation using SummarizationMiddleware, which automatically compresses conversation history during model calls by offloading old messages to backend storage and replacing them with generated summaries, including threshold configuration, cutoff determination, and the three message views that enable traceable, iterative summarization.

Agent MiddlewareBackend StorageContext Management
0 likes · 11 min read
Deep Agents Context Management: How SummarizationMiddleware Auto-Compresses History
Code Archaeology
Code Archaeology
Mar 16, 2026 · Artificial Intelligence

How Deep Agents Implements Sub-Agent Delegation: Task Tool, State Isolation & System Prompt Injection

This article dissects Deep Agents' SubAgentMiddleware implementation, revealing how the task tool dynamically delegates complex work to isolated sub-agents with separate context windows, detailing dynamic tool construction, state isolation via excluded keys, system prompt injection for delegation guidance, and a Deep Research case study showing research-agent delegation in action.

AI EngineeringAgent DelegationDeep Agents
0 likes · 22 min read
How Deep Agents Implements Sub-Agent Delegation: Task Tool, State Isolation & System Prompt Injection
Code Archaeology
Code Archaeology
Mar 12, 2026 · Backend Development

SO_LINGER Demystified: Controlling TCP Close Behavior in Linux

This article explains the SO_LINGER socket option's three closure modes, demonstrates why SO_LINGER=0 sends RST instead of FIN, and outlines Linux's preferred solutions for TIME_WAIT accumulation—connection reuse, tcp_tw_reuse, tcp_fin_timeout, and port range expansion—over abrupt connection termination.

Linux kernelSO_LINGERTCP
0 likes · 16 min read
SO_LINGER Demystified: Controlling TCP Close Behavior in Linux
Code Archaeology
Code Archaeology
Mar 9, 2026 · Artificial Intelligence

How Deep Agents Implements Shell Command Execution: Inside FilesystemMiddleware

This article dissects Deep Agents' shell command execution via the FilesystemMiddleware's execute tool, detailing its parameter validation, backend resolution through SandboxBackendProtocol, LocalShellBackend's subprocess-based implementation, BaseSandbox's abstract interface for isolated sandboxes, and a practical example using a local workspace.

AI EngineeringBaseSandboxDeep Agents
0 likes · 10 min read
How Deep Agents Implements Shell Command Execution: Inside FilesystemMiddleware
Code Archaeology
Code Archaeology
Mar 5, 2026 · Backend Development

Why BBR Couldn't Dethrone CUBIC as Linux's Default TCP Congestion Control

This article analyzes Google's BBR congestion control algorithm, comparing its model-driven approach with CUBIC's loss-based design, explains why BBR hasn't become Linux's default despite advantages in high-BDP and wireless scenarios, details BBRv2/v3 improvements addressing fairness and robustness, and examines the Linux kernel's congestion control framework implementation.

BBRBBRv2BBRv3
0 likes · 14 min read
Why BBR Couldn't Dethrone CUBIC as Linux's Default TCP Congestion Control
Code Archaeology
Code Archaeology
Mar 2, 2026 · Artificial Intelligence

Inside Deep Agents' FilesystemMiddleware: 6 Tools, 2 Hooks & Multi-Backend Architecture

This article dissects Deep Agents' FilesystemMiddleware implementation, covering six filesystem tools (ls, read_file, write_file, edit_file, glob, grep), two core middleware hooks for system prompt injection and large-result eviction, and the BackendProtocol layer with four backend implementations including CompositeBackend's longest-prefix routing for complex scenarios.

BackendProtocolCompositeBackendDeep Agents
0 likes · 12 min read
Inside Deep Agents' FilesystemMiddleware: 6 Tools, 2 Hooks & Multi-Backend Architecture
Code Archaeology
Code Archaeology
Feb 9, 2026 · Artificial Intelligence

LangChain Deep Agents: Batteries-Included Framework for Complex LLM Tasks

LangChain's Deep Agents framework provides a batteries-included architecture for building complex LLM agents with built-in planning, filesystem access, shell execution, sub-agent delegation, smart default prompts, and context management, enabling long-running, multi-step tasks like coding and research.

Agent FrameworkContext ManagementDeep Agents
0 likes · 8 min read
LangChain Deep Agents: Batteries-Included Framework for Complex LLM Tasks