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
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.
Human-readable name shown in the platform UI. Also used to generate the provider’s
slug (/agents/<slugified-name>/run).What this provider does. Surfaced in the workbench and used as the tool description when the provider is exported via
tool().Must be
"agent". This is the only accepted value.The underlying LLM provider name, for example
"anthropic", "openai", or "google". Exposed as the providerName getter and used in platform analytics.Model configuration
The model configuration object, including the factory function, optional instructions, and optional memory context.
Display name for the model, for example
"claude-sonnet-4-5". Exposed as the modelName getter and shown in the platform UI and analytics.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.({ 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.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.
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
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: [] }.Whether the provider accepts text input. Set to
true for all text-capable models.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.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.Audio file extensions accepted by the model. Supported values include
.mp3, .wav, .m4a, .mp4, .mpeg.Video file extensions accepted by the model. Supported values include
.mp4, .m4a, .mp3, .mpeg, .wav.Context length
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
Enables background workflow processing for this provider.
Whether workflows are enabled for this provider.
Queue for workflow jobs. Requires an Enterprise Edition license.
Queue
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
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.