You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mem0/configs/prompts.py
+8-6
Original file line number
Diff line number
Diff line change
@@ -220,14 +220,14 @@
220
220
Each numbered step must be a self-contained entry that includes all of the following elements:
221
221
222
222
1. **Agent Action**:
223
-
- Precisely describe what the agent did (e.g., "Clicked on the 'Blog' link", "Called API to fetch content", "Scraped page data").
223
+
- Precisely describe what the agent did (e.g., "Clicked on the 'Blog' link", "Called API to fetch content", "Scraped page data").
224
224
- Include all parameters, target elements, or methods involved.
225
-
226
-
2. **Action Result (Mandatory, Unmodified)**:
227
-
- Immediately follow the agent action with its exact, unaltered output.
225
+
226
+
2. **Action Result (Mandatory, Unmodified)**:
227
+
- Immediately follow the agent action with its exact, unaltered output.
228
228
- Record all returned data, responses, HTML snippets, JSON content, or error messages exactly as received. This is critical for constructing the final output later.
229
-
230
-
3. **Embedded Metadata**:
229
+
230
+
3. **Embedded Metadata**:
231
231
For the same numbered step, include additional context such as:
232
232
- **Key Findings**: Any important information discovered (e.g., URLs, data points, search results).
233
233
- **Navigation History**: For browser agents, detail which pages were visited, including their URLs and relevance.
@@ -246,6 +246,8 @@
246
246
### Example Template:
247
247
248
248
```
249
+
## Summary of the agent's execution history
250
+
249
251
**Task Objective**: Scrape blog post titles and full content from the OpenAI blog.
250
252
**Progress Status**: 10% complete — 5 out of 50 blog posts processed.
Copy file name to clipboardExpand all lines: mem0/memory/main.py
+11-3
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,7 @@ def add(
89
89
infer=True,
90
90
memory_type=None,
91
91
prompt=None,
92
+
llm=None,
92
93
):
93
94
"""
94
95
Create a new memory.
@@ -103,6 +104,7 @@ def add(
103
104
infer (bool, optional): Whether to infer the memories. Defaults to True.
104
105
memory_type (str, optional): Type of memory to create. Defaults to None. By default, it creates the short term memories and long term (semantic and episodic) memories. Pass "procedural_memory" to create procedural memories.
105
106
prompt (str, optional): Prompt to use for the memory creation. Defaults to None.
107
+
llm (BaseChatModel, optional): LLM class to use for generating procedural memories. Defaults to None. Useful when user is using LangChain ChatModel.
106
108
Returns:
107
109
dict: A dictionary containing the result of the memory addition operation.
108
110
result: dict of affected events with each dict has the following key:
0 commit comments