Why Laravel, Yii and Rails Suit Agent Driven Development

Fullstack framework code generated by an AI agent.

One developer running a team of AI agents should pick a framework with strong conventions: Laravel, Yii2/3 or Ruby on Rails. Such frameworks give predictable code and a short context, which is exactly what an agent needs.

I have worked with frameworks for 20 years and follow one rule: simplicity first. In that time large companies split frontend and backend, because separate teams of people owned them. Today the team is made of agents (opencode, hermess, OpenClaw, paseo.sh), and splitting one product into two apps only raises the token bill.

Four Reasons They Win

  • predictable output: fixed conventions and good docs, so the agent follows a pattern instead of guessing,
  • cheap tokenomics: little code, big effect, a controller fits in a few lines,
  • fullstack: one app instead of a frontend, a backend and an API between them,
  • standard DDD: MVC and REST are patterns the models already know, so tasks are easier to describe.

I covered the workflow itself in fast code generation with agents, Rails and MongoDB.

Short Code Fits in the Context

In our crawler admin panel a landing page is three lines and a table view is one loop.

# app/controllers/home_controller.rb
class HomeController < ApplicationController
  allow_unauthenticated_access

  def index; end
end
<%# app/views/hosts/_field_table.html.erb %>
<% fields.each do |field| %>
  <tr>
    <th><%= field %></th>
    <td><%= document_value(doc[field], field).presence || "-" %></td>
  </tr>
<% end %>

The agent reads that file whole. It never rebuilds the flow across five layers of abstraction.

Pick the Database That Fits the Problem

Do not fear SQLite or NoSQL databases. Matching the database to the problem removes migrations and whole mapping layers. The document model in the crawler panel looks like this:

# app/models/crawl_host.rb
class CrawlHost
  include AdminDocument

  store_in collection: 'hosts'

  admin_field :hostname
  admin_field :kind, input: :select
  admin_field :status, input: :select
  admin_field :indexed_at, type: Time, input: :datetime
end

Those four fields describe the form, the filter and the table at once. Like in Astro, content can also live in Markdown files parsed by a short service of your own.

Why Not Django

Python is a great language for cutting complexity, but Django is not my pick for agent driven work. I prefer to move the web layer to Rails or to a PHP framework. Another language looks like added complexity, yet in practice it yields shorter and more predictable code.