AI / LangGraph LangChain Interview questions
What are multi-action agents?
A multi-action agent returns a list of AgentAction objects per reasoning step rather than a single action. This enables the agent to call multiple tools simultaneously within a single turn, which is useful when several tool calls are independent and don't need to be serialised.
Multi-action agents implement BaseMultiActionAgent, and their plan() method returns List[AgentAction] instead of a single AgentAction. AgentExecutor detects this and executes all returned actions in parallel before feeding their observations back to the agent.
OpenAI's parallel tool calling feature maps directly to this pattern. When you call ChatOpenAI with tools bound via .bind_tools(), the model can return multiple tool calls in a single response, and AgentExecutor (or LangGraph) runs them concurrently:
from langchain_openai import ChatOpenAI
llm_with_tools = ChatOpenAI(model="gpt-4o").bind_tools([search_tool, calculator_tool])
# Model may respond with both a search call AND a calculator call in one step
response = llm_with_tools.invoke("What is the population of France times 2?")
print(response.tool_calls) # [{name: 'search', ...}, {name: 'calculator', ...}]
For complex coordination of parallel tool execution with state management, LangGraph is better suited than AgentExecutor, as it provides explicit graph edges for parallel branches.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
