Workflows

Dynamic Agent Workflows

A workflow that is just an AI agent and a goal. Instead of a pre-drawn node graph, the agent writes its own steps on the fly, loops with its allow-listed tools until the goal is met, streams every step live, and pauses to ask you questions. Planning agents investigate read-only; execution agents carry the change out with real device-write tools in a non-production environment.

A normal Versus workflow is a graph you draw: fixed nodes, fixed order, coded steps. A Dynamic Agent workflow is the opposite — you don't draw anything. You pick an AI agent, give it a goal, and save. When it runs, the agent plans and writes its own steps on the fly, one at a time, using its allow‑listed tools, and keeps looping until the goal is achieved — exactly the way an interactive assistant works. Every step it takes appears live in the normal run view, and when it needs a decision only you can make, it pauses and asks you a question; you answer inline and it resumes with your answer folded in.

It is the same governed, tool‑using engine behind Diagnostics AutoPilot, exposed as a first‑class workflow type.

Two kinds: planning and execution

A Dynamic Agent is defined by the tools its agent is allow‑listed for, and that splits cleanly into two kinds:

  • Planning agents carry read‑only tools. They investigate — read config, versions, health, routes, neighbours, virtual servers, recent changes, run read‑only probes — and produce an assessment, a runbook, a list of findings. They never touch device state. Use them to discover a procedure or answer a question about the estate.
  • Execution agents additionally carry change tools and actually perform the work — for an F5 upgrade that means saving a UCS rollback point, staging an image, installing to the inactive volume, rebooting, failing over, and syncing config. They run against a non‑production environment (a lab, a sandbox, a greenfield build) where a controlled, repeatable change is exactly the point.

The same run view, the same on‑the‑fly steps, the same question mechanism — the only difference is whether the toolset can write. Which one you get is determined by the agent you pick; execution agents are clearly badged, and their runs offer a Run mode you choose at launch (below).

The intended flow: harden in non‑prod, run in prod. A Dynamic Agent is exploratory — it decides its next move from live results and may take a slightly different path each run. That is what you want when discovering or rehearsing a procedure, and not what you want when repeating one against production. So the recommended pattern is: run the Dynamic Agent in a non‑production environment to explore and harden the steps — as a planning dry‑run, then as a real execution against non‑prod devices — then promote the finished run to a static, governed workflow and run that in production (see Promote to an executable workflow). You get open‑ended autonomy where it's safe, and a deterministic, approval‑gated, repeatable workflow where it counts.

Feature flag. Dynamic Agent workflows are gated by the AGENTIC_WORKFLOWS_ENABLED environment variable (off by default). While it is off, the executor branch and the create UI are inert, so an existing deployment is unaffected until you opt in. The agent registry it draws from is gated separately by AGENT_TASKS_ENABLED.


When to use it

Reach for a Dynamic Agent workflow when the steps aren't known in advance — the work is investigative, conditional, or open‑ended, and a human would figure out the next move from what the last move returned:

  • Audits & sweeps (planning) — "find every F5 virtual server whose pool has no healthy members and list them with the owning device," "which certificates across the estate expire in the next 30 days?"
  • Assessments & planning (planning) — "assess this BIG‑IP HA pair and produce a safe upgrade runbook," "is this device ready to decommission?"
  • Controlled changes in non‑prod (execution) — "upgrade the lab BIG‑IP HA pair standby‑first," "build out and configure this greenfield pair to match the template."

When the steps are known and fixed and you're running against production (a scripted upgrade, an AS3 deploy, an approval chain), use a normal graph workflow — it is deterministic and repeatable. The two live side by side under Workflows, and the promote step turns a hardened Dynamic Agent run into exactly that.


How it compares

