PraisonAI 2.3.2__tar.gz → 2.3.8__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.
- {praisonai-2.3.2 → praisonai-2.3.8}/PKG-INFO +287 -5
- {praisonai-2.3.2 → praisonai-2.3.8}/PraisonAI.egg-info/PKG-INFO +287 -5
- {praisonai-2.3.2 → praisonai-2.3.8}/PraisonAI.egg-info/SOURCES.txt +1 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/PraisonAI.egg-info/requires.txt +1 -1
- {praisonai-2.3.2 → praisonai-2.3.8}/README.md +285 -3
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/cli.py +619 -1
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/deploy.py +1 -1
- praisonai-2.3.8/praisonai/version.py +1 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/pyproject.toml +1 -1
- praisonai-2.3.8/tests/test_cli_features.py +179 -0
- praisonai-2.3.2/praisonai/version.py +0 -1
- {praisonai-2.3.2 → praisonai-2.3.8}/PraisonAI.egg-info/dependency_links.txt +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/PraisonAI.egg-info/entry_points.txt +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/PraisonAI.egg-info/top_level.txt +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/__init__.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/__main__.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/agents_generator.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/api/call.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/auto.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/chainlit_ui.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/inc/__init__.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/inc/config.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/inc/models.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/scheduler.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/setup/__init__.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/setup/build.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/setup/post_install.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/setup/setup_conda_env.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/setup.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/test.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/train.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/train_vision.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/agents.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/callbacks.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/chat.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/code.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/colab.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/colab_chainlit.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/components/aicoder.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/context.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/database_config.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/db.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/realtime.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/realtimeclient/__init__.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/realtimeclient/tools.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/praisonai/upload_vision.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/setup.cfg +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/tests/test.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/tests/test_agents_playbook.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/tests/test_basic.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/tests/test_custom_tools_fix.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/tests/test_double_api_fix.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/tests/test_phase2_refactor.py +0 -0
- {praisonai-2.3.2 → praisonai-2.3.8}/tests/test_runner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.8
|
|
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.
|
|
14
|
+
Requires-Dist: praisonaiagents>=0.0.187
|
|
15
15
|
Requires-Dist: python-dotenv>=0.19.0
|
|
16
16
|
Requires-Dist: instructor>=1.3.3
|
|
17
17
|
Requires-Dist: PyYAML>=6.0
|
|
@@ -155,6 +155,12 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
|
|
|
155
155
|
- 🌐 **Native Web Search** (OpenAI, Gemini, Anthropic, xAI, Perplexity)
|
|
156
156
|
- 📥 **Web Fetch** (Retrieve full content from URLs - Anthropic)
|
|
157
157
|
- 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
|
|
158
|
+
- 🧠 **Claude Memory Tool** (Persistent cross-conversation memory - Anthropic Beta)
|
|
159
|
+
- 💾 **File-Based Memory** (Zero-dependency persistent memory for all agents)
|
|
160
|
+
- 🔍 **Built-in Search Tools** (Tavily, You.com, Exa - web search, news, content extraction)
|
|
161
|
+
- 📋 **Planning Mode** (Plan before execution - Agent & Multi-Agent)
|
|
162
|
+
- 🔧 **Planning Tools** (Research with tools during planning)
|
|
163
|
+
- 🧠 **Planning Reasoning** (Chain-of-thought planning)
|
|
158
164
|
|
|
159
165
|
## Using Python Code
|
|
160
166
|
|
|
@@ -198,7 +204,34 @@ Run:
|
|
|
198
204
|
python app.py
|
|
199
205
|
```
|
|
200
206
|
|
|
201
|
-
### 3.
|
|
207
|
+
### 3. Agent with Planning Mode
|
|
208
|
+
|
|
209
|
+
Enable planning for any agent - the agent creates a plan, then executes step by step:
|
|
210
|
+
|
|
211
|
+
```python
|
|
212
|
+
from praisonaiagents import Agent
|
|
213
|
+
|
|
214
|
+
def search_web(query: str) -> str:
|
|
215
|
+
return f"Search results for: {query}"
|
|
216
|
+
|
|
217
|
+
agent = Agent(
|
|
218
|
+
name="AI Assistant",
|
|
219
|
+
instructions="Research and write about topics",
|
|
220
|
+
planning=True, # Enable planning mode
|
|
221
|
+
planning_tools=[search_web], # Tools for planning research
|
|
222
|
+
planning_reasoning=True # Chain-of-thought reasoning
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
result = agent.start("Research AI trends in 2025 and write a summary")
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**What happens:**
|
|
229
|
+
1. 📋 Agent creates a multi-step plan
|
|
230
|
+
2. 🚀 Executes each step sequentially
|
|
231
|
+
3. 📊 Shows progress with context passing
|
|
232
|
+
4. ✅ Returns final result
|
|
233
|
+
|
|
234
|
+
### 4. Deep Research Agent
|
|
202
235
|
|
|
203
236
|
Automated research with real-time streaming, web search, and citations using OpenAI or Gemini Deep Research APIs.
|
|
204
237
|
|
|
@@ -236,7 +269,7 @@ print(result.report)
|
|
|
236
269
|
- 🛠️ Built-in tools: web search, code interpreter, MCP, file search
|
|
237
270
|
- 🔄 Automatic provider detection from model name
|
|
238
271
|
|
|
239
|
-
###
|
|
272
|
+
### 5. Query Rewriter Agent
|
|
240
273
|
|
|
241
274
|
Transform user queries to improve RAG retrieval quality using multiple strategies.
|
|
242
275
|
|
|
@@ -271,6 +304,160 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
271
304
|
- **CONTEXTUAL**: Resolve references using conversation history
|
|
272
305
|
- **AUTO**: Automatically detect best strategy
|
|
273
306
|
|
|
307
|
+
### 6. Agent Memory (Zero Dependencies)
|
|
308
|
+
|
|
309
|
+
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
310
|
+
|
|
311
|
+
```python
|
|
312
|
+
from praisonaiagents import Agent
|
|
313
|
+
from praisonaiagents.memory import FileMemory
|
|
314
|
+
|
|
315
|
+
# Enable memory with a single parameter
|
|
316
|
+
agent = Agent(
|
|
317
|
+
name="Personal Assistant",
|
|
318
|
+
instructions="You are a helpful assistant that remembers user preferences.",
|
|
319
|
+
memory=True, # Enables file-based memory (no extra deps!)
|
|
320
|
+
user_id="user123" # Isolate memory per user
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
# Memory is automatically injected into conversations
|
|
324
|
+
result = agent.start("My name is John and I prefer Python")
|
|
325
|
+
# Agent will remember this for future conversations
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Memory Types:**
|
|
329
|
+
- **Short-term**: Rolling buffer of recent context (auto-expires)
|
|
330
|
+
- **Long-term**: Persistent important facts (sorted by importance)
|
|
331
|
+
- **Entity**: People, places, organizations with attributes
|
|
332
|
+
- **Episodic**: Date-based interaction history
|
|
333
|
+
|
|
334
|
+
**Advanced Features:**
|
|
335
|
+
```python
|
|
336
|
+
from praisonaiagents.memory import FileMemory
|
|
337
|
+
|
|
338
|
+
memory = FileMemory(user_id="user123")
|
|
339
|
+
|
|
340
|
+
# Session Save/Resume
|
|
341
|
+
memory.save_session("project_session", conversation_history=[...])
|
|
342
|
+
memory.resume_session("project_session")
|
|
343
|
+
|
|
344
|
+
# Context Compression
|
|
345
|
+
memory.compress(llm_func=lambda p: agent.chat(p), max_items=10)
|
|
346
|
+
|
|
347
|
+
# Checkpointing
|
|
348
|
+
memory.create_checkpoint("before_refactor", include_files=["main.py"])
|
|
349
|
+
memory.restore_checkpoint("before_refactor", restore_files=True)
|
|
350
|
+
|
|
351
|
+
# Slash Commands
|
|
352
|
+
memory.handle_command("/memory show")
|
|
353
|
+
memory.handle_command("/memory save my_session")
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Storage Options:**
|
|
357
|
+
| Option | Dependencies | Description |
|
|
358
|
+
|--------|-------------|-------------|
|
|
359
|
+
| `memory=True` | None | File-based JSON storage (default) |
|
|
360
|
+
| `memory="file"` | None | Explicit file-based storage |
|
|
361
|
+
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
362
|
+
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
363
|
+
|
|
364
|
+
### 6. Rules & Instructions
|
|
365
|
+
|
|
366
|
+
PraisonAI auto-discovers instruction files from your project root and git root:
|
|
367
|
+
|
|
368
|
+
| File | Description | Priority |
|
|
369
|
+
|------|-------------|----------|
|
|
370
|
+
| `PRAISON.md` | PraisonAI native instructions | High |
|
|
371
|
+
| `PRAISON.local.md` | Local overrides (gitignored) | Higher |
|
|
372
|
+
| `CLAUDE.md` | Claude Code memory file | High |
|
|
373
|
+
| `CLAUDE.local.md` | Local overrides (gitignored) | Higher |
|
|
374
|
+
| `AGENTS.md` | OpenAI Codex CLI instructions | High |
|
|
375
|
+
| `GEMINI.md` | Gemini CLI memory file | High |
|
|
376
|
+
| `.cursorrules` | Cursor IDE rules | High |
|
|
377
|
+
| `.windsurfrules` | Windsurf IDE rules | High |
|
|
378
|
+
| `.claude/rules/*.md` | Claude Code modular rules | Medium |
|
|
379
|
+
| `.windsurf/rules/*.md` | Windsurf modular rules | Medium |
|
|
380
|
+
| `.cursor/rules/*.mdc` | Cursor modular rules | Medium |
|
|
381
|
+
| `.praison/rules/*.md` | Workspace rules | Medium |
|
|
382
|
+
| `~/.praison/rules/*.md` | Global rules | Low |
|
|
383
|
+
|
|
384
|
+
```python
|
|
385
|
+
from praisonaiagents import Agent
|
|
386
|
+
|
|
387
|
+
# Agent auto-discovers CLAUDE.md, AGENTS.md, GEMINI.md, etc.
|
|
388
|
+
agent = Agent(name="Assistant", instructions="You are helpful.")
|
|
389
|
+
# Rules are injected into system prompt automatically
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**@Import Syntax:**
|
|
393
|
+
```markdown
|
|
394
|
+
# CLAUDE.md
|
|
395
|
+
See @README for project overview
|
|
396
|
+
See @docs/architecture.md for system design
|
|
397
|
+
@~/.praison/my-preferences.md
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
**Rule File Format (with YAML frontmatter):**
|
|
401
|
+
```markdown
|
|
402
|
+
---
|
|
403
|
+
description: Python coding guidelines
|
|
404
|
+
globs: ["**/*.py"]
|
|
405
|
+
activation: always # always, glob, manual, ai_decision
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
# Guidelines
|
|
409
|
+
- Use type hints
|
|
410
|
+
- Follow PEP 8
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### 7. Auto-Generated Memories
|
|
414
|
+
|
|
415
|
+
```python
|
|
416
|
+
from praisonaiagents.memory import FileMemory, AutoMemory
|
|
417
|
+
|
|
418
|
+
memory = FileMemory(user_id="user123")
|
|
419
|
+
auto = AutoMemory(memory, enabled=True)
|
|
420
|
+
|
|
421
|
+
# Automatically extracts and stores memories from conversations
|
|
422
|
+
memories = auto.process_interaction(
|
|
423
|
+
"My name is John and I prefer Python for backend work"
|
|
424
|
+
)
|
|
425
|
+
# Extracts: name="John", preference="Python for backend"
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### 8. Workflows
|
|
429
|
+
|
|
430
|
+
Create reusable multi-step workflows in `.praison/workflows/`:
|
|
431
|
+
|
|
432
|
+
```python
|
|
433
|
+
from praisonaiagents.memory import WorkflowManager
|
|
434
|
+
|
|
435
|
+
manager = WorkflowManager()
|
|
436
|
+
|
|
437
|
+
# Execute a workflow
|
|
438
|
+
result = manager.execute(
|
|
439
|
+
"deploy",
|
|
440
|
+
executor=lambda prompt: agent.chat(prompt),
|
|
441
|
+
variables={"environment": "production"}
|
|
442
|
+
)
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### 9. Hooks
|
|
446
|
+
|
|
447
|
+
Configure in `.praison/hooks.json`:
|
|
448
|
+
|
|
449
|
+
```python
|
|
450
|
+
from praisonaiagents.memory import HooksManager
|
|
451
|
+
|
|
452
|
+
hooks = HooksManager()
|
|
453
|
+
|
|
454
|
+
# Register Python hooks
|
|
455
|
+
hooks.register("pre_write_code", lambda ctx: print(f"Writing {ctx['file']}"))
|
|
456
|
+
|
|
457
|
+
# Execute hooks
|
|
458
|
+
result = hooks.execute("pre_write_code", {"file": "main.py"})
|
|
459
|
+
```
|
|
460
|
+
|
|
274
461
|
## Using No Code
|
|
275
462
|
|
|
276
463
|
### Auto Mode:
|
|
@@ -325,6 +512,101 @@ praisonai research --query-rewrite --tools tools.py --save "Your research query"
|
|
|
325
512
|
praisonai research -v "Your research query"
|
|
326
513
|
```
|
|
327
514
|
|
|
515
|
+
### Planning Mode CLI:
|
|
516
|
+
```bash
|
|
517
|
+
# Enable planning mode - agent creates a plan before execution
|
|
518
|
+
praisonai "Research AI trends and write a summary" --planning
|
|
519
|
+
|
|
520
|
+
# Planning with tools for research
|
|
521
|
+
praisonai "Analyze market trends" --planning --planning-tools tools.py
|
|
522
|
+
|
|
523
|
+
# Planning with chain-of-thought reasoning
|
|
524
|
+
praisonai "Complex analysis task" --planning --planning-reasoning
|
|
525
|
+
|
|
526
|
+
# Auto-approve plans without confirmation
|
|
527
|
+
praisonai "Task" --planning --auto-approve-plan
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### Memory CLI:
|
|
531
|
+
```bash
|
|
532
|
+
# Enable memory for agent (persists across sessions)
|
|
533
|
+
praisonai "My name is John" --memory
|
|
534
|
+
|
|
535
|
+
# Memory with user isolation
|
|
536
|
+
praisonai "Remember my preferences" --memory --user-id user123
|
|
537
|
+
|
|
538
|
+
# Memory management commands
|
|
539
|
+
praisonai memory show # Show memory statistics
|
|
540
|
+
praisonai memory add "User prefers Python" # Add to long-term memory
|
|
541
|
+
praisonai memory search "Python" # Search memories
|
|
542
|
+
praisonai memory clear # Clear short-term memory
|
|
543
|
+
praisonai memory clear all # Clear all memory
|
|
544
|
+
praisonai memory save my_session # Save session
|
|
545
|
+
praisonai memory resume my_session # Resume session
|
|
546
|
+
praisonai memory sessions # List saved sessions
|
|
547
|
+
praisonai memory checkpoint # Create checkpoint
|
|
548
|
+
praisonai memory restore <checkpoint_id> # Restore checkpoint
|
|
549
|
+
praisonai memory checkpoints # List checkpoints
|
|
550
|
+
praisonai memory help # Show all commands
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### Rules CLI:
|
|
554
|
+
```bash
|
|
555
|
+
# List all loaded rules (from PRAISON.md, CLAUDE.md, etc.)
|
|
556
|
+
praisonai rules list
|
|
557
|
+
|
|
558
|
+
# Show specific rule details
|
|
559
|
+
praisonai rules show <rule_name>
|
|
560
|
+
|
|
561
|
+
# Create a new rule
|
|
562
|
+
praisonai rules create my_rule "Always use type hints"
|
|
563
|
+
|
|
564
|
+
# Delete a rule
|
|
565
|
+
praisonai rules delete my_rule
|
|
566
|
+
|
|
567
|
+
# Show rules statistics
|
|
568
|
+
praisonai rules stats
|
|
569
|
+
|
|
570
|
+
# Include manual rules with prompts
|
|
571
|
+
praisonai "Task" --include-rules security,testing
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Workflow CLI:
|
|
575
|
+
```bash
|
|
576
|
+
# List available workflows
|
|
577
|
+
praisonai workflow list
|
|
578
|
+
|
|
579
|
+
# Execute a workflow
|
|
580
|
+
praisonai workflow run deploy
|
|
581
|
+
|
|
582
|
+
# Execute with variables
|
|
583
|
+
praisonai workflow run deploy --workflow-var environment=staging --workflow-var branch=main
|
|
584
|
+
|
|
585
|
+
# Show workflow details
|
|
586
|
+
praisonai workflow show deploy
|
|
587
|
+
|
|
588
|
+
# Create a new workflow template
|
|
589
|
+
praisonai workflow create my_workflow
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
### Hooks CLI:
|
|
593
|
+
```bash
|
|
594
|
+
# List configured hooks
|
|
595
|
+
praisonai hooks list
|
|
596
|
+
|
|
597
|
+
# Show hooks statistics
|
|
598
|
+
praisonai hooks stats
|
|
599
|
+
|
|
600
|
+
# Create hooks.json template
|
|
601
|
+
praisonai hooks init
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### Claude Memory Tool CLI:
|
|
605
|
+
```bash
|
|
606
|
+
# Enable Claude Memory Tool (Anthropic models only)
|
|
607
|
+
praisonai "Research and remember findings" --claude-memory --llm anthropic/claude-sonnet-4-20250514
|
|
608
|
+
```
|
|
609
|
+
|
|
328
610
|
## Using JavaScript Code
|
|
329
611
|
|
|
330
612
|
```bash
|
|
@@ -956,7 +1238,7 @@ cd src/praisonai && uv publish
|
|
|
956
1238
|
- 🎨 Interactive UIs
|
|
957
1239
|
- 📄 YAML-based Configuration
|
|
958
1240
|
- 🛠️ Custom Tool Integration
|
|
959
|
-
- 🔍 Internet Search Capability (
|
|
1241
|
+
- 🔍 Internet Search Capability (Tavily, You.com, Exa, DuckDuckGo, Crawl4AI)
|
|
960
1242
|
- 🖼️ Vision Language Model (VLM) Support
|
|
961
1243
|
- 🎙️ Real-time Voice Interaction
|
|
962
1244
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.8
|
|
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.
|
|
14
|
+
Requires-Dist: praisonaiagents>=0.0.187
|
|
15
15
|
Requires-Dist: python-dotenv>=0.19.0
|
|
16
16
|
Requires-Dist: instructor>=1.3.3
|
|
17
17
|
Requires-Dist: PyYAML>=6.0
|
|
@@ -155,6 +155,12 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
|
|
|
155
155
|
- 🌐 **Native Web Search** (OpenAI, Gemini, Anthropic, xAI, Perplexity)
|
|
156
156
|
- 📥 **Web Fetch** (Retrieve full content from URLs - Anthropic)
|
|
157
157
|
- 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
|
|
158
|
+
- 🧠 **Claude Memory Tool** (Persistent cross-conversation memory - Anthropic Beta)
|
|
159
|
+
- 💾 **File-Based Memory** (Zero-dependency persistent memory for all agents)
|
|
160
|
+
- 🔍 **Built-in Search Tools** (Tavily, You.com, Exa - web search, news, content extraction)
|
|
161
|
+
- 📋 **Planning Mode** (Plan before execution - Agent & Multi-Agent)
|
|
162
|
+
- 🔧 **Planning Tools** (Research with tools during planning)
|
|
163
|
+
- 🧠 **Planning Reasoning** (Chain-of-thought planning)
|
|
158
164
|
|
|
159
165
|
## Using Python Code
|
|
160
166
|
|
|
@@ -198,7 +204,34 @@ Run:
|
|
|
198
204
|
python app.py
|
|
199
205
|
```
|
|
200
206
|
|
|
201
|
-
### 3.
|
|
207
|
+
### 3. Agent with Planning Mode
|
|
208
|
+
|
|
209
|
+
Enable planning for any agent - the agent creates a plan, then executes step by step:
|
|
210
|
+
|
|
211
|
+
```python
|
|
212
|
+
from praisonaiagents import Agent
|
|
213
|
+
|
|
214
|
+
def search_web(query: str) -> str:
|
|
215
|
+
return f"Search results for: {query}"
|
|
216
|
+
|
|
217
|
+
agent = Agent(
|
|
218
|
+
name="AI Assistant",
|
|
219
|
+
instructions="Research and write about topics",
|
|
220
|
+
planning=True, # Enable planning mode
|
|
221
|
+
planning_tools=[search_web], # Tools for planning research
|
|
222
|
+
planning_reasoning=True # Chain-of-thought reasoning
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
result = agent.start("Research AI trends in 2025 and write a summary")
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**What happens:**
|
|
229
|
+
1. 📋 Agent creates a multi-step plan
|
|
230
|
+
2. 🚀 Executes each step sequentially
|
|
231
|
+
3. 📊 Shows progress with context passing
|
|
232
|
+
4. ✅ Returns final result
|
|
233
|
+
|
|
234
|
+
### 4. Deep Research Agent
|
|
202
235
|
|
|
203
236
|
Automated research with real-time streaming, web search, and citations using OpenAI or Gemini Deep Research APIs.
|
|
204
237
|
|
|
@@ -236,7 +269,7 @@ print(result.report)
|
|
|
236
269
|
- 🛠️ Built-in tools: web search, code interpreter, MCP, file search
|
|
237
270
|
- 🔄 Automatic provider detection from model name
|
|
238
271
|
|
|
239
|
-
###
|
|
272
|
+
### 5. Query Rewriter Agent
|
|
240
273
|
|
|
241
274
|
Transform user queries to improve RAG retrieval quality using multiple strategies.
|
|
242
275
|
|
|
@@ -271,6 +304,160 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
271
304
|
- **CONTEXTUAL**: Resolve references using conversation history
|
|
272
305
|
- **AUTO**: Automatically detect best strategy
|
|
273
306
|
|
|
307
|
+
### 6. Agent Memory (Zero Dependencies)
|
|
308
|
+
|
|
309
|
+
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
310
|
+
|
|
311
|
+
```python
|
|
312
|
+
from praisonaiagents import Agent
|
|
313
|
+
from praisonaiagents.memory import FileMemory
|
|
314
|
+
|
|
315
|
+
# Enable memory with a single parameter
|
|
316
|
+
agent = Agent(
|
|
317
|
+
name="Personal Assistant",
|
|
318
|
+
instructions="You are a helpful assistant that remembers user preferences.",
|
|
319
|
+
memory=True, # Enables file-based memory (no extra deps!)
|
|
320
|
+
user_id="user123" # Isolate memory per user
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
# Memory is automatically injected into conversations
|
|
324
|
+
result = agent.start("My name is John and I prefer Python")
|
|
325
|
+
# Agent will remember this for future conversations
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Memory Types:**
|
|
329
|
+
- **Short-term**: Rolling buffer of recent context (auto-expires)
|
|
330
|
+
- **Long-term**: Persistent important facts (sorted by importance)
|
|
331
|
+
- **Entity**: People, places, organizations with attributes
|
|
332
|
+
- **Episodic**: Date-based interaction history
|
|
333
|
+
|
|
334
|
+
**Advanced Features:**
|
|
335
|
+
```python
|
|
336
|
+
from praisonaiagents.memory import FileMemory
|
|
337
|
+
|
|
338
|
+
memory = FileMemory(user_id="user123")
|
|
339
|
+
|
|
340
|
+
# Session Save/Resume
|
|
341
|
+
memory.save_session("project_session", conversation_history=[...])
|
|
342
|
+
memory.resume_session("project_session")
|
|
343
|
+
|
|
344
|
+
# Context Compression
|
|
345
|
+
memory.compress(llm_func=lambda p: agent.chat(p), max_items=10)
|
|
346
|
+
|
|
347
|
+
# Checkpointing
|
|
348
|
+
memory.create_checkpoint("before_refactor", include_files=["main.py"])
|
|
349
|
+
memory.restore_checkpoint("before_refactor", restore_files=True)
|
|
350
|
+
|
|
351
|
+
# Slash Commands
|
|
352
|
+
memory.handle_command("/memory show")
|
|
353
|
+
memory.handle_command("/memory save my_session")
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Storage Options:**
|
|
357
|
+
| Option | Dependencies | Description |
|
|
358
|
+
|--------|-------------|-------------|
|
|
359
|
+
| `memory=True` | None | File-based JSON storage (default) |
|
|
360
|
+
| `memory="file"` | None | Explicit file-based storage |
|
|
361
|
+
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
362
|
+
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
363
|
+
|
|
364
|
+
### 6. Rules & Instructions
|
|
365
|
+
|
|
366
|
+
PraisonAI auto-discovers instruction files from your project root and git root:
|
|
367
|
+
|
|
368
|
+
| File | Description | Priority |
|
|
369
|
+
|------|-------------|----------|
|
|
370
|
+
| `PRAISON.md` | PraisonAI native instructions | High |
|
|
371
|
+
| `PRAISON.local.md` | Local overrides (gitignored) | Higher |
|
|
372
|
+
| `CLAUDE.md` | Claude Code memory file | High |
|
|
373
|
+
| `CLAUDE.local.md` | Local overrides (gitignored) | Higher |
|
|
374
|
+
| `AGENTS.md` | OpenAI Codex CLI instructions | High |
|
|
375
|
+
| `GEMINI.md` | Gemini CLI memory file | High |
|
|
376
|
+
| `.cursorrules` | Cursor IDE rules | High |
|
|
377
|
+
| `.windsurfrules` | Windsurf IDE rules | High |
|
|
378
|
+
| `.claude/rules/*.md` | Claude Code modular rules | Medium |
|
|
379
|
+
| `.windsurf/rules/*.md` | Windsurf modular rules | Medium |
|
|
380
|
+
| `.cursor/rules/*.mdc` | Cursor modular rules | Medium |
|
|
381
|
+
| `.praison/rules/*.md` | Workspace rules | Medium |
|
|
382
|
+
| `~/.praison/rules/*.md` | Global rules | Low |
|
|
383
|
+
|
|
384
|
+
```python
|
|
385
|
+
from praisonaiagents import Agent
|
|
386
|
+
|
|
387
|
+
# Agent auto-discovers CLAUDE.md, AGENTS.md, GEMINI.md, etc.
|
|
388
|
+
agent = Agent(name="Assistant", instructions="You are helpful.")
|
|
389
|
+
# Rules are injected into system prompt automatically
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**@Import Syntax:**
|
|
393
|
+
```markdown
|
|
394
|
+
# CLAUDE.md
|
|
395
|
+
See @README for project overview
|
|
396
|
+
See @docs/architecture.md for system design
|
|
397
|
+
@~/.praison/my-preferences.md
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
**Rule File Format (with YAML frontmatter):**
|
|
401
|
+
```markdown
|
|
402
|
+
---
|
|
403
|
+
description: Python coding guidelines
|
|
404
|
+
globs: ["**/*.py"]
|
|
405
|
+
activation: always # always, glob, manual, ai_decision
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
# Guidelines
|
|
409
|
+
- Use type hints
|
|
410
|
+
- Follow PEP 8
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### 7. Auto-Generated Memories
|
|
414
|
+
|
|
415
|
+
```python
|
|
416
|
+
from praisonaiagents.memory import FileMemory, AutoMemory
|
|
417
|
+
|
|
418
|
+
memory = FileMemory(user_id="user123")
|
|
419
|
+
auto = AutoMemory(memory, enabled=True)
|
|
420
|
+
|
|
421
|
+
# Automatically extracts and stores memories from conversations
|
|
422
|
+
memories = auto.process_interaction(
|
|
423
|
+
"My name is John and I prefer Python for backend work"
|
|
424
|
+
)
|
|
425
|
+
# Extracts: name="John", preference="Python for backend"
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### 8. Workflows
|
|
429
|
+
|
|
430
|
+
Create reusable multi-step workflows in `.praison/workflows/`:
|
|
431
|
+
|
|
432
|
+
```python
|
|
433
|
+
from praisonaiagents.memory import WorkflowManager
|
|
434
|
+
|
|
435
|
+
manager = WorkflowManager()
|
|
436
|
+
|
|
437
|
+
# Execute a workflow
|
|
438
|
+
result = manager.execute(
|
|
439
|
+
"deploy",
|
|
440
|
+
executor=lambda prompt: agent.chat(prompt),
|
|
441
|
+
variables={"environment": "production"}
|
|
442
|
+
)
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### 9. Hooks
|
|
446
|
+
|
|
447
|
+
Configure in `.praison/hooks.json`:
|
|
448
|
+
|
|
449
|
+
```python
|
|
450
|
+
from praisonaiagents.memory import HooksManager
|
|
451
|
+
|
|
452
|
+
hooks = HooksManager()
|
|
453
|
+
|
|
454
|
+
# Register Python hooks
|
|
455
|
+
hooks.register("pre_write_code", lambda ctx: print(f"Writing {ctx['file']}"))
|
|
456
|
+
|
|
457
|
+
# Execute hooks
|
|
458
|
+
result = hooks.execute("pre_write_code", {"file": "main.py"})
|
|
459
|
+
```
|
|
460
|
+
|
|
274
461
|
## Using No Code
|
|
275
462
|
|
|
276
463
|
### Auto Mode:
|
|
@@ -325,6 +512,101 @@ praisonai research --query-rewrite --tools tools.py --save "Your research query"
|
|
|
325
512
|
praisonai research -v "Your research query"
|
|
326
513
|
```
|
|
327
514
|
|
|
515
|
+
### Planning Mode CLI:
|
|
516
|
+
```bash
|
|
517
|
+
# Enable planning mode - agent creates a plan before execution
|
|
518
|
+
praisonai "Research AI trends and write a summary" --planning
|
|
519
|
+
|
|
520
|
+
# Planning with tools for research
|
|
521
|
+
praisonai "Analyze market trends" --planning --planning-tools tools.py
|
|
522
|
+
|
|
523
|
+
# Planning with chain-of-thought reasoning
|
|
524
|
+
praisonai "Complex analysis task" --planning --planning-reasoning
|
|
525
|
+
|
|
526
|
+
# Auto-approve plans without confirmation
|
|
527
|
+
praisonai "Task" --planning --auto-approve-plan
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### Memory CLI:
|
|
531
|
+
```bash
|
|
532
|
+
# Enable memory for agent (persists across sessions)
|
|
533
|
+
praisonai "My name is John" --memory
|
|
534
|
+
|
|
535
|
+
# Memory with user isolation
|
|
536
|
+
praisonai "Remember my preferences" --memory --user-id user123
|
|
537
|
+
|
|
538
|
+
# Memory management commands
|
|
539
|
+
praisonai memory show # Show memory statistics
|
|
540
|
+
praisonai memory add "User prefers Python" # Add to long-term memory
|
|
541
|
+
praisonai memory search "Python" # Search memories
|
|
542
|
+
praisonai memory clear # Clear short-term memory
|
|
543
|
+
praisonai memory clear all # Clear all memory
|
|
544
|
+
praisonai memory save my_session # Save session
|
|
545
|
+
praisonai memory resume my_session # Resume session
|
|
546
|
+
praisonai memory sessions # List saved sessions
|
|
547
|
+
praisonai memory checkpoint # Create checkpoint
|
|
548
|
+
praisonai memory restore <checkpoint_id> # Restore checkpoint
|
|
549
|
+
praisonai memory checkpoints # List checkpoints
|
|
550
|
+
praisonai memory help # Show all commands
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### Rules CLI:
|
|
554
|
+
```bash
|
|
555
|
+
# List all loaded rules (from PRAISON.md, CLAUDE.md, etc.)
|
|
556
|
+
praisonai rules list
|
|
557
|
+
|
|
558
|
+
# Show specific rule details
|
|
559
|
+
praisonai rules show <rule_name>
|
|
560
|
+
|
|
561
|
+
# Create a new rule
|
|
562
|
+
praisonai rules create my_rule "Always use type hints"
|
|
563
|
+
|
|
564
|
+
# Delete a rule
|
|
565
|
+
praisonai rules delete my_rule
|
|
566
|
+
|
|
567
|
+
# Show rules statistics
|
|
568
|
+
praisonai rules stats
|
|
569
|
+
|
|
570
|
+
# Include manual rules with prompts
|
|
571
|
+
praisonai "Task" --include-rules security,testing
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Workflow CLI:
|
|
575
|
+
```bash
|
|
576
|
+
# List available workflows
|
|
577
|
+
praisonai workflow list
|
|
578
|
+
|
|
579
|
+
# Execute a workflow
|
|
580
|
+
praisonai workflow run deploy
|
|
581
|
+
|
|
582
|
+
# Execute with variables
|
|
583
|
+
praisonai workflow run deploy --workflow-var environment=staging --workflow-var branch=main
|
|
584
|
+
|
|
585
|
+
# Show workflow details
|
|
586
|
+
praisonai workflow show deploy
|
|
587
|
+
|
|
588
|
+
# Create a new workflow template
|
|
589
|
+
praisonai workflow create my_workflow
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
### Hooks CLI:
|
|
593
|
+
```bash
|
|
594
|
+
# List configured hooks
|
|
595
|
+
praisonai hooks list
|
|
596
|
+
|
|
597
|
+
# Show hooks statistics
|
|
598
|
+
praisonai hooks stats
|
|
599
|
+
|
|
600
|
+
# Create hooks.json template
|
|
601
|
+
praisonai hooks init
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### Claude Memory Tool CLI:
|
|
605
|
+
```bash
|
|
606
|
+
# Enable Claude Memory Tool (Anthropic models only)
|
|
607
|
+
praisonai "Research and remember findings" --claude-memory --llm anthropic/claude-sonnet-4-20250514
|
|
608
|
+
```
|
|
609
|
+
|
|
328
610
|
## Using JavaScript Code
|
|
329
611
|
|
|
330
612
|
```bash
|
|
@@ -956,7 +1238,7 @@ cd src/praisonai && uv publish
|
|
|
956
1238
|
- 🎨 Interactive UIs
|
|
957
1239
|
- 📄 YAML-based Configuration
|
|
958
1240
|
- 🛠️ Custom Tool Integration
|
|
959
|
-
- 🔍 Internet Search Capability (
|
|
1241
|
+
- 🔍 Internet Search Capability (Tavily, You.com, Exa, DuckDuckGo, Crawl4AI)
|
|
960
1242
|
- 🖼️ Vision Language Model (VLM) Support
|
|
961
1243
|
- 🎙️ Real-time Voice Interaction
|
|
962
1244
|
|