Running and monitoring agents
Starting, pausing, watching and debugging an Aimogen Pro AI Agent run, including the execution log and the recovery mechanism.
Starting a run#
Give the agent a task and start it from Aimogen Pro › AI Agents. Since 2.7.9 the status updates over AJAX, so the screen reflects progress without reloading.
Agents can also be started from WP-CLI, and one agent can start another through
delegate_to_ai_agent when delegation is enabled.
The execution model#
Agents do not run inside your browser request. Each step is dispatched through the WordPress scheduler:
| Cron event | Role |
|---|---|
aiomatic_agent_run_single | Executes one step, then schedules the next |
aiomatic_agent_recover | Recovers a run that stalled |
aiomatic_agents_watchdog | Runs every 10 minutes, looking for stuck agents |
This is why agents need working cron. If your site has no real cron trigger, agents will stall between steps. See Scheduling and the posting cron.
Steps are scheduled a second or two apart, so a 20-step agent is a background process running for minutes, not a single long request. That is deliberate: it avoids PHP timeouts entirely.
Watching a run#
The agent screen shows current status, step number and last activity.
The execution log is the detailed view, read from the aiomatic_agent_runs table. Each row records:
| Column | Contains |
|---|---|
step | Step number |
type | What kind of step |
tool_name | Which tool was called |
prompt | What was sent to the model |
response | What came back |
params | Tool parameters |
result | Tool result |
created_at | Timestamp |
This is the single most useful debugging artefact in the plugin. When an agent does something unexpected, the log shows exactly which step went wrong and what it was reasoning about.
System & Logs › Live AI Activity shows the API requests in real time.
System & Logs › Usage Logs shows what the run cost.
Pausing#
Added in 2.8.8: agent runs can be paused. The agent stops after its current step and can be resumed.
The pause_execution tool lets the agent pause itself — useful when it needs a human decision before
continuing.
Stopping and recovering#
Cancel Schedule stops a scheduled agent. Cancelling clears its pending cron events.
If an agent stalls, the watchdog notices and aiomatic_agent_recover attempts to resume it. The
attempt count is tracked in _agent_recover_count, so a persistently failing agent does not retry forever.
If an agent is stuck and recovery is not working:
- Check System & Logs › Activity Logs for the error.
- Read the last rows of the execution log to see what it was attempting.
- Cancel the schedule.
- Fix the underlying problem — usually a failing tool, a missing credential, or a task the agent cannot complete.
- Start a fresh run.
Reading a failed run#
Typical patterns and what they mean:
The agent loops on the same tool. The tool returns something it does not expect, and it retries.
Lower Max Tool Retries, and check whether that tool is configured correctly.
The agent hits Max Steps without finishing. Either the task is too big, or it is wandering. Read the log: if the steps are productive, raise the limit; if it is going in circles, narrow the task.
The agent calls a tool that is not enabled. It reasons about a capability it does not have. Either enable the tool or state in the description that the capability is unavailable.
The agent concludes prematurely. The task had no clear completion criterion. Rewrite it with a verifiable deliverable.
The agent takes an action you did not want. The tool set was too broad. See Agent security.
Cost#
Every step is at least one API request, often more when planning is enabled. Before running an agent regularly:
- Run it once.
- Read the cost in System & Logs › Usage Logs.
- Multiply by the frequency you intend.
Max Steps is your cost ceiling. Treat it as a budget rather than a limit you hope not to reach.
See Controlling cost.
Scheduled agents#
A scheduled agent runs its task on an interval. This is powerful and worth being careful with: an agent that modifies content, running unattended every hour, will accumulate changes you have not reviewed.
Sensible practice:
- Start with the agent producing a report rather than making changes.
- Read the reports for a week.
- Only then let it act.
- Keep the step budget tight.
Common problems#
The agent never starts. Cron is not running. See Scheduled tasks do not run.
It runs one step and stops. The next step was scheduled but cron did not fire it. Same cause.
Tools never fire. The model does not support function calling, or API level tool calls is disabled.
See Selecting models.
Long-term memory is unavailable. Embeddings are not configured. See Knowledge base and RAG.
The execution log is empty. The run has not started, or the aiomatic_agent_runs table is missing.
Reactivate the plugin to recreate the schema.
Related#
Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.