An AI agent coding skeptic tries AI agent coding, in excessive detail
Summary
This article details an experienced data scientist's evolving perspective on AI agent coding, shifting from skepticism to optimism following significant improvements in models like Claude Opus 4.5 and GPT-5.3-Codex. The author initially found agents unpredictable and expensive but later used them for practical tasks, including creating a Python wrapper for Google's Nano Banana generative AI and implementing a `Grid` class for image manipulation. A key finding was the effectiveness of `AGENTS.md` files for controlling agent behavior and code quality. The author successfully used agents to develop several Rust projects with Python bindings, such as `icon-to-image`, a terminal-based MIDI composer `miditui`, and a physics simulator `ballin`. Critically, agents achieved 2-100x speedups for various machine learning algorithms like UMAP, HDBSCAN, and GBDT, even matching or exceeding highly optimized libraries like NumPy and XGBoost, by iteratively optimizing Rust code.
Key takeaway
For Machine Learning Engineers and Data Scientists seeking to optimize computationally intensive algorithms, consider integrating modern AI agents like Claude Opus 4.5 or GPT-5.3-Codex into your development workflow. By leveraging `AGENTS.md` files and iterative optimization prompts, you can achieve substantial performance improvements (2-100x) in Rust implementations with Python bindings, potentially surpassing existing highly optimized libraries. This approach offers a path to developing faster, more robust data science tools, even for complex tasks like UMAP or HDBSCAN.
Key insights
Modern AI agents, guided by explicit `AGENTS.md` files, can generate highly optimized, performant code across multiple languages.
Principles
- Explicit agent configuration via `AGENTS.md` is crucial for quality.
- Iterative optimization by agents yields significant performance gains.
- Combining agents can achieve superior optimization results.
Method
Define agent behavior with an `AGENTS.md` file, provide detailed prompts, and iteratively optimize generated code using benchmarks and accuracy checks, potentially chaining different LLMs for enhanced performance.
In practice
- Use `AGENTS.md` for consistent code quality and style.
- Employ `pyo3` to bridge Rust's speed with Python's ecosystem.
- Benchmark agent-generated code for quantifiable performance improvements.
Topics
- AI Agent Coding
- LLM Code Optimization
- Rust Development
- Machine Learning Algorithms
- AGENTS.md Configuration
Code references
- minimaxir/gemimg
- features/copilot
- minimaxir/youtube-video-scraper
- minimaxir/youtube_scraper_opus
- huggingface/tokenizers
Best for: Machine Learning Engineer, Data Scientist, Software Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Max Woolf's Blog.