Autonomous Software Development Using Multi-Model LLM System with Advanced Planning and Tool Integration

factory.ai · Tech · 2024 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Autonomous software engineering agents

Factory.ai built Code Droid to automate real software engineering tasks from natural-language tickets while preserving reliability, safety, explainability, and production fit across diverse codebases.

Constraints:

Architecture

Code Droid combines planning/task decomposition, tool-grounded execution, HyperCode/ByteRank codebase retrieval, multi-model sampling, tests for candidate validation, sandboxed execution, explainability logs, DroidShield static analysis, and internal Crucible benchmarks. The system generates candidate solution trajectories across different models, validates them with tests and generated tests, and selects robust patches while keeping actions auditable and reversible.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  natural-language-ticket[Natural-language ticket] --> code-droid[Code Droid]
  code-droid --> planning-engine[Planning engine]
  code-droid --> hypercode[HyperCode]
  hypercode --> byterank[ByteRank]
  byterank --> code-droid
  code-droid --> developer-tools[Developer tools]
  developer-tools --> sandbox[Sandbox]
  code-droid --> multi-model-sampler[Multi-model sampler]
  multi-model-sampler --> test-validator[Test validator]
  test-validator --> code-droid
  sandbox --> droidshield[DroidShield]
  droidshield --> code-droid
  code-droid --> explainability-logs[Explainability logs]
  explainability-logs --> human-developer[Human developer]
  code-droid --> crucible-benchmark[Crucible benchmark]
  crucible-benchmark --> human-developer
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Natural-language ticket Problem statement or customer task assigned to the Droid. Code Droid
Code Droid Autonomous software-engineering agent that plans, retrieves, edits, tests, and reports. Natural-language ticket, Planning engine, HyperCode, Developer tools, Multi-model sampler, Sandbox, Explainability logs
Planning engine Decomposes high-level problems into subtasks and candidate trajectories. Code Droid
HyperCode Builds explicit graph and implicit latent representations of the codebase. Code Droid, ByteRank
ByteRank Retrieves relevant codebase information for the current task. HyperCode, Code Droid
Developer tools Version control, editors, debuggers, linters, static analyzers, and tests. Code Droid, Sandbox
Multi-model sampler Routes subtasks to Anthropic/OpenAI models and samples diverse candidate solutions. Code Droid, Test validator
Test validator Uses existing and self-generated tests to evaluate candidate patches. Multi-model sampler, Code Droid
Sandbox Isolated execution environment that protects main development systems and data. Code Droid, Developer tools, DroidShield
DroidShield Runs real-time static analysis for security, bugs, and intellectual-property risks. Sandbox, Code Droid
Explainability logs Record reasoning and actions so developers can validate Droid behavior. Code Droid, Human developer
Crucible benchmark Internal customer-centric benchmark suite for migrations, integrations, refactoring, and other real tasks. Code Droid, Human developer
Human developer Reviews logs, validates outputs, and governs production use. Explainability logs, Crucible benchmark

Data flow

A natural-language ticket is given to Code Droid. HyperCode constructs a multi-resolution codebase representation and ByteRank retrieves relevant context. The Droid decomposes the problem, uses developer tools, samples candidate trajectories across models, validates candidates using existing/self-generated tests, and produces patches inside a sandbox. Evaluation flows through SWE-bench, Crucible, audit logs, DroidShield, and compliance controls.

3 supporting quotes
“Code Droid is designed to execute coding tasks based on natural language instructions. For our customers, its primary function is to automate rote, tedious programming tasks.”article, stated
“We’ve built a system called HyperCode to construct a multi-resolution representation of a given engineering system that allows Droids to synthesize deep codebase understanding.”article, stated
“Code Droid can choose to generate multiple trajectories for a given task, validate them using tests (existing and self-generated), and select optimal solutions”article, stated

Why this architecture

Factory uses a multi-part architecture because autonomous coding needs more than a strong model: it needs planning, codebase retrieval, realistic tools, multi-model diversity, testing, safety isolation, auditability, and benchmarks that match customer work. Multi-model sampling and validation address model variability, while HyperCode/ByteRank address codebase context limits.

3 supporting quotes
“We do not think about performance on a single axis. We are equally focused on the capabilities, safety, and explainability of our systems.”article, stated
“We’ve found model capabilities to be highly task-dependent. Code Droid leverages different state-of-the-art large language models for different sub-tasks, including the latest models from Anthropic and OpenAI.”article, stated
“Most agentic systems enter a codebase with zero knowledge and must build understanding from scratch. We’ve built a system called HyperCode to construct a multi-resolution representation of a given engineering system that allows Droids to synthesize deep codebase understanding.”article, stated

Models used: Anthropic models · OpenAI models · Code Droid · DroidShield

Scale

Alternatives considered (roads not taken)

Use one model for all coding subtasks

Rejected because: Factory found model capabilities are task-dependent and benefits from diverse candidate trajectories.

“model capabilities to be highly task-dependent. Code Droid leverages different state-of-the-art large language models for different sub-tasks”article, stated

Enter each codebase with zero knowledge

Rejected because: Codebase-scale tasks require explicit and implicit representations before retrieval.

“Most agentic systems enter a codebase with zero knowledge and must build understanding from scratch. We’ve built a system called HyperCode to construct a multi-resolution representation of a given engineering system that allows Droids to synthesize deep codebase understanding.”article, stated
“We’ve built a system called HyperCode to construct a multi-resolution representation of a given engineering system that allows Droids to synthesize deep codebase understanding.”article, stated

Trust public benchmarks as the only evaluation

Rejected because: SWE-bench overrepresents debugging tasks and misses many enterprise software-engineering tasks.

