logo
Development
Search
LoopAgent Overview

LoopAgent Overview

LoopAgent is the third type of agent on the GPTBots platform. Unlike Agent and FlowAgent, it relies neither on a fixed retrieval pipeline nor on a manually drawn flowchart. Instead, it hands "what to do, and in what order" to the model, which decides autonomously during the conversation: the model judges for itself whether to search knowledge, query a database, call a tool, or hand off to a human, iterating over and over until the task is done.

It is well suited to open-ended, multi-step, tool-heavy customer-service and automation scenarios.

Choosing among the three agent types

The most fundamental difference between the three agent types is who decides the execution path:

Type How it runs Who decides the path Best for
Agent Essentially single-turn: retrieve knowledge → generate one answer Fixed by the platform (retrieve → answer) Straightforward FAQ / knowledge Q&A — fast and stable
FlowAgent Deterministic flowchart, following the wired nodes Designed by the builder (never leaves the chart) Reusable, predictable, fixed business processes
LoopAgent Multi-turn tool loop: the model decides which capabilities to call, iterating until done Chosen by the model at runtime (decided fresh on every message) Open-ended, multi-step, tool-heavy customer service / automation

In one sentence: the paths of Agent and FlowAgent are defined in advance, whereas the path of LoopAgent is decided on the spot by the model.

Identity + capabilities + guardrails

Building a LoopAgent is not about "drawing a flow." You give it three things and then let the model run on its own:

  • Identity (Persona): tell the model who it is, which business it serves, and in what tone and language it should answer.
  • Capabilities: attach the knowledge bases, tools / MCP, workflows, data tables, skills, human service, forms, and so on that it can call. The model only has "hands" to do what you attach.
  • Guardrails (loop limits): set how many times a single turn may loop and after how many consecutive errors it should stop, so the model does not run on endlessly.

How LoopAgent completes one conversation turn

After receiving a user message, LoopAgent runs a capped loop internally: think → call a tool → observe the result → think again… until the model decides it can answer (a normal wrap-up), or it hits the loop limit you configured.

loading...
flowchart LR
    A[User message] --> B[Think]
    B --> C{Call a tool?}
    C -->|Yes| D[Call tool]
    D --> E[Observe result]
    E --> B
    C -->|No| F[Output reply (end)]

Because it can call tools across multiple loops, a single LoopAgent reply may be slower than an ordinary Agent — it might search knowledge a few times and call several APIs in the background before replying. This is normal and does not mean it is stuck.

Typical scenarios

  • Complex customer service that has to look things up, call business systems, and make judgments all at once
  • Automation tasks that require multiple steps and cross-system collaboration
  • Pre-sales / after-sales that need to collect information, open tickets, and hand off to a human when necessary

Model recommendations

Because LoopAgent decides autonomously and calls tools across multiple turns, it usually consumes more credits than an ordinary Agent and relies more heavily on a capable model. The weaker the model, the more likely you are to see problems such as "not calling a tool when it should, looping in circles, or answering wrongly halfway through."

  • General scenarios: previous-generation series such as GPT-4.1 run fine in testing.
  • Complex business scenarios: prefer new-generation, agent-oriented models (such as the GPT-5 series or Claude 4 series), which are more stable at tool calling and multi-step reasoning.

The model is selected in the "Agent Brain" panel; see Agent Brain.

Lifecycle

loading...
flowchart LR
    A[Create] --> B[Configure] --> C[Debug] --> D[Publish] --> E[Serve]
  • Create: create from a blank or a template; the platform seeds a ready-to-run default configuration.
  • Configure: configure the model, persona, and each capability on the settings page.
  • Debug: verify the results in real time with the debug chat on the right.
  • Publish: freeze the current configuration into a snapshot and go live.
  • Serve: provide service externally through multiple channels and the Open API.

Important: clicking "Save" on the settings page only updates the debug version; only "Publish" affects production. This is the first rule to understand when using LoopAgent — see Save and Publish.