04 · Zettlein flow
The agent layer that closes the loop.
Brokher.com and Proassistly already exist. Zettlein is the missing surface: a multilingual advisor that reads through a projection and acts through a single RPC. This page defines the flow you don't have yet.
A · Runtime anatomy
One agent, three surfaces, one write path.
user ⇄ Zettlein UI (Brokher embed | Proassistly panel | Capture app)
│
▼
session-svc ──▶ agent-orchestrator ──▶ model-router (KH/EN/ZH · fast/deep)
│
┌───────────┼─────────────┐
▼ ▼ ▼
RAG tool-use guardrails
(listings, (Proassistly (PII, jurisdiction,
legal, RPC + events) hallucination gate,
market) money/contract confirm)Zettlein never touches the database. Reads go through a read-model + vector index fed by Proassistly's event bus. Writes go through one authenticated RPC surface. Everything the model does is captured as an AiAction row in Proassistly.
B · Modes
Same agent, five lenses.
| Mode | Scope | RAG corpus | Tool pack |
|---|---|---|---|
| Seller | Capture, price, list, negotiate | Own property, comps, KH legal pack | publish_listing, price_benchmark, counter_offer, create_reservation_agreement, order_service |
| Buyer | Discover, qualify, offer, close | Marketplace, foreign-ownership rules, mortgage products | search_listings, check_foreign_ownership, book_tour, submit_offer, mortgage_compare, request_escrow |
| Investor | Yield & appreciation modeling | Rental history, district trends, tax packs | portfolio_query, yield_model, search_listings, submit_offer |
| Landlord | Tenancies, maintenance, renewals | Lease templates, arrears, service catalog | create_lease, log_arrears, dispatch_service, send_message |
| Partner | Lead intake, service delivery | Coverage areas, SLA, reviews | accept_lead, quote_service, mark_delivered, invoice |
C · Capture pipeline
What makes Zettlein unique.
phone camera ──▶ on-device guidance (angle, height, exposure, coverage)
│
▼
upload (chunked, resumable) ──▶ media-svc / S3
│
▼
CV: room detection · segmentation · depth
│
┌─────────┼──────────────┬───────────────┐
▼ ▼ ▼ ▼
floor-plan photo video walk- virtual tour
synthesis enhance through gen (WebGL)
└─────────┬──────────────┘
▼
QA gate (min coverage, blur, lighting, PII blur)
│ pass │ fail → re-shoot prompt
▼
publish_listing ──▶ Proassistly RPC ──▶ event: listing.publishedD · Tool catalog
Every action Zettlein can take.
tool/01
search_listings
read · sync
tool/02
get_listing
read · sync
tool/03
check_foreign_ownership
read · sync
tool/04
book_tour
write · sync · audit
tool/05
submit_offer
write · confirm · audit
tool/06
counter_offer
write · confirm · audit
tool/07
create_reservation_agreement
write · confirm · audit
tool/08
request_escrow
write · confirm · audit
tool/09
order_service
write · sync
tool/10
generate_contract
write · confirm · audit
tool/11
run_kyc
write · async
tool/12
publish_listing
write · confirm · audit
listing.published.Every tool has a versioned input schema, an idempotency key, and a dry-run mode. Tools tagged confirm render a structured card in the UI and wait for explicit user approval before the RPC is called.
E · Guardrails & audit
Fail closed, log everything.
Jurisdiction filter
pre-generation
PII scrubbing
both ways
Money & contract confirm
hard gate
AiAction audit
Proassistly
F · Rollout
From advisor to transaction agent.
phase 1
Read-only advisor
Cambodia · KH/EN
phase 2
Structured actions
scoped tools
book_tour, submit_offer, create_reservation_agreement. Each behind its own feature flag, each with hard confirm.phase 3
Full transaction agent
escrow → payout