“Due to the nature of GitHub issues and the requirements set for data scraping in the SWE-bench paper most, if not all, of the tasks are debugging-style tasks.”article, stated
“This understanding led us to develop Crucible, Factory’s proprietary benchmarking suite designed to provide a more accurate representation of the challenges Droids are expected to automate in a production environment.”article, stated

Run autonomous edits directly in main environments

Rejected because: The Droid is isolated to prevent destabilization and protect data.

“Each Code Droid operates within a strictly defined, sandboxed environment that isolates its operational scope from main development environments.”article, stated

Patterns

model-routing (model-ops)

Code Droid routes different subtasks to different Anthropic/OpenAI models based on task-dependent strengths.

“Code Droid leverages different state-of-the-art large language models for different sub-tasks”article, stated

rag-retrieval (code-context)

HyperCode and ByteRank retrieve codebase information from multi-resolution representations.

“We leverage the insights and data in our retrieval algorithm — ByteRank — to retrieve relevant information for a given task.”article, stated

tool-use-orchestration (developer-tools)

The Droid uses version control, editors, debugging tools, linters, static analyzers, and tests.

“Code Droid has access to many essential tools for software development—from version control systems to editing and debugging tools.”article, stated

eval-driven-development (evaluation)

SWE-bench, Crucible, failure analysis, and continuous benchmark updates guide Droid improvement.

“Regular updates to the benchmark incorporate emerging trends and technologies, gating Droid development to contemporary standards.”article, stated

safety-policy-enforcement (safety)

DroidShield and sandboxing enforce safety before code is committed.

“DroidShield performs real-time static code analysis to detect potential security vulnerabilities, bugs, or intellectual property breaches before they are committed”article, stated

Tradeoffs

Generate and validate multiple trajectories

Chose sampling across models with test-based selection over single deterministic patch generation.

Rationale: Diverse candidate solutions improve robustness but increase runtime and token cost.

“use a sample of different models during the creation of candidate solutions to ensure diversity and robustness in the final result.”article, stated
“the runs varied significantly, with some consuming as many as 13 million tokens per patch.”article, stated

Prioritize safety and explainability

Chose sandboxing, audit trails, logs, DroidShield, and certifications over unconstrained autonomous code edits.

Rationale: Enterprise deployment requires trust, reversibility, security, and compliance.

“enterprise-grade auditing trails and version control integrations to ensure all actions taken by a Droid are traceable and reversible.”article, stated

Build internal evaluations

Chose Crucible customer-centric benchmark suite over only optimizing for SWE-bench.

Rationale: Real customer work spans tasks that SWE-bench does not adequately represent.

“Each benchmark is crafted from tasks derived from real industry projects”article, stated

Gotchas (what bit them)

Codebase context retrieval remains a major failure mode.

Root cause: The agent sometimes misses or misprioritizes target files.

Resolution: Factory analyzes failure modes and improves retrieval, prioritization, and editing selection.

“in 8% of the tasks, Code Droid failed to include the target file in its list of analyzed files.”article, stated
“the target file was analyzed, it was not prioritized as a top-5 file in another 8% of cases.”article, stated

Benchmark contamination and exact-patch overlap require audit.

Root cause: Language models may have seen repositories or similar patches in training data.

Resolution: Factory revoked internet access, compared patches to oracle patches, and manually reviewed close matches.

“Droid’s access to the internet was revoked.”article, stated
“In 39 cases (1.7%), Code Droid’s patch matched the oracle patch exactly.”article, stated

Runtime and token usage vary widely.

Root cause: Autonomous coding trajectories can be long and produce multiple candidate patches.

Resolution: Factory reports runtime/token variability as a production economics concern.

“The runtime and token usage of Code Droid also presented some variability.”article, stated
“some consuming as many as 13 million tokens per patch”article, stated

Public benchmarks do not cover the whole product target.

Root cause: SWE-bench is mostly debugging-style work, while Factory targets migrations, features, refactors, integrations, and reviews.

Resolution: Factory created Crucible for customer-centric and evolving evaluation scenarios.

“Not all coding tasks are of this style though. Code Droid is designed to handle many types of tasks including migration/modernization tasks”article, stated

Evaluation

Factory evaluates Code Droid with SWE-bench Full/Lite, pass@k attempts, failure-mode analysis, runtime/token metrics, oracle-patch contamination checks, and the Crucible internal benchmark for real customer workflows.

Metrics: 19.27% SWE-bench Full · 31.67% SWE-bench Lite first attempt · 37.67% pass@2 and 42.67% pass@6 · 8% target-file missing, 8% target-file not top-5, 6% not selected for editing · 5-20 minutes average patch runtime and up to 13 million tokens per patch

3 supporting quotes
“Code Droid demonstrated exceptional performance on the SWE-bench Full benchmark, achieving a score of 19.27%.”article, stated
“The pass rates improved with multiple attempts - specifically, Code Droid achieved a pass rate of 37.67% pass@2”article, stated
“Our analysis of Code Droid’s performance on SWE-bench Lite revealed several points of failure in the system.”article, stated

Outcomes

The source provides substantial metrics: 2,294 SWE-bench issues, 300 Lite problems, 19.27% and 31.67% headline scores, pass@6 improvement to 42.67%, 5-20 minute average patch time, a 136-minute extreme, and up to 13 million tokens per patch.

3 supporting quotes
“Code Droid outperforms the competition for both simple and complex tasks.”article, stated
“This ongoing refinement helps prevent model overfitting to dated or overly specific scenarios”article, stated
“These certifications and independent audits demonstrate our ongoing dedication to managing data in a way that ensures security and respects privacy.”article, stated