mdan-cli 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -263,12 +263,59 @@ The Auto Orchestrator executes all 8 phases (LOAD → DISCOVER → PLAN → ARCH
263
263
 
264
264
  ---
265
265
 
266
+ ## CrewAI Integration
267
+
268
+ MDANV2 includes a comprehensive CrewAI integration for intelligent multi-agent orchestration.
269
+
270
+ ### Installation
271
+
272
+ ```bash
273
+ pip install -r requirements_crewai.txt
274
+ ```
275
+
276
+ ### Environment Variables
277
+
278
+ ```bash
279
+ export SERPER_API_KEY="your-serper-api-key"
280
+ export OPENAI_API_KEY="your-openai-api-key"
281
+ ```
282
+
283
+ ### Usage
284
+
285
+ ```python
286
+ import asyncio
287
+ from integrations.crewai import CrewAIOrchestrator
288
+
289
+ async def main():
290
+ orchestrator = CrewAIOrchestrator(
291
+ project_path="/path/to/project",
292
+ llm=your_llm_instance,
293
+ auto_mode=True
294
+ )
295
+
296
+ # Run autonomous mode
297
+ result = await orchestrator.run_auto_mode("Build a todo app")
298
+
299
+ asyncio.run(main())
300
+ ```
301
+
302
+ ### Components
303
+
304
+ - **8 CrewAI Agents**: Product, Architect, UX, Dev, Test, Security, DevOps, Doc
305
+ - **4 CrewAI Flows**: Auto, Discovery, Build, Debate
306
+ - **3 Custom Tools**: Serper (web search), SQL (async database), File (file operations)
307
+ - **Skill Router**: Intelligent skill detection and routing (50+ skills)
308
+
309
+ ### Documentation
310
+
311
+ See `core/crewai_orchestrator.md` for complete documentation.
312
+
266
313
  ## Resources
267
314
 
268
315
  - [MDAN Documentation](https://github.com/khalilbenaz/MDAN)
269
316
  - [Better Agents](https://langwatch.ai/docs/better-agents)
270
317
  - [Agent Skills Standard](https://agentskills.io)
318
+ - [CrewAI Documentation](https://docs.crewai.com)
271
319
 
272
320
  ---
273
-
274
321
  *This file is auto-generated by MDAN. Edit with care.*
package/README.md CHANGED
@@ -275,6 +275,32 @@ mdan auto # Démarrer le mode autonome
275
275
  mdan resume <save-file> # Reprendre depuis une sauvegarde
276
276
  mdan mcp [action] # Config MCP
277
277
  mdan prompt [action] # Gérer les prompts
278
+ mdan crewai <command> # CrewAI integration commands
279
+ ```
280
+
281
+ ### CrewAI CLI Commands
282
+
283
+ ```bash
284
+ # Initialize CrewAI in a project
285
+ mdan crewai init
286
+
287
+ # Run autonomous mode
288
+ mdan crewai auto "Build a todo app"
289
+
290
+ # Start multi-agent debate
291
+ mdan crewai debate "Best architecture for a microservices app"
292
+
293
+ # Execute task with specific agent
294
+ mdan crewai agent dev "Implement user authentication"
295
+
296
+ # Execute specific flow
297
+ mdan crewai flow discovery "Analyze requirements"
298
+
299
+ # List available skills
300
+ mdan crewai skills
301
+
302
+ # Show CrewAI status
303
+ mdan crewai status
278
304
  ```
279
305
 
280
306
  ---
@@ -301,6 +327,13 @@ projet/
301
327
  │ │ ├── test.md
302
328
  │ │ └── ...
303
329
  │ └── skills/ # Skills installés
330
+ ├── integrations/
331
+ │ └── crewai/ # CrewAI integration
332
+ │ ├── agents/ # 8 CrewAI agents
333
+ │ ├── flows/ # 4 CrewAI flows
334
+ │ ├── tools/ # Custom tools (Serper, SQL, File)
335
+ │ ├── skills/ # Skill router
336
+ │ └── orchestrator.py # Main orchestrator
304
337
  ├── tests/
305
338
  │ ├── scenarios/ # Tests conversationnels
306
339
  │ └── evaluations/ # Évaluations benchmarks
@@ -326,6 +359,7 @@ projet/
326
359
  ├── .github/ # Pour Copilot
327
360
  ├── .mcp.json # Configuration MCP
328
361
  ├── AGENTS.md # Guidelines de développement
362
+ ├── requirements_crewai.txt # CrewAI dependencies
329
363
  └── MDAN-STATE.json # État de la session
330
364
  ```
331
365
 
@@ -397,6 +431,94 @@ GitHub Actions configurés pour :
397
431
 
398
432
  ---
399
433
 
434
+ ## 🤖 CrewAI Integration
435
+
436
+ MDANV2 includes a comprehensive CrewAI integration for intelligent multi-agent orchestration.
437
+
438
+ ### Installation
439
+
440
+ ```bash
441
+ # Note: CrewAI requires Python 3.10-3.13
442
+ pip install -r requirements_crewai.txt
443
+ ```
444
+
445
+ ### Environment Variables
446
+
447
+ ```bash
448
+ export SERPER_API_KEY="your-serper-api-key"
449
+ export OPENAI_API_KEY="your-openai-api-key"
450
+ ```
451
+
452
+ ### Usage
453
+
454
+ ```python
455
+ import asyncio
456
+ from integrations.crewai import CrewAIOrchestrator
457
+
458
+ async def main():
459
+ orchestrator = CrewAIOrchestrator(
460
+ project_path="/path/to/project",
461
+ llm=your_llm_instance,
462
+ auto_mode=True
463
+ )
464
+
465
+ # Run autonomous mode
466
+ result = await orchestrator.run_auto_mode("Build a todo app")
467
+
468
+ asyncio.run(main())
469
+ ```
470
+
471
+ ### Components
472
+
473
+ - **8 CrewAI Agents**: Product, Architect, UX, Dev, Test, Security, DevOps, Doc
474
+ - **4 CrewAI Flows**: Auto, Discovery, Build, Debate
475
+ - **3 Custom Tools**: Serper (web search), SQL (async database), File (file operations)
476
+ - **Skill Router**: Intelligent skill detection and routing (50+ skills)
477
+
478
+ ### Example Scripts
479
+
480
+ See the `examples/` directory for complete examples:
481
+
482
+ - `examples/crewai_auto_mode.py` — Autonomous mode example
483
+ - `examples/crewai_debate.py` — Multi-agent debate example
484
+ - `examples/crewai_custom_crew.py` — Custom crew creation example
485
+ - `examples/crewai_with_sql.py` — SQL integration example (in-memory SQLite)
486
+ - `examples/crewai_with_serper.py` — Web search example
487
+
488
+ ### Troubleshooting
489
+
490
+ **Python Version Issue**: CrewAI requires Python 3.10-3.13. If you're using Python 3.14, you'll need to use a different Python version.
491
+
492
+ ```bash
493
+ # Check Python version
494
+ python --version
495
+
496
+ # Create a virtual environment with Python 3.13
497
+ python3.13 -m venv venv
498
+ source venv/bin/activate
499
+ pip install -r requirements_crewai.txt
500
+ ```
501
+
502
+ **Import Errors**: Make sure you're running from the project root directory.
503
+
504
+ ```bash
505
+ # Run from project root
506
+ cd /path/to/MDANV2
507
+ python examples/crewai_auto_mode.py
508
+ ```
509
+
510
+ **Missing API Keys**: Ensure your environment variables are set.
511
+
512
+ ```bash
513
+ # Check if keys are set
514
+ echo $OPENAI_API_KEY
515
+ echo $SERPER_API_KEY
516
+ ```
517
+
518
+ ### Documentation
519
+
520
+ See `core/crewai_orchestrator.md` for complete documentation.
521
+
400
522
  ## 📚 Documentation
401
523
 
402
524
  | Document | Description |
@@ -404,6 +526,7 @@ GitHub Actions configurés pour :
404
526
  | [ARCHITECTURE.md](ARCHITECTURE.md) | Architecture technique |
405
527
  | [MDAN.md](MDAN.md) | Spécification complète |
406
528
  | [AGENTS.md](AGENTS.md) | Guidelines de développement |
529
+ | [core/crewai_orchestrator.md](core/crewai_orchestrator.md) | CrewAI integration documentation |
407
530
  | [docs/fr/](docs/fr/) | Documentation en français |
408
531
 
409
532
  ---
package/cli/mdan.py CHANGED
@@ -6,9 +6,17 @@ import shutil
6
6
  import json
7
7
  from pathlib import Path
8
8
 
9
- VERSION = "2.5.1"
9
+ VERSION = "2.7.0"
10
10
  MDAN_DIR = Path(__file__).parent.parent
11
11
 
12
+ # Check CrewAI availability
13
+ try:
14
+ import importlib.util
15
+
16
+ CREWAI_AVAILABLE = importlib.util.find_spec("cli.mdan_crewai") is not None
17
+ except ImportError:
18
+ CREWAI_AVAILABLE = False
19
+
12
20
  # Colors
13
21
  RED = "\033[0;31m"
14
22
  GREEN = "\033[0;32m"
@@ -34,7 +42,7 @@ def banner():
34
42
  def show_help():
35
43
  banner()
36
44
  print(f"{BOLD}USAGE{NC}")
37
- print(" mdan <command> [options]\n")
45
+ print(" mdan <command> [options]\\n")
38
46
  print(f"{BOLD}COMMANDS{NC}")
39
47
  print(" init [name] Create a new project")
40
48
  print(" attach [--rebuild] Add MDAN to existing project")
@@ -45,13 +53,24 @@ def show_help():
45
53
  print(" skills List available skills")
46
54
  print(" auto Start autonomous development mode")
47
55
  print(" resume <save-file> Resume from saved context")
48
- print(" version Show version\n")
56
+ print(" crewai <command> CrewAI integration commands")
57
+ print(" version Show version\\n")
58
+ print(f"{BOLD}CREWAI COMMANDS{NC}")
59
+ print(" crewai init Initialize CrewAI in project")
60
+ print(" crewai auto <task> Run autonomous mode")
61
+ print(" crewai debate <topic> Start multi-agent debate")
62
+ print(" crewai agent <name> <task> Execute task with agent")
63
+ print(" crewai flow <name> <task> Execute specific flow")
64
+ print(" crewai skills List available skills")
65
+ print(" crewai status Show CrewAI status\\n")
49
66
  print(f"{BOLD}EXAMPLES{NC}")
50
67
  print(" mdan init my-app # New project")
51
68
  print(" cd my-project && mdan attach # Existing project")
52
69
  print(" mdan attach --rebuild # Rebuild from scratch")
53
70
  print(" mdan auto # Start autonomous mode")
54
- print(" mdan resume /tmp/mdan-save-*.json # Resume execution\n")
71
+ print(" mdan crewai init # Initialize CrewAI")
72
+ print(' mdan crewai auto "Build app" # Run CrewAI auto mode')
73
+ print(" mdan resume /tmp/mdan-save-*.json # Resume execution\\n")
55
74
  print(f"{BOLD}AGENTS{NC}")
56
75
  print(
57
76
  " product, architect, ux, dev, test, security, devops, doc, auto-orchestrator"
@@ -351,6 +370,19 @@ def cmd_resume(save_file=None):
351
370
  print(f"{RED}Error: {e}{NC}")
352
371
 
353
372
 
373
+ def cmd_crewai():
374
+ """Handle CrewAI subcommands."""
375
+ if not CREWAI_AVAILABLE:
376
+ print(f"{RED}❌ CrewAI integration not available{NC}")
377
+ print(f" Install with: {CYAN}pip install -r requirements_crewai.txt{NC}")
378
+ sys.exit(1)
379
+
380
+ # Pass control to CrewAI CLI
381
+ from cli.mdan_crewai import crewai_cli
382
+
383
+ crewai_cli()
384
+
385
+
354
386
  def main():
355
387
  args = sys.argv[1:]
356
388
  cmd = args[0] if args else "help"
@@ -377,6 +409,8 @@ def main():
377
409
  cmd_auto()
378
410
  elif cmd == "resume":
379
411
  cmd_resume(args[1] if len(args) > 1 else None)
412
+ elif cmd == "crewai":
413
+ cmd_crewai()
380
414
  elif cmd in ["version", "-v"]:
381
415
  print(f"MDAN v{VERSION}")
382
416
  else: