Skip to content

A decentralized, emergent AI system built using a brain-inspired, graph-based knowledge network.

Notifications You must be signed in to change notification settings

Pyramid-Systems-Inc/Myriad-Mind

Repository files navigation

🧬 Myriad Cognitive Architecture: Revolutionary Biomimetic AI System

A decentralized, emergent AI that grows specialized neural regions for unknown concepts, implementing true brain-inspired intelligence through dynamic agent creation and Hebbian learning.


🌟 Executive Summary

Myriad represents a fundamental paradigm shift in artificial intelligence. Unlike monolithic AI models, Myriad implements a biomimetic cognitive architecture where intelligence emerges from the dynamic collaboration of specialized agents whose relationships form a living, adaptive knowledge graph.

🎯 Key Innovation: World's First Complete Biomimetic Neurogenesis System

Myriad dynamically creates specialized agents when encountering unknown concepts, mimicking how biological brains grow new neural regions. This enables the system to:

  • 🔍 Detect Unknown Concepts: Automatically identify concepts without existing agents
  • 📚 Collaborative Research: Use existing agents to research new concepts
  • 🧬 Create Specialized Agents: Generate new agents with tailored capabilities
  • 🤖 Lifecycle Management: Deploy, monitor, and maintain agents automatically
  • 🔗 Graph Integration: Register agents in a Neo4j knowledge graph for discovery
  • ⚡ Enable Reflex Arcs: Allow direct agent-to-agent communication

🚀 Current Status: Production Ready

All Core Components Operational
Complete Neurogenesis Pipeline
Enhanced Graph Intelligence
Hebbian Learning (Neural Plasticity)
Performance Optimization Engine


🏗️ Architecture Overview

The Myriad architecture implements a hierarchical "Cortical Column" model with intelligent agent discovery, dynamic neurogenesis, and adaptive learning.

graph TB
    subgraph "User Interface Layer"
        UQ[User Query] --> IP[Input Processor]
        OP[Output Processor] --> FR[Final Response]
    end

    subgraph "Intelligence Layer"
        IP --> EGI[Enhanced Graph Intelligence]
        EGI --> O[Graph-Based Orchestrator]
    end

    subgraph "Neurogenesis Pipeline"
        O -.->|Unknown Concept| NG[Neurogenesis Trigger]
        NG --> MAR[Multi-Agent Research]
        MAR --> TS[Template Selection]
        TS --> DLM[Dynamic Lifecycle Manager]
        DLM --> NDA[New Dynamic Agent]
        NDA --> GR[Graph Registration]
    end

    subgraph "Knowledge Graph"
        O <--> GDB[GraphDB Manager AI]
        GDB <--> KG[(Neo4j Knowledge Graph)]
        EGI <--> GDB
    end

    subgraph "Agent Network"
        GDB --> LDA[Lightbulb Definition AI]
        GDB --> LFA[Lightbulb Function AI]
        GDB --> QCA[Quantum Computing AI]
        GDB --> BCA[Biomimetic Computing AI]
        
        LDA <-.->|Direct Collaboration| LFA
        LFA <-.->|Knowledge Sharing| QCA
        QCA <-.->|Reflex Arcs| BCA
    end

    subgraph "Learning Engine"
        NDA --> ALE[Autonomous Learning Engine]
        ALE -.-> PT[Performance Tracking]
        PT --> EGI
    end

    style EGI fill:#e1f5fe,stroke:#01579b,stroke-width:3px
    style NG fill:#f3e5f5,stroke:#4a148c,stroke-width:3px
    style KG fill:#fff3e0,stroke:#e65100,stroke-width:3px
    style ALE fill:#e8f5e8,stroke:#1b5e20,stroke-width:3px
Loading

🚀 Quick Start

Prerequisites

  • Docker and Docker Compose
  • Python 3.8+
  • 4GB+ RAM recommended

Installation & Setup

# 1. Clone the repository
git clone <repository-url>
cd myriad-cognitive-architecture

# 2. Start all services
docker-compose up --build -d

# 3. Initialize the Neo4j graph schema (constraints and indexes)
python scripts/initialize_graph_schema.py

# 4. Initialize the knowledge graph with base data
PYTHONPATH=src python scripts/migration.py

# 5. Verify system health
curl http://localhost:5000/health  # Orchestrator Service
curl http://localhost:5008/health  # GraphDB Manager
curl http://localhost:5009/health  # Integration Tester
curl http://localhost:5001/health  # Lightbulb Definition AI
curl http://localhost:5002/health  # Lightbulb Function AI

Basic Usage

# Example query to the orchestrator service
import requests

# Simple query format
query = {
    "query": "What is a lightbulb and how did it impact factories?",
    "user_id": "demo_user"
}

