OpenAI

Function calling · Assistants API · Swarm (experimental)

Vendor · API3 patterns
In Plain English

This page shows every pattern that OpenAI has published or written about — 3 in total. Each one includes a simple picture of how it works, a short explanation, an example of when to use it, and its trade-offs (the good parts and the not-so-good parts).

Reading patterns from one source at a time matters because it lets you see how a single company or team thinks about building AI agents, and compare their ideas side by side. If a pattern here also appears in the bigger Deep Catalogue, you will see a link so you can read the full, detailed version.

An open reference book with a pencil in the fold under warm lamp light

2D.01Function Calling

FUNCTION CALLING Prompt + Functions Model Call JSON Execute Continue

Structured tool invocation via declared JSON schemas — the canonical contract for OpenAI tool-using agents.

Use caseAny OpenAI-based agent calling tools.
Trade-offsWide ecosystem support · Tied to OpenAI schema conventions.

See 1C.02, 1D.09

2D.02Assistants API (Threads + Runs)

ASSISTANTS API Threadmessages over time Runone agent turn Stepstool calls · messages

Stateful conversations with persisted threads, tool runs, and file retrieval.

Use caseLong conversations, document Q&A, persistent assistants.
Trade-offsManaged state · Tied to OpenAI Assistants service.

2D.03OpenAI Swarm

OPENAI SWARM Entry Agenttransfer_to() Agent B Agent C Agent D

Experimental lightweight multi-agent framework: agents hand off to other agents via a simple transfer mechanism.

Use casePrototyping multi-agent systems with minimal framework weight.
Trade-offsMinimal overhead · Experimental; limited features.

See 1B.09