An AI that is allowed to act, not just write: it picks a tool, reads the result, picks again — until the goal is met or a limit stops it.
Default: One model in a single The agent loop (ReAct) via the provider's native tool-use API (Anthropic Messages, OpenAI Responses) or a thin SDK (Claude Agent SDK, OpenAI Agents SDK, LangGraph).
Tokens per agent interaction vs a chat turn: ≈4× (Anthropic internal data, June 2025)
In a workflow, you write the steps and the model fills them in. In an agent, the model picks the steps. Predictability versus flexibility.
Default: Start with a router plus 2–3 chains, each link with typed output and a gate.
Workflow latency: Σ of link latencies, ±15% (fixed 3–5 link chain, no retries)
The model asks for something it can't do alone — 'call get_order_status with order 48213' — and your code decides whether to actually do it.
Default: Native tool-use API with strict/structured arguments where offered; 3–10 tools; JSON Schema with enums and required fields; identity and tenant injected server-side; 10 s default tool timeout; idempotency key on every write; tool results capped at a few thousand tokens with a truncation hint; parallel tool calls on for independent reads.
Tokens per tool definition: 100–500 (name + description + schema; measure with the provider's token counter)
The cycle at the heart of every agent: the model decides, your code runs a tool, the result goes back in, repeat — until done or stopped.
Default: Host-enforced caps: 25 turns, 300k cumulative tokens, 10 min, $1.
Input at turn t: prefix + (t−1) × Δ (history kept verbatim; Δ = tokens added per turn)
Having the agent write out its steps before acting — and rewrite them when a result contradicts the plan.
Default: For tasks over ~10 steps: one planning call that writes a numbered todo list into state; execute steps with the same or a cheaper model; re-plan on any failed check or empty result; show the plan for approval when the task writes to shared systems.
Planning-call overhead: 1 extra call, ~1–3k output tokens (plan of 5–15 steps)
The model reviews its own work and tries again. Works well when the review has something real to check against — tests, a validator — and much less without.
Default: Evaluator-optimizer with a deterministic checker first (tests, JSON Schema, regex policy), then an LLM-as-judge with a written rubric only for what code can't check.
Self-Refine average gain: ~20% absolute (7 tasks, GPT-3.5/4, Madaan et al. 2023)
A fixed sequence of model calls, each feeding the next, with your own checks between the steps.
Default: 3–5 links; JSON Schema output on every link that feeds code; deterministic gates (schema, citation present, length) before any LLM-based gate; cheapest model that passes each link's golden set; failed gate → one retry with the error message, then route to a fallback or human queue.
End-to-end accuracy: Π link accuracies (independent errors: 0.97⁴ ≈ 88.5%, 0.99⁴ ≈ 96%)
Several agents with their own contexts, instructions and tools working one task. Strong for parallel breadth, and roughly 15× the tokens of a chat.
Default: Single agent first.
Quality gain on breadth-first research: +90.2% (multi-agent vs single Opus 4, Anthropic internal eval, June 2025)
One model looks at the task, decides what pieces are needed, farms them out to workers, and merges what comes back.
Default: Brief template with objective, inputs, tools, output schema, boundaries and effort budget; workers return ≤500-token structured results; fan-out cap 10, recursion depth 1; workers read-only unless each owns a disjoint write scope; synthesis step checks for conflicting facts.
Effort scaling used by Anthropic's research agent: 1 / 2–4 / 10+ sub-agents (fact-finding / comparison / complex research, June 2025)
One agent passes a task to another — or to a person — with a structured briefing, and the tools and permissions change with it.
Default: Handoff as a tool with a typed briefing (intent, entities, what was tried, customer's words); receiver gets its own instructions and tools only; max 2 agent-to-agent handoffs per conversation, then a human; human handoffs create a ticket with the briefing and a link to the trace.
Briefing size: 150–400 tokens (structured summary vs 2–8k for a raw transcript)
Model Context Protocol: an open standard for plugging tools and data into AI apps. Rather like USB, but for AI.
Default: Pin the protocol revision your host supports and test against it.
Active public MCP servers: >10,000 (Anthropic, Dec 2025)
How an agent keeps anything beyond one request: working memory in the context, plus a long-term store it writes to and searches later.
Default: Per-tenant, per-user facts table (text, source, created_at, ttl, confidence) loaded top-10 by relevance × recency at session start; explicit remember/forget tools; writes from tool output require provenance; no instructions stored as memory; deletion API wired to account erasure.
Memory loaded per session: 300–1,000 tokens (top 5–15 facts; vs 10k+ for raw past transcripts)
Deciding exactly what goes into the model's context at each step — and what stays out — to get the most signal per token.
Default: Stable prefix (instructions → tools) first and cached; tool outputs capped at ~2–5k tokens with a truncation hint; retrieval via tools rather than preloading; compaction at ~70% of the window preserving decisions, open questions and IDs; per-step token logging with task success.
Models showing length-dependent degradation: 18 of 18 tested (Chroma "Context Rot", 2025)
An agent working a screen the way a person does — look at a screenshot, click, type, repeat. The fallback when there is no API.
Default: Disposable VM or container browser per task; 1280×800 or provider-recommended resolution; domain allowlist; credentials injected by a broker, never typed from memory; confirmation required for submit/purchase/send/delete; screenshot trail stored per step; step cap ~50 per task.
Tokens per screenshot: ≈ w × h / 750 (Claude vision; 1280×800 ≈ 1,365 tokens)
A walled-off space where an agent's code and actions run, with only the files, network and credentials it genuinely needs.
Default: Ephemeral microVM (Firecracker) or gVisor container per run; workspace-only mount; egress denied except an allowlisted package proxy; metadata endpoints blocked; per-run tokens with 15-minute expiry; 2 vCPU / 4 GB / 10-minute limits; logs of every blocked syscall and connection shipped off-box.
Firecracker microVM boot: ≈125 ms (NSDI 2020 paper)
Checks around a model or agent that block, fix or escalate unsafe inputs, outputs and actions — layered, with the important ones in code.
Default: Deterministic action limits in every write tool; schema + grounding check on outputs that state policy, price or coverage; a small injection classifier on retrieved and tool content; PII filter on output; $ and turn caps; every block logged with layer and reason; monthly precision/recall review on 200 labelled samples.
Latency: rule check: < 1 ms (regex, schema, allowlist)
A person reviews, approves or corrects the AI's work at chosen moments — usually just before anything irreversible.
Default: Risk rules in code (amount, irreversibility, external recipient, changed bank details) select the gated calls; state checkpointed before the pause; approval UI shows action, arguments, evidence and the agent's reason; approve/edit/reject with a required reason on reject; SLA timer that escalates; every decision stored as a label.
Healthy gated share: 2–10% of actions (risk-based gating; >30% means the rule is too broad)
The rules that end an agent's run: task done, or a cap on turns, tokens, time, spend, repeats or errors — each logged with a reason.
Default: Turn cap ≈ 1.3× p99 of successful runs; token and $ caps likewise; wall-clock cap; repeat detector (3 identical calls); error budget (3–4 consecutive failures); explicit finish tool with a result schema; stop_reason enum logged on every run; graceful partial-result template.
OpenAI Agents SDK default: max_turns = 10 (as of Oct 2026)
Running agent workflows so progress is saved step by step, and a crash, a deploy or a two-day wait doesn't redo what already happened.
Default: Short runs (< 5 min, no human wait): checkpoint state to Postgres after each turn.
Temporal history warning: 10,240 events or 10 MB (per workflow execution, Temporal docs)
Judging an agent's whole path — which tools, in what order, how safely, how cheaply — and not just whether the final answer was right.
Default: 100–300 tasks from real traces; tools replayed from fixtures or run in a sandbox; end-state check per task; trace assertions for required, forbidden and ordered steps; 4 trials per task reporting pass^1 and pass^4; cost and steps per success; run on every prompt, model or tool change as a CI gate.
pass^k with independent trials: p^k (p = 0.8 → pass^8 ≈ 0.17)
Designing an agent's tools — names, descriptions, inputs, outputs, errors — so the model picks the right one and uses it well.
Default: 5–15 task-shaped tools per agent, namespaced by system; descriptions that say when to use and when not to; enums for closed sets; identity from the session, not arguments; outputs ≤ 2–5k tokens with pagination and a truncation hint; response_format concise|detailed; errors with a fix suggestion; reads and writes split; writes idempotent; tool evals in CI.
Tool response cap in Claude Code: 25,000 tokens default (Anthropic, Sept 2025)
What a run costs in tokens, money and time. Because the whole history is re-sent each turn, it grows faster than you'd guess.
Default: Prompt caching on the stable prefix and a moving breakpoint on history; tool outputs trimmed to ≤2–5k tokens; compaction at 70% of the window; per-run caps ($1–2, 300k tokens); per-tenant monthly quotas in the gateway; cheaper model for classification and extraction steps; batch API for offline agents; dashboards of cost per successful task p50/p95 by agent version.
Cumulative input over T turns: T·P + Δ·T(T−1)/2 (P = prefix, Δ = tokens added per turn, no compaction)
Serving many customers from shared infrastructure while keeping their data, quotas and performance apart. How far you isolate is a cost-versus-risk call.
Default: Pooled Postgres with RLS (FORCE ROW LEVEL SECURITY, SET LOCAL app.tenant_id per transaction); vector store with tenant partitioning (Qdrant is_tenant payload index, Pinecone namespaces, or a tenant_id filter in pgvector with RLS); tenant id in every cache key, log, trace and metric; per-tenant rate limits; silo tier for regulated customers; cross-tenant test suite in CI.
Pooled vs silo infra cost: ~10–100× cheaper per small tenant (a dedicated cluster has a fixed floor regardless of data size)
One customer's heavy load — a bulk import, a runaway agent — making everyone else on the same infrastructure slow.
Default: Per-tenant token buckets (tokens/min and requests/min) at the LLM gateway; separate queues and worker pools for batch/ingestion vs interactive; weighted fair queuing across tenants; per-run token and step caps for agents; shuffle sharding for stateful workers; per-tenant metrics on every request.
Shuffle-shard overlap, 8 workers, shard size 2: 1 in 28 (chance another given tenant shares both of your workers)
Who is allowed to see a document. In RAG this has to be checked while searching, or the model will quote files the user cannot open.
Default: Principals copied onto every chunk; nested groups flattened at ingest; user groups from the IdP (Okta, Entra ID) cached ≤5 min; filter in the ANN query (Qdrant/OpenSearch filters, pgvector + RLS); webhook-driven ACL sync plus 15-min ACL reconcile; source re-check for restricted spaces; ACL hash in cache keys; deny if group resolution fails.
Revocation propagation target: ≤5 minutes (webhook sync; nightly-only sync means up to 24 h exposure)
If you cannot confirm something is allowed, treat it as not allowed. Fail-open is the opposite: keep serving and skip the check.
Default: Every security check returns allow/deny/error with error → deny in code; check services have their own SLO and in-region replicas; positive decisions cached ≤60 s; denial UX with retry; fail-open exceptions require a named owner and are listed in the threat model; chaos test that kills each check service and asserts denial.
Positive-decision cache: ≤60 s (trades a short revocation lag for availability)
Text the model reads as instructions — typed by a user, or hidden in a page, email or document an agent fetches. No filter fully fixes it.
Default: Trifecta review per agent at design time; tools scoped per task (read-only by default, single repo/folder); egress allowlist for HTTP and mail tools; markdown images and links rendered only for allowlisted domains; human approval for send/pay/delete/share; plan-then-execute or dual-LLM for agents processing untrusted content; injection classifier (e.g.
Residual success rate of filtered attacks: non-zero under adaptive attack (published evaluations repeatedly bypass classifier-only defences)
Getting data out of a system without permission. For agents: a tool call, a fetched URL, or a rendered image whose address carries the data.
Default: Network egress allowlist for agent sandboxes and HTTP tools (deny by default); chat UI renders images only from your CDN or via an image proxy (CSP img-src restricted); links to non-allowlisted domains shown inert with the domain visible; approvals for any write outside the tenant; outbound request log keyed by agent run id; alerts on long query strings to new domains.
Channels to review per agent: 4 classes (tool requests, external writes, rendered output, sandbox network)
Give every user, service and agent only the permissions this task needs, only for as long as it needs them.
Default: Per-task credentials from a broker (AWS STS, GCP short-lived tokens, Vault dynamic secrets); OAuth scopes per MCP server per the MCP authorization spec; read-only by default; separate dev/prod accounts with no cross-access; approval gates for send/pay/delete/share; quarterly review of agent permissions vs actual usage.
Credential lifetime: 15 min–1 h (AWS STS sessions start at 15 min; shorter limits leaked-token value)
How much breaks when one thing fails: how many users, customers, records or actions. Keep it small and known.
Default: Cell-based deployment for multi-tenant serving; staged rollout for code, config, prompts and flags; per-tenant and per-task credentials; agent caps (tokens, steps, spend, rows per tool call); blast-radius statement in every design doc; detection SLOs on canary gates.
Tenants per cell: a few hundred (small enough that one cell's outage is a contained incident)
Stacking independent safeguards so that one failing — and each will, sometimes — is not the whole story.
Default: Layer inventory per agent mapped to OWASP LLM Top 10; deterministic limits inside every side-effecting tool (amount caps, recipient allowlists, row caps); least-privilege credentials; egress allowlist; approvals for irreversible actions; classifier layer for detection; red-team suite (≥200 attacks) run per release with per-layer catch rates.
Red-team suite size: ≥200 attacks (covering direct, indirect, multi-turn and tool-output injection)