Skip to content

louloulin/lumos.ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

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

🌟 LumosAI

A powerful enterprise-grade AI framework built with Rust for creating intelligent applications

Rust License: MIT Build Status Documentation Tests

πŸŽ‰ Project Status Update: LumosAI has completed comprehensive project enhancement work!

  • βœ… All compilation issues have been fixed
  • βœ… Complete testing framework established (7/7 tests passing)
  • βœ… Enterprise-grade features fully preserved
  • βœ… Production-ready status achieved

πŸ“– See Project Completion Report for detailed information

πŸ“– Documentation | πŸš€ Quick Start | πŸ’‘ Examples | 🀝 Contributing


✨ Features

πŸ€– Intelligent Agent System

  • Multi-Model Support: OpenAI GPT, Anthropic Claude, local models
  • Specialized Agents: Research, writing, analysis, and custom roles
  • Tool Integration: Extensible tool system with built-in tools
  • Conversation Memory: Persistent context and conversation history

🧠 Advanced RAG System

  • Document Processing: PDF, text, markdown, and web content
  • Smart Chunking: Recursive, semantic, and custom chunking strategies
  • Vector Storage: Memory, PostgreSQL, Qdrant, Weaviate backends
  • Hybrid Retrieval: Semantic search + keyword matching

πŸ”„ Workflow Orchestration

  • Multi-Agent Collaboration: Sequential, parallel, and conditional workflows
  • Task Management: Complex task decomposition and execution
  • Event-Driven Architecture: Real-time event processing and routing
  • Error Handling: Robust retry mechanisms and fallback strategies

πŸ›‘οΈ Enterprise Security

  • Authentication: JWT, OAuth2, API keys, multi-factor authentication
  • Authorization: Role-based access control (RBAC) with fine-grained permissions
  • Multi-Tenant: Isolated tenant environments with custom configurations
  • Audit Logging: Comprehensive security and compliance logging

πŸ“Š Monitoring & Observability

  • Real-time Metrics: Performance, usage, and health monitoring
  • Distributed Tracing: Request tracing across agent interactions
  • Custom Dashboards: Grafana and Prometheus integration
  • Alerting: Intelligent alerting for system anomalies

⚑ High Performance

  • Rust Performance: Memory-safe, zero-cost abstractions
  • Async/Await: Non-blocking I/O for high concurrency
  • Caching: Intelligent caching at multiple layers
  • Scalability: Horizontal scaling with load balancing

πŸš€ Quick Start

Installation

Add LumosAI to your Cargo.toml:

[dependencies]
lumosai = "0.1.3"
tokio = { version = "1.0", features = ["full"] }

Basic Usage

use lumosai::prelude::*;

#[tokio::main]
async fn main() -> Result<()> {
    // πŸ€– Create a simple agent
    let agent = Agent::builder()
        .name("assistant")
        .model("gpt-4")
        .system_prompt("You are a helpful AI assistant")
        .build()
        .await?;

    // πŸ’¬ Have a conversation
    let response = agent.chat("Hello, how are you?").await?;
    println!("Agent: {}", response);

    Ok(())
}

Advanced Example: RAG System

use lumosai::prelude::*;

#[tokio::main]
async fn main() -> Result<()> {
    // πŸ“¦ Create vector storage
    let storage = VectorStorage::memory().await?;

    // 🧠 Create RAG system
    let rag = RagSystem::builder()
        .storage(storage)
        .embedding_provider("openai")
        .chunking_strategy("recursive")
        .build()
        .await?;

    // πŸ“„ Add documents
    rag.add_document("AI is transforming industries...").await?;

    // πŸ” Search and generate
    let results = rag.search("What is AI?", 5).await?;
    println!("Found {} relevant documents", results.len());

    Ok(())
}

πŸ’‘ Examples

Our comprehensive example suite demonstrates real-world usage patterns:

Example Description Complexity
πŸ€– Basic Agent Simple agent creation and conversation ⭐
🧠 RAG System Document processing and retrieval ⭐⭐
πŸ› οΈ Tool Integration Adding tools to agents ⭐⭐
πŸ’Ύ Memory System Conversation memory and context ⭐⭐
πŸ“Š Vector Storage Vector database operations ⭐⭐
🌊 Streaming Response Real-time streaming responses ⭐⭐⭐
πŸ‘₯ Multi-Agent Workflow Agent collaboration patterns ⭐⭐⭐
πŸš€ Enhanced Features Advanced framework capabilities ⭐⭐⭐
⚑ Performance Benchmark Performance testing and optimization ⭐⭐⭐
πŸ” Authentication Enterprise security features ⭐⭐⭐⭐
πŸ“ˆ Monitoring System monitoring and metrics ⭐⭐⭐⭐
🎯 Complete API Demo Full framework demonstration ⭐⭐⭐⭐⭐

Running Examples

# Basic agent example
cargo run --example basic_agent

# RAG system with document processing
cargo run --example rag_system

# Multi-agent collaboration
cargo run --example multi_agent_workflow

# Complete API demonstration
cargo run --example simplified_api_complete_demo

