Back to course

Introduction to Function Calling

Agentic AI Engineering (Build, don't just prompt)

The Bridge to Reality

Function calling allows an LLM to request the execution of specific Python functions. This is how agents interact with the real world (searching the web, sending emails).

The Workflow:

  1. Define a JSON schema for your tool.
  2. Pass the schema to the LLM.
  3. LLM returns 'arguments' if it needs the tool.
  4. You execute the Python code and send back the result.