How to Choose Between a Planning Agent and a Reactive Agent
Choose a planning agent for multi-step goals and a reactive agent for single questions, using the task shape to decide.
WORKFLOW TAG
Set up agents, tools, and repeatable agent workflows.
Choose a planning agent for multi-step goals and a reactive agent for single questions, using the task shape to decide.
Write the allowed format as a grammar, load it into the inference engine, and check the output parses without a repair step.
Parse the reply, log the exact error, retry once with the error message included, and fall back to a safe default if…
Declare the tools, let the model return several calls at once, execute them all, and send the results back in one message.
Use function calling when the model needs data or actions from your system, and JSON mode only when the reply itself must…
Name the object, type every field, mark the required ones, and restrict fixed values with an enum before you send it to…
Write the schema as a Zod object, pass it to the SDK as the response format, and validate the parsed result before…
Turn on LangSmith tracing for a LangChain agent so every run, tool call and token is recorded for review.
Build a first ReAct agent with LangChain and two tools so the model decides which tool to call for each question.
Connect a knowledge base to a Dify agent so it answers from your documents at fast retrieval depth.