OpenQQuantify is a multi-agent LLM system that automatically generates complete Arduino projects from natural language descriptions. The system breaks down hardware project creation into 4 specialized agents that work in sequence.
Purpose: Converts natural language project descriptions into detailed component lists
- Input: Plain English project description ("Build a greenhouse monitor...")
- Output: JSON with components, quantities, descriptions, and initial pin assignments
- AI Focus: Component selection, compatibility checking, quantity estimation
Purpose: Creates detailed wiring diagrams and pin connections
- Input: Component list from Agent 1
- Output: JSON with precise pin-to-pin connections and wiring specifications
- AI Focus: Pin mapping, electrical compatibility, connection validation
Purpose: Generates Arduino IDE-compatible code for the project
- Input: Wiring specification from Agent 2
- Output: Complete Arduino sketch with libraries, setup, and main loop
- AI Focus: Code synthesis, library integration, hardware abstraction
Purpose: Creates step-by-step assembly and programming instructions
- Input: Wiring spec from Agent 2 + Code from Agent 3
- Output: Human-readable build guide with assembly steps and troubleshooting
- AI Focus: Technical writing, safety considerations, testing procedures
-
Start the Flask server:
python flask_app.py
-
Open your browser to
http://localhost:5000 -
Use the visual interface:
- Enter your project description in the test area
- Click "Run Full Pipeline" to execute all agents in sequence
- View results for each agent (BOM, Wiring, Code, Build Guide)
- Use the visual workflow editor to connect data sources and APIs
python -m venv venv
venv\Scripts\activate # Windows
# or: source venv/bin/activate # macOS/Linux
pip install -e .Agent 1 - Generate BOM:
openq-agent1 "Build a soil-moisture monitor with OLED display using Arduino Mega 2560" \
-o outputs/agent1/soil.jsonAgent 2 - Generate Wiring:
openq-agent2 -i outputs/agent1/soil.json \
-o outputs/agent2/soil_wiring.jsonAgent 3 - Generate Code:
openq-agent3 -i outputs/agent2/soil_wiring.json \
-o outputs/agent3/soil_code.jsonAgent 4 - Generate Build Guide:
openq-agent4 -i outputs/agent2/soil_wiring.json \
-c outputs/agent3/soil_code.json \
-o outputs/agent4/soil_steps.json"Build an Arduino Mega 2560 greenhouse monitor that reads temperature, humidity and light, logs data to a local SQLite DB, and blinks an LED when humidity < 30%."
{
"components": [
{"component_name": "Arduino Mega 2560", "quantity": 1},
{"component_name": "DHT22", "description": "Temperature/humidity sensor", "quantity": 1},
{"component_name": "BH1750", "description": "Digital light sensor", "quantity": 1},
{"component_name": "LED", "quantity": 1},
{"component_name": "Resistor 220Ξ©", "quantity": 1}
]
}{
"connections": [
{"from_": ["DHT22", "DATA"], "to": ["Arduino Mega 2560", "D2"]},
{"from_": ["BH1750", "SDA"], "to": ["Arduino Mega 2560", "D20"]},
{"from_": ["LED", "anode"], "to": ["Arduino Mega 2560", "D13"]}
]
}{
"code_blocks": [{
"component": "Arduino Mega 2560",
"code": "#include <DHT.h>\n#include <BH1750.h>\n\nvoid setup() {\n // Initialization code\n}\n\nvoid loop() {\n // Main program logic\n}"
}]
}{
"assembly_steps": [
{"step": 1, "title": "Gather Materials", "instructions": "Collect all components..."},
{"step": 2, "title": "Wire Sensors", "instructions": "Connect DHT22 to pin D2..."}
],
"testing_procedures": [...],
"troubleshooting": {...}
}- Drag and drop agent boxes to design your workflow
- Connect purple lines between agents to show data flow
- Configure data sources: Add component databases, APIs, custom code
- Real-time status: See each agent's progress during execution
- Data Ingestion: Connect component databases and specifications
- APIs: Integrate external services (pin mappings, documentation)
- Custom Code: Add code templates and custom logic
- Expandable sections for each agent output
- JSON formatting with syntax highlighting
- Error handling with detailed debugging information
- Export capabilities for generated projects
OpenQQuantify/
βββ agents/arduino/ # Core agent implementations
β βββ agent1arduino.py # BOM Generator
β βββ agent2arduino.py # Wiring Spec Generator
β βββ agent3arduino.py # Code Generator
β βββ agent4arduino.py # Build Guide Generator
βββ templates/ # Web interface
β βββ agent_orchestration.html
βββ utils/ # Shared utilities
β βββ logging_config.py # Centralized logging
βββ outputs/ # Generated project files
β βββ agent1/ # BOM outputs
β βββ agent2/ # Wiring outputs
β βββ agent3/ # Code outputs
β βββ agent4/ # Build guide outputs
βββ flask_app.py # Web server
βββ README.md
Create a .env file with your OpenAI API key:
OPENAI_API_KEY=sk-your-api-key-here
- Arduino Nano
- Arduino Mega 2560
- ESP32 (coming soon)
- Raspberry Pi Pico (coming soon)
- Agent2 validation errors: Usually caused by software components (databases) being included in wiring
- Missing libraries: Ensure all Arduino libraries are installed in your IDE
- Pin conflicts: Check that pins aren't being used by multiple components
Enable verbose logging by setting the logging level:
# In your script or web interface
logging.basicConfig(level=logging.DEBUG)- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Ready to build your next Arduino project? π
- Start with the web interface at
http://localhost:5000 - Or jump into the CLI with
openq-agent1 "your project description"