Ask your agent
The chip that asks: a tap hands the question to your own agent in the Dock, with this page's context, and it never sends for you.
kit.askAgent()- 1.5 KB of CSS · 38 rules
- kit.css
- the shared navbar for its behaviour
Use it
On your server
const kit = require('openvibe-shared/kit');
const html = kit.askAgent({ text: 'About this stream: Seattle at night' })
+ kit.askAgent({ text: 'What is in this clip?', label: 'Ask about this clip' });In a page that draws itself
<link rel="stylesheet" href="https://openvibe.network/shared/kit.css">
<script src="https://openvibe.network/shared/kit.js"></script>
<script>
const box = document.querySelector('#here');
box.innerHTML = OpenVibeKit.askAgent({ text: 'About this stream: Seattle at night' })
+ OpenVibeKit.askAgent({ text: 'What is in this clip?', label: 'Ask about this clip' });
OpenVibeKit.enhance(box);
</script>The HTML it returns · 787 B
<button class="ovk-ask ovk-btn ovk-btn--quiet ovk-btn--small" type="button" data-ov-ask="About this stream: Seattle at night"><svg class="ovk-i" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M10.4 3.6l1.7 4.8L17 10.1l-4.8 1.7L10.4 16.7l-1.7-4.8L3.9 10.1l4.8-1.7ZM17 14.8l0.8 2.1L19.8 17.6l-2.1 0.8L17 20.3l-0.8-2.1L14.3 17.6l2.1-0.8Z"/></svg><span>Ask your agent</span></button><button class="ovk-ask ovk-btn ovk-btn--quiet ovk-btn--small" type="button" data-ov-ask="What is in this clip?"><svg class="ovk-i" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M10.4 3.6l1.7 4.8L17 10.1l-4.8 1.7L10.4 16.7l-1.7-4.8L3.9 10.1l4.8-1.7ZM17 14.8l0.8 2.1L19.8 17.6l-2.1 0.8L17 20.3l-0.8-2.1L14.3 17.6l2.1-0.8Z"/></svg><span>Ask about this clip</span></button>What it weighs
Its own rules are 6.5 KB, 1.5 KB as sent: 8% of the kit's CSS. A page that draws it pays for the whole stylesheet once, and every other part comes free.