β A Demo Architecture for Provenance π‘οΈπΈ
Built for the All things agentic hackathon (Gemini + Google Cloud).
MD-Confirm is an autonomous fleet of AI agents designed to establish cryptographically verifiable provenance for digital media.
Instead of trying to βcatch upβ with Generative AI to detect fakes, MD-Confirm proposes proactive cryptographic verification of digital content provenance at the exact moment of creation.
MD-Confirm does not claim: β βWe know this image is truth.β
MD-Confirm claims: β βWe can verify that this image has a confirmed origin and that its provenance chain has not been broken.β
MD-Confirm acts as an autonomous workflow agent. It takes the messy, multi-step chore of visual forensics and handles it end-to-end: automatically signing images at capture, managing zero-trust state via Google Firestore, and triggering a reasoning agent to analyze and anchor proofs on a public blockchain.
[ Camera/Client ]
β (1. Uploads Image)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MD-Confirm Agentic Gateway (FastAPI) β
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ€
β πΈ Agent 1: Edge β βοΈ Agent 3: Notary β
β Simulates hardware β Manages evidence publication β
β attestation & capture β policy (anchoring to chain) β
ββββββββ¬βββββββββββββββββββ΄ββββββββββββββββ¬βββββββββββββββ
β β
βΌ (2. Stores State) βΌ (3. Anchors Hash)
[ βοΈ Google Cloud Firestore] [ π Solana Blockchain ]
β β
β (4. Fetches State) β (5. Verifies Hash)
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π§ Agent 2: Gemini Verifier β
β Deterministic crypto check first, then LLM generates β
β a human-readable explanation of the final verdict. β
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β (6. Autonomous Verdict)
βΌ
[ π’ VERIFIED / π΄ NOT_CONFIRMED ]
# Clone the repository
git clone https://github.com/YOUR_USERNAME/md-confirm.git
cd md-confirm
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
.env file in the root directory:
GEMINI_API_KEY=your_gemini_api_key
X_DEVICE_ATTESTATION_KEY=your_secret_key_here
env/ folder and name it firestore-key.json.blockchain/devnet_wallet.json and fund it with Devnet SOL for on-chain anchoring.python -m uvicorn api.main:app --reload --port 8000
Open your browser and navigate to http://localhost:8000.
ash
docker build -t md-confirm .
docker run -p 8000:8000 --env-file .env md-confirm
ash
pytest tests/test_agent.py