Skip to content

Commit 8b5d346

Browse files
committed
docs: add Deep Research CLI documentation and bump version to 2.2.90
1 parent 2885a47 commit 8b5d346

11 files changed

Lines changed: 111 additions & 13 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,18 @@ export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
144144
praisonai --auto create a movie script about Robots in Mars
145145
```
146146

147+
### Deep Research CLI:
148+
```bash
149+
# Default: OpenAI (o4-mini-deep-research)
150+
praisonai research "What are the latest AI trends in 2025?"
151+
152+
# Use Gemini
153+
praisonai research --model deep-research-pro "Your research query"
154+
155+
# Verbose mode (show debug logs)
156+
praisonai research -v "Your research query"
157+
```
158+
147159
## Using JavaScript Code
148160

149161
```bash

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
flask \
19-
"praisonai>=2.2.89" \
19+
"praisonai>=2.2.90" \
2020
"praisonai[api]" \
2121
gunicorn \
2222
markdown

docker/Dockerfile.chat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=2.2.89" \
19+
"praisonai>=2.2.90" \
2020
"praisonai[chat]" \
2121
"embedchain[github,youtube]"
2222

docker/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN mkdir -p /root/.praison
2020
# Install Python packages (using latest versions)
2121
RUN pip install --no-cache-dir \
2222
praisonai_tools \
23-
"praisonai>=2.2.89" \
23+
"praisonai>=2.2.90" \
2424
"praisonai[ui]" \
2525
"praisonai[chat]" \
2626
"praisonai[realtime]" \

docker/Dockerfile.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=2.2.89" \
19+
"praisonai>=2.2.90" \
2020
"praisonai[ui]" \
2121
"praisonai[crewai]"
2222

docker/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ healthcheck:
121121
## 📦 Package Versions
122122
123123
All Docker images use consistent, up-to-date versions:
124-
- PraisonAI: `>=2.2.89`
124+
- PraisonAI: `>=2.2.90`
125125
- PraisonAI Agents: `>=0.0.92`
126126
- Python: `3.11-slim`
127127

@@ -218,7 +218,7 @@ docker-compose up -d
218218
### Version Pinning
219219
To use specific versions, update the Dockerfile:
220220
```dockerfile
221-
RUN pip install "praisonai==2.2.89" "praisonaiagents==0.0.92"
221+
RUN pip install "praisonai==2.2.90" "praisonaiagents==0.0.92"
222222
```
223223

224224
## 🌐 Production Deployment

src/praisonai/praisonai.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ class Praisonai < Formula
33

44
desc "AI tools for various AI applications"
55
homepage "https://github.com/MervinPraison/PraisonAI"
6-
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.89.tar.gz"
7-
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.89.tar.gz | shasum -a 256`.split.first
6+
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.90.tar.gz"
7+
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v2.2.90.tar.gz | shasum -a 256`.split.first
88
license "MIT"
99

1010
depends_on "python@3.11"

src/praisonai/praisonai/cli.py

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def parse_args(self):
545545
return default_args
546546

547547
# Define special commands
548-
special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui', 'context']
548+
special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui', 'context', 'research']
549549

550550
parser = argparse.ArgumentParser(prog="praisonai", description="praisonAI command-line interface")
551551
parser.add_argument("--framework", choices=["crewai", "autogen", "praisonai"], help="Specify the framework")
@@ -572,6 +572,8 @@ def parse_args(self):
572572
parser.add_argument("--url", type=str, help="Repository URL for context analysis")
573573
parser.add_argument("--goal", type=str, help="Goal for context engineering")
574574
parser.add_argument("--auto-analyze", action="store_true", help="Enable automatic analysis in context engineering")
575+
parser.add_argument("--research", action="store_true", help="Run deep research on a topic")
576+
parser.add_argument("--verbose", "-v", action="store_true", help="Enable verbose output for research")
575577

576578
# If we're in a test environment, parse with empty args to avoid pytest interference
577579
if in_test_env:
@@ -696,6 +698,25 @@ def parse_args(self):
696698
self.handle_context_command(args.url, args.goal, getattr(args, 'auto_analyze', False))
697699
sys.exit(0)
698700

