- Updated: February 16, 2026
- 8 min read
AI Agents Collaboratively Build a Rust SQLite‑Like Engine – UBOS News
AI agents—Claude, Codex, and Gemini—collaborated to create a fully‑featured, SQLite‑like database engine written in Rust, delivering over 19 k lines of production‑grade code, comprehensive test coverage, and a reproducible workflow that showcases the power of AI‑driven development.
How AI Agents Built a Rust‑Based SQLite Engine in Record Time
In early February 2026, a small swarm of large‑language‑model agents was tasked with a seemingly impossible mission: design and implement a complete relational database engine, comparable to SQLite, using the Rust programming language. The result was a 19 k‑line codebase that includes a parser, query planner, B‑tree storage, write‑ahead logging, transaction handling, and a full suite of 282 passing unit tests. This article dissects the collaboration, architecture, workflow, and lessons learned, while showing developers how to replicate the experiment and explore future possibilities.

1. AI Collaboration: Claude, Codex & Gemini
The three agents were chosen for their complementary strengths:
- Claude – excels at high‑level design, documentation, and orchestrating the overall project structure.
- Codex – specializes in code generation, especially for low‑level systems programming in Rust.
- Gemini – provides rapid iteration, refactoring, and de‑duplication through a dedicated coalescer.
Each agent operated in its own isolated workspace, pulling the latest main branch, claiming a scoped task from a lock file, and pushing back changes after passing the cargo test suite. The coordination model mimics a distributed version‑control system, where tests act as the anti‑entropy mechanism that keeps the codebase consistent.
For a deeper dive into how AI agents can be orchestrated for software projects, explore our AI agents page.
2. Technical Architecture of the SQLite‑Like Engine
The engine follows a classic layered design, each layer implemented as an independent Rust crate to enforce strict module boundaries:
| Layer | Responsibility | Key Rust Crates |
|---|---|---|
| Parser | Lexical analysis and AST generation for SQL statements. | sql_parser |
| Planner | Transforms AST into logical and physical query plans. | query_planner |
| Executor | Volcano‑style execution engine that streams rows through operators. | executor |
| Storage | B‑tree pages, write‑ahead log (WAL), and recovery logic. | storage_engine |
| Transaction Manager | Implements ACID semantics, lock management, and checkpointing. | txn_manager |
All crates share a common core library that defines data types, error handling, and utility functions. This modularity allowed Claude to focus on the design docs while Codex generated the low‑level storage code, and Gemini performed cross‑crate refactoring.
To see a real‑world example of a modular Rust project, check out the UBOS platform overview, which demonstrates similar crate separation for AI‑powered SaaS solutions.
3. Development Workflow & Key Results
The workflow was driven by a set of shell scripts that automate agent lifecycle management:
# launch_agents.sh – starts all agents in screen sessions
# agent_loop.sh – each agent repeatedly:
# 1. Pull latest main
# 2. Claim a task from current_tasks/
# 3. Generate code + tests
# 4. Run cargo test
# 5. Commit & push if tests pass
# coalesce.sh – runs Gemini to deduplicate and merge divergent changes
Key metrics from the two‑day sprint:
- ~19 k lines of Rust code (≈16 k non‑comment, non‑blank lines).
- 282 unit tests covering parser, planner, executor, and storage layers.
- 54.5 % of commits were coordination actions (lock, claim, release).
- All tests passed on every push, ensuring continuous correctness.
The oracle‑style validation—comparing query results against the reference SQLite binary—proved decisive. Each generated query was executed on both the new engine and SQLite; any discrepancy caused an immediate rollback.
For developers interested in rapid prototyping of AI‑driven workflows, the Workflow automation studio offers a visual canvas to orchestrate similar pipelines without writing shell scripts.
4. How to Replicate the Rust SQLite Project
Below is a concise, step‑by‑step guide for anyone who wants to run the same AI swarm on their own machine.
- Clone the repository:
git clone git@github.com:kiankyars/parallel-ralph.git cd parallel-ralph/sqlite - Make the scripts executable:
chmod +x *.sh - Install required CLIs (Claude, Codex, Gemini) and ensure they are in
$PATH. Also installscreen,git, the Rust toolchain (rustup), andsqlite3for validation. - Start the agents:
./launch_agents.sh - Monitor progress in the
agent_logs/directory. ThePROGRESS.mdfile is updated after each successful commit. - If you need to restart agents (e.g., after a rate‑limit pause), run:
./restart_agents.sh - Run the coalescer periodically to merge duplicate work:
./coalesce.sh
Note that the coalescer was only executed once at the end of the original experiment, which highlighted the need for more frequent de‑duplication. Future runs should schedule coalesce.sh as a cron job.
For a quick start with pre‑built templates that accelerate AI‑driven development, explore the UBOS templates for quick start. Templates such as the AI Article Copywriter or the AI SEO Analyzer can be adapted to generate boilerplate code for database projects.
5. Current Limitations & Open Challenges
While the prototype is functional, several constraints remain:
- Documentation bloat: The
PROGRESS.mdfile grew to 490 lines, making manual navigation cumbersome. - Token‑usage visibility: Each LLM provider reports usage differently, preventing a unified cost analysis.
- Rate‑limit interruptions: Agents occasionally stalled when hitting API limits, leading to partially completed commits.
- Coalescer frequency: Running the de‑duplication step only once left a lot of redundant work in the repository.
Addressing these issues will require tighter observability (e.g., logging token consumption per request) and more aggressive scheduling of the coalescer.
Our UBOS partner program offers resources and consulting to help teams build robust AI‑augmented pipelines that overcome such limitations.
6. Future Work & Potential Impact on the Ecosystem
Looking ahead, the team plans to extend the engine in several directions:
- Substantive run‑rate tracking: Capture per‑agent throughput to identify bottlenecks caused by rate limits.
- Unified commit attribution: Ensure Claude, Codex, and Gemini all add identifiable signatures to each commit, simplifying audit trails.
- Observability dashboard: Visualize test pass rates, token usage, and lock contention in real time.
- Feature expansion: Add full‑text search, JSON support, and a pluggable storage backend (e.g., RocksDB).
Beyond the technical roadmap, this experiment demonstrates a paradigm shift: AI agents can act as autonomous developers, handling everything from design docs to production‑ready code. When combined with platforms like Enterprise AI platform by UBOS, organizations can scale development velocity while maintaining high quality.
For startups eager to experiment with AI‑first product development, see UBOS for startups. For SMBs looking for ready‑made solutions, the UBOS solutions for SMBs page outlines pre‑built integrations that accelerate time‑to‑market.
7. Conclusion: AI‑Driven Development Is No Longer a Prototype
The successful creation of a SQLite‑like engine in Rust by Claude, Codex, and Gemini proves that AI agents can collaboratively produce complex, production‑grade software when guided by clear task boundaries, rigorous testing, and disciplined lock management. By exposing the full workflow, codebase, and lessons learned, this project offers a reproducible blueprint for developers who want to harness AI for rapid, reliable code generation.
Whether you are building a new database, an AI‑enhanced SaaS product, or any system that demands high reliability, the principles demonstrated here—modular architecture, oracle‑style validation, and continuous coalescing—are universally applicable. Leverage the power of AI agents today and accelerate your development pipeline with tools like the Web app editor on UBOS and the AI marketing agents that can automate content creation, data extraction, and more.
Ready to start your own AI‑driven project? Visit the UBOS homepage for a full suite of AI tools, or explore our UBOS portfolio examples for inspiration.
For the original technical blog that inspired this deep‑dive, see Building SQLite With a Small Swarm.
Explore More AI‑Powered Templates
- Talk with Claude AI app
- Your Speaking Avatar template
- Before-After-Bridge copywriting template
- AI YouTube Comment Analysis tool
- AI Video Generator
- AI Audio Transcription and Analysis
- Generative AI Text-to-Video
- AI Chatbot template
- Customer Support with ChatGPT API
- Multi-language AI Translator
- Translate Natural Language to SQL
- Factual Answering AI with ChatGPT API
- Grammar Correction AI
- Summarize for a 2nd Grader
- AI Language Model Tutorial Chatbot
- JavaScript Helper AI Chatbot
- Movie to Emoji AI Application
- Sarcastic AI Chat Bot
- Unstructured Data AI Parser
- Product Name Generator AI
- Python Bug Fixer AI
- Airport Code Extractor
- Custom Interview Questions with AI
- Create Study Notes with AI
- AI Restaurant Review App
- AI for Turn-by-Turn Directions
- AI Chat App with ChatGPT API
- AI Recipe Creator
- AI-Powered Essay Outline Generator
- AI-Powered VR Fitness Idea Generator
- AI App with Text-to-Command
- Calculate Time Complexity with ChatGPT
- Keywords Extraction with ChatGPT
- AI Voice Assistant
- Extract Contact Information AI
- AI File Manager
- GPT-Powered Telegram Bot
- Video AI Chat Bot
- Pharmacy Admin Panel
- Help Me Write AI
- Text-to-Speech Google AI
- AI Image Generator
- AI Email Marketing
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.