Graph workflowDynamic Agent — planningDynamic Agent — execution
StepsDrawn in advanceWritten by the agent on the flyWritten by the agent on the fly
OrderFixed by the graphDecided each turn from the last resultDecided each turn from the last result
DefinitionA node/edge graphAn agent + a goalAn agent + a goal
ToolsCoded stepsRead‑onlyRead‑only + change tools
Changes device stateYesNoYes — in a non‑prod environment
Best forDeterministic prod proceduresInvestigation, assessment, runbooksRehearsing / running a change in non‑prod
Execution surfaceRun view (live step rows)Same run viewSame run view
Human‑in‑the‑loopApproval gatesOn‑the‑fly questionsOn‑the‑fly questions + confirm before disruptive steps

Create the agent

Dynamic Agents draw from the agent registry (Workflows → AI Agents). Creating one is where you decide whether it's a planning or an execution agent, by which tools you tick:

  1. Workflows → AI Agents → New Agent. Give it a name, a role/system prompt, a model and a step budget.
  2. Tick its tools. The catalogue lists the read‑only tools by domain. If your deployment has change tools enabled, they appear first, grouped and badged (amber, e.g. write · sim) so there is no mistaking a device‑writing tool for a read. Tick only what the agent needs — an F5 upgrade engineer gets the F5 read tools (device info, HA status, pool/VS health, tmsh show) and the F5 change tools (UCS save, image stage, install‑to‑volume, reboot, failover, save+sync, verify).
  3. Save. An agent with any change tool on its list is an execution agent; one with only read tools is a planning agent.

The allow‑list is enforced by the engine, not merely described in the prompt — an agent physically cannot call a tool it wasn't ticked for.


Create the workflow

  1. Workflows → Dynamic Agent (the button next to Generate with AI).
  2. Pick your agent. Its tool count is shown, and change tools are called out (e.g. 15 tools · 7 change tools ⚠).
  3. Write the goal — plain English, as specific as you can. This is the whole "program."
  4. If the agent has change tools, choose a Run mode:
    • Plan / simulate — a coherent dry‑run. Change tools model the outcome (advancing an in‑memory picture of version, volumes, HA role, sync) and return realistic output, but never contact a device. Safe anywhere; use it to rehearse and harden the sequence.
    • Execute ⚠ — change tools perform the real operation over the collector tunnel. Refused on production sites (see the guardrail below), and the agent pauses for your confirmation before anything disruptive.
  5. Optionally scope it to a device group and set a max‑steps budget.
  6. Save, or Save & Run.

Under the hood the workflow is saved with graph.meta.execution = "agent", the agent + goal, and (for execution agents) graph.meta.mode. There are no graph nodes — that marker is what tells the executor to run an agent loop instead of a node walk.


What happens when it runs

The run opens in the standard run view. Then, live (the view polls every couple of seconds):

  1. The agent takes a step. Each step shows the agent's thought, the tool it chose, and the target — then the tool's result with a health tint. These rows are created as the agent works; you watch its reasoning unfold.
  2. It loops. It reads each result and decides the next step, grounding every move in real output, until it either achieves the goal or determines it can't go further.
  3. It asks you when it needs to. If a decision is genuinely yours — the target version, or a go/no‑go before a disruptive step — it pauses as Waiting for input and shows its question (free‑text or multiple‑choice). You answer in the card; it resumes with your answer folded into its context.
  4. It finishes with a structured result: whether the goal was met, a summary, the key findings, recommended actions, and follow‑ups — recorded as the final step and on the run's agent_result.

Because the steps are real run rows, everything you already use on a run works: pause/cancel, the live indicator, the permanent log, and re‑opening the finished run later.

The guardrail: non‑production only, and it stops before it hurts

Execution agents write to devices, so they are fenced in three independent ways:

  • Non‑production sites only. A change tool in execute mode refuses any device that isn't on a non‑production site. A site's kind (lab / sandbox / staging / dev / QA / UAT) is the authoritative signal, set by an administrator, and it overrides a per‑device environment label — a lab device that carries an environment: Production tag for topology realism is still a lab device, but a device on a genuine production site is refused outright. If you want the safety of a dry‑run against those same devices, run the workflow in simulate mode.
  • Confirm before disruptive steps. The agent is instructed — and its runs are designed — to pause and ask before anything that interrupts service (a reboot, a failover). It captures a rollback point and stages non‑disruptive changes first, then waits for your explicit go. It never reboots the active member without failing over first.
  • Honest gates. If a prerequisite is missing (for example, the target image isn't staged), the agent says so and stops rather than fabricating success — see the worked example.

Planning agents keep the original guarantee: their tools are read‑only, full stop. When their goal implies a change, they put the precise, ordered steps in recommended actions for a governed workflow to execute.


Worked example: a real F5 upgrade, executed by the agent

An F5 Upgrade Engineer execution agent (8 read tools + 7 F5 change tools) is pointed at the bigip1 / bigip2 HA pair on the lab site, in Execute mode, with the goal:

"Deploy TMOS 17.5.1.6 (image BIGIP-17.5.1.6-0.0.25.iso, already registered in the firmware library on the collector) to the F5 BIG‑IP HA pair bigip1 + bigip2 using a standby‑first, non‑disruptive procedure. First capture a UCS rollback point on both units and save + sync the running config. Then stage the image on each unit and install it to the INACTIVE boot volume. Then STOP and ask me to confirm before any reboot or failover."

What the agent did, unprompted, on the real devices:

  1. Pulled device info for both units → confirmed bigip1 ACTIVE and bigip2 STANDBY, both on TMOS 17.5.1.6.
  2. Checked HA status on both → both In Sync; established it would proceed standby‑first.
  3. Checked pool / VS health → consistent (a lab estate with expected‑offline test pools), noted as pre‑existing and not upgrade‑related.
  4. Wrote a real UCS rollback point on bigip1 → …/bigip1-preupgrade.ucs is saved.
  5. Wrote a real UCS rollback point on bigip2 → …/bigip2-preupgrade.ucs is saved.
  6. Saved and config‑synced the running config across the HA group → config saved; synced to group ha.
  7. Staged the image on both units — the ISO lives on the site's collector, so the collector copied it to each BIG‑IP over the LAN (no multi‑GB transfer through Versus).
  8. Installed the image to the inactive boot volume on bigip2, then bigip1 — an iControl REST install polled until the volume reported complete; the running volume was never touched. Afterwards both units showed HD1.1 active / HD1.2 17.5.1.6 complete.
  9. Reached the reboot and stopped. The reboot tool refused (disruptive steps are blocked until an operator authorises them), and the agent turned that into a question: "Proceed with these disruptive steps — reboot bigip2 (standby) first, then failover, then reboot bigip1?" with Yes / No choices.

Every one of steps 4–8 is a real operation carried out over the collector tunnel — the same dispatch mechanics Versus's governed f5.* steps use (tmsh over SSH for the UCS and config‑sync, a collector copy job for the image, iControl REST for the install). The UCS saves and the installs take real minutes because they really run. And step 9 is the point: two independent safeguards — the tool's own block on disruptive actions and the agent's instruction to ask — met at exactly the boundary where service would be interrupted.

The honesty gate works the same way further upstream: in an earlier run of this procedure, the goal named a version that wasn't in the firmware library. The agent checked, reported "Image for 17.5.2 NOT present — stage the ISO before install", and asked the operator to confirm the version and stage it — rather than inventing an image or claiming success.

Answer Yes and it continues — and in this run it did, on the real pair: it rebooted bigip2 into the new volume (the reboot tool itself holds through the outage and waits for services), verified it came back on 17.5.1.6 / HD1.2 as Standby, failed over so the upgraded unit took Active, rebooted the former‑active bigip1 the same way, verified it rejoined as Standby, then saved and synced — finishing with goal achieved, both units on the new volume, HD1.1 kept on each as the rollback. One thing it reported rather than hid: after the reboots the datasync-global-dg group sat at Changes Pending with a change conflict, which TMOS itself said to resolve by syncing from bigip1 — the sync tool now follows that recommendation automatically, and the pair ended In Sync across every device group.

Why an agent and not just a script here? Because it reasons about what it finds. In a planning run of the same procedure, when the operator answered with a lower target version than the one running, the agent caught it — "17.1.1.3 is LOWER than 17.5.1.6 — F5 TMOS does not support in‑place downgrade; confirm intent" — and refused to hand back a runbook that would have bricked the pair. It is not a yes‑man.


Research on the fly

An agent re‑plans every turn from what the last step returned — but its research reaches only as far as its tools. Two read‑only knowledge tools extend that reach beyond the device, for every supported vendor family:

  • knowledge_search — keyword search across three corpora at once: your Versus Knowledge Base (the wiki, tenant‑scoped), the Versus product docs, and a vendor documentation corpus — F5 BIG‑IP / F5OS / Distributed Cloud, NetScaler, PAN‑OS, FortiGate, Cisco ASA / Nexus / ACI, Check Point, Arista, Avi, A10, Alteon, Kemp, Infoblox, Cloudflare, AWS and Azure load balancers, Kubernetes, Docker. Results come back as titled, sourced snippets; vendor=<family> narrows them to the device family at hand.
  • vendor_doc_fetch — reads one vendor documentation page live, for guidance that isn't in the corpus yet. It is fenced to an allow‑list of vendor documentation domains (https only, size‑capped, redirects off the list refused), so it is a research tool, not a web client.

Tick them in New Agent like any other tool (they sit in the knowledge group). Agents built for change work carry a research rule in their instructions: when a step returns an unexpected condition, an unfamiliar status or error, research it — search, then read the best result — and act on what the documentation says, citing the source; ask the operator only for decisions that are genuinely theirs. In practice that means a "Changes Pending" with a change conflict sends the agent to the vendor's own config‑sync guidance before it touches anything, rather than to you.

The corpus is yours to grow. manage.py ingest_vendor_docs --seed loads a curated set of lifecycle documentation per family (upgrade, HA, config‑sync, common failure states); --vendor <family> --url <page> adds any page from an allow‑listed portal; --coverage shows chunks per family. Every page is validated by fetching it — dead links and portals that render only in a browser (some knowledge‑base articles do) are reported and skipped rather than stored. For those, paste the guidance into a Knowledge Base page: the agent searches the KB in the same call.

What it looks like in practice. After the upgrade above, the same execution agent was given a post‑upgrade validation goal on the real pair, with one instruction that matters: if anything is not healthy, don't guess and don't ask first — research the condition in the vendor documentation, then resolve it using the documented procedure. The sync‑failover group was sitting at Changes Pending (a pool description had been changed on the active unit). What the agent did, unprompted:

  1. ha_status on bigip1 → Changes Pending.
  2. knowledge_search — "config sync Changes Pending BIG‑IP HA", narrowed to f5_bigip → six results, the top one F5's Managing Configuration Synchronization guide, section Sync status for device group members.
  3. vendor_doc_fetch — read that guide, then reasoned from it: "'Changes Pending' means the local device has configuration changes that need to be synced… the recommended action is to perform a config‑sync from the device with the most current configuration" — the active unit.
  4. f5_save_sync on bigip2 (the active unit) → synced to ha; Status: In Sync, then verified In Sync on both units and re‑checked versions and boot volumes.
  5. A second hurdle: pool_status showed 102 of 103 pools offline. It researched again ("pool members offline after upgrade"), then inspected nodes and monitors over tmsh_show — and concluded, correctly, that these are the lab's test backends (test IPs, monitors that have never passed, zero traffic), not an upgrade regression — and declined to "fix" them.
  6. Finished goal achieved, citing the F5 document by title and URL in its findings.

Two hurdles, two different right answers: one resolved by a documented procedure, one deliberately left alone with a documented reason. The whole thing took under two minutes and is on the run page, step by step.

Honest boundaries. Retrieval is keyword‑based (semantic ranking joins in automatically when embeddings are configured); the agent finds only what has been ingested or what a documentation page says; and research spends steps from the same max_steps budget as everything else. Research cannot invent a capability the agent lacks — it will tell you what the documentation prescribes even when it has no tool to carry it out.


Promote to an executable workflow

Once a Dynamic Agent run finishes with a procedure you trust, don't leave that knowledge trapped in a one‑off run — promote it. On a completed run, Save as executable workflow turns the hardened result into a normal, static graph workflow you can run over and over in production:

  • The agent's recommended actions become the steps. They're mapped onto real, governed step types from the catalogue — for an F5 upgrade, that's f5.ucs (backup) → f5.copy_code (upload image) → f5.calculate_volume / f5.deploy_volume (install to the inactive volume) → f5.reboot_volume → f5.check_ha_status → f5.failover → repeat for the peer → f5.save_sync — with a core.approval gate before the first invasive step.
  • The questions the agent asked become the workflow's inputs. The target version it paused to ask about is now a run input on the promoted workflow — you supply it (and the production device group) up front in the Run dialog, and no one has to babysit an interactive prompt.
  • It opens in the workflow editor as a draft. Because an AI drafted the step mapping, you review and finalise it there — adjust a step, tighten the approval gates, set the device scope — before you publish it. From then on it's an ordinary governed workflow: versioned, approval‑gated, auditable, repeatable.

This closes the loop that makes the non‑prod → prod pattern practical: the Dynamic Agent discovers, rehearses and hardens the procedure against a safe environment — first as a simulate dry‑run, then as a real execution against non‑prod devices — and the promoted workflow executes it deterministically in production, behind the same approval gates every other production change uses.

The promoted workflow is a draft produced by an AI mapping the plan onto real steps — always review it in the editor before running it against production, exactly as you would a workflow generated with Generate with AI.


Answering an agent's question

When a run is Waiting for input, the run view shows the agent's question in a card:

  • Free‑text — type your answer and send (⌘/Ctrl+Enter). Use it to supply a decision, a constraint, or context the agent can't read (a maintenance window, an intent, a target version), or to give the go‑ahead before a disruptive step.
  • Multiple‑choice — when the agent offers options, click one.

Your answer becomes part of the agent's transcript as an observation, and the loop continues from where it paused. You can answer as many questions as the run raises.


Governance & limits

  • Tool allow‑list — each agent runs only the tools on its list (empty = the full read‑only catalogue), enforced by the engine, not just advertised in the prompt. Change tools are opt‑in per agent and clearly badged in the picker.
  • Run mode — execution agents default to simulate; execute is a deliberate choice at launch and is the only mode that touches a device.
  • Non‑production fence — execute‑mode change tools refuse any device that isn't on a non‑production site.
  • Confirm before disruption — the agent pauses for an explicit go before a reboot or failover, and captures a rollback point first.
  • Research reach — the agent researches only through granted tools; knowledge_search and vendor_doc_fetch are read‑only, and the live fetch reaches allow‑listed vendor documentation domains only.
  • Step budget — max_steps bounds the loop; if it's hit, the agent is forced to conclude from what it has.
  • Tenant‑scoped — the agent only ever sees its own tenant's estate.
  • Auditable — every step, thought, tool, result and your answers are permanent run rows.

Related

  • Run Supervisor — assign an agent to a static workflow run when you start it; if a step fails mid‑change it diagnoses, researches, patches that run and resumes it.
  • Calling a Versus AI Agent — the agent registry, the core.agent step, and invoking agents over the API.
  • AI Agents — what a Versus AI agent is and how to configure one.
  • Microsoft Teams Agents — reaching the same agents from Teams.