01 · Mental model
A framework is a component, not the architecture
The UI manages interaction. The API terminates identity and transport. Orchestration owns sequence and state transitions. The runtime connects models and tools. Storage persists approved state. Observability records execution evidence. Evaluations measure behavior. Guardrails and policy enforce boundaries across every layer.
Select technologies from required behavior: explicit graphs and resumability may justify LangGraph; a smaller agent loop may fit an Agents SDK; Langfuse supports tracing and evaluation; NeMo Guardrails provides programmable conversational and execution rails. Do not add a framework merely because it appears in a reference stack.
02 · Visual explanation
03 · Compare and decide
Use a tool when its control need appears
| Decision lens | Technology | Use when |
|---|---|---|
| Agents SDK | A focused agent runtime and tool loop | You need tool calls, handoffs, tracing hooks, and limited orchestration |
| LangGraph | Stateful graph orchestration | You need checkpoints, branching, resumability, and explicit workflow nodes |
| Langfuse | LLM observability and evaluation | You need traces, sessions, scores, datasets, and release comparison |
| NeMo Guardrails / OPA | Programmable rails or policy | You need reusable safety flows or deterministic authorization decisions |
04 · Cybersecurity example
A right-sized first production stack
A read-only security review agent has one skill, three tools, and an expert reviewer.
Use a small SDK loop rather than a large graph.
Store typed run state and artifacts in PostgreSQL.
Trace sanitized execution in Langfuse.
Apply schema, policy, and approval gates in application code.
Outcome: The stack remains explainable and can add orchestration only when workflow evidence demands it.
05 · What to remember
The 60-second recall
Architecture decisions start from behavior and controls, not brand lists.
Observability and evaluation are different: one explains runs, the other measures quality.
Cross-cutting policy must remain independent of model choice.
Teach-back prompt: Explain this concept to a teammate using the diagram, then name one failure mode and the control that stops it.
06 · Questions people ask
FAQ
07 · Primary sources