Deterministic logic
Pure TypeScript steps for fetches, transforms, branches, loops, parallel work, waits, and nested pipeline calls. Type-check, refactor, test, and version them like ordinary code.
Build typed TypeScript pipelines that mix deterministic code, single-shot inference, and full agent loops behind default-deny permissions and a gateway you own. Run quick automations, cron jobs, webhooks, durable approvals, and persistent chat workflows with the same module shape.
$ npm install -g skelm
$ skelm init my-bot && cd my-bot && npm install
$ skelm run workflows/hello.workflow.mts --input '{"name":"world"}'
A workflow is a typed TypeScript module. Use deterministic code, model inference, and agent loops directly, then host the same workflow through the gateway when it needs schedules, webhooks, queues, or durable state.
Pure TypeScript steps for fetches, transforms, branches, loops, parallel work, waits, and nested pipeline calls. Type-check, refactor, test, and version them like ordinary code.
One model call with typed input and structured output. `infer()` is for LLM judgment without a tool loop, backed by providers such as OpenAI-compatible endpoints, Anthropic, Pi, Vercel AI, or custom backends.
Full agent steps with tools, MCP servers, skills, workspaces, and default-deny permissions. Backends include @skelm/agent, Opencode, Pi, Codex, Vercel AI, ACP agents, and custom providers.
Every privileged action flows through the gateway under permissions declared in code. A backend that cannot enforce a declared permission fails at step start instead of silently bypassing it.
Incident response from the current examples: parallel deterministic triage, then an agent step with explicit tools, MCP, filesystem, and network permissions.
import { agent, code, parallel, pipeline } from 'skelm'
import { z } from 'zod'
export default pipeline({
id: 'incident-response',
input: z.object({
incidentId: z.string(),
service: z.string(),
description: z.string(),
}),
output: z.object({
rootCause: z.string(),
immediateActions: z.array(z.string()),
}),
triggers: [{ kind: 'webhook', path: '/webhooks/incident' }],
steps: [
parallel({
id: 'triage',
steps: [
code({ id: 'search-issues', run: () => ({ issues: [] }) }),
code({ id: 'open-channel', run: () => ({ channel: 'inc-001' }) }),
],
}),
agent({
id: 'root-cause',
backend: 'opencode',
prompt: (ctx) => `Analyze this incident:\n${ctx.input.description}`,
permissions: {
allowedTools: ['gh.search_issues', 'slack.post_message'],
allowedMcpServers: ['github'],
allowedExecutables: [],
fsRead: [],
fsWrite: [],
networkEgress: { allowHosts: ['api.github.com', 'slack.com'] },
},
output: z.object({
rootCause: z.string(),
immediateActions: z.array(z.string()),
}),
maxTurns: 4,
}),
],
})
skelm ships as focused packages. Install the meta-package `skelm` for the runtime and CLI, then add backend, integration, memory, metrics, or tracing packages as needed.
skelmMeta-package — install this. Re-exports @skelm/core, ships the skelm CLI binary, and depends on the CLI, scheduler, and integration SDK pieces needed for local execution.
@skelm/coreRuntime, types, builders, schemas, events, permissions, registries, backend interface, system prompt composition, and pipeline execution primitives.
@skelm/cliCommand-line interface and programmatic primitives. Non-exempt commands dispatch to the local gateway; `init`, `validate`, and `gateway *` can run without a live gateway.
@skelm/gatewayLong-running orchestrator that owns config, registries, permissions, audit, agent lifecycle, triggers, HTTP/SSE, dashboard API, and the execution trust boundary.
@skelm/schedulerTrigger management for cron, interval, and webhook schedules with deduplication and overlap policies; used by the gateway for scheduled work.
@skelm/integrationsTyped integration package for third-party services such as GitHub, Slack, Jira, Telegram, Matrix, and chat UI trigger sources.
@skelm/integration-sdkAuthoring SDK for custom skelm integrations and trigger sources. Use it to build connectors that plug into the gateway.
@skelm/agentFirst-party native agent backend. Runs infer() and agent() against OpenAI-compatible chat endpoints with in-process TrustEnforcer permission checks.
@skelm/agentmemoryTyped REST client and gateway-wired AgentmemoryHandle for cross-session recall. Operations are default-deny and routed through gateway enforcement.
@skelm/opencodeOpencode.ai coding-agent backend with native permission mapping, granular enforcement, and gateway-supervised lifecycle support.
@skelm/piPi coding-agent SDK backend with native tool allowlist enforcement, infer() support, sandbox defaults, and queueing controls.
@skelm/codexOpenAI Codex backend via @openai/codex-sdk with boundary permission mapping, MCP injection, skill loading, session lifecycle, and streaming.
@skelm/vercel-aiVercel AI SDK backend that powers infer() and agent() with tool filtering and call-time permission checks under skelm policy.
@skelm/metricsPrometheus-format metrics for skelm event streams: run counters, step timings, permission denials, approvals, and trigger fires.
@skelm/otelOpenTelemetry tracing for skelm event streams, emitting run and step spans without configuring exporters for you.
Install the CLI, scaffold a project, or use `skelm builder` to draft a workflow from a plain-language spec.