@tech-xon/aura-ai-sdk
v0.1.0
Published
Universal Headless JavaScript/TypeScript SDK for Aura AI with MCP tool integration
Maintainers
Readme
@tech-xon/aura-ai-sdk
Core TypeScript Client SDK for Aura AI with built-in Model Context Protocol (MCP) over WebSockets, tool registry, session context, and REST history synchronization.
📦 Installation
npm install @tech-xon/aura-ai-sdk🚀 Quickstart
import { AuraClient } from '@tech-xon/aura-ai-sdk';
const client = new AuraClient({
serverUrl: 'wss://aura.example.com/ws',
apiKey: 'jrv_live_...',
agentId: '5e37e635-e721-476a-a4db-ff55d33fae15',
sessionHash: 'user_session_abc123',
sessionContext: {
user: { id: 'cust_101', name: 'TechXon Global', plan: 'Enterprise' },
activeVehicle: 'PAJ GPS Allrounder 4G'
}
});
// Subscribe to streaming events
client.onStream((event) => {
if (event.type === 'token') {
process.stdout.write(event.data);
}
});
// Send a user message
client.sendMessage('¿Cuál es mi plan y mi vehículo activo?');🧠 Session Context & Tools
The SDK automatically registers the getSessionContext tool via MCP. When the LLM needs user or app details, it retrieves them on demand:
// Query current context
const currentContext = client.getSessionContext();
// Update a specific key in real time
client.updateSessionContext('activeVehicle', 'PAJ Easy Finder 4G');
// Replace the entire context
client.setSessionContext({ ...newContext });🛠️ Registering Custom Client Tools
Allow JARVIS to invoke client-side functions in the browser or Node.js environment:
client.registerTool({
name: 'getUserLocation',
description: 'Obtiene las coordenadas GPS actuales del navegador',
execute: async () => {
return { lat: 52.5200, lng: 13.4050, accuracy: 'high' };
}
});📄 License
MIT © JARVIS Team
