Skip to content

Deploy & run

Running agents

How a run executes step by step, how billing gates a run, and manual vs. triggered runs.

3 min read

A run is the agent's agentic loop working through your request one tool call at a time. This page covers how that loop behaves, how you start a run, and how billing decides whether a run is even allowed to start.

How a run works

Every run drives a bounded, multi-turn tool-calling loop — not a single model call. Each step, the model picks a tool (or decides it's done), the tool's arguments are validated against a JSON Schema, and the tool executes. Validation errors are fed back to the model instead of crashing the run, so the model can correct itself and try again.

The loop has a fixed step limit. If the agent hasn't finished by then, the run ends rather than looping forever. This works the same way whether the underlying model is OpenAI or Anthropic — function-calling and tool-use are normalized to the same loop.

Approval gates

Some tools are destructive — sending an email, writing to an external system, deleting something. When the model calls one of these, the run halts and waits for a human to approve before it executes. Nothing destructive happens without that approval.

The system prompt refuses rather than guesses

The agent is instructed to refuse and ask rather than fabricate an answer when it doesn't have enough information or the right tool. This is a system-prompt-level contract, not a UI setting.

Execution trace

Every step — the tool called, its arguments, and its output — is streamed live and recorded so you can browse it afterward. See execution traces for how to read and share a trace.

Running manually vs. via triggers

You can start a run two ways:

  • Manually. Trigger a run yourself from the builder or agent detail page and watch it live.
  • Via triggers. Inbound webhooks (HMAC-verified), authenticated polling, and cron schedules can all start a run without you doing anything. Channels like inbound email, Telegram, WhatsApp, web forms, and the embeddable widget also start runs this way. See triggers and schedules for how to wire these up.

Both paths go through the same agentic loop and the same billing gate below — there's no separate "trigger" execution path.

The billing gate

Before a run starts, the platform checks whether it's allowed to run at all:

  • BYOK (bring your own key). If you've added your own OpenAI or Anthropic key, the run uses it directly and bypasses platform metering entirely. You pay the provider, not the platform. See bring-your-own-keys.
  • Platform credits. On a paid plan with a positive credit balance and no BYOK set, the run uses the platform key and decrements your credit balance. This is metered.
  • Free plan, no key. If you're on the free plan and haven't added a key, the run is blocked. Add a key or upgrade to a paid plan to run agents.

This check happens before every run, manual or triggered — there's no way to start a run that skips it.

Related

Still stuck? We're happy to help.

Contact support
Running agents · RunAIAgents · RunAIAgents