---
title: Run of an AI agent
summary: A run is one piece of work of a built-in agent. It starts from a person's message or a client's message, takes steps, and ends with an answer, a stop or a stated reason.
tools: []
related: [stopping-and-retry, run-journal, built-in-agents, places, run-spend]
search: [AI task, agent run]
---

# Run

A run is what happens between a message and the end of the agent's work on it.
Talemo has two built-in agents (see [Built-in agents](built-in-agents.md)), and
each of them works in runs.

## What starts a run

- **The assistant:** each message a person writes to it is one run.
- **The online admin:** a turn in a client's chat is one run. A turn starts when
  the client writes a message and the online admin has been given its rights,
  the chat is in the mode **On its own** or **Only drafts** and no person has taken
  it over, and the chat belongs to a branch the rights cover. A message of only emoji, a sticker, a reaction and
  the word STOP do not start a turn. One turn runs per chat at a time, and what
  the client writes meanwhile is read by the next turn.

Before a run starts Talemo checks that AI is available to the business: the
the balance is above the reserve and the monthly AI limit is not reached (see
[Spend of a run](run-spend.md)). If not, there is no run, and the assistant
or the chat says why.

## Steps

A run is a sequence of steps. A step is either a call to the model, where the
agent thinks and writes, or a call to a tool, where it reads or changes records.
Tools are the same operations that a person or a program connected over MCP uses.
The agent decides the order, and a step that changes something goes through the
approval rules (see [Assistant mode](../assistant/assistant-mode.md)).

## Rights of a run

A run of the assistant acts for the person who started it, in the business where
it started. It has only the rights that both the person and the agent have. If the person's role is lowered during the run, the run narrows. If it
is raised, the run does not widen. The online admin acts with the rights the
business gave it and only inside its own chat and with its own client.

## States

A run is accepted, then running, then finished. Between them it may be waiting
for a decision: an action needs the person's approval, the run is parked, and the
conversation is free meanwhile. The decision puts the run back to work.

## How it ends

A run ends with an answer, with a stop by the person, or with a reason: too many
steps, the model service not responding, a failure on Talemo's side, too much
data for one answer, or the AI limit. See [Stopping, cut-offs and retries](stopping-and-retry.md).

## The answer appears as it is written

The assistant's answer shows on the screen while the model writes it, and the
steps appear as they finish. A run that waits for a decision leaves the screen
with a card, and the answer comes after the decision. A stopped run keeps no
unfinished text.
