CoolFace
Apppublic

MCP-1st-Birthday/Mind_Weave

sourceHugging Faceupdated 10mo agoView on Hugging Face
2likes
App README

Mind Weave 🧠

Track: Track 2: MCP in Action

Description: Transform your raw thoughts into structured notes and beautiful visualizations instantly using a multi-agent AI system.

Link to demo : https://youtu.be/JUl15Od-yLE


πŸš€ Overview

Mind Weave is an intelligent "Concierge Agent" designed to streamline your personal knowledge management. It takes your raw, unstructured thoughtsβ€”brain dumps, meeting notes, or random ideasβ€”and weaves them into:

  1. 1.Structured Markdown Notes: Clean, organized, and tagged.
  2. 2.Mind Maps: Visual hierarchies of your concepts.
  3. 3.Flowcharts: Logical process flows extracted from your text.

Built with Google's Agent Development Kit (ADK) and powered by Gemini, Mind Weave uses a multi-agent architecture to think, structure, and visualize for you.


πŸ’‘ The Problem

We all have "messy thoughts." Capturing them is easy, but organizing them is hard.

  • β€”Cognitive Load: Turning a brain dump into a structured document takes mental energy.
  • β€”Lost Context: Raw notes often lose their meaning if not organized immediately.
  • β€”Lack of Visualization: We miss connections between ideas because we only see linear text.

Existing tools are either too simple (Notepad) or too complex (requiring manual setup of graphs and links).

πŸ› οΈ The Solution

Mind Weave solves this by automating the "structuring" and "visualizing" phase.

  1. 1.Input: You type (or paste) your raw text.
  2. 2.Process:
  3. 3.Note Taker Agent: Analyzes the text, extracts key ideas, generates a title/slug/tags, and streams a structured Markdown note in real-time.
  4. 4.Mind Mapper Agent: Reads the structured note and generates Mermaid.js code for a Mind Map and a Flowchart.
  5. 5.Output: You get a saved Markdown file and instant visual diagrams.

πŸ—οΈ Architecture

Mind Weave uses a Sequential Multi-Agent System orchestrated by Python.

mermaid
graph TD
    User[User Input] --> Orchestrator
    
    subgraph "Agent System (Google ADK)"
        Orchestrator -->|Raw Text| NoteAgent[Note Taker Agent]
        NoteAgent -->|Stream Text| UI[Gradio UI]
        NoteAgent -->|Tool Call| SaveNote[save_note_tool]
        
        SaveNote -->|Structured Content| Orchestrator
        Orchestrator -->|Content| MapAgent[Mind Mapper Agent]
        
        MapAgent -->|Tool Call| SaveMap[save_mindmap_tool]
        SaveMap -->|Mermaid Code| UI
    end
    
    subgraph "External Services"
        UI -->|Mermaid Code| Kroki[Kroki.io]
        Kroki -->|PNG Image| UI
    end

Key Features (Hackathon Requirements)

  1. 1.Multi-Agent System:
  2. 2.Note Taker: Specialized in text analysis and structuring.
  3. 3.Mind Mapper: Specialized in visualization logic (Mermaid syntax).
  4. 4.Sequential Flow: The output of the Note Taker becomes the input for the Mind Mapper.
  1. 1.Tools:
  2. 2.save_note_tool: Custom tool to save Markdown files to the local vault.
  3. 3.save_mindmap_tool: Custom tool to save diagram codes.
  4. 4.save_mindmap_tool: Custom tool to save diagram codes.
  5. 5.MCP Integration: Uses the Model Context Protocol (MCP) to export notes as:
  6. 6.PDF Files: Via local xhtml2pdf conversion.
  7. 7.Google Docs: Via Google Docs API (requires ADC).
  8. 8.Agentic Behavior: Agents decide when to call these tools based on their instructions.
  1. 1.Observability:
  2. 2.Real-time Logs: The UI displays "Agent Thoughts" and "Tool Calls" as they happen.
  3. 3.Streaming: The Note Taker streams its response token-by-token for a responsive experience.

πŸ’» Setup & Usage

Prerequisites

  • β€”Python 3.12+
  • β€”Google Cloud Project with Vertex AI API enabled (or AI Studio API Key).

Installation

  1. 1.Clone the repository:
bash
    git clone https://github.com/yourusername/mind-weave.git
    cd mind-weave
  1. 1.Install dependencies:
bash
    python3.12 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  1. 1.Set Environment Variables: Create a .env file or export directly:
bash
    export GOOGLE_API_KEY="your-gemini-api-key"
    export GOOGLE_CLOUD_PROJECT="your-project-id" # If using Vertex AI

Running the App

Launch the Gradio interface:

bash
PYTHONPATH=src python3.12 app.py

Open your browser at http://127.0.0.1:7860.


πŸ“‚ Project Structure

  • β€”src/agents/: Agent definitions (note_taker.py, mind_mapper.py) and orchestrator.py.
  • β€”src/core/: Core utilities (llm.py, tools.py, memory.py).
  • β€”src/ui/: Gradio application (app.py).
  • β€”vault/: Where your notes and diagrams are saved.

πŸ† Hackathon Checklist

  • β€”[x] Track: Concierge Agents.
  • β€”[x] Multi-Agent: Sequential flow (Note Taker -> Mind Mapper).
  • β€”[x] Tools: Custom file system tools.
  • β€”[x] Observability: Real-time streaming logs in UI.
  • β€”[x] Gemini Powered: Uses gemini-1.5-pro (or similar) via ADK.