What is Function Calling?
Function calling lets large language models request the execution of external tools or functions by outputting structured data (usually JSON) instead of plain text.
The model is first given a list of available functions along with their names, descriptions, and expected parameters. When a user query requires external data or action, the model responds with a function call object rather than a normal answer.
The calling application then executes the requested function, returns the result to the model, and the model incorporates that result into its final response. This loop can repeat for multi-step tasks.
It turns a language model into the reasoning core of an agent that can safely interact with APIs, databases, or other software.
Example
A user asks "What's the weather in Paris?" The model outputs a structured call to a get_weather function with the argument city="Paris". The app runs the function, feeds the temperature back to the model, and the model replies with the current conditions.
Why it matters
Function calling is the key mechanism that lets today's LLMs move beyond chat to reliably control tools and become autonomous agents in real applications.
Frequently asked questions
Yes, the terms are often used interchangeably; function calling is the specific technique most LLM providers use to implement tool use.
Related terms
Tool Use (aka Function Calling) lets AI agents call external tools, APIs, or functions by outputting structured requests instead of just text.
ReAct is an agent prompting technique that interleaves explicit reasoning steps with tool-using actions so an LLM can dynamically plan, act, and observe results in a loop.
Agentic AI refers to AI systems that function as autonomous agents, capable of setting goals, making decisions, and taking actions to complete tasks with limited human input.
Agent memory is the component in AI agents that stores and retrieves information from past interactions, enabling recall of context, facts, or experiences to inform future actions.
An AI Agent (or Agent) is a software system that perceives its environment, reasons about goals, and takes actions autonomously to complete tasks.
An autonomous agent is an AI system that perceives its environment, makes decisions, and takes actions on its own to achieve goals without constant human oversight.