Koskamo

Triage issues with structured output and label application

An AI agent analyzes an issue, generates a structured summary with labels, and automatically applies those labels to the issue via a durable workflow.

How it works

Changes data in your accountsCustomer support

The agent initiates a durable workflow using ThinkWorkflow. It calls step.prompt() with a specific prompt and a Zod schema to enforce structured output (title, summary, labels). The agent's tools are used during this agentic turn to gather context. Once the structured data is returned and validated, the workflow executes a subsequent step to apply the generated labels to the issue, ensuring the process is durable and idempotent.

Prompt

Paste this into an agent that has the servers below connected. Adjust the names and dates to your own.

Prompt for Triage issues with structured output and label application
Create a TriageWorkflow that extends ThinkWorkflow. In the run method, use step.prompt() with a Zod schema defining title, summary, and labels. Pass a prompt like 'Triage issue #${event.payload.issueNumber}'. After receiving the structured draft, call step.do() to execute a function that applies the draft.labels to the issue using this.agent.applyLabels(). Start this workflow from your agent using runWorkflow().

MCP servers it needs

Source

The vendor page this playbook is drawn from, and the passage that supports it.

ThinkWorkflow connects Think to Cloudflare Workflows when a durable job needs one model-driven reasoning step.
Workflows · Cloudflare Agents docs

Each playbook is drawn from the vendor page it cites and reviewed by Koskamo before it is published. Koskamo does not run these servers or your agent: check what each tool will do before you let it act on your accounts.