Skip to content

Let your agent do a workflow's work, with a person in the loop

Set your own agent as a workflow's Run As, run it, and follow the work through the identity log, the task's history and the agent review where a person decides.

9 steps·5 min read·Agents

Set your own agent as a workflow's Run As, run it, and follow the work through the identity log, the task's history and the agent review where a person decides.

What it is

  • An agent is a user, so it can be the Run As of a workflow (and of a scheduled job, a plugin script, a custom action or a ribbon button). The person who starts the work stays the Initiating User; the agent is the identity it runs as.
  • Every create or update the agent makes on its own goes through the agent write door. A change to a value a person set becomes a proposal, and each create or update on a business record opens an Agent Review (HOTL-nnnnnn) with Approve and Deny.
  • The run is traceable: an Impersonation Logs row (Initiating User, Run As User, Source), via Wren on the record's audit history, the review, and the agent's own tab with its spend.
  • Run As Rules with Applies To Agents can forbid a chosen Run As User for work an agent started.
  • The example builds Lease default follow-up with Wren, an office agent: it creates a task and fills in its description on a matter. No model is called, so it is free.

Good to know

  • Before you publish, check What starts Coin on the Coin tab: updating a matter, an account, a contact or a project starts Coin's refresh (a fraction of a cent). Tasks do not, so this example writes only a task. If yours writes a listed table, use a note instead.
  • Whether the person's own access is added to the agent's depends on their role holding Add to Agent Access; without it the agent works on its own roles only.
  • A review nobody decides stands after the office's set number of business days (three by default). A Deny keeps that agent off the record for seven days.
  • The Pipeline Board's lanes are Codossier Office's own agents, so an office agent such as Wren has no lane there; its reviews do count under Pauses & Reviews.

Before you start

  • Agents can be the Run As identity of a workflow, so a routine you define is done by your own agent while a person stays in the loop. This guide builds one end to end with Wren, an office agent, on a lease default matter, then follows the run through the logs, the review and the map. All names are invented.
  • Nothing here calls a model: it is free.

1Check what starts Coin before you publish

A workflow that writes to a matter can wake Coin, and Coin's refresh is a paid call. So before you publish, open Builder → Agents → Coin and read What starts Coin: it lists each table and save that sends Coin work. Tasks are not on it, so this workflow, which only creates and edits a task, starts nothing paid. If your own workflow writes a table that is listed, write a note instead, or switch that script off first.

Let your agent run a workflow, step 1: Check what starts Coin before you publish (Tasks are not listed)
1Tasks are not listed

2Set the workflow to run as your agent

Open Builder → Workflows, create the workflow (here Lease default follow-up) and click its trigger card. Under Starts choose On demand and set On the table to Matter. Under Run As, Initiating User means the workflow acts as the person who starts it; A person lets you pick a user. Pick your agent, Wren: agents are users, so they are in the list.

Two steps do the work: Create record makes the task Call the tenant's counsel about the cure period on the matter, and Update record fills in its description. Publish when the badge says Ready.

Let your agent run a workflow, step 2: Set the workflow to run as your agent (Started by a person; Run As the agent)
1Started by a person2Run As the agent

3Run it on the matter

On the published workflow, choose the matter in the box beside Run now (here MAT-000057 Lease Default) and press Run now. The run starts at once in the background, started by you and run as Wren. Nothing asks for a confirmation: the run is listed under Runs.

Let your agent run a workflow, step 3: Run it on the matter (Pick the matter; Start the run)
1Pick the matter2Start the run

4See who started it and whose identity it used

Open the Impersonation Logs table . The newest row is on top (or search the table). Each run as another user writes a row: Initiating User is who really started it (the person who pressed Run now, hidden here), Run As User is Wren, and Source says workflow.

Let your agent run a workflow, step 4: See who started it and whose identity it used (Who really started it; Whose identity it used; What ran)
1Who really started it2Whose identity it used3What ran

5The change waits as a review

Because Wren made the change, Codossier Office opened an Agent Review (HOTL-000967), shown To review. Change says Created, Agent is Wren, Accountable names who answers for it, and Changes lists what was written. Approve keeps it; Deny reverses it and keeps Wren away from that record for seven days. A review nobody decides stands after three business days (the office's setting).

Let your agent run a workflow, step 5: The change waits as a review (Keep the change; Reverse it; Who answers for it; What was written)
1Keep the change2Reverse it3Who answers for it4What was written

6The task's history says via Wren

Open the task Wren made and its Audit tab. Each row names the person who started the run, hidden here, and via Wren, the identity it ran as. The first row, Update, shows the description changing from the first wording to the new one: a value Wren wrote itself is changed at once. A value a person set would instead stay as it is and become a proposal in the review.

Let your agent run a workflow, step 6: The task's history says via Wren (The edit; Identity it ran as)
1The edit2Identity it ran as

7The reviews on the pipeline map

Builder → Agents → Pipeline Board draws every agent run from who started it to where it landed. Choose 24h. The Pauses & Reviews bar counts the decisions waiting for a person, Wren's included. The map's lanes are Codossier Office's own agents, so Wren has no lane of its own; its work is found through the review and the logs above.

Let your agent run a workflow, step 7: The reviews on the pipeline map (Waiting for a person; The last day)
1Waiting for a person2The last day

8Wren's own tab: still free

On Builder → Agents → Wren, Spend, last 30 days shows $0.0000 · 0 calls. A workflow run, the Run As log and the write door call no model, so using an agent as a Run As identity costs nothing.

Let your agent run a workflow, step 8: Wren's own tab: still free (Nothing spent)
1Nothing spent

9Forbid a Run As for agents

A Run As Rule says when running as a user is not allowed. On Run As Rules → New, name the rule, switch Applies To Agents on to fence work an agent started (Applies To People is the same for people), pick the Run As User it protects and, if you like, a Table Name to limit it. Work that matches a rule is refused. Here the form is only shown, not saved.

Let your agent run a workflow, step 9: Forbid a Run As for agents (Agent-started work; Who it forbids; Optional: one table)
1Agent-started work2Who it forbids3Optional: one table

What next