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

@owllayer/vue

v0.4.0

Published

OwlLayer Vue SDK - Composables et Plugin pour UI Agentique

Readme

@owllayer/vue

npm version npm downloads License: MIT TypeScript strict

Vue 3 SDK for OwlLayer AI. Build Agentic UI applications with Vue composables, components, real-time voice mode, dynamic tool registration, and Human-in-the-Loop (HITL) security.


Features

  • OwlLayerPlugin: Vue 3 plugin managing reactive state, WebSocket connection, and session lifecycle.
  • useAgentTool: Register reactive frontend tools directly within Vue components (auto-registered on mount, unregistered on unmount).
  • useVoiceMode: Integrated microphone capture, PCM streaming, voice activity detection, and interrupt handling.
  • OwlLayerWidget: Turnkey floating or embedded AI chat/voice assistant widget.
  • Human-in-the-Loop (HITL): Built-in ApprovalModal and ApprovalBanner Vue components for sensitive tool execution.
  • Specialized Composables: useNavigationTool, useViewStateTool, useAgentContext, useOwlLayerEvent.

Installation

# pnpm
pnpm add @owllayer/vue @owllayer/core vue

# npm
npm install @owllayer/vue @owllayer/core vue

# yarn
yarn add @owllayer/vue @owllayer/core vue

Quick Start

1. Setup the Plugin

Install OwlLayerPlugin in your Vue app entrypoint:

import { createApp } from 'vue';
import { OwlLayerPlugin } from '@owllayer/vue';
import App from './App.vue';

const app = createApp(App);

app.use(OwlLayerPlugin, {
  endpoint: 'ws://localhost:3001/owllayer',
  apiKey: 'pk_dev_xxxx',
});

app.mount('#app');

2. Embed the Widget

In your root template (App.vue):

<template>
  <router-view />
  <OwlLayerWidget agent-name="Léa" agent-title="Assistant" />
</template>

<script setup lang="ts">
import { OwlLayerWidget } from '@owllayer/vue';
</script>

3. Declare Client Tools (useAgentTool)

Tools declared with useAgentTool are available to the AI only while the component is mounted:

<template>
  <div :class="['product-card', { highlighted: isHighlighted }]">
    <h2>{{ product.name }}</h2>
    <p>{{ product.price }} €</p>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useAgentTool } from '@owllayer/vue';

const props = defineProps<{
  product: { id: string; name: string; price: number };
}>();

const isHighlighted = ref(false);

useAgentTool({
  name: 'highlight_product',
  description: 'Highlight the currently viewed product',
  parameters: {
    type: 'object',
    properties: {
      color: { type: 'string' },
    },
  },
  risk: 'none',
  handler: async () => {
    isHighlighted.value = true;
    return { success: true };
  },
});
</script>

4. Voice Mode (useVoiceMode)

<template>
  <div>
    <p>Voice State: {{ voiceState }}</p>
    <button @click="isCapturing ? stopVoice() : startVoice()">
      {{ isCapturing ? 'Stop Talking' : 'Start Voice' }}
    </button>
  </div>
</template>

<script setup lang="ts">
import { useVoiceMode } from '@owllayer/vue';

const { voiceState, isCapturing, startVoice, stopVoice } = useVoiceMode();
</script>

Core Composables & Components

Composables

| Composable | Purpose | |---|---| | useAgent() | Access global agent reactive state (idle, thinking, speaking), session ID, and send messages. | | useAgentTool(definition) | Register a client-side tool with the server. | | useVoiceMode() | Full microphone capture and audio playback control. | | useAgentContext(key, data) | Sync local component state into the AI's shadow context. | | useNavigationTool() | Expose Vue router navigation actions to the AI. | | useApproval() | Manage pending HITL approval requests. |

Components

| Component | Description | |---|---| | <OwlLayerWidget /> | Ready-to-use floating chat and voice assistant widget. | | <ApprovalModal /> | Modal overlay for confirming high-risk actions. | | <ApprovalBanner /> | Non-blocking top banner for HITL confirmation. | | <AgentIndicator /> | Visual indicator showing agent status and voice activity. |


License

MIT © OwlLayer