Templates
Each template is an agent and the workflows it calls. Deploy one from the dashboard, or write it into a project with the CLI.
The templates
Each template needs a secret for the service it talks to. Every write to another service waits for an approver, except the Slack post to your own channel.
| Template | Workflows | Needs |
|---|---|---|
invoice-assistant Answers questions about Stripe invoices and refunds them. | stripe-invoice, and stripe-refund after approval. A code tool, format-amount, shows Stripe's amounts. | The secret STRIPE_KEY for api.stripe.com |
github-triage Reads an issue, suggests labels and a reply, and posts them. | github-issue, and github-comment and github-labels after approval | The secret GITHUB_TOKEN for api.github.com |
support-triage Sorts a support message by kind and urgency, drafts a reply, and posts the triage to your team's Slack channel. | slack-post | The secret SLACK_BOT_TOKEN for slack.com and the var SLACK_CHANNEL |
lead-qualifier Looks up a lead in HubSpot, rates it hot, warm or cold with reasons, and records the rating as a note. | hubspot-contact, and hubspot-note after approval | The secret HUBSPOT_TOKEN for api.hubapi.com |
STRIPE_KEYA Stripe secret or restricted key that can read invoices and create refunds.
GITHUB_TOKENA fine-grained token with read and write access to the repository's issues.
SLACK_BOT_TOKEN·SLACK_CHANNELA Slack bot token (
xoxb-…) with thechat:writescope, invited to the channel, and the id of the channel, such asC0123456789.HUBSPOT_TOKENA HubSpot private app token with the
crm.objects.contactsread and write scopes.
- Each agent runs on
@cf/zai-org/glm-4.7-flash, a small model, so every template works on Free. Budgets are $0.15 to $0.25 a conversation. - Each agent's chat opens with a welcome and a first message to try.
- The workflows are TypeScript. Read and change them like any workflow.
- A template's agent and workflows count toward your plan's agents and workflows.
Deploy from the dashboard
Developers and admins deploy a template from Agents → Start from a template. Deploy stages each workflow, uploads the agent's code if it has any, then makes the workflows and the agent current in one release.
- The agent is named after the template, such as
invoice-assistant. If an agent of that name exists, Deploy asks first and adds a version to it. - A deploy that changes nothing records no release.
- Then add the secret and var the template needs, open the agent and try its sample message.
Write it into a project
shiftlabs init --template <name> [dir] writes the same agent and workflows as a project: shiftlabs.config.ts, workflows/, and agents/<name>.tools.ts when the agent has code, with an AGENTS.md for coding agents. Change what you like, then deploy it as one release.
# List the templates. Needs no API key.
npx shiftlabs init
# Write one into a new directory, then deploy it with a developer key.
npx shiftlabs init --template support-triage support-agent
cd support-agent
npm install --save-dev shiftlabs
npx shiftlabs deploy
initwrites nothing if the config or a workflow file exists. Pick an empty directory. An existingAGENTS.mdorCLAUDE.mdis left as it was.- It prints the secrets and vars to add, and a message to try.
shiftlabs deploystages the workflows, uploads the agent's code and releases them with the agent. Run again with nothing changed, it releases nothing. See Projects.