Should you build your agent on a framework or roll the loop yourself? Defend a position.
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Defensible position: write the loop yourself first; adopt a framework only when you need its specific infrastructure - and keep your prompts and tools portable either way.
Full worked answer
Defensible position: write the loop yourself first; adopt a framework only when you need its specific infrastructure - and keep your prompts and tools portable either way.
The case for rolling it: the core loop is ~50 lines, and writing it forces you to understand the things that actually determine success - context assembly, tool result handling, stop conditions, error feedback. Frameworks abstract exactly these, which is precisely what you don't want abstracted while learning or debugging: when the agent misbehaves, the answer is in the exact rendered prompt, and every framework layer between you and that prompt slows diagnosis. Anthropic's Building Effective Agents makes this argument explicitly - start with direct API calls; frameworks add indirection that obscures the prompts and encourages complexity before simplicity has failed. There's also churn risk: the 2023-2026 agent-framework landscape has been unstable, and deep coupling to a fast-moving abstraction is real maintenance exposure.
The case for frameworks - which is legitimate and grows with operational maturity: what they sell isn't the loop, it's the infrastructure around it. LangGraph: durable graph execution with checkpointing/resumability and human-in-the-loop interrupts. OpenAI Agents SDK: handoffs, guardrail hooks, integrated tracing. Claude Agent SDK: the production-hardened harness behind Claude Code - context compaction, permissioning, tool ecosystem - as a library. CrewAI: fast assembly of role-based multi-agent setups. Building durable execution or good trace tooling yourself is weeks of work; buying it is rational once you actually need it.
The synthesis interviewers reward: the loop is trivial; the harness (state, durability, observability, permissions) is not - so the build-vs-buy decision is about harness infrastructure, not agent logic. Whatever you choose, keep tool definitions, prompts, and evals framework-agnostic, so the framework is a replaceable execution substrate rather than the load-bearing architecture. And in an interview, be able to sketch the raw loop regardless - depending on a framework is a choice; being unable to work without one is a red flag.
What a good answer covers
- Defensible position: write the loop yourself first; adopt a framework only when you need its specific…
- The case for rolling it: the core loop is ~50 lines, and writing it forces you to understand the things…
- Frameworks abstract exactly these, which is precisely what you don't want abstracted while learning or…
- Anthropic's Building Effective Agents makes this argument explicitly - start with direct API calls;…
- There's also churn risk: the 2023-2026 agent-framework landscape has been unstable, and deep coupling to…
In the glossary: Handoff · Compaction · Multi-agent · Observability
Interviewer follow-ups to expect
Which single piece of framework infrastructure would you pay for first, and why?
How would you structure code so you can swap frameworks later?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep