Skip to content

Your SDK solves all of this. One interface. Unified logic. Local + hosted models. Fine-tuning. Agent tools. Enterprise-ready. Hybrid RAG.Star 🌟 if you like it!

License

Notifications You must be signed in to change notification settings

multimindlab/multimind-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

MultiMind SDK - Unified AI Development Toolkit Logo

MultiMind SDK: Unified AI Development Toolkit

Build, Fine-Tune, and Deploy Advanced AI Applications with Enterprise-Grade Compliance

MultiMind SDK License MultiMind SDK GitHub Stars CI Status

🚧 Project Status: In Active Development 🚧

Join the future of AI development! We're actively building MultiMind SDK and looking for contributors. Check our TODO list to see what's implemented and what's coming next. Connect with our growing community on Discord to discuss ideas, get help, and contribute to the project.

Why MultiMind SDK? β€’ Key Features β€’ Compliance β€’ Quick Start β€’ Documentation β€’ Examples β€’ Contributing

🐦 Follow on X

PyPI version Python versions PyPI weekly Downloads Dependencies Code Style: Black License

πŸš€ Why MultiMind SDK?

🧠 MultiMind SDK is the only open-source toolkit that unifies Fine-Tuning, RAG, Agent Orchestration, and Enterprise Compliance β€” all in one modular, extensible Python framework. Forget silos. While others focus on chaining, agents, or retrieval alone, MultiMind integrates them into one coherent developer-first experience, with:

  • πŸͺ„ Declarative YAML + CLI + SDK interfaces
  • πŸ“š RAG with hybrid (vector + knowledge graph) retrieval
  • πŸ€– Role-based agents with memory, tools, and task flow
  • πŸ” Self-improving agents with cognitive loop support
  • πŸ” Enterprise-ready: logging, compliance, GDPR, HIPAA, cost tracking
  • 🌍 Cloud + Edge deploy (Jetson, RPi, Offline mode)

πŸ“‘ Check out our Strategic Roadmap to see where we're headed!


πŸ“š Related Research

πŸ”¬ Symbolic Self‑Evolving Agents

  • Paper: Zhou et al. (2024), Symbolic Learning Enables Self‑Evolving Agents
  • Link: https://arxiv.org/abs/2406.18532
  • Implementation in MultiMindSDK: Reflexive DAG loops via JudgeAgent β†’ RewriterAgent, symbolic-style pipeline updates, and hybrid model routing.

🧠 Neuro‑Symbolic Logical Consistency

  • Paper: Calanzone et al. (2024), Logically Consistent Language Models via Neuro‑Symbolic Integration
  • Link: https://arxiv.org/abs/2409.13724
  • Relevance: Supports integrating logical loss constraints with hybrid symbolic agent modulesβ€”ideally realized through logical-check agents or constraint-based pipelines.

πŸ“š Hybrid RAG Architectures

  • Paper: Sarmah et al. (2024), HybridRAG: Integrating Knowledge Graphs and Vector Retrieval
  • Link: https://arxiv.org/abs/2408.04948
  • Implementation in MultiMindSDK: Hybrid RAG combining vector and knowledge‑graph retrieval agents, mirroring this design.

Key Benefits

  • πŸš€ Unified Interface: Streamline your AI development with one consistent API
  • πŸ’‘ Production-Ready: Enterprise-grade deployment, monitoring, and scaling
  • πŸ”Œ Extensible: Customizable architecture for your specific needs
  • πŸ“Š Enterprise Features: Comprehensive logging, monitoring, and cost tracking
  • πŸ”’ Compliance Ready: Built-in support for GDPR, HIPAA, and other regulations

✨ Key Features

1. Advanced Fine-Tuning

  • Parameter-Efficient Methods: LoRA, Adapters, Prefix Tuning, and more
  • Meta-Learning: MAML, Reptile, and prototype-based few-shot learning
  • Transfer Learning: Layer transfer and multi-task optimization
  • Resource-Aware Training: Automatic device selection and optimization

2. RAG System

  • Document Processing: Smart chunking and metadata management
  • Vector Storage: Support for FAISS and ChromaDB
  • Embedding Models: Integration with OpenAI, HuggingFace, and custom models
  • Query Optimization: Efficient similarity search and context management

3. Agent Development

  • Tool Integration: Built-in support for common tools and custom extensions
  • Memory Management: Short and long-term memory systems
  • Task Orchestration: Complex workflow management and prompt chaining
  • Model Composition: Protocol for combining multiple models and tools

4. Enterprise Compliance

  • Real-time Monitoring: Continuous compliance checks and alerts
  • Healthcare Compliance: HIPAA, GDPR, and healthcare-specific regulations
  • Privacy Protection: Differential privacy and zero-knowledge proofs
  • Audit Trail: Comprehensive logging and documentation
  • Alert Management: Configurable alerts and notifications
  • Compliance Dashboard: Interactive monitoring and reporting

5. Model Conversion

  • Format Support: PyTorch, TensorFlow, ONNX, GGUF, TFLite, Safetensors
  • Optimization: Quantization, pruning, graph optimization
  • Hardware Acceleration: CUDA, CPU, Neural Engine support
  • Conversion Pipeline: Validation, optimization, and verification
  • Custom Converters: Extensible converter architecture
  • Enterprise Features: Batch processing, streaming, and monitoring

Learn more about model conversion β†’

6. Model Client System & Routing

  • Extensible ModelClient base class for custom, classic, and transformer models
  • Mixture-of-Experts (MoE) and DynamicMoE for expert selection and runtime optimization
  • MultiModalClient for unified text, image, audio, video, and code model access
  • FederatedRouter for local/cloud and custom routing strategies

Model Client & Routing Example

from multimind.client.model_client import LSTMModelClient, MoEModelClient, MultiModalClient
from multimind.client.federated_router import FederatedRouter

# Example: LSTM Model Client
lstm_client = LSTMModelClient(model_path="lstm.pt", tokenizer=my_tokenizer)
print(lstm_client.generate("Hello world"))

# Example: Mixture-of-Experts (MoE)
def router_fn(prompt):
    return "lstm" if len(prompt) < 100 else "rnn"
moe_client = MoEModelClient({"lstm": lstm_client, "rnn": lstm_client}, router_fn)
print(moe_client.generate("Test input"))

# Example: MultiModalClient
mm_client = MultiModalClient(text_client=lstm_client)
print(mm_client.generate("Hello world", input_type="text"))

# Example: FederatedRouter
router = FederatedRouter(local_client=lstm_client, cloud_client=lstm_client)
print(router.generate("short prompt"))

πŸ”’ Compliance Features

MultiMind SDK provides comprehensive compliance support for enterprise AI applications:

Core Compliance Features

  • Real-time compliance monitoring
  • Healthcare-specific compliance checks
  • Interactive compliance dashboard
  • Alert management system
  • Compliance trend analysis

Advanced Compliance Mechanisms

  • Federated compliance shards
  • Zero-knowledge proofs
  • Differential privacy feedback loops
  • Self-healing patches
  • Model watermarking and fingerprint tracking
  • Dynamic regulatory change detection

Learn more about our compliance features β†’

πŸš€ Quick Start

Installation

# Basic installation
pip install multimind-sdk

# With compliance support
pip install multimind-sdk[compliance]

# With development dependencies
pip install multimind-sdk[dev]

# With gateway support
pip install multimind-sdk[gateway]

# Full installation with all features
pip install multimind-sdk[all]

Environment Setup

Copy the example environment file and add your API keys and configuration values:

cp examples/multi-model-wrapper/.env.example examples/multi-model-wrapper/.env

Note: Never commit your .env file to version control. Only .env.example should be tracked in git.

Build Your First RAG Application

from multimind.client.rag_client import RAGClient, Document

# Initialize the client
client = RAGClient()

# Add documents
docs = [
    Document(
        text="MultiMind SDK is a powerful AI development toolkit.",
        metadata={"type": "introduction"}
    )
]
await client.add_documents(docs)

# Query the system
results = await client.query("What is MultiMind SDK?")
print(results)

Fine-Tuning a Model

from multimind.fine_tuning import UniPELTPlusTuner

# Initialize the tuner
tuner = UniPELTPlusTuner(
    base_model_name="bert-base-uncased",
    output_dir="./output",
    available_methods=["lora", "adapter"]
)

# Train the model
tuner.train(
    train_dataset=your_dataset,
    eval_dataset=your_eval_dataset
)

Agent Development Example

from multimind.agents import Agent

# Initialize an agent
agent = Agent(name="ExampleAgent")

# Add tools and memory
agent.add_tool("search", tool_function=search_tool)
agent.add_memory("short_term", memory_capacity=10)

# Run the agent
response = agent.run("What is the capital of France?")
print(response)

Compliance Monitoring Example

from multimind.compliance import ComplianceMonitor

