GitPedia

Sv agentation

Svelte Agentation : The visual feedback tool for agents.

From SikandarJODD·Updated June 25, 2026·View on GitHub·

**Live Preview:** [Svelte Agentation](https://sv-agentation.com) The project is written primarily in TypeScript, distributed under the MIT License license, first published in 2026. Key topics include: agentation, ai-context, annotations, open-source, svelte.

Svelte Agentation

Svelte Agentation OG

npm version
downloads

Live Preview: Svelte Agentation

Overview

Svelte Agentation turns UI annotations into structured context that AI coding agents can understand and act on.

Installation

sh
pnpm i sv-agentation
sh
npm i sv-agentation
sh
bun i sv-agentation
sh
yarn add sv-agentation

Usage

svelte
<script lang="ts"> import { browser, dev } from '$app/environment'; import { Agentation } from 'sv-agentation'; </script> {#if browser && dev} <Agentation /> {/if}

Mount the inspector only in development and only in the browser.

Open in Editor

svelte
<script lang="ts"> import { browser, dev } from '$app/environment'; import { Agentation } from 'sv-agentation'; // Absolute path to project root let workspaceRoot = 'C:/Users/YourName/Projects/YourProject'; </script> {#if browser && dev} <Agentation {workspaceRoot} openSourceOnClick /> {/if}

Annotation Callbacks

svelte
<script lang="ts"> import { browser, dev } from '$app/environment'; import { Agentation } from 'sv-agentation'; import type { Annotation, AnnotationPayload } from 'sv-agentation'; function handleAnnotationAdd(annotation: Annotation) { console.log('New annotation added:', annotation); } function handleCopy(markdown: string, payload: AnnotationPayload) { console.log('Notes copied:', markdown, payload); } </script> {#if browser && dev} <Agentation onAnnotationAdd={handleAnnotationAdd} onCopy={handleCopy} /> {/if}

Custom Shortcuts

svelte
<Agentation {workspaceRoot} keyBindings={{ inspect: 'Alt+I', copy: 'Alt+C', reset: 'Alt+R', open: 'Alt+O', delete: 'Alt+D' }} />

Shortcuts

ShortcutActionDescription
iInspectToggle the inspector toolbar and annotation mode. Configurable through keyBindings.inspect.
cCopyCopy notes as Markdown when at least one note exists. Configurable through keyBindings.copy.
rResetReset the floating toolbar position. Configurable through keyBindings.reset.
oOpenOpen the hovered source location. Configurable through keyBindings.open.
dDeleteDelete the currently edited note. Configurable through keyBindings.delete.
escCancelClear transient selections, close the composer, or dismiss settings/delete state.
enterSubmitSubmit the current note from the composer. Configurable through keyBindings.submit.
shift + ctrl/cmd + clickBuild a group selectionAdd or remove elements from a grouped annotation target before releasing the modifiers.

Features

  1. Annotate individual elements directly in the page.
  2. Annotate selected text ranges.
  3. Annotate grouped selections across multiple elements.
  4. Use a draggable floating toolbar.
  5. Toggle the inspector theme inside the tool UI.
  6. Copy notes in compact, standard, detailed, or forensic output modes.
  7. Include computed-style snapshots for forensic exports.
  8. Toggle marker visibility for notes.
  9. Block normal page interactions while inspecting.
  10. Use a delete-all flow with configurable delay.
  11. Hook into annotation lifecycle and copy events with callbacks.
  12. Mount the inspector only in dev mode with browser && dev.

Props

PropTypeDescription
workspaceRootstring | nullAbsolute project root for source lookup and editor links.
selectorstring | nullOptional selector to scope inspectable elements.
vscodeScheme'vscode' | 'vscode-insiders'Choose the VS Code URL scheme for open-in-editor actions.
openSourceOnClickbooleanOpen source directly on click instead of only showing metadata.
deleteAllDelayMsnumberConfirmation delay for delete-all notes.
toolbarPosition'top-left' | 'top-center' | 'top-right' | 'mid-right' | 'mid-left' | 'bottom-left' | 'bottom-center' | 'bottom-right'When provided, syncs the floating toolbar to this preset and stores it as the latest saved placement.
outputMode'compact' | 'standard' | 'detailed' | 'forensic'When provided, syncs the copy/export mode and stores it for later sessions.
pauseAnimationsbooleanWhen provided, syncs animation pausing while the inspector is active and stores it for later sessions.
clearOnCopybooleanWhen provided, syncs whether copied notes are cleared and stores it for later sessions.
includeComponentContextbooleanWhen provided, syncs component-context capture and stores it for later sessions.
includeComputedStylesbooleanWhen provided, syncs computed-style capture and stores it for later sessions.
copyToClipboardbooleanDisable direct clipboard writes and use callbacks only.
keyBindingsPartial<Record<'inspect' | 'copy' | 'reset' | 'open' | 'delete' | 'cancel' | 'submit', string | null>>Override or disable keyboard actions without changing persisted toolbar settings.
onAnnotationAdd(annotation) => voidCalled after a note is created.
onAnnotationUpdate(annotation) => voidCalled after a note is updated.
onAnnotationDelete(annotation) => voidCalled after a note is deleted.
onAnnotationsClear(annotations) => voidCalled after all notes are cleared.
onCopy(markdown, payload) => voidCalled after note export is prepared.

Credits

This project is highly inspired by Agentation.com.

GitHub Sponsors

Contributors

Showing top 4 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from SikandarJODD/sv-agentation via the GitHub API.Last fetched: 6/29/2026