Processes that run themselves

A step can be the agent's:

## 2 · Judge how important they are
- type: agent
- prompt: Read the customer in data.record. Judge from industry, city and size how important they are for us — A, B or C — and write the letter to data.relevance with one sentence of reasoning in data.reasoning.

When the run reaches that step, the agent starts. Nobody presses anything.

Where it works

In a session of its own, named after the process. The first one is created the first time the agent runs a step of it, and every run of that process happens there.

It is an ordinary Cowork session. It sits in your session list, sorted by last activity, so a process that just started is at the top. You can read along, ask it something, or take over. Delete it and the next run makes a new one.

Each run opens with why it is there:

The process "Sort a new customer" is running. Started because "Nordwind GmbH" was created in the CRM.

One run is one turn in that session. Two runs of the same process queue up behind each other — they work on the same process's data, so they must not overtake each other. Different processes have different sessions and run side by side.

How far it may go

A process says it in its header:

x-kyte/agent: auto

The levels are the ones the switch under the message box uses:

level what it means here
ask read only. The agent can look and report, and nothing changes.
build the default. Everything with consequences stops and asks — which is right for a process somebody is watching, and wrong for one that runs at night.
auto acts inside your company's data without asking. What leaves your system — sending a form on a foreign website — still asks.

Without auto, an automation stops at its first write and waits for a click. With it, the agent still acts as you: a record your roles may not touch stays untouched.

When it cannot finish

Nothing is ticked off. The step stays open, says the agent was on it, and links to the session where you can read what went wrong. A person can take the step over at any time — the Done button is there for exactly that.

If no agent is set up at all, the step is simply ordinary work, waiting for somebody.

What it can reach

The same tools you get in chat: your apps' records, tasks, the process's own data. Two of them matter for a process:

  • processes_write_run_data — what the step found out, written into the run, so later steps and decisions can read it
  • processes_complete_step — ticking its own step off

That is what makes a chain work: step one writes data.relevance, step two reads it, step three hands the result to a person as a task.

An example that runs end to end

The example company ships with one — Sort a new customer. It starts when a customer is created in the CRM, and nobody touches it:

  1. Judge how important they are — reads the new customer, writes A, B or C plus a sentence of reasoning into the run's data
  2. Write it into the CRM — puts that letter on the customer record
  3. Hand the first contact to a person — creates the task, with the reasoning as its description

Three agent steps, one trigger, x-kyte/agent: auto in the header. Create a customer and watch the session appear in your list.