--- title: MetaVision emoji: 🧠 colorFrom: indigo colorTo: green sdk: gradio sdk_version: 6.32.0 python_version: '3.12' app_file: hf_app.py pinned: false --- # MetaVision - Second Brain HackInnovision 2026, Track B: Agentic Workflow Automation & Context Engineering. **Goal:** turn a sponsor commitment change into an evidence-backed impact plan, obtain human approval, update dependent event records, and verify the outcome even when a tool fails. ## Start here - [Shared PC and skill setup](setup.md): consistent environment, Git workflow, Ponytail/Caveman installation and usage for every teammate. - [Detailed Project B blueprint](temp/PROJECT_B_BLUEPRINT.md): requirements, architecture, stack, memory, agents, reliability, implementation sequence, evaluation, and demo strategy. - [Complete system flowcharts](temp/PROJECT_B_SYSTEM_FLOWCHART.md): revision 2 visual workflow covering all six agents, mid-stream deliverables, corrections, scoped approval, adaptive replanning, recovery, outputs, and evaluation. - [Official problem statement](HackInnovision2026_PS.pdf): the source of the event requirements. ## Repository status The working prototype uses synthetic email, chat, tracker, budget, document and calendar records. It plans a sponsor change, requests scoped approval, executes approved actions, handles retries and concurrent edits, verifies records, and prevents duplicate effects on replay. Run the hosted Gradio interface locally with `uv sync --locked` then `uv run --locked python hf_app.py`. Open `http://localhost:7860` for the user workspace and `/admin/` for the operator console. The existing Streamlit demo remains available with `uv run --locked python -m streamlit run app.py`. The Gradio admin login uses username `admin` and the `ADMIN_PASSWORD` environment variable (or local ignored `.env`). Without this secret, the admin page and its APIs are disabled. Public visitors use isolated, in-memory demo sessions. Admin scenarios also have separate sessions; this is not a shared team database or a production account system. Sessions expire after one hour and do not survive refresh/restart. ## Hugging Face deployment Create a **Gradio → Blank → ZeroGPU (Free)** Space. The normal workflow uses the CPU. ZeroGPU requires a registered GPU function, so the admin console includes an optional hardware check; only clicking that check requests GPU time and uses quota. Hugging Face supplies `spaces` and PyTorch. No storage bucket is needed. Upload `README.md`, `hf_app.py`, `requirements.txt`, `second_brain/*.py` and `data/fixtures/*.json`, preserving the folders. The README metadata selects the Gradio entry point. Do not upload `.env`, Git history, runtime files, or presentation assets. In **Settings → Variables and secrets**, add `ADMIN_PASSWORD` as a secret. Optional admin-only live extraction uses the `GEMINI_API_KEY` secret; the public workspace uses deterministic extraction with no model calls. Run `uv run --locked python -m pytest -q` before deploying. Regenerate `requirements.txt` after dependency changes with `uv export --locked --no-dev --no-hashes --no-emit-project -o requirements.txt`. Known engine limits: no restart/resume durability, no cross-scenario long-term inheritance, and no calendar outage fallback. Connectors are simulated, the coordinator is a Python state machine, and a separate pre-approval verification agent is not implemented. Optional Gemini only contributes extraction that passes deterministic grounding checks. Prototype scope: fabricate the cross-application dataset; defer Gmail, Sheets, and Calendar APIs. The blueprint adapts typed graph context and deterministic-rule patterns from the supplied uplan-ai analysis, while retaining source evidence and adding independent preflight checks, approvals, and verified execution. Prior application code is not included. ## What the demo covers Synthetic email thread and team chat → structured change → dependency impact and deliverable classification → scoped approval → idempotent updates → read-back verification. The admin console exposes the action ledger and agent timeline, a fail-once tracker write, a concurrent deliverable edit that triggers plan v2 and delta approval, and replay with no duplicate effects. ## Event timing The brief specifies November 14, 2026, midnight to noon. The timetable places submission and shortlisting at 9:30-10:00 AM, although the rules specify a noon deadline. Target a submission-ready build by 9:30 AM and confirm the operational cutoff with organizers. Times are interpreted as local event time (IST); the PDF does not state a timezone. ## Working conventions - Keep secrets in local environment variables or an ignored `.env`; never commit credentials or real attendee/sponsor data. - Keep synthetic fixtures separate from runtime state. Generated databases and temporary PDF renders are ignored. - Keep `temp/PROJECT_B_BLUEPRINT.md` tracked: the folder name does not make this document disposable. - Commit small, working increments. Document simulated connectors and known limits honestly. - Keep `pyproject.toml`, `uv.lock`, and the exported `requirements.txt` in sync when dependencies change.