An Assistant is a configured AI entity with a model, instructions, and optional tools. It operates on ThreadsClient (conversations) by creating Runs that execute the assistant's logic.
Create an assistant: client$assistants$create(model, instructions, tools)
Create a thread: client$threads$create()
Add a user message: client$threads$messages$create(thread_id, "user", "...")
Create a run: client$threads$runs$create(thread_id, assistant_id)
Poll the run until status is "completed"
Read the assistant's reply: client$threads$messages$list(thread_id)
new()AssistantsClient$new(parent)
create()AssistantsClient$create(
model,
name = NULL,
description = NULL,
instructions = NULL,
tools = NULL,
tool_resources = NULL,
metadata = NULL,
temperature = NULL,
top_p = NULL,
response_format = NULL
)
list()AssistantsClient$list(limit = NULL, order = NULL, after = NULL, before = NULL)
retrieve()AssistantsClient$retrieve(assistant_id)
update()AssistantsClient$update(assistant_id, ...)
delete()AssistantsClient$delete(assistant_id)
clone()The objects of this class are cloneable with this method.
AssistantsClient$clone(deep = FALSE)deepWhether to make a deep clone.
Client for the OpenAI Assistants API v2 (Beta).
Assistants are AI agents that can use tools (code interpreter,
file search, custom functions) and maintain persistent state.
Access via client$assistants.