response = requests.post("http://localhost:5000/process", json=query)
print(response.json())

# Or use task format for multiple queries
tasks = {
    "tasks": [
        {"task_id": 1, "concept": "lightbulb", "intent": "define", "args": {}},
        {"task_id": 2, "concept": "lightbulb", "intent": "function", "args": {}}
    ]
}

response = requests.post("http://localhost:5000/process", json=tasks)
print(response.json())

📊 Monitoring & Observability

Production Infrastructure

Myriad includes comprehensive monitoring and observability infrastructure for production deployments:

Accessing Monitoring Tools

Available Dashboards

  1. System Overview - Query rates, success rates, active agents, neurogenesis activity
  2. Service Health - Individual service metrics and health status
  3. Resource Usage - CPU, memory, network utilization per service
  4. Performance Tracking - Response times, throughput, error rates

Key Metrics Tracked

  • Query Processing: Total queries, success/failure rates, processing duration
  • Agent Activity: Active agents count, neurogenesis events, agent discovery success
  • System Resources: CPU usage, memory consumption, network I/O
  • Service Health: Uptime, health check status, dependency connectivity

Backup & Recovery

Manual Backup:

# Create backup of Neo4j knowledge graph
./scripts/backup_neo4j.sh

# Backup location: ./backups/neo4j/myriad_backup_YYYYMMDD_HHMMSS.tar.gz

Automated Backup (Cron):

# Daily backup at 2 AM
0 2 * * * /path/to/myriad/scripts/backup_neo4j.sh >> /var/log/myriad-backup.log 2>&1

Restore from Backup:

# Stop Neo4j service
docker-compose stop neo4j

# Restore backup
docker exec neo4j neo4j-admin database restore \
  --from-path=/backups/myriad_backup_YYYYMMDD_HHMMSS \
  neo4j

# Restart service
docker-compose start neo4j

Resource Management

All services have configured resource limits for production stability:

Service CPU Limit Memory Limit Health Check
Neo4j 2.0 CPUs 2GB ✅ HTTP
Redis 0.5 CPUs 256MB ✅ Ping
Orchestrator 1.0 CPUs 512MB ✅ HTTP
GraphDB Manager 1.0 CPUs 512MB ✅ HTTP
Other Services 0.5 CPUs 256MB ✅ HTTP
Prometheus 0.5 CPUs 512MB N/A
Grafana 0.5 CPUs 256MB N/A

View Real-Time Resource Usage:

docker stats

Database Schema Setup

The Myriad knowledge graph uses Neo4j with a well-defined schema including constraints and indexes for data integrity and performance.

Initialize Schema (First Time Setup)

# Run schema initialization script
python scripts/initialize_graph_schema.py

This creates:

  • Unique constraints on Agent, Concept, and Region names
  • Performance indexes on frequently queried properties
  • Full-text search index for concept discovery
  • Default knowledge regions (General, Science, Technology, Mathematics)
  • Schema version tracking for future migrations

Verify Schema

