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