praisonAI 2.3.0__tar.gz → 2.3.2__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 (56) hide show
  1. {praisonai-2.3.0 → praisonai-2.3.2}/PKG-INFO +55 -2
  2. {praisonai-2.3.0 → praisonai-2.3.2}/PraisonAI.egg-info/PKG-INFO +55 -2
  3. {praisonai-2.3.0 → praisonai-2.3.2}/PraisonAI.egg-info/requires.txt +1 -1
  4. {praisonai-2.3.0 → praisonai-2.3.2}/README.md +53 -0
  5. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/cli.py +46 -0
  6. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/deploy.py +1 -1
  7. praisonai-2.3.2/praisonai/version.py +1 -0
  8. {praisonai-2.3.0 → praisonai-2.3.2}/pyproject.toml +1 -1
  9. praisonai-2.3.0/praisonai/version.py +0 -1
  10. {praisonai-2.3.0 → praisonai-2.3.2}/PraisonAI.egg-info/SOURCES.txt +0 -0
  11. {praisonai-2.3.0 → praisonai-2.3.2}/PraisonAI.egg-info/dependency_links.txt +0 -0
  12. {praisonai-2.3.0 → praisonai-2.3.2}/PraisonAI.egg-info/entry_points.txt +0 -0
  13. {praisonai-2.3.0 → praisonai-2.3.2}/PraisonAI.egg-info/top_level.txt +0 -0
  14. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/__init__.py +0 -0
  15. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/__main__.py +0 -0
  16. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/agents_generator.py +0 -0
  17. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/api/call.py +0 -0
  18. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/auto.py +0 -0
  19. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/chainlit_ui.py +0 -0
  20. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/inbuilt_tools/__init__.py +0 -0
  21. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
  22. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/inc/__init__.py +0 -0
  23. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/inc/config.py +0 -0
  24. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/inc/models.py +0 -0
  25. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/scheduler.py +0 -0
  26. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/setup/__init__.py +0 -0
  27. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/setup/build.py +0 -0
  28. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/setup/post_install.py +0 -0
  29. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/setup/setup_conda_env.py +0 -0
  30. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/setup.py +0 -0
  31. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/test.py +0 -0
  32. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/train.py +0 -0
  33. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/train_vision.py +0 -0
  34. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/agents.py +0 -0
  35. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/callbacks.py +0 -0
  36. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/chat.py +0 -0
  37. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/code.py +0 -0
  38. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/colab.py +0 -0
  39. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/colab_chainlit.py +0 -0
  40. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/components/aicoder.py +0 -0
  41. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/context.py +0 -0
  42. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/database_config.py +0 -0
  43. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/db.py +0 -0
  44. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/realtime.py +0 -0
  45. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/realtimeclient/__init__.py +0 -0
  46. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/realtimeclient/tools.py +0 -0
  47. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/ui/sql_alchemy.py +0 -0
  48. {praisonai-2.3.0 → praisonai-2.3.2}/praisonai/upload_vision.py +0 -0
  49. {praisonai-2.3.0 → praisonai-2.3.2}/setup.cfg +0 -0
  50. {praisonai-2.3.0 → praisonai-2.3.2}/tests/test.py +0 -0
  51. {praisonai-2.3.0 → praisonai-2.3.2}/tests/test_agents_playbook.py +0 -0
  52. {praisonai-2.3.0 → praisonai-2.3.2}/tests/test_basic.py +0 -0
  53. {praisonai-2.3.0 → praisonai-2.3.2}/tests/test_custom_tools_fix.py +0 -0
  54. {praisonai-2.3.0 → praisonai-2.3.2}/tests/test_double_api_fix.py +0 -0
  55. {praisonai-2.3.0 → praisonai-2.3.2}/tests/test_phase2_refactor.py +0 -0
  56. {praisonai-2.3.0 → praisonai-2.3.2}/tests/test_runner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PraisonAI
3
- Version: 2.3.0
3
+ Version: 2.3.2
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.0.170
14
+ Requires-Dist: praisonaiagents>=0.0.175
15
15
  Requires-Dist: python-dotenv>=0.19.0