Check schema status in Neo4j Browser (http://localhost:7474):

# View schema version
MATCH (v:SchemaVersion) RETURN v;

# List all constraints
SHOW CONSTRAINTS;

# List all indexes
SHOW INDEXES;

Schema Documentation


🧬 Core Features

1. Biomimetic Neurogenesis

The system dynamically creates specialized agents for unknown concepts through a complete pipeline:

  1. Unknown Concept Detection: Identifies concepts without existing agents
  2. Multi-Agent Research: Collaborative research using existing agents
  3. Template Selection: AI-driven selection from 4 specialized templates
  4. Dynamic Creation: Automated agent generation and deployment
  5. Graph Integration: Automatic registration and relationship creation

2. Enhanced Graph Intelligence

Smart agent discovery and selection system featuring:

  • Multi-Criteria Relevance Scoring: Expertise, performance, and availability factors
  • Context-Aware Discovery: Query complexity analysis and domain detection
  • Dynamic Agent Clustering: Organization by performance tiers and domains
  • Real-Time Performance Tracking: Success rates and collaboration effectiveness

3. Hebbian Learning (Neural Plasticity)

Experience-driven adaptation system:

  • Synaptic Weighting: Connection strengthening based on successful collaborations
  • Background Decay: Prevents overfitting and enables plasticity
  • Routing Integration: Learned weights influence future agent selection
  • Outcome-Linked Updates: Continuous adaptation from interaction results

4. Performance Optimization Engine

Production-grade performance system:

  • Redis Distributed Caching: 82% compression efficiency with TTL management
  • Neo4j Connection Pooling: Optimized database performance with health monitoring
  • Response Compression: Automatic compression for large payloads
  • Real-Time Monitoring: Live metrics and performance scoring

📊 System Performance

Current Benchmarks

  • Total Processing Time: 12.19 seconds for complex queries
  • Success Rate: 100% across all components
  • Service Availability: 100% uptime (6 microservices operational)
  • Response Compression: 82% efficiency on large payloads
  • Concurrent Operations: 0.072s average response time

Quality Metrics

  • Query Understanding: 0.80 complexity score with advanced NLP
  • Response Confidence: 0.80-0.85 range with evidence attribution
  • Agent Utilization: 100% success rate with efficient task distribution
  • Neural Plasticity: Active weight adjustment and connection optimization

🏢 Microservices Architecture

Service Port Status Capabilities
Orchestrator Service 5000 ✅ Operational Task routing, agent discovery, neurogenesis coordination
GraphDB Manager AI 5008 ✅ Operational Neo4j interface, CRUD operations, Hebbian learning
Input Processor 5003 ✅ Operational Advanced NLP, intent recognition, task generation
Output Processor 5004 ✅ Operational Multi-agent synthesis, formatting, quality assessment
Lightbulb Definition AI 5001 ✅ Enhanced Technical knowledge with collaboration endpoints
Lightbulb Function AI 5002 ✅ Enhanced Application expertise with reflex arcs
Integration Tester AI 5009 ✅ Operational System validation, end-to-end testing

🧪 Testing & Validation

Complete Testing Suite

# Set PYTHONPATH for all test commands
export PYTHONPATH=src

# 1. Complete System Integration
python tests/test_complete_system_integration.py
# Expected: 100% success, ~12.19s total processing time

# 2. Agent-to-Agent Collaboration
python tests/test_agent_collaboration.py
# Expected: Direct peer communication, multi-type collaboration

# 3. Biomimetic Neurogenesis
python tests/test_neurogenesis_integration.py
# Expected: 100% success rate, new agent creation and registration

# 4. Enhanced Graph Intelligence
python tests/test_enhanced_graph_intelligence.py
# Expected: 8/8 tests passed, intelligent routing and clustering

# 5. Autonomous Learning Engine
python tests/test_autonomous_learning.py
# Expected: 7/7 tests passed, complete learning pipeline

# 6. Hebbian Learning
python tests/test_hebbian_learning.py
# Expected: Weight strengthening for success, decay for unused connections

# 7. Performance Optimization
python tests/test_performance_optimization.py
# Expected: 8/8 tests passed, 82% compression, 0.072s response time

🗺️ Development Roadmap

Completed Phases ✅

  • Phase 1: Core Infrastructure (Orchestrator, Registry, Basic Protocols)
  • Phase 2: Agent Implementation (Specialized Agents, Cognitive Logic)
  • Phase 3: Enhanced Processing (Advanced I/O, Synthesis Capabilities)
  • Phase 4-5: Graph-Based Evolution (Neo4j, Migration, Graph-Based Routing)
  • Phase 2N: Biomimetic Neurogenesis (Dynamic Agent Creation)
  • Phase 3N: Complete Neurogenesis (Autonomous Learning, Self-Optimization)

Future Phases 📋

  • Phase 6: Tiered Memory (STM/MTM/LTM, Consolidation)
  • Phase 7: Curriculum Bootstrap (Foundation Knowledge, Learning Framework)
  • Phase 8: Advanced Learning (Declarative, Procedural, Socratic Learning)
  • Phase 9: Core Drives (Self-Awareness, State Monitoring)
  • Phase 10: Curiosity Engine (Autonomous Exploration, Gap Detection)
  • Phase 11: Cognitive Refinement (Sleep Cycle, Self-Optimization)
  • Phase 12: Advanced Evolution (Full Autonomy, Performance Optimization)

📚 Documentation

Core Documentation

Database & Schema

Operations


🤝 Contributing

We welcome contributions to the Myriad Cognitive Architecture! Please see CONTRIBUTING.md for guidelines.


📄 License

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


🌟 Impact & Significance

The Myriad Cognitive Architecture represents a fundamental shift in AI development:

  • From Static to Dynamic: AI that grows capabilities through biological-inspired neurogenesis
  • From Monolithic to Distributed: Intelligence emerging from specialized agent collaboration
  • From Programmed to Adaptive: Experience-driven learning and neural plasticity
  • From Centralized to Decentralized: True distributed cognition with emergent intelligence

This system validates the revolutionary concept that intelligence emerges from collaboration, not centralization, and that true learning requires growth, not just training.


Built with revolutionary biomimetic intelligence
Researched and developed as a fundamental advancement in AI architecture
Production-ready with enterprise-grade performance and reliability

About

A decentralized, emergent AI system built using a brain-inspired, graph-based knowledge network.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages