Live AI supervision for Gemma-powered workspaces, with Gemini-based monitoring, interruption, and plain-language explanation.
- Aditya Sakhale -
axs10415@nyu.edu - Yash Sharma -
ys6587@nyu.edu
MMASION is a live AI supervision system built around a simple idea:
- let a visible assistant do the work
- let a second intelligence layer monitor that work in real time
- intervene before unsupported or risky output becomes the final answer
In this repository:
Gemma 12Bis the visible workerGeminiis the background monitor and explainerMMASIONis the orchestration, intervention, and human-checkpoint layer
MMASION is not another chatbot. It is a control layer that supervises AI behavior as it happens.
Most demos stop at "the model answered."
MMASION focuses on what happens before trust is granted.
The system is built around:
- live supervision instead of after-the-fact review
- multi-model execution instead of one model doing everything
- multi-agent monitoring instead of one generic verifier
- human checkpoints as part of the runtime, not a manual add-on
The core pitch is simple:
Gemma does the work. MMASION helps you trust the work.
The system is intentionally split into two interfaces:
This is the visible assistant workspace.
What you can do there:
- chat with Gemma naturally
- upload files
- use voice input
- hear audio playback
- receive MMASION interruptions directly inside the chat when a checkpoint is needed
This is the passive monitoring and control console.
What you can see there:
- live reasoning feed
- intervention state
- active monitoring agents
- operator actions
- plain-language explanation output
That separation is the product.
The user works inside Gemma, while MMASION quietly watches:
- user prompts
- model responses
- uploaded files
- voice transcripts
- human overrides
- Open the Gemma workspace.
- Upload a file or speak to Gemma naturally.
- Ask Gemma to interpret, summarize, explain, or reason about the material.
- MMASION creates a blank linked monitor session and begins learning only from live events.
- MMASION auto-selects internal agents based on what it sees.
- Gemini validates the session in the background.
- If the question or answer goes beyond the evidence, MMASION interrupts.
- A human can decide in the Gemma tab what should happen next.
- MMASION can generate a plain-language explanation after enough grounded context exists.
MMASION is easiest to understand when the agents are split into two layers:
These are the task workers MMASION can route to depending on what the user is asking.
| Domain agent | Best used for |
|---|---|
Finance Agent |
Revenue, budgets, dividends, returns, profitability, forecasts, financial approvals |
Operations Agent |
Workflow state, logistics, process health, service delivery, execution bottlenecks |
Legal Agent |
Contracts, policy language, compliance wording, obligations, liability, disclosure risk |
IT Agent |
Systems, architecture, deployments, logs, technical changes, infrastructure operations |
HR Agent |
Employee workflows, hiring, workplace policy, performance-related process, people-sensitive cases |
Healthcare Agent |
Patient-facing workflows, healthcare documents, safety-sensitive health operations |
General Agent |
Fallback intake, broad summarization, mixed-domain tasks when confidence is low |
These are MMASION's internal supervision roles. They do not replace the domain worker. They decide whether the work should continue, be revised, or be stopped.
MMASION dynamically activates specialized agents depending on the session:
Conversation MonitorEvidence Scope AgentAction GuardDocument Intake AgentVendor Risk AgentData Governance AgentVoice SupervisorHuman Checkpoint AgentPolicy Counsel Agent
These are internal supervision roles, not separate user-facing services.
| Question type | Domain agent | Monitor agents that should activate |
|---|---|---|
| Finance spreadsheet or market question | Finance Agent |
Document Intake Agent, Evidence Scope Agent, Action Guard |
| Contract, compliance, or disclosure wording | Legal Agent |
Policy Counsel Agent, Action Guard, Human Checkpoint Agent when risky |
| System or deployment request | IT Agent |
Action Guard, Evidence Scope Agent, Policy Counsel Agent if policy-sensitive |
| Employee or workplace workflow | HR Agent |
Action Guard, Policy Counsel Agent, Human Checkpoint Agent |
| Healthcare or patient-impact workflow | Healthcare Agent |
Data Governance Agent, Action Guard, Human Checkpoint Agent |
| Operational workflow or process question | Operations Agent |
Conversation Monitor, Action Guard, Evidence Scope Agent |
| Mixed or unclear task | General Agent |
Conversation Monitor, Action Guard |
This is the clearest way to explain which agents should own which fields in the NYC-style reporting workflow.
| Field | Main domain agent | Main monitor agents |
|---|---|---|
agency |
Legal Agent or Operations Agent |
Conversation Monitor, Policy Counsel Agent |
tool_name |
IT Agent or Legal Agent |
Document Intake Agent, Conversation Monitor |
tool_desc |
IT Agent or Operations Agent |
Document Intake Agent, Conversation Monitor |
purpose_type |
Operations Agent |
Conversation Monitor, Policy Counsel Agent |
purpose_desc |
Operations Agent |
Conversation Monitor, Policy Counsel Agent |
data_training |
IT Agent or Healthcare Agent depending on context |
Data Governance Agent |
data_input |
IT Agent or Healthcare Agent depending on context |
Data Governance Agent |
data_output |
IT Agent or Operations Agent |
Data Governance Agent |
identifying_info |
Legal Agent or Healthcare Agent |
Data Governance Agent, Policy Counsel Agent |
computation_type |
IT Agent |
Conversation Monitor, Policy Counsel Agent |
population_type |
Operations Agent or Healthcare Agent |
Conversation Monitor, Policy Counsel Agent |
vendor_name |
Finance Agent or Legal Agent |
Vendor Risk Agent |
vendor_desc |
Finance Agent or Legal Agent |
Vendor Risk Agent |
updated |
IT Agent or Operations Agent |
Conversation Monitor |
updated_desc |
IT Agent or Operations Agent |
Document Intake Agent, Conversation Monitor |
When explaining the system live:
- domain agents do the task work
- monitor agents decide whether that work should be trusted
- MMASION sits above both and controls whether the session continues
MMASION does not require a complete prewritten brief before the conversation starts.
Each new Gemma chat begins blank, and MMASION infers context from:
- uploaded file contents
- user turns
- Gemma replies
- session behavior over time
The assistant doing the work and the system validating the work are intentionally separate.
That makes the architecture easier to explain and more trustworthy:
- visible worker UI
- independent trust layer
- live intervention before output is relied on
The app extracts uploaded content server-side so both Gemma and MMASION can reason over it.
Supported now:
.xlsx.xls.csv.json.txt.md
Voice is available through:
- browser-side capture
- server-side Gemini-based transcription
- browser fallback when server audio is throttled or unavailable
The product also includes a Stop voice control for playback interruption.
MMASION can:
- warn
- pause
- stop
- request a human decision
- inject a follow-up message back into the Gemma chat
The monitor can generate a simpler explainer after observing enough of the session.
That path is built around Gemini-powered explanation generation and interleaved output blocks.
Use a reporting schema or data dictionary and ask Gemma to:
- explain what disclosure fields mean
- summarize what is missing
- translate technical government language into resident-safe plain English
MMASION can then:
- watch for missing reporting context
- detect when Gemma overstates what the source supports
- produce a plain-language explanation
Upload a spreadsheet like a dividends CSV and ask Gemma something intentionally unsupported, such as:
- "Using only this file, tell me Mastercard's 2023 revenue."
- "Calculate total return from this dividends-only file."
- "Tell me the stock price from this dataset."
MMASION should step in because the file does not contain that metric.
If Gemma correctly refuses to invent a number or unsupported claim, MMASION can reinforce that grounded behavior with a short follow-up message.
See docs/ARCHITECTURE.md for the system diagram and high-level architecture notes.
Key components:
- Gemma workspace
- MMASION monitor
- session event stream
- session monitor
- Gemini reasoner
- Google audio bridge
- file extraction layer
- persistence store
- TypeScript
- Node.js
- lightweight custom server
- embedded HTML/CSS/JS frontends for both tabs
- Gemma 12B through Ollama
- Gemini 2.5 Flash for monitoring and explanation paths
- Gemini API
- Vertex-style provider abstraction
- Speech-to-Text / Text-to-Speech adapters
- Cloud Run deployment scaffolding
- BigQuery schema scaffolding
- Document AI planned path
- Gemini Live API planned path
src/
chat-ui.ts
ui.ts
server.ts
session-monitor.ts
transparency-explainer.ts
google-audio.ts
file-extraction.ts
monitor-reasoner.ts
vertex-session-reasoner.ts
compliance-schema.ts
providers/
docs/
ARCHITECTURE.md
BIGQUERY_SCHEMA.sql
FUTURE_SECURITY_SCOPE.md
NYC_TRANSPARENCY_ROADMAP.md
security/
scripts/
deploy-cloudrun.ps1
setup-bigquery.ps1
- Node.js
- Ollama
gemma3:12bpulled locally- optional Gemini API key
- optional Google access token for server-side speech and TTS
npm installcopy .env.example .envMMASION_PROVIDER=ollama
MMASION_OLLAMA_MODEL=gemma3:12b
MMASION_MONITOR_PROVIDER=auto
GEMINI_API_KEY=your_key_herenpm run devThen open:
http://localhost:4173/gemmahttp://localhost:4173/
See .env.example.
Key variables:
MMASION_PROVIDERMMASION_OLLAMA_MODELMMASION_MONITOR_PROVIDERGEMINI_API_KEYMMASION_GEMINI_API_KEYMMASION_VERTEX_MODELMMASION_VERTEX_LOCATIONMMASION_VERTEX_PROJECT_IDMMASION_VERTEX_ACCESS_TOKENMMASION_GOOGLE_ACCESS_TOKENMMASION_TTS_VOICE_NAME
npm run dev
npm run build
npm test
npm startGET /gemmaGET /
GET /api/systemGET /api/sessionsPOST /api/sessionsGET /api/sessions/:idPOST /api/sessions/:id/eventsPOST /api/sessions/:id/interventionPOST /api/gemma-chatPOST /api/extract-filePOST /api/audio/transcribePOST /api/audio/speak
Run:
npm test
npm run buildCurrent coverage includes:
- spreadsheet extraction
- session monitoring
- retry and escalation behavior
- human override flow
- supervisor orchestration logic
- Open the Gemma tab.
- Upload a spreadsheet or document.
- Ask Gemma a normal grounded question.
- Ask Gemma an intentionally unsupported question.
- Show MMASION reacting in the monitor tab.
- Show MMASION jumping into the Gemma chat.
- Resolve the checkpoint or let MMASION validate a grounded refusal.
Using only this file, tell me Mastercard's stock price and 2023 revenue.
That should be blocked or constrained because the dataset does not support those metrics.
This repo is built to align with a Google-native path without requiring a full cloud deployment on day one.
Gemini APIfor passive monitoring and explanation
- server-side speech transcription
- server-side text-to-speech path
- Vertex-style monitor provider selection
- Dockerfile
- cloudrun.yaml
- docs/BIGQUERY_SCHEMA.sql
- scripts/deploy-cloudrun.ps1
- scripts/setup-bigquery.ps1
The repository now includes a documented future-scope security hardening track for enterprise readiness.
Planned deliverables:
- VAPT test case library
- Word / PDF export path for test cases
- Garak configuration plan
- prompt injection payload library targeting MMASION agents
- VAPT slide outline for enterprise buyers
- OPA shadow policy starter
See:
- docs/FUTURE_SECURITY_SCOPE.md
- docs/security/VAPT_TEST_CASE_LIBRARY.md
- docs/security/GARAK_CONFIG_PLAN.md
- docs/security/PROMPT_INJECTION_LIBRARY.md
- docs/security/OPA_SHADOW_POLICY_STARTER.md
- docs/security/VAPT_SLIDE_OUTLINE.md
This is a working prototype, not a finished production platform.
Current limitations:
- local JSON persistence instead of a full database
- Gemini audio can still be rate-limited
- browser-based UI state is intentionally lightweight
- not all Google Cloud paths are fully productionized yet
- some monitoring heuristics are still rule-based rather than fully model-driven
- stronger live voice path
- cleaner intervention phrasing
- Cloud Run deployment proof
- BigQuery event logging
- Document AI ingestion
- Gemini Live API integration
- richer multimodal explanation output
- stronger model separation between worker and verifier
- multi-tenant platformization
- richer policy packs
- deeper audit analytics
- more enterprise deployment controls
Before publishing:
- keep
.envuntracked - only commit
.env.example - rotate local API keys and tokens if they were ever used in development
- avoid committing private uploads or personal data
- Aditya Sakhale -
axs10415@nyu.edu - Yash Sharma -
ys6587@nyu.edu