Skip to main content

Project scaffolding tool for LeafMesh

Project description

create-leafmesh

Project scaffolding tool for LeafMesh — the YAML-native multi-agent orchestration platform.

Install

pip install create-leafmesh

Create a Project

create-leafmesh create my-project
cd my-project
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python main.py

CLI Options

# Create in a specific directory
create-leafmesh create my-project -o /path/to/dir

# Skip git initialization
create-leafmesh create my-project --no-git

# Interactive mode (prompts for project name)
create-leafmesh create

Generated Project Structure

my-project/
  configs/
    config.yaml              # Agent definitions, mesh wiring, HITL config
  agency/
    greeter_agent.py         # LLM agent with @pre_compose
    processor_agent.py       # Programmatic agent with @conditional_chain
    researcher_agent.py      # LLM agent with @chain_with_results + smart memory
    fallback_researcher_agent.py  # Fast fallback (race pattern)
    advisor_agent.py         # LLM fan-in with @chain + @compose
    scheduler_agent.py       # Cron-scheduled agent
    tools.py                 # Custom tools (@global_tool, @tool)
    external_agents.py       # Integration reference (CrewAI, LangGraph, etc.)
  main.py                    # Entry point
  hitl_stub_receiver.py      # Webhook stub for testing HITL locally
  requirements.txt
  .env                       # API keys
  Dockerfile
  docker-compose.yml         # Redis + app

What's Included

  • 8 agents showcasing all 4 agent types (human, llm, programmatic, external)
  • Human-in-the-Loop (HITL) with dual webhook mode and from_agent routing
  • Fan-in/fan-out with OR expressions (processor AND (researcher OR fallback))
  • Smart memory with hybrid recency/relevance scoring
  • Scheduled agents with cron expressions
  • Custom tools with access control and categories
  • All 5 decorators: @pre_compose, @chain, @chain_with_results, @conditional_chain, @compose
  • HITL test stub (hitl_stub_receiver.py) for local webhook testing
  • Docker-ready with Redis included
  • Full README with HITL walkthrough (2 scenarios, step-by-step)

Requirements

  • Python 3.10+
  • Redis server running (default: localhost:6379)
  • At least one LLM API key (e.g. OPENAI_API_KEY in .env)

Links

License

MIT

Project details


Download files

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

Source Distribution

create_leafmesh-2.1.1.tar.gz (92.8 kB view details)

Uploaded Source

Built Distribution

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

create_leafmesh-2.1.1-py3-none-any.whl (105.4 kB view details)

Uploaded Python 3

File details

Details for the file create_leafmesh-2.1.1.tar.gz.

File metadata

  • Download URL: create_leafmesh-2.1.1.tar.gz
  • Upload date:
  • Size: 92.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for create_leafmesh-2.1.1.tar.gz
Algorithm Hash digest
SHA256 49bdffc7fd9d7c90170ded8e3fa49cec1489a1d7a9cd4fdbf01465e63da75104
MD5 8dc5d594bda5643f565119a183df8dfa
BLAKE2b-256 b3b0cc205f81f436b3311b5224c4871e89d2dea1c3217f9d71d61fe543b33d7d

See more details on using hashes here.

File details

Details for the file create_leafmesh-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for create_leafmesh-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73a77d5ff43bf5830f604f993a679a27e9d0fff484691f4dd150c193364c2aa5
MD5 8750f0066d8303fe27af559715fce156
BLAKE2b-256 60d304248894c3e7561d1a5d83e44bb904aa1f4def64cf316e94d08c32e2e7b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page