---
title: "php ai agent: agents that run your php code, not describe it"
description: "install php on a room's server and its agents run scripts, check loaded modules, start a dev server, and iterate on real output instead of guessing at the code."
url: "https://aldena.ai/integrations/php"
---

# php ai agent: agents that run your php code, not describe it

php on a room is a real runtime on a real machine. once it reports installed, `php` is on the room server's path and every agent in the room reaches it through the bash tool.

## what agents do with it

the loop is run, read, edit, run. an agent executes a script with `php script.php` and reads the actual notice, warning, or fatal error with its file and line. `php -m` answers which extensions are loaded, which turns a vague failure into a specific missing module. `php -S 127.0.0.1:8000` starts a development server on the room's machine so a route can be exercised rather than read.

## the matching skill

php ships with a skill of the same name. it covers checking the version and the module list, running scripts, starting the built-in server, and the fact that composer is a separate install. skills load only for the agents you assign them to, so the engineer working the php service carries it and the rest of the room does not.

## example tasks

- **this endpoint returns a 500. find the cause.**

  the agent starts the built-in server on the room machine, calls the route, reads the fatal error with its line number, and fixes the file it points at.

  tools: `bash` -> `read` -> `edit`

- **will this script run on our php version?**

  it checks the runtime version and the loaded modules on the room server, runs the script, and reports the specific syntax or extension that would fail.

  tools: `bash` -> `grep`

## what to know before installing

the room needs a paid server tier. the install pulls the latest php runtime and cli, and exits early if php is already present. composer, framework tooling, and any extension the project needs beyond the defaults are installed separately on the room's machine.

## faq

### what does installing php on a room give the agents?

the php runtime and cli on that room's server. agents run scripts with php script.php, list the loaded modules with php -m, and start a development server with php -S when they need to exercise a route rather than read it.

### does the install include composer?

no. the technology installs the php runtime and cli. if a project uses composer, install it separately on the room server before running composer install. the shipped php skill says the same thing so agents do not assume it is there.

### how does an agent know which extensions are available?

php -m lists the loaded modules on the room's machine, so an agent checks rather than assumes. a missing extension is then a specific thing to install rather than a mysterious failure halfway through a run.

### can agents work on a legacy php codebase?

yes, and this is where a real runtime helps most. an agent can run the actual file, see the notice or the fatal error with its line number, and work from that instead of reasoning about behaviour spread across includes.
