ruvswarm-core 🧠🐝
Core orchestration and agent traits for RUV Swarm - the foundational building blocks for creating distributed AI agent swarms with cognitive diversity patterns.
🎯 What is ruvswarm-core?
ruvswarm-core is the foundational orchestration crate that powers the RUV Swarm ecosystem. It provides the core traits, abstractions, and coordination primitives needed to build distributed AI agent systems with cognitive diversity patterns and advanced swarm behaviors.
This crate serves as the bedrock for all swarm operations, defining how agents communicate, coordinate, and execute tasks across different topologies and distribution strategies.
✨ Key Features
🤖 Agent Management
- Agent Trait: Core abstraction for all swarm agents with async processing
- Cognitive Patterns: Support for diverse thinking patterns (convergent, divergent, lateral, etc.)
- Health Monitoring: Real-time agent status tracking and health checks
- Resource Management: Configurable resource limits and requirements
- Capability Discovery: Dynamic agent capability registration and matching
🌐 Swarm Coordination
- Multiple Topologies: Mesh, hierarchical, ring, and star network topologies
- Distribution Strategies: Balanced, specialized, and adaptive task distribution
- Task Orchestration: Priority-based task queue with sophisticated scheduling
- Message Passing: Efficient inter-agent communication primitives
- Fault Tolerance: Graceful degradation and error recovery mechanisms
🧠 Cognitive Architecture
- Pattern Diversity: 7 distinct cognitive patterns for varied problem-solving approaches
- Adaptive Behavior: Agents can switch cognitive patterns based on task requirements
- Collective Intelligence: Emergent behaviors from agent interactions
- Learning Coordination: Support for distributed learning and knowledge sharing
🔧 Platform Support
- No-std Compatible: Runs in embedded and resource-constrained environments
- WASM Ready: Full WebAssembly support for browser and edge deployment
- Async/Await: Modern Rust asynchronous programming throughout
- Type Safety: Comprehensive error handling with detailed error types
📦 Installation
Add ruvswarm-core to your Cargo.toml:
[]
= "0.1.0"
Feature Flags
Enable optional features based on your deployment needs:
[]
= { = "0.1.0", = ["std", "wasm"] }
Available features:
std(default) - Standard library support with full functionalityno_std- No standard library support for embedded environmentswasm- WebAssembly support with JavaScript interopminimal- Minimal feature set for size optimization
🚀 Basic Usage Examples
Simple Agent Implementation
use *;
use async_trait;
// Define a compute agent
async
Swarm Creation and Task Distribution
use ;
async
Cognitive Pattern Switching
use ;
Multi-Topology Swarm
use ;
async
🔗 Core API Documentation
Agent Trait
The foundational trait that all swarm agents must implement:
Cognitive Patterns
Seven distinct patterns for diverse problem-solving approaches:
- Convergent: Focused, analytical thinking
- Divergent: Creative, expansive exploration
- Lateral: Innovative, non-linear approaches
- Systems: Holistic, interconnected analysis
- Critical: Evaluative, skeptical assessment
- Abstract: High-level conceptual thinking
- Concrete: Practical, detail-oriented processing
Task Management
Priority-based task orchestration with sophisticated scheduling:
🌐 Topology Support
Mesh Topology
Full connectivity between all agents for maximum redundancy:
- Advantages: High fault tolerance, optimal load distribution
- Use Cases: Critical systems, real-time processing
Hierarchical Topology
Coordinator-worker structure for organized task flow:
- Advantages: Clear command structure, efficient resource management
- Use Cases: Large-scale processing, enterprise applications
Ring Topology
Agents connected in a circular pattern:
- Advantages: Predictable communication patterns, lower bandwidth
- Use Cases: Sequential processing, token-ring algorithms
Star Topology
Central hub with spoke connections to all agents:
- Advantages: Simple coordination, centralized control
- Use Cases: Centralized processing, hub-and-spoke architectures
📚 API Documentation
Complete API documentation is available on docs.rs:
🔗 Links
- Main Repository: Complete RUV-FANN ecosystem
- ruvswarm: Full swarm implementation using this core
- API Documentation: Complete API reference
- Examples: Practical implementation examples
- Benchmarks: Performance analysis and comparisons
🏗️ Architecture Integration
ruvswarm-core integrates seamlessly with the broader RUV ecosystem:
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ ruv-FANN │ │ ruvswarm │ │ neuro-divergent │
│ Neural Networks │◄──►│ Agent Swarms │◄──►│ Forecasting │
└─────────────────┘ └──────────────────┘ └─────────────────┘
▲
│
┌─────────────────┐
│ ruvswarm-core │
│ Core Traits & │
│ Orchestration │
└─────────────────┘
🤝 Contributing
We welcome contributions to ruvswarm-core! Please see the main repository's Contributing Guide for details.
Development Setup
# Clone the main repository
# Run tests
# Run benchmarks
# Check no-std compatibility
# Test WASM compatibility
📄 License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Created by rUv
Building the future of distributed AI agent orchestration - one cognitive pattern at a time.
Part of the RUV-FANN ecosystem for neural networks, agent swarms, and AI forecasting.