TLDR Web Dev · MISCELLANEOUS

CODING AGENT IN 94 LINES OF RUBY

radanskoric.com11 min read

Summary from the TLDR Web Dev newsletter

A coding agent can be written in just 94 lines of Ruby. The agent shown uses an AI chat loop powered by the RubyLLM gem and three key tools: reading files, listing files, and editing files, allowing it to create and modify code. The agent also has the ability to execute shell commands with user confirmation, allowing it to test and refine its code.