Core Components of an LLM-Based AI Agent and How They Interact
Wells FargoData Scientist · Technical ScreenLast updated
An open question about AI agents asks you to name the components of an agent built around a language model, explain what each one does, and show how they work together to complete a multi-step task. It tests understanding of tools, memory, planning, control loops, guardrails and evaluation.
What are the components of an AI agent? Name each component, explain what it does, and show how the components work together when the agent carries out a multi-step task.
Clarifying Questions
- Does "AI agent" here mean a system built around a large language model, or an agent in the broader reinforcement-learning sense?
- Should the agent act autonomously, or with a person approving some actions?
- One agent, or several agents that cooperate?
Hints
Hint 1
Follow one task: Pick a concrete multi-step task and trace what the agent needs at each step. Each need points to a component.
Hint 2
What makes it stop: Think about what ends the agent's loop, and what prevents it from taking a harmful or expensive action along the way.
Follow-up questions
- How would you keep an agent from looping forever or exhausting its budget?
- A tool returns text that contains instructions addressed to the agent. What is the risk, and how do you defend against it?
- How would you evaluate an agent whose tasks have many valid action sequences?
- When would you build a fixed workflow instead of an autonomous agent?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.