unique-user-memory 2026.28.0.dev0__tar.gz → 2026.28.0.dev2__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.
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: unique-user-memory
3
- Version: 2026.28.0.dev0
3
+ Version: 2026.28.0.dev2
4
4
  Summary:
5
5
  Author: Fabian Schläpfer
6
6
  Author-email: Fabian Schläpfer <fabian@unique.ch>
7
7
  License: Proprietary
8
8
  Requires-Dist: jinja2>=3.1.6
9
9
  Requires-Dist: pydantic>=2.8.2
10
- Requires-Dist: unique-sdk>=2026.28.0.dev0,<2026.28.0rc0
11
- Requires-Dist: unique-toolkit>=2026.28.0.dev0,<2026.28.0rc0
10
+ Requires-Dist: unique-sdk>=2026.28.0.dev4,<2026.28.0rc0
11
+ Requires-Dist: unique-toolkit>=2026.28.0.dev3,<2026.28.0rc0
12
12
  Requires-Python: >=3.12, <4
13
13
  Description-Content-Type: text/markdown
14
14
 
@@ -22,7 +22,7 @@ Persistent per-user memory for Unique AI agents.
22
22
 
23
23
  The package provides:
24
24
 
25
- - `UserMemoryConfig` - Pydantic configuration for enabling memory and choosing the consolidation model.
25
+ - `UserMemoryConfig` - Pydantic configuration for the consolidation model, profile token budget, and memory folder.
26
26
  - `load_user_memory(...)` - resolves the user's private memory folder, downloads `memory.md`, and enforces the configured token budget.
27
27
  - `UserMemoryPostprocessor` - runs after the assistant response, consolidates the latest turn into the profile, and uploads the updated `memory.md`.
28
28
 
@@ -84,11 +84,12 @@ The consolidation prompt preserves the schema, keeps bullets short, and returns
84
84
 
85
85
  ## Configuration
86
86
 
87
+ Memory is activated by the orchestrator when `space.allow_user_memory` is true. `UserMemoryConfig` only configures how active memory is consolidated and stored.
88
+
87
89
  ```python
88
90
  from unique_user_memory import UserMemoryConfig
89
91
 
90
92
  config = UserMemoryConfig(
91
- enabled=True,
92
93
  max_tokens=2000,
93
94
  root_folder="user-memory",
94
95
  )
@@ -96,7 +97,6 @@ config = UserMemoryConfig(
96
97
 
97
98
  | Field | Default | Description |
98
99
  | --- | --- | --- |
99
- | `enabled` | `False` | Enables persistent per-user memory for agents that do not use the space-level switch. |
100
100
  | `language_model` | `DEFAULT_GPT_4o` | Model used to consolidate the latest turn into the profile. |
101
101
  | `max_tokens` | `2000` | Maximum profile size. Must be between 500 and 8000 tokens. |
102
102
  | `root_folder` | `user-memory` | Root KB folder that contains per-user memory folders. |
@@ -8,7 +8,7 @@ Persistent per-user memory for Unique AI agents.
8
8
 
9
9
  The package provides:
10
10
 
11
- - `UserMemoryConfig` - Pydantic configuration for enabling memory and choosing the consolidation model.
11
+ - `UserMemoryConfig` - Pydantic configuration for the consolidation model, profile token budget, and memory folder.
12
12
  - `load_user_memory(...)` - resolves the user's private memory folder, downloads `memory.md`, and enforces the configured token budget.
13
13
  - `UserMemoryPostprocessor` - runs after the assistant response, consolidates the latest turn into the profile, and uploads the updated `memory.md`.
14
14
 
@@ -70,11 +70,12 @@ The consolidation prompt preserves the schema, keeps bullets short, and returns
70
70
 
71
71
  ## Configuration
72
72
 
73
+ Memory is activated by the orchestrator when `space.allow_user_memory` is true. `UserMemoryConfig` only configures how active memory is consolidated and stored.
74
+
73
75
  ```python
74
76
  from unique_user_memory import UserMemoryConfig
75
77
 