πŸ—οΈ Architecture

LumosAI follows a modular, layered architecture designed for scalability and maintainability:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Application Layer                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Web UI    β”‚ β”‚     CLI     β”‚ β”‚    Custom Applications  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     API Layer                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  REST API   β”‚ β”‚  GraphQL    β”‚ β”‚      WebSocket API      β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Service Layer                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Agents    β”‚ β”‚  Workflows  β”‚ β”‚      Authentication     β”‚ β”‚
β”‚  β”‚   Memory    β”‚ β”‚     RAG     β”‚ β”‚       Monitoring        β”‚ β”‚
β”‚  β”‚   Tools     β”‚ β”‚   Events    β”‚ β”‚       Security          β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Core Layer                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Traits    β”‚ β”‚   Types     β”‚ β”‚       Utilities         β”‚ β”‚
β”‚  β”‚   Errors    β”‚ β”‚   Config    β”‚ β”‚       Macros            β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                Infrastructure Layer                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Databases  β”‚ β”‚   Storage   β”‚ β”‚      External APIs      β”‚ β”‚
β”‚  β”‚   Cache     β”‚ β”‚   Queues    β”‚ β”‚       Providers         β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components

  • πŸ€– Agent System: Intelligent agents with specialized capabilities
  • 🧠 RAG Engine: Advanced retrieval-augmented generation
  • πŸ”„ Workflow Engine: Multi-agent orchestration and task management
  • πŸ’Ύ Memory System: Persistent context and conversation management
  • πŸ› οΈ Tool System: Extensible tool integration framework
  • πŸ” Security Layer: Authentication, authorization, and audit logging
  • πŸ“Š Monitoring: Real-time metrics, tracing, and observability

πŸ“š Documentation

πŸ“– User Guides

πŸ”§ Technical References

πŸ›‘οΈ Enterprise Features

πŸ’‘ Tutorials & Examples


🀝 Contributing

We welcome contributions of all kinds! Whether you're fixing bugs, adding features, improving documentation, or sharing feedback, your contributions help make LumosAI better for everyone.

πŸš€ Quick Contribution Guide

  1. 🍴 Fork the repository
  2. 🌿 Create your feature branch (git checkout -b feature/amazing-feature)
  3. βœ… Make your changes (follow our coding standards)
  4. πŸ§ͺ Add tests for your changes
  5. πŸ“ Update documentation if needed
  6. ✨ Commit your changes (git commit -m 'Add amazing feature')
  7. πŸ“€ Push to the branch (git push origin feature/amazing-feature)
  8. πŸ”„ Open a Pull Request

πŸ“‹ Contribution Areas

  • πŸ› Bug Reports: Help us identify and fix issues
  • πŸ’‘ Feature Requests: Suggest new capabilities and improvements
  • πŸ“– Documentation: Improve guides, examples, and API docs
  • πŸ§ͺ Testing: Add test coverage and improve test quality
  • 🎨 Examples: Create real-world usage examples
  • πŸ”§ Performance: Optimize performance and resource usage
  • πŸ›‘οΈ Security: Enhance security features and practices

🎯 Development Setup

# Clone the repository
git clone https://github.com/louloulin/lumos.ai.git
cd lumosai

# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Build the project
cargo build

# Run tests
cargo test

# Run examples
cargo run --example basic_agent

# Check code quality
cargo clippy
cargo fmt --check

πŸ“ Code Standards

  • πŸ¦€ Rust Best Practices: Follow Rust idioms and conventions
  • πŸ“ Documentation: Document all public APIs with examples
  • πŸ§ͺ Testing: Maintain high test coverage (aim for >80%)
  • πŸ” Code Quality: Pass cargo clippy and cargo fmt checks
  • ⚑ Performance: Consider performance implications of changes
  • πŸ›‘οΈ Security: Follow secure coding practices

🏷️ Issue Labels

  • good first issue - Perfect for newcomers
  • help wanted - Community contributions welcome
  • bug - Something isn't working
  • enhancement - New feature or improvement
  • documentation - Documentation improvements
  • performance - Performance-related changes
  • security - Security-related issues

🌟 Community & Support

πŸ’¬ Join Our Community

πŸ†˜ Getting Help

πŸ† Contributors

Thanks to all our amazing contributors! πŸŽ‰

πŸš€ Enterprise Support

For enterprise customers, we offer:

  • 🎯 Priority Support: Dedicated support channels
  • πŸ—οΈ Custom Development: Tailored solutions for your needs
  • πŸ“š Training & Consulting: Expert guidance and training
  • πŸ”’ Security & Compliance: Enhanced security features
  • πŸ“ˆ SLA Guarantees: Service level agreements

Contact us at enterprise@lumosai.com for more information.


πŸ“„ License

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

MIT License

Copyright (c) 2024 LumosAI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

⭐ Star us on GitHub if you find LumosAI helpful!

⭐ Star | πŸ› Report Bug | πŸ’‘ Request Feature | πŸ“– Documentation

Built with ❀️ by the LumosAI team

About

easy ai agent by rust

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published