Skip to main content

LeafMesh — Multi-Agent AI Orchestration Platform

License: Commercial Python 3.8+ Version Redis

YAML-native multi-agent AI platform with self-healing and evolutionary capabilities

LeafMesh transforms multi-agent AI development through declarative YAML configuration that becomes executable intelligence. Built on the MANAGED_MESH architecture with production-ready coordination and persistence.

Core Features

  • YAML-Native Intelligence - Zero-code agent creation with AST-parsed configuration
  • Built-in Coordination - Manager and Summarizer agents provide automatic oversight
  • MANAGED_MESH Architecture - Direct agent communication with conditional routing
  • Redis-Powered Persistence - Automatic session management and conversation history
  • Enterprise Tool Ecosystem - 15+ built-in tools with OpenAI-compatible function calling
  • Advanced Parallel Processing - Multi-session threading with intelligent coordination

Production Features

  • Self-Healing Networks - 6 autonomous healing actions with failure detection
  • Evolutionary Optimization - Genetic algorithms with real fitness testing
  • Adaptive Model Intelligence - ML-powered model selection with performance prediction

Quick Start

1. Installation

pip install leafmesh

2. Environment Setup

# Required: OpenAI API key
export OPENAI_API_KEY="your-openai-key"

# Optional: Additional providers
export ANTHROPIC_API_KEY="your-anthropic-key"
export GOOGLE_API_KEY="your-google-key"

3. Redis Setup

Local Redis:

# macOS
brew install redis && brew services start redis

# Ubuntu/Debian
sudo apt install redis-server && sudo systemctl start redis

# Docker
docker run -d -p 6379:6379 redis:alpine

4. Basic Usage

from leafmesh import LeafMesh

# Initialize from YAML configuration
sdk = LeafMesh.from_yaml("config.yaml")

# Start the mesh
await sdk.start()

# Process requests
response = await sdk.process_request(
    session_id="user_session",
    input_data={"message": "Hello, how can you help me?"}
)

print(response)

Example YAML Configuration:

name: "my_mesh"
architecture: "managed_mesh"

# Built-in coordination
manager:
  enabled: true
  model: "gpt-4o"

summarizer:
  enabled: true
  model: "gpt-4o-mini"

# User-defined agents
agents:
  conversation_agent:
    name: "conversation_agent"
    model: "gpt-4o-mini"
    prompt: "You are a helpful AI assistant."
    yields:
      response: "string"
      confidence: "number"
    tools: ["calculator", "current_time"]

Architecture Overview

LeafMesh implements a MANAGED_MESH architecture with:

  • LLM Agents - YAML-defined with optional Python enhancement
  • Manager Agent - Built-in coordination and rule enforcement
  • Summarizer Agent - Omnipresent monitoring and analysis
  • Redis Persistence - Automatic session and conversation storage
  • Event System - All communication flows through events
  • Tool System - OpenAI-compatible function calling

For detailed architecture information, see docs/ARCHITECTURE.md


Agent Enhancement

Add Python logic to YAML-defined agents:

@sdk.intelligence("conversation_agent")
async def enhance_conversation(llm_response, input_data, context):
    """Add business logic to agent responses"""

    # Access conversation history
    history = context.get("conversation_history", [])

    # Enhance the LLM response
    enhanced_response = add_context(llm_response, history)

    # Trigger other agents conditionally
    if needs_specialist(enhanced_response):
        await sdk.trigger_agents(data={"analysis": enhanced_response})

    return {
        "response": enhanced_response,
        "confidence": calculate_confidence(enhanced_response)
    }

Revolutionary Features

Self-Healing Networks

# Enable automatic failure recovery
await sdk.enable_self_healing()

# Monitor agent health
health = await sdk.get_agent_health_status()
stats = await sdk.get_healing_statistics()

Evolutionary Optimization

# Optimize mesh configuration automatically
test_scenarios = [
    {"input": "Test case 1", "agents": ["conversation_agent"]},
    {"input": "Test case 2", "agents": ["technical_agent"]}
]

best_genome = await sdk.evolve_swarm_architecture(test_scenarios)
await sdk.apply_evolved_configuration()

Adaptive Model Selection

# Automatic model selection based on request characteristics
response = await sdk.adaptive_execute(
    prompt="Analyze this complex scenario",
    preferred_models=["gpt-4o", "claude-3.5-sonnet"]
)

Documentation

  • Architecture Guide - Technical implementation details
  • Debugging Guide - Troubleshooting and monitoring
  • Getting Started - Run create-leafmesh my-project to scaffold a complete example project

Use Cases

LeafMesh excels at:

  • Customer Service Systems - Multi-tier workflows with self-healing
  • Data Analysis Pipelines - Collaborative analytical workflows
  • Content Creation - Coordinated writing and editing
  • Decision Support - Complex decision-making with oversight
  • Workflow Automation - Business process automation

Framework Comparison

Feature LeafMesh LangGraph CrewAI AutoGen
YAML Configuration Primary Code-based Code-based Code-based
Built-in Coordination Manager/Summarizer Manual Manual Manual
Auto-Persistence Redis Manual Manual Manual
Self-Healing Production None None None
Evolutionary Optimization Genetic Algorithm None None None

Licensing

LeafMesh is commercial software owned by LeafCraft.

  • Evaluation: 30-day free evaluation for research/development
  • Commercial: Requires valid commercial license for revenue-generating use
  • Enterprise: Custom enterprise licensing available

Licensing: info@leafcraftstudios.com


Getting Started

  1. Install LeafMesh and set up Redis
  2. Create your first YAML configuration with basic agents
  3. Add Python enhancements for custom logic
  4. Enable revolutionary features for production

LeafMesh: Production-ready multi-agent AI with YAML-driven simplicity


Copyright 2025 LeafCraft. All rights reserved.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

leafmesh-2.4.131-cp314-none-any.whl (3.2 MB view details)

Uploaded CPython 3.14

leafmesh-2.4.131-cp313-none-any.whl (3.0 MB view details)

Uploaded CPython 3.13

leafmesh-2.4.131-cp312-none-any.whl (3.0 MB view details)

Uploaded CPython 3.12

leafmesh-2.4.131-cp311-none-any.whl (3.1 MB view details)

Uploaded CPython 3.11

leafmesh-2.4.131-cp310-none-any.whl (1.7 MB view details)

Uploaded CPython 3.10

File details

Details for the file leafmesh-2.4.131-cp314-none-any.whl.

File metadata

  • Download URL: leafmesh-2.4.131-cp314-none-any.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.14
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for leafmesh-2.4.131-cp314-none-any.whl
Algorithm Hash digest
SHA256 d9889713d0c28bcfb5d93eb2b0914aba200943674c2b9cc601de33f2c3eaddf9
MD5 9683bdeab3064dffb39c8770815ecaa2
BLAKE2b-256 8d7f20bd173b0a385e688efdc4874c521f73d8a3e9cb2c2ce26661e1882c6eb3

See more details on using hashes here.

File details

Details for the file leafmesh-2.4.131-cp313-none-any.whl.

File metadata

  • Download URL: leafmesh-2.4.131-cp313-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.13
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for leafmesh-2.4.131-cp313-none-any.whl
Algorithm Hash digest
SHA256 0b6af5d8b205f3d41e6e0a5489be8e38ad9b1559c027aa31838b3451c41d7266
MD5 6508c449f35a1cd46daf4eb2f6a13a78
BLAKE2b-256 39ff1b7f9a78bbf877586e1c83aa6b08c8f93c44715c7cd685966b1c6dc939ad

See more details on using hashes here.

File details

Details for the file leafmesh-2.4.131-cp312-none-any.whl.

File metadata

  • Download URL: leafmesh-2.4.131-cp312-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.12
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for leafmesh-2.4.131-cp312-none-any.whl
Algorithm Hash digest
SHA256 1f96d945244c13879e73c852111fb9285edfab48904755d5a55acbd0e3b03049
MD5 0bcca32e2844ef7e5020b60d1eebac65
BLAKE2b-256 754dfee51c312a79a383f550238a1962443eb2bd7ea1de1c8f138722a4cd435d

See more details on using hashes here.

File details

Details for the file leafmesh-2.4.131-cp311-none-any.whl.

File metadata

  • Download URL: leafmesh-2.4.131-cp311-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.11
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for leafmesh-2.4.131-cp311-none-any.whl
Algorithm Hash digest
SHA256 7409b4687497cf14f08088f6a9304cd5c9d916f8a134b87ba83730aa48296f02
MD5 5a8141c503032babaaaca05960e99ca6
BLAKE2b-256 4da43f855e922049b1f8860064a31c2ecc3831c732c7ca79f6772f0dac794138

See more details on using hashes here.

File details

Details for the file leafmesh-2.4.131-cp310-none-any.whl.

File metadata

  • Download URL: leafmesh-2.4.131-cp310-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.10
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for leafmesh-2.4.131-cp310-none-any.whl
Algorithm Hash digest
SHA256 9706c4e4098fe69249ca4c1374f3e645768f91a2967b5ebc880dd4bee66f2507
MD5 4d336216c1c5c90dc0f2912ae215fda4
BLAKE2b-256 473596615e3bd658c81deb489ab7af590aa5bb217fe905f36d1c8b7e0d1f47b1

See more details on using hashes here.

Release history Release notifications | RSS feed

2.4.135

5 files

2.4.134

5 files

2.4.133

5 files

2.4.132

5 files

This release

2.4.131 This release

5 files

2.4.130

5 files

2.4.129

5 files

2.4.128

5 files

2.4.127

5 files

2.4.126

5 files

2.4.125

5 files

2.4.124

5 files

2.4.122

5 files

2.4.121

5 files

2.4.119

5 files

2.4.118

5 files

2.4.116

5 files

2.4.115

5 files

2.4.113

5 files

2.4.112

5 files

2.4.110

5 files

2.4.108

5 files

2.4.107

5 files

2.4.106

5 files

2.4.105

5 files

2.4.104

5 files

2.4.103

5 files

2.4.102

5 files

2.4.101

5 files

2.4.99

5 files

2.4.98

5 files

2.4.95

5 files

2.4.48

5 files

2.4.47

4 files

2.4.39

5 files

2.4.33

5 files

2.4.32

5 files

2.4.31

5 files

2.4.30

5 files

2.4.28

5 files

2.4.25

5 files

2.4.24

5 files

2.4.19

5 files

2.4.18

5 files

2.4.17

5 files

2.4.3

5 files

2.4.0

5 files

2.3.48

5 files

2.3.43

5 files

2.3.42

5 files

2.3.41

5 files

2.3.40

5 files

2.3.39

5 files

2.2.46

5 files

2.1.51

5 files

2.1.50

5 files

2.1.42

5 files

2.1.39

5 files

2.1.38

5 files

2.1.29

5 files

2.1.28

5 files

2.1.18

5 files

2.1.9

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page