76
78
  config = UserMemoryConfig(
77
- enabled=True,
78
79
  max_tokens=2000,
79
80
  root_folder="user-memory",
80
81
  )
@@ -82,7 +83,6 @@ config = UserMemoryConfig(
82
83
 
83
84
  | Field | Default | Description |
84
85
  | --- | --- | --- |
85
- | `enabled` | `False` | Enables persistent per-user memory for agents that do not use the space-level switch. |
86
86
  | `language_model` | `DEFAULT_GPT_4o` | Model used to consolidate the latest turn into the profile. |
87
87
  | `max_tokens` | `2000` | Maximum profile size. Must be between 500 and 8000 tokens. |
88
88
  | `root_folder` | `user-memory` | Root KB folder that contains per-user memory folders. |
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "unique_user_memory"
3
- version = "2026.28.0.dev0"
3
+ version = "2026.28.0.dev2"
4
4
  description = ""
5
5
  authors = [
6
6
  { name = "Fabian Schläpfer", email = "fabian@unique.ch" },
@@ -11,8 +11,8 @@ requires-python = ">=3.12,<4"
11
11
  dependencies = [
12
12
  "jinja2>=3.1.6",
13
13
  "pydantic>=2.8.2",
14
- "unique-sdk>=2026.28.0.dev0,<2026.28.0rc0",
15
- "unique-toolkit>=2026.28.0.dev0,<2026.28.0rc0",
14
+ "unique-sdk>=2026.28.0.dev4,<2026.28.0rc0",
15
+ "unique-toolkit>=2026.28.0.dev3,<2026.28.0rc0",
16
16
  ]
17
17
 
18
18
  [dependency-groups]
@@ -11,10 +11,6 @@ from unique_toolkit.language_model.infos import LanguageModelInfo
11
11
  class UserMemoryConfig(BaseModel):
12
12
  model_config = get_configuration_dict()
13
13
 
14
- enabled: Annotated[bool, RJSFMetaTag.SpecialWidget.hidden()] = Field(
15
- default=False,
16
- description="Whether to enable persistent per-user memory.",
17
- )
18
14
  language_model: LMI = Field(
19
15
  default=LanguageModelInfo.from_name(DEFAULT_GPT_4o),
20
16
  description="The language model used for post-turn memory consolidation.",
@@ -57,7 +57,7 @@ async def test_consolidate_user_memory_keeps_existing_on_noop(
57
57
  user_id="user_1",
58
58
  user_message="hello",
59
59
  assistant_message="hi",
60
- config=UserMemoryConfig(enabled=True),
60
+ config=UserMemoryConfig(),
61
61
  event=MagicMock(),
62
62
  logger=MagicMock(),
63
63
  )
@@ -84,7 +84,7 @@ async def test_consolidate_user_memory_keeps_existing_on_malformed_output(
84
84
  user_id="user_1",
85
85
  user_message="remember I like concise answers",
86
86
  assistant_message="noted",
87
- config=UserMemoryConfig(enabled=True),
87
+ config=UserMemoryConfig(),
88
88
  event=MagicMock(),
89
89
  logger=MagicMock(),
90
90
  )
@@ -380,7 +380,7 @@ async def test_user_memory_postprocessor_logs_success_when_upload_succeeds(
380
380
  loop_response.message.text = "noted"
381
381
  logger = MagicMock()
382
382
  postprocessor = UserMemoryPostprocessor(
383
- config=UserMemoryConfig(enabled=True),
383
+ config=UserMemoryConfig(),
384
384
  event=event,
385
385
  state=UserMemoryState(scope_id="scope_1", text=empty_profile("user_1")),
386
386
  logger=logger,
@@ -421,7 +421,7 @@ async def test_user_memory_postprocessor_does_not_log_success_when_upload_fails(
421
421
  loop_response.message.text = "noted"
422
422
  logger = MagicMock()
423
423
  postprocessor = UserMemoryPostprocessor(
424
- config=UserMemoryConfig(enabled=True),
424
+ config=UserMemoryConfig(),
425
425
  event=event,
426
426
  state=UserMemoryState(scope_id="scope_1", text=empty_profile("user_1")),
427
427
  logger=logger,