Set up a PRD agent for ticket triage
Most tickets arrive too thin to hand to a coding agent: a title, maybe a sentence. This guide sets up a PRD agent, a PM agent that runs a PRD skill, to close that gap and decide what happens next.
In under 15 minutes you get:
- A PRD agent that rewrites thin ticket descriptions into a spec (problem statement, success criteria, scope, constraints) and flags what it can't fill in.
- A scorecard that routes each ticket to a human or an AI coding agent, based on rules you control.
- One clear point where a human approves a suggestion or sends it back with feedback.
Every step below uses concrete identifiers and complete JSON, so you, or a coding agent working on your behalf, can implement this directly in your own Port organization without guesswork.
Once a ticket is routed, hand it off to a coding agent using the automatically resolve tickets with Port guide.
Want to follow the guide step by step? Scroll down to Build the flow.
Or implement it in one shot with your coding assistant


Connect Port MCP to Cursor, Claude Code, or GitHub Copilot, then copy the prompt below to implement this entire guide automatically against your Port account.
I want to set up a PRD agent for ticket triage in Port: a PM agent that runs a PRD skill to turn thin tickets into a full spec, plus a scorecard that routes each ticket to an AI coding agent or a human.
Here is what I need you to do, step by step:
1. Ask me which blueprint represents my tickets (for example jiraIssue or linearIssue) if you don't already know, and use that blueprint identifier everywhere below instead of <TICKET_BLUEPRINT>. Also ask which property represents ticket ownership (for example assignee).
2. Create the `skill` blueprint if it doesn't already exist in my organization (see Port's Skills docs), then create a skill entity with identifier "generate-prd", title "Generate PRD", and instructions that make an agent gather context from the ticket's linked service, repository, team, and owner relations (noting any missing relation as an open question instead of guessing), then produce a PRD in markdown with Problem Statement, Success Criteria, Out of Scope, Dependencies, and Open Questions sections.
3. Extend my ticket blueprint with these properties:
- spec_stage (string, enum: Not started, Draft, Awaiting approval, Approved, default Not started)
- confidence_score (number, 0-100)
- ai_suggested_description (string, markdown)
- prioritized (boolean)
4. Create a scorecard called "ticket_routing_readiness" on my ticket blueprint with two rules:
- level "Triaged" when prioritized = true and the ownership property is not empty
- level "Ready for AI agent" when prioritized = true, the ownership property is not empty, spec_stage = Approved, and confidence_score >= 90
Levels, in order: "Not triaged" (red, default), "Triaged" (yellow), "Ready for AI agent" (green).
5. Create a Port workflow titled "Triage ticket with PRD agent" with these nodes in sequence:
- trigger (EVENT_TRIGGER): fires on ENTITY_CREATED for my ticket blueprint.
- run_prd_skill (AI): loads the generate-prd skill with the load_skill tool, gathers context from linked entities, and returns spec_stage, confidence_score, and ai_suggested_description as JSON.
- write_suggestion (UPSERT_ENTITY): mapping.identifier is `{{ .outputs.trigger.diff.after.identifier }}`. mapping.properties writes spec_stage, confidence_score, and ai_suggested_description, each as its own `{{ .outputs.run_prd_skill.response | fromjson | .<field> }}` template, for example `"confidence_score": "{{ (.outputs.run_prd_skill.response | fromjson | .confidence_score) | tonumber }}"`.
- human_review (INPUT): pauses with an Approve / Send back for more detail decision and a feedback notes field (give it the identifier `notes`), notifying a reviewer email I provide.
- approve_ticket (UPSERT_ENTITY): on the approve outlet, sets spec_stage to the plain string "Approved" and confidence_score to the plain number 100. These are static literals, they do not need `{{ }}`.
- revise_with_feedback (AI): on the send_back outlet, reruns the generate-prd skill, incorporating the reviewer's feedback read from `{{ .outputs.human_review.responses[0].inputs.notes }}`.
- write_revised_suggestion (UPSERT_ENTITY): same templating rule as write_suggestion, reading from revise_with_feedback's response instead of run_prd_skill's.
Three rules that must hold across every UPSERT_ENTITY mapping in this workflow: (1) every dynamic value, including `identifier`, must be wrapped in `{{ }}`. A bare JQ path with no `{{ }}` is stored as a literal string, which fails validation on the number property and silently corrupts the string properties instead of working. (2) An INPUT node's submitted values live under `.outputs.<node_id>.responses[0].inputs.<field>`, never a flat `.outputs.<node_id>.<field>` path. (3) Always wrap an AI-extracted confidence_score in `tonumber`, for example `(.outputs.run_prd_skill.response | fromjson | .confidence_score) | tonumber`. The AI's structured output can come back as a quoted numeric string even when the schema says "number", and `fromjson` alone does not fix that.
6. If I don't have a live ticket integration connected yet, create a `mockWorkItem` entity on my ticket blueprint instead, with title "Add search to the storefront" and description "Users can't search for products on the website", leave prioritized and the ownership property empty. Use it to test the workflow end to end before I connect a real integration.
7. Use the Port MCP server's tools to create each artifact directly in my organization, and confirm each step with me before moving to the next.
Reference guide: https://docs.port.io/guides/all/setup-prd-agent-for-ticket-triage
Common use cases
- Turn a one-line ticket into a spec a coding agent can actually execute against.
- Route deterministically instead of relying on a gut call for which tickets are safe to delegate.
- Give a human one clear control point: approve the PRD agent's suggestion, or send it back with notes.
Prerequisites
This guide assumes the following:
- You have a Port account and have completed the onboarding process.
- One ticket, issue, or work item integration is installed, for example Jira, Linear, GitHub issues, GitLab issues, or Azure DevOps work items.
- The
skillblueprint is installed in your organization. See Step 1 of the Skills guide if you need to create it first.
You don't need a live Jira, Linear, or other integration to try this guide. Create a mockWorkItem entity directly on your ticket blueprint instead, it triggers the same flow as a real synced ticket. See Create a test ticket for exact steps.
Before you start, decide
This guide uses placeholders so it works with any ticket source. Decide these values up front, then substitute them everywhere they appear:
| Placeholder | Set it to |
|---|---|
<TICKET_BLUEPRINT> | Your ticket blueprint identifier, for example jiraIssue or linearIssue. |
assignee | Whatever property your integration uses to represent ownership. |
90 | The minimum confidence score (0-100) your team accepts before routing a ticket to an AI agent. |
Build the flow
The PRD agent's actual know-how lives in a Port skill, not in the agent's prompt. Skills are reusable instruction sets that Port AI loads automatically when a task matches their description, so the same PRD logic stays in one place and any agent can call it.
-
Go to the
skillblueprint's page in your catalog (or the Data model page, if you'd rather create the entity from there). -
Click
+ Skill(or+ Entity). -
Click on the
{...} Edit JSONbutton. -
Copy and paste the following JSON configuration:
Generate PRD skill (click to expand)
{"identifier": "generate-prd","title": "Generate PRD","icon": "Learn","properties": {"description": "Generate a Product Requirements Document (PRD) for a work item. Use this skill when asked to create a PRD, enrich a ticket with requirements, or prepare a work item for development. The skill uses Port's service catalog context (service tier, dependencies, README, CODEOWNERS, incident history) to produce grounded, engineering-ready PRDs.","instructions": "# Generate PRD from Work Item\n\n## Step 1: Gather context\n\nFetch the work item entity and all related entities:\n- **Jira ticket** (`jira_ticket` relation): description, priority, labels, components\n- **Service** (`service` relation): tier, tech_stack, service_dependencies, active_incident\n- **Repository** (`repository` relation): README, CODEOWNERS, language\n- **Team** (`team` relation): team name, description\n- **Owner** (`owner` relation): who owns this work item\n\nIf any relation is missing, note it in the Open Questions section.\n\n## Step 2: Write the PRD\n\nUse this exact template. Every section is required.\n---\n\n### PRD Template\n\n**Problem Statement**\n- 2-3 sentences max\n- Derive from the Jira ticket description + service context\n- Reference the specific service and what behavior is broken/needed\n- Include impact: who is affected and how\n\n**Success Criteria**\n- 3-5 bullet points, each must be testable\n- Use the pattern: \"When [trigger], then [expected outcome]\"\n\n**Out of Scope**\n- 2-3 items explicitly excluded\n- Name adjacent work that is NOT part of this ticket\n\n**Dependencies**\n- List upstream/downstream services from `service_dependencies`\n- For each, note the coupling type (API call, event, shared DB)\n- Flag any dependency with an active incident\n\n**Open Questions**\n- 1-3 items needing human input before development\n- Tag who should answer if owner/team context is available\n\n---\n\n## Step 3: Quality checklist\n\nBefore returning, verify:\n- [ ] Problem statement references the actual service and ticket\n- [ ] Success criteria are testable, not vague\n- [ ] Out of scope items are real adjacent concerns, not filler\n- [ ] Dependencies come from the service catalog, not invented\n- [ ] Open questions are genuine unknowns\n- [ ] Total length is under 400 words\n\n## Anti-patterns to avoid\n\n| Bad | Good |\n|-----|------|\n| \"The system should handle timeouts gracefully\" | \"When gateway returns timeout, client retries with exponential backoff (200ms, 400ms, 800ms)\" |\n| \"This may affect the analytics pipeline\" (no evidence) | \"`notification-service` (downstream): receives events via Kafka topic `payments.completed`\" |\n| \"UI redesign is out of scope\" (unrelated) | \"Retry logic for non-timeout errors (4xx, auth failures)\" (adjacent, real temptation) |\n\n## Tone and style\n\n- Write like a senior engineer, not a product manager\n- Be specific: name services, endpoints, and components\n- No filler phrases\n- Short paragraphs, scannable format\n- Max ~500 words total\n\nFormat the PRD in clean markdown with:\n- Section emojis (📄 🎯 ✅ 🚫 🔗 ❓ 📚)\n- Tables for structured data (issues, success criteria, dependencies)\n- Checkboxes for open questions and out-of-scope items\n- Horizontal rules between sections\n- Strikethrough for excluded items\n- Bold labels for key terms","location": "global"}} -
Click
Createto save the skill.
The skill's instructions reference a ticket's service, repository, team, and owner relations for richer context. None of those are required. Step 1 of the skill tells the agent to note any missing relation as an open question instead of guessing, so it degrades gracefully on a bare ticket blueprint. If you want that context to exist, adopt the work item blueprint pattern, which models exactly those relations.
We will add the properties the PRD agent and scorecard need to your existing ticket blueprint.
Update your ticket blueprint
-
Go to the Data model page in Port.
-
Select your ticket blueprint (for example
jiraIssue). -
Click on
{...} Edit JSON. -
Add the following properties under the
propertiesschema:Triage properties (click to expand)
"spec_stage": {"title": "Spec status","description": "Where this ticket's spec is in the triage flow","type": "string","default": "Not started","enum": ["Not started", "Draft", "Awaiting approval", "Approved"],"enumColors": {"Not started": "lightGray","Draft": "orange","Awaiting approval": "yellow","Approved": "green"}},"confidence_score": {"title": "Confidence score","description": "The PRD agent's confidence that this ticket is ready for a coding agent (0-100)","type": "number","minimum": 0,"maximum": 100},"ai_suggested_description": {"title": "AI suggested description","description": "The PRD agent's suggested rewrite of the ticket description","type": "string","format": "markdown"},"prioritized": {"title": "Prioritized","description": "Whether this ticket has been confirmed as prioritized for the current cycle","type": "boolean"} -
Click
Saveto update the blueprint.
The rest of this guide references <TICKET_BLUEPRINT> as your ticket blueprint identifier.
Create the ticket routing scorecard
Next, we will create a scorecard that checks the basics, then decides whether a ticket is ready for an AI agent or still needs a human. Treat the two rules below as a starting point, add your own conditions (risk labels, repository ownership, ticket type) to match how your organization routes work.
-
Open your
<TICKET_BLUEPRINT>blueprint. -
Click on
+ Scorecard. -
Click on the
{...} Edit JSONbutton. -
Copy and paste the following JSON configuration:
Ticket routing readiness scorecard (click to expand)
{"identifier": "ticket_routing_readiness","title": "Ticket routing readiness","rules": [{"identifier": "has_basics","title": "Has the basics","description": "Ticket has been prioritized and has an assignee","level": "Triaged","query": {"combinator": "and","conditions": [{ "property": "prioritized", "operator": "=", "value": true },{ "property": "assignee", "operator": "isNotEmpty" }]}},{"identifier": "ready_for_agent","title": "Spec approved and confident","description": "Ticket has the basics, an approved spec, and a high confidence score","level": "Ready for AI agent","query": {"combinator": "and","conditions": [{ "property": "prioritized", "operator": "=", "value": true },{ "property": "assignee", "operator": "isNotEmpty" },{ "property": "spec_stage", "operator": "=", "value": "Approved" },{ "property": "confidence_score", "operator": ">=", "value": 90 }]}}],"levels": [{ "color": "red", "title": "Not triaged" },{ "color": "yellow", "title": "Triaged" },{ "color": "green", "title": "Ready for AI agent" }]} -
Click
Createto save the scorecard.
A ticket with no priority or assignee stays Not triaged. Once it has both, it becomes Triaged, meaning it still needs a human to review the spec. Once the spec is approved and the confidence score clears your bar, it becomes Ready for AI agent.
If you've implemented the work item blueprint pattern, point the PRD agent at your work_item entities instead of the raw ticket, and feed its output into that guide's routing_eligibility scorecard rather than creating a second one. See Routing decision for how that scorecard is structured. This is optional, the scorecard above works standalone with no other setup.
Choose one implementation. The skill, data model, and scorecard above are the same for both.
The Workflow path below is fully self-contained: one workflow does the triage, the write-back, and the human review, with no self-service actions and no standalone AI agent. The Actions & automations path needs a few more building blocks (an agent plus two actions) because that's how agents and automations invoke each other outside of a workflow.
- Workflow
- Actions & automations
Build the workflow
This workflow runs the generate-prd skill, writes the suggestion straight to the ticket with a native upsert-entity node, then pauses on a native input node until a human approves or sends it back.
-
Go to the workflows page in Port.
-
Click + Workflow.
-
Fill out the Create new workflow form, then click Confirm.
-
Click the
{...}button to open the JSON editor and paste the workflow JSON below:Triage ticket workflow template (click to expand)
{"title": "Triage ticket with PRD agent","icon": "AI","description": "Runs the generate-prd skill against new tickets, gets a human decision, and writes the result back so the routing scorecard can route the ticket","allowAnyoneToViewRuns": true,"nodes": [{"identifier": "trigger","title": "On ticket created","icon": "Details","description": "Runs whenever a new ticket is created or synced into the catalog","config": {"type": "EVENT_TRIGGER","event": {"type": "ENTITY_CREATED","blueprintIdentifier": "<TICKET_BLUEPRINT>"},"condition": {"type": "JQ","expressions": [],"combinator": "and"},"published": true},"variables": {},"links": [],"verbose": true},{"identifier": "run_prd_skill","title": "Run PRD skill with Port AI","icon": "AI","description": "Acts as a PM, loads the generate-prd skill, and scores how ready the ticket is for a coding agent","config": {"type": "AI","systemPrompt": "You act as a product manager. You must return ONLY a valid JSON object and nothing else.","userPrompt": "Ticket: {{ .outputs.trigger.diff.after.identifier }}\nTitle: {{ .outputs.trigger.diff.after.title }}\nDescription: {{ .outputs.trigger.diff.after.properties.description }}\n\nUse your tools to pull context from any linked service, repo, or project. Call load_skill with name \"generate-prd\", then follow its instructions exactly to produce a PRD in markdown.\n\nScore the result from 0-100 based on how many Open Questions the PRD left: 0 scores 90-100, 1-2 scores 60-89, 3 or more scores below 60. Set stage to Awaiting approval if you rewrote the description, or Approved if confidence is 90 or above with no open questions.\n\nReturn EXACTLY: {\"spec_stage\":\"\",\"confidence_score\":0,\"ai_suggested_description\":\"\"}","tools": ["^(list|search|track|describe)_.*","load_skill"],"outputSchema": {"type": "object","properties": {"spec_stage": { "type": "string" },"confidence_score": { "type": "number" },"ai_suggested_description": { "type": "string" }}}},"variables": {},"links": [],"verbose": false},{"identifier": "write_suggestion","title": "Write suggestion to ticket","icon": "Details","description": "Writes the PRD, confidence score, and stage back to the ticket entity","config": {"type": "UPSERT_ENTITY","blueprintIdentifier": "<TICKET_BLUEPRINT>","mapping": {"identifier": "{{ .outputs.trigger.diff.after.identifier }}","properties": {"ai_suggested_description": "{{ .outputs.run_prd_skill.response | fromjson | .ai_suggested_description }}","confidence_score": "{{ (.outputs.run_prd_skill.response | fromjson | .confidence_score) | tonumber }}","spec_stage": "{{ .outputs.run_prd_skill.response | fromjson | .spec_stage }}"}},"onFailure": "terminate"},"variables": {},"links": [],"verbose": false},{"identifier": "human_review","title": "Review PRD agent output","icon": "Details","description": "Pauses for a human to approve the suggestion or send it back with feedback","config": {"type": "INPUT","description": "Review the PRD agent's suggestion for {{ .outputs.trigger.diff.after.title }}. Open the ticket in Port to read the full PRD before deciding.","userInputs": {"properties": {"notes": {"type": "string","title": "Feedback notes","description": "What's missing or needs to change. Only used when sending the spec back."}},"buttons": [{ "identifier": "approve", "label": "Approve", "variant": "PRIMARY" },{ "identifier": "send_back", "label": "Send back for more detail", "variant": "DANGER" }]},"outlets": [{ "evaluationMethod": "button", "identifier": "approve", "title": "Approve", "numOfResponders": 1 },{ "evaluationMethod": "button", "identifier": "send_back", "title": "Send back", "numOfResponders": 1 }],"responders": {"users": ["<YOUR_EMAIL>"]}},"variables": {},"links": [],"verbose": false},{"identifier": "approve_ticket","title": "Mark ticket approved","icon": "Details","description": "Sets the ticket to Approved once a reviewer accepts the suggestion","config": {"type": "UPSERT_ENTITY","blueprintIdentifier": "<TICKET_BLUEPRINT>","mapping": {"identifier": "{{ .outputs.trigger.diff.after.identifier }}","properties": {"spec_stage": "Approved","confidence_score": 100}},"onFailure": "terminate"},"variables": {},"links": [],"verbose": false},{"identifier": "revise_with_feedback","title": "Revise PRD with feedback","icon": "AI","description": "Re-runs the generate-prd skill, incorporating the reviewer's feedback notes","config": {"type": "AI","systemPrompt": "You act as a product manager. You must return ONLY a valid JSON object and nothing else.","userPrompt": "Ticket: {{ .outputs.trigger.diff.after.identifier }}\nTitle: {{ .outputs.trigger.diff.after.title }}\nPrevious PRD: {{ .outputs.run_prd_skill.response | fromjson | .ai_suggested_description }}\nReviewer feedback: {{ .outputs.human_review.responses[0].inputs.notes }}\n\nCall load_skill with name \"generate-prd\" again, and revise the PRD to address the reviewer's feedback.\n\nReturn EXACTLY: {\"spec_stage\":\"\",\"confidence_score\":0,\"ai_suggested_description\":\"\"}","tools": ["^(list|search|track|describe)_.*","load_skill"],"outputSchema": {"type": "object","properties": {"spec_stage": { "type": "string" },"confidence_score": { "type": "number" },"ai_suggested_description": { "type": "string" }}}},"variables": {},"links": [],"verbose": false},{"identifier": "write_revised_suggestion","title": "Write revised suggestion to ticket","icon": "Details","description": "Writes the revised PRD back to the ticket and keeps it in Draft for another review pass","config": {"type": "UPSERT_ENTITY","blueprintIdentifier": "<TICKET_BLUEPRINT>","mapping": {"identifier": "{{ .outputs.trigger.diff.after.identifier }}","properties": {"ai_suggested_description": "{{ .outputs.revise_with_feedback.response | fromjson | .ai_suggested_description }}","confidence_score": "{{ (.outputs.revise_with_feedback.response | fromjson | .confidence_score) | tonumber }}","spec_stage": "Draft"}},"onFailure": "terminate"},"variables": {},"links": [],"verbose": false}],"connections": [{"description": "Starts the PRD skill once a new ticket lands in the catalog","sourceIdentifier": "trigger","targetIdentifier": "run_prd_skill"},{"description": "Writes the PRD agent's suggestion to the ticket","sourceIdentifier": "run_prd_skill","targetIdentifier": "write_suggestion"},{"description": "Pauses for human review once the suggestion is written","sourceIdentifier": "write_suggestion","targetIdentifier": "human_review"},{"description": "Marks the ticket approved when the reviewer approves","sourceIdentifier": "human_review","targetIdentifier": "approve_ticket","sourceOutletIdentifier": "approve"},{"description": "Revises the PRD when the reviewer sends it back","sourceIdentifier": "human_review","targetIdentifier": "revise_with_feedback","sourceOutletIdentifier": "send_back"},{"description": "Writes the revised PRD back to the ticket","sourceIdentifier": "revise_with_feedback","targetIdentifier": "write_revised_suggestion"}]} -
Replace
<YOUR_EMAIL>in thehuman_reviewnode with the email of whoever should review PRDs, or add more emails to route reviews to a team. -
Click Apply changes.
For production use, add a condition node after Run PRD skill with Port AI that checks whether the response is empty before writing the suggestion back, the same way the automatically resolve tickets with Port guide gates on AI context. This guide skips it to keep initial setup short. Likewise, a send-back only revises the PRD once; wire write_revised_suggestion back into another human_review node if you want repeated review rounds.
This path needs a standalone PRD agent plus two self-service actions: one the agent uses to write its suggestion, and one a human uses to approve it or send it back.
Create the spec suggestion action
The PRD agent calls this action to write its suggestion, score, and stage back to the ticket. Create it first so the agent can reference it.
-
Go to the self-service page in Port.
-
Click on
+ New Action. -
Click on the
{...} Edit JSONbutton. -
Copy and paste the following JSON configuration:
Submit PRD suggestion action (click to expand)
{"identifier": "submit_prd_suggestion","title": "Submit PRD suggestion","description": "Used by the PRD agent to write its spec suggestion, confidence score, and stage back to the ticket","trigger": {"type": "self-service","operation": "CREATE","userInputs": {"properties": {"ticket": {"type": "string","blueprint": "<TICKET_BLUEPRINT>","title": "Ticket","format": "entity"},"ai_suggested_description": {"type": "string","title": "AI suggested description","format": "markdown"},"confidence_score": {"type": "number","title": "Confidence score","minimum": 0,"maximum": 100},"spec_stage": {"type": "string","title": "Spec status","enum": ["Not started", "Draft", "Awaiting approval", "Approved"]}},"required": ["ticket", "confidence_score", "spec_stage"],"order": ["ticket", "ai_suggested_description", "confidence_score", "spec_stage"]}},"invocationMethod": {"type": "UPSERT_ENTITY","blueprintIdentifier": "<TICKET_BLUEPRINT>","mapping": {"identifier": "{{ .inputs.ticket.identifier }}","properties": {"ai_suggested_description": "{{ .inputs.ai_suggested_description }}","confidence_score": "{{ .inputs.confidence_score }}","spec_stage": "{{ .inputs.spec_stage }}"}}},"requiredApproval": false} -
Click
Saveto create the action.
Create the review action
This is the control point: a human approves the PRD agent's suggestion and routes the ticket forward, or sends it back with feedback.
-
Go back to the self-service page in Port.
-
Click on
+ New Action. -
Click on the
{...} Edit JSONbutton. -
Copy and paste the following JSON configuration:
Review PRD agent output action (click to expand)
{"identifier": "review_prd_agent_output","title": "Review PRD agent output","description": "Approve the PRD agent's suggested spec and route the ticket, or send it back with feedback","trigger": {"type": "self-service","operation": "DAY-2","userInputs": {"properties": {"decision": {"type": "string","title": "Decision","enum": ["Approve", "Send back for more detail"],"enumColors": {"Approve": "green","Send back for more detail": "red"}},"notes": {"type": "string","title": "Feedback notes","description": "What's missing or needs to change. Only used when sending the spec back."}},"required": ["decision"],"order": ["decision", "notes"]},"blueprintIdentifier": "<TICKET_BLUEPRINT>"},"invocationMethod": {"type": "WEBHOOK","url": "https://api.port.io/v1/agent/prd_agent/invoke","agent": false,"synchronized": true,"method": "POST","headers": {"RUN_ID": "{{ .run.id }}","Content-Type": "application/json"},"body": {"prompt": "A human reviewer made a decision on this ticket's spec.\n\nDecision: {{ .inputs.decision }}\nFeedback notes: {{ .inputs.notes }}\n\nTicket: {{ .entity.identifier }}\nCurrent description: {{ .entity.properties.description }}\nAI suggested description: {{ .entity.properties.ai_suggested_description }}\n\nIf the decision is Approve, call submit_prd_suggestion with spec_stage Approved and confidence_score 100, keeping the AI suggested description. If the decision is Send back for more detail, incorporate the feedback notes and call submit_prd_suggestion again with an improved ai_suggested_description and spec_stage Draft.","labels": {"source": "review_prd_agent_output_action","ticket_id": "{{ .entity.identifier }}"}}},"requiredApproval": false} -
Click
Saveto create the action.
Create the PRD agent
-
Go to the AI Agents page in Port.
-
Click on
+ AI Agent. -
Toggle
Json modeon. -
Copy and paste the following JSON schema:
PRD agent configuration (click to expand)
{"identifier": "prd_agent","title": "PRD agent","icon": "Details","team": [],"properties": {"description": "A PM agent that runs the generate-prd skill against incoming tickets, fills gaps, and decides when a ticket is ready to route to an AI coding agent or a human","status": "active","prompt": "You act as a product manager preparing tickets for coding agents.\n\n### Steps\n1. **Gather context.** If the ticket links to other entities (service, repo, team, owner), use your tools (list_entities, search_entities, etc.) to pull relevant details before writing anything.\n2. **Load and run the PRD skill.** Call load_skill with name \"generate-prd\", then follow its instructions exactly to produce the PRD.\n3. **Score (0-100)** based on how many Open Questions the skill's output left: 0 open questions scores 90-100, 1-2 scores 60-89, 3 or more scores below 60.\n4. **Assign a stage:** Awaiting approval if you rewrote the description, Approved if confidence is 90 or above with no open questions.\n\n### Response rules\nAlways call submit_prd_suggestion with the ticket identifier, confidence_score, spec_stage, and ai_suggested_description set to the full PRD in markdown (empty string only if the ticket already had a complete PRD).\n\nIf you're responding to a human review decision instead of an initial triage, follow the reviewer's decision: Approve sets spec_stage to Approved and confidence_score to 100. Send back for more detail means you re-run the generate-prd skill incorporating the reviewer's feedback notes and keep spec_stage as Draft.","execution_mode": "Automatic","tools": ["^(list|search|track|describe)_.*","load_skill","run_submit_prd_suggestion"]},"relations": {}} -
Click
Createto save the agent.
Create the trigger automation
This automation invokes the PRD agent whenever a new ticket is created or synced to the catalog.
-
Go to the automations page in Port.
-
Click on
+ Automation. -
Copy and paste the following JSON schema:
Trigger PRD agent automation (click to expand)
{"identifier": "trigger_prd_agent_on_ticket_created","title": "Trigger PRD agent on ticket created","description": "Runs the PRD agent's PRD skill whenever a new ticket is created or synced to the catalog","icon": "AI","trigger": {"type": "automation","event": {"type": "ENTITY_CREATED","blueprintIdentifier": "<TICKET_BLUEPRINT>"},"condition": {"type": "JQ","expressions": [],"combinator": "and"}},"invocationMethod": {"type": "WEBHOOK","url": "https://api.port.io/v1/agent/prd_agent/invoke","agent": false,"synchronized": true,"method": "POST","headers": {"RUN_ID": "{{ .run.id }}","Content-Type": "application/json"},"body": {"prompt": "Here is the ticket information:\n\nTicket: {{ .event.diff.after.identifier }}\nTitle: {{ .event.diff.after.title }}\nDescription: {{ .event.diff.after.properties.description }}\nRelated entities: {{ .event.diff.after.relations }}","labels": {"source": "trigger_prd_agent_on_ticket_created","ticket_id": "{{ .event.diff.after.identifier }}"}}},"publish": true} -
Click
Createto save the automation.
Test the flow
Now let's verify that a new ticket gets triaged and routed correctly.
Create a test ticket
- Create a new ticket in your ticket source with minimal information, for example:
- Title: "Add search to the storefront".
- Description: "Users can't search for products on the website".
Skip the integration and create a mockWorkItem entity directly on your <TICKET_BLUEPRINT> blueprint instead:
- Go to your catalog page and open your ticket blueprint.
- Click + Entity.
- Set the identifier to
mockWorkItem, the title to "Add search to the storefront", and the description to "Users can't search for products on the website". - Click Create.
Creating this entity fires the same ENTITY_CREATED event a real synced ticket would, so the rest of the flow (PRD agent, scorecard, review) behaves identically. Delete mockWorkItem once you're ready to test against real tickets.
Verify the PRD agent ran
- Go to your Port catalog and find the synced ticket.
- Check that
confidence_scoreandspec_stagewere filled in, and thatai_suggested_descriptionholds a full PRD (problem statement, success criteria, out of scope, dependencies, open questions). - Check the
ticket_routing_readinessscorecard. Without a priority and assignee set, it should read Not triaged.
Verify routing
- Set the ticket's priority and assignee. The scorecard should move to Triaged.
- Approve the suggestion:
- Workflow: open the workflow run, click Provide inputs on the
human_reviewnode, and press Approve. - Actions & automations: run the
review_prd_agent_outputaction and choose Approve.
- Workflow: open the workflow run, click Provide inputs on the
- Check that the scorecard moves to Ready for AI agent, and that
spec_stageis nowApproved. - Repeat on a different ticket, but send it back with a note instead (Send back for more detail on the input node, or the same choice in the
review_prd_agent_outputaction). Check that the PRD agent regeneratesai_suggested_descriptionand keepsspec_stageasDraft.
Related guides
- Automatically resolve tickets with Port
- Triage work items for coding agents
- Implement the work item blueprint pattern - a deeper pattern to adopt once this PRD agent is running, if you need multi-stage tracking across plan, develop, deploy.
- Routing decision - the fuller routing model this guide's scorecard is a lean version of.
- Connect your coding agents to Port