Compare commits

...
1 Commits
11 changed files with 111 additions and 13 deletions

No files matched your search

+12
View File
@@ -144,6 +144,18 @@ export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
praisonai --auto create a movie script about Robots in Mars
```
### Deep Research CLI:
```bash
# Default: OpenAI (o4-mini-deep-research)
praisonai research "What are the latest AI trends in 2025?"
# Use Gemini
praisonai research --model deep-research-pro "Your research query"
# Verbose mode (show debug logs)
praisonai research -v "Your research query"
```
## Using JavaScript Code
```bash
+1 -1
View File
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
# Install Python packages (using latest versions)
RUN pip install --no-cache-dir \
flask \
"praisonai>=2.2.89" \
"praisonai>=2.2.90" \
"praisonai[api]" \
gunicorn \
markdown
+1 -1
View File
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
# Install Python packages (using latest versions)
RUN pip install --no-cache-dir \
praisonai_tools \
"praisonai>=2.2.89" \
"praisonai>=2.2.90" \
"praisonai[chat]" \
"embedchain[github,youtube]"
+1 -1
View File
@@ -20,7 +20,7 @@ RUN mkdir -p /root/.praison
# Install Python packages (using latest versions)
RUN pip install --no-cache-dir \
praisonai_tools \
"praisonai>=2.2.89" \
"praisonai>=2.2.90" \
"praisonai[ui]" \
"praisonai[chat]" \
"praisonai[realtime]" \
+1 -1
View File
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
# Install Python packages (using latest versions)
RUN pip install --no-cache-dir \
praisonai_tools \
"praisonai>=2.2.89" \
"praisonai>=2.2.90" \
"praisonai[ui]" \
"praisonai[crewai]"
+2 -2
View File
@@ -121,7 +121,7 @@ healthcheck:
## 📦 Package Versions
All Docker images use consistent, up-to-date versions:
- PraisonAI: `>=2.2.89`
- PraisonAI: `>=2.2.90`
- PraisonAI Agents: `>=0.0.92`
- Python: `3.11-slim`
@@ -218,7 +218,7 @@ docker-compose up -d
### Version Pinning
To use specific versions, update the Dockerfile:
```dockerfile
RUN pip install "praisonai==2.2.89" "praisonaiagents==0.0.92"
RUN pip install "praisonai==2.2.90" "praisonaiagents==0.0.92"
```
## 🌐 Production Deployment
+2 -2
View File
@@ -3,8 +3,8 @@ class Praisonai < Formula
desc "AI tools for various AI applications"
homepage "https://github.com/MervinPraison/PraisonAI"
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.89.tar.gz"
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.89.tar.gz | shasum -a 256`.split.first
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.90.tar.gz"
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.90.tar.gz | shasum -a 256`.split.first
license "MIT"
depends_on "[email protected]"
+87 -1
View File
@@ -545,7 +545,7 @@ class PraisonAI:
return default_args
# Define special commands
special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui', 'context']
special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui', 'context', 'research']
parser = argparse.ArgumentParser(prog="praisonai", description="praisonAI command-line interface")
parser.add_argument("--framework", choices=["crewai", "autogen", "praisonai"], help="Specify the framework")
@@ -572,6 +572,8 @@ class PraisonAI:
parser.add_argument("--url", type=str, help="Repository URL for context analysis")
parser.add_argument("--goal", type=str, help="Goal for context engineering")
parser.add_argument("--auto-analyze", action="store_true", help="Enable automatic analysis in context engineering")
parser.add_argument("--research", action="store_true", help="Run deep research on a topic")
parser.add_argument("--verbose", "-v", action="store_true", help="Enable verbose output for research")
# If we're in a test environment, parse with empty args to avoid pytest interference
if in_test_env:
@@ -696,6 +698,25 @@ class PraisonAI:
self.handle_context_command(args.url, args.goal, getattr(args, 'auto_analyze', False))
sys.exit(0)
elif args.command == 'research':
if not PRAISONAI_AVAILABLE:
print("[red]ERROR: PraisonAI Agents is not installed. Install with:[/red]")
print("\npip install praisonaiagents\n")
sys.exit(1)
# Get the research query from remaining args
research_query = ' '.join(unknown_args) if unknown_args else None
if not research_query:
print("[red]ERROR: Research query is required[/red]")
print("Usage: praisonai research \"Your research query\"")
print(" praisonai research --model deep-research-pro \"Your query\"")
sys.exit(1)
research_model = getattr(args, 'model', None)
verbose = getattr(args, 'verbose', False)
self.handle_research_command(research_query, research_model, verbose)
sys.exit(0)
# Only check framework availability for agent-related operations
if not args.command and (args.init or args.auto or args.framework):
if not CREWAI_AVAILABLE and not AUTOGEN_AVAILABLE and not PRAISONAI_AVAILABLE:
@@ -933,6 +954,71 @@ class PraisonAI:
print(f"[red]ERROR: Context engineering failed: {e}[/red]")
sys.exit(1)
def handle_research_command(self, query: str, model: str = None, verbose: bool = False) -> str:
"""
Handle the research command by creating a DeepResearchAgent and running it.
Args:
query: Research query/topic
model: Model for deep research (optional, defaults to o4-mini-deep-research)
verbose: Enable verbose output (default: False)
Returns:
str: Research report
"""
try:
from praisonaiagents import DeepResearchAgent
# Suppress logging unless verbose
if not verbose:
logging.getLogger('google').setLevel(logging.WARNING)
logging.getLogger('google.genai').setLevel(logging.WARNING)
logging.getLogger('httpx').setLevel(logging.WARNING)
logging.getLogger('httpcore').setLevel(logging.WARNING)
print("[bold green]Starting Deep Research...[/bold green]")
print(f"Query: {query}")
# Default model if not specified
if not model:
model = "o4-mini-deep-research"
print(f"Model: {model}")
# Create DeepResearchAgent
agent = DeepResearchAgent(
model=model,
verbose=verbose
)
# Execute the research (streaming is enabled by default)
result = agent.research(query)
print("\n[bold green]Research Complete![/bold green]")
print("\n" + "="*60)
print(result.report)
print("="*60)
# Show citations if available
if result.citations:
print(f"\n[bold]Citations ({len(result.citations)}):[/bold]")
for i, citation in enumerate(result.citations, 1):
title = getattr(citation, 'title', 'Untitled')
url = getattr(citation, 'url', '')
print(f" {i}. {title}")
if url:
print(f" {url}")
return result.report
except ImportError as e:
print(f"[red]ERROR: Failed to import DeepResearchAgent: {e}[/red]")
print("Make sure praisonaiagents is installed: pip install praisonaiagents")
sys.exit(1)
except Exception as e:
print(f"[red]ERROR: Research failed: {e}[/red]")
sys.exit(1)
if __name__ == "__main__":
praison_ai = PraisonAI()
praison_ai.main()
+1 -1
View File
@@ -57,7 +57,7 @@ class CloudDeployer:
file.write("FROM python:3.11-slim\n")
file.write("WORKDIR /app\n")
file.write("COPY . .\n")
file.write("RUN pip install flask praisonai==2.2.89 gunicorn markdown\n")
file.write("RUN pip install flask praisonai==2.2.90 gunicorn markdown\n")
file.write("EXPOSE 8080\n")
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
+2 -2
View File
@@ -1,6 +1,6 @@
[project]
name = "PraisonAI"
version = "2.2.89"
version = "2.2.90"
description = "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."
readme = "README.md"
license = ""
@@ -102,7 +102,7 @@ autogen-v4 = [
[tool.poetry]
name = "PraisonAI"
version = "2.2.89"
version = "2.2.90"
description = "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."
authors = ["Mervin Praison"]
license = ""
+1 -1
View File
@@ -4044,7 +4044,7 @@ wheels = [
[[package]]
name = "praisonai"
version = "2.2.89"
version = "2.2.90"
source = { editable = "." }
dependencies = [
{ name = "instructor" },