Skip to content
PentAGI
Concepts

Agents

The specialized agents behind a flow and the safeguards that keep them on track.

A flow is carried out by a team of agents. Each agent type has its own prompt, model settings and tools, so you can assign stronger or cheaper models per role.

Agent types

AgentRole
primary_agentMain reasoning agent that drives a flow
assistantInteractive assistant mode
generatorSplits each task into subtasks
refinerRefines the plan as results come in
adviserExpert advice; mentor in execution monitoring and planner in task planning
reflectorCorrects agents that stop producing tool calls
searcherInformation gathering and web search
enricherGathers extra context from memory and the sandbox before the adviser answers
coderWrites and analyzes code
installerInstalls and sets up tools in the sandbox
pentesterPenetration testing and security assessment
simple, simple_jsonPlain and JSON-structured completions

Two more agents work behind the scenes: the memorist answers other agents' questions about past work from long-term memory, and the reporter writes up the result of each task.

How work is delegated

How a task is split into subtasks and the primary agent delegates each step to specialist agents through shared memoryVector storeSpecialistsMemoristPrimary agentGeneratorVector storeSpecialistsMemoristPrimary agentGeneratorSubtasks of the taskPast work, when the context lacks itSearch memoryDelegate a step to the searcher, pentester, coder or installerStore tool resultsResult

Safeguards

  • Tool call limits (always on) — MAX_GENERAL_AGENT_TOOL_CALLS (default 100) caps the model turns in the chains of primary_agent, assistant, pentester, coder and installer, and MAX_LIMITED_AGENT_TOOL_CALLS (default 20) caps them for the other agents. One turn can call several tools. Values from 1 to 5 are raised to 6, and 0 or less means the default.
  • Repeat detection (always on) — from the third call in a row to the same tool with the same arguments, 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 (always on) — steps in the first time a model answers without a tool call and guides the agent back to one; after three unsuccessful rounds the chain stops.
  • Execution monitoring (beta, EXECUTION_MONITOR_ENABLED) — for primary_agent, pentester, coder, installer, and assistant when it works with agents, the adviser acts as a mentor when the agent calls the same tool EXECUTION_MONITOR_SAME_TOOL_LIMIT times in a row (default 5) or makes EXECUTION_MONITOR_TOTAL_TOOL_LIMIT tool calls since the last advice (default 10). The trigger counts calls rather than detecting a stall; the adviser then reviews the agent's progress and recommends whether to continue, change approach or stop.
  • Intelligent task planning (beta, AGENT_PLANNING_STEP_ENABLED) — the adviser drafts 3–7 concrete steps before specialists start a subtask.

Execution monitoring and task planning roughly double result quality for models under 32B parameters, at the cost of 2–3× more tokens and time. They are off by default.

In Enterprise, the planner always runs and execution monitoring is on by default with limits of 20 and 40 — see Agent profiles.

Last updated on