@equos/core
v3.1.13
Published
Equos.ai core js library.
Downloads
1,151
Readme
@equos/core
Official TypeScript/JavaScript core library for the Equos.ai platform. Build AI-powered avatars, agents, characters, and real-time conversational experiences.
Features
- 🧠 Brains - Configure AI brain models (OpenAI, Gemini, etc.)
- 🎭 Characters - Define character personalities and behaviors
- 🎤 Voices - Integrate with ElevenLabs and other voice providers
- 📚 Knowledge Bases - Manage document knowledge bases
- 💬 Conversations - Handle real-time conversations
Installation
npm install @equos/coreor
yarn add @equos/coreor
pnpm add @equos/coreQuick Start
import { EquosClient } from '@equos/core';
// Initialize the client with your API key
const client = EquosClient.create('your-api-key-here');
// Check health
const health = await client.health.getHealth();
console.log('API Status:', health);
// List characters
const characters = await client.characters.listCharacters();
console.log('Available characters:', characters);API Reference
The SDK provides access to the following APIs through the EquosClient instance:
Available APIs
health- Check API health status- ``conversations` - Start and stop conversations.
characters- Create and manage charactersbrains- Manage brain configurationsfaces- Handle avatar facesvoices- Configure voice providersknowledgeBases- Manage knowledge bases and documents
Additional APIs
The SDK also exports additional APIs that can be instantiated directly:
ConversationApi- Handle conversations
Example:
import { EquosClient, AgentApi, Configuration } from '@equos/core';
const client = EquosClient.create('your-api-key');
const config = client['configuration']; // Access internal configuration
// Create additional API instances
const agentApi = new AgentApi(config);
const agents = await agentApi.listAgents();TypeScript Support
This package is written in TypeScript and includes full type definitions. All API methods, request parameters, and response types are fully typed.
import type { EquosBrain, CreateEquosBrainRequest } from '@equos/core';
const request: CreateEquosBrainRequest = {
name: 'My Brain',
// TypeScript will autocomplete available fields
};Error Handling
All API methods return promises that may reject with errors. Handle errors appropriately:
try {
const brain = await client.brains.createBrain({
createEquosBrainRequest: { /* ... */ }
});
} catch (error) {
if (error instanceof Error) {
console.error('API Error:', error.message);
}
// Handle error
}Development
Building
npm run buildGenerating API Client
The API client is auto-generated from OpenAPI specifications:
npm run generateThis will fetch the OpenAPI spec from the API and generate the TypeScript client code.
Linting
npm run lintRequirements
- Node.js 14+ or modern browser with ES6+ support
- TypeScript 5.0+ (for TypeScript projects)
License
ISC
Links
Author
Loïc Combis - LinkedIn
