Introducing Muse Code and Muse Spark 1.2
Key Points
- 1Meta has released Muse Code, a terminal-based coding agent powered by the new Muse Spark 1.2 model, designed to handle complex software engineering tasks through persistent async background agents and a restart-safe event log.
- 2Muse Spark 1.2 features significant improvements in code generation, debugging, and codebase understanding, achieved through scaling training compute and a specialized self-improvement loop using Muse Spark 1.1.
- 3The system demonstrates advanced capabilities in long-horizon projects and kernel optimization, proven by its ability to iteratively profile and improve GPU kernel performance over thousands of tool calls.
The paper introduces Muse Code (beta), a terminal-based coding agent powered by the newly developed Muse Spark 1.2 model. Designed for complex software engineering across large repositories, the system emphasizes autonomous planning, persistent background execution, and fault-tolerant runtime architectures.
Core Methodology and Architecture
Agentic Runtime Design:
Muse Code utilizes a local event log that acts as a "single source of truth." Every model invocation, tool execution, edit, and user approval is appended to this log. This creates a replay-exact and restart-safe environment, allowing the agent to resume long-running tasks precisely from the point of failure without loss of progress or context.
Persistent Async Background Agents:
Unlike typical coding agents that spawn transient workers, Muse Code employs specialized async background agents that remain active for the duration of a session. This architecture minimizes redundant information gathering and reduces latency. These agents operate alongside the main model loop, independently handling next steps and determining when to communicate findings back to the primary agent, thereby streamlining multi-step, complex software tasks.
Bundled Skills and Toolset:
The agent comes equipped with three default functional primitives:
- /plan: Converts high-level objectives into approval-gated action plans.
- /grill: Implements a stress-testing mechanism to validate and harden the proposed plans.
- /goal: Facilitates progression toward completion metrics.
Muse Spark 1.2 Development
Muse Spark 1.2 is a specialized iteration of Muse Spark 1.1, explicitly optimized for coding workflows via a significant increase in training compute and environmental diversity.- Co-Training Integration: The model was co-trained alongside the Muse Code agent. This involved using rejection-sampled harness trajectories and specific recipe optimizations for goal conditioning, context compaction, and subagent management. This ensures deep integration between the model’s reasoning capabilities and the Muse Code toolset.
- Long-Horizon Proficiency: The model is architected for whole-repository generation and multi-day research projects. It utilizes planning, goal conditioning, and iterative context compaction to maintain trajectory over extended operational horizons.
- Self-Improvement Loop: Researchers leveraged Muse Spark 1.1 to synthesize challenging coding environments and instruction-following templates. These were used to grade candidate solutions, creating a scalable, high-quality training dataset that improves the precision of instruction following in Muse Spark 1.2.
Case Study: Kernel Optimization
The system was evaluated on its ability to perform autonomous GPU kernel optimization over sessions exceeding 1,000 tool calls and 24 hours of operation. When tasked with optimizing KDA and MLA kernels for NVIDIA Hopper GPUs, the agent was prohibited from utilizing third-party libraries (e.g., FLA), requiring it to implement algorithms directly in Triton.- Technical Implementation: For KDA kernels, the agent implemented a chunk-parallel preparation strategy combined with a sequential inter-chunk scan, applying specific optimizations like re-centering the gated cumulative decay at the chunk midpoint.
- Performance Tuning: For MLA kernels, the agent engineered a two-kernel Triton pipeline, employing kernel fusion and tiling alongside latent-reuse strategies (repurposing the shared KV latent as both K and V). This demonstrated the model’s capability to apply domain-specific hardware optimization knowledge to achieve performance benchmarks superior to standard implementations.