16
16
  Requires-Dist: instructor>=1.3.3
17
17
  Requires-Dist: PyYAML>=6.0
@@ -152,6 +152,9 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
152
152
  - 💯 100+ LLM Support
153
153
  - 🔬 **Deep Research Agents** (OpenAI & Gemini)
154
154
  - 🔄 **Query Rewriter Agent** (HyDE, Step-back, Multi-query)
155
+ - 🌐 **Native Web Search** (OpenAI, Gemini, Anthropic, xAI, Perplexity)
156
+ - 📥 **Web Fetch** (Retrieve full content from URLs - Anthropic)
157
+ - 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
155
158
 
156
159
  ## Using Python Code
157
160
 
@@ -856,6 +859,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
856
859
  - `--expand-prompt`: Expands prompts for **detailed task execution**
857
860
 
858
861
 
862
+ ## Web Search, Web Fetch & Prompt Caching
863
+
864
+ ### CLI Usage
865
+
866
+ ```bash
867
+ # Web Search - Get real-time information
868
+ praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
869
+
870
+ # Web Fetch - Retrieve and analyze URL content (Anthropic only)
871
+ praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
872
+
873
+ # Prompt Caching - Reduce costs for repeated prompts
874
+ praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
875
+ ```
876
+
877
+ ### Programmatic Usage
878
+
879
+ ```python
880
+ from praisonaiagents import Agent
881
+
882
+ # Web Search
883
+ agent = Agent(
884
+ instructions="You are a research assistant",
885
+ llm="openai/gpt-4o-search-preview",
886
+ web_search=True
887
+ )
888
+
889
+ # Web Fetch (Anthropic only)
890
+ agent = Agent(
891
+ instructions="You are a content analyzer",
892
+ llm="anthropic/claude-sonnet-4-20250514",
893
+ web_fetch=True
894
+ )
895
+
896
+ # Prompt Caching
897
+ agent = Agent(
898
+ instructions="You are an AI assistant..." * 50, # Long system prompt
899
+ llm="anthropic/claude-sonnet-4-20250514",
900
+ prompt_caching=True
901
+ )
902
+ ```
903
+
904
+ **Supported Providers:**
905
+ | Feature | Providers |
906
+ |---------|-----------|
907
+ | Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
908
+ | Web Fetch | Anthropic |
909
+ | Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
910
+
911
+
859
912
  ## Development:
860
913
 
861
914
  Below is used for development only.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PraisonAI
3
- Version: 2.3.0
3
+ Version: 2.3.2
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.0.170
14
+ Requires-Dist: praisonaiagents>=0.0.175
15
15
  Requires-Dist: python-dotenv>=0.19.0
16
16
  Requires-Dist: instructor>=1.3.3
17
17
  Requires-Dist: PyYAML>=6.0
@@ -152,6 +152,9 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
152
152
  - 💯 100+ LLM Support
153
153
  - 🔬 **Deep Research Agents** (OpenAI & Gemini)
154
154
  - 🔄 **Query Rewriter Agent** (HyDE, Step-back, Multi-query)
155
+ - 🌐 **Native Web Search** (OpenAI, Gemini, Anthropic, xAI, Perplexity)
156
+ - 📥 **Web Fetch** (Retrieve full content from URLs - Anthropic)
157
+ - 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
155
158
 
156
159
  ## Using Python Code
157
160
 
@@ -856,6 +859,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
856
859
  - `--expand-prompt`: Expands prompts for **detailed task execution**
857
860
 
858
861
 
862
+ ## Web Search, Web Fetch & Prompt Caching
863
+
864
+ ### CLI Usage
865
+
866
+ ```bash
867
+ # Web Search - Get real-time information
868
+ praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
869
+
870
+ # Web Fetch - Retrieve and analyze URL content (Anthropic only)
871
+ praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
872
+
873
+ # Prompt Caching - Reduce costs for repeated prompts
874
+ praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
875
+ ```
876
+
877
+ ### Programmatic Usage
878
+
879
+ ```python
880
+ from praisonaiagents import Agent
881
+
882
+ # Web Search
883
+ agent = Agent(
884
+ instructions="You are a research assistant",
885
+ llm="openai/gpt-4o-search-preview",
886
+ web_search=True
887
+ )
888
+
889
+ # Web Fetch (Anthropic only)
890
+ agent = Agent(
891
+ instructions="You are a content analyzer",
892
+ llm="anthropic/claude-sonnet-4-20250514",
893
+ web_fetch=True
894
+ )
895
+
896
+ # Prompt Caching
897
+ agent = Agent(
898
+ instructions="You are an AI assistant..." * 50, # Long system prompt
899
+ llm="anthropic/claude-sonnet-4-20250514",
900
+ prompt_caching=True
901
+ )
902
+ ```
903
+
904
+ **Supported Providers:**
905
+ | Feature | Providers |
906
+ |---------|-----------|
907
+ | Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
908
+ | Web Fetch | Anthropic |
909
+ | Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
910
+
911
+
859
912
  ## Development:
860
913
 
861
914
  Below is used for development only.
@@ -1,7 +1,7 @@
1
1
  rich>=13.7
2
2
  markdown>=3.5
3
3
  pyparsing>=3.0.0
4
- praisonaiagents>=0.0.170
4
+ praisonaiagents>=0.0.175
5
5
  python-dotenv>=0.19.0
6
6
  instructor>=1.3.3
7
7
  PyYAML>=6.0
@@ -55,6 +55,9 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
55
55
  - 💯 100+ LLM Support
56
56
  - 🔬 **Deep Research Agents** (OpenAI & Gemini)
57
57
  - 🔄 **Query Rewriter Agent** (HyDE, Step-back, Multi-query)
58
+ - 🌐 **Native Web Search** (OpenAI, Gemini, Anthropic, xAI, Perplexity)
59
+ - 📥 **Web Fetch** (Retrieve full content from URLs - Anthropic)
60
+ - 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
58
61
 
59
62
  ## Using Python Code
60
63
 
@@ -759,6 +762,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
759
762
  - `--expand-prompt`: Expands prompts for **detailed task execution**
760
763
 
761
764
 
765
+ ## Web Search, Web Fetch & Prompt Caching
766
+
767
+ ### CLI Usage
768
+
769
+ ```bash
770
+ # Web Search - Get real-time information
771
+ praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
772
+
773
+ # Web Fetch - Retrieve and analyze URL content (Anthropic only)
774
+ praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
775
+
776
+ # Prompt Caching - Reduce costs for repeated prompts
777
+ praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
778
+ ```
779
+
780
+ ### Programmatic Usage
781
+
782
+ ```python
783
+ from praisonaiagents import Agent
784
+
785
+ # Web Search
786
+ agent = Agent(
787
+ instructions="You are a research assistant",
788
+ llm="openai/gpt-4o-search-preview",
789
+ web_search=True
790
+ )
791
+
792
+ # Web Fetch (Anthropic only)
793
+ agent = Agent(
794
+ instructions="You are a content analyzer",
795
+ llm="anthropic/claude-sonnet-4-20250514",
796
+ web_fetch=True
797
+ )
798
+
799
+ # Prompt Caching
800
+ agent = Agent(
801
+ instructions="You are an AI assistant..." * 50, # Long system prompt
802
+ llm="anthropic/claude-sonnet-4-20250514",
803
+ prompt_caching=True
804
+ )
805
+ ```
806
+
807
+ **Supported Providers:**
808
+ | Feature | Providers |
809
+ |---------|-----------|
810
+ | Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
811
+ | Web Fetch | Anthropic |
812
+ | Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
813
+
814
+
762
815
  ## Development:
763
816
 
764
817
  Below is used for development only.
@@ -584,6 +584,9 @@ class PraisonAI:
584
584
  parser.add_argument("--tools", "-t", type=str, help="Path to tools.py file for research agent")
585
585
  parser.add_argument("--save", "-s", action="store_true", help="Save research output to file (output/research/)")
