praisonAI 2.3.24__tar.gz → 2.3.26__tar.gz

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.
Files changed (75) hide show
  1. {praisonai-2.3.24 → praisonai-2.3.26}/PKG-INFO +159 -217
  2. {praisonai-2.3.24 → praisonai-2.3.26}/PraisonAI.egg-info/PKG-INFO +159 -217
  3. {praisonai-2.3.24 → praisonai-2.3.26}/PraisonAI.egg-info/SOURCES.txt +1 -0
  4. {praisonai-2.3.24 → praisonai-2.3.26}/PraisonAI.egg-info/requires.txt +1 -1
  5. {praisonai-2.3.24 → praisonai-2.3.26}/README.md +157 -215
  6. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/agents_generator.py +57 -1
  7. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/auto.py +222 -1
  8. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/__init__.py +5 -0
  9. praisonai-2.3.26/praisonai/cli/features/workflow.py +575 -0
  10. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/main.py +207 -1
  11. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/deploy.py +1 -1
  12. praisonai-2.3.26/praisonai/version.py +1 -0
  13. {praisonai-2.3.24 → praisonai-2.3.26}/pyproject.toml +1 -1
  14. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test_runner.py +1 -1
  15. praisonai-2.3.24/praisonai/version.py +0 -1
  16. {praisonai-2.3.24 → praisonai-2.3.26}/PraisonAI.egg-info/dependency_links.txt +0 -0
  17. {praisonai-2.3.24 → praisonai-2.3.26}/PraisonAI.egg-info/entry_points.txt +0 -0
  18. {praisonai-2.3.24 → praisonai-2.3.26}/PraisonAI.egg-info/top_level.txt +0 -0
  19. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/__init__.py +0 -0
  20. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/__main__.py +0 -0
  21. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/api/call.py +0 -0
  22. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/chainlit_ui.py +0 -0
  23. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/__init__.py +0 -0
  24. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/auto_memory.py +0 -0
  25. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/base.py +0 -0
  26. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/fast_context.py +0 -0
  27. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/flow_display.py +0 -0
  28. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/guardrail.py +0 -0
  29. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/handoff.py +0 -0
  30. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/image.py +0 -0
  31. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/knowledge.py +0 -0
  32. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/mcp.py +0 -0
  33. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/metrics.py +0 -0
  34. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/router.py +0 -0
  35. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/session.py +0 -0
  36. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/telemetry.py +0 -0
  37. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/todo.py +0 -0
  38. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/cli/features/tools.py +0 -0
  39. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/inbuilt_tools/__init__.py +0 -0
  40. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
  41. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/inc/__init__.py +0 -0
  42. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/inc/config.py +0 -0
  43. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/inc/models.py +0 -0
  44. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/scheduler.py +0 -0
  45. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/setup/__init__.py +0 -0
  46. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/setup/build.py +0 -0
  47. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/setup/post_install.py +0 -0
  48. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/setup/setup_conda_env.py +0 -0
  49. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/setup.py +0 -0
  50. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/test.py +0 -0
  51. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/train.py +0 -0
  52. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/train_vision.py +0 -0
  53. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/agents.py +0 -0
  54. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/callbacks.py +0 -0
  55. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/chat.py +0 -0
  56. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/code.py +0 -0
  57. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/colab.py +0 -0
  58. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/colab_chainlit.py +0 -0
  59. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/components/aicoder.py +0 -0
  60. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/context.py +0 -0
  61. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/database_config.py +0 -0
  62. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/db.py +0 -0
  63. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/realtime.py +0 -0
  64. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/realtimeclient/__init__.py +0 -0
  65. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/realtimeclient/tools.py +0 -0
  66. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/ui/sql_alchemy.py +0 -0
  67. {praisonai-2.3.24 → praisonai-2.3.26}/praisonai/upload_vision.py +0 -0
  68. {praisonai-2.3.24 → praisonai-2.3.26}/setup.cfg +0 -0
  69. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test.py +0 -0
  70. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test_agents_playbook.py +0 -0
  71. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test_basic.py +0 -0
  72. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test_cli_features.py +0 -0
  73. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test_custom_tools_fix.py +0 -0
  74. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test_double_api_fix.py +0 -0
  75. {praisonai-2.3.24 → praisonai-2.3.26}/tests/test_phase2_refactor.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PraisonAI
3
- Version: 2.3.24
3
+ Version: 2.3.26
4
4
  Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
5
5
  Author: Mervin Praison
6
6
  License: MIT
@@ -11,7 +11,7 @@ Description-Content-Type: text/markdown
11
11
  Requires-Dist: rich>=13.7
12
12
  Requires-Dist: markdown>=3.5
13
13
  Requires-Dist: pyparsing>=3.0.0
14
- Requires-Dist: praisonaiagents>=0.1.2
14
+ Requires-Dist: praisonaiagents>=0.1.4
15
15
  Requires-Dist: python-dotenv>=0.19.0
16
16
  Requires-Dist: instructor>=1.3.3
17
17
  Requires-Dist: PyYAML>=6.0
@@ -503,260 +503,109 @@ memories = auto.process_interaction(
503
503
  # Extracts: name="John", preference="Python for backend"
504
504
  ```
505
505
 
506
- ### 8. Workflows
506
+ ### 8. Agentic Workflows
507
507
 
508
- Create reusable multi-step workflows with context passing and per-step agents:
508
+ Create powerful multi-agent workflows with the `Workflow` class:
509
509
 
510
510
  ```python
511
- from praisonaiagents import Agent
512
- from praisonaiagents.memory import WorkflowManager, Workflow, WorkflowStep
513
-
514
- # Simple execution with default agent
515
- agent = Agent(name="Assistant", llm="gpt-4o-mini")
516
- manager = WorkflowManager()
511
+ from praisonaiagents import Agent, Workflow
517
512
 
518
- result = manager.execute(
519
- "deploy",
520
- default_agent=agent,
521
- variables={"environment": "production"}
513
+ # Create agents
514
+ researcher = Agent(
515
+ name="Researcher",
516
+ role="Research Analyst",
517
+ goal="Research topics thoroughly",
518
+ instructions="Provide concise, factual information."
522
519
  )
523
520
 
524
- # Advanced: Per-step agent configuration
525
- workflow = Workflow(
526
- name="research_pipeline",
527
- default_llm="gpt-4o-mini",
528
- steps=[
529
- WorkflowStep(
530
- name="research",
531
- action="Research {{topic}}",
532
- agent_config={"role": "Researcher", "goal": "Find information"},
533
- tools=["tavily_search"]
534
- ),
535
- WorkflowStep(
536
- name="write",
537
- action="Write report based on {{previous_output}}",
538
- agent_config={"role": "Writer", "goal": "Write content"},
539
- context_from=["research"] # Only include research output
540
- )
541
- ]
521
+ writer = Agent(
522
+ name="Writer",
523
+ role="Content Writer",
524
+ goal="Write engaging content",
525
+ instructions="Write clear, engaging content based on research."
542
526
  )
543
527
 
544
- # Async execution
545
- import asyncio
546
- result = asyncio.run(manager.aexecute("deploy", default_llm="gpt-4o-mini"))
547
- ```
548
-
549
- **Key Features:**
550
- - **Context Passing**: Use `{{previous_output}}` and `{{step_name_output}}` variables
551
- - **Per-Step Agents**: Configure different agents with roles, goals, tools for each step
552
- - **Async Execution**: Use `aexecute()` for async workflows
553
- - **Planning Mode**: Enable at workflow level with `planning=True`
554
- - **Branching**: Use `next_steps` and `branch_condition` for conditional routing
555
- - **Loops**: Use `loop_over` and `loop_var` to iterate over data
556
-
557
- ### Choosing the Right Workflow System
558
-
559
- | Use Case | Recommended |
560
- |----------|-------------|
561
- | Simple function pipelines | `Workflow` class ⭐ |
562
- | Agent-only pipelines | `Workflow` class |
563
- | CSV batch processing | `Workflow` + `loop()` |
564
- | Complex task routing | `Workflow` + `route()` |
565
- | Markdown templates | `WorkflowManager` |
566
- | Early stop / conditional | `Workflow` class |
567
-
568
- ### Simple Workflow (Recommended)
569
-
570
- The easiest way to create workflows - just pass functions as steps:
571
-
572
- ```python
573
- from praisonaiagents import Workflow, WorkflowContext, StepResult
528
+ # Create workflow with agents as steps
529
+ workflow = Workflow(steps=[researcher, writer])
574
530
 
575
- # Define simple handler functions
576
- def validate(ctx: WorkflowContext) -> StepResult:
577
- if not ctx.input:
578
- return StepResult(output="No input", stop_workflow=True)
579
- return StepResult(output=f"Valid: {ctx.input}")
580
-
581
- def process(ctx: WorkflowContext) -> StepResult:
582
- return StepResult(output=f"Processed: {ctx.previous_result}")
583
-
584
- # Create and run workflow
585
- workflow = Workflow(steps=[validate, process])
586
- result = workflow.start("Hello World", verbose=True)
587
- print(result["output"]) # "Processed: Valid: Hello World"
531
+ # Run workflow - agents process sequentially
532
+ result = workflow.start("What are the benefits of AI agents?")
533
+ print(result["output"])
588
534
  ```
589
535
 
590
536
  **Key Features:**
591
- - **Just pass functions** - No complex configuration needed
592
- - **Early stop** - Return `stop_workflow=True` to stop the workflow
593
- - **Context passing** - Access `ctx.input`, `ctx.previous_result`, `ctx.variables`
594
- - **Verbose mode** - See step-by-step progress
595
-
596
- ### Workflow Branching & Loops
597
-
598
- ```python
599
- from praisonaiagents import WorkflowStep
600
-
601
- # Branching step
602
- decision_step = WorkflowStep(
603
- name="decide",
604
- action="Evaluate if task is complete",
605
- next_steps=["success_step", "retry_step"],
606
- branch_condition={"success": ["success_step"], "failure": ["retry_step"]}
607
- )
608
-
609
- # Loop step
610
- loop_step = WorkflowStep(
611
- name="process_items",
612
- action="Process {{item}}",
613
- loop_over="items", # Variable containing list
614
- loop_var="item" # Current item variable name
615
- )
616
- ```
537
+ - **Agent-first** - Pass `Agent` objects directly as workflow steps
538
+ - **Pattern helpers** - Use `route()`, `parallel()`, `loop()`, `repeat()`
539
+ - **Planning mode** - Enable with `planning=True`
540
+ - **Callbacks** - Monitor with `on_step_complete`, `on_workflow_complete`
541
+ - **Async execution** - Use `workflow.astart()` for async
617
542
 
618
543
  ### Workflow Patterns (route, parallel, loop, repeat)
619
544
 
620
545
  ```python
621
- from praisonaiagents import Workflow, WorkflowContext, StepResult
622
- # Or use Pipeline (alias for Workflow)
623
- from praisonaiagents import Pipeline
546
+ from praisonaiagents import Agent, Workflow
624
547
  from praisonaiagents.workflows import route, parallel, loop, repeat
625
548
 
626
- # 1. ROUTING - Decision-based branching
549
+ # 1. ROUTING - Classifier agent routes to specialized agents
550
+ classifier = Agent(name="Classifier", instructions="Respond with 'technical' or 'creative'")
551
+ tech_agent = Agent(name="TechExpert", role="Technical Expert")
552
+ creative_agent = Agent(name="Creative", role="Creative Writer")
553
+
627
554
  workflow = Workflow(steps=[
628
- classify_request, # Returns "approve" or "reject"
555
+ classifier,
629
556
  route({
630
- "approve": [approve_handler],
631
- "reject": [reject_handler],
632
- "default": [fallback_handler]
557
+ "technical": [tech_agent],
558
+ "creative": [creative_agent]
633
559
  })
634
560
  ])
635
561
 
636
- # 2. PARALLEL - Concurrent execution
562
+ # 2. PARALLEL - Multiple agents work concurrently
563
+ market_agent = Agent(name="Market", role="Market Researcher")
564
+ competitor_agent = Agent(name="Competitor", role="Competitor Analyst")
565
+ aggregator = Agent(name="Aggregator", role="Synthesizer")
566
+
637
567
  workflow = Workflow(steps=[
638
- parallel([research_market, research_competitors, research_customers]),
639
- summarize_results # Gets all parallel outputs
568
+ parallel([market_agent, competitor_agent]),
569
+ aggregator
640
570
  ])
641
571
 
642
- # 3. LOOP - Iterate over list or CSV
572
+ # 3. LOOP - Agent processes each item
573
+ processor = Agent(name="Processor", role="Item Processor")
574
+ summarizer = Agent(name="Summarizer", role="Summarizer")
575
+
643
576
  workflow = Workflow(
644
- steps=[loop(process_item, over="items")],
645
- variables={"items": ["a", "b", "c"]}
577
+ steps=[loop(processor, over="items"), summarizer],
578
+ variables={"items": ["AI", "ML", "NLP"]}
646
579
  )
647
- # Or from CSV file:
648
- workflow = Workflow(steps=[loop(process_row, from_csv="data.csv")])
649
580
 
650
581
  # 4. REPEAT - Evaluator-Optimizer pattern
582
+ generator = Agent(name="Generator", role="Content Generator")
583
+ evaluator = Agent(name="Evaluator", instructions="Say 'APPROVED' if good")
584
+
651
585
  workflow = Workflow(steps=[
652
- repeat(
653
- generator,
654
- until=lambda ctx: "done" in ctx.previous_result,
655
- max_iterations=5
656
- )
586
+ generator,
587
+ repeat(evaluator, until=lambda ctx: "approved" in ctx.previous_result.lower(), max_iterations=3)
657
588
  ])
658
589
 
659
- # 5. CALLBACKS - Monitor workflow execution
590
+ # 5. CALLBACKS
660
591
  workflow = Workflow(
661
- steps=[step1, step2],
662
- on_workflow_start=lambda w, i: print(f"Starting: {i}"),
663
- on_step_complete=lambda name, r: print(f"{name}: {r.output[:50]}"),
664
- on_workflow_complete=lambda w, r: print(f"Done: {r['status']}")
592
+ steps=[researcher, writer],
593
+ on_step_complete=lambda name, r: print(f"✅ {name} done")
665
594
  )
666
595
 
667
- # 6. GUARDRAILS - Validate and retry
668
- def validate(result):
669
- return ("error" not in result.output, "Fix the error")
670
-
671
- workflow = Workflow(steps=[
672
- WorkflowStep(name="gen", handler=generator, guardrail=validate, max_retries=3)
673
- ])
674
- ```
675
-
676
- ### Workflow with Agents
677
-
678
- Use Agent objects directly as workflow steps:
679
-
680
- ```python
681
- from praisonaiagents import Agent, Workflow
682
- from praisonaiagents.workflows import route, parallel
683
-
684
- # 1. SEQUENTIAL AGENTS
685
- researcher = Agent(name="Researcher", role="Research expert", tools=[tavily_search])
686
- writer = Agent(name="Writer", role="Content writer")
687
- editor = Agent(name="Editor", role="Editor")
688
-
689
- workflow = Workflow(steps=[researcher, writer, editor])
690
- result = workflow.start("Research and write about AI")
691
-
692
- # 2. PARALLEL AGENTS
693
- workflow = Workflow(steps=[
694
- parallel([researcher1, researcher2, researcher3]),
695
- aggregator_agent
696
- ])
697
-
698
- # 3. ROUTE TO AGENTS
699
- workflow = Workflow(steps=[
700
- classifier_function,
701
- route({
702
- "technical": [tech_agent],
703
- "creative": [creative_agent],
704
- "default": [general_agent]
705
- })
706
- ])
707
-
708
- # 4. WITH PLANNING & REASONING
596
+ # 6. WITH PLANNING & REASONING
709
597
  workflow = Workflow(
710
- steps=[researcher, writer, editor],
711
- planning=True, # Create execution plan
712
- planning_llm="gpt-4o", # LLM for planning
713
- reasoning=True, # Chain-of-thought reasoning
714
- verbose=True
598
+ steps=[researcher, writer],
599
+ planning=True,
600
+ reasoning=True
715
601
  )
716
602
 
717
- # 5. TOOLS PER STEP
718
- workflow = Workflow(steps=[
719
- WorkflowStep(
720
- name="research",
721
- action="Research {{topic}}",
722
- tools=[tavily_search, web_scraper],
723
- agent_config={"name": "Researcher", "role": "Expert"}
724
- )
725
- ])
726
-
727
- # 6. OUTPUT TO FILE / IMAGES / PYDANTIC
728
- from pydantic import BaseModel
729
-
730
- class Report(BaseModel):
731
- title: str
732
- content: str
733
-
734
- workflow = Workflow(steps=[
735
- WorkflowStep(name="analyze", action="Analyze image", images=["image.jpg"]),
736
- WorkflowStep(name="report", action="Generate report", output_pydantic=Report),
737
- WorkflowStep(name="save", action="Save results", output_file="output/report.txt")
738
- ])
739
-
740
603
  # 7. ASYNC EXECUTION
741
- import asyncio
742
-
743
- async def main():
744
- result = await workflow.astart("input")
745
- print(result)
746
-
747
- asyncio.run(main())
604
+ result = asyncio.run(workflow.astart("input"))
748
605
 
749
606
  # 8. STATUS TRACKING
750
607
  workflow.status # "not_started" | "running" | "completed"
751
608
  workflow.step_statuses # {"step1": "completed", "step2": "skipped"}
752
-
753
- # 9. MEMORY CONFIG
754
- workflow = Workflow(
755
- steps=[researcher, writer],
756
- memory_config={"provider": "chroma", "persist": True, "collection": "my_workflow"}
757
- )
758
- result1 = workflow.start("Research AI")
759
- result2 = workflow.start("Continue the research") # Remembers first run
760
609
  ```
761
610
 
762
611
  ### YAML Workflow Template
@@ -822,11 +671,35 @@ variables:
822
671
  topic: AI trends
823
672
  topics: [ML, NLP, Vision]
824
673
 
825
- planning: true
826
- planning_llm: gpt-4o
827
- memory_config:
828
- provider: chroma
829
- persist: true
674
+ workflow:
675
+ planning: true
676
+ planning_llm: gpt-4o
677
+ memory_config:
678
+ provider: chroma
679
+ persist: true
680
+ ```
681
+
682
+ ### Loading YAML Workflows
683
+
684
+ ```python
685
+ from praisonaiagents.workflows import YAMLWorkflowParser, WorkflowManager
686
+
687
+ # Option 1: Parse YAML string
688
+ parser = YAMLWorkflowParser()
689
+ workflow = parser.parse_string(yaml_content)
690
+ result = workflow.start("Research AI trends")
691
+
692
+ # Option 2: Load from file with WorkflowManager
693
+ manager = WorkflowManager()
694
+ workflow = manager.load_yaml("research_workflow.yaml")
695
+ result = workflow.start("Research AI trends")
696
+
697
+ # Option 3: Execute YAML directly
698
+ result = manager.execute_yaml(
699
+ "research_workflow.yaml",
700
+ input_data="Research AI trends",
701
+ variables={"topic": "Machine Learning"}
702
+ )
830
703
  ```
831
704
 
832
705
  ### 9. Hooks
@@ -845,6 +718,75 @@ hooks.register("pre_write_code", lambda ctx: print(f"Writing {ctx['file']}"))
845
718
  result = hooks.execute("pre_write_code", {"file": "main.py"})
846
719
  ```
847
720
 
721
+ ### 10. Extended agents.yaml with Workflow Patterns
722
+
723
+ You can now use advanced workflow patterns directly in agents.yaml by setting `process: workflow`:
724
+
725
+ ```yaml
726
+ # agents.yaml with workflow patterns
727
+ framework: praisonai
728
+ process: workflow # Enables workflow mode
729
+ topic: "Research AI trends"
730
+
731
+ workflow:
732
+ planning: true
733
+ reasoning: true
734
+ verbose: true
735
+
736
+ variables:
737
+ topic: AI trends
738
+
739
+ roles:
740
+ classifier:
741
+ role: Request Classifier
742
+ backstory: "Classify requests into categories"
743
+ goal: Classify requests
744
+
745
+ researcher:
746
+ role: Research Analyst
747
+ backstory: "Expert researcher"
748
+ goal: Research topics
749
+ tools:
750
+ - tavily_search
751
+
752
+ steps:
753
+ # Sequential step
754
+ - agent: classifier
755
+ action: "Classify: {{topic}}"
756
+
757
+ # Route pattern - decision-based branching
758
+ - name: routing
759
+ route:
760
+ technical: [tech_expert]
761
+ default: [researcher]
762
+
763
+ # Parallel pattern - concurrent execution
764
+ - name: parallel_research
765
+ parallel:
766
+ - agent: researcher
767
+ action: "Research market trends"
768
+ - agent: researcher
769
+ action: "Research competitors"
770
+
771
+ # Loop pattern - iterate over items
772
+ - agent: researcher
773
+ action: "Analyze {{item}}"
774
+ loop:
775
+ over: topics
776
+
777
+ # Repeat pattern - evaluator-optimizer
778
+ - agent: aggregator
779
+ action: "Synthesize findings"
780
+ repeat:
781
+ until: "comprehensive"
782
+ max_iterations: 3
783
+ ```
784
+
785
+ Run with the same simple command:
786
+ ```bash
787
+ praisonai agents.yaml
788
+ ```
789
+
848
790
  ## Using No Code
849
791
 
850
792
  ### Auto Mode: