Skip to main content
Version: 3.0

Elara Chat

Elara is Operaide's built-in chat interface. It gives end users a ready-to-use UI for interacting with AI models — without requiring you to build a custom frontend. As a developer, you make your Reaktors available in Elara by registering them as chat-compatible.

How It Works

Elara connects three things:

  1. Models — AI providers configured by the administrator (OpenAI, Anthropic, Azure, Google, Mistral, etc.)
  2. Chat-compatible Reaktors — your custom Reaktors registered with registerChatReaktorDefinition
  3. The Chat UI — a streaming chat interface with conversation history, file attachments, and model selection

When a user sends a message, Elara routes it through the selected model's Reaktor via an OpenAI-compatible REST API. Responses are streamed back in real time using Server-Sent Events (SSE).

Making a Reaktor Available in Elara

Any Reaktor registered with registerChatReaktorDefinition automatically appears as a selectable model in Elara. The LLM Calls chapter covers this in detail — here is the minimal example:

import { aktorAICall, aktorAISettingProviderModel, aktorPatchMessages, registerChatReaktorDefinition } from '@operaide/ai';
import { aktorSetting, createAktorComposition } from '@operaide/aktor';
import { z } from 'zod';

const aktorMyChatAssistant = createAktorComposition('aktorMyChatAssistant', ({ messages }) => {
const systemPrompt = aktorSetting(
z.string().describe('[textarea]System Prompt'),
'You are a helpful assistant.',
'System Prompt'
);
return aktorAICall({
messages: aktorPatchMessages({ messages, system: systemPrompt }),
providerModel: aktorAISettingProviderModel(),
});
});

registerChatReaktorDefinition({
reaktorDefinitionId: 'my-chat-assistant',
label: 'My Chat Assistant',
description: 'A simple chat assistant',
aktor: aktorMyChatAssistant,
});

Once deployed as part of an App, this Reaktor shows up in the Elara model selector alongside the base AI models.

Base Models vs. Custom Reaktors

Elara distinguishes two categories in the model selector:

  • Base Models — direct access to AI providers (e.g. GPT-4, Claude). These are configured by the administrator and appear with the provider's icon.
  • Custom Reaktors — your chat-compatible Reaktors. These can add system prompts, tools, RAG pipelines, or any other logic before calling the underlying AI model.

Features

Model Selection

Users can switch between available models at any point. The selected model is persisted in the URL (?model=...), making it shareable.

Streaming Responses

All chat completions are streamed by default. The UI renders tokens as they arrive, giving immediate feedback. Users can abort a running response at any time.

File Attachments

Users can attach files (PDF, DOC, DOCX, TXT, JPG, PNG) to their messages. Files are converted to base64 and sent as FilePart content alongside the text message.

Conversation History

Conversations are automatically saved per organization. Users can:

  • Browse previous conversations
  • Search by keyword
  • Resume any past conversation
  • Rename conversations for easier retrieval

Speech-to-Text

On mobile devices, users can dictate messages using the built-in speech recognition button.

Theming

Elara adapts to the organization's theme settings configured in the Theme Editor, ensuring visual consistency with the rest of the platform.

REST API

Elara communicates with the backend through an OpenAI-compatible REST API under /api/v2/operaide/. All endpoints require authentication via the x-Api-Key header.

MethodEndpointPurpose
GET/modelsList available models and Reaktors
POST/chat/completionsSend a message (set x-stainless-helper-method: stream for SSE)
GET/conversation?conversationId=XFetch a conversation
POST/conversationCreate a new conversation
PUT/conversationUpdate conversation messages
GET/conversationsList conversations (supports ?searchTerm=X)

Because the API follows the OpenAI chat completions format, you can also use it from external tools or scripts that speak the OpenAI protocol.

Permissions

Elara access is controlled by the permToUseElara permission, which is granted to all organization members by default. Administrators can restrict access through the permission system.