Framer Rebuilds Agent Harness to Execute Code During Streaming, Cutting Costs by Up to 33%

·2026.11.02 09:00

Key point

The new system compiles JavaScript into executable cells as the model generates them, reducing tool steps by 43% and cached input tokens by 39%.

1 / 2

Details

  • Framer rebuilt its agent harness to execute JavaScript code while the model is still generating it, making workflows up to 33% cheaper and 20% faster.
  • The architecture uses 2x fewer tool steps and 39% fewer cached input tokens per message on average, with no measured reduction in quality.
  • Eager execution parses incoming code into executable cells using AST parsing, allowing document edits to begin before the full program is generated.
  • Early cancellation stops the remaining code stream if an assumption fails, saving output token charges and preserving already-applied edits.
  • The document access API was redesigned from a DSL to method calls, enabling efficient reads and writes via an in-memory copy in a Web Worker.
  • External agents like ChatGPT Desktop and Claude Code now use the same unified harness as the in-app agent, submitting single programs via MCP.
  • The team acknowledges prior work by Zhensu Sun et al. on "Executing as You Generate" in Python, noting they plan to adopt its buffer optimization.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.