Skip to main content

OPENAI_ASSISTANT

Create or reuse an OpenAI assistant. If cfg.assistantId is provided the assistant will be retrieved; otherwise a new assistant is created. The created or retrieved assistant is written to the flow context.

At a glance

  • Category LLM
  • Version: 1.0.9
  • Applications: all
  • Scope: all
  • Default Service: OPENAI_COMPLETION

Config Options

NameDescriptionDefaultRequiredResolvedConstraintsConditional Rules
assistantIdIf provided, load the assistant with this ID instead of creating a new one.NonefalsefalseNoneNone
reuseIf true and storeIn is provided, try to reuse a persisted assistant id.NonefalsefalseNoneNone
storeInStorage location for persisting assistant id: page/session/browser.NonefalsefalseNoneNone
instructionInitial instructions / system prompt for the assistant (supports templates).NonefalsetrueNoneNone
modelModel to use when creating the assistantNonefalsefalseNoneNone

Outputs

TypeDescriptionOptional
assistantCreated/retrieved assistant objectfalse

Examples

Load an existing assistant

- step: OPENAI_ASSISTANT
assistantId: asst_Ja0fm7Rova3QJGbKrAKrt7HS

Create an assistant and persist it

- step: OPENAI_ASSISTANT
instruction: "Be concise and formal"
model: "gpt-4o"
reuse: true
storeIn: "session"

See Also

General Resources: