PraisonAI 2.2.72__cp313-cp313-manylinux_2_39_x86_64.whl → 2.2.73__cp313-cp313-manylinux_2_39_x86_64.whl

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.

Potentially problematic release.


This version of PraisonAI might be problematic. Click here for more details.

praisonai/cli.py CHANGED
@@ -545,7 +545,7 @@ class PraisonAI:
545
545
  return default_args
546
546
 
547
547
  # Define special commands
548
- special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui']
548
+ special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui', 'context']
549
549
 
550
550
  parser = argparse.ArgumentParser(prog="praisonai", description="praisonAI command-line interface")
551
551
  parser.add_argument("--framework", choices=["crewai", "autogen", "praisonai"], help="Specify the framework")
@@ -569,6 +569,9 @@ class PraisonAI:
569
569
  parser.add_argument("--merge", action="store_true", help="Merge existing agents.yaml with auto-generated agents instead of overwriting")
570
570
  parser.add_argument("--claudecode", action="store_true", help="Enable Claude Code integration for file modifications and coding tasks")
571
571
  parser.add_argument("--file", "-f", type=str, help="Read input from a file and append it to the prompt")
572
+ parser.add_argument("--url", type=str, help="Repository URL for context analysis")
573
+ parser.add_argument("--goal", type=str, help="Goal for context engineering")
574
+ parser.add_argument("--auto-analyze", action="store_true", help="Enable automatic analysis in context engineering")
572
575
 
573
576
  # If we're in a test environment, parse with empty args to avoid pytest interference
574
577
  if in_test_env:
@@ -674,6 +677,25 @@ class PraisonAI:
674
677
  self.create_chainlit_interface()
675
678
  sys.exit(0)
676
679
 
680
+ elif args.command == 'context':
681
+ if not PRAISONAI_AVAILABLE:
682
+ print("[red]ERROR: PraisonAI Agents is not installed. Install with:[/red]")
683
+ print("\npip install praisonaiagents\n")
684
+ sys.exit(1)
685
+
686
+ if not args.url:
687
+ print("[red]ERROR: --url is required for context command[/red]")
688
+ print("Usage: praisonai context --url <repository_url> --goal <goal> [--auto-analyze]")
689
+ sys.exit(1)
690
+
691
+ if not args.goal:
692
+ print("[red]ERROR: --goal is required for context command[/red]")
693
+ print("Usage: praisonai context --url <repository_url> --goal <goal> [--auto-analyze]")
694
+ sys.exit(1)
695
+
696
+ self.handle_context_command(args.url, args.goal, getattr(args, 'auto_analyze', False))
697
+ sys.exit(0)
698
+
677
699
  # Only check framework availability for agent-related operations
678
700
  if not args.command and (args.init or args.auto or args.framework):
679
701
  if not CREWAI_AVAILABLE and not AUTOGEN_AVAILABLE and not PRAISONAI_AVAILABLE:
@@ -867,6 +889,50 @@ class PraisonAI:
867
889
  else:
868
890
  print("ERROR: Realtime UI is not installed. Please install it with 'pip install \"praisonai[realtime]\"' to use the realtime UI.")
869
891
 
892
+ def handle_context_command(self, url: str, goal: str, auto_analyze: bool = False) -> str:
893
+ """
894
+ Handle the context command by creating a ContextAgent and running it.
895
+
896
+ Args:
897
+ url: Repository URL for context analysis
898
+ goal: Goal for context engineering
899
+ auto_analyze: Enable automatic analysis (default: False)
900
+
901
+ Returns:
902
+ str: Result from context engineering
903
+ """
904
+ try:
905
+ from praisonaiagents import ContextAgent
906
+ print("[bold green]Starting Context Engineering...[/bold green]")
907
+ print(f"URL: {url}")
908
+ print(f"Goal: {goal}")
909
+ print(f"Auto-analyze: {auto_analyze}")
910
+
911
+ # Use the same model configuration pattern as other CLI commands
912
+ # Priority order: MODEL_NAME > OPENAI_MODEL_NAME for model selection
913
+ model_name = os.environ.get("MODEL_NAME") or os.environ.get("OPENAI_MODEL_NAME", "gpt-4o-mini")
914
+
915
+ # Create ContextAgent with user's LLM configuration
916
+ agent = ContextAgent(llm=model_name, auto_analyze=auto_analyze)
917
+
918
+ # Format input as expected by the start method: "url goal"
919
+ input_text = f"{url} {goal}"
920
+
921
+ # Execute the context engineering
922
+ result = agent.start(input_text)
923
+
924
+ print("\n[bold green]Context Engineering Complete![/bold green]")
925
+ print(result)
926
+ return result
927
+
928
+ except ImportError as e:
929
+ print(f"[red]ERROR: Failed to import ContextAgent: {e}[/red]")
930
+ print("Make sure praisonaiagents is installed: pip install praisonaiagents")
931
+ sys.exit(1)
932
+ except Exception as e:
933
+ print(f"[red]ERROR: Context engineering failed: {e}[/red]")
934
+ sys.exit(1)
935
+
870
936
  if __name__ == "__main__":
871
937
  praison_ai = PraisonAI()
872
938
  praison_ai.main()
praisonai/deploy.py CHANGED
@@ -57,7 +57,7 @@ class CloudDeployer:
57
57
  file.write("FROM python:3.11-slim\n")
58
58
  file.write("WORKDIR /app\n")
59
59
  file.write("COPY . .\n")
60
- file.write("RUN pip install flask praisonai==2.2.72 gunicorn markdown\n")
60
+ file.write("RUN pip install flask praisonai==2.2.73 gunicorn markdown\n")
61
61
  file.write("EXPOSE 8080\n")
62
62
  file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
63
63
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: PraisonAI
3
- Version: 2.2.72
3
+ Version: 2.2.73
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
  Requires-Python: >=3.10
@@ -37,10 +37,10 @@ Requires-Dist: chainlit (==2.5.5) ; extra == "chat"
37
37
  Requires-Dist: chainlit (==2.5.5) ; extra == "code"
38
38
  Requires-Dist: chainlit (==2.5.5) ; extra == "realtime"
39
39
  Requires-Dist: chainlit (==2.5.5) ; extra == "ui"
40
- Requires-Dist: crawl4ai (>=0.6.0) ; extra == "chat"
41
- Requires-Dist: crawl4ai (>=0.6.0) ; extra == "code"
42
- Requires-Dist: crawl4ai (>=0.6.0) ; extra == "realtime"
43
- Requires-Dist: crewai (>=0.32.0) ; extra == "crewai"
40
+ Requires-Dist: crawl4ai (>=0.7.0) ; extra == "chat"
41
+ Requires-Dist: crawl4ai (>=0.7.0) ; extra == "code"
42
+ Requires-Dist: crawl4ai (>=0.7.0) ; extra == "realtime"
43
+ Requires-Dist: crewai (>=0.148.0) ; extra == "crewai"
44
44
  Requires-Dist: crewai ; extra == "autogen"
45
45
  Requires-Dist: crewai ; extra == "autogen-v4"
46
46
  Requires-Dist: duckduckgo_search (>=6.3.0) ; extra == "realtime"
@@ -58,9 +58,9 @@ Requires-Dist: langchain-anthropic (>=0.3.0) ; extra == "anthropic"
58
58
  Requires-Dist: langchain-cohere (>=0.3.0,<0.4.0) ; extra == "cohere"
59
59
  Requires-Dist: langchain-google-genai (>=2.1.0) ; extra == "google"
60
60
  Requires-Dist: langchain-openai (>=0.2.1,<0.3.0) ; extra == "openai"
61
- Requires-Dist: litellm (>=1.68.0) ; extra == "chat"
62
- Requires-Dist: litellm (>=1.68.0) ; extra == "code"
63
- Requires-Dist: litellm (>=1.68.0) ; extra == "realtime"
61
+ Requires-Dist: litellm (>=1.72.6) ; extra == "chat"
62
+ Requires-Dist: litellm (>=1.72.6) ; extra == "code"
63
+ Requires-Dist: litellm (>=1.72.6) ; extra == "realtime"
64
64
  Requires-Dist: markdown (>=3.5)
65
65
  Requires-Dist: mcp (>=1.6.0)
66
66
  Requires-Dist: openai (>=1.54.0) ; extra == "call"
@@ -70,7 +70,7 @@ Requires-Dist: plotly (>=5.24.0) ; extra == "realtime"
70
70
  Requires-Dist: praisonai-tools (>=0.0.22) ; extra == "autogen"
71
71
  Requires-Dist: praisonai-tools (>=0.0.22) ; extra == "autogen-v4"
72
72
  Requires-Dist: praisonai-tools (>=0.0.22) ; extra == "crewai"
73
- Requires-Dist: praisonaiagents (>=0.0.145)
73
+ Requires-Dist: praisonaiagents (>=0.0.146)
74
74
  Requires-Dist: pyautogen (==0.2.29) ; extra == "autogen"
75
75
  Requires-Dist: pydantic (<=2.10.1) ; extra == "chat"
76
76
  Requires-Dist: pydantic (<=2.10.1) ; extra == "code"
@@ -5,8 +5,8 @@ praisonai/agents_generator.py,sha256=2xd2jPhmmQYOTHCbMNHI14wpkj271nFDcCSdJHcPzvU
5
5
  praisonai/api/call.py,sha256=-dV9DKNDi4w9vN6K63TUh15_PC0M5KzYOmBqHbuJqq0,11079
6
6
  praisonai/auto.py,sha256=mSMx6WI9RBnwi3XkYklKCGRYBwiWd20qnp4jQkElDeE,12893
7
7
  praisonai/chainlit_ui.py,sha256=pMp1z7VV1IATgZvctAX4b42ajg948Qwu8cdLKIwcG0g,12241
8
- praisonai/cli.py,sha256=KGQ6wsAGuniHU1v0lKBnb0OcuPFHRVYuodHWA2oScBQ,38265
9
- praisonai/deploy.py,sha256=OsnjNz6PFgVqsBPXhNsGP_MRG2YoEzKb62Z5LnwBqN4,8265
8
+ praisonai/cli.py,sha256=hEBkl88jFcoMkq4T8yd0ccWCfO3aoLXKJhfe-8WFhNU,41450
9
+ praisonai/deploy.py,sha256=8eEl8I2U0tUV8_EC6ELCfw1reDQssvcbPVRma6J4Z70,8265
10
10
  praisonai/inbuilt_tools/__init__.py,sha256=mZOEximj3zCyJHq9Lz0bGXhQpBsa_QR-R-yA9UKC3zI,565
11
11
  praisonai/inbuilt_tools/autogen_tools.py,sha256=kJdEv61BTYvdHOaURNEpBcWq8Rs-oC03loNFTIjT-ak,4687
12
12
  praisonai/inc/__init__.py,sha256=sPDlYBBwdk0VlWzaaM_lG0_LD07lS2HRGvPdxXJFiYg,62
@@ -74,7 +74,7 @@ praisonai/ui/sql_alchemy.py,sha256=ilWAWicUGja7ADbXW9_OgIYeyKNuAQ1ZI_RMqjmMI9k,2
74
74
  praisonai/ui/tools.md,sha256=Ad3YH_ZCLMWlz3mDXllQnQ_S5l55LWqLdcZSh-EXrHI,3956
75
75
  praisonai/upload_vision.py,sha256=lMpFn993UiYVJxRNZQTmcbPbEajQ5TFKCNGK1Icn_hg,5253
76
76
  praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
77
- praisonai-2.2.72.dist-info/METADATA,sha256=w00-jPwrB2ROIPUd9yvAaCwKwd4rBcf2VVqm7BDpsKk,5099
78
- praisonai-2.2.72.dist-info/WHEEL,sha256=dCzwOzx-VmbmLA5u8QpkARaxx3rsePBxa1nmZphhNQk,110
79
- praisonai-2.2.72.dist-info/entry_points.txt,sha256=QSSfuXjZMhf16FZ201I_oSoX_s1nWYbi_4_UXPE3S-o,145
80
- praisonai-2.2.72.dist-info/RECORD,,
77
+ praisonai-2.2.73.dist-info/METADATA,sha256=05oTzD1DGPPzCvwUVeoa5QVtZYkz8Um1EZUBLMRbGus,5100
78
+ praisonai-2.2.73.dist-info/WHEEL,sha256=dCzwOzx-VmbmLA5u8QpkARaxx3rsePBxa1nmZphhNQk,110
79
+ praisonai-2.2.73.dist-info/entry_points.txt,sha256=QSSfuXjZMhf16FZ201I_oSoX_s1nWYbi_4_UXPE3S-o,145
80
+ praisonai-2.2.73.dist-info/RECORD,,