Skip to main content
The ExuluProvider constructor takes a single options object. This page documents every option, verified against the current @exulu/backend source.
ExuluProvider is the runtime class for defining model-backed agents in code. ExuluAgent is a separate TypeScript type that represents agent database rows — records created by administrators through the platform UI. You use ExuluProvider in your codebase; ExuluAgent appears in method signatures that receive a resolved agent record from the database.

Identity

id
string
required
Unique identifier. Used for database references and routing — never change it after data has been saved against it. Must start with a letter or underscore, contain only letters, digits, and underscores, and be at most 80 characters; treat 5 as the practical minimum.
name
string
required
Human-readable name shown in the platform UI. Also used to generate the provider’s slug (/agents/<slugified-name>/run).
description
string
required
What this provider does. Surfaced in the workbench and used as the tool description when the provider is exported via tool().
type
"agent"
required
Must be "agent". This is the only accepted value.
provider
string
required
The underlying LLM provider name, for example "anthropic", "openai", or "google". Exposed as the providerName getter and used in platform analytics.
Never change id after the provider has been used — it is stored as a foreign key in agent records and session history.

Model configuration

config
ExuluProviderConfig
The model configuration object, including the factory function, optional instructions, and optional memory context.
config.name
string
Display name for the model, for example "claude-sonnet-4-5". Exposed as the modelName getter and shown in the platform UI and analytics.
config.model
object
Factory object with a single create method that returns a Vercel AI-SDK LanguageModel. IMP calls create() with the resolved apiKey (from LiteLLM or an admin-set variable), the user ID, role, project, and agent UUID. Instantiate your provider SDK inside create so each call gets a fresh model instance.
config.model.create
function
({ apiKey, user, role, project, agent }) => LanguageModel — the factory. Source the API key from the apiKey argument (resolved by IMP at call time) rather than from a closure over process.env, so per-user or per-project key overrides work correctly.
config.instructions
string
Default system prompt for this provider. Administrators can override it per agent record in the workbench. IMP appends generic context (current date, user personalization, session file info) after your instructions at call time.
config.memory
string
Context ID of an ExuluContext to use as a memory store. When set, generateSync and generateStream run a hybrid search over the context before building the system prompt, injecting the top results as pre-fetched context. See ExuluContext.
config.model is optional in the type definition but required for any call to generateSync or generateStream — both throw "Config is required for generating." when this.config is undefined.

Capabilities

capabilities
object
Declares which input modalities the underlying model accepts. IMP uses this to decide whether to forward image parts, file parts, audio, and video in messages. When omitted, defaults to { text: false, images: [], files: [], audio: [], video: [] }.
capabilities.text
boolean
Whether the provider accepts text input. Set to true for all text-capable models.
capabilities.images
imageTypes[]
Image file extensions accepted by the model, for example [".png", ".jpg", ".jpeg", ".gif", ".webp"]. IMP forwards image attachments as image parts only when the extension appears here.
capabilities.files
fileTypes[]
Document file extensions accepted by the model. Non-image files are extracted to text via officeparser before being included in the prompt. Supported values include .pdf, .docx, .xlsx, .xls, .csv, .pptx, .ppt, .txt, .md, .json.
capabilities.audio
audioTypes[]
Audio file extensions accepted by the model. Supported values include .mp3, .wav, .m4a, .mp4, .mpeg.
capabilities.video
videoTypes[]
Video file extensions accepted by the model. Supported values include .mp4, .m4a, .mp3, .mpeg, .wav.

Context length

maxContextLength
number
Context-window size in tokens. Used by the context-budget guard in both generate methods — IMP blocks a request when the estimated occupancy of the message history exceeds a threshold derived from this value. When omitted, the budget guard uses a conservative default.

Workflows

workflows
ExuluProviderWorkflowConfig
Enables background workflow processing for this provider.
workflows.enabled
boolean
required
Whether workflows are enabled for this provider.
workflows.queue
Promise<ExuluQueueConfig>
Queue for workflow jobs. Requires an Enterprise Edition license.

Queue

queue
ExuluQueueConfig
Direct queue configuration for background agent runs, distinct from the workflows.queue. Accepted as an already-resolved config object (not a Promise), unlike workflows.queue.

Authentication information

authenticationInformation
string
Free-text description of how this provider authenticates, shown in the platform admin UI. For example: "Requires an OpenAI API key set via the OPENAI_API_KEY variable." This is purely informational — IMP does not parse it.

Complete example

Next steps

API reference

generateSync, generateStream, tool(), and all public properties.

ExuluApp

Register the provider on the app.