🔌Client API
Overview
An npm module that wraps the backend and engine APIs. It handles API calls and exposes the available methods with typed parameters and responses. Can be used on both the web and node/server side.
API Architecture
The Memori API consists of two main components:
Engine API (Swagger)
Manages sessions and dialogues;
Handles NLP features;
Processes conversational functionality.
Backend API (Swagger)
Manages users and assets;
Handles notifications;
Controls system administration.
Client Initialization
import memoriApiClient from "@memori.ai/memori-api-client";
// Initialize with default endpoints
const memori = memoriApiClient(
"https://backend.memori.ai", // API URL
"https://engine.memori.ai" // Engine URL
);Core Features
Session Management
Dialog Events
Advanced Features
Global State Management
Event Listeners
MemoriNewDialogState
You can listen to every message using the MemoriNewDialogState event and evaluate its content to trigger a reaction
Message Sending
Complete API Integration Example
Last updated