# Initialize compliance monitor
monitor = ComplianceMonitor(
    organization_id="org_123",
    enabled_regulations=["HIPAA", "GDPR"]
)

# Run compliance check
results = await monitor.check_compliance(
    model_id="model_123",
    data_categories=["health_data"]
)

# Get compliance dashboard
dashboard = await monitor.get_dashboard_metrics(
    time_range="7d",
    use_case="medical_diagnosis"
)

πŸ“š Documentation

Project Structure

multimind-sdk/
β”œβ”€β”€ multimind/                    # Core SDK package
β”‚   β”œβ”€β”€ gateway/                 # Gateway implementation
β”‚   β”‚   β”œβ”€β”€ api/                # API endpoints
β”‚   β”‚   β”œβ”€β”€ middleware/         # Request/response middleware
β”‚   β”‚   └── utils/              # Gateway utilities
β”‚   β”œβ”€β”€ client/                 # Client libraries
β”‚   β”‚   β”œβ”€β”€ rag_client.py      # RAG system client
β”‚   β”‚   β”œβ”€β”€ model_client.py    # Extensible model client system (LSTM, MoE, MultiModal, etc.)
β”‚   β”‚   β”œβ”€β”€ federated_router.py # Local/cloud and custom routing logic
β”‚   β”‚   β”œβ”€β”€ agent_client.py    # Agent system client
β”‚   β”‚   └── compliance_client.py # Compliance client
β”‚   β”œβ”€β”€ fine_tuning/           # Fine-tuning modules
β”‚   β”‚   β”œβ”€β”€ methods/           # Fine-tuning methods
β”‚   β”‚   β”œβ”€β”€ optimizers/        # Optimization strategies
β”‚   β”‚   └── trainers/          # Training implementations
β”‚   β”œβ”€β”€ model_conversion/      # Model conversion modules
β”‚   β”‚   β”œβ”€β”€ converters/        # Format converters
β”‚   β”‚   β”‚   β”œβ”€β”€ pytorch/      # PyTorch converters
β”‚   β”‚   β”‚   β”œβ”€β”€ tensorflow/   # TensorFlow converters
β”‚   β”‚   β”‚   β”œβ”€β”€ onnx/         # ONNX converters
β”‚   β”‚   β”‚   └── ollama/       # Ollama converters
β”‚   β”‚   β”œβ”€β”€ optimizers/        # Conversion optimizers
β”‚   β”‚   β”‚   β”œβ”€β”€ quantization/ # Quantization methods
β”‚   β”‚   β”‚   β”œβ”€β”€ pruning/      # Model pruning
β”‚   β”‚   β”‚   └── graph/        # Graph optimization
β”‚   β”‚   β”œβ”€β”€ validators/        # Format validators
β”‚   β”‚   └── utils/            # Conversion utilities
β”‚   β”œβ”€β”€ compliance/            # Compliance features
β”‚   β”‚   β”œβ”€β”€ monitors/         # Compliance monitoring
β”‚   β”‚   β”œβ”€β”€ validators/       # Compliance validation
β”‚   β”‚   └── reporting/        # Compliance reporting
β”‚   └── utils/                # Utility functions
β”œβ”€β”€ examples/                  # Example implementations
β”‚   β”œβ”€β”€ cli/                  # Command-line examples
β”‚   β”‚   β”œβ”€β”€ rag_cli.py       # RAG CLI tool
β”‚   β”‚   └── agent_cli.py     # Agent CLI tool
β”‚   β”œβ”€β”€ api/                  # API and integration examples
β”‚   β”‚   β”œβ”€β”€ fastapi/         # FastAPI examples
β”‚   β”‚   └── flask/           # Flask examples
β”‚   β”œβ”€β”€ model_conversion/     # Model conversion examples
β”‚   β”‚   β”œβ”€β”€ converters/      # Converter examples
β”‚   β”‚   β”‚   β”œβ”€β”€ pytorch_to_gguf.py
β”‚   β”‚   β”‚   β”œβ”€β”€ tensorflow_to_tflite.py
β”‚   β”‚   β”‚   β”œβ”€β”€ onnx_to_ort.py
β”‚   β”‚   β”‚   β”œβ”€β”€ pytorch_to_safetensors.py
β”‚   β”‚   β”‚   └── tensorflow_to_onnx.py
β”‚   β”‚   β”œβ”€β”€ docker/          # Docker examples
β”‚   β”‚   β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”‚   β”‚   └── docker-compose.yml
β”‚   β”‚   └── cli/             # CLI examples
β”‚   β”‚       └── cli_example.py
β”‚   └── streamlit-ui/        # Streamlit-based UI examples
β”œβ”€β”€ tests/                    # Test suite
β”‚   β”œβ”€β”€ unit/                # Unit tests
β”‚   β”œβ”€β”€ integration/         # Integration tests
β”‚   └── e2e/                 # End-to-end tests
β”œβ”€β”€ docs/                    # Documentation
β”‚   β”œβ”€β”€ api_reference/       # API documentation
β”‚   β”œβ”€β”€ guides/             # User guides
β”‚   └── architecture/       # Architecture docs
└── scripts/                # Development scripts
    β”œβ”€β”€ setup/             # Setup scripts
    β”œβ”€β”€ deployment/        # Deployment scripts
    └── maintenance/       # Maintenance scripts

