← Back to Reading
Daily Dose of DS 2026-11-03

Agent Framework vs. Agent Harness, clearly explained!

LLM routing aims to lower costs by directing simple tasks to cheaper models and reserving frontier models for complex queries, but production deployments frequently encounter pitfalls. Classification adds latency, intent can be misclassified, and static routing rules degrade over time. Crucially, switching models during an agent session can invalidate prefix caches, inadvertently increasing expenses and causing behavioral inconsistencies. Reliable LLM routing infrastructure must manage entire user sessions with session pinning and model affinity rather than evaluating requests in isolation. An agent framework provides modular components and abstractions for models, tools, state, and orchestration, leaving the assembly of application behavior to the developer. In contrast, an agent harness packages the agent loop with a preconfigured execution environment, operating conventions, and capabilities like file access and context offloading. While frameworks excel at enforcing deterministic boundaries and explicit business rules, harnesses streamline open-ended problem solving such as software engineering tasks. Complex real-world applications often combine both, using outer frameworks for high-level workflow orchestration and nested harnesses for dynamic task execution. Full attention incurs an O(T²) prefill cost that becomes dominant at context lengths reaching 10 million tokens. While existing sparse attention mechanisms like DeepSeek's DSA and GLM-5.3-Flash reduce key reads, their indexers still suffer from O(T²) overhead and positional key grouping. Latent Sparse Attention (LSA) addresses this by clustering keys by semantic meaning into index spaces inspired by FAISS vector search, scoring only cluster centroids. At 10M tokens, LSA achieves up to a 72.4x layer prefill speedup compared to full attention and accelerates end-to-end time to first token, though it does not reduce total KV cache storage requirements.

Read the original ↗
Contents 3 sections
  1. 01LLM routing can cost more than not routing at all
  2. 02Agent Framework vs. Agent Harness, clearly explained!
  3. 03A new technique just made attention 23x faster
LLM ROUTING

LLM routing can cost more than not routing at all

LLM routing aims to lower costs by directing simple tasks to cheaper models and reserving frontier models for complex queries, but production deployments frequently encounter pitfalls. Classification adds latency, intent can be misclassified, and static routing rules degrade over time. Crucially, switching models during an agent session can invalidate prefix caches, inadvertently increasing expenses and causing behavioral inconsistencies. Reliable LLM routing infrastructure must manage entire user sessions with session pinning and model affinity rather than evaluating requests in isolation.

  • DIY routing in production often fails due to classification latency, misread user intent, and stale rules.
  • Switching models mid-session can wipe out prefix-cache savings, driving up costs instead of lowering them.
  • AI agents require session pinning and model affinity to avoid inconsistent behavior across multi-turn interactions.
  • Plano and Arch-Router provide specialized handling for intent resolution.
  • Effective LLM routing must evaluate the entire interaction session rather than optimizing requests individually.
AI AGENTS

Agent Framework vs. Agent Harness, clearly explained!

An agent framework provides modular components and abstractions for models, tools, state, and orchestration, leaving the assembly of application behavior to the developer. In contrast, an agent harness packages the agent loop with a preconfigured execution environment, operating conventions, and capabilities like file access and context offloading. While frameworks excel at enforcing deterministic boundaries and explicit business rules, harnesses streamline open-ended problem solving such as software engineering tasks. Complex real-world applications often combine both, using outer frameworks for high-level workflow orchestration and nested harnesses for dynamic task execution.

  • Agent frameworks offer low-level building blocks for model orchestration, while agent harnesses package an agent loop with an execution environment and operating conventions.
  • Deep Agents exemplifies a harness by adding filesystem tools, context offloading, and subagent support on top of LangChain and LangGraph.
  • Relying solely on conversation history across multi-session tasks causes context loss; systems must record progress using inspectable external artifacts like commits, test results, and task files.
  • Anthropic's research on long-running coding agents highlighted issues like premature completion declarations and incomplete work when agents lack incremental sessions and external state checks.
  • Robust system designs often nest an agent harness inside an outer framework workflow to enforce business rules and authorization while allowing dynamic tool use within subtasks.
LLM INFERENCE

A new technique just made attention 23x faster

Full attention incurs an O(T²) prefill cost that becomes dominant at context lengths reaching 10 million tokens. While existing sparse attention mechanisms like DeepSeek's DSA and GLM-5.3-Flash reduce key reads, their indexers still suffer from O(T²) overhead and positional key grouping. Latent Sparse Attention (LSA) addresses this by clustering keys by semantic meaning into index spaces inspired by FAISS vector search, scoring only cluster centroids. At 10M tokens, LSA achieves up to a 72.4x layer prefill speedup compared to full attention and accelerates end-to-end time to first token, though it does not reduce total KV cache storage requirements.

  • In conventional sparse attention methods at 10M tokens, the key indexer remains O(T²) and can account for 98% of the layer prefill time.
  • Latent Sparse Attention (LSA) projects keys into a 64-dimensional index space, pooling every 4 keys, and clusters 512-key blocks into buckets of about 8 keys with centroids.
  • LSA evaluates centroids rather than individual keys, selecting the top 1,024 buckets to expand into 4,096 keys alongside 4 sink tokens and the 512 most recent keys before running FlashAttention.
  • At 10M tokens, LSA layer prefill is 72.4x faster than full attention on Qwen-3.8-27B and 22.7x faster than GLM-5.3-Flash sparse attention.
  • End-to-end time to first token achieves a 9.2x speedup on Qwen and 2.2x on GLM at 10M tokens, but breaks even below roughly 512k tokens.
  • LSA optimizes key selection computation during prefill, but does not alter linear KV cache memory growth.