Browse questions, read quick answers, or expand full article breakdowns on demand. Filter by level, domain, or completion status using the sidebar dashboard.
Showing 31 of 31 questionsClick any card to load the whole article
beginner•Core Loop Primitives•4 min•+10 XP
ReAct Loop Architecture: Managing Thought-Action-Observation State
Question
How does the Thought-Action-Observation (ReAct) loop function state-wise during runtime, and why does an unconstrained observation window lead to immediate context drift or failure in simple autonomous loops?
beginner•Tool Calling & Execution•4 min•+10 XP
Tool Calling and JSON Schema: How LLMs Translate Function Signatures into Structured Calls
Question
How does an LLM runtime translate an abstract function signature into a strict JSON Schema call, and what deterministic parsing strategy should be implemented when the model generates syntactically valid JSON that violates the required schema types?
beginner•Deterministic Execution•4 min•+10 XP
Deterministic vs. Non-Deterministic Boundaries in Agentic Architecture
Question
In an agentic architecture, which components must remain strictly deterministic (hardcoded state machine), and which should be delegated to non-deterministic LLM reasoning? How do you enforce this boundary?
beginner•Task Decomposition•4 min•+10 XP
Static vs. Dynamic Task Decomposition: Plan-and-Solve vs. Runtime Re-planning
Question
What are the structural differences between static step-by-step task decomposition (e.g., Plan-and-Solve) and dynamic re-planning during tool execution, and what runtime telemetry signals that a plan needs to be discarded?
beginner•Core Loop Primitives•3 min•+10 XP
ReAct Token Growth: Why Full-History Replay Gets Expensive Fast
Question
In a naive ReAct loop implementation, why does appending the entire history of `Thought -> Action -> Observation` back into the prompt on every turn lead to exponential token consumption, and how is this mitigated at the basic loop level?
beginner•Tool Calling & Execution•4 min•+10 XP
Native vs. Prompt-Based Tool Calling: Why Native Reduces Parsing Failures
Question
What is the technical mechanism behind "native tool calling" supported by model providers versus prompt-based tool calling (e.g., instructing the model to output XML/JSON in plain text), and why does native tool calling reduce parsing failures?
beginner•Deterministic Execution•4 min•+10 XP
Guardrails for Tool Execution: Validating Agent Parameters Before and After a Call
Question
How do you enforce strict pre-execution and post-execution guardrails around a tool call to verify that the generated parameters (e.g., file paths, database queries) conform to system safety bounds before the execution engine runs them?
beginner•Task Decomposition•4 min•+10 XP
DAG Task Decomposition: Handling Data Dependencies Between Sub-Task Nodes
Question
When an agent decomposes a complex goal into a Directed Acyclic Graph (DAG) of sub-tasks, how do you handle data dependencies between nodes when Node B requires the runtime output of Node A?
intermediate•Memory Systems•6 min•+15 XP
Dual-Layer Agent Memory: Separating Short-Term Execution State from Long-Term Episodic Recall
Question
How do you architect a dual-layer memory system that separates short-term execution state from long-term episodic memory, and what dynamic retrieval strategy prevents irrelevant semantic memories from polluting the active context window?
intermediate•State Management & Graphs•7 min•+15 XP
State-Graph Agent Architectures: Checkpointers, Persistence, and Time-Travel Debugging
Question
How do state-graph architectures (e.g., LangGraph) model agent loops as directed graphs with persistence, and how do explicit checkpointers enable time-travel, replay, and mutation of state during execution failures?
intermediate•Human-in-the-Loop (HITL)•6 min•+15 XP
Async Human-in-the-Loop Interrupts: Pausing Agents Without Blocking the Server
Question
How do you design an asynchronous Human-in-the-Loop (HITL) interrupt pattern for high-risk tool executions without stalling the underlying application server or losing process context?
intermediate•Error Recovery & Reflection•5 min•+15 XP
Self-Correction Feedback Loops: Healing Agent Errors from Tool Exceptions
Question
When a tool call throws an execution exception (e.g., `404 Not Found` or `SyntaxError`), what self-correction/reflection feedback pattern should be fed back into the context to allow the agent to heal its approach without repeating the error?
intermediate•Memory Systems•6 min•+15 XP
Key-Value Stores vs. Vector Search vs. Knowledge Graphs: Long-Term Memory for Code-Generation Agents
Question
What are the trade-offs between using key-value state stores, semantic vector search, and structured knowledge graphs for long-term agent memory when building a code-generation agent?
intermediate•State Management & Graphs•6 min•+15 XP
State Reducers in Agent Graphs: Handling Concurrent Updates Without Race Conditions
Question
In graph-based agent frameworks, how do state "reducers" work under the hood to handle concurrent state updates from multiple parallel node executions without causing race conditions or state corruption?
intermediate•Human-in-the-Loop (HITL)•5 min•+15 XP
Reconciling Human Edits with Agent State During HITL Approval Flows
Question
When a human supervisor modifies the proposed state or edit plan during an HITL interrupt, how should the execution engine reconcile the human's manual edits with the agent's prior trajectory context?
intermediate•Error Recovery & Reflection•6 min•+15 XP
State Backtracking vs. Conversational Reflection: Recovering from Agent Dead-Ends
Question
How does explicit state backtracking (e.g., Tree-of-Thoughts or graph rewind) differ from simple conversational reflection when an agent hits an execution dead-end during a complex multi-file codebase refactor?
advanced•Multi-Agent Topology•8 min•+20 XP
Hierarchical vs. Peer-to-Peer Multi-Agent Topologies: Latency, Isolation, and Failure Risk
Question
What are the operational trade-offs between a Supervisor/Worker (Hierarchical) agent topology and a Peer-to-Peer agent network in terms of latency, context isolation, and single-point-of-failure risks?
advanced•Context & Budget Management•9 min•+20 XP
Context Compaction at Scale: Semantic Truncation, Rolling Summarization, and KV Dropping
Question
As an agent execution trace approaches the model's maximum context length, what context compaction algorithms (e.g., semantic truncation, rolling summarization, key-value dropping) preserve the highest utility for tool planning while keeping token costs bounded?
advanced•Agent Coordination•8 min•+20 XP
Sub-Agent Handoff Protocols: Passing State Across Task Boundaries Without Loss
Question
How do you design an explicit state-passing and handoff protocol between specialized sub-agents to prevent lost context and state corruption when delegating tasks across boundaries?
advanced•Dynamic Tool Synthesis•9 min•+20 XP
Dynamic Tool Synthesis: Generating and Safely Validating New Tools at Runtime
Question
How can an agent dynamically generate, compile, and execute new tools at runtime to solve unexpected tasks, and how do you ensure these dynamically created tools are safely validated before execution?
advanced•Multi-Agent Topology•8 min•+20 XP
Router/Dispatcher Agents: Avoiding Cognitive Bottlenecks and Latency Inflation
Question
How do you design an efficient Router/Dispatcher agent that dynamically selects and hands off tasks to specialized downstream agents without becoming a single point of cognitive bottleneck or latency inflation?
advanced•Context & Budget Management•9 min•+20 XP
Dynamic Token Budget Controllers: Allocating Context Across Instructions, Tools, Memory, and History
Question
How do you construct a dynamic token budget controller that allocates token allowances across system instructions, active tool definitions, dynamic memory retrieval, and short-term execution history based on the current phase of task execution?
advanced•Dynamic Tool Synthesis•8 min•+20 XP
Dynamic Tool Registries: Searching and Binding OpenAPI Schemas Without Context Bloat
Question
How do you implement a dynamic Tool Registry that allows an agent to search, inspect, and bind OpenAPI schemas or function definitions on the fly, avoiding context window bloat caused by loading hundreds of static tools upfront?
advanced•Sub-Agent Spawning•9 min•+20 XP
Parent-Child Sub-Agent Spawning: Parallel Execution, Lifecycle Monitoring, and Result Aggregation
Question
How do you architect a parent agent pattern capable of spawning transient child sub-agents in parallel, monitoring their lifecycles, and aggregating their asynchronous execution results into a unified parent state?
expert•Execution Sandboxing•12 min•+25 XP
Docker vs. WebAssembly vs. MicroVMs: Sandboxing Trade-offs for Agent-Generated Code
Question
What are the security, latency, and resource isolation differences between using Docker containers, WebAssembly (Wasm) runtimes, and MicroVMs (e.g., Firecracker) for sandboxing untrusted code generated by AI agents?
Quick Answer
Docker containers share the host kernel, so isolation depends entirely on correctly configured namespaces and cgroups — fast to start, but a kernel exploit inside the container can reach the host; WebAssembly runtimes sandbox at the language-runtime boundary with the lowest overhead and startup time, but only for code that compiles to Wasm and with a narrower capability surface; MicroVMs like Firecracker give each workload its own minimal kernel, closer to true VM-level isolation, at a startup cost that's higher than a container but far lower than a full VM.
Detailed Answer
Docker containers isolate processes using Linux namespaces (PID, network, mount) and cgroups (resource limits), but all containers on a host still share one kernel. This means container isolation is only as strong as the kernel's own security boundary — a kernel-level vulnerability, or a misconfigured capability set (an overly permissive --privileged flag, a missing seccomp profile), can let code inside the container reach the host. For agent-generated code, this makes containers a reasonable default for low-risk execution but a risky default for genuinely untrusted code, since the isolation is a configuration discipline rather than an architectural guarantee.
WebAssembly (Wasm) runtimes sandbox at a different layer entirely: Wasm modules run inside a runtime (Wasmtime, Wasmer, or a browser engine) with a capability-based security model — a module has no ambient access to the filesystem, network, or system calls unless the host explicitly grants specific capabilities. Startup time is typically the fastest of the three options (often sub-millisecond to a few milliseconds), which matters if an agent is spinning up many short-lived executions. The trade-off is compatibility: code has to compile to Wasm, which rules out a large swath of existing tooling and libraries that assume a full OS environment, and the capability model, while strong, is a different mental model than "just run this script" that adds real engineering overhead to adopt correctly.
MicroVMs (Firecracker being the most common example, originally built for AWS Lambda) give each workload its own minimal virtual machine — a real, separate kernel, not a shared one — using a stripped-down device model that boots in tens of milliseconds rather than the seconds a full VM takes. This is meaningfully stronger isolation than containers (a kernel exploit inside the microVM doesn't automatically reach the host's kernel) while staying close enough to container-like startup speed to be practical for per-task sandboxing. The cost is operational complexity: running a MicroVM fleet is a heavier infrastructure lift than docker run, and it's most justified when the code being executed is genuinely untrusted (agent-generated, from an unvetted source) rather than merely "internal but not fully reviewed."
Sandbox
Isolation strength
Startup time
Compatibility
Docker container
Shared kernel — depends on correct config
Fast (~100s of ms)
Broadest — runs almost anything
WebAssembly runtime
Capability-based, no ambient access
Fastest (sub-ms to a few ms)
Narrowest — must compile to Wasm
MicroVM (Firecracker)
Separate kernel per workload
Fast for a VM (~10s of ms)
Broad — runs like a lightweight VM
Production Implications
Match the sandbox to the trust level of the code, not just to what's operationally convenient — agent-generated code aimed at production systems warrants MicroVM or Wasm-level isolation, not a bare container
For containers, treat seccomp profiles, read-only root filesystems, and dropped capabilities as mandatory baseline, not optional hardening
Benchmark cold-start cost against your actual call volume — Wasm's speed advantage matters most when spinning up many short executions per minute
Re-evaluate sandbox choice as risk changes: dynamically synthesized tools that get reused across runs deserve stronger isolation than a one-off script executed and discarded
Key Takeaway
There's no universally "most secure" sandbox — match the isolation model to how untrusted the code actually is and how often you're spinning instances up, since containers, Wasm, and MicroVMs sit at genuinely different points on the isolation-versus-overhead curve.
expert•Security & Guardrails•11 min•+25 XP
Defending Against Indirect Prompt Injection: Protecting Agents from Exfiltration via Retrieved Content
Question
How do you protect a software engineering agent from indirect prompt injection attacks contained within retrieved web pages or repository files that attempt to exfiltrate secrets via outbound tool calls?
expert•Cost & Loop Control•11 min•+25 XP
Circuit Breakers for Agents: Stopping Non-Convergent, Infinite Tool-Calling Loops
Question
How do you implement robust architectural circuit breakers (token usage velocity, repetition detection, goal-drift metrics) to prevent autonomous agents from getting stuck in non-convergent, infinite tool-calling loops?
expert•Evals & Observability•12 min•+25 XP
Evaluating Non-Deterministic Agents: Automated Benchmarks and Reproducible Debugging
Question
How do you build an automated evaluation pipeline for non-deterministic agents (using benchmarks like SWE-bench), and how do you achieve reproducible step-by-step debugging across non-deterministic LLM runs?
expert•Execution Sandboxing•12 min•+25 XP
Sandbox Egress Controls: Blocking Agent Access to Internal Infrastructure and Cloud Metadata
Question
What network, file-system, and system-call restriction profiles (e.g., `seccomp`, eBPF, network namespaces) must be applied to a code execution sandbox to prevent an agent-executed script from accessing internal infrastructure or cloud provider metadata endpoints?
expert•Security & Guardrails•12 min•+25 XP
Dual-LLM Architecture: Privilege Separation Between Control-Flow and Data-Processing Models
Question
How does the "Dual-LLM Architecture" (separating a privileged control-flow model from an unprivileged data-processing model) prevent data exfiltration and unauthorized tool invocations when processing untrusted inputs?
expert•Evals & Observability•11 min•+25 XP
Instrumenting Agentic Workflows: OpenTelemetry Tracing and the Metrics That Matter Beyond Latency
Question
How do you extend OpenTelemetry or native APM tools to instrument an agentic workflow, and what key metrics beyond latency and cost (e.g., tool error rate, loop depth, context utilization ratio) are essential for diagnosing agent performance in production? --- *Total: 31 questions across 4 tiers (8 Beginner / 8 Intermediate / 8 Advanced / 7 Expert)*