Skip to main content

AI Features Overview

PMFriend uses Anthropic's Claude Haiku via direct JDK HttpClient (no SDK). Eleven surfaces are AI-augmented today. Every integration has a deterministic heuristic fallback so the product never hard-fails on an LLM outage.

What Claude touches

#FeatureEndpointPrompt versionFallback
1Triage classifierPOST /maintenance-requests/{id}/suggest-triageprompt-v2Keyword rules
2Work-order scope drafterPOST /work-orders/draft-scopeprompt-v1Raw tenant text
3Duplicate detectorPOST /maintenance-requests/{id}/detect-duplicateprompt-v1Jaccard overlap
4Property suggestionsGET /properties/{id}/ai-suggestionsprompt-v1Rule cascade
5Owner digest drafterPOST /owners/{id}/digests/draftprompt-v1Static template
6Contractor matching (roadmap)GET /work-orders/{id}/suggested-contractors— (rules today)Rules only
7One-click action chainPOST /properties/{id}/ai-actions/create-work-orderCompositeUses #1–#3
8Arrears-notice drafterPOST /notices/draft-arrearsprompt-v1State-specific templates
9Entry-notice drafterPOST /notices/draft-entry-noticeprompt-v1State-specific templates + reason → notice-period lookup
10Tribunal/VCAT case pack assemblerPOST /case-packs/draftprompt-v1Chronological recital + per-case-type relief template
11Inspection report writerPOST /inspections/draftprompt-v1Per-room recital + safety-keyword extraction

Prompt versioning

Every Claude response includes a modelVersion field like claude-haiku-4-5@prompt-v2. The version tag is stored on the resulting record (triage_suggestions, digest_drafts, etc.) so we can:

  • Evaluate prompt changes against stored outputs.
  • A/B test prompt revisions without breaking older data.
  • Audit-log "this request was triaged by prompt-v1, before we fixed the gas-heater false-positive".

Bumping a prompt = new version number + deploy. We never silently mutate an in-use prompt.

Circuit breaker

Each Claude integration has an independent circuit breaker:

  • 3 consecutive failures → circuit opens
  • All subsequent calls fall back to heuristic for 5 minutes
  • First call after the cooldown probes Claude; success closes the breaker

This stops a transient Anthropic outage from cascading into user-visible errors, while also capping cost (a broken deploy that keeps retrying Claude can't exceed 3 reqs / 5 min / surface).

Privacy at a glance

Sent to ClaudeNot sent to Claude
Tenant report text (triage, duplicate)Tenant name, email, mobile
Aggregated WO metadata for digestOwner email, financial figures beyond WO cost
Property address (for scope drafts only)Full property database IDs
Compliance rule friendly namesInternal UUIDs

Full detail: AI Fallbacks & Privacy.

Cost control

Claude Haiku pricing as of 2026-04: ~$0.80 / million input tokens, ~$4 / million output. A typical triage call is ~800 input + 200 output tokens = under $0.001 per request. An agency running 300 maintenance requests / month pays well under $1 / month in LLM cost.

Over-budget guardrails live in AnthropicClient:

  • Max tokens per request: 600 (output)
  • Timeout: 8 seconds
  • Circuit breaker as above

Pages in this section