Skip to Content
How agents work in loops

Agentic loops

An autonomous agent works in a loop: it thinks about what to do, does it, looks at the result, and decides what to do next, until the job is done. For example, a support agent asked “where is order NW-10428?” looks the order up, sees it is delayed, checks the shipment, writes a reply, has the reply checked, and only then answers. Nobody has to step in between those steps.

This page explains that loop and the controls almyty gives you over it, so an agent can be left to work on its own safely. The agents themselves are set up on Autonomous agents.

Autonomous runs, each showing its step count, cost, tokens, and outcome

The loop, step by step

Each run of an autonomous agent is a series of steps, and you can see every one on the agent’s Runs tab:

  1. Think: the main model decides what to do next.
  2. Act: it uses a tool, such as looking something up in one of your connected systems or running a job on a machine.
  3. Look: the tool’s result is added to what the agent knows.
  4. Check and repeat: it carries on until the job is done or something tells it to stop.

A real run of the demo support agent: look up order NW-10428, read the result, draft a reply, have the draft checked, the checker catches a mistake, revise once, pass. A handful of steps, each visible on the run.

The controls

  • It checks itself: checker models from another vendor review the answer, and on a failure the agent revises and tries again. See verification.
  • It knows when to stop: a limit on how many times it may revise, plus run limits on steps and spend, so a loop cannot run forever.
  • It follows rules: constraints apply on every step, and some are learned from past mistakes.
  • It can work with others: the work mode has several models work together inside one agent, and under Capabilities you pick other agents it may hand work to.
  • It asks before acting: approvals pause the loop for a person before a step that cannot be undone, such as a large refund, and continue once someone approves.
  • It gets better: memory carries what it learned to the next run, and a good run can be saved as a reusable skill.

Why it matters

A single question to a model gets a single answer. A loop keeps working: checking itself, correcting, and stopping when it should. almyty shows you every step of it, keeps it within limits, and records it in the audit log.

For developers

The approval step is the built-in request_approval tool. In the run’s step list, a tool step appears as tool_call; the checker’s verdict and the revision count are recorded on the run. The default merge policy for checkers is any_fail_blocks, and the default revise budget is 2.