praisonAI 2.3.1__tar.gz → 2.3.3__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.1 → praisonai-2.3.3}/PKG-INFO +96 -2
- {praisonai-2.3.1 → praisonai-2.3.3}/PraisonAI.egg-info/PKG-INFO +96 -2
- {praisonai-2.3.1 → praisonai-2.3.3}/PraisonAI.egg-info/requires.txt +1 -1
- {praisonai-2.3.1 → praisonai-2.3.3}/README.md +94 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/cli.py +46 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/deploy.py +1 -1
- praisonai-2.3.3/praisonai/version.py +1 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/pyproject.toml +1 -1
- praisonai-2.3.1/praisonai/version.py +0 -1
- {praisonai-2.3.1 → praisonai-2.3.3}/PraisonAI.egg-info/SOURCES.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/PraisonAI.egg-info/dependency_links.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/PraisonAI.egg-info/entry_points.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/PraisonAI.egg-info/top_level.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/__main__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/agents_generator.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/api/call.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/auto.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/chainlit_ui.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/inc/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/inc/config.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/inc/models.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/scheduler.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/setup/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/setup/build.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/setup/post_install.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/setup/setup_conda_env.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/setup.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/test.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/train.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/train_vision.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/agents.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/callbacks.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/chat.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/code.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/colab.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/colab_chainlit.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/components/aicoder.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/context.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/database_config.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/db.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/realtime.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/realtimeclient/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/realtimeclient/tools.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/praisonai/upload_vision.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/setup.cfg +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/tests/test.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/tests/test_agents_playbook.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/tests/test_basic.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/tests/test_custom_tools_fix.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/tests/test_double_api_fix.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/tests/test_phase2_refactor.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.3}/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.3
|
|
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.178
|
|
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,8 @@ 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)
|
|
158
160
|
|
|
159
161
|
## Using Python Code
|
|
160
162
|
|
|
@@ -271,6 +273,48 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
271
273
|
- **CONTEXTUAL**: Resolve references using conversation history
|
|
272
274
|
- **AUTO**: Automatically detect best strategy
|
|
273
275
|
|
|
276
|
+
### 5. Agent Memory (Zero Dependencies)
|
|
277
|
+
|
|
278
|
+
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
279
|
+
|
|
280
|
+
```python
|
|
281
|
+
from praisonaiagents import Agent
|
|
282
|
+
|
|
283
|
+
# Enable memory with a single parameter
|
|
284
|
+
agent = Agent(
|
|
285
|
+
name="Personal Assistant",
|
|
286
|
+
instructions="You are a helpful assistant that remembers user preferences.",
|
|
287
|
+
memory=True, # Enables file-based memory (no extra deps!)
|
|
288
|
+
user_id="user123" # Isolate memory per user
|
|
289
|
+
)
|
|
290
|
+
|
|
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
|
+
# 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!
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Memory Types:**
|
|
305
|
+
- **Short-term**: Rolling buffer of recent context (auto-expires)
|
|
306
|
+
- **Long-term**: Persistent important facts (sorted by importance)
|
|
307
|
+
- **Entity**: People, places, organizations with attributes
|
|
308
|
+
- **Episodic**: Date-based interaction history
|
|
309
|
+
|
|
310
|
+
**Storage Options:**
|
|
311
|
+
| Option | Dependencies | Description |
|
|
312
|
+
|--------|-------------|-------------|
|
|
313
|
+
| `memory=True` | None | File-based JSON storage (default) |
|
|
314
|
+
| `memory="file"` | None | Explicit file-based storage |
|
|
315
|
+
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
316
|
+
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
317
|
+
|
|
274
318
|
## Using No Code
|
|
275
319
|
|
|
276
320
|
### Auto Mode:
|
|
@@ -859,6 +903,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
|
|
|
859
903
|
- `--expand-prompt`: Expands prompts for **detailed task execution**
|
|
860
904
|
|
|
861
905
|
|
|
906
|
+
## Web Search, Web Fetch & Prompt Caching
|
|
907
|
+
|
|
908
|
+
### CLI Usage
|
|
909
|
+
|
|
910
|
+
```bash
|
|
911
|
+
# Web Search - Get real-time information
|
|
912
|
+
praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
|
|
913
|
+
|
|
914
|
+
# Web Fetch - Retrieve and analyze URL content (Anthropic only)
|
|
915
|
+
praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
|
|
916
|
+
|
|
917
|
+
# Prompt Caching - Reduce costs for repeated prompts
|
|
918
|
+
praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
### Programmatic Usage
|
|
922
|
+
|
|
923
|
+
```python
|
|
924
|
+
from praisonaiagents import Agent
|
|
925
|
+
|
|
926
|
+
# Web Search
|
|
927
|
+
agent = Agent(
|
|
928
|
+
instructions="You are a research assistant",
|
|
929
|
+
llm="openai/gpt-4o-search-preview",
|
|
930
|
+
web_search=True
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
# Web Fetch (Anthropic only)
|
|
934
|
+
agent = Agent(
|
|
935
|
+
instructions="You are a content analyzer",
|
|
936
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
937
|
+
web_fetch=True
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
# Prompt Caching
|
|
941
|
+
agent = Agent(
|
|
942
|
+
instructions="You are an AI assistant..." * 50, # Long system prompt
|
|
943
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
944
|
+
prompt_caching=True
|
|
945
|
+
)
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
**Supported Providers:**
|
|
949
|
+
| Feature | Providers |
|
|
950
|
+
|---------|-----------|
|
|
951
|
+
| Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
|
|
952
|
+
| Web Fetch | Anthropic |
|
|
953
|
+
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
954
|
+
|
|
955
|
+
|
|
862
956
|
## Development:
|
|
863
957
|
|
|
864
958
|
Below is used for development only.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
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.178
|
|
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,8 @@ 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)
|
|
158
160
|
|
|
159
161
|
## Using Python Code
|
|
160
162
|
|
|
@@ -271,6 +273,48 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
271
273
|
- **CONTEXTUAL**: Resolve references using conversation history
|
|
272
274
|
- **AUTO**: Automatically detect best strategy
|
|
273
275
|
|
|
276
|
+
### 5. Agent Memory (Zero Dependencies)
|
|
277
|
+
|
|
278
|
+
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
279
|
+
|
|
280
|
+
```python
|
|
281
|
+
from praisonaiagents import Agent
|
|
282
|
+
|
|
283
|
+
# Enable memory with a single parameter
|
|
284
|
+
agent = Agent(
|
|
285
|
+
name="Personal Assistant",
|
|
286
|
+
instructions="You are a helpful assistant that remembers user preferences.",
|
|
287
|
+
memory=True, # Enables file-based memory (no extra deps!)
|
|
288
|
+
user_id="user123" # Isolate memory per user
|
|
289
|
+
)
|
|
290
|
+
|
|
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
|
+
# 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!
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Memory Types:**
|
|
305
|
+
- **Short-term**: Rolling buffer of recent context (auto-expires)
|
|
306
|
+
- **Long-term**: Persistent important facts (sorted by importance)
|
|
307
|
+
- **Entity**: People, places, organizations with attributes
|
|
308
|
+
- **Episodic**: Date-based interaction history
|
|
309
|
+
|
|
310
|
+
**Storage Options:**
|
|
311
|
+
| Option | Dependencies | Description |
|
|
312
|
+
|--------|-------------|-------------|
|
|
313
|
+
| `memory=True` | None | File-based JSON storage (default) |
|
|
314
|
+
| `memory="file"` | None | Explicit file-based storage |
|
|
315
|
+
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
316
|
+
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
317
|
+
|
|
274
318
|
## Using No Code
|
|
275
319
|
|
|
276
320
|
### Auto Mode:
|
|
@@ -859,6 +903,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
|
|
|
859
903
|
- `--expand-prompt`: Expands prompts for **detailed task execution**
|
|
860
904
|
|
|
861
905
|
|
|
906
|
+
## Web Search, Web Fetch & Prompt Caching
|
|
907
|
+
|
|
908
|
+
### CLI Usage
|
|
909
|
+
|
|
910
|
+
```bash
|
|
911
|
+
# Web Search - Get real-time information
|
|
912
|
+
praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
|
|
913
|
+
|
|
914
|
+
# Web Fetch - Retrieve and analyze URL content (Anthropic only)
|
|
915
|
+
praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
|
|
916
|
+
|
|
917
|
+
# Prompt Caching - Reduce costs for repeated prompts
|
|
918
|
+
praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
### Programmatic Usage
|
|
922
|
+
|
|
923
|
+
```python
|
|
924
|
+
from praisonaiagents import Agent
|
|
925
|
+
|
|
926
|
+
# Web Search
|
|
927
|
+
agent = Agent(
|
|
928
|
+
instructions="You are a research assistant",
|
|
929
|
+
llm="openai/gpt-4o-search-preview",
|
|
930
|
+
web_search=True
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
# Web Fetch (Anthropic only)
|
|
934
|
+
agent = Agent(
|
|
935
|
+
instructions="You are a content analyzer",
|
|
936
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
937
|
+
web_fetch=True
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
# Prompt Caching
|
|
941
|
+
agent = Agent(
|
|
942
|
+
instructions="You are an AI assistant..." * 50, # Long system prompt
|
|
943
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
944
|
+
prompt_caching=True
|
|
945
|
+
)
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
**Supported Providers:**
|
|
949
|
+
| Feature | Providers |
|
|
950
|
+
|---------|-----------|
|
|
951
|
+
| Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
|
|
952
|
+
| Web Fetch | Anthropic |
|
|
953
|
+
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
954
|
+
|
|
955
|
+
|
|
862
956
|
## Development:
|
|
863
957
|
|
|
864
958
|
Below is used for development only.
|
|
@@ -58,6 +58,8 @@ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection,
|
|
|
58
58
|
- 🌐 **Native Web Search** (OpenAI, Gemini, Anthropic, xAI, Perplexity)
|
|
59
59
|
- 📥 **Web Fetch** (Retrieve full content from URLs - Anthropic)
|
|
60
60
|
- 💾 **Prompt Caching** (Reduce costs & latency - OpenAI, Anthropic, Bedrock, Deepseek)
|
|
61
|
+
- 🧠 **Claude Memory Tool** (Persistent cross-conversation memory - Anthropic Beta)
|
|
62
|
+
- 💾 **File-Based Memory** (Zero-dependency persistent memory for all agents)
|
|
61
63
|
|
|
62
64
|
## Using Python Code
|
|
63
65
|
|
|
@@ -174,6 +176,48 @@ result = agent.rewrite("What about cost?", chat_history=[...])
|
|
|
174
176
|
- **CONTEXTUAL**: Resolve references using conversation history
|
|
175
177
|
- **AUTO**: Automatically detect best strategy
|
|
176
178
|
|
|
179
|
+
### 5. Agent Memory (Zero Dependencies)
|
|
180
|
+
|
|
181
|
+
Enable persistent memory for agents - works out of the box without any extra packages.
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from praisonaiagents import Agent
|
|
185
|
+
|
|
186
|
+
# Enable memory with a single parameter
|
|
187
|
+
agent = Agent(
|
|
188
|
+
name="Personal Assistant",
|
|
189
|
+
instructions="You are a helpful assistant that remembers user preferences.",
|
|
190
|
+
memory=True, # Enables file-based memory (no extra deps!)
|
|
191
|
+
user_id="user123" # Isolate memory per user
|
|
192
|
+
)
|
|
193
|
+
|
|
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
|
+
# 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!
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Memory Types:**
|
|
208
|
+
- **Short-term**: Rolling buffer of recent context (auto-expires)
|
|
209
|
+
- **Long-term**: Persistent important facts (sorted by importance)
|
|
210
|
+
- **Entity**: People, places, organizations with attributes
|
|
211
|
+
- **Episodic**: Date-based interaction history
|
|
212
|
+
|
|
213
|
+
**Storage Options:**
|
|
214
|
+
| Option | Dependencies | Description |
|
|
215
|
+
|--------|-------------|-------------|
|
|
216
|
+
| `memory=True` | None | File-based JSON storage (default) |
|
|
217
|
+
| `memory="file"` | None | Explicit file-based storage |
|
|
218
|
+
| `memory="sqlite"` | Built-in | SQLite with indexing |
|
|
219
|
+
| `memory="chromadb"` | chromadb | Vector/semantic search |
|
|
220
|
+
|
|
177
221
|
## Using No Code
|
|
178
222
|
|
|
179
223
|
### Auto Mode:
|
|
@@ -762,6 +806,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
|
|
|
762
806
|
- `--expand-prompt`: Expands prompts for **detailed task execution**
|
|
763
807
|
|
|
764
808
|
|
|
809
|
+
## Web Search, Web Fetch & Prompt Caching
|
|
810
|
+
|
|
811
|
+
### CLI Usage
|
|
812
|
+
|
|
813
|
+
```bash
|
|
814
|
+
# Web Search - Get real-time information
|
|
815
|
+
praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
|
|
816
|
+
|
|
817
|
+
# Web Fetch - Retrieve and analyze URL content (Anthropic only)
|
|
818
|
+
praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
|
|
819
|
+
|
|
820
|
+
# Prompt Caching - Reduce costs for repeated prompts
|
|
821
|
+
praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
### Programmatic Usage
|
|
825
|
+
|
|
826
|
+
```python
|
|
827
|
+
from praisonaiagents import Agent
|
|
828
|
+
|
|
829
|
+
# Web Search
|
|
830
|
+
agent = Agent(
|
|
831
|
+
instructions="You are a research assistant",
|
|
832
|
+
llm="openai/gpt-4o-search-preview",
|
|
833
|
+
web_search=True
|
|
834
|
+
)
|
|
835
|
+
|
|
836
|
+
# Web Fetch (Anthropic only)
|
|
837
|
+
agent = Agent(
|
|
838
|
+
instructions="You are a content analyzer",
|
|
839
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
840
|
+
web_fetch=True
|
|
841
|
+
)
|
|
842
|
+
|
|
843
|
+
# Prompt Caching
|
|
844
|
+
agent = Agent(
|
|
845
|
+
instructions="You are an AI assistant..." * 50, # Long system prompt
|
|
846
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
847
|
+
prompt_caching=True
|
|
848
|
+
)
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
**Supported Providers:**
|
|
852
|
+
| Feature | Providers |
|
|
853
|
+
|---------|-----------|
|
|
854
|
+
| Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
|
|
855
|
+
| Web Fetch | Anthropic |
|
|
856
|
+
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
857
|
+
|
|
858
|
+
|
|
765
859
|
## Development:
|
|
766
860
|
|
|
767
861
|
Below is used for development only.
|
|
@@ -584,6 +584,9 @@ class PraisonAI:
|
|
|
584
584
|
parser.add_argument("--tools", "-t", type=str, help="Path to tools.py file for research agent")
|
|
585
585
|
parser.add_argument("--save", "-s", action="store_true", help="Save research output to file (output/research/)")
|
|
586
586
|
parser.add_argument("--verbose", "-v", action="store_true", help="Enable verbose output for research")
|
|
587
|
+
parser.add_argument("--web-search", action="store_true", help="Enable native web search (OpenAI, Gemini, Anthropic, xAI, Perplexity)")
|
|
588
|
+
parser.add_argument("--web-fetch", action="store_true", help="Enable web fetch to retrieve URL content (Anthropic only)")
|
|
589
|
+
parser.add_argument("--prompt-caching", action="store_true", help="Enable prompt caching to reduce costs (OpenAI, Anthropic, Bedrock, Deepseek)")
|
|
587
590
|
|
|
588
591
|
# If we're in a test environment, parse with empty args to avoid pytest interference
|
|
589
592
|
if in_test_env:
|
|
@@ -933,6 +936,35 @@ class PraisonAI:
|
|
|
933
936
|
verbose = getattr(self.args, 'verbose', False)
|
|
934
937
|
return self._expand_prompt(prompt, expand_tools, verbose)
|
|
935
938
|
|
|
939
|
+
def _save_output(self, prompt: str, result: str):
|
|
940
|
+
"""
|
|
941
|
+
Save output to output/prompts/ folder.
|
|
942
|
+
|
|
943
|
+
Args:
|
|
944
|
+
prompt: The original prompt
|
|
945
|
+
result: The output result to save
|
|
946
|
+
"""
|
|
947
|
+
from datetime import datetime
|
|
948
|
+
from rich import print
|
|
949
|
+
|
|
950
|
+
# Create output directory
|
|
951
|
+
output_dir = os.path.join(os.getcwd(), "output", "prompts")
|
|
952
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
953
|
+
|
|
954
|
+
# Generate filename with timestamp
|
|
955
|
+
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
|
956
|
+
# Create a safe filename from prompt (first 30 chars)
|
|
957
|
+
safe_prompt = "".join(c if c.isalnum() or c in " -_" else "" for c in prompt[:30]).strip().replace(" ", "_")
|
|
958
|
+
filename = f"{timestamp}_{safe_prompt}.md"
|
|
959
|
+
filepath = os.path.join(output_dir, filename)
|
|
960
|
+
|
|
961
|
+
# Write output
|
|
962
|
+
with open(filepath, "w", encoding="utf-8") as f:
|
|
963
|
+
f.write(f"# Prompt\n\n{prompt}\n\n")
|
|
964
|
+
f.write(f"# Output\n\n{result}\n")
|
|
965
|
+
|
|
966
|
+
print(f"[green]✅ Output saved to: {filepath}[/green]")
|
|
967
|
+
|
|
936
968
|
def handle_direct_prompt(self, prompt):
|
|
937
969
|
"""
|
|
938
970
|
Handle direct prompt by creating a single agent and running it.
|
|
@@ -954,8 +986,22 @@ class PraisonAI:
|
|
|
954
986
|
if hasattr(self, 'args') and self.args.llm:
|
|
955
987
|
agent_config["llm"] = self.args.llm
|
|
956
988
|
|
|
989
|
+
# Add feature flags if enabled
|
|
990
|
+
if hasattr(self, 'args'):
|
|
991
|
+
if getattr(self.args, 'web_search', False):
|
|
992
|
+
agent_config["web_search"] = True
|
|
993
|
+
if getattr(self.args, 'web_fetch', False):
|
|
994
|
+
agent_config["web_fetch"] = True
|
|
995
|
+
if getattr(self.args, 'prompt_caching', False):
|
|
996
|
+
agent_config["prompt_caching"] = True
|
|
997
|
+
|
|
957
998
|
agent = PraisonAgent(**agent_config)
|
|
958
999
|
result = agent.start(prompt)
|
|
1000
|
+
|
|
1001
|
+
# Save output if --save is enabled
|
|
1002
|
+
if hasattr(self, 'args') and getattr(self.args, 'save', False):
|
|
1003
|
+
self._save_output(prompt, result)
|
|
1004
|
+
|
|
959
1005
|
return result
|
|
960
1006
|
elif CREWAI_AVAILABLE:
|
|
961
1007
|
from crewai import Agent, Task, Crew
|
|
@@ -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.3 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.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.3.1"
|
|
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
|