memorisdk 2.0.0__py3-none-any.whl → 2.1.0__py3-none-any.whl

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.

Potentially problematic release.


This version of memorisdk might be problematic. Click here for more details.

Files changed (63) hide show
  1. memori/__init__.py +3 -3
  2. memori/agents/conscious_agent.py +289 -77
  3. memori/agents/memory_agent.py +19 -9
  4. memori/agents/retrieval_agent.py +138 -63
  5. memori/config/manager.py +7 -7
  6. memori/config/memory_manager.py +25 -25
  7. memori/config/settings.py +13 -6
  8. memori/core/conversation.py +15 -15
  9. memori/core/database.py +14 -13
  10. memori/core/memory.py +438 -123
  11. memori/core/providers.py +25 -25
  12. memori/database/__init__.py +11 -0
  13. memori/database/adapters/__init__.py +11 -0
  14. memori/database/adapters/mongodb_adapter.py +739 -0
  15. memori/database/adapters/mysql_adapter.py +8 -8
  16. memori/database/adapters/postgresql_adapter.py +6 -6
  17. memori/database/adapters/sqlite_adapter.py +6 -6
  18. memori/database/auto_creator.py +8 -9
  19. memori/database/connection_utils.py +5 -5
  20. memori/database/connectors/__init__.py +11 -0
  21. memori/database/connectors/base_connector.py +18 -19
  22. memori/database/connectors/mongodb_connector.py +527 -0
  23. memori/database/connectors/mysql_connector.py +13 -15
  24. memori/database/connectors/postgres_connector.py +12 -12
  25. memori/database/connectors/sqlite_connector.py +11 -11
  26. memori/database/models.py +2 -2
  27. memori/database/mongodb_manager.py +1402 -0
  28. memori/database/queries/base_queries.py +3 -4
  29. memori/database/queries/chat_queries.py +3 -5
  30. memori/database/queries/entity_queries.py +3 -5
  31. memori/database/queries/memory_queries.py +3 -5
  32. memori/database/query_translator.py +11 -11
  33. memori/database/schema_generators/__init__.py +11 -0
  34. memori/database/schema_generators/mongodb_schema_generator.py +666 -0
  35. memori/database/schema_generators/mysql_schema_generator.py +2 -4
  36. memori/database/search/__init__.py +11 -0
  37. memori/database/search/mongodb_search_adapter.py +653 -0
  38. memori/database/search/mysql_search_adapter.py +8 -8
  39. memori/database/search/sqlite_search_adapter.py +6 -6
  40. memori/database/search_service.py +218 -66
  41. memori/database/sqlalchemy_manager.py +72 -25
  42. memori/integrations/__init__.py +1 -1
  43. memori/integrations/anthropic_integration.py +1 -3
  44. memori/integrations/litellm_integration.py +23 -6
  45. memori/integrations/openai_integration.py +31 -3
  46. memori/tools/memory_tool.py +104 -13
  47. memori/utils/exceptions.py +58 -58
  48. memori/utils/helpers.py +11 -12
  49. memori/utils/input_validator.py +10 -12
  50. memori/utils/logging.py +4 -4
  51. memori/utils/pydantic_models.py +57 -57
  52. memori/utils/query_builder.py +20 -20
  53. memori/utils/security_audit.py +28 -28
  54. memori/utils/security_integration.py +9 -9
  55. memori/utils/transaction_manager.py +20 -19
  56. memori/utils/validators.py +6 -6
  57. {memorisdk-2.0.0.dist-info → memorisdk-2.1.0.dist-info}/METADATA +36 -20
  58. memorisdk-2.1.0.dist-info/RECORD +71 -0
  59. memori/scripts/llm_text.py +0 -50
  60. memorisdk-2.0.0.dist-info/RECORD +0 -67
  61. {memorisdk-2.0.0.dist-info → memorisdk-2.1.0.dist-info}/WHEEL +0 -0
  62. {memorisdk-2.0.0.dist-info → memorisdk-2.1.0.dist-info}/licenses/LICENSE +0 -0
  63. {memorisdk-2.0.0.dist-info → memorisdk-2.1.0.dist-info}/top_level.txt +0 -0
