axium-engine
v1.0.0
Published
Axium Engine — Multi-AI orchestration, consensus detection, and cost-optimized routing. 5 lines of code.
Downloads
123
Maintainers
Readme
@axium/engine
Multi-AI orchestration, consensus detection, and cost-optimized routing in a single WebAssembly-powered SDK.
Quick Start
const { loadEngine } = require("@axium/engine");
const engine = await loadEngine();
engine.initialize(licenseKey, bundleId, BigInt(Date.now()));
const score = engine.calculateSimilarity(responseA, responseB);
const agreement = engine.determineAgreement(score);
console.log(`Consensus: ${agreement} (${score})`);Features
- Multi-AI Orchestration -- Route queries across AI providers with built-in failover.
- Consensus Detection -- Compare responses from multiple models and detect agreement.
- Cost-Optimized Routing -- Track and minimize spend across providers.
- Hallucination Detection -- Flag contradictions and classify severity.
- Response Deduplication -- Ensure diverse outputs when querying multiple models.
- Semantic Analysis -- Compute similarity, categorize facts, and determine agreement.
- Usage Metering -- Track sessions and enforce license limits.
- WebAssembly Core -- 52KB engine, no native dependencies, runs everywhere Node runs.
Requirements
- Node.js 18 or later
- A valid Axium Engine license key from engine.axisradiustechnologies.com
API Reference
Initialization
| Function | Description |
|---|---|
| loadEngine() | Load the WASM engine. Returns a Promise. |
| engine.initialize(licenseKey, bundleId, timestamp) | Activate the engine with your license. |
| engine.resetEngine() | Reset engine state. |
| engine.getEngineStatus() | Get current engine status string. |
License Management
| Function | Description |
|---|---|
| isLicenseValid() | Check if the current license is valid. |
| getLicenseTier() | Get the license tier (free, pro, enterprise). |
| getCustomerId() | Get the customer ID from the license. |
| getLicenseExpiration() | Get license expiration as a BigInt timestamp. |
| getMaxSessions() | Get the maximum allowed concurrent sessions. |
| isLicenseExpired(timestamp) | Check if the license has expired. |
Consensus and Similarity
| Function | Description |
|---|---|
| calculateSimilarity(textA, textB) | Compare two strings and return a similarity score (0-1). |
| calculateSimilarityJSON(text, comparisons) | Batch similarity comparison returning JSON results. |
| computeSemanticSimilarity(textA, textB) | Semantic-level similarity analysis. |
| determineAgreement(score) | Classify a similarity score as agreement level. |
| categorizeFact(text) | Categorize a text fragment by fact type. |
Deduplication
| Function | Description |
|---|---|
| getDifferentiationPrompt(position, total, mode, previous) | Generate a prompt that ensures diverse responses. |
| getModeEnhancement(mode) | Get mode-specific prompt enhancement text. |
| getRetryPrompt(duplicates) | Generate a retry prompt to avoid duplicate responses. |
Hallucination Detection
| Function | Description |
|---|---|
| classifySeverity(contradictions, totalProviders, flags) | Classify hallucination severity. |
Cost Tracking
| Function | Description |
|---|---|
| formatCost(cost) | Format a cost value for display. |
| formatTokens(tokens) | Format a token count for display. |
Usage Metering
| Function | Description |
|---|---|
| meterSession(sessionId) | Record a session for metering. Returns false if limit exceeded. |
| getUsageCount() | Get the current usage count. |
Documentation
Full documentation, integration guides, and examples at engine.axisradiustechnologies.com.
License
Proprietary. Copyright 2026 Axis Radius Technologies LLC. All rights reserved. Protected by 66 patent applications across 16 patent families. See LICENSE for terms.
