Here is the Agent prompt:
Analyze this work item using the “Priority Reference for Defect Triage” article and project history.
Return ONLY valid JSON on a single line. No code fences, no explanations, no markdown.
Example:
{"priority":"High","reason":"API timeout after deployment; matches High rule per reference"}
Rules:
- The JSON must contain exactly two keys: "priority" and "reason".
- "priority" value must be exactly one of: Highest, High, Medium, Low.
- "reason" must be a short human-readable sentence (no quotes inside).
- Do not add spaces, line breaks, or any extra text before or after the JSON.
When i print the raw output i get it correctly:
Raw = {"priority":"Low","reason":"No summary or description details match any higher priority rule; defaulting to Low per reference"}
I am trying to return Priority and Reason as separate variables and they give output as empty
Raw = {{agentResponse}} Priority = {{jsonStringToObject(agentResponse).priority}} Reason = {{jsonStringToObject(agentResponse).reason}}
Priority =
Reason =
Can you help set the right json parsing for agent output. Based on it i want to assign right priority to ticket