Bird
0
0

What will happen if a custom agent's plan method returns None instead of a valid action?

medium📝 component behavior Q5 of 15
LangChain - Agents
What will happen if a custom agent's plan method returns None instead of a valid action?
AThe agent will raise an error or stop execution.
BThe agent will automatically retry the plan method.
CThe agent will proceed with a default action silently.
DThe agent will ignore the None and wait for input.
Step-by-Step Solution
Solution:
  1. Step 1: Understand expected plan method output

    The plan method must return a valid action or decision for the agent to continue.
  2. Step 2: Consequence of returning None

    Returning None breaks the expected flow, causing errors or halting execution.
  3. Final Answer:

    The agent will raise an error or stop execution. -> Option A
  4. Quick Check:

    plan must return action, None causes error [OK]
Quick Trick: plan must return valid action, not None [OK]
Common Mistakes:
MISTAKES
  • Assuming automatic retries
  • Thinking default actions run silently
  • Believing agent waits without error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LangChain Quizzes