Skip to main content
Glama
orneryd

M.I.M.I.R - Multi-agent Intelligent Memory & Insight Repository

by orneryd
README.mdβ€’8.94 kB
# Mimir Open-WebUI Integration This directory contains the **Mimir Planning Assistant Pipeline** for Open-WebUI. ## 🎯 Current Status: Phase 1 Only **Focus**: Proving MCP connection + PM Agent task breakdown This simplified pipeline focuses on: 1. βœ… Testing MCP server connectivity 2. βœ… PM Agent (Ecko) creates task breakdown 3. βœ… Displays TODO list in chat 4. βœ… Saves plan to Neo4j **Not included yet** (Phase 2): - ❌ Multi-agent execution - ❌ Real-time monitoring - ❌ Final report synthesis - ❌ Sidebar updates ## πŸ“‚ Files - `mimir_orchestrator.py` - Simplified Phase 1 pipeline - `test_phase1.py` - Connection test script - `README.md` - This file ## πŸš€ Quick Start ### 1. Start Services ```powershell # From repo root docker-compose up -d # Wait 30 seconds for services to initialize Start-Sleep -Seconds 30 ``` ### 2. Test MCP Connection (Recommended) ```powershell # Run test script cd pipelines python test_phase1.py ``` Expected output: ``` πŸ” Testing MCP Server health... βœ… MCP Server is running πŸ“š Listing available MCP tools... βœ… Found 15 tools: - mimir_chain - mimir_execute - todo - todo_list ... 🎯 Testing mimir-chain (PM Agent)... βœ… PM Agent responded successfully ``` ### 3. Access Open-WebUI Open browser: `http://localhost:3000` 1. Create an account (first user is admin) 2. Look for "Mimir: PM Planning Assistant (Phase 1)" in models list 3. Select it and start chatting ### 4. Test PM Agent Try these prompts: ``` Build a REST API with user authentication Create a simple TODO app with React frontend Design a microservices architecture for e-commerce ``` Expected flow: ``` User: Build a REST API with user authentication πŸ” Testing MCP Server Connection... βœ… MCP Connection: OK 🎯 PM Agent (Ecko): Analyzing request and creating task breakdown... βœ… PM Task Breakdown Complete! πŸ“‹ TODO List ID: `todoList-abc123` πŸ“Š Tasks Created: 4 tasks ## πŸ“ Task Plan Summary Breaking project into 4 phases: 1. Research authentication patterns 2. Design database schema 3. Implement API endpoints 4. Write integration tests ## πŸ“‹ Task List 1. ⏳ **Research authentication patterns** - Evaluate JWT vs session-based auth 2. ⏳ **Design database schema** - Create users, roles, and sessions tables 3. ⏳ **Implement API endpoints** - POST /auth/login, /auth/logout, /auth/refresh 4. ⏳ **Write integration tests** - Test auth flow end-to-end --- ## 🎯 Next Steps The task plan has been saved to Neo4j. **Options:** 1. Review and edit tasks in Neo4j before execution 2. Run `mimir-execute` to start multi-agent execution (coming in Phase 2) 3. Query the plan: `Show me the tasks in list todoList-abc123` πŸ’‘ **Workflow saved at**: 2025-11-05T12:34:56.789Z ``` ## 🎨 UI Features ### Sidebar (Left Panel) ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ 🎯 Mimir Workflow β”‚ β”‚ βš™οΈ Executing (45%) β”‚ β”‚ β–“β–“β–“β–“β–“β–‘β–‘β–‘β–‘β–‘ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ βœ… Research options β”‚ β”‚ └─ ecko β”‚ β”‚ βš™οΈ Design schema β”‚ β”‚ └─ worker (active) β”‚ β”‚ ⏳ Implement endpoints β”‚ β”‚ └─ worker β”‚ β”‚ ⏳ Write tests β”‚ β”‚ └─ worker β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ Active Agents β”‚ β”‚ ● WORKER (2 active) β”‚ β”‚ ● QC (1 active) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` ### Main Chat (Right Panel) ``` User: Build a REST API... 🎯 PM Agent: Analyzing request... βœ… PM Summary: Breaking into 4 phases πŸ“‹ TODO List ID: todoList-1234 (4 tasks) [PM Agent Full Reasoning] β–Έ ⚑ Starting Parallel Execution πŸ€– Spawning Worker/QC Agents βœ… Task Completed: Research options (by ecko) πŸ’‘ Key Output: JWT with refresh tokens recommended [Task Details: Research options] β–Έ βš™οΈ Task In Progress: Design schema (by worker) βœ… Task Completed: Design schema (by worker) πŸ’‘ Key Output: PostgreSQL with normalized tables --- πŸ“Š Final Report Agent: Synthesizing... # πŸ“Š Mimir Workflow Final Report ... complete summary ... πŸ’Ύ Saving workflow to memory bank... βœ… Workflow saved: Memory node memory-1-xyz ``` ## βš™οΈ Configuration Edit pipeline settings in Open-WebUI: 1. Go to **Workspace β†’ Models** 2. Click "Mimir: PM Planning Assistant (Phase 1)" 3. Adjust **Valves** (settings): | Setting | Default | Description | |---------|---------|-------------| | `MCP_SERVER_URL` | `http://mcp-server:3000` | MCP server endpoint | | `SHOW_PM_FULL_OUTPUT` | `true` | Show complete PM reasoning | | `COLLAPSE_PM_DETAILS` | `true` | Collapse PM output by default | | `TEST_CONNECTION_ON_STARTUP` | `true` | Test MCP on pipeline load | ## πŸ”§ How It Works ### Connection Test ```python GET {MCP_SERVER_URL}/health β†’ Returns 200 if MCP server is running ``` ### PM Agent Call ```python POST {MCP_SERVER_URL}/message Body: { "method": "tools/call", "params": { "name": "mimir_chain", "arguments": { "task": "User's request", "agent_type": "pm", "create_todos": true } } } β†’ PM analyzes request β†’ Creates TODO list in Neo4j β†’ Returns task breakdown ``` ### Response Parsing ```python # Pipeline extracts: - todo_list_id: "todoList-xyz" - tasks: [{title, description, status}, ...] - summary: "Breaking into N phases..." ``` ## πŸ› Troubleshooting ### Pipeline Not Showing Up in Open-WebUI ```powershell # Check pipeline is mounted docker exec mimir-open-webui ls -la /app/pipelines # Should see: mimir_orchestrator.py ``` **Fix**: Restart Open-WebUI container ```powershell docker-compose restart open-webui ``` ### MCP Connection Failed ```powershell # Check MCP server is running docker ps | Select-String mcp-server # Test from host curl http://localhost:3000/health # Test from inside Open-WebUI docker exec mimir-open-webui curl http://mcp-server:3000/health ``` **Common issues**: 1. MCP server not started: `docker-compose up -d mcp-server` 2. Wrong network: Check `docker-compose.yml` network config 3. Port conflict: Check `docker ps` for port 3000 ### PM Agent Returns ERROR Check MCP server logs: ```powershell docker logs mcp-server --tail 50 ``` Common errors: - `mimir_chain tool not found` β†’ MCP server needs restart - `Neo4j connection failed` β†’ Check Neo4j is running - `Timeout` β†’ Increase timeout in pipeline (default: 300s) ### Empty Task List PM response might not include TODO list ID. Enable full output: 1. Open-WebUI β†’ Workspace β†’ Models 2. Find "Mimir: PM Planning Assistant" 3. Set `SHOW_PM_FULL_OUTPUT` = `true` 4. Set `COLLAPSE_PM_DETAILS` = `false` 5. Try again and inspect full PM output ### Test Manually Run test script: ```powershell cd pipelines python test_phase1.py ``` This tests: - MCP health endpoint - Tool listing - mimir-chain call - Response parsing ## πŸ“š Architecture ``` User Input in Open-WebUI ↓ mimir_orchestrator.py (Phase 1 Pipeline) ↓ [Test Connection] ↓ MCP Server (HTTP Transport) ↓ mimir-chain tool ↓ PM Agent (Ecko) ↓ Creates TODO list in Neo4j ↓ Returns task breakdown ↓ Pipeline displays in chat ``` **Phase 2 (Future)**: Add Worker/QC agents, real-time monitoring, final reports ## 🎯 Design Decisions 1. **Why simplify to Phase 1?** - Prove MCP connection works first - Test PM agent in isolation - Easier debugging - Build confidence before adding complexity 2. **Why Open-WebUI?** - 114k GitHub stars (production-ready) - Zero UI code needed - Native chat interface - Easy customization via Pipelines 3. **Why Python Pipeline vs Function?** - Pipelines = Workflow orchestration (our use case) - Functions = UI extensions (not needed yet) 4. **Why HTTP transport for MCP?** - Docker-friendly (no stdio complexity) - Easy to test with curl - Works across containers - Standard JSON-RPC protocol ## πŸš€ Next Steps (Phase 2) Once Phase 1 is stable: 1. βœ… Add `mimir-execute` call 2. βœ… Implement task monitoring loop 3. βœ… Add real-time progress updates 4. βœ… Create final report synthesis 5. βœ… Save to memory nodes 6. βœ… Add sidebar UI components ## πŸ“– Related Documentation - [Open-WebUI Pipelines Docs](https://github.com/open-webui/pipelines) - [Mimir Architecture](../docs/architecture/MULTI_AGENT_GRAPH_RAG.md) - [MCP Protocol Spec](https://spec.modelcontextprotocol.io/) - [Integration Summary](../docs/integration/OPENWEBUI_INTEGRATION.md) --- **Version**: 1.0.0-phase1 **Last Updated**: 2025-11-05 **Status**: Phase 1 - PM Agent Testing **Maintainer**: Mimir Development Team

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/orneryd/Mimir'

If you have feedback or need assistance with the MCP directory API, please join our Discord server