586
586
  parser.add_argument("--verbose", "-v", action="store_true", help="Enable verbose output for research")
587
+ parser.add_argument("--web-search", action="store_true", help="Enable native web search (OpenAI, Gemini, Anthropic, xAI, Perplexity)")
588
+ parser.add_argument("--web-fetch", action="store_true", help="Enable web fetch to retrieve URL content (Anthropic only)")
589
+ parser.add_argument("--prompt-caching", action="store_true", help="Enable prompt caching to reduce costs (OpenAI, Anthropic, Bedrock, Deepseek)")
587
590
 
588
591
  # If we're in a test environment, parse with empty args to avoid pytest interference
589
592
  if in_test_env:
@@ -933,6 +936,35 @@ class PraisonAI:
933
936
  verbose = getattr(self.args, 'verbose', False)
934
937
  return self._expand_prompt(prompt, expand_tools, verbose)
935
938
 
939
+ def _save_output(self, prompt: str, result: str):
940
+ """
941
+ Save output to output/prompts/ folder.
942
+
943
+ Args:
944
+ prompt: The original prompt
945
+ result: The output result to save
946
+ """
947
+ from datetime import datetime
948
+ from rich import print
949
+
950
+ # Create output directory
951
+ output_dir = os.path.join(os.getcwd(), "output", "prompts")
952
+ os.makedirs(output_dir, exist_ok=True)
953
+
954
+ # Generate filename with timestamp
955
+ timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
956
+ # Create a safe filename from prompt (first 30 chars)
957
+ safe_prompt = "".join(c if c.isalnum() or c in " -_" else "" for c in prompt[:30]).strip().replace(" ", "_")
958
+ filename = f"{timestamp}_{safe_prompt}.md"
959
+ filepath = os.path.join(output_dir, filename)
960
+
961
+ # Write output
962
+ with open(filepath, "w", encoding="utf-8") as f:
963
+ f.write(f"# Prompt\n\n{prompt}\n\n")
964
+ f.write(f"# Output\n\n{result}\n")
965
+
966
+ print(f"[green]✅ Output saved to: {filepath}[/green]")
967
+
936
968
  def handle_direct_prompt(self, prompt):
937
969
  """
938
970
  Handle direct prompt by creating a single agent and running it.
@@ -954,8 +986,22 @@ class PraisonAI:
954
986
  if hasattr(self, 'args') and self.args.llm:
955
987
  agent_config["llm"] = self.args.llm
956
988
 
989
+ # Add feature flags if enabled
990
+ if hasattr(self, 'args'):
991
+ if getattr(self.args, 'web_search', False):
992
+ agent_config["web_search"] = True
993
+ if getattr(self.args, 'web_fetch', False):
994
+ agent_config["web_fetch"] = True
995
+ if getattr(self.args, 'prompt_caching', False):
996
+ agent_config["prompt_caching"] = True
997
+
957
998
  agent = PraisonAgent(**agent_config)
958
999
  result = agent.start(prompt)
1000
+
1001
+ # Save output if --save is enabled
1002
+ if hasattr(self, 'args') and getattr(self.args, 'save', False):
1003
+ self._save_output(prompt, result)
1004
+
959
1005
  return result
960
1006
  elif CREWAI_AVAILABLE:
961
1007
  from crewai import Agent, Task, Crew
@@ -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.3.0 gunicorn markdown\n")
60
+ file.write("RUN pip install flask praisonai==2.3.2 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
 
@@ -0,0 +1 @@
1
+ __version__ = "2.3.2"
@@ -12,7 +12,7 @@ dependencies = [
12
12
  "rich>=13.7",
13
13
  "markdown>=3.5",
14
14
  "pyparsing>=3.0.0",
15
- "praisonaiagents>=0.0.170",
15
+ "praisonaiagents>=0.0.175",
16
16
  "python-dotenv>=0.19.0",
17
17
  "instructor>=1.3.3",
18
18
  "PyYAML>=6.0",
@@ -1 +0,0 @@
1
- __version__ = "2.3.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes