Kissflow DocsCentro de ayuda
Este artículo aún no está disponible en español. Se muestra la versión original en inglés.

How an agent works through a task

See how an agent reasons over several steps, uses data from more than one source in a run, and where its limits are.

An agent doesn't follow a fixed script. It reasons about the task, uses a tool, reads what came back, and then decides what to do next. This article explains that loop, how one run can use data from several sources, and the limits that keep a run bounded.

Video: How an agent works through a task

The reasoning loop

Each run starts from the agent's instructions and the inputs supplied for that run. From there, the agent repeats a short loop:

  1. Reason. It works out what it still needs to finish the task.
  2. Act. It calls one of its tools, or searches the web, and decides the values to send at that moment.
  3. Read the result. It reads what the tool returned, including an error if the call failed.
  4. Decide. It chooses the next step from what it now knows, or stops and returns its results.

Because each step depends on what earlier steps returned, two runs of the same agent can take different paths. If a lookup finds nothing, the agent can return that answer without calling the remaining tools. If a tool call fails, the agent sees the error and can adjust instead of stopping straight away.

Data from several sources in one run

One run can draw on every source the agent has been given:

SourceWhat it provides
InputsValues supplied for this run, including up to one file
ToolsUp to five actions, which can come from different connectors: Kissflow processes, boards, dataforms and datasets, or outside apps
Web searchPublic information through Google Search

The agent chooses which sources to consult and combines their results. For example, a supplier-review agent could look up a supplier in a dataset, read that supplier's open purchase requests from a process, check recent news with web search, and then create an item on a review board.

Each tool call returns its own result, and the agent brings the results together.

Every run is bounded

Each run has a set number of reasoning steps and rounds of tool use, and a time limit. One round of tool use can call more than one tool. Web search runs inside the agent's own reasoning, so it doesn't count as a tool call. See Limits for the values. They can be raised on request.

Design around how agents run

  • Chain agents through your app. Connect their runs through page code, integrations or the API. See Orchestrate multiple agents.
  • Pass context into each run. Each run starts fresh. Pass in what it needs as inputs or make it reachable through its tools.
  • Start a new run after a failure. Fix the cause, then run it again. Runs don't retry on their own.
  • Ask for a reason. Run results include the results, not the steps the agent took. To get an explanation, add a Reason text output and ask for it in the instructions.

Note

Measure quality on your own examples before you publish. See Evaluate agent quality.

Design tips for multi-step tasks

  • Describe the order of work in the instructions when it matters, for example "Look up the supplier first. If there is no record, stop and say so."
  • Give the agent only the tools the task needs. Fewer tools leave fewer wrong choices.
  • Keep each run to one focused task. Split bigger jobs across several agents and connect them.
  • Test with examples that should take different paths, such as a supplier with no record and one with open requests.

En esta página