Agents

Agents Overview

What agents are and how they work in the platform.

Agents Overview

An agent is an AI-powered process that uses a model to reason, plan, and take actions on your behalf. Unlike a single API call, agents run in a loop until they complete a goal.

How Agents Work

Agents receive a goal or instruction, reason about the best next step, optionally call tools, observe the output, and then continue — repeating this cycle until done.

Agent vs. Completion

A standard completion returns a single response. An agent can take dozens of steps, use tools, manage memory, and make decisions autonomously before returning a final result.

What makes a Queue agent different

A Queue agent is not a wrapper around a chat model. It is a stateful, tool-using process that executes a goal autonomously. Where a standard AI assistant responds to your messages, a Queue agent plans, acts, and self-corrects without you steering it step by step.

Agent anatomy

Model

The underlying language model. Queue supports Claude 3.7, GPT-4o, Gemini 2.5 Pro, and o3. The model does the reasoning — it reads context, decides what to do next, and generates actions.

System prompt

Your instructions to the agent. Defines its role, personality, what it should and should not do, and how it should behave when it encounters edge cases.

Tools

The set of capabilities available to the agent. Without tools, an agent can only reason and generate text. With tools, it can read files, write code, run tests, open PRs, call APIs, and more.

Memory

What the agent knows and remembers. This includes in-context history (the current run), retrieved memories (facts from past runs), and injected context (codebase snippets, documentation).

The execution model

When you trigger a run, Queue spins up an isolated execution environment. The agent receives your goal, reads any injected context, and begins the loop: reason → act → observe → repeat. Each iteration is a step. Each step is logged.

Queue imposes configurable limits on run duration, step count, and token usage. If an agent exceeds any limit, the run is halted gracefully and the partial result is returned.

Agent types

Task agents

Designed to complete a specific, bounded task and terminate. Most Queue agents are task agents. Examples: fix this bug, write tests for this module, refactor this file to match the new API.

Long-running agents

Persist across multiple interactions, maintain memory between sessions, and handle streaming user input. Useful for pair-programming assistants, review bots, and interactive workflows.

Pipeline agents

Chained agents where the output of one feeds into the next. Queue supports agent pipelines natively via the SDK. Use them for workflows like: detect bug → write fix → write test → open PR.

Observability

Every run produces a trace. Traces are stored in Queue for 90 days by default and can be exported to your own observability stack via webhooks or the API. Use traces to debug failures, audit behavior, and improve your system prompts.

On this page

Create a free website with Framer, the website builder loved by startups, designers and agencies.