Overview
Agentic workflows enable the model to make multiple sequential tool calls for complex multi-step reasoning. The model autonomously decides which tools to use, chains them together, and iterates until it has sufficient information to answer the question.Getting started
Enable the model to make multiple sequential tool calls:Example interaction
How agentic behavior works
The model autonomously:- Decides which tools to use based on the question
- Chains multiple tools together (e.g., get employee info → lookup location details)
- Iterates until it has sufficient information to answer
- Handles complex multi-step reasoning automatically
API reference
Request
The LLM Gateway accepts POST requests tohttps://llm-gateway.assemblyai.com/v1/chat/completions with the following parameters:
Request parameters
Message object
Tool object
Tool choice object
Thetool_choice parameter can be:
"none"- The model will not call any tools"auto"- The model can choose whether to call tools- An object with
type: "function"and afunction.nameto force calling a specific function
Response
The API returns a JSON response. In agentic workflows, the model may make multiple tool calls before providing a final answer.First response (tool call)
Subsequent response (another tool call)
After adding the function result to conversation history:Final response (answer)
After all tool calls are complete:Response fields
Tool call object
When the model wants to call a tool, the response includes atool_calls array: