MCP-1st-Birthday/Mind_Weave
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:
- Structured Markdown Notes: Clean, organized, and tagged.
- Mind Maps: Visual hierarchies of your concepts.
- 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.
- Input: You type (or paste) your raw text.
- Process:
- Note Taker Agent: Analyzes the text, extracts key ideas, generates a title/slug/tags, and streams a structured Markdown note in real-time.
- Mind Mapper Agent: Reads the structured note and generates Mermaid.js code for a Mind Map and a Flowchart.
- Output: You get a saved Markdown file and instant visual diagrams.
ποΈ Architecture
Mind Weave uses a Sequential Multi-Agent System orchestrated by Python.
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
endKey Features (Hackathon Requirements)
- Multi-Agent System:
- Note Taker: Specialized in text analysis and structuring.
- Mind Mapper: Specialized in visualization logic (Mermaid syntax).
- Sequential Flow: The output of the Note Taker becomes the input for the Mind Mapper.
- Tools:
save_note_tool: Custom tool to save Markdown files to the local vault.save_mindmap_tool: Custom tool to save diagram codes.save_mindmap_tool: Custom tool to save diagram codes.- MCP Integration: Uses the Model Context Protocol (MCP) to export notes as:
- PDF Files: Via local
xhtml2pdfconversion. - Google Docs: Via Google Docs API (requires ADC).
- Agentic Behavior: Agents decide when to call these tools based on their instructions.
- Observability:
- Real-time Logs: The UI displays "Agent Thoughts" and "Tool Calls" as they happen.
- 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
- Clone the repository:
git clone https://github.com/yourusername/mind-weave.git
cd mind-weave- Install dependencies:
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Set Environment Variables: Create a
.envfile or export directly:
export GOOGLE_API_KEY="your-gemini-api-key"
export GOOGLE_CLOUD_PROJECT="your-project-id" # If using Vertex AIRunning the App
Launch the Gradio interface:
PYTHONPATH=src python3.12 app.pyOpen your browser at http://127.0.0.1:7860.
π Project Structure
src/agents/: Agent definitions (note_taker.py,mind_mapper.py) andorchestrator.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.
