npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

omnilink-web

v0.2.0

Published

OmniLink Web Client SDK — integrate OmniLink AI agents into any web application

Readme

omnilink-web

OmniLink Web Client SDK — integrate OmniLink AI agents into any web application.

This is the browser/TypeScript counterpart to the Python omnilink-lib package, providing a typed client for every OmniLink REST endpoint.

Install

# From npm (when published)
npm install omnilink-web

# Or install from source
git clone https://github.com/omnilink/omnilink
cd omnilink/omnilink-web
npm install && npm run build && npm link

Get Your Omni Key

Before using the SDK you need an Omni Key (omk_...). Generate one with a single click:

Get your Omni Key

Sign in (or create a free account) and click Generate API key. Copy the key — you will need it for every API call.

Quick Start

import { OmniLinkClient } from 'omnilink-web';

const client = new OmniLinkClient({ omniKey: 'omk_...' });

// Chat
const reply = await client.chat({
  agentName: 'assistant',
  prompt: 'What is 2 + 2?',
});
console.log(reply.text);

API Reference

new OmniLinkClient(config)

| Option | Type | Default | |------------|----------|--------------------------------------| | omniKey | string | required | | baseUrl | string | https://www.omnilink-agents.com | | timeout | number | 30000 (ms) | | headers | object | {} |

Chat

// Simple chat
const reply = await client.chat({
  agentName: 'my-agent',
  prompt: 'Hello!',
  engine: 'g4-engine', // g1 = Gemini, g2 = GPT-5, g3 = Grok, g4 = Claude
});

// Streaming chat (async iterable)
for await (const chunk of client.chatStream({ agentName: 'my-agent', prompt: 'Tell me a story' })) {
  process.stdout.write(chunk.text);
  if (chunk.done) break;
}

// Multi-turn with messages array
const reply = await client.chat({
  agentName: 'tutor',
  messages: [
    { role: 'user', content: 'What is gravity?' },
    { role: 'assistant', content: 'Gravity is a force...' },
    { role: 'user', content: 'How does it work on the Moon?' },
  ],
});

Speech-to-Text

// From a Blob (e.g., from MicrophoneRecorder)
const result = await client.transcribe(audioBlob);
console.log(result.text);

// With options
const result = await client.transcribe(audioBuffer, {
  mimeType: 'audio/mp4',
  language: 'fr',
});

Text-to-Speech

// Get raw response with base64 audio
const tts = await client.synthesize('Hello world');

// Get audio as a Blob
const blob = await client.synthesizeToBlob('Hello world');

// Synthesize and play immediately
await client.synthesizeAndPlay('Hello world', {
  languageCode: 'en-US',
  speakingRate: 1.2,
});

Translation

const result = await client.translate('Bonjour le monde', {
  targetLanguage: 'English',
});
console.log(result.translation);

Memory Management

// List agents with memory status
const { agents, memoryAgents } = await client.listAgents();

// Get conversation history
const memory = await client.getMemory('my-agent');

// Set conversation history
await client.setMemory('my-agent', [
  { role: 'user', parts: [{ text: 'Hello' }] },
  { role: 'model', parts: [{ text: 'Hi there!' }] },
]);

// Clear memory
await client.clearMemory('my-agent');

Agent Profiles

const profiles = await client.listProfiles();

const profile = await client.createProfile('door-controller', {
  settings: { autoLock: true },
});

await client.updateProfile(profile.id, { name: 'smart-lock' });

await client.deleteProfile(profile.id);

Other Endpoints

// Service config
const config = await client.getConfig();

// Usage stats
const usage = await client.getUsage({ limit: 50 });

// Feedback
await client.sendFeedback({ response: 'Great answer!', command: 'hello' });

Audio Module (opt-in)

The audio module provides browser-specific helpers for microphone recording and audio playback. It is a separate entry point to keep the core SDK lean.

import { MicrophoneRecorder, AudioPlayer } from 'omnilink-web/audio';

// Record from microphone
const recorder = new MicrophoneRecorder();
await recorder.start();
// ... user speaks ...
const blob = await recorder.stop();

// Play audio
const player = new AudioPlayer();
await player.playBlob(blob);
await player.playBase64(base64Data);
player.stop();
player.destroy();

React Hooks

See demos/react/ for a complete React app with custom hooks:

import { useOmniLink } from './hooks/useOmniLink';
import { useChat } from './hooks/useChat';
import { useAudioRecorder } from './hooks/useAudioRecorder';

function App() {
  const client = useOmniLink('omk_...');
  const { messages, isLoading, send } = useChat(client, {
    agentName: 'assistant',
    engine: 'g2-engine',
  });
  const { isRecording, start, stop } = useAudioRecorder();

  // ... render chat UI ...
}

Demos

| Demo | Path | Description | |------|------|-------------| | Vanilla Chat | demos/vanilla/index.html | Single-file chat demo with zero dependencies | | Vanilla Audio | demos/vanilla/audio.html | STT/TTS demo with mic recording and playback | | Robot Control | demos/vanilla/robot.html | 2D robot simulator with AI navigation + LIDAR | | React App | demos/react/ | Full React app with hooks for chat, STT, and profiles |

Running Demos Locally

# Build the SDK first
cd omnilink-web
npm install
npm run build

# Vanilla demos — open in browser
open demos/vanilla/index.html

# React demo
cd demos/react
npm install
npm run dev

Python ↔ TypeScript Method Mapping

| Python (omnilink-lib) | TypeScript (omnilink-web) | |---|---| | chat(prompt, agent_name=...) | chat({ agentName, prompt }) | | list_profiles() | listProfiles() | | create_profile(name, settings=...) | createProfile(name, { settings }) | | update_profile(profile_id, ...) | updateProfile(profileId, { ... }) | | delete_profile(profile_id) | deleteProfile(profileId) | | list_agents() | listAgents() | | get_memory(agent_name) | getMemory(agentName) | | set_memory(agent_name, conversation) | setMemory(agentName, conversation) | | clear_memory(agent_name) | clearMemory(agentName) | | transcribe(audio, mime_type=...) | transcribe(audio, { mimeType }) | | synthesize(text, ...) | synthesize(text, { ... }) | | synthesize_to_bytes(text) | synthesizeToBlob(text) | | translate(text, target_language=...) | translate(text, { targetLanguage }) | | (no equivalent) | chatStream(options) | | (no equivalent) | synthesizeAndPlay(text) |

Build

npm run build       # Build ESM + CJS + declarations
npm run dev         # Watch mode
npm run typecheck   # Type-check without emitting

License

MIT