@kepoai/provider
v1.0.11
Published
Provider runtime API for building Kepo plugins.
Readme
@kepoai/provider
Provider runtime API for building Kepo plugins.
Kepo is an AI desktop dashboard for building, installing, and running widget plugins. Use this package inside a Kepo plugin provider to access storage, configuration, browser automation, scheduled events, network requests, and AI calls.
Website: kepo.ai
Plugin store: kepo.ai/store
What This Package Provides
@kepoai/provider is the TypeScript SDK surface for provider-side plugin logic. It is designed for developers building dashboard widgets, AI dashboard components, desktop widgets, and automation-backed plugins for Kepo.
Common use cases:
- Store and read provider data with
Storage. - Read and update plugin configuration with
Config. - Run scheduled refresh logic through
Events. - Use the Kepo-managed browser page with
getPage. - Make session-aware HTTP requests with
$fetch. - Call Kepo AI from provider code with
AI.completeandAI.stream.
Installation
pnpm add @kepoai/provider @kepoai/typesImport
import { $fetch, AI, EventProps, Storage } from '@kepoai/provider/api'Example
import { $fetch, EventProps, Storage } from '@kepoai/provider/api'
async function onScheduled(props: EventProps): Promise<void> {
const response = await $fetch<{ origin: string }>('https://httpbin.org/ip')
await Storage.set(`${props.name}:latest-ip`, response)
}
export const exampleProvider = {
onScheduled,
}API Areas
Storage
Use Storage for plugin-scoped local data.
await Storage.set('latestData', { updatedAt: new Date().toISOString() })
const latestData = await Storage.get('latestData')Config
Use Config to read and update user-facing plugin settings.
const keyword = await Config.get('keyword', 'AI tools')
await Config.setError('keyword', '')Browser
Use getPage when a plugin needs a Kepo-managed browser page for login-aware or page-based automation.
const page = await getPage()
await page.setDevice('desktop')
await page.show()Fetch
Use $fetch for provider-side HTTP requests.
const data = await $fetch<{ title: string }>('https://example.com/api/item', {
query: { limit: 10 },
})AI
Use AI when a plugin needs Kepo AI capabilities from provider code.
const result = await AI.complete({
prompt: 'Summarize the latest dashboard data in one sentence.',
})Related Packages
@kepoai/types: shared plugin, widget, size, and configuration types.@kepoai/ui: React hooks and viewer-side UI helpers for Kepo widgets.
Keywords
Kepo plugin SDK, Kepo provider API, AI dashboard SDK, desktop dashboard plugin, widget plugin development, TypeScript plugin SDK, browser automation plugin, AI widget development.
