Build on Aktor
Remote plugins
Your own integration in any language, as an HTTP service the runtime calls.
The runtime POSTs JSON to /validate, /tools/list, /tools/call, /notify and
/inbound under your plugin's URL, with Authorization: Bearer <shared secret>. Each call
carries the connection's config and its credentials from the vault. Tool calls also carry an
idempotency_key to pass to the system you call.
Any HTTP service that answers those calls works today. The SDK helpers below, which handle the routing and the secret for you, are coming soon.
import { Plugin } from "@aktor/sdk/plugin";
new Plugin("crm")
.tool("find_customer", { description: "Find a customer by email.", sideEffects: "read_only",
inputSchema: { type: "object", properties: { email: { type: "string" } }, required: ["email"] } },
async ({ email }, ctx) => lookup(email, ctx.credentials.api_key))
.listen({ port: 8787, token: process.env.PLUGIN_TOKEN });
from aktor import Plugin
plugin = Plugin("crm")
@plugin.tool(description="Find a customer by email.", side_effects="read_only")
def find_customer(args, ctx):
return lookup(args["email"], ctx.credentials["api_key"])
plugin.serve(port=8787, token=os.environ["PLUGIN_TOKEN"])
Add it to a workspace as a Remote plugin connection with its URL and the secret. Declare
side_effects honestly: read-only tools may be re-run after a crash, and others never are.