Integration guide · SDK CERVEAU
Embed ELYSÉA.
Six steps. Nothing to configure on the ethics side.
Your LLM, your infrastructure, your UX. ELYSÉA inserts itself as a relational protection layer: the four prohibitions and AI Act-required logs and architecture are included automatically — no ethical rule to code, no extra layer to maintain.
What you will not write
Inherited from the pipeline.
Not recoded in your app.
Guardian SDK
Detection and blocking of the 4 prohibitions — active at every pipeline.run() call.
Crisis orientation
Crisis orientation (emergency numbers, de-escalation) — non-deactivatable, firm_safety built in.
AI Act logs
HMAC-SHA256 signed timestamped logs emitted automatically. 6-month retention by architecture.
User memory
M1–M6 persisted Core-side. Your app reads the consented synthesis — not the raw items.
Step-by-step integration
01Builder key
Create your app in the developer portal and get your sk_test_ key immediately — no credit card, capped at 1,000 MAU. The sk_live_ key requires individual review (24-72h): that is what guarantees ecosystem integrity.
Developer portal → 02Installation
One package. A sk_test_ key is required to call the API — get it immediately via the developer portal, no credit card needed. BYOK mandatory from trial: you bring your own key (OpenAI, Mistral, Gemini, or Claude). LLM tokens are billed directly by your provider.
bash
npm install @elysea/core
# sk_test_ key required — developer portal
Developer portal → 03Client initialisation
Three parameters: your key, your appId, the EU region (required — classifiers on EU infrastructure). BYOK: LLM tokens remain your responsibility — ELYSÉA has no access to your model keys.
typescript
import { createElyseaClient } from '@elysea/core';
const elysea = createElyseaClient({
baseUrl: process.env.ELYSEA_BASE_URL!,
auth: {
apiKey: process.env.ELYSEA_API_KEY!,
apiSecret: process.env.ELYSEA_API_SECRET!,
},
appId: process.env.ELYSEA_APP_ID!,
countryCode: 'GB',
region: 'EU',
});
04Identity resolution
ELYSÉA derives an anonymised coreUserId from your JWT. You never transmit the user's email or real data. Memory and cross-app continuity work on this coreUserId.
typescript
// From your auth middleware
const { coreUserId } = await elysea.identity.resolve({
userJwt: req.headers.authorization,
});
// coreUserId → anonymised internal identifier
// Never the email, never PII data
05First pipeline call
One call — the complete pipeline: signal interpretation, Guardian check, generation, ethical post-processing. The 4 prohibitions are active. Nothing to configure.
typescript
const result = await elysea.pipeline.run({
userInput: userMessage,
coreUserId,
conversationHistory: previousMessages, // optional
});
// result.response → compliant response, ready to display
// result.posture → applied posture (present_neutral, firm_safety…)
// result.guardianAction → 'pass'|'warn'|'block'
// result.canonConformance → boolean
06Trust-mark
Once your app is active, the "Powered by ELYSÉA" badge is available. It tells your users that the 4 prohibitions are active and that AI Act-required logs and architecture are included. Mandatory display — non-removable by configuration.
Understanding the trust-mark →
Full example
Integration in 30 lines.
Copy this file into your project — it is a complete functional integration.
typescript
// elysea.ts — ELYSÉA CERVEAU integration
import { createElyseaClient, type PipelineResult } from '@elysea/core';
const elysea = createElyseaClient({
baseUrl: process.env.ELYSEA_BASE_URL!,
auth: {
apiKey: process.env.ELYSEA_API_KEY!,
apiSecret: process.env.ELYSEA_API_SECRET!,
},
appId: process.env.ELYSEA_APP_ID!,
countryCode: 'GB',
region: 'EU',
});
type Message = { role: 'user' | 'assistant'; content: string };
export async function chat(
userJwt: string,
message: string,
history: Message[] = [],
): Promise<PipelineResult> {
// 1. Anonymised identity — never the email
const { coreUserId } = await elysea.identity.resolve({ userJwt });
// 2. Cognitive pipeline — 4 prohibitions active, nothing to configure
const result = await elysea.pipeline.run({
userInput: message,
coreUserId,
conversationHistory: history,
});
// result.response → response ready to display
// result.posture → applied runtime posture
// result.guardianAction → 'pass'|'warn'|'block'
// result.canonConformance → boolean
return result;
}
// In your API handler:
// const result = await chat(req.headers.authorization, req.body.message, history);
// res.json({ reply: result.response });
SDK Monotonicity
You can tighten.
Never loosen.
If your use case requires it — medical sector, minors, professional context — you can add additional constraints via SDK extensions. Any attempt to disable a base prohibition (keys disableDominationCheck, suppressSafety, etc.) immediately triggers a SdkProhibitionError — the request is rejected before execution.
typescript
// Extension — adding a sector constraint (medical)
const elysea = createElyseaClient({
baseUrl: process.env.ELYSEA_BASE_URL!,
auth: {
apiKey: process.env.ELYSEA_API_KEY!,
apiSecret: process.env.ELYSEA_API_SECRET!,
},
appId: process.env.ELYSEA_APP_ID!,
countryCode: 'GB',
region: 'EU',
extensions: [{
checkOutput: (text, ctx) => {
// Additional constraint: block any medical claim
if (containsMedicalDiagnosis(text)) {
return [{ pilier: 'substitution', action: 'block', detail: 'medical_claim' }];
}
return [];
}
}]
// The 4 base prohibitions remain active — non-modifiable
});
// Prohibited — triggers SdkProhibitionError:
// disableDominationCheck: true → P1_D0_OVERRIDE_ATTEMPT
// suppressSafety: true → P3_SAFETY_GATE_BYPASS_ATTEMPT
// bypassGuardian: true → P4_NON_CONFORM_LLM_SIGNATURE
sk_test_ sandbox key via developer portal.
Pipeline active from the first call.