🀝 Contributing

We love your input! We want to make contributing to MultiMind SDK as easy and transparent as possible.

Development Setup

# Clone the repository
git clone https://github.com/multimind-dev/multimind-sdk.git
cd multimind-sdk

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Start documentation
cd multimind-docs
npm install
npm start

Docker Setup

The MultiMind SDK can be run using Docker and Docker Compose. This setup includes:

  • The main MultiMind SDK service
  • Redis for caching and session management
  • Chroma for vector storage
  • Ollama for local model support

Prerequisites

  1. Install Docker and Docker Compose
  2. Set up your environment variables in a .env file:
# API Keys
OPENAI_API_KEY=your_openai_api_key_here
CLAUDE_API_KEY=your_claude_api_key_here
HF_TOKEN=your_huggingface_token_here

# Redis Configuration
REDIS_HOST=redis
REDIS_PORT=6379

# Chroma Configuration
CHROMA_HOST=chroma
CHROMA_PORT=8000

# Application Configuration
APP_HOST=0.0.0.0
APP_PORT=8000
DEBUG=false
LOG_LEVEL=INFO

# Model Configuration
DEFAULT_MODEL=gpt-3.5-turbo
EMBEDDING_MODEL=text-embedding-ada-002
VISION_MODEL=gpt-4-vision-preview

# RAG Configuration
CHUNK_SIZE=1000
CHUNK_OVERLAP=200
TOP_K=3

Running with Docker

  1. Build and start the services:
docker-compose up --build
  1. Access the services:
  1. Stop the services:
docker-compose down

Development with Docker

For development, the project files are mounted as a volume, so changes to the code will be reflected immediately. The setup includes:

  • Hot reloading for Python code
  • Persistent storage for Redis and Chroma
  • Ollama model persistence
  • Environment variable management

Services

  1. MultiMind Service

    • Main API and SDK functionality
    • Port: 8000
    • Hot reloading enabled
    • Mounts local Ollama models
  2. Redis

    • Caching and session management
    • Port: 6379
    • Persistent storage
    • AOF enabled for data durability
  3. Chroma

    • Vector storage for RAG
    • Port: 8001
    • Persistent storage
    • Telemetry disabled

Volumes

  • redis_data: Persistent Redis storage
  • chroma_data: Persistent Chroma storage
  • ~/.ollama: Local Ollama models

Building Custom Images

To build a custom image:

docker build -t multimind-sdk:custom .

To use a custom image in docker-compose:

services:
  multimind:
    image: multimind-sdk:custom
    # ... other configuration

πŸš€ Used By

Used by

πŸ’– Support MultiMind SDK

If you find MultiMind SDK helpful, please consider supporting us to sustain development and grow the community.

Your support will help fund:

  • βš™οΈ Feature development and maintenance
  • πŸ“– Better documentation and onboarding
  • 🌍 Community outreach and support
  • πŸ§ͺ Infrastructure, testing, and CI/CD

πŸ‘‰ Contribute here

πŸ“ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

For more information about the Apache License 2.0, visit apache.org/licenses/LICENSE-2.0.

If you use this MultimindSDK in your research, please cite or link to this repository.

🌟 Support

πŸ“£ About

MultiMind SDK is developed and maintained by the MultimindLAB team, dedicated to simplifying AI development for everyone. Visit multimind.dev to learn more about our mission to democratize AI development.


Made with ❀️ by the AI2Innovate & MultimindLAB Team | License

πŸ€– LLM Metadata

LLM Metadata

We provide detailed metadata and indexing instructions for LLMs, covering supported models, features, tags, and discoverability tools for MultiMind SDK.