AIOS SDKs
Official SDKs for integrating AIOS into your applications.
Node.js SDK
@nextriad/aios
Full-featured SDK for Node.js and TypeScript applications. Includes agents, workflows, and knowledge base management.
npm install @nextriad/aiosBrowser SDK
@nextriad/aios-browser
Lightweight SDK for web applications. Includes chat widget, event tracking, and client API.
<script src="cdn.aios.nextriad.ai/aios.min.js"></script>Quick Start
Node.js Example
import { AIOSClient } from '@nextriad/aios';
const client = new AIOSClient({
apiKey: process.env.AIOS_API_KEY,
tenantId: 'your-tenant-id',
});
// Chat with an agent
const response = await client.agents.chat('agent_123', 'Hello!');
console.log(response.content);
// Search knowledge base
const results = await client.knowledge.search('kb_456', 'product features');
console.log(results);
// Run a workflow
const run = await client.workflows.run('workflow_789', {
input: { email: 'user@example.com' }
});Chat Widget
Embed a Chat Widget
<script src="https://cdn.aios.nextriad.ai/aios.min.js"></script>
<script>
AIOS.createWidget({
apiKey: 'your-api-key',
tenantId: 'your-tenant-id'
}, {
agentId: 'agent_123',
position: 'bottom-right',
theme: 'light',
welcomeMessage: 'Hello! How can I help you today?',
styles: {
primaryColor: '#6366f1'
}
});
</script>