micro-agent  by BuilderIO

AI agent for test-driven code generation and fixing

created 1 year ago
4,148 stars

Top 12.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a focused AI agent designed to write and iteratively fix code based on provided test cases or visual designs. It targets developers seeking to automate the tedious process of debugging and refining code, aiming to improve productivity by handling repetitive code adjustments.

How It Works

The core approach is "micro-agent" philosophy: a small, specialized agent that performs a single task exceptionally well. It operates by first generating a definitive test case and then repeatedly modifying the target code until all tests pass. For visual matching, it employs a multi-agent system, leveraging Anthropic Claude for visual analysis and OpenAI for code generation, aiming for pixel-perfect design-to-code conversion.

Quick Start & Requirements

  • Install via npm: npm install -g @builder.io/micro-agent
  • Requires Node.js v18 or later.
  • API keys for LLM providers (OpenAI, Anthropic, Ollama, or compatible) are necessary for functionality.
  • Official Docs: https://github.com/BuilderIO/micro-agent

Highlighted Details

  • Supports multiple LLM providers including OpenAI (GPT-4o, GPT-3.5-turbo), Anthropic (Claude models), and Ollama.
  • Offers an experimental visual matching mode for design-to-code, requiring an Anthropic API key for optimal results.
  • Integrates with Visual Copilot for enhanced Figma-to-code fidelity, including design token and component reuse.
  • Configurable maximum runs and test scripts for tailored iteration cycles.

Maintenance & Community

  • Project is actively maintained by Builder.io.
  • Feedback can be provided via GitHub issues or by contacting @steve8708 on Twitter.
  • Contribution guidelines are available in CONTRIBUTING.md.

Licensing & Compatibility

  • The project is licensed under the MIT License.
  • Permissive licensing allows for commercial use and integration with closed-source projects.

Limitations & Caveats

The visual matching feature is experimental and under active development. The agent is intentionally scoped to avoid complex operations like managing multiple files or installing dependencies, which could lead to unpredictable failures.

Health Check
Last commit

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
174 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.