Core Components of an LLM-Based AI Agent and How They Interact
Company: Wells Fargo
Role: Data Scientist
Category: Machine Learning
Difficulty: hard
Interview Round: Technical Screen
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.
```hint 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 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.
```
### 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?
### What a Strong Answer Covers
- The model as the reasoning core, and the instructions that define the agent's goal and behavior
- Tools with typed interfaces, and how the model invokes them
- Short-term and long-term memory, and how context is managed
- Planning and the control loop, including stopping conditions and budgets
- Guardrails, permissions, evaluation and observability
- A concrete walk-through showing how the components interact, and the link to the classical perceive-decide-act view
### 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?
Overview: 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.
Read the full Wells Fargo Data Scientist interview experience this question came from