Skip to content

Built-in agent

Describe a site and Perafly's agent builds it and publishes a preview. Going live is always your call.

On this page

How it works

You describe what you want. A lead agent plans the work and hands parts of it to designer, developer and reviewer agents. They write the code in a workspace, build it and publish a preview version of the project. You look at the preview address and promote it when you're happy; the agent can't make anything live itself.

Each piece of work is a session (ags_…). The same session continues in the dashboard (Build), in the mobile app and with perafly agent. Without a project, the first preview creates one.

No Perafly, hosting, payment or model provider key is ever placed in the agent's workspace. The agent asks Perafly to publish, and Perafly does it.

Before you start

  • Data notice. A team owner or admin accepts the agent's data notice once on the Build page. It explains what is sent to the model provider and how long it's kept.
  • Agent credit. The agent spends the team's agent credit. Each plan adds credit every period; owners and admins can buy credit packs under Billing. 1 credit is 1 cent of agent spend.
  • Design. Owners and admins can save the team's colors, fonts, logo and notes on the Build page; the designer agent reads them in every session.

Budget and spending

Every session opens with a spending cap: by default $5, at most $50, and never more than the team's remaining credit. When the cap is reached the session pauses; it isn't deleted. Raise the budget and it continues. Spending comes out of the plan's credit first, then out of purchased packs.

When the team's included usage or spend limit stops new builds, new sessions can't start either; see Billing and plans.

Session status

StatusMeaning
starting, runningThe agent is working.
idleYour turn: send a message or promote a preview.
waitingA tool call waits for your approval; pending lists them.
pausedThe budget is used up; raise it to continue.
ended, failedThe session is over.

From the terminal

The agent commands need a full sign-in: an agent-profile key can't spend the team's agent credit.

Terminal
perafly agent "A landing page for a bakery with an order form"
perafly agent "Add a gallery page" --project sunny-bakery --budget 10
perafly agent ls
perafly agent attach ags_…            # follow a session
perafly agent say ags_… "Make the header darker"
perafly agent budget ags_… 15         # new cap in dollars; a paused session continues
perafly agent allow ags_… <event>     # or: deny ags_… <event> --message "…"
perafly agent stop ags_…
perafly promote v3                    # make the preview live

perafly agent follows the session until it waits for you; --no-wait only starts it and --wait-timeout (default 3600 seconds) stops following. The same actions are in the API reference.