701+
elif args.command == 'research':
702+
if not PRAISONAI_AVAILABLE:
703+
print("[red]ERROR: PraisonAI Agents is not installed. Install with:[/red]")
704+
print("\npip install praisonaiagents\n")
705+
sys.exit(1)
706+
707+
# Get the research query from remaining args
708+
research_query = ' '.join(unknown_args) if unknown_args else None
709+
if not research_query:
710+
print("[red]ERROR: Research query is required[/red]")
711+
print("Usage: praisonai research \"Your research query\"")
712+
print(" praisonai research --model deep-research-pro \"Your query\"")
713+
sys.exit(1)
714+
715+
research_model = getattr(args, 'model', None)
716+
verbose = getattr(args, 'verbose', False)
717+
self.handle_research_command(research_query, research_model, verbose)
718+
sys.exit(0)
719+
699720
# Only check framework availability for agent-related operations
700721
if not args.command and (args.init or args.auto or args.framework):
701722
if not CREWAI_AVAILABLE and not AUTOGEN_AVAILABLE and not PRAISONAI_AVAILABLE:
@@ -933,6 +954,71 @@ def handle_context_command(self, url: str, goal: str, auto_analyze: bool = False
933954
print(f"[red]ERROR: Context engineering failed: {e}[/red]")
934955
sys.exit(1)
935956

957+
def handle_research_command(self, query: str, model: str = None, verbose: bool = False) -> str:
958+
"""
959+
Handle the research command by creating a DeepResearchAgent and running it.
960+
961+
Args:
962+
query: Research query/topic
963+
model: Model for deep research (optional, defaults to o4-mini-deep-research)
964+
verbose: Enable verbose output (default: False)
965+
966+
Returns:
967+
str: Research report
968+
"""
969+
try:
970+
from praisonaiagents import DeepResearchAgent
971+
972+
# Suppress logging unless verbose
973+
if not verbose:
974+
logging.getLogger('google').setLevel(logging.WARNING)
975+
logging.getLogger('google.genai').setLevel(logging.WARNING)
976+
logging.getLogger('httpx').setLevel(logging.WARNING)
977+
logging.getLogger('httpcore').setLevel(logging.WARNING)
978+
979+
print("[bold green]Starting Deep Research...[/bold green]")
980+
print(f"Query: {query}")
981+
982+
# Default model if not specified
983+
if not model:
984+
model = "o4-mini-deep-research"
985+
986+
print(f"Model: {model}")
987+
988+
# Create DeepResearchAgent
989+
agent = DeepResearchAgent(
990+
model=model,
991+
verbose=verbose
992+
)
993+
994+
# Execute the research (streaming is enabled by default)
995+
result = agent.research(query)
996+
997+
print("\n[bold green]Research Complete![/bold green]")
998+
print("\n" + "="*60)
999+
print(result.report)
1000+
print("="*60)
1001+
1002+
# Show citations if available
1003+
if result.citations:
1004+
print(f"\n[bold]Citations ({len(result.citations)}):[/bold]")
1005+
for i, citation in enumerate(result.citations, 1):
1006+
title = getattr(citation, 'title', 'Untitled')
1007+
url = getattr(citation, 'url', '')
1008+
print(f" {i}. {title}")
1009+
if url:
1010+
print(f" {url}")
1011+
1012+
return result.report
1013+
1014+
except ImportError as e:
1015+
print(f"[red]ERROR: Failed to import DeepResearchAgent: {e}[/red]")
1016+
print("Make sure praisonaiagents is installed: pip install praisonaiagents")
1017+
sys.exit(1)
1018+
except Exception as e:
1019+
print(f"[red]ERROR: Research failed: {e}[/red]")
1020+
sys.exit(1)
1021+
9361022
if __name__ == "__main__":
9371023
praison_ai = PraisonAI()
9381024
praison_ai.main()

src/praisonai/praisonai/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def create_dockerfile(self):
5757
file.write("FROM python:3.11-slim\n")
5858
file.write("WORKDIR /app\n")
5959
file.write("COPY . .\n")
60-
file.write("RUN pip install flask praisonai==2.2.89 gunicorn markdown\n")
60+
file.write("RUN pip install flask praisonai==2.2.90 gunicorn markdown\n")
6161
file.write("EXPOSE 8080\n")
6262
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
6363

src/praisonai/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "PraisonAI"
3-
version = "2.2.89"
3+
version = "2.2.90"
44
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."
55
readme = "README.md"
66
license = ""
@@ -102,7 +102,7 @@ autogen-v4 = [
102102

103103
[tool.poetry]
104104
name = "PraisonAI"
105-
version = "2.2.89"
105+
version = "2.2.90"
106106
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."
107107
authors = ["Mervin Praison"]
108108
license = ""

0 commit comments

Comments
 (0)