Workflow template gallery¶
Install a reviewed version¶
Open Workflow templates in the console. A team admin can install any bundled template
whose worker and team policy are already configured with one click, then select Run.
The gallery has nine templates, all at version 0.9.0.
Installation pins that version in the team's revisioned settings and records an audit entry;
repeating the same installation is idempotent. New runs retain the template ID and version.
Unknown versions return 422; an unapproved workflow returns 409.
Installation selects a catalog entry; your worker supplies the code. The Compose worker
registers all nine implementations. For Kubernetes, register the implementation in your worker
and approve inference-gateway.sandboxPolicy.policy.policies[].workflows in Helm first;
the gallery works within the model, tool and egress permissions set in operator policy.
Deploy the worker to ship source changes. Use the scaffold command below to edit a template. See lifecycle API and SDK methods.
Pick one team task, run its fixture, then adapt its inputs and tools. Each walkthrough takes about five minutes after the quickstart. All nine run in the same credential-free Compose trial on CPU with the base SDK.
| Team task | --template |
What you can inspect |
|---|---|---|
| PR review with human approval | code-review |
Findings, a waiting draft, and an authenticated approve/reject decision |
| Support ticket triage | support-triage |
Category, priority, suggested owner, and a reply draft |
| Weekly report from several sources | weekly-report |
Changes, support and incident snapshots alongside the report |
| Incident summary from logs | incident-summary |
UTC timeline, log references, mitigation and open questions |
| Document Q&A with citations | document-qa |
Answer, source links and the exact retrieved excerpts |
| Release notes | release-notes |
Turn merged changes into release notes with a reviewer decision. |
| Meeting actions | meeting-actions |
Extract decisions, owners, and due dates from a meeting transcript. |
| Security questionnaire | security-questionnaire |
Draft evidence-backed questionnaire answers and flag unsupported claims. |
Before you start¶
Complete quickstart step 1 from this checkout, keep the fake model route, and return to
the checkout root. Keep AGENTWORKFLOWS_API_KEY=local-development-only set in your shell.
Every command below works in Bash and PowerShell. Replace RUN_ID with the UUID returned
by runs start; repeat inspect while a run is still working. The console at
http://127.0.0.1:8080/console/ offers the same workflows and sample inputs under Run workflow.
init works offline and writes into a new or empty directory. It writes workflow.py,
worker.py, input.json, a pinned SDK requirement, .gitignore, and local instructions.
The built-in worker already runs these unchanged examples. Input edits apply to the next
run immediately; source edits require your own worker.
The fake returns canned answers and synthetic data for any input. It demonstrates the
workflow, policy, approval and receipt paths; connect a real model and your own GitHub,
ticketing, logging, or document system to evaluate quality. The example.test source links
identify fixtures. All examples request the existing default
budget of 10,000 tokens / $5, further limited by team policy; fixture prices are synthetic.
PR review with human approval¶
For a developer who wants a reviewable security/correctness draft before acting on a PR:
agentworkflows init my-review --template code-review
agentworkflows runs start CodeReviewWorkflow --input '@my-review/input.json'
agentworkflows runs inspect RUN_ID
The input's diff contains a patch to auth.py. At progress.stage: awaiting_approval,
read progress.draft: the fixture flags the unconditional True at auth.py:10, suggests
restoring the admin check, and asks for admin/non-admin tests. Then submit your decision:
Expect status: completed, result.approved: true, the review and reviewer, and model and
approval receipts. Start another run and use runs approve RUN_ID --reject to see
result.approved: false. Both decisions finish the run with the review as its result.
Approval expires after seven days. The trial's Slack/webhook/email alerts go to the
local notification inbox.
Adapt it: put a sanitized unified diff in my-review/input.json. Include file names and
hunk line numbers so findings can be checked. Use separate builder and approver identities
from team setup. A PR webhook needs an adapter that
fetches the diff and submits {"diff":"..."}. If you add a comment-posting tool, call it only after a true approval and make the
endpoint honor the gateway's idempotency key. Check findings against the actual diff.
Support ticket triage¶
For a support lead who needs routing and a reply draft while keeping customer communication under the team's control:
agentworkflows init my-support --template support-triage
agentworkflows runs start SupportTriageWorkflow --input '@my-support/input.json'
agentworkflows runs inspect RUN_ID
The input's ticket describes three teammates unable to sign in after password resets.
Expect status: completed and a text result with category access, priority high, owner
identity-support, and a draft asking for the error and time without requesting secrets.
There is one model receipt, and the draft stays in the run for your team. This internal
draft runs without an approval step.
Adapt it: replace ticket with a sanitized ticket body. Edit the prompt to use your
actual queues, severity definitions and escalation criteria. Connect a ticket-system
adapter through the signed webhook contract,
normalizing input to {"ticket":"..."}. Check suggested priorities against known tickets
before routing live work; add human review before any customer-facing send action.
Weekly report from several sources¶
For a team lead assembling a briefing from engineering, support and reliability:
agentworkflows init my-weekly --template weekly-report
agentworkflows runs start WeeklyReportWorkflow --input '@my-weekly/input.json'
agentworkflows runs inspect RUN_ID
The input's period is 2026-09-28/2026-10-04. The workflow calls report_source separately
for changes, support, and incidents, then asks for a single report. Expect
status: completed, result.sources with three snapshots, and result.report linking each
source. The fixture reports two shipped changes, 12 opened / 9 closed tickets and INC-1042;
it explicitly flags the missing backlog baseline. The timeline has three tool receipts
and one model receipt. The report stays in the run result.
Adapt it: implement the existing report_source POST contract, accepting source and
period and returning {id, url, period, text}. Point its team tool URL at an authenticated
adapter for your repositories, helpdesk and incident tracker. Bound date ranges and response
sizes, and use stable source links. A failed source call fails the run after retries, so
every successful report covers all three sources.
For a Monday 09:00 UTC run, merge this into the existing WeeklyReportWorkflow policy
in deploy/compose/sandbox-policy.yaml, preserving its models, tools, egress and budgets:
Recreate the gateway from the checkout root (docker compose -f deploy/compose/compose.yaml
up -d --force-recreate inference-gateway; prefix with wsl.exe -d Ubuntu -e on Windows).
Your real adapter must resolve previous week into a UTC range; the fake always returns
the same synthetic snapshots. Inspect and pause the schedule after trying it:
Use triggers resume WeeklyReportWorkflow weekly when ready. The manual run above exercises
the same report immediately, so you can try it right away. See
schedule semantics for overlap and catch-up behavior.
Incident summary from logs¶
For an incident lead turning a bounded log export into a draft handoff:
agentworkflows init my-incident --template incident-summary
agentworkflows runs start IncidentSummaryWorkflow --input '@my-incident/input.json'
agentworkflows runs inspect RUN_ID
The input's incident_id is INC-1042. The incident_logs tool supplies four timestamped
log lines. Expect status: completed, result.logs retaining those lines, and
result.summary citing [L1] through [L4]: deployment at 09:00 UTC, errors at 09:05,
rollback at 09:12, and a return to baseline at 09:20. The fixture labels the deployment
as an unconfirmed cause and asks for the affected-user count. There is one tool and one
model receipt. The summary is a draft handoff; remediation and closure stay with the incident team.
Adapt it: replace the incident_logs endpoint with a read-only log adapter accepting
{incident_id} and returning {incident_id, source, lines}. Enforce the team's access,
redaction, time window and size limits there. Keep UTC timestamps and stable log IDs.
The incident commander should verify the draft against logs and metrics before sharing it.
Raw logs and results enter Temporal history; apply redaction in the adapter and set Temporal retention for that data.
Document Q&A with citations¶
For an internal helpdesk answering questions from a small, approved document collection:
agentworkflows init my-docs --template document-qa
agentworkflows runs start DocumentQAWorkflow --input '@my-docs/input.json'
agentworkflows runs inspect RUN_ID
The input's question asks who can approve a workflow and when approval expires. The
search_documents tool retrieves a handbook excerpt. Expect status: completed,
result.answer mentioning admins/approvers and seven days with [S1], and
result.citations containing S1's title, URL, and exact excerpt. The timeline has one
retrieval tool receipt and one model receipt.
Change the question in my-docs/input.json to What is the weather on Mars? and start a new
run. The fixture retrieves nothing: expect I don't know from the supplied documents.,
empty citations, and no model call. Fixture retrieval answers approval and receipt
questions and runs separately from the optional RAG service in Compose.
Adapt it: connect search_documents to your approved search/RAG backend. It accepts
{query} and returns a list of {id, title, url, text} excerpts, each with a unique stable
ID and source link. Enforce document access in that adapter and limit excerpt sizes.
The workflow requires JSON model output and checks that inline citation IDs match the
returned IDs and retrieved excerpts. Malformed JSON or fabricated/mismatched IDs fail the
run with a non-retryable error; an empty citation list yields the same abstention.
Review the error and source before starting a corrected run. Evaluate answer quality and
abstention on your corpus.
Research starter¶
The original default remains available: agentworkflows init my-research. Follow the
quickstart to run ResearchWorkflow with a topic, inspect its two model
steps, approve its draft, and see the local publish fixture. It also accepts token_limit
and cost_limit_usd.
Notifications and next steps¶
All template inputs accept an optional model, defaulting to demo-openai. Supply the
nonempty text field shown in each walkthrough; unknown fields are rejected before Temporal
starts the run. agentworkflows usage shows estimated spend across runs. Inspect each
timeline for receipt IDs; use the quickstart's receipt export
to verify the retained chain.
Compose sends approval-waiting, failure, and budget-threshold notifications to a local fake inbox at http://127.0.0.1:8025/ (JSON). Completed reports are delivered as run results. Triggers and notifications explains setup for your team's authorized destinations.
Before real use, configure approved tools/models, separate team credentials and budgets, and evaluate model output. Sanitize input before submitting it: workflow inputs, activity results and drafts are retained in Temporal, while gateway receipts fingerprint prompts. See production readiness. When finished with the trial, follow Stop the trial to remove its containers and volumes.
Run your edits¶
The Compose worker runs the installed examples. To execute your edited workflow.py,
stop that worker from the checkout root before starting yours:
On Windows, prefix Compose commands with wsl.exe -d Ubuntu -e. In a second terminal,
activate the same SDK environment as in the quickstart, enter the generated project,
and start the worker:
Wait for Worker ready on demo-workflows. Start and inspect runs from the original
terminal using its human credential. Your worker registers this project's workflow;
start other templates after restoring the built-in worker.
Restart your worker after changing source. Stop it with Ctrl+C, then restore Compose:
If you chose a different gateway port, set AGENTWORKFLOWS_URL in the worker terminal too.
If you chose a different Temporal port, set TEMPORAL_ADDRESS=localhost:PORT there.
For your own team, set AGENTWORKFLOWS_TEAM and its worker key; the queue defaults to
TEAM-workflows. Register the workflow name, approved models and tools, and per-run limits
from Templates → Your workflows, with agentworkflows workflows register, or in operator
team policy. See Register your own workflow.
A workflow in about 20 lines¶
This is the approval pattern used by the code-review template, with typed input:
from dataclasses import dataclass
from temporalio import workflow
from agentworkflows.workflows import ApprovalWorkflow, WorkflowGateway
@dataclass
class CodeReviewRequest:
diff: str
model: str = "demo-openai"
@workflow.defn
class CodeReviewWorkflow(ApprovalWorkflow):
@workflow.run
async def run(self, request: CodeReviewRequest) -> dict:
review = await WorkflowGateway().text(
f"Review this diff for correctness and security. Cite lines and suggest tests.\n{request.diff}",
model=request.model,
)
approved = await self.approval(review)
return {"approved": approved, "review": review, "reviewer": self.reviewer}
The approval base implements the signal, query, update, and expiry behavior used by the
run API. text schedules the same governed model activity as the lower-level model method.
See SDK reference for defaults and bring your agent
for OpenAI, Anthropic, Agents SDK, LangGraph, MCP, and sandboxed code steps.
Release notes¶
For: release managers preparing a customer-facing change summary.
Version 0.9.0; Python and TypeScript workers both implement ReleaseNotesWorkflow.
In the console, choose Templates → Release notes → Install template → Run. Or scaffold and run from code:
agentworkflows init my-release-notes --template release-notes
agentworkflows runs start ReleaseNotesWorkflow --input '@my-release-notes/input.json'
agentworkflows runs inspect RUN_ID
agentworkflows runs approve RUN_ID
Input field: changes (required text); model defaults to demo-openai.
Example: REL-42: Added CSV usage export. Fixed approval expiry. Removed the legacy /draft endpoint.
The workflow turns merged changes into release notes with a reviewer decision.
It waits for human approval and returns approved, release_notes, and reviewer.
Rejection returns approved: false; both outcomes keep the result in the run.
Inspect the model-call and approval receipts. Default per-run budget: 10,000 tokens / $5,
further constrained by team policy.
Adapt it: supply sanitized merged changes with stable issue/PR IDs; have the reviewer check breaking changes and migration instructions against the diff before publishing. The local fake produces a labeled synthetic draft; connect a real model to assess quality.
Meeting actions¶
For: team leads turning a transcript into an actionable follow-up.
Version 0.9.0; Python and TypeScript workers both implement MeetingActionsWorkflow.
In the console, choose Templates → Meeting actions → Install template → Run. Or scaffold and run from code:
agentworkflows init my-meeting-actions --template meeting-actions
agentworkflows runs start MeetingActionsWorkflow --input '@my-meeting-actions/input.json'
agentworkflows runs inspect RUN_ID
agentworkflows runs approve RUN_ID
Input field: transcript (required text); model defaults to demo-openai.
Example: 09:00 Maya: We will pilot the review workflow. 09:02 Leo: I own the rollout checklist, due Friday. 09:04 Maya: Budget approval is still open.
The workflow extracts decisions, owners, and due dates from a meeting transcript.
It waits for human approval and returns approved, action_plan, and reviewer.
Rejection returns approved: false; both outcomes keep the result in the run.
Inspect the model-call and approval receipts. Default per-run budget: 10,000 tokens / $5,
further constrained by team policy.
Adapt it: supply a transcript with timestamps and consent to process it; verify every proposed owner and deadline before transferring actions to your task tracker. The local fake produces a labeled synthetic draft; connect a real model to assess quality.
Security questionnaire¶
For: security teams answering vendor questionnaires from retained evidence.
Version 0.9.0; Python and TypeScript workers both implement SecurityQuestionnaireWorkflow.
In the console, choose Templates → Security questionnaire → Install template → Run. Or scaffold and run from code:
agentworkflows init my-security-questionnaire --template security-questionnaire
agentworkflows runs start SecurityQuestionnaireWorkflow --input '@my-security-questionnaire/input.json'
agentworkflows runs inspect RUN_ID
agentworkflows runs approve RUN_ID
Input field: evidence (required text); model defaults to demo-openai.
Example: Q1: Are approvals required? E1: The team policy requires two reviewers before publication. Q2: Is SOC 2 certification current? No certification evidence supplied.
The workflow drafts evidence-backed questionnaire answers and flags unsupported claims.
It waits for human approval and returns approved, answers, and reviewer.
Rejection returns approved: false; both outcomes keep the result in the run.
Inspect the model-call and approval receipts. Default per-run budget: 10,000 tokens / $5,
further constrained by team policy.
Adapt it: supply numbered questions and authoritative evidence excerpts with IDs; require a security reviewer to check each cited statement. Mark questions without evidence as unanswered, especially certification claims. The local fake produces a labeled synthetic draft; connect a real model to assess quality.