Agent frameworks Ai Questions
Master agent frameworks ai interviews with our comprehensive collection of 5 questions and challenges.
Start from requirements, not popularity: list what you need (streaming to a React UI, tool calling, memory, human approval, durable long-running runs, tracing) and check which you can already do with a lightweight SDK. Many teams can start with the Vercel AI SDK and plain TypeScript, and adopt a heavier framework such as Mastra, LangGraph.js or the OpenAI Agents SDK only when they need its specific features. Build the same small agent as a spike in your top two options, and keep the framework behind your own interface so you can switch later.
A model has no memory of its own: every call only sees what you send in that request. Agent "memory" is your app deciding what to put back into the context: short-term memory is the current conversation (message history for one thread), working memory is a small set of key facts kept in the prompt, and long-term memory is data stored in a database across sessions and pulled in when relevant, often by semantic search. Each type trades accuracy against tokens, cost and privacy.
A workflow is LLM calls and tools wired together by your code along a path you decided in advance. An agent is a model running in a loop that decides its own next step and which tools to call. Use a workflow when the steps are known and you need predictable cost and latency, and reach for an agent only when the number and order of steps genuinely depend on the input.
Make every run replayable: record one trace per run with a span per step, holding what the model saw, which tools it chose with what arguments, what the tools returned, the finish reason, tokens and timings. Then debug from the trace like a Redux DevTools timeline: find the first step where things went wrong and ask whether the cause was missing context, a vague tool description, a bad tool result or the model's reasoning. Turn each confirmed failure into a test case so the fix stays fixed.
Multiple agents pay off when a task splits into independent pieces that can run in parallel, each needing its own large context, such as broad research across many sources. They are a poor fit when the pieces depend on each other or must share the same decisions, like most UI and coding tasks, because subagents lose context and make conflicting choices. Default to one agent with good tools, and split only when you have measured that one context window or one sequential loop is the bottleneck.