Continuous agents
Set up an agent that works through a segment or an event type, preview its cost, start it and follow its progress.
A continuous agent processes a whole population instead of reacting to one moment: it makes a first pass over every item in scope, then sweeps on a schedule to keep results current. This page covers the steps specific to continuous agents. The idea is explained in Optima Agents.
Who uses it
Campaign managers and tenant administrators. Building the definition, requesting a preview and starting need agents_editor or an administrator role. agents_editor is enough for a segment scope: it can list segments and read the chosen one, so no Campaign role is needed. Reading progress and the log needs agents_auditor, auditor or an administrator role.
Fields
The settings live in the definition's continuous trigger; every field is listed in definitions. The instance page adds the Continuous sweep card, described in instance detail.
What an item is depends on Works through:
| Source | Scope the card shows | Notes |
|---|---|---|
| Profiles in a segment | The segment members who consented to the definition's purpose, when last measured. | Profiles that join the segment are picked up within a day even if nothing about them changed. A profile that leaves keeps its last result. The segment's active switch is ignored. |
| Events of a type | Events of that type in the last 30 days, an estimate. | An events agent reads only events that arrived after its latest start. Failed events are not retried. There is no refresh period. |
Actions
- Create a definition with a continuous trigger. Name a purpose, allow an attribute or event action, and choose what the agent reads per item.
- Create an instance and open it.
- Choose Run preview. Optima runs the agent on a sample of 20 items drawn from across the scope (not just the first profiles or events) and shows the tokens per item and the estimate for a full pass. It saves nothing to profiles, but it uses budget (real model tokens on the sampled items) and leaves Would have entries, and entries for failures, in the run log.
- Choose Start dry run (or Start live). Starting is refused until a preview exists, and again when the scope has grown by more than 25 % since the preview. Starting live after the agent has swept in dry run, like switching from dry run to live, processes again what only a dry run saw: see "Going live after a dry run" below.
- Watch the card. The first pass shows a progress bar; afterwards it says Keeping up to date. When you go live after a completed dry pass the card says that at the next sweep the agent processes again, live, what the dry run covered; it keeps showing Keeping up to date (there is no progress bar, the agent catches up on the profiles the dry run covered during its sweeps). The first-pass bar appears again only if the first pass was still running when you went live.
- To see what happened to one profile, open Run log and enter the profile id in the Profile box.
Going live after a dry run
A dry run writes nothing, so a profile that was only "processed" in dry run has no result yet. When a continuous agent goes live after a dry-run sweep, whether you switch from dry run or start it live, Optima forgets what the dry run processed and processes those profiles again, live. Profiles a live sweep already handled are not touched again. This costs the tokens of the dry-run part a second time, so the confirmation shows the preview's full-pass estimate, which is an upper bound. Running a preview does not count as a dry-run sweep, and switching from live back to dry run never restarts anything. An events agent starts reading again from the start of its oldest dry-run sweep that is being redone (at most 30 days back): events a dry run handled are handled live, events already handled live are skipped.
A change to data the agent does not read (outside its item view, or only the agent's own attributes and events) is not re-scored and does not appear in the run log; a refresh period still re-scores the item.
If the budget window runs out the card shows that the sweep is paused until it resets; nothing is lost.
Examples
A churn-risk classifier over a "Customers with orders" segment is built in score customers with a continuous agent.
Common problems
- Start is disabled. No preview yet, or the scope grew since it. Run a preview.
- The preview failed. The card says why: no items to sample, the budget is used up, or the owner lacks access to something the agent reads. Fix the cause and run it again.
- A run fails at once saying the owner lacks access. Optima checks the owner's rights before spending on the model. Give the owner the missing role.
- Some profiles are never processed. Profiles without consent for the definition's purpose are skipped.
- A profile search in the log finds nothing. See run log.