
Steward AI
Perfex CRM AI Agent - PHP Script With Approval Queue

AI declaration: AI tools were used to assist with parts of the code, documentation and graphics of this item. The author directed, reviewed and tested every part before release.
What it does
- Assistant page and a side drawer on every admin page (Ctrl+J / Cmd+J) that knows which record is open
- Home briefing without any AI call: overdue invoices, tickets waiting, tasks due, new and quiet leads
- Approval queue with a field-level before/after view, risk level, edit before approve, reject with a reason, approve a whole plan, bulk approval for low-risk requests and keyboard shortcuts
- Stale-record guard: a change is not applied when the record changed after the request was made
- Two-person rule for high-risk requests
- Opt-in "apply without approval" for individual low-risk tools, only for requests made live in the assistant, always recorded in the audit trail
- Team playbooks: saved requests your team starts with "/" in the chat box
- Answers in each staff member's Perfex language
You need
- Perfex CRM 3.2 or newer (developed against 3.4.1; real-install test pending)
- PHP 8.1 or newer with curl, json, mbstring and openssl
- The Perfex cron job
- An AI provider account (Anthropic, OpenAI, OpenRouter) or a local Ollama server
- Public HTTPS for Claude custom connectors over OAuth