[ ABORT TO HUD ]
SEQ. 1

Threads, Runs & Tools

📦 Assistants API (Legacy) 18 min 250 BASE XP

The Legacy Stateful API

The Assistants API was OpenAI's first attempt at stateful AI infrastructure. While now superseded by the Responses API for new projects, many production systems still use it.

Core Concepts

  • Assistant: An AI entity with custom instructions, a model choice, and enabled tools.
  • Thread: A persistent conversation session. You add Messages to a Thread.
  • Message: Text or files added to a Thread by a user or Assistant.
  • Run: The execution of an Assistant on a Thread (asynchronous).

The Workflow

  1. Create an Assistant with instructions and tools.
  2. Create a Thread when a user starts a conversation.
  3. Add a User Message to the Thread.
  4. Create a Run to process the Thread.
  5. Poll or stream the Run status until complete.
  6. Retrieve the Assistant's response Messages.

Built-in Tools

ToolPurpose
File SearchRAG over uploaded files (up to 10,000 per Vector Store)
Code InterpreterPython sandbox for data analysis and file processing
Function CallingCustom tool execution via requires_action status
🚨 DEPRECATION (August 26, 2026): The Assistants API is officially deprecated and will be fully shut down on August 26, 2026. After this date, all requests to /v1/assistants, /v1/threads, and related endpoints will fail. Migrate to the Responses API and Conversations API immediately. Azure OpenAI users must migrate to Microsoft Foundry Agents.
SYNAPSE VERIFICATION
QUERY 1 // 3
How does the Assistants API differ from Chat Completions?
It doesn't support history
It is stateful — managing conversation history in Threads automatically
It requires SQL
It only remembers the last prompt
Watch: 139x Rust Speedup
Threads, Runs & Tools | Assistants API (Legacy) — OpenAI Academy