@@ -4,10 +4,11 @@ Provides robust transaction handling with proper error recovery
4
4
  """
5
5
 
6
6
  import time
7
+ from collections.abc import Callable
7
8
  from contextlib import contextmanager
8
9
  from dataclasses import dataclass
9
10
  from enum import Enum
10
- from typing import Any, Callable, Dict, List, Optional
11
+ from typing import Any
11
12
 
12
13
  from loguru import logger
13
14
 
@@ -38,11 +39,11 @@ class TransactionOperation:
38
39
  """Represents a single database operation within a transaction"""
39
40
 
40
41
  query: str
41
- params: Optional[List[Any]]
42
+ params: list[Any] | None
42
43
  operation_type: str # 'select', 'insert', 'update', 'delete'
43
- table: Optional[str] = None
44
- expected_rows: Optional[int] = None # For validation
45
- rollback_query: Optional[str] = None # Compensation query if needed
44
+ table: str | None = None
45
+ expected_rows: int | None = None # For validation
46
+ rollback_query: str | None = None # Compensation query if needed
46
47
 
47
48
 
48
49
  @dataclass
@@ -53,8 +54,8 @@ class TransactionResult:
53
54
  state: TransactionState
54
55
  operations_completed: int
55
56
  total_operations: int
56
- error_message: Optional[str] = None
57
- execution_time: Optional[float] = None
57
+ error_message: str | None = None
58
+ execution_time: float | None = None
58
59
  rollback_performed: bool = False
59
60
 
60
61
 
@@ -70,8 +71,8 @@ class TransactionManager:
70
71
  @contextmanager
71
72
  def transaction(
72
73
  self,
73
- isolation_level: Optional[IsolationLevel] = None,
74
- timeout: Optional[float] = 30.0,
74
+ isolation_level: IsolationLevel | None = None,
75
+ timeout: float | None = 30.0,
75
76
  readonly: bool = False,
76
77
  ):
77
78
  """Context manager for database transactions with proper error handling"""
@@ -154,8 +155,8 @@ class TransactionManager:
154
155
 
155
156
  def execute_atomic_operations(
156
157
  self,
157
- operations: List[TransactionOperation],
158
- isolation_level: Optional[IsolationLevel] = None,
158
+ operations: list[TransactionOperation],
159
+ isolation_level: IsolationLevel | None = None,
159
160
  ) -> TransactionResult:
160
161
  """Execute multiple operations atomically with validation"""
161
162
 
@@ -212,8 +213,8 @@ class TransactionManager:
212
213
  def execute_with_retry(
213
214
  self,
214
215
  operation: Callable[[], Any],
215
- max_retries: Optional[int] = None,
216
- retry_delay: Optional[float] = None,
216
+ max_retries: int | None = None,
217
+ retry_delay: float | None = None,
217
218
  ) -> Any:
218
219
  """Execute operation with automatic retry on transient failures"""
219
220
 
@@ -371,8 +372,8 @@ class TransactionContext:
371
372
  self.operations_count = 0
372
373
 
373
374
  def execute(
374
- self, query: str, params: Optional[List[Any]] = None
375
- ) -> List[Dict[str, Any]]:
375
+ self, query: str, params: list[Any] | None = None
376
+ ) -> list[dict[str, Any]]:
376
377
  """Execute query within the transaction context"""
377
378
  try:
378
379
  cursor = self.connection.cursor()
@@ -397,7 +398,7 @@ class TransactionContext:
397
398
  if cursor.description
398
399
  else []
399
400
  )
400
- results.append(dict(zip(column_names, row)))
401
+ results.append(dict(zip(column_names, row, strict=False)))
401
402
  return results
402
403
  else:
403
404
  # For non-SELECT queries, return affected row count
@@ -411,7 +412,7 @@ class TransactionContext:
411
412
  finally:
412
413
  self.operations_count += 1
413
414
 
414
- def execute_many(self, query: str, params_list: List[List[Any]]) -> int:
415
+ def execute_many(self, query: str, params_list: list[list[Any]]) -> int:
415
416
  """Execute query with multiple parameter sets"""
416
417
  try:
417
418
  cursor = self.connection.cursor()
@@ -455,7 +456,7 @@ class SavepointManager:
455
456
  self.savepoint_counter = 0
456
457
 
457
458
  @contextmanager
458
- def savepoint(self, name: Optional[str] = None):
459
+ def savepoint(self, name: str | None = None):
459
460
  """Create a savepoint within the current transaction"""
460
461
  if not name:
461
462
  name = f"sp_{self.savepoint_counter}"
@@ -508,7 +509,7 @@ def atomic_operation(connector):
508
509
 
509
510
 
510
511
  def bulk_insert_transaction(
511
- connector, table: str, data: List[Dict[str, Any]], batch_size: int = 1000
512
+ connector, table: str, data: list[dict[str, Any]], batch_size: int = 1000
512
513
  ) -> TransactionResult:
513
514
  """Perform bulk insert with proper transaction management"""
514
515
  from .input_validator import DatabaseInputValidator
@@ -4,7 +4,7 @@ Data validation utilities for Memoriai
4
4
 
5
5
  import re
6
6
  from pathlib import Path
7
- from typing import Any, Dict, Union
7
+ from typing import Any
8
8
 
9
9
  from .exceptions import ValidationError
10
10
 
@@ -80,7 +80,7 @@ class DataValidator:
80
80
  cls, value: float, field_name: str = "importance score"
81
81
  ) -> float:
82
82
  """Validate importance score (0.0 to 1.0)"""
83
- if not isinstance(value, (int, float)):
83
+ if not isinstance(value, int | float):
84
84
  raise ValidationError(f"{field_name} must be a number")
85
85
 
86
86
  if not 0.0 <= value <= 1.0:
@@ -103,7 +103,7 @@ class DataValidator:
103
103
  @classmethod
104
104
  def validate_file_path(
105
105
  cls,
106
- value: Union[str, Path],
106
+ value: str | Path,
107
107
  field_name: str = "file path",
108
108
  must_exist: bool = False,
109
109
  ) -> Path:
@@ -123,7 +123,7 @@ class DataValidator:
123
123
  @classmethod
124
124
  def validate_json_dict(
125
125
  cls, value: Any, field_name: str = "JSON data"
126
- ) -> Dict[str, Any]:
126
+ ) -> dict[str, Any]:
127
127
  """Validate that value is a JSON-serializable dictionary"""
128
128
  if not isinstance(value, dict):
129
129
  raise ValidationError(f"{field_name} must be a dictionary")
@@ -256,7 +256,7 @@ class MemoryValidator:
256
256
  """Specialized validator for memory-related data"""
257
257
 
258
258
  @classmethod
259
- def validate_memory_data(cls, data: Dict[str, Any]) -> Dict[str, Any]:
259
+ def validate_memory_data(cls, data: dict[str, Any]) -> dict[str, Any]:
260
260
  """Validate complete memory data structure"""
261
261
  validated = {}
262
262
 
@@ -301,7 +301,7 @@ class MemoryValidator:
301
301
  return validated
302
302
 
303
303
  @classmethod
304
- def validate_chat_data(cls, data: Dict[str, Any]) -> Dict[str, Any]:
304
+ def validate_chat_data(cls, data: dict[str, Any]) -> dict[str, Any]:
305
305
  """Validate chat data structure"""
306
306
  validated = {}
307
307
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memorisdk
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: The Open-Source Memory Layer for AI Agents & Multi-Agent Systems
5
5
  Author-email: GibsonAI Team <noc@gibsonai.com>
6
6
  License: Apache-2.0
@@ -16,8 +16,6 @@ Classifier: Intended Audience :: Developers
16
16
  Classifier: License :: OSI Approved :: Apache Software License
17
17
  Classifier: Operating System :: OS Independent
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.8
20
- Classifier: Programming Language :: Python :: 3.9
21
19
  Classifier: Programming Language :: Python :: 3.10
22
20
  Classifier: Programming Language :: Python :: 3.11
23
21
  Classifier: Programming Language :: Python :: 3.12
@@ -25,7 +23,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
24
  Classifier: Topic :: Database :: Database Engines/Servers
27
25
  Classifier: Typing :: Typed
28
- Requires-Python: >=3.8
26
+ Requires-Python: >=3.10
29
27
  Description-Content-Type: text/markdown
30
28
  License-File: LICENSE
31
29
  Requires-Dist: loguru>=0.6.0
@@ -54,9 +52,12 @@ Provides-Extra: postgres
54
52
  Requires-Dist: psycopg2-binary>=2.9.0; extra == "postgres"
55
53
  Provides-Extra: mysql
56
54
  Requires-Dist: PyMySQL>=1.0.0; extra == "mysql"
55
+ Provides-Extra: mongodb
56
+ Requires-Dist: pymongo>=4.0.0; extra == "mongodb"
57
57
  Provides-Extra: databases
58
58
  Requires-Dist: psycopg2-binary>=2.9.0; extra == "databases"
59
59
  Requires-Dist: PyMySQL>=1.0.0; extra == "databases"
60
+ Requires-Dist: pymongo>=4.0.0; extra == "databases"
60
61
  Provides-Extra: anthropic
61
62
  Requires-Dist: anthropic>=0.3.0; extra == "anthropic"
62
63
  Provides-Extra: litellm
@@ -98,11 +99,11 @@ Dynamic: license-file
98
99
  # memori
99
100
 
100
101
  <p align="center">
101
- <strong>Open-Source Memory Engine for LLMs, AI Agents & Multi-Agent Systems</strong>
102
+ <strong>An open-source SQL-Native memory engine for AI</strong>
102
103
  </p>
103
104
 
104
105
  <p align="center">
105
- <i>Make LLMs context-aware with human-like memory, dual-mode retrieval, and automatic context injection.</i>
106
+ <i>From Postgres to MySQL, Memori plugs into the SQL databases you already use. Simple setup, infinite scale without new infrastructure.</i>
106
107
  </p>
107
108
 
108
109
  <p align="center">
@@ -128,13 +129,20 @@ Dynamic: license-file
128
129
 
129
130
  ---
130
131
 
131
- ## 🎯 Philosophy
132
+ ## What is Memori
132
133
 
133
- - **Second-memory for all your LLM work** - Never repeat context again
134
- - **Dual-mode memory injection** - Conscious short-term memory + Auto intelligent search
135
- - **Flexible database connections** - SQLite, PostgreSQL, MySQL support
136
- - **Pydantic-based intelligence** - Structured memory processing with validation
137
- - **Simple, reliable architecture** - Just works out of the box
134
+ Memori uses structured entity extraction, relationship mapping, and SQL-based retrieval to create transparent, portable, and queryable AI memory. Memomi uses multiple agents working together to intelligently promote essential long-term memories to short-term storage for faster context injection.
135
+
136
+ With a single line of code `memori.enable()` any LLM gains the ability to remember conversations, learn from interactions, and maintain context across sessions. The entire memory system is stored in a standard SQLite database (or PostgreSQL/MySQL for enterprise deployments), making it fully portable, auditable, and owned by the user.
137
+
138
+ ## Key Differentiators
139
+
140
+ - **Radical Simplicity**: One line to enable memory for any LLM framework (OpenAI, Anthropic, LiteLLM, LangChain)
141
+ - **True Data Ownership**: Memory stored in standard SQL databases that users fully control
142
+ - **Complete Transparency**: Every memory decision is queryable with SQL and fully explainable
143
+ - **Zero Vendor Lock-in**: Export your entire memory as a SQLite file and move anywhere
144
+ - **Cost Efficiency**: 80-90% cheaper than vector database solutions at scale
145
+ - **Compliance Ready**: SQL-based storage enables audit trails, data residency, and regulatory compliance
138
146
 
139
147
  ## ⚡ Quick Start
140
148
 
@@ -197,6 +205,8 @@ print("\n💡 Notice: Memori automatically knows about your FastAPI Python proje
197
205
 
198
206
  ---
199
207
 
208
+ > By default, Memori uses in-memory SQLite database. Get **FREE** serverless database instance in [GibsonAI](https://app.gibsonai.com/signup) platform.
209
+
200
210
  **🚀 Ready to explore more?**
201
211
  - [📖 Examples](#examples) - Basic usage patterns and code samples
202
212
  - [🔌 Framework Integrations](#framework-integrations) - LangChain, Agno & CrewAI examples
@@ -458,19 +468,25 @@ memori/
458
468
  - **[Memory Retrieval](./memory_retrival_example.py)** - Function calling with memory tools
459
469
  - **[Advanced Config](./examples/advanced_config.py)** - Production configuration
460
470
  - **[Interactive Demo](./memori_example.py)** - Live conscious ingestion showcase
471
+ - **[Simple Multi-User](./examples/multiple-users/simple_multiuser.py)** - Basic demonstration of user memory isolation with namespaces
472
+ - **[FastAPI Multi-User App](./examples/multiple-users/fastapi_multiuser_app.py)** - Full-featured REST API with Swagger UI for testing multi-user functionality
461
473
 
462
474
  ## Framework Integrations
463
475
 
464
476
  Memori works seamlessly with popular AI frameworks:
465
477
 
466
- | Framework | Description | Example | Features |
467
- |-----------|-------------|---------|----------|
468
- | 🤖 [Agno](./examples/integrations/agno_example.py) | Memory-enhanced agent framework integration with persistent conversations | Simple chat agent with memory search | Memory tools, conversation persistence, contextual responses |
469
- | 👥 [CrewAI](./examples/integrations/crewai_example.py) | Multi-agent system with shared memory across agent interactions | Collaborative agents with memory | Agent coordination, shared memory, task-based workflows |
470
- | 🌊 [Digital Ocean AI](./examples/integrations/digital_ocean_example.py) | Memory-enhanced customer support using Digital Ocean's AI platform | Customer support assistant with conversation history | Context injection, session continuity, support analytics |
471
- | 🔗 [LangChain](./examples/integrations/langchain_example.py) | Enterprise-grade agent framework with advanced memory integration | AI assistant with LangChain tools and memory | Custom tools, agent executors, memory persistence, error handling |
472
- | [OpenAI Agent](./examples/integrations/openai_agent_example.py) | Memory-enhanced OpenAI Agent with function calling and user preference tracking | Interactive assistant with memory search and user info storage | Function calling tools, memory search, preference tracking, async conversations |
473
- | �🚀 [Swarms](./examples/integrations/swarms_example.py) | Multi-agent system framework with persistent memory capabilities | Memory-enhanced Swarms agents with auto/conscious ingestion | Agent memory persistence, multi-agent coordination, contextual awareness |
478
+ | Framework | Description | Example |
479
+ |-----------|-------------|---------|
480
+ | [AgentOps](./examples/integrations/agentops_example.py) | Track and monitor Memori memory operations with comprehensive observability | Memory operation tracking with AgentOps analytics |
481
+ | [Agno](./examples/integrations/agno_example.py) | Memory-enhanced agent framework integration with persistent conversations | Simple chat agent with memory search |
482
+ | [AWS Strands](./examples/integrations/aws_strands_example.py) | Professional development coach with Strands SDK and persistent memory | Career coaching agent with goal tracking |
483
+ | [Azure AI Foundry](./examples/integrations/azure_ai_foundry_example.py) | Azure AI Foundry agents with persistent memory across conversations | Enterprise AI agents with Azure integration |
484
+ | [CamelAI](./examples/integrations/camelai_example.py) | Multi-agent communication framework with automatic memory recording and retrieval | Memory-enhanced chat agents with conversation continuity |
485
+ | [CrewAI](./examples/integrations/crewai_example.py) | Multi-agent system with shared memory across agent interactions | Collaborative agents with memory |
486
+ | [Digital Ocean AI](./examples/integrations/digital_ocean_example.py) | Memory-enhanced customer support using Digital Ocean's AI platform | Customer support assistant with conversation history |
487
+ | [LangChain](./examples/integrations/langchain_example.py) | Enterprise-grade agent framework with advanced memory integration | AI assistant with LangChain tools and memory |
488
+ | [OpenAI Agent](./examples/integrations/openai_agent_example.py) | Memory-enhanced OpenAI Agent with function calling and user preference tracking | Interactive assistant with memory search and user info storage |
489
+ | [Swarms](./examples/integrations/swarms_example.py) | Multi-agent system framework with persistent memory capabilities | Memory-enhanced Swarms agents with auto/conscious ingestion |
474
490
 
475
491
  ## Interactive Demos
476
492
 
@@ -0,0 +1,71 @@
1
+ memori/__init__.py,sha256=cwAJcWkWX1bbulI3oQK512OSd7mv_0wEAhzwE3OWUYo,3670
2
+ memori/agents/__init__.py,sha256=9M3IG5R10FfVgT8tUzBZ2pZ0SypSpYkFfhtyvMyeTpE,261
3
+ memori/agents/conscious_agent.py,sha256=x3MFps2BSIt9CubjwFUZ_2g4EXESO66aT2lyHx_LiDQ,22225
4
+ memori/agents/memory_agent.py,sha256=khCbbBaMfHm7uYxZvIw4JO4kXzM848R_Cual0uSVZ2A,23957
5
+ memori/agents/retrieval_agent.py,sha256=_8J50i68AvVxylcEYWDTMfgXnoKO0hx97X8Lo3byg0U,40867
6
+ memori/config/__init__.py,sha256=tQAxopgOsea02u9iId-ocOY86nWWNGC3rvt3AOFcLn8,295
7
+ memori/config/manager.py,sha256=PnIfp-j8BzvSsomzGZtMOdtARuhaoVwfxj1pJs5hLow,10360
8
+ memori/config/memory_manager.py,sha256=jEchdcMxNiM825Z2ypsE5vY-uS5mCbd_AKsnQ6o_YW8,10938
9
+ memori/config/settings.py,sha256=t-Pmz3x-IjMDcdIFJ9VNK37-OeNOhSfFciWtseUVdRc,9795
10
+ memori/core/__init__.py,sha256=jvhHn-KL3bzRHs11-4B0BCKH6gkAf6Gf_G59If8fD0M,157
11
+ memori/core/conversation.py,sha256=kQV59BWy_ZS0RwARXnQGs5KXB1fRh1ftH8rHuNs6a_E,15813
12
+ memori/core/database.py,sha256=aycWOP2TJD5GBZXnAFU2yPDeGKRUjUeep9DoK6hLGas,40075
13
+ memori/core/memory.py,sha256=257RDLlLUdKxN4rd2HUhBqjha5Ahx1zpS-TfF3wxhvw,117079
14
+ memori/core/providers.py,sha256=IH-ep_VYY_-itY31dyqT-ftDlHKE_IzsFED_30tAJaI,6944
15
+ memori/database/__init__.py,sha256=yungdfis0lyDE2eZFs86miYCAMG4klhS-TLhKq-1K3w,426
16
+ memori/database/auto_creator.py,sha256=oMUKuJlLqwG4OxbhkMMjq0e5DDan3KcvAfEM2a56jOQ,12662
17
+ memori/database/connection_utils.py,sha256=QQ50IQlrNUd0CWiFQeH76yIi1evbgMv8dDV29QkSAsc,6796
18
+ memori/database/models.py,sha256=jPsD_ALGHMgv6_nxgizSQ2BTbNTupCMPOuS5EBaUiFU,14826
19
+ memori/database/mongodb_manager.py,sha256=9i65D5mX2v0nM-3mR6-YxouybvHtnnLMB5i58uPBs7Y,55049
20
+ memori/database/query_translator.py,sha256=ruwzfIVxhcO5ouNamRVlxIUMkesU7xE8N5LzgaPW9Qc,6988
21
+ memori/database/search_service.py,sha256=QH0CQaDONR3aSd7Su2C6Ysz4pikbYk3NDFRkP4EcFws,26856
22
+ memori/database/sqlalchemy_manager.py,sha256=qSVSUp76CFiAy7CUvwdq3xGeXPGimhZxac0OtnV6XKQ,34926
23
+ memori/database/adapters/__init__.py,sha256=QMAo4Ts5ycxSqi0nmcssHRXASwr2KKn0mMu-kYbmFzo,626
24
+ memori/database/adapters/mongodb_adapter.py,sha256=iZXaQwB0_My1eVz0mqeTZNILIXGnCF_UeOwZ3TAhZao,26537
25
+ memori/database/adapters/mysql_adapter.py,sha256=HK04a9GAZiKwWZJkVhArNqOCUnHUnJRA-c_MAOPJVUI,12915
26
+ memori/database/adapters/postgresql_adapter.py,sha256=QQEQtWVozlLDa4Cz2yWk1xC1OfukR_j2cGooWiRIQ70,11330
27
+ memori/database/adapters/sqlite_adapter.py,sha256=Mu6Vjy2dCirAZcO591omLZXnbO0zMkD-WO23KGfV4Ck,9142
28
+ memori/database/connectors/__init__.py,sha256=vQvrAVrN93Sd-kRpFllKLsFJPOCu35E1NHyCLIfG6cw,519
29
+ memori/database/connectors/base_connector.py,sha256=y-XZVGWf01VmxVpvh9EiG73io6zmVLXXWfhgYlT1U7k,9603
30
+ memori/database/connectors/mongodb_connector.py,sha256=_bYXgPzmP8Bq-WcqCfPOSnGKya0150ywXbAeNeWyNPs,21416
31
+ memori/database/connectors/mysql_connector.py,sha256=RviFF2GRjug90NA60PcvLZ5aJSjAvXkGa42uXSjIIx0,13319
32
+ memori/database/connectors/postgres_connector.py,sha256=AvLZ6XwWPYhIPrT2zlH1bfB5heEPibisO86r68R3FMg,16635
33
+ memori/database/connectors/sqlite_connector.py,sha256=7UUFA-6U-N2K8JXxSzF7j2nKYwDV1awWNAJTzMiWH7A,11680
34
+ memori/database/queries/__init__.py,sha256=BIxenJzxOosD2-myGfGrortbq18rQycxBfqdMJhm-Cc,319
35
+ memori/database/queries/base_queries.py,sha256=BhfaKpe1s2WeQB7mY_RGtw8cRy8oXSlpb2KNc7-Icbg,10574
36
+ memori/database/queries/chat_queries.py,sha256=oQvbDy5DyeYcTtkYtmRM_pNT3OCzZrb8mLZpAoOE3X4,4406
37
+ memori/database/queries/entity_queries.py,sha256=3qJHIF9c02EVpx9FTVeurDZ3enpcVRRq2_8EMGF9TZM,7493
38
+ memori/database/queries/memory_queries.py,sha256=wWDNIg8fgYePf9I1DNdqK0rxkMzXveUi01L8_NLvYuo,9205
39
+ memori/database/schema_generators/__init__.py,sha256=XHJXntv3WCr_MK9elgoFxo0ULIznRe9JJj9_hurCp0I,442
40
+ memori/database/schema_generators/mongodb_schema_generator.py,sha256=fhzw_Njqyq7krZW1L0_9hm3dd8VouLq3y0NGuuUvRPs,28291
41
+ memori/database/schema_generators/mysql_schema_generator.py,sha256=H_wHbKZuB3biJr-JedyvBdCjlu3bC10YI70_XVRaErI,8873
42
+ memori/database/search/__init__.py,sha256=F5sw09ufumhp7ysYCunF77Rx1y3OUvyejxHWnZn1T2Q,504
43
+ memori/database/search/mongodb_search_adapter.py,sha256=jfCYzz6F83encM_1KIrnEaWw4arV3aS3QJ2HpXJvL24,24905
44
+ memori/database/search/mysql_search_adapter.py,sha256=FBf8exSfSD0TGGMIjbt2ahh3p61mD4YtlnFdCDNkaok,9270
45
+ memori/database/search/sqlite_search_adapter.py,sha256=J9NbVeRguuI4WAN_Do5KUkIbyi9zQ0DGoPCD9yrb06k,6812
46
+ memori/database/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
+ memori/database/templates/basic_template.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
+ memori/database/templates/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
+ memori/integrations/__init__.py,sha256=LKbF3PLpvIY18nVvfl7uDXivbNeNXQZyYb66g-dWado,2891
50
+ memori/integrations/anthropic_integration.py,sha256=1wmuXo2cLee-eq743t8F90TArh2lfhLrM6l9Z1e0kn4,8137
51
+ memori/integrations/litellm_integration.py,sha256=zgQ5reU-t40hl5qQ8jOoVxnA4tB-43ywuVwGKj5vRBo,13226
52
+ memori/integrations/openai_integration.py,sha256=S8lTMHosAuzHaOT0xUYTdE31P7rvzhTlxg_4mQSPoEQ,21513
53
+ memori/tools/__init__.py,sha256=0KPbWAFYmvEleacrby4RzhJGW5GPdFiXN6RWwFrbqf4,200
54
+ memori/tools/memory_tool.py,sha256=umwvskJVGAgcnRfQnjL6Xf1BcJ_p6ORcoq5i_5dwRrM,25098
55
+ memori/utils/__init__.py,sha256=e3AN4KfomQBQDsr53HwfvOeTtI3QZMzGQMYpRp8l6ow,1757
56
+ memori/utils/exceptions.py,sha256=SzLHenNe4BWe3bGegz2yoHYTh4aLel5rNCC6x0IvNwM,11933
57
+ memori/utils/helpers.py,sha256=tYphW25u9qr2rTvtdPoX0avtcH9lwQuOxa9DT5mFEBs,13010
58
+ memori/utils/input_validator.py,sha256=ZJnMS_DqeZCDuHVkTU_dlN1XPoqN_FqDA_yqMM8imTY,13546
59
+ memori/utils/logging.py,sha256=sPaZKzL3DxKYHX5PGEtuWvRC0Sj2ALWSrhzbybq3f4I,7109
60
+ memori/utils/pydantic_models.py,sha256=wEB9vu79Z4NiaePdHb3eJmX7lZY5YWA82QD8_xuECCk,12041
61
+ memori/utils/query_builder.py,sha256=cKv2OFe_G_ap4a7rZ4F2p9nZUIfjgFvquQBfXIBnTls,21386
62
+ memori/utils/schemas.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
+ memori/utils/security_audit.py,sha256=SZyqdHyIUzrrnMxO__dAcnB-3x0vSuHW7eW0apOGT2s,21979
64
+ memori/utils/security_integration.py,sha256=xiyYQ1sEo0yk_0NhWeXzzjTJ60pNbI0SEyAz766iilA,13050
65
+ memori/utils/transaction_manager.py,sha256=kyxI_gRJUY8b1lq0ZUDN65rNmUC5qIGOyL8obFIysBQ,18735
66
+ memori/utils/validators.py,sha256=u5emqDrSkN9JlJxdo5yxcCqs510UDOiLf16F6p-Oyps,11267
67
+ memorisdk-2.1.0.dist-info/licenses/LICENSE,sha256=gyrDaYsSODngoYE1l68l_UfjppS-oYDrf1MvY1JGhgE,10430
68
+ memorisdk-2.1.0.dist-info/METADATA,sha256=nMjmuDVkehI1B5nxNiwaONaP5y0_zuQD89BAwwZo85Q,19846
69
+ memorisdk-2.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
+ memorisdk-2.1.0.dist-info/top_level.txt,sha256=Nm3ad0isbJYBzTEce-O_gmkAEiTbAbyilgAhRt8IoGA,7
71
+ memorisdk-2.1.0.dist-info/RECORD,,
@@ -1,50 +0,0 @@
1
- import os
2
-
3
-
4
- def is_text_file(file_path):
5
- try:
6
- with open(file_path, encoding="utf-8") as f:
7
- f.read()
8
- return True
9
- except (UnicodeDecodeError, OSError):
10
- return False
11
-
12
-
13
- def ingest_folder_to_txt(
14
- input_path, output_file="ingested_data.txt", exclude_dirs=None
15
- ):
16
- if exclude_dirs is None:
17
- exclude_dirs = [".git", "node_modules", "__pycache__"]
18
-
19
- with open(output_file, "w", encoding="utf-8") as out_f:
20
- for root, dirs, files in os.walk(input_path):
21
- # Filter out excluded directories
22
- dirs[:] = [d for d in dirs if d not in exclude_dirs]
23
-
24
- for file in files:
25
- file_path = os.path.join(root, file)
26
-
27
- # Skip binary files or the output file itself
28
- if not is_text_file(file_path) or os.path.abspath(
29
- file_path
30
- ) == os.path.abspath(output_file):
31
- continue
32
-
33
- try:
34
- with open(file_path, encoding="utf-8") as in_f:
35
- content = in_f.read()
36
-
37
- relative_path = os.path.relpath(file_path, input_path)
38
- out_f.write(f"\n### FILE: {relative_path} ###\n")
39
- out_f.write(content + "\n")
40
-
41
- except Exception as e:
42
- print(f"Skipping {file_path}: {e}")
43
-
44
- print(f"\n✅ Ingested data written to: {output_file}")
45
-
46
-
47
- # ---- Run from CLI or script ----
48
- if __name__ == "__main__":
49
- folder_path = input("Enter the path to the folder: ").strip()
50
- ingest_folder_to_txt(folder_path)
@@ -1,67 +0,0 @@
1
- memori/__init__.py,sha256=emYkTqCGsQfc-qY2vSTm4-w9DVJdziC9RTfSrktUmG0,3676
2
- memori/agents/__init__.py,sha256=9M3IG5R10FfVgT8tUzBZ2pZ0SypSpYkFfhtyvMyeTpE,261
3
- memori/agents/conscious_agent.py,sha256=NQ-dEHRXutrkwo2ssPZ0ct7uHXU2gDa-PQ0d74mUFvk,13459
4
- memori/agents/memory_agent.py,sha256=tBwkNMtlVDlQ88jATjuL96vQHPfU_HOz_XXOB3vd710,23552
5
- memori/agents/retrieval_agent.py,sha256=w1_6j_OJytzAF4IQi5nRWUxNIyIyHK8nHdklYYwsCxU,37145
6
- memori/config/__init__.py,sha256=tQAxopgOsea02u9iId-ocOY86nWWNGC3rvt3AOFcLn8,295
7
- memori/config/manager.py,sha256=xi8d8xW3obyV6v9UHDG6idSAymge8yWxGW11e2mI0nQ,10388
8
- memori/config/memory_manager.py,sha256=hxwkMpUaOkOcnnvgpHxR4PT6iHNj8yNda-o9OpM0Y-g,11020
9
- memori/config/settings.py,sha256=nrrWD4hwdbtYlIPtJFHgGyMudGP-hz9sA-KBW_7ZZbE,9724
10
- memori/core/__init__.py,sha256=jvhHn-KL3bzRHs11-4B0BCKH6gkAf6Gf_G59If8fD0M,157
11
- memori/core/conversation.py,sha256=l1SRLyIrKrcSzqEdqnqLwSqYW6rXtGeH1Fhs7YBI0XU,15825
12
- memori/core/database.py,sha256=RkBelmgDm_6WoTKISPTz_WYVsPvnVB7NKJuRFWOLbZM,40044
13
- memori/core/memory.py,sha256=sORgSkIdQ00iTuJYG_zjmNN6sUnf8DQ-2vk_A03-X6Y,103388
14
- memori/core/providers.py,sha256=Ix8CEb_kw0Qur1E3_mxydh3RvUpyNy5qGAKK4wuGK6Y,7032
15
- memori/database/__init__.py,sha256=kMLxwfRfTVvw0oV1kl9v-Dkyqm6ggcsMV6hltqdrN3k,189
16
- memori/database/auto_creator.py,sha256=pQUKV9hO-wM-vocr-_2I-1kwCofd3z8-KpkHAxLREaM,12686
17
- memori/database/connection_utils.py,sha256=iAxVvwP-_0UZwmc_y_GOs3-26YlPTmot6_bY8crIPxQ,6741
18
- memori/database/models.py,sha256=jeC5JiVXjxzk3ABt7BeXfkAYOpyjcQ3OqnuLkfIIRyc,14832
19
- memori/database/query_translator.py,sha256=oe_BCPamtT-LBBUKChbM0jK4rjI4ZDZtVp7ZUGnpDqs,7026
20
- memori/database/search_service.py,sha256=xh1MtXbov48HAcJpeMYHh9JUTEWrqRBqn0kahriGJqU,20584
21
- memori/database/sqlalchemy_manager.py,sha256=hC0bC-XJm81bCWKYtuMowFTkVdQayTWb8893O6MbhN8,33049
22
- memori/database/adapters/__init__.py,sha256=lSvRPZXJoKTlj4iI8kW5I45OXjKZh8oFb6vqDpJ69sQ,366
23
- memori/database/adapters/mysql_adapter.py,sha256=WOe-huYmrt-aeDn0YACnH3F5bhSTjG0SePjl4hThd-s,12944
24
- memori/database/adapters/postgresql_adapter.py,sha256=tGBGoBo340bLluhb9DytflDdVnhkjbgaCY2SvvoUpfA,11358
25
- memori/database/adapters/sqlite_adapter.py,sha256=FBeBgXlbB0I5vcjtT7rURNnHAkxXdlZ6e4OVEFVe78I,9170
26
- memori/database/connectors/__init__.py,sha256=tG283nMRMWWM3B4WBfi7PMYnSUcH2Go5C88O91dOjcE,275
27
- memori/database/connectors/base_connector.py,sha256=9fL4tSEQSPdnHnYbS6BbARrHztyIUy4DUZgZlgauFwo,9646
28
- memori/database/connectors/mysql_connector.py,sha256=JE4nplaftn5SQI7DMXCe0qiVQyOE3OCIXHjnAUNa5C8,13380
29
- memori/database/connectors/postgres_connector.py,sha256=sjD0ZjBNk0NZa-SkHRE5EnOqtTZ4z4ksL_-R2qKS7UY,16672
30
- memori/database/connectors/sqlite_connector.py,sha256=FHPa33rPePkSWlhhYaHeKsjL64IbVyqFukx1le2HQo0,11717
31
- memori/database/queries/__init__.py,sha256=BIxenJzxOosD2-myGfGrortbq18rQycxBfqdMJhm-Cc,319
32
- memori/database/queries/base_queries.py,sha256=jUOGHETuPVGNfDPmWja3DSHgGSibP3YyrPRmP55ry4I,10598
33
- memori/database/queries/chat_queries.py,sha256=gFsLLjAov502Pns9HAMr_MqLDETplZBQSPs9nqWFCnk,4431
34
- memori/database/queries/entity_queries.py,sha256=no6bzXHNzRs4mmbi4MggW2F19XxfJ-0RQKv3iv84a64,7518
35
- memori/database/queries/memory_queries.py,sha256=ehBikwSfP-3ClASUEJCmBlxVBI6BZpZHaheYBSSJ79c,9230
36
- memori/database/schema_generators/__init__.py,sha256=0qN5FEmRgXaqT63HJXEnxaA8y1PebtyM-dZpSKkQfCI,152
37
- memori/database/schema_generators/mysql_schema_generator.py,sha256=fWT4SR923eb9W2ri5ECLOcuGpBG-ehg1FTazDUjIcbY,8904
38
- memori/database/search/__init__.py,sha256=3w82tn7AbHC7LewegaQCyU95zl28dZQUbJKBCqZ3eTE,222
39
- memori/database/search/mysql_search_adapter.py,sha256=vZPA0BWIOsgu4dWsve8sbk0CPR8hULhPNz5vN4PyYW0,9301
40
- memori/database/search/sqlite_search_adapter.py,sha256=zMkboGrJKkFyA6fx0kHBjUqKMCxaiVdD4F7jGEA8ssU,6840
41
- memori/database/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- memori/database/templates/basic_template.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
- memori/database/templates/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
- memori/integrations/__init__.py,sha256=jlTI3TRBpclXXiqbigSUVqpfN9t64Q9B17EhlN543h8,2903
45
- memori/integrations/anthropic_integration.py,sha256=IJtqPYTcMaYsXKWUabR4XDMpCabg9qMK7d-8T9A1CcY,8169
46
- memori/integrations/litellm_integration.py,sha256=UWC5huyUMasfZDBzH7MxAVbTXoo70qvyGcrYZI7Gx_Y,12407
47
- memori/integrations/openai_integration.py,sha256=iQKitY1JY_i-YldcAeePnVdYc6Ns0Gmk_zIoMV302RA,19977
48
- memori/scripts/llm_text.py,sha256=HDkuGMb527yupSbA3syBFA9WHBPnP2lVqEKW6trIZtU,1603
49
- memori/tools/__init__.py,sha256=0KPbWAFYmvEleacrby4RzhJGW5GPdFiXN6RWwFrbqf4,200
50
- memori/tools/memory_tool.py,sha256=j57j2-MbhC9oTQJxBOnEBssB536OAb7igFA-XnxtHy4,20917
51
- memori/utils/__init__.py,sha256=e3AN4KfomQBQDsr53HwfvOeTtI3QZMzGQMYpRp8l6ow,1757
52
- memori/utils/exceptions.py,sha256=JGLo2S8ElG3gBjD4aJeVPWNsNB9OLPYAYzCdKfiEW74,12136
53
- memori/utils/helpers.py,sha256=_lpGSsI2UkMyYUY6X9k_VEpACvyxwY51TzgYVPZTeBk,13059
54
- memori/utils/input_validator.py,sha256=Jfk07lm7PkFwArzt7vYQBJfx1DMFA_LqU2D9Y2-ufDQ,13612
55
- memori/utils/logging.py,sha256=HXf3UrE0cm72KvFwyCjE7237opIxdNqzqxQQauhrX34,7131
56
- memori/utils/pydantic_models.py,sha256=oKQqvcFhmFdm_ldDqe5bM1xWJkSrv08o6gcz5Lgfs8o,12142
57
- memori/utils/query_builder.py,sha256=3Srw9Ini6zBTOmIbIfYNwj5pZ3cyHr3hNiV9jLHHan4,21430
58
- memori/utils/schemas.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- memori/utils/security_audit.py,sha256=BB9IwDdAiUgmuwjm8rEyHbthfTHr1sipcNlPdFpBs_g,22059
60
- memori/utils/security_integration.py,sha256=TORuhOPEAQ1PRkt7xcBHhI1UbCd4LVLowdiv2UItwCY,13078
61
- memori/utils/transaction_manager.py,sha256=ITSF1Gba4cEBJXW1woDyomhOsdfL8vwfGckqbYqAGok,18755
62
- memori/utils/validators.py,sha256=2btILpEh2yBS_6rytp2B2epFxMT4876SibS0yNj6bKI,11287
63
- memorisdk-2.0.0.dist-info/licenses/LICENSE,sha256=gyrDaYsSODngoYE1l68l_UfjppS-oYDrf1MvY1JGhgE,10430
64
- memorisdk-2.0.0.dist-info/METADATA,sha256=GtHOV0QPtwUELPHMuj8GD6lMo8AGbrYy031xY4nKPWI,18201
65
- memorisdk-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
66
- memorisdk-2.0.0.dist-info/top_level.txt,sha256=Nm3ad0isbJYBzTEce-O_gmkAEiTbAbyilgAhRt8IoGA,7
67
- memorisdk-2.0.0.dist-info/RECORD,,