Views
No views yet
notion-agent — an ultra-compact (~980MB RAM), fast local AI planner and router specialized for the Notion Model Context Protocol (MCP).notion-agent is to run locally on resource-constrained laptops (e.g. 16GB RAM / Intel CPU) to:API-post-page (task/note creation) and API-query-data-source (status checks) with 0 cloud latency and 0 Gemini API quota usage.gemini-3.7-flash).1flowchart TD
2 User["👤 User Prompt"] --> NotionAgent["🤖 notion-agent (Local Qwen 2.5 1.5B / 0.5B)"]
3
4 NotionAgent --> Decision{"Deterministic Routing Decision"}
5
6 Decision -->|"Action: CALL_NOTION_TOOL\n(Tasks / Notes CRUD)"| MCP["📦 Notion MCP Server (Local)"]
7 Decision -->|"Action: ESCALATE_TO_GEMINI\n(Deep Cross-Doc Synthesis)"| Gemini["✨ Google Gemini 3.7 Flash"]
8 Decision -->|"Action: DIRECT_ANSWER\n(Simple greeting)"| Direct["💬 Instant Local Response"]
9
10 MCP --> Output["📊 Response with Execution Trace"]
11 Gemini --> Output
12 Direct --> Outputnotion-agent:model\scripts\build_model.bat1cd model
2ollama pull qwen2.5:1.5b
3ollama create notion-agent -f Modelfileollama run notion-agent "Add task 'Review Q3 metrics' with High priority"model/
├── Modelfile <- Ollama custom model definition with Notion MCP rules
├── README.md <- This documentation guide
├── data/
│ └── notion_mcp_dataset.json <- Synthetic training & fine-tuning dataset
├── scripts/
│ └── build_model.bat <- One-click Windows builder script
└── src/
├── dataset_generator.py <- Generates thousands of synthetic Notion prompt/tool pairs
├── train_lora.py <- PEFT/LoRA fine-tuning script for Qwen 2.5
├── export_gguf.py <- GGUF conversion & 4-bit quantization (llama.cpp)
└── upload_to_hf.py <- Uploads quantized GGUF directly to Hugging Face Hubpython model/src/dataset_generator.pypython model/src/train_lora.pyQ4_K_M)llama.cpp:python model/src/export_gguf.pywrite permissions.python model/src/upload_to_hf.py ./notion-qwen-1.5b.Q4_K_M.gguf <your-username>/notion-mcp-qwen-1.5b-gguf <your-hf-token>ollama run hf.co/<your-username>/notion-mcp-qwen-1.5b-gguf