EN δΈ­ζ–‡

System Design Lab

An LLM agent is a reason-act loop whose cost, latency, and blast radius all grow with the number of steps per task.

Tune concurrent sessions, tool calls and steps per task, LLM latency, context size, and how many tools are registered. The design grows from a single tool call into a reason-act loop, then adds memory and planning, parallel tool execution behind a sandbox, and finally multi-agent orchestration with full tracing at scale.

Guided walkthrough

Reason about it one step at a time

Normal evolution scenarios

Click left to right for the intended demo path. Each card changes the workload inputs.

Workload

These are inputs, not preset architecture stages.

Recommended shape

Current architecture path
LLM agent orchestration architecture diagram Whiteboard-style architecture diagram for an LLM agent system: clients, an agent runtime running the reason-act loop and planner, a tool registry with sandboxed execution, short-term and long-term vector memory plus the LLM gateway, and an async tracing and observability pipeline. Clients Agent runtime Tool execution Memory + LLM Observability Client task + stream Agent loop reason + act Planner decompose tasks Tool registry schemas + routing Sandbox isolated exec Conversation short-term Vector memory long-term LLM gateway model calls Tracing async spans Guardrails retries + limits
Clients
Client submits a task and streams the agent run back as it progresses
Agent runtime
Agent loop drives the decide-call-observe loop and enforces the step budget per task
Planner breaks a goal into sub-steps and sequences or fans out the work
Tool execution
Tool registry holds tool schemas and routes the model to the right tool from many
Sandbox runs untrusted tool code and side effects in an isolated worker pool
Memory + LLM
Conversation keeps the working context and applies summarization or truncation
Vector memory embeds and retrieves facts across tasks beyond the context window
LLM gateway batches, rate-limits, and retries the many model calls every step makes
Observability
Tracing records each step, tool call, and token cost off the hot path
Guardrails validates outputs, retries failures, and enforces cost and loop limits

Bottlenecks

LLM call volume

Sequential task latency

Sandbox execution load

Context window pressure

Tool selection complexity

Why this changes

    Decision tradeoffs

    Agent loop / planning

    Tool registry + routing

    Sandboxed execution

    Memory (short / long-term)

    Context management

    Observability + guardrails

    Source-backed rules

    These are the durable system-design claims behind the model. The exact slider thresholds are deliberately labeled as teaching assumptions.

    Verified rule

    Reason-and-act interleaving makes agents iterate, not answer once

    ReAct interleaves reasoning traces with actions so the model decides, acts, observes, and repeats β€” the loop structure that all step-count cost and latency follow from.

    ReAct (Yao et al.)
    Verified rule

    Models can be taught to call tools/APIs as part of generation

    Toolformer shows the model itself learning when and how to invoke external tools, motivating a tool registry the model selects from rather than hard-coded calls.

    Toolformer (Schick et al.)
    Verified rule

    Tool-use APIs define a registry of tool schemas the model picks among

    Production tool calling passes JSON tool schemas to the model; too many crowded into one prompt degrade selection, which is why routing matters as the registry grows.

    Anthropic tool use docs
    Verified rule

    Multi-step agent runs need tracing across each LLM and tool span

    Orchestration guidance treats per-step tracing, retries, and guardrails as first-class, because a multi-step run is much harder to debug than a single request.

    OpenAI Agents SDK docs

    Teaching assumptions

    • Sequential task latency assumes steps run one after another; parallel tools shorten wall-clock but not total LLM calls.
    • Per-lane LLM and per-worker sandbox budgets are conservative teaching numbers, not provider limits.
    • Context pressure compares the working window against a comfortable single-task budget; long-term recall is modeled as a separate vector path.