@evologicintel/elly-ai-sdk
v0.1.0
Published
Elly Integrator Chat SDK for calling elly.evologicintel.com integrator APIs.
Readme
@evologicintel/elly-ai-sdk
Node/Server SDK for Elly integrator chat APIs.
Install
npm i @evologicintel/elly-ai-sdkUsage (server-side)
Keep
clientSecreton your backend only (never in browser/mobile code).
import { createEllyAI } from "@evologicintel/elly-ai-sdk";
const ai = createEllyAI({
baseUrl: "https://elly.evologicintel.com/api",
clientKey: process.env.ELLY_CLIENT_KEY!,
clientSecret: process.env.ELLY_CLIENT_SECRET!,
model: "gemini-2.5-flash",
});
// Start a conversation
const started = await ai.startChat({
prompt: "Yessir",
promptDate: "2025-10-19T08:30:00",
data: {
"company-profile": { name: "Petra's Diner" },
items: [{ id: 1, name: "Margherita Pizza", price: 9.99 }],
// Integrators can send any keys/values here
anything: { custom: true },
},
});
if (!started.ok) throw new Error(`Chat failed: ${started.status}`);
// Continue the conversation
const conversationId = started.conversationId!;
const next = await ai.sendMessage({
conversationId,
prompt: "What are our business hours?",
// data is optional on follow-ups (omit it if you already sent context in startChat)
});
// Archive (optional)
await ai.archiveChat({ conversationId });
// End chat (alias of archiveChat)
await ai.endChat({ conversationId });What headers are sent
The SDK automatically attaches:
X-Chat-ModelX-Client-KeyX-Client-Secret
API routes used
POST /integrator/chatPOST /integrator/chat/:conversationIdPOST /integrator/chat/:conversationId/archive
