Skip to content
Artem KK edited this page Nov 10, 2024 · 1 revision

Welcome to Murmur Wiki 🌟

Welcome to the official wiki for Murmur, a sophisticated multi-agent system that orchestrates different specialized AI agents using local LLM models. This wiki serves as the central knowledge base for understanding, using, and contributing to the project.

Table of Contents

Overview

Murmur is an intelligent orchestration system that integrates multiple Large Language Models (LLMs) built on the Ollama architecture. The system implements a sophisticated pipeline of specialized agents to process and respond to user queries with high accuracy and reliability.

Key Features

  • πŸ€– Multi-agent architecture with specialized roles
  • πŸ”„ Asynchronous processing pipeline
  • πŸ’Ύ Local LLM integration via REST API
  • 🧠 Conversation memory management
  • πŸ“Š Confidence-based response evaluation
  • ⚠️ Comprehensive error handling

Current Status

  • Version: 1.1.0
  • Stability: Beta
  • Python Support: 3.7+
  • License: MIT

System Architecture

Agent Pipeline

User Input β†’ Interpreter β†’ Reasoner β†’ Generator β†’ Critic β†’ Final Response

Each agent in the pipeline serves a specific purpose:

  1. Interpreter Agent

    • Model: mistral-nemo:latest
    • Purpose: Analyzes user intent and context
    • Key functions:
      • Intent recognition
      • Context analysis
      • Requirement identification
  2. Reasoner Agent

    • Model: llama3.2-vision:11b
    • Purpose: Develops logical approach
    • Key functions:
      • Problem decomposition
      • Solution strategy development
      • Consideration analysis
  3. Generator Agent

    • Model: gemma2:9b
    • Purpose: Creates initial responses
    • Key functions:
      • Content generation
      • Response structuring
      • Context incorporation
  4. Critic Agent

    • Model: llama3.2-vision:11b
    • Purpose: Reviews and refines content
    • Key functions:
      • Accuracy verification
      • Clarity assessment
      • Content refinement

Technical Components

  • LocalLLMConnector: Manages communication with local LLM server
  • AgentOrchestrator: Coordinates agent pipeline execution
  • Message System: Handles inter-agent communication
  • Confidence Scoring: Evaluates response quality

Getting Started

Prerequisites

  • Python 3.7+
  • Local LLM server (Ollama)
  • Required packages: aiohttp, asyncio

Installation Steps

  1. Clone the repository:
git clone https://github.com/KazKozDev/murmur.git
cd murmur
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure local LLM server:
# Default server URL: http://localhost:11434
# Modify in config if needed

Basic Usage

# Start the application
python src/main.py

# Enter queries when prompted
Enter your message: What is the capital of France?

# Review response and confidence score
Response: The capital of France is Paris.
Confidence: 0.95

Configuration Guide

Model Configuration

Models can be configured in the AgentOrchestrator initialization:

self.agents = {
    AgentRole.INTERPRETER: BaseAgent("Interpreter", "mistral-nemo:latest", AgentRole.INTERPRETER),
    AgentRole.REASONER: BaseAgent("Reasoner", "llama3.2-vision:11b", AgentRole.REASONER),
    AgentRole.GENERATOR: BaseAgent("Generator", "gemma2:9b", AgentRole.GENERATOR),
    AgentRole.CRITIC: BaseAgent("Critic", "llama3.2-vision:11b", AgentRole.CRITIC)
}

Server Configuration

Default server settings in LocalLLMConnector:

base_url = "http://localhost:11434"
timeout = 30.0
max_retries = 3

Development Guidelines

Code Style

  • Follow PEP 8 guidelines
  • Use Black formatter
  • Sort imports with isort
  • Include type hints
  • Write comprehensive docstrings

Testing

  • Write unit tests for new features
  • Ensure test coverage > 80%
  • Run tests before submitting PR:
pytest tests/

Pull Request Process

  1. Fork the repository
  2. Create feature branch
  3. Implement changes
  4. Add tests
  5. Submit PR

Troubleshooting

Common Issues

  1. Connection Errors

    • Verify LLM server is running
    • Check server URL configuration
    • Ensure network connectivity
  2. High Resource Usage

    • Reduce conversation memory size
    • Adjust model configurations
    • Monitor system resources
  3. Low Confidence Scores

    • Check input quality
    • Verify model availability
    • Review agent configurations

Debug Mode

Enable debug logging:

logging.basicConfig(level=logging.DEBUG)

FAQ

Q: Can I use different LLM models? A: Yes, any model compatible with the Ollama API can be configured.

Q: How is conversation context maintained? A: Through a deque-based memory system with configurable size.

Q: What's the recommended hardware? A: Minimum 16GB RAM, modern multi-core CPU, and SSD storage.


For more information, visit our GitHub repository or contact the maintainers.