Skip to content

All work

Governed AI Agent Service

CanApply's student-facing agent, rebuilt on staging

I rebuilt CanApply's student-facing agent so the model can only propose: typed tools behind one policy engine, and a person's approval on every platform write. It reached staging twice in four weeks, AI-assisted, as architect and reviewer, under review and test gates I set. Staging only.

Status
Staging only
Period
2026
My role
Architecture, review and release engineering (AI-assisted)
Stack
Python, FastAPI, PostgreSQL, telic

Measured results

  • 4 weeks

    from an empty directory to two staging deployments of the governed agent service

    Staging only; email, reminders and scheduling off. AI-assisted, as architect and reviewer, under review and test gates I set.

In June 2026 I hand-tested the agent-native version of CanApply's assistant, a migration I had planned myself. The model was deciding for itself when to ask a student for approval. The test record reads: "Action required events must be enforced at policy level." The codebase had also grown past the point where I could review it with confidence.

So I started again in an empty directory beside the old layer, around one rule: the model may propose, but durable state and policy decide what happened. I built it between 8 July and 7 August 2026, AI-assisted, as architect and reviewer, under review and test gates I set.

68 typed tool contracts, validated against their schemas at registration, sit behind a single policy-enforcing gateway. Each contract declares one of 8 permission classes, and a small deterministic policy engine decides what can run. The model can never send email. Every platform write needs a human-approved record. Audit records are written before execution, and cost is reserved before a call, not reconciled after it.

It reached staging twice: a canary on 23 July 2026 and a full staging rollout on 6 August 2026, with email, reminders, reply polling and scheduling off in both. It never reached production and never had users.

The thing I'd put on the record is the rejection. The release process ended in a Product Owner gate, run by an AI release reviewer working under the Product Owner's authorization. On the Document Intelligence release candidates it ran a negative test against my verifier (evidence hash zeroed, exit code 0 → 99, skipped 0 → 99, status left as passed), and the verifier accepted the forged report and printed TAMPERED_REPORT_ACCEPTED. The gate came back REJECT.

The reject stood. For that Document Intelligence release, four numbered fixes and both regenerated release candidates came out of the AI-assisted run about eleven minutes later, and the gate re-reviewed them. REJECTED_RC_REVIEW.md stays in the repository where anyone can find it. The reviewer's own header says it is an AI reviewer, not a human credential.