Skip to content
PentAGI
All posts

VXControl team5 min read

Start an autonomous pentest, stay in control

What happens inside PentAGI after you start a flow, which limits keep the agents on track, and where the operator steers, stops and decides.

  • autonomous-pentesting
  • agents
  • enterprise

"Autonomous" gets used loosely in security tooling. This post follows a PentAGI flow from the first message to the report: how the work is planned and delegated, which limits stop an agent that goes in circles, and the points where the operator steers, stops and decides.

Everything in this post works in the open-source edition. Sections and passages marked Enterprise need PentAGI Enterprise.

Write the task like a scope

A flow starts from the new-flow form. Automation mode carries out the goal end to end; Assistant mode is a conversation you steer step by step, and with Use Agents on it delegates subtasks to the same specialist agents. You pick the provider, describe the target and the objective in plain language, and start.

The first message does more than any model choice. Name the target, the kind of assessment, the scope limits and the result you expect:

Assess https://target.example for common web application vulnerabilities.
Focus on authentication, file handling, and injection issues. Stay within the
provided target only and summarize confirmed findings with reproduction steps.

The repository has longer starting points in examples/prompts/, such as base_web_pentest.md and scope_of_work_pentest.md, and the new-flow form can prefill the message from a saved template. A long "do the whole pentest" request works better as several short flows, for example recon first, then the web application: each is easier to review and to repeat.

Files go with the task, not into the chat. Uploads on the flow's Files tab appear in the sandbox at /work/uploads/, and files attached from your resource library at /work/resources/.

From message to subtasks

Once the flow starts, the work runs in a fixed loop:

  1. Your message becomes a task, and the generator splits it into subtasks, up to 15 per task by default.
  2. Before each subtask, in PentAGI Enterprise, a planner picks the agent profile that fits the work, such as recon or pentester, the plugins it may use and a short checklist. The planner always runs, on the adviser model of the flow's provider.
  3. The working agent runs its tools in the flow's sandbox and adapts to the output. It can start sub-agents for parallel work inside the subtask, within the flow's ceiling.
  4. After each subtask, the refiner reviews the remaining plan and changes it when the results call for it.
  5. When the task is done, the reporter writes up its result, and the flow's report collects the results of all its tasks.

Commands, output and results stay in the flow's memory, so later subtasks build on earlier ones. The autonomous pentesting page describes the loop in more detail.

The limits that keep it on track

An autonomous agent needs brakes that do not depend on the model behaving. PentAGI has several, always on:

  • Tool call limits. MAX_GENERAL_AGENT_TOOL_CALLS (default 100) caps the model turns in the chains of the primary agent, the assistant, the pentester, the coder and the installer; MAX_LIMITED_AGENT_TOOL_CALLS (default 20) caps the other agents.
  • Repeat detection. From the third identical call in a row, the tool is not run again: the agent gets the previous answer back with a request to change course. The seventh such call ends the chain.
  • Reflector. When a model answers without a tool call, the reflector guides the agent back to one; after three unsuccessful rounds the chain stops.

In Enterprise, execution monitoring is on by default as well. After 20 calls in a row to the same tool, 40 tool calls since the last check, or at half and three quarters of the subtask's time budget, a short check decides whether the agent is stuck, and only then does the adviser review its work and recommend whether to continue, change approach or stop.

1 / 5

Step 1 is the loop, in execution order. Steps 2 to 5 are separate branches off it, not a sequence. The dot shows direction, not timing.

Model callone turn, with toolsTool dispatcherruns the callsConversationthe next turn reads itReflectorsteers back to a toolRepeat detectionsame call, same argsExecution monitoris the agent stuck?Tool call limit100 or 20 turnsChain stopsthe agent ends heretool callsresultsnext turnno tool callguidance3 rounds3rd identicalold answer7th identicallimitcheckadvicemay advise stop
modelruntimeconversationcorrects, the loop goes onends the chain

Budgets bound the whole run. A new Enterprise flow takes its defaults from .env:

AGENT_TIME_BUDGET_SECONDS=10800      # three hours of agent work per task
AGENT_MAX_SUBTASKS=15
AGENT_MAX_CONCURRENT_SUBAGENTS=10

The agent profiles documentation has the rest of the settings.

What the operator sees

The flow page opens as soon as the flow starts. Tasks shows the plan with the status of each subtask, Terminal streams every command and its output from the sandbox, and the Dashboard breaks usage down by model, agent type and function. Files and Screenshots keep what the agents pulled from the container and the pages they opened.

With the knowledge graph enabled, Enterprise draws the attack chain live as hosts, services, vulnerabilities and access are found. You can also open your own terminal in the sandbox and work next to the agents.

Where the operator decides

  • Scope. The agents follow the task, so the targets and the rules of engagement are yours to write. PentAGI does not restrict targets on its own: enforce a hard boundary at the network level too, for example with firewall rules on the worker node.
  • Steering. Open the Assistant view of the same flow to check its state, stop the current task, send follow-up instructions or change the remaining subtasks, without restarting the flow. There is no separate Resume button: after a provider's rate limit, a follow-up message in the same flow continues the work.
  • Questions. With ASK_USER=true, the primary agent can pause the flow and ask you for input. The flag only allows it, so say in the task when the agent should stop and ask.
  • Limits. Budgets and limits of a running flow change under Preferences and apply from the next task.
  • The report. Open it on the web, copy it, or export it to Markdown or PDF, and to DOCX in Enterprise. What goes to the client stays your call.

Limitations

Autonomous testing suits repeated assessments of your own systems, lab and training targets, and the first pass of an engagement: mapping the attack surface, checking known weaknesses and writing up what was found. It does not replace a tester's judgment on scope, impact and risk. Two runs of the same task can differ, so treat the findings as leads to confirm.

See a flow start on your scope

PentAGI is open source under the MIT license: start with the repository on GitHub and the first flow guide. Agent profiles, time budgets, execution monitoring by default and the live attack chain are part of PentAGI Enterprise.

We are bringing PentAGI to GITEX GLOBAL 2026 in Dubai: 8–10 December at Expand North Star, Scale-It! zone, Dubai Exhibition Centre, Expo City Dubai. Come by for a live demo or book a meeting with the team.