Originally created by: adityaharishch
Two coupled fixes to the pm-worklog synth agent (services/agents/pm_worklog_update/agents.py) that stop it returning reasoning prose instead of a parseable JiraUpdate.
post_hooksPIIDetectionGuardrail is an input guardrail (check(self, run_input)). It was wired into post_hooks, which only ever receive the run output — so agno could never supply run_input and it threw on every run:
TypeError: PIIDetectionGuardrail.check() missing 1 required positional argument: 'run_input'
Removed it (import + post_hooks entry). Not needed for now.
use_json_mode=True → False → schema-constrained outputWith use_json_mode=True, agno sent a bare {"type":"json_object"} (no schema), so the model was free to ramble and the parse failed:
Failed to parse cleaned JSON: Expecting value: line 1 column 1 (char 0)
raw=The user wants me to verify that the session summaries belong to ticket KAN-239...
With False, agno serialises the full JiraUpdate schema into the request as response_format: {"type":"json_schema", ...}. The MLX /v1/chat/completions handler reads that schema and FSM-constrains decoding with outlines, so the reasoning model physically cannot emit chain-of-thought instead of the JSON object.
The server-side /v1/chat/completions json_schema enforcement that this activates lives on #297 (feat/classifier-observability). This change is inert until [#297] lands — without the server half, agno sends the schema but the server ignores it. The PII removal (fix [#1]) is effective immediately regardless.
python -m py_compile agents/pm_worklog_update/agents.py ✓build_regex_from_schema, 2720 chars, no errors) — the constraint is valid for the real nested schema (BulletWithEvidence, enums, additionalProperties:false).
Ticket changed by: adityaharishch
Originally posted by: adityaharishch
🎉 This PR is included in version 1.56.0 🎉
The release is available on:
v1.56.0Your semantic-release bot 📦🚀