yaver-sdk
v0.2.0
Published
Yaver SDK — embed P2P AI agent connectivity into your apps (React Native, Node.js, Browser)
Maintainers
Readme
yaver-sdk
Embed Yaver's P2P AI agent connectivity into your JavaScript/TypeScript applications. Works in React Native, Node.js, and browsers.
Install
npm install yaver-sdkQuick Start
import { YaverClient } from 'yaver-sdk';
const client = new YaverClient('http://localhost:18080', 'your-auth-token');
// Create a task
const task = await client.createTask('Fix the login bug');
console.log(`Task ${task.id} created`);
// Stream output
for await (const chunk of client.streamOutput(task.id)) {
process.stdout.write(chunk);
}
// List all tasks
const tasks = await client.listTasks();Features
- Task management: create, list, get, stop, delete, continue tasks
- Async streaming:
for awaitoutput streaming - Auth client: validate tokens, list devices, manage settings
- Speech-to-text: transcribe audio via OpenAI, Deepgram, AssemblyAI
- Verbosity control: set response detail level 0-10
- Full TypeScript types: all types exported
- Works everywhere: React Native, Node.js 18+, modern browsers
Auth Client
import { YaverAuthClient } from 'yaver-sdk';
const auth = new YaverAuthClient('your-token');
const user = await auth.validateToken();
const devices = await auth.listDevices();Speech
import { transcribe } from 'yaver-sdk';
const result = await transcribe(audioUri, 'openai', 'sk-...');
console.log(result.text);