shiftlabs Start free
Menu Get started

Quickstart

From a new account to a finished run.

  1. Sign up

    Create an account at app.shiftlabs.org with your email address, a password and an authenticator app, or with Google or GitHub, then name your workspace. You can create more, up to your plans' cap, and switch between them. See Workspaces.

  2. Create an API key

    An admin creates a key with the developer role under API keys. It is shown only once. Export it as SHIFTLABS_API_KEY.

  3. Write a workflow

    One module whose default export is workflow(…). See Workflows.

  4. Deploy it

    PUT /v1/workflows/:name with the source as the body. The response includes the new version hash.

  5. Create a trigger

    POST /v1/triggers returns the trigger URL. Point any webhook sender at it.

  6. Send a delivery

    The trigger returns 202 with a runId. Follow the run in the dashboard or at /v1/runs/:id/timeline.

shellcurl
# Deploy. Answers {"versionHash", "sizeBytes", "warnings"}.
curl -X PUT https://api.shiftlabs.org/v1/workflows/refund-check \
  -H "authorization: Bearer $SHIFTLABS_API_KEY" \
  --data-binary @refund-check.ts

# Create a trigger. Answers 201 {"triggerId", "url", "signingScheme"}.
curl -X POST https://api.shiftlabs.org/v1/triggers \
  -H "authorization: Bearer $SHIFTLABS_API_KEY" \
  -H "content-type: application/json" \
  -d '{"workflow": "refund-check"}'

# Start a run. Answers 202 {"runId"}.
curl -X POST https://hooks.shiftlabs.org/t/<triggerId> \
  -H "content-type: application/json" -d '{"id": "ch_123"}'

# Follow it.
curl https://api.shiftlabs.org/v1/runs/<runId>/timeline \
  -H "authorization: Bearer $SHIFTLABS_API_KEY"

Concepts

The main objects in shiftlabs.

  • Workspace

    Holds your workflows, runs, secrets, vars and connections. Its members and API keys each have a role: viewer, developer or admin. See Workspace and roles.

  • Workflow

    A named module in your workspace. Every deploy adds a version with an 8-character hash and the next revision letter: A, B … Z, AA.

  • Project

    A shiftlabs.config.ts that lists your workflows, deployed together by shiftlabs deploy. See Projects.

  • Release

    New versions of several workflows, staged first, then made current in one step with any agents. See Releases.

  • Run

    One execution, pinned to the version that was current when its delivery arrived. A run is queued, running, sleeping or waiting, then completed, failed, cancelled or terminated. See Runs and steps.

  • Trigger

    A URL at hooks.shiftlabs.org/t/… that starts runs of one workflow, optionally only for signed deliveries.

  • Secret

    An encrypted value tied to hosts. Your code holds a stand-in, and the gateway replaces it with the value on requests to those hosts only. reveal() returns a secret marked readable. sign() signs with a secret marked hmac.

  • Connection

    Hosts plus an auth template, owned by an admin. The gateway applies it to every request to those hosts, and your code can't change it. See Connections.

  • Var

    Plain configuration: a workspace value, overridden per workflow. See Vars.

  • Agent

    Instructions, a model and tools: your workflows, or functions in the agent's own code. See Agents.

  • Approval

    A held tool call that runs only after an admin approves it. See Approvals.

  • API key

    A slk_… key with one role, valid for 1 to 365 days. See API keys.