When a LangChain agent's model returns a tool call, what runs the tool?
- Exam domain
- LangChain for AI agents
- Difficulty
- Medium
- In this mock
- 5 questions on this domainPractise this domain
Why A is the answer
Your agent runtime, which sends the result back
The model only proposes a tool call with arguments. The agent runtime in your application runs the tool and passes the result back to the model for the next step.
Remember: The runtime runs tools, not the model.
In detail
- The model proposes; the runtime executes.
- Results go back to the model as the next input.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Your agent runtime, which sends the result backRight
The runtime runs tools, not the model.
B. The model provider runs it on its own serversWrong
The provider returns the call; it does not run your code.
C. The vector store runs it during retrievalWrong
A vector store answers queries; it does not run tools.
D. The output parser runs it after formattingWrong
Parsers format output; they do not execute tools.
Use case
An illustrative scenario, not a real incident.
Illustrative: the model asks for get_order(42); the app queries its own database and sends the order back to the model.
See it in different ways
sequenceDiagram participant P0 as Agent runtime participant P1 as Model participant P2 as Tool P0->>P1: Prompt with tool schemas P1-->>P0: Tool call P0->>P2: Run the tool P2-->>P0: Result P0->>P1: Result for the next step
How to read this chart
- 1. Agent runtime sends "Prompt with tool schemas" to Model.
- 2. Agent runtime gets a reply from Model: "Tool call".
- 3. Agent runtime sends "Run the tool" to Tool.
- 4. Agent runtime gets a reply from Tool: "Result".
- 5. Agent runtime sends "Result for the next step" to Model.
flowchart LR S0["Model picks a tool"] --> S1["Runtime runs it"] --> S2["Result goes back to the model"] --> S3["Model answers"]
How to read this chart
- Read it in order: Model picks a tool, then Runtime runs it, then Result goes back to the model, then Model answers.