Zettleinby Happy Sandboy
Menu

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.

ModeScopeRAG corpusTool pack
SellerCapture, price, list, negotiateOwn property, comps, KH legal packpublish_listing, price_benchmark, counter_offer, create_reservation_agreement, order_service
BuyerDiscover, qualify, offer, closeMarketplace, foreign-ownership rules, mortgage productssearch_listings, check_foreign_ownership, book_tour, submit_offer, mortgage_compare, request_escrow
InvestorYield & appreciation modelingRental history, district trends, tax packsportfolio_query, yield_model, search_listings, submit_offer
LandlordTenancies, maintenance, renewalsLease templates, arrears, service catalogcreate_lease, log_arrears, dispatch_service, send_message
PartnerLead intake, service deliveryCoverage areas, SLA, reviewsaccept_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.published

D · Tool catalog

Every action Zettlein can take.

tool/01

search_listings

read · sync

Faceted search against OpenSearch projection. Locale + eligibility aware.

tool/02

get_listing

read · sync

Full PDP payload including price truth, title type, disclosures.

tool/03

check_foreign_ownership

read · sync

Jurisdiction rule engine. Returns eligibility + rationale.

tool/04

book_tour

write · sync · audit

Creates calendar hold in Proassistly, notifies agent, returns confirmation.

tool/05

submit_offer

write · confirm · audit

Structured JSON offer. Requires user confirm step before RPC fires.

tool/06

counter_offer

write · confirm · audit

Drafts counter, flags red-flag terms, awaits human sign-off.

tool/07

create_reservation_agreement

write · confirm · audit

Assembles doc from jurisdiction pack DSL, e-sign flow attached.

tool/08

request_escrow

write · confirm · audit

Opens escrow account, returns deposit instructions per rail.

tool/09

order_service

write · sync

Photo, legal, valuation, mortgage broker — routed by coverage + reviews.

tool/10

generate_contract

write · confirm · audit

Full SPA from template DSL + captured facts + disclosures.

tool/11

run_kyc

write · async

Kicks off ID + liveness pipeline; agent polls status.

tool/12

publish_listing

write · confirm · audit

Terminal step of the capture flow. Emits 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

Every response passes through a rules layer that strips or rewrites claims that violate the current jurisdiction pack (e.g. foreigner land ownership in Cambodia).

PII scrubbing

both ways

Inbound uploads and outbound messages run through a PII detector; faces, plates, phone numbers and IDs blurred/redacted by default.

Money & contract confirm

hard gate

No offer, escrow, contract, payout, or KYC action fires without an explicit user confirmation card. Model cannot bypass.

AiAction audit

Proassistly

One row per model call: prompt hash, model id, cost, tools used, outcome, user id. Feeds analytics + regression tests.

F · Rollout

From advisor to transaction agent.

phase 1

Read-only advisor

Cambodia · KH/EN

Embed on Brokher PDP. RAG over listings + Cambodia legal pack. Zero write tools. Validates retrieval quality and latency before we ship any mutation.

phase 2

Structured actions

scoped tools

Enable book_tour, submit_offer, create_reservation_agreement. Each behind its own feature flag, each with hard confirm.

phase 3

Full transaction agent

escrow → payout

Contracts, escrow, e-sign, payout, cross-border FX, ZH market. Capture app becomes primary seller surface.