Pervis
An AI agent for performance marketers
Context
Ad setup takes up most of a performance marketer’s day, and gets written off as clerical repetition. It turned out to be where the fatigue was worst.
The aim was to start there, with bulk setup, and automate the whole cycle on AI — setup, then performance analysis, then strategy. Nothing new to fill in: the input is the sheets and data the marketer already keeps.
That first stretch is full of hidden data and tacit knowledge. What arrives is fragmented and follows no agreed format.
All of it had to be read autonomously — without the agent ever stepping off the workflow it was given. That is what pointed at an FSM-based agent: as much latitude as possible inside a path it cannot leave.
How I solved it
- Wrote the workflow out as 13 stages with forward-only transitions
- the path is locked, the judgement inside each stage is not
- Scoped the tools available in each stage, so the agent cannot even attempt what the current stage does not permit
- Put deterministic gates in front of the model
- cancellations, off-topic requests, and correction pairs are resolved before the expensive call, so fewer requests reach it at all
- Made the human approval a condition of the transition itself, not a screen before it
- without the sign-off the pipeline cannot advance to the stage that spends
- Left the rest to runtime guardrails
- repeated calls, ping-pong, stage regression, and question overload, plus the run’s own turn and cost ceiling. The counters live in a checkpoint, so a dropped request or a restart does not reset them
- Tool results go to a checkpoint and come back to the model as a summary, so adding stages does not add to what the model has to read
- Declared platform differences as pipeline templates, so five ad platforms sit on one engine
- ReadSheet against the live account
- InterpretIntent, missing fields, creative mapping
- ReviewFlags violations, proposes fixes
- ApprovalHalts until a person passes it
- ExecutionThe part that cannot be undone
Result
- The path is fixed and everything inside it is not
- the order of stages is locked, but which tools to reach for and in what order is the agent’s call. Nothing is forbidden by prompt; what the stage cannot do is simply absent from the tool list
- Sheets arrive in no agreed format and are taken as they are
- structure, column meaning, cell values, and cross-cell inference are handled in layers, with the rules finishing whatever they are sure of and only the ambiguous remainder going to the model
- A model that takes a different route through the same input every time is wrapped by the structure
- gates hold the transitions, guardrails hold the run, and a wandering execution ends in a halt rather than a failure
- Thirteen stages, and still no growth in what the model reads at once
- tool results accumulate in checkpoints and reach the model as summaries
- Platform differences are absorbed by template declaration alone, putting five ad platforms and 217 agent tools on a single engine
- Meta, Google Ads, TikTok, Kakao, Naver