Laravel Herd 2: Studio, Workspaces and Coding Agents

· laravel, AI

Table of contents

For years Laravel Herd did one job, and did it well: serve every PHP project in ~/Herd on a .test domain without me touching nginx or Homebrew. Laravel Herd 2.0, announced on November 5, 2026 for macOS and Windows, keeps that job and adds three bigger ones: Herd Studio, a browser panel for working with coding agents next to your running site; workspaces, isolated copies of a site on their own git branch and subdomain; and deploys to Laravel Cloud straight from Herd. I have been using local agents on client projects for months, so here is what each feature does, how I would use it, and what I would switch off.

Herd Studio: the agent panel next to your local site

Herd Studio puts a live preview of your site beside a set of tools. You open it from the "Edit with Herd" badge that now appears on local pages, by visiting /herd-studio on a site, or with one command from the project directory:

cd ~/Herd/shop
herd studio

The panel has an agent chat (several conversations per site, plan approval, image attachments), a code browser with PHP autocompletion, a Changes tab to review the agent's diff, a terminal, logs through Laravel Pail, the queue, and the site settings (PHP version, HTTPS, isolation, services). It also shows the latest exception and can hand it to an agent, which is exactly the loop I run by hand today: copy the stack trace, paste it into the agent, wait.

The important detail: Herd does not ship its own model. The chat runs opencode with the AI provider you already pay for, or the free models opencode offers. And if you prefer Claude Code, Codex or Cursor in your own terminal, a setting exposes the Herd MCP server to them, so they can read the same runtime context (queries, logs, jobs, dumps, HTTP calls) that Studio sees.

Workspaces: one branch, one subdomain, one agent

This is the feature I care about most. A workspace is a copy-on-write clone of a site on its own git branch, served on its own subdomain:

cd ~/Herd/shop
herd workspace feature-auth
# served at https://feature-auth.shop.test

Because the clone is copy-on-write, it costs no disk space until files change. Herd copies your .env and rewrites APP_URL, SESSION_DOMAIN, SANCTUM_STATEFUL_DOMAINS and DB_DATABASE for you, which is the part everyone gets wrong when they juggle git worktrees by hand. Existing worktrees are detected and served as subdomains too.

The database is the real decision. By default a workspace shares its parent's database, which is fine for a CSS change and dangerous for anything with a migration. For agent work I would always isolate it:

# copy the current data
herd workspace refunds --database=clone

# start from an empty database and run the migrations
herd workspace new-billing --database=empty

Isolated databases work with MySQL, MariaDB, PostgreSQL and SQLite. The rest of the lifecycle is a handful of commands: herd workspaces to list them, then workspace:switch, workspace:open, workspace:merge and workspace:delete, with configuration in a herd.yml file you can commit for the team.

Why it matters: running two agents on the same checkout is how you end up with half a migration from one task and a broken view from another. One workspace per task gives each agent its own branch, URL and data, and you review and merge them one by one.

Automatic dev server and Laravel Cloud deploys

With Studio enabled, Herd starts the dev server when you open a site in the browser: php artisan dev on Laravel 13.25 or later, otherwise the dev script from package.json when the project has a Vite config. If there is no production build yet, Herd holds the first request for up to 15 seconds while Vite boots, then stops the server once the site has been idle. No more forgotten npm run dev tabs.

A new Applications window lets you create an app from a prompt, check on agent workspaces and deploy. Connect a Laravel Cloud account and each app gets a "Deploy to Laravel Cloud" button. My client projects mostly run on Forge, so I will keep deploying from git, but for a prototype or an internal tool, going from a prompt to a public URL without leaving Herd is hard to beat.

Free or Pro: what you actually get

  • Herd (free) now includes Herd Studio and the PHP profiler.
  • Herd Pro, $99 the first year then $79 a year, adds services such as MySQL, PostgreSQL and Redis, the mail catcher, Insights, Tinker in Studio and the runtime context given to coding agents.
  • Herd for Teams, $299 the first year then $240 a year for 10 licences, adds licence management and shared project configuration.

If you only serve PHP sites, nothing forces you to change your setup. The upcoming 2.1 release adds an AI tab in the settings where each piece can be switched off on its own: Studio, the badge on your sites, the MCP server, the runtime context sent to agents, automatic dev servers, notifications and background updates of the bundled tools.

How I would set it up on a client project

  1. Keep the agent's context local. Turn on the MCP server only for the agent you trust, and leave PHP CLI commands out of the runtime context unless you need them.
  2. One workspace per ticket, always with --database=clone or --database=empty when a migration is involved.
  3. Review in the Changes tab, merge with git, and run the test suite on the workspace before workspace:merge. The agent writing the code should not be the one deciding it is done.
  4. Hide the badge when you demo a local site to a client.

Conclusion

Herd 2 turns a local server into a local agent workbench, and the best part is not the chat panel but the plumbing around it: isolated workspaces with correct .env values and their own databases, runtime context through MCP, and dev servers that start themselves. If you already run Claude Code or Codex against Laravel apps, update Herd, try one workspace on your next ticket, and keep the AI features you do not need switched off. The full list of changes is in the Herd changelog.