WhoBuilt

Function Calling is All You Need

Apr 23, 2025· 1 h 43 min· 34K views·Watch on YouTube

Speaker

Ilan Bigio, on OpenAI’s developer experience team, leads a remote workshop for AI Engineer on function calling, agents, memory, delegation, and asynchronous workflows.

From text completion to function calling

Bigio traces the shift from GPT models that continued text to instruction-following models and assistants that could use external tools. He points to WebGPT in 2021 as an early example of a model producing search actions, and OpenAI’s general function calling launch in June 2023 as a broader step.

The function calling loop

Functions can fetch data, take actions, or manage workflows. The model proposes a function call and its arguments, but the application must parse and execute it, then return the result so the model can continue. Bigio recommends clear descriptions, intuitive behavior, examples, and enums or object structures that help prevent invalid calls.

Agents, memory, and delegation

Bigio describes a basic agent as a loop: call the model, execute requested tools, add their results to the conversation, and continue until there are no more calls. He builds a simple memory bank with functions to add and retrieve facts, then demonstrates delegation by having one model call another for a harder task.

Asynchronous tasks and routing

To keep a conversation responsive while work runs, Bigio creates background tasks with IDs and adds a function to check their status. Async calls let several network-bound tasks run in parallel, while a message queue prevents competing generations from using the same conversation history. For large tool libraries, he suggests trying groups of specialist agents or dynamically loading relevant functions, and says to use handoffs when evaluations show they are needed.

Generated tools and realtime examples

Bigio live-codes an agent that writes and adds Python tools, noting that executing generated code this way is unsafe and presenting it as an experiment. He also describes realtime API patterns: a function can let a voice assistant wait while a user continues speaking, and the API can handle asynchronous function calls while conversation continues. The phone demo does not work, but he explains how local and backend functions can be configured.

Takeaways

  • Treat function calling as a model-proposed action: your application still validates, executes, and returns the result.
  • Start agents with a simple loop and add frameworks or handoffs when your needs and evaluations justify them.
  • Keep conversations responsive by running network-bound work asynchronously and checking task status later.
  • For many functions, first try passing them together; if that fails, group or dynamically load relevant tools.
  • Never execute model-generated code directly in an application without a secure execution design.

Mentioned in this talk

Search inside this talk

What was claimed 4

  • works at
    Builds research tools (earlier: developer experience; joined as solutions architect)
    “I'm on the developer experience team at OpenAI.”
    YouTube
    Verified3 sources· Talk, Web· archived
  • uses
    “we trained a GPT-3 version of the model to use a very specific set of functions to do web search”
    YouTube
    Unverified1 source· Talk
  • feature
    Swarm: Supports conversation handoffs between agents
    “We have handoffs, which is the Swarm style: you take a conversation and fully swap it to a different agent.”
    YouTube
    Unverified1 source· Talk
  • feature
    OpenAI Realtime API: Allows asynchronous function calls while the conversation continues
    “the Realtime API natively allows asynchronous functions”
    YouTube
    Unverified1 source· Talk

Related talks