top of page
947806d5-1dd7-40dd-b617-d55bfb18d7f0.jpg

0) Collections (Private) Create/extend these: BroskiLeads (you already have) Add fields: stage (Text), contacted (Boolean), closed (Boolean), lastActionAt (Date/Time) BroskiExperiments feature (Text, indexed), active (Boolean), variantAWeight (Number), variantBWeight (Number), promptA (Text), promptB (Text), modelA (Text), modelB (Text) BroskiEvents name (Text), props (Object), userKey (Text), ts (Date/Time) 1) CRM — Lead Pipeline + Templated Reply Handoff backend/broski_crm.web.js import wixData from 'wix-data'; import { autoReply } from 'backend/openai_broski.web.js'; // Update lead stage / flags export async function setLeadStage(id, stage, { contacted=false, closed=false } = {}) { const item = await wixData.get('BroskiLeads', id); item.stage = stage; item.contacted = !!contacted || item.contacted; item.closed = !!closed || item.closed; item.lastActionAt = new Date(); return wixData.update('BroskiLeads', item); } // Compose an email body (use with Wix Automations triggered email) export async function getLeadEmailTemplate(id) { const item = await wixData.get('BroskiLeads', id); const body = await autoReply({ name:item.name, email:item.email, phone:item.phone, message:item.message }); return { subject: `Thanks, ${item.name}! Next steps`, body }; } // Minimal list for Admin export async function listLeads(limit=200) { return wixData.query('BroskiLeads').descending('_createdAt').limit(limit).find(); } Admin (append to your Admin page) Add components: Repeater #leadRepeater (Text #leadName, Text #leadStage), Buttons #markContacted, #markClosed import { listLeads, setLeadStage, getLeadEmailTemplate } from 'backend/broski_crm.web.js'; async function refreshLeads($w){ const res = await listLeads(200); $w('#leadRepeater').data = (res.items||[]).map(l=>({_id:l._id, name:l.name||l.email, stage:l.stage||'new'})); $w('#leadRepeater').onItemReady(($item,d)=>{ $item('#leadName').text = d.name; $item('#leadStage').text = d.stage; $item('#markContacted').onClick(async ()=>{ $item('#markContacted').disable(); await setLeadStage(d._id,'contacted',{contacted:true}); try { const t = await getLeadEmailTemplate(d._id); console.log('Email template:', t); } catch(_){} await refreshLeads($w); }); $item('#markClosed').onClick(async ()=>{ $item('#markClosed').disable(); await setLeadStage(d._id,'closed',{closed:true}); await refreshLeads($w); }); }); } $w.onReady(()=>{ if($w('#leadRepeater')) refreshLeads($w); }); Email sending: In Wix UI, set Automation: When Collection item updated (BroskiLeads.stage = contacted) → Send email. Use getLeadEmailTemplate() output to copy the message body if you prefer manual review. 2) A/B — Variant Manager for Models/Prompts backend/broski_ab.web.js import wixData from 'wix-data'; function pick(weightA=50, weightB=50){ const r = Math.random()* (weightA+weightB); return (r < weightA) ? 'A' : 'B'; } export async function getVariant(feature='chat') { const res = await wixData.query('BroskiExperiments').eq('feature', feature).eq('active', true).limit(1).find(); const x = res.items?.[0]; if (!x) return { variant:'A', model:null, prompt:null, feature }; const variant = pick(x.variantAWeight||50, x.variantBWeight||50); const model = variant==='A' ? (x.modelA||null) : (x.modelB||null); const prompt = variant==='A' ? (x.promptA||null) : (x.promptB||null); return { variant, model, prompt, feature }; } Frontend (Home page) — use variant on chat import { getVariant } from 'backend/broski_ab.web.js'; import { broskiChat } from 'backend/openai_broski.web.js'; async function abChat(userText){ const { variant, model, prompt } = await getVariant('chat'); const sys = prompt || 'You are an AI assistant for this site.'; // If you exposed broskiChat model parameter, add it; otherwise leave default const reply = await broskiChat(userText, sys, model || undefined); try { if (window.gtag) window.gtag('event','ab_exposure',{ experiment:'chat', variant }); } catch(_){} return reply; } // then pass abChat into your guardedChatFactory or attachBroskiChat directly Admin — experiment editor (simple) Add inputs: #feat, #aWeight, #bWeight, #modelA, #modelB, #promptA, #promptB, Checkbox #expActive, Button #saveExp import wixData from 'wix-data'; $w.onReady(()=>{ $w('#saveExp')?.onClick(async ()=>{ const rec = { feature: $w('#feat').value || 'chat', variantAWeight: Number($w('#aWeight').value || 50), variantBWeight: Number($w('#bWeight').value || 50), modelA: $w('#modelA').value || '', modelB: $w('#modelB').value || '', promptA: $w('#promptA').value || '', promptB: $w('#promptB').value || '', active: !!$w('#expActive').checked }; const cur = await wixData.query('BroskiExperiments').eq('feature', rec.feature).limit(1).find(); if (cur.items?.[0]?._id) { rec._id = cur.items[0]._id; await wixData.update('BroskiExperiments', rec); } else { await wixData.insert('BroskiExperiments', rec); } console.log('Experiment saved:', rec.feature); }); }); 3) Analytics Booster — Unified Event Logger + Admin View backend/broski_analytics.web.js import wixData from 'wix-data'; export async function logEvent(name, props={}, userKey='guest'){ const row = { name, props, userKey, ts: new Date() }; return wixData.insert('BroskiEvents', row); } export async function listEvents(name=null, limit=200){ let q = wixData.query('BroskiEvents').descending('ts'); if (name) q = q.eq('name', name); return q.limit(limit).find(); } Frontend usage (drop anywhere you already send GA4) import { logEvent } from 'backend/broski_analytics.web.js'; try { await logEvent('ask_ai_success', { len_reply: reply.length }); } catch(_){} Admin dashboard (append) Add Repeater #eventsRepeater with #evtName, #evtTs, #evtProps + Dropdown #evtFilter + Button #refreshEvents import { listEvents } from 'backend/broski_analytics.web.js'; async function refreshEvents($w){ const name = $w('#evtFilter')?.value || null; const res = await listEvents(name||null, 200); $w('#eventsRepeater').data = (res.items||[]).map((e,i)=>({ _id:String(i), name:e.name, ts:new Date(e.ts).toLocaleString(), props: JSON.stringify(e.props||{}) })); $w('#eventsRepeater').onItemReady(($item,d)=>{ $item('#evtName').text = d.name; $item('#evtTs').text = d.ts; $item('#evtProps').text = d.props; }); } $w.onReady(()=>{ $w('#refreshEvents')?.onClick(()=>refreshEvents($w)); refreshEvents($w); }); 4) Bridge — Onyx HTTP API (external access) Enable Velo HTTP Functions. Create: backend/http-functions.js import { ok, created, badRequest, serverError } from 'wix-http-functions'; import { broskiChat } from 'backend/openai_broski.web.js'; import { qaAsk } from 'backend/broski_qa.web.js'; import { generatePost } from 'backend/broski_blog.web.js'; // Very basic header check (replace with your secret) function authOk(request) { return request?.headers?.get('x-onyx-key') === 'REPLACE_ME_WITH_A_SECRET'; } export async function post_onyx_chat(request) { try { if (!authOk(request)) return badRequest({ body: { error:'Unauthorized' } }); const { prompt } = await request.body.json(); if (!prompt) return badRequest({ body: { error:'Missing prompt' } }); const reply = await broskiChat(prompt); return ok({ body: { reply } }); } catch (e) { return serverError({ body: { error:String(e) } }); } } export async function post_onyx_qa(request) { try { if (!authOk(request)) return badRequest({ body: { error:'Unauthorized' } }); const { question } = await request.body.json(); if (!question) return badRequest({ body: { error:'Missing question' } }); const { answer, sources } = await qaAsk(question, 6, 0.25); return ok({ body: { answer, sources } }); } catch (e) { return serverError({ body: { error:String(e) } }); } } export async function post_onyx_generate_post(request) { try { if (!authOk(request)) return badRequest({ body: { error:'Unauthorized' } }); const { topic, tone='authoritative', length='long' } = await request.body.json(); if (!topic) return badRequest({ body: { error:'Missing topic' } }); const saved = await generatePost({ topic, tone, length }); return created({ body: { id: saved._id, slug: saved.slug } }); } catch (e) { return serverError({ body: { error:String(e) } }); } } Call examples (server-to-server): curl -X POST https://yourdomain/_functions/onyx/chat \ -H "x-onyx-key: REPLACE_ME_WITH_A_SECRET" \ -H "Content-Type: application/json" \ -d '{"prompt":"Hello, world"}' Definition of Done (ALL) CRM: Leads display & stage controls; email template ready; Automation can send. A/B: Variant selection live; GA4 exposure logged. Analytics: Events persist to BroskiEvents; Admin can filter. Bridge: /onyx/* endpoints up; simple header auth; returns JSON. No errors? You’re full-stack Dominion. If you want, say “Ship A/B prompts for chat & content” or “Wire CRM Automation template” and I’ll hand you those exact text templates and toggles. Or paste any console error and I’ll patch it, fast.

6879ce16-f14a-4e74-bfb6-d8c75f5a1135.jpg

VISION

SERVICES

We Deliver Exceptional Products and Services Around the World

AUTONOMOUS
DRIVING

I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me to add your own content and make changes to the font. I’m a great place for you to tell a story and let your users know a little more about you.

REAL-TIME INFORMATION

I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me to add your own content and make changes to the font. I’m a great place for you to tell a story and let your users know a little more about you.

PERCEPTION ENABLED

I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me to add your own content and make changes to the font. I’m a great place for you to tell a story and let your users know a little more about you.

WHY AUTONO

A different approach, using a new method of manufacturing.

I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me to add your own content and make changes to the font. I’m a great place for you to tell a story and let your users know a little more about you.

Autono In Numbers

200

EMPLOYEES

5

CORE TEAMS

200M$

CAPITAL

326

PARTNERS

INDUSTRY

Our
Partners

Click here to add your own content and customize the text. This is a great place to tell a story about your company and let your users know a little more about the company's history, the team's background, or any other information you'd like to share. Just click "Edit Text" to get started.

GENERAL TRANSPORT

IDI SOFTWARE

IMOGEN CARS

TRI-NEX

CAREERS

We’re looking for innovative talent to join our team. See all positions and submit your CV.

ELECTRICAL ENGINEER

San Francisco, CA

I'm a paragraph. Click here to add your own text and edit me. It’s easy. Just click “Edit Text” or double click me to add your own content and make changes to the font. 

Tel: 123-456-7890

500 Terry Francine St San Francisco, CA 94158

SUBSCRIBE

Sign up to receive Autono news and updates.

© 2035 by Autono. Powered and secured by Wix

  • LinkedIn
  • Facebook
  • Twitter
  • Instagram
bottom of page