Skip to content

Repository files navigation

Klonk Logo

Klonkworks

Pre-built Tasks for the Klonk automation engine

klonk.dev · Klonk Core

License


Klonkworks is a collection of ready-to-use Tasks for Klonk, the code-first, type-safe automation engine for TypeScript.

Each task is published as a standalone npm package, so you only install what you need.

Note

Early Development: Klonkworks is in its early stages. The current task collection is just the beginning — expect many more tasks, triggers, and integrations covering databases, APIs, cloud services, messaging platforms, and more. Stay tuned!

Available Tasks

🤖 AI (@fkws/klonkworks.tasks.ai.all)

Tasks for AI/LLM integrations using the Vercel AI SDK.

Task Package Description
Simple Text Inference @fkws/klonkworks.tasks.ai.simple-text-inference Generate text completions from any AI provider
Analyze Image @fkws/klonkworks.tasks.ai.analyze-image Extract structured data from images using vision models

Bundle package: @fkws/klonkworks.tasks.ai.all — includes all AI tasks


🌐 Browser (@fkws/klonkworks.tasks.browser.all)

Tasks for browser automation using Playwright.

Task Package Description
Screenshot @fkws/klonkworks.tasks.browser.screenshot Capture screenshots of web pages

Bundle package: @fkws/klonkworks.tasks.browser.all — includes all browser tasks


💻 OS (@fkws/klonkworks.tasks.os.all)

Tasks for operating system integrations.

Task Package Description
Notification @fkws/klonkworks.tasks.os.notification Send native desktop notifications

Bundle package: @fkws/klonkworks.tasks.os.all — includes all OS tasks


🔧 Util (@fkws/klonkworks.tasks.util.all)

General-purpose utility tasks.

Task Package Description
Filesystem @fkws/klonkworks.tasks.util.fs Read, write, and manage files and directories
Math @fkws/klonkworks.tasks.util.math Perform mathematical operations and expressions

Bundle package: @fkws/klonkworks.tasks.util.all — includes all utility tasks


Quick Start

Install Klonk and any tasks you need:

# Using bun
bun add @fkws/klonkworks.tasks.ai.simple-text-inference

# Using npm
npm install @fkws/klonkworks.tasks.ai.simple-text-inference

# To target a specific Klonk runtime (dist-tag `klonk-x.x.x`, available starting at Klonk 0.0.23), for example:
bun add @fkws/klonkworks.tasks.ai.simple-text-inference@klonk-0.0.23
npm install @fkws/klonkworks.tasks.ai.simple-text-inference@klonk-0.0.23

Use tasks in your workflows or machines:

import { Workflow, isOk } from "@fkws/klonk";
import { TASimpleTextInference } from "@fkws/klonkworks.tasks.ai.simple-text-inference";
import { openai } from "@ai-sdk/openai";

const workflow = Workflow.create()
  .addTrigger(myTrigger)
  .setPlaylist(p => p
    .addTask(new TASimpleTextInference("generate"))
    .input((source) => ({
      prompt: source.data.userMessage,
      model: openai("gpt-4o")
    }))
  );

workflow.start({
  callback: (source, outputs) => {
    const result = outputs.generate;
    if (result && isOk(result)) {
      console.log(result.data.text);
    }
  }
});

Requirements

  • Klonk: @fkws/klonk ^0.0.23
  • TypeScript: 5.0+
  • Runtime: Node.js 18+, Bun 1.0+

License

Mozilla Public License 2.0

About

Pre-built primitives and integrations for @fkws/klonk

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages