
The data to explain a slow endpoint is usually already sitting in your project. Blackfire has the profile. Continuous profiling has the flame graph. The traffic numbers show which route matters. The code is in git. What takes the afternoon is putting those four things next to each other and working out which function is responsible.
That afternoon is what the Upsun Performance Agent is for. It is an AI agent that runs inside your Upsun project, reads those signals from a deployed environment, and returns a short report: what is slow, why, how much it matters to users, and a diff you can apply. It shipped in August and is available now on Upsun Cloud.
When we interviewed customers earlier this year about how they handle performance work, the same story came up again and again. They connect Blackfire, open a call graph, and don't know what they're looking at. So the work waits.
A common workaround was to paste Blackfire output into ChatGPT and ask it to explain. That works up to a point, but a generic LLM only sees the profile. It can't see the code, the traffic that decides which endpoint matters, or how the app is deployed. You get an explanation of the symptoms and no fix.
Upsun holds all of those inputs in one place.
You add three lines to .upsun/config.yaml:
tasks:
performance-agent:
base: "performance-agent"
You add an ANTHROPIC_API_KEY or OPENAI_API_KEY as a sensitive environment variable, push, and a Run button for the agent appears in the Console under the environment's Tasks card. Pick the application (or worker) to analyze, pick a time window, and go. You can trigger the same thing from the API if you'd rather:
upsun e:curl -p <project-id> -e <environment> -X POST /tasks/performance-agent/run \
--json '{"variables":{"env":{"AGENT_APPLICATION":"<app-name>"}}}'
The agent starts as a task container, which means it exists only while it runs. IIt pulls Blackfire profiles and continuous profiling data for the time window you pick (anything from 15 minutes to seven days), looks at traffic to rank endpoints by how much they matter, clones your source, and works out what to do about the hot spots. When it's done, the container is gone and the report shows up in a Report tab on the task's activity in the Console.
A run usually takes a few minutes.
A summary paragraph, a one line recommendation for what to fix first, then up to five findings ranked by impact on user experience (you can set that anywhere from one to fifteen). Each finding has a priority, a plain language description of the root cause, the evidence the agent used, and a recommended change, usually with a diff.
Every report follows the same structure, which matters when you’re comparing runs or handing one to a colleague who didn’t trigger it.
There is no Upsun line item for the agent. Two things do cost money.
The first is the task container it runs on, billed per second like any other container in your project, and only while it's running.
The second is model tokens, and those land on your own Anthropic or OpenAI bill. We don't resell model access. Our estimates from testing are roughly $0.25 to $0.85 per run on gpt-5.6-terra, $0.65 to $2.20 on claude-sonnet-5, and $1.00 to $2.90 on claude-opus-4-8, which is the default.
Bringing your own key is more setup than a bundled assistant asks of you. We know that. The trade is that you see exactly what each run costs and you pick the model. Your application's profile and code also never pass through a model account we control, which some of the teams we spoke to cared about more than the price.
It doesn't change your code, and it doesn't open a pull request. In the interviews, eight out of ten people told us they wanted an explanation they could review rather than a fix applied for them, at least to start with, so that's how we built the first version.
Nothing happens unless you ask for it. There is no schedule, and the agent doesn't wake up when a metric crosses a line. You trigger it, or you call the API from your own scheduler.
And it works better with more profiling data. Every project includes 15 minutes of continuous profiling, which is enough for a run but only covers the last few minutes of activity. The continuous profiling add-on keeps 30 days, so the agent can catch problems that build up over time, like a slow path under peak traffic or a weekly batch job.
This is the first of a set. A log analyzer agent is coming next. It runs on the same task container runtime and produces the same shape of report, so once you’ve read one, you’ll know how to read the next.
If you're on Upsun Cloud and already sending Blackfire data, the docs get you from zero to a first report in about five minutes. Tell us what it finds.