Skip to content

Forge Apps

Forge is the app framework for Protokol. A Forge app is a versioned bundle, described by a single ptkl.config.js manifest, that you build with the ptkl toolkit and run on the platform. It can ship UI, server-side code, or both.


What is a Forge app?

Every app declares its identity, entry points, services, lifecycle scripts and permissions in the App Manifest. The manifest's type decides what the app can be:

Type What it is
platform An app that runs inside the Protokol dashboard. Views can stay platform-only or be made public, and it can declare services.
public A public-facing app served on its own *.ptkl.app subdomain, with optional server-side rendering and custom domains.
service A headless, API-only app with no UI, reached through service domains.

Apps are developed against a dev environment and deployed as versions, so you can test changes before they reach live.


What you can build

  • Dashboard apps that add screens and workflows to the Protokol shell.
  • Public sites and apps on a generated subdomain or your own domain.
  • HTTP APIs and webhooks as sandboxed services, public or restricted to platform users.
  • Reusable UI that other apps embed with AppView.
  • Backend tools for agents that Kortex agents call, declared as tools.
  • AI-enabled apps that expose tools to, and ask questions of, the Kortex assistant.

Reaching customers

Apps are distributed through the Protokol marketplace and installed into projects. When a user installs or updates an app, they are shown the permissions it requests before they confirm. Apps published through the official marketplace are reviewed and the publisher's identity is verified before listing. Read Security & Trusted Sources before installing apps from other sources.

An app can also guide its users through installing other marketplace items from inside the app, using the Forge API.


Building blocks

  • App Manifest - the ptkl.config.js file that defines the app: views, services, scripts, permissions and requirements.
  • Local Development - run ptkl forge dev to test views, services and public views against a real project.
  • Services - server-side scripts that run in an isolated sandbox and are callable over HTTP.
  • Tools - server-side scripts with a validated input that Kortex agents can call.
  • Variables - per-environment key-value configuration, managed separately from the manifest and readable from services and scripts. Values are stored as plain text, so never keep secrets in them.
  • Lifecycle Scripts - install and uninstall scripts that prepare the project when a version is deployed and clean up when the app is removed.
  • AppView - expose named views from one bundle and embed them in other apps, isolated in a Shadow DOM.
  • Pub/Sub - a lightweight event bus for messaging between the host app and embedded views.
  • Forge API - the $forge global for runtime permission requests, marketplace installs and onboarding.
  • Kortex - register tools the assistant can call in your app, and run actions that return structured answers.
  • Custom Domains - serve a public app from your own domain after a DNS TXT verification.
  • Security & Trusted Sources - how permissions and the app runtime token work.

Get started

  1. Install the toolkit and set up a profile.
  2. Describe your app in the App Manifest.
  3. Run it locally with Local Development.
  4. Bundle, install and manage it with the ptkl forge command.
  5. Review Security & Trusted Sources before you publish or install.