praisonAI 2.3.3__tar.gz → 2.3.5__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.3 → praisonai-2.3.5}/PKG-INFO +126 -13
- {praisonai-2.3.3 → praisonai-2.3.5}/PraisonAI.egg-info/PKG-INFO +126 -13
- {praisonai-2.3.3 → praisonai-2.3.5}/PraisonAI.egg-info/requires.txt +1 -1
- {praisonai-2.3.3 → praisonai-2.3.5}/README.md +124 -11
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/deploy.py +1 -1
- praisonai-2.3.5/praisonai/version.py +1 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/pyproject.toml +1 -1
- praisonai-2.3.3/praisonai/version.py +0 -1
- {praisonai-2.3.3 → praisonai-2.3.5}/PraisonAI.egg-info/SOURCES.txt +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/PraisonAI.egg-info/dependency_links.txt +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/PraisonAI.egg-info/entry_points.txt +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/PraisonAI.egg-info/top_level.txt +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/__init__.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/__main__.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/agents_generator.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/api/call.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/auto.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/chainlit_ui.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/cli.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/inc/__init__.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/inc/config.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/inc/models.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/scheduler.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/setup/__init__.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/setup/build.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/setup/post_install.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/setup/setup_conda_env.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/setup.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/test.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/train.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/train_vision.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/agents.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/callbacks.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/chat.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/code.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/colab.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/colab_chainlit.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/components/aicoder.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/context.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/database_config.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/db.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/realtime.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/realtimeclient/__init__.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/realtimeclient/tools.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/praisonai/upload_vision.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/setup.cfg +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/tests/test.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/tests/test_agents_playbook.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/tests/test_basic.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/tests/test_custom_tools_fix.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/tests/test_double_api_fix.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/tests/test_phase2_refactor.py +0 -0
- {praisonai-2.3.3 → praisonai-2.3.5}/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.5
|
|
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.183
|
|
15
15
|
Requires-Dist: python-dotenv>=0.19.0
|
|
16
16
|
Requires-Dist: instructor>=1.3.3
|
|
17
17
|
Requires-Dist: PyYAML>=6.0
|
|
@@ -157,6 +157,7 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
|
|
|
157
157
|
- 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
|
|
158
158
|
- 🧠 **Claude Memory Tool** (Persistent cross-conversation memory - Anthropic Beta)
|
|
159
159
|
- 💾 **File-Based Memory** (Zero-dependency persistent memory for all agents)
|
|
160
|
+
- 📋 **Planning Mode** (Plan before execution like Cursor, Windsurf, Claude Code)
|
|
160
161
|
|
|
161
162
|
## Using Python Code
|
|
162
163
|
|
|
@@ -275,10 +276,11 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
275
276
|
|
|
276
277
|
### 5. Agent Memory (Zero Dependencies)
|
|
277
278
|
|
|
278
|
-
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
279
|
+
Enable persistent memory for agents - works out of the box without any extra packages. Features inspired by Claude, Gemini CLI, Codex CLI, Cursor, and Windsurf.
|
|
279
280
|
|
|
280
281
|
```python
|
|
281
282
|
from praisonaiagents import Agent
|
|
283
|
+
from praisonaiagents.memory import FileMemory
|
|
282
284
|
|
|
283
285
|
# Enable memory with a single parameter
|
|
284
286
|
agent = Agent(
|
|
@@ -288,17 +290,9 @@ agent = Agent(
|
|
|
288
290
|
user_id="user123" # Isolate memory per user
|
|
289
291
|
)
|
|
290
292
|
|
|
291
|
-
# Store memories programmatically
|
|
292
|
-
agent.store_memory("User prefers dark mode", memory_type="short_term")
|
|
293
|
-
agent.store_memory("User's name is John", memory_type="long_term", importance=0.9)
|
|
294
|
-
|
|
295
293
|
# Memory is automatically injected into conversations
|
|
296
|
-
result = agent.start("
|
|
297
|
-
# Agent will
|
|
298
|
-
|
|
299
|
-
# Memory persists across sessions - create new agent with same user_id
|
|
300
|
-
agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
301
|
-
# agent2 automatically loads all previous memories!
|
|
294
|
+
result = agent.start("My name is John and I prefer Python")
|
|
295
|
+
# Agent will remember this for future conversations
|
|
302
296
|
```
|
|
303
297
|
|
|
304
298
|
**Memory Types:**
|
|
@@ -307,6 +301,28 @@ agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
|
307
301
|
- **Entity**: People, places, organizations with attributes
|
|
308
302
|
- **Episodic**: Date-based interaction history
|
|
309
303
|
|
|
304
|
+
**Advanced Features (like Gemini CLI):**
|
|
305
|
+
```python
|
|
306
|
+
from praisonaiagents.memory import FileMemory
|
|
307
|
+
|
|
308
|
+
memory = FileMemory(user_id="user123")
|
|
309
|
+
|
|
310
|
+
# Session Save/Resume
|
|
311
|
+
memory.save_session("project_session", conversation_history=[...])
|
|
312
|
+
memory.resume_session("project_session")
|
|
313
|
+
|
|
314
|
+
# Context Compression
|
|
315
|
+
memory.compress(llm_func=lambda p: agent.chat(p), max_items=10)
|
|
316
|
+
|
|
317
|
+
# Checkpointing
|
|
318
|
+
memory.create_checkpoint("before_refactor", include_files=["main.py"])
|
|
319
|
+
memory.restore_checkpoint("before_refactor", restore_files=True)
|
|
320
|
+
|
|
321
|
+
# Slash Commands
|
|
322
|
+
memory.handle_command("/memory show")
|
|
323
|
+
memory.handle_command("/memory save my_session")
|
|
324
|
+
```
|
|
325
|
+
|
|
310
326
|
**Storage Options:**
|
|
311
327
|
| Option | Dependencies | Description |
|
|
312
328
|
|--------|-------------|-------------|
|
|
@@ -315,6 +331,103 @@ agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
|
315
331
|
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
316
332
|
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
317
333
|
|
|
334
|
+
### 6. Rules & Instructions (like Cursor/Windsurf)
|
|
335
|
+
|
|
336
|
+
PraisonAI auto-discovers instruction files from your project root and git root:
|
|
337
|
+
|
|
338
|
+
| File | Description | Priority |
|
|
339
|
+
|------|-------------|----------|
|
|
340
|
+
| `PRAISON.md` | PraisonAI native instructions | High |
|
|
341
|
+
| `PRAISON.local.md` | Local overrides (gitignored) | Higher |
|
|
342
|
+
| `CLAUDE.md` | Claude Code memory file | High |
|
|
343
|
+
| `CLAUDE.local.md` | Local overrides (gitignored) | Higher |
|
|
344
|
+
| `AGENTS.md` | OpenAI Codex CLI instructions | High |
|
|
345
|
+
| `GEMINI.md` | Gemini CLI memory file | High |
|
|
346
|
+
| `.cursorrules` | Cursor IDE rules | High |
|
|
347
|
+
| `.windsurfrules` | Windsurf IDE rules | High |
|
|
348
|
+
| `.claude/rules/*.md` | Claude Code modular rules | Medium |
|
|
349
|
+
| `.windsurf/rules/*.md` | Windsurf modular rules | Medium |
|
|
350
|
+
| `.cursor/rules/*.mdc` | Cursor modular rules | Medium |
|
|
351
|
+
| `.praison/rules/*.md` | Workspace rules | Medium |
|
|
352
|
+
| `~/.praison/rules/*.md` | Global rules | Low |
|
|
353
|
+
|
|
354
|
+
```python
|
|
355
|
+
from praisonaiagents import Agent
|
|
356
|
+
|
|
357
|
+
# Agent auto-discovers CLAUDE.md, AGENTS.md, GEMINI.md, etc.
|
|
358
|
+
agent = Agent(name="Assistant", instructions="You are helpful.")
|
|
359
|
+
# Rules are injected into system prompt automatically
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**@Import Syntax (like Claude Code):**
|
|
363
|
+
```markdown
|
|
364
|
+
# CLAUDE.md
|
|
365
|
+
See @README for project overview
|
|
366
|
+
See @docs/architecture.md for system design
|
|
367
|
+
@~/.praison/my-preferences.md
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Rule File Format (with YAML frontmatter):**
|
|
371
|
+
```markdown
|
|
372
|
+
---
|
|
373
|
+
description: Python coding guidelines
|
|
374
|
+
globs: ["**/*.py"]
|
|
375
|
+
activation: always # always, glob, manual, ai_decision
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
# Guidelines
|
|
379
|
+
- Use type hints
|
|
380
|
+
- Follow PEP 8
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### 7. Auto-Generated Memories (like Windsurf Cascade)
|
|
384
|
+
|
|
385
|
+
```python
|
|
386
|
+
from praisonaiagents.memory import FileMemory, AutoMemory
|
|
387
|
+
|
|
388
|
+
memory = FileMemory(user_id="user123")
|
|
389
|
+
auto = AutoMemory(memory, enabled=True)
|
|
390
|
+
|
|
391
|
+
# Automatically extracts and stores memories from conversations
|
|
392
|
+
memories = auto.process_interaction(
|
|
393
|
+
"My name is John and I prefer Python for backend work"
|
|
394
|
+
)
|
|
395
|
+
# Extracts: name="John", preference="Python for backend"
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### 8. Workflows (like Windsurf)
|
|
399
|
+
|
|
400
|
+
Create reusable multi-step workflows in `.praison/workflows/`:
|
|
401
|
+
|
|
402
|
+
```python
|
|
403
|
+
from praisonaiagents.memory import WorkflowManager
|
|
404
|
+
|
|
405
|
+
manager = WorkflowManager()
|
|
406
|
+
|
|
407
|
+
# Execute a workflow
|
|
408
|
+
result = manager.execute(
|
|
409
|
+
"deploy",
|
|
410
|
+
executor=lambda prompt: agent.chat(prompt),
|
|
411
|
+
variables={"environment": "production"}
|
|
412
|
+
)
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### 9. Hooks (like Windsurf Cascade Hooks)
|
|
416
|
+
|
|
417
|
+
Configure in `.praison/hooks.json`:
|
|
418
|
+
|
|
419
|
+
```python
|
|
420
|
+
from praisonaiagents.memory import HooksManager
|
|
421
|
+
|
|
422
|
+
hooks = HooksManager()
|
|
423
|
+
|
|
424
|
+
# Register Python hooks
|
|
425
|
+
hooks.register("pre_write_code", lambda ctx: print(f"Writing {ctx['file']}"))
|
|
426
|
+
|
|
427
|
+
# Execute hooks
|
|
428
|
+
result = hooks.execute("pre_write_code", {"file": "main.py"})
|
|
429
|
+
```
|
|
430
|
+
|
|
318
431
|
## Using No Code
|
|
319
432
|
|
|
320
433
|
### Auto Mode:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.5
|
|
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.183
|
|
15
15
|
Requires-Dist: python-dotenv>=0.19.0
|
|
16
16
|
Requires-Dist: instructor>=1.3.3
|
|
17
17
|
Requires-Dist: PyYAML>=6.0
|
|
@@ -157,6 +157,7 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
|
|
|
157
157
|
- 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
|
|
158
158
|
- 🧠 **Claude Memory Tool** (Persistent cross-conversation memory - Anthropic Beta)
|
|
159
159
|
- 💾 **File-Based Memory** (Zero-dependency persistent memory for all agents)
|
|
160
|
+
- 📋 **Planning Mode** (Plan before execution like Cursor, Windsurf, Claude Code)
|
|
160
161
|
|
|
161
162
|
## Using Python Code
|
|
162
163
|
|
|
@@ -275,10 +276,11 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
275
276
|
|
|
276
277
|
### 5. Agent Memory (Zero Dependencies)
|
|
277
278
|
|
|
278
|
-
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
279
|
+
Enable persistent memory for agents - works out of the box without any extra packages. Features inspired by Claude, Gemini CLI, Codex CLI, Cursor, and Windsurf.
|
|
279
280
|
|
|
280
281
|
```python
|
|
281
282
|
from praisonaiagents import Agent
|
|
283
|
+
from praisonaiagents.memory import FileMemory
|
|
282
284
|
|
|
283
285
|
# Enable memory with a single parameter
|
|
284
286
|
agent = Agent(
|
|
@@ -288,17 +290,9 @@ agent = Agent(
|
|
|
288
290
|
user_id="user123" # Isolate memory per user
|
|
289
291
|
)
|
|
290
292
|
|
|
291
|
-
# Store memories programmatically
|
|
292
|
-
agent.store_memory("User prefers dark mode", memory_type="short_term")
|
|
293
|
-
agent.store_memory("User's name is John", memory_type="long_term", importance=0.9)
|
|
294
|
-
|
|
295
293
|
# Memory is automatically injected into conversations
|
|
296
|
-
result = agent.start("
|
|
297
|
-
# Agent will
|
|
298
|
-
|
|
299
|
-
# Memory persists across sessions - create new agent with same user_id
|
|
300
|
-
agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
301
|
-
# agent2 automatically loads all previous memories!
|
|
294
|
+
result = agent.start("My name is John and I prefer Python")
|
|
295
|
+
# Agent will remember this for future conversations
|
|
302
296
|
```
|
|
303
297
|
|
|
304
298
|
**Memory Types:**
|
|
@@ -307,6 +301,28 @@ agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
|
307
301
|
- **Entity**: People, places, organizations with attributes
|
|
308
302
|
- **Episodic**: Date-based interaction history
|
|
309
303
|
|
|
304
|
+
**Advanced Features (like Gemini CLI):**
|
|
305
|
+
```python
|
|
306
|
+
from praisonaiagents.memory import FileMemory
|
|
307
|
+
|
|
308
|
+
memory = FileMemory(user_id="user123")
|
|
309
|
+
|
|
310
|
+
# Session Save/Resume
|
|
311
|
+
memory.save_session("project_session", conversation_history=[...])
|
|
312
|
+
memory.resume_session("project_session")
|
|
313
|
+
|
|
314
|
+
# Context Compression
|
|
315
|
+
memory.compress(llm_func=lambda p: agent.chat(p), max_items=10)
|
|
316
|
+
|
|
317
|
+
# Checkpointing
|
|
318
|
+
memory.create_checkpoint("before_refactor", include_files=["main.py"])
|
|
319
|
+
memory.restore_checkpoint("before_refactor", restore_files=True)
|
|
320
|
+
|
|
321
|
+
# Slash Commands
|
|
322
|
+
memory.handle_command("/memory show")
|
|
323
|
+
memory.handle_command("/memory save my_session")
|
|
324
|
+
```
|
|
325
|
+
|
|
310
326
|
**Storage Options:**
|
|
311
327
|
| Option | Dependencies | Description |
|
|
312
328
|
|--------|-------------|-------------|
|
|
@@ -315,6 +331,103 @@ agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
|
315
331
|
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
316
332
|
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
317
333
|
|
|
334
|
+
### 6. Rules & Instructions (like Cursor/Windsurf)
|
|
335
|
+
|
|
336
|
+
PraisonAI auto-discovers instruction files from your project root and git root:
|
|
337
|
+
|
|
338
|
+
| File | Description | Priority |
|
|
339
|
+
|------|-------------|----------|
|
|
340
|
+
| `PRAISON.md` | PraisonAI native instructions | High |
|
|
341
|
+
| `PRAISON.local.md` | Local overrides (gitignored) | Higher |
|
|
342
|
+
| `CLAUDE.md` | Claude Code memory file | High |
|
|
343
|
+
| `CLAUDE.local.md` | Local overrides (gitignored) | Higher |
|
|
344
|
+
| `AGENTS.md` | OpenAI Codex CLI instructions | High |
|
|
345
|
+
| `GEMINI.md` | Gemini CLI memory file | High |
|
|
346
|
+
| `.cursorrules` | Cursor IDE rules | High |
|
|
347
|
+
| `.windsurfrules` | Windsurf IDE rules | High |
|
|
348
|
+
| `.claude/rules/*.md` | Claude Code modular rules | Medium |
|
|
349
|
+
| `.windsurf/rules/*.md` | Windsurf modular rules | Medium |
|
|
350
|
+
| `.cursor/rules/*.mdc` | Cursor modular rules | Medium |
|
|
351
|
+
| `.praison/rules/*.md` | Workspace rules | Medium |
|
|
352
|
+
| `~/.praison/rules/*.md` | Global rules | Low |
|
|
353
|
+
|
|
354
|
+
```python
|
|
355
|
+
from praisonaiagents import Agent
|
|
356
|
+
|
|
357
|
+
# Agent auto-discovers CLAUDE.md, AGENTS.md, GEMINI.md, etc.
|
|
358
|
+
agent = Agent(name="Assistant", instructions="You are helpful.")
|
|
359
|
+
# Rules are injected into system prompt automatically
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**@Import Syntax (like Claude Code):**
|
|
363
|
+
```markdown
|
|
364
|
+
# CLAUDE.md
|
|
365
|
+
See @README for project overview
|
|
366
|
+
See @docs/architecture.md for system design
|
|
367
|
+
@~/.praison/my-preferences.md
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Rule File Format (with YAML frontmatter):**
|
|
371
|
+
```markdown
|
|
372
|
+
---
|
|
373
|
+
description: Python coding guidelines
|
|
374
|
+
globs: ["**/*.py"]
|
|
375
|
+
activation: always # always, glob, manual, ai_decision
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
# Guidelines
|
|
379
|
+
- Use type hints
|
|
380
|
+
- Follow PEP 8
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### 7. Auto-Generated Memories (like Windsurf Cascade)
|
|
384
|
+
|
|
385
|
+
```python
|
|
386
|
+
from praisonaiagents.memory import FileMemory, AutoMemory
|
|
387
|
+
|
|
388
|
+
memory = FileMemory(user_id="user123")
|
|
389
|
+
auto = AutoMemory(memory, enabled=True)
|
|
390
|
+
|
|
391
|
+
# Automatically extracts and stores memories from conversations
|
|
392
|
+
memories = auto.process_interaction(
|
|
393
|
+
"My name is John and I prefer Python for backend work"
|
|
394
|
+
)
|
|
395
|
+
# Extracts: name="John", preference="Python for backend"
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### 8. Workflows (like Windsurf)
|
|
399
|
+
|
|
400
|
+
Create reusable multi-step workflows in `.praison/workflows/`:
|
|
401
|
+
|
|
402
|
+
```python
|
|
403
|
+
from praisonaiagents.memory import WorkflowManager
|
|
404
|
+
|
|
405
|
+
manager = WorkflowManager()
|
|
406
|
+
|
|
407
|
+
# Execute a workflow
|
|
408
|
+
result = manager.execute(
|
|
409
|
+
"deploy",
|
|
410
|
+
executor=lambda prompt: agent.chat(prompt),
|
|
411
|
+
variables={"environment": "production"}
|
|
412
|
+
)
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### 9. Hooks (like Windsurf Cascade Hooks)
|
|
416
|
+
|
|
417
|
+
Configure in `.praison/hooks.json`:
|
|
418
|
+
|
|
419
|
+
```python
|
|
420
|
+
from praisonaiagents.memory import HooksManager
|
|
421
|
+
|
|
422
|
+
hooks = HooksManager()
|
|
423
|
+
|
|
424
|
+
# Register Python hooks
|
|
425
|
+
hooks.register("pre_write_code", lambda ctx: print(f"Writing {ctx['file']}"))
|
|
426
|
+
|
|
427
|
+
# Execute hooks
|
|
428
|
+
result = hooks.execute("pre_write_code", {"file": "main.py"})
|
|
429
|
+
```
|
|
430
|
+
|
|
318
431
|
## Using No Code
|
|
319
432
|
|
|
320
433
|
### Auto Mode:
|
|
@@ -60,6 +60,7 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
|
|
|
60
60
|
- 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
|
|
61
61
|
- 🧠 **Claude Memory Tool** (Persistent cross-conversation memory - Anthropic Beta)
|
|
62
62
|
- 💾 **File-Based Memory** (Zero-dependency persistent memory for all agents)
|
|
63
|
+
- 📋 **Planning Mode** (Plan before execution like Cursor, Windsurf, Claude Code)
|
|
63
64
|
|
|
64
65
|
## Using Python Code
|
|
65
66
|
|
|
@@ -178,10 +179,11 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
178
179
|
|
|
179
180
|
### 5. Agent Memory (Zero Dependencies)
|
|
180
181
|
|
|
181
|
-
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
182
|
+
Enable persistent memory for agents - works out of the box without any extra packages. Features inspired by Claude, Gemini CLI, Codex CLI, Cursor, and Windsurf.
|
|
182
183
|
|
|
183
184
|
```python
|
|
184
185
|
from praisonaiagents import Agent
|
|
186
|
+
from praisonaiagents.memory import FileMemory
|
|
185
187
|
|
|
186
188
|
# Enable memory with a single parameter
|
|
187
189
|
agent = Agent(
|
|
@@ -191,17 +193,9 @@ agent = Agent(
|
|
|
191
193
|
user_id="user123" # Isolate memory per user
|
|
192
194
|
)
|
|
193
195
|
|
|
194
|
-
# Store memories programmatically
|
|
195
|
-
agent.store_memory("User prefers dark mode", memory_type="short_term")
|
|
196
|
-
agent.store_memory("User's name is John", memory_type="long_term", importance=0.9)
|
|
197
|
-
|
|
198
196
|
# Memory is automatically injected into conversations
|
|
199
|
-
result = agent.start("
|
|
200
|
-
# Agent will
|
|
201
|
-
|
|
202
|
-
# Memory persists across sessions - create new agent with same user_id
|
|
203
|
-
agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
204
|
-
# agent2 automatically loads all previous memories!
|
|
197
|
+
result = agent.start("My name is John and I prefer Python")
|
|
198
|
+
# Agent will remember this for future conversations
|
|
205
199
|
```
|
|
206
200
|
|
|
207
201
|
**Memory Types:**
|
|
@@ -210,6 +204,28 @@ agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
|
210
204
|
- **Entity**: People, places, organizations with attributes
|
|
211
205
|
- **Episodic**: Date-based interaction history
|
|
212
206
|
|
|
207
|
+
**Advanced Features (like Gemini CLI):**
|
|
208
|
+
```python
|
|
209
|
+
from praisonaiagents.memory import FileMemory
|
|
210
|
+
|
|
211
|
+
memory = FileMemory(user_id="user123")
|
|
212
|
+
|
|
213
|
+
# Session Save/Resume
|
|
214
|
+
memory.save_session("project_session", conversation_history=[...])
|
|
215
|
+
memory.resume_session("project_session")
|
|
216
|
+
|
|
217
|
+
# Context Compression
|
|
218
|
+
memory.compress(llm_func=lambda p: agent.chat(p), max_items=10)
|
|
219
|
+
|
|
220
|
+
# Checkpointing
|
|
221
|
+
memory.create_checkpoint("before_refactor", include_files=["main.py"])
|
|
222
|
+
memory.restore_checkpoint("before_refactor", restore_files=True)
|
|
223
|
+
|
|
224
|
+
# Slash Commands
|
|
225
|
+
memory.handle_command("/memory show")
|
|
226
|
+
memory.handle_command("/memory save my_session")
|
|
227
|
+
```
|
|
228
|
+
|
|
213
229
|
**Storage Options:**
|
|
214
230
|
| Option | Dependencies | Description |
|
|
215
231
|
|--------|-------------|-------------|
|
|
@@ -218,6 +234,103 @@ agent2 = Agent(name="Assistant", memory=True, user_id="user123")
|
|
|
218
234
|
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
219
235
|
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
220
236
|
|
|
237
|
+
### 6. Rules & Instructions (like Cursor/Windsurf)
|
|
238
|
+
|
|
239
|
+
PraisonAI auto-discovers instruction files from your project root and git root:
|
|
240
|
+
|
|
241
|
+
| File | Description | Priority |
|
|
242
|
+
|------|-------------|----------|
|
|
243
|
+
| `PRAISON.md` | PraisonAI native instructions | High |
|
|
244
|
+
| `PRAISON.local.md` | Local overrides (gitignored) | Higher |
|
|
245
|
+
| `CLAUDE.md` | Claude Code memory file | High |
|
|
246
|
+
| `CLAUDE.local.md` | Local overrides (gitignored) | Higher |
|
|
247
|
+
| `AGENTS.md` | OpenAI Codex CLI instructions | High |
|
|
248
|
+
| `GEMINI.md` | Gemini CLI memory file | High |
|
|
249
|
+
| `.cursorrules` | Cursor IDE rules | High |
|
|
250
|
+
| `.windsurfrules` | Windsurf IDE rules | High |
|
|
251
|
+
| `.claude/rules/*.md` | Claude Code modular rules | Medium |
|
|
252
|
+
| `.windsurf/rules/*.md` | Windsurf modular rules | Medium |
|
|
253
|
+
| `.cursor/rules/*.mdc` | Cursor modular rules | Medium |
|
|
254
|
+
| `.praison/rules/*.md` | Workspace rules | Medium |
|
|
255
|
+
| `~/.praison/rules/*.md` | Global rules | Low |
|
|
256
|
+
|
|
257
|
+
```python
|
|
258
|
+
from praisonaiagents import Agent
|
|
259
|
+
|
|
260
|
+
# Agent auto-discovers CLAUDE.md, AGENTS.md, GEMINI.md, etc.
|
|
261
|
+
agent = Agent(name="Assistant", instructions="You are helpful.")
|
|
262
|
+
# Rules are injected into system prompt automatically
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**@Import Syntax (like Claude Code):**
|
|
266
|
+
```markdown
|
|
267
|
+
# CLAUDE.md
|
|
268
|
+
See @README for project overview
|
|
269
|
+
See @docs/architecture.md for system design
|
|
270
|
+
@~/.praison/my-preferences.md
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**Rule File Format (with YAML frontmatter):**
|
|
274
|
+
```markdown
|
|
275
|
+
---
|
|
276
|
+
description: Python coding guidelines
|
|
277
|
+
globs: ["**/*.py"]
|
|
278
|
+
activation: always # always, glob, manual, ai_decision
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
# Guidelines
|
|
282
|
+
- Use type hints
|
|
283
|
+
- Follow PEP 8
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### 7. Auto-Generated Memories (like Windsurf Cascade)
|
|
287
|
+
|
|
288
|
+
```python
|
|
289
|
+
from praisonaiagents.memory import FileMemory, AutoMemory
|
|
290
|
+
|
|
291
|
+
memory = FileMemory(user_id="user123")
|
|
292
|
+
auto = AutoMemory(memory, enabled=True)
|
|
293
|
+
|
|
294
|
+
# Automatically extracts and stores memories from conversations
|
|
295
|
+
memories = auto.process_interaction(
|
|
296
|
+
"My name is John and I prefer Python for backend work"
|
|
297
|
+
)
|
|
298
|
+
# Extracts: name="John", preference="Python for backend"
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### 8. Workflows (like Windsurf)
|
|
302
|
+
|
|
303
|
+
Create reusable multi-step workflows in `.praison/workflows/`:
|
|
304
|
+
|
|
305
|
+
```python
|
|
306
|
+
from praisonaiagents.memory import WorkflowManager
|
|
307
|
+
|
|
308
|
+
manager = WorkflowManager()
|
|
309
|
+
|
|
310
|
+
# Execute a workflow
|
|
311
|
+
result = manager.execute(
|
|
312
|
+
"deploy",
|
|
313
|
+
executor=lambda prompt: agent.chat(prompt),
|
|
314
|
+
variables={"environment": "production"}
|
|
315
|
+
)
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### 9. Hooks (like Windsurf Cascade Hooks)
|
|
319
|
+
|
|
320
|
+
Configure in `.praison/hooks.json`:
|
|
321
|
+
|
|
322
|
+
```python
|
|
323
|
+
from praisonaiagents.memory import HooksManager
|
|
324
|
+
|
|
325
|
+
hooks = HooksManager()
|
|
326
|
+
|
|
327
|
+
# Register Python hooks
|
|
328
|
+
hooks.register("pre_write_code", lambda ctx: print(f"Writing {ctx['file']}"))
|
|
329
|
+
|
|
330
|
+
# Execute hooks
|
|
331
|
+
result = hooks.execute("pre_write_code", {"file": "main.py"})
|
|
332
|
+
```
|
|
333
|
+
|
|
221
334
|
## Using No Code
|
|
222
335
|
|
|
223
336
|
### Auto Mode:
|
|
@@ -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.
|
|
60
|
+
file.write("RUN pip install flask praisonai==2.3.5 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.5"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.3.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|