Skip to content

Commit a0ea814

Browse files
mjnoviceclaude
andcommitted
refactor: rename EpisodicMemoryIndex to MemorySpace per review
Replace "index" terminology with "memory space" throughout the memory module to match the product language used by frontends and backend (MemorySpaceResponse, MemorySpace, etc.). Renames: - EpisodicMemoryIndex → MemorySpace - EpisodicMemoryListResponse → MemorySpaceListResponse - EpisodicMemoryCreateRequest → MemorySpaceCreateRequest All docstrings updated to use "memory space" instead of "memory index". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5e8c8e0 commit a0ea814

5 files changed

Lines changed: 68 additions & 68 deletions

File tree

packages/uipath-platform/src/uipath/platform/memory/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
from ._memory_service import MemoryService
44
from .memory import (
55
CachedRecall,
6-
EpisodicMemoryCreateRequest,
7-
EpisodicMemoryIndex,
8-
EpisodicMemoryListResponse,
96
EscalationMemoryIngestRequest,
107
EscalationMemoryMatch,
118
EscalationMemorySearchResponse,
@@ -14,16 +11,16 @@
1411
MemoryMatchField,
1512
MemorySearchRequest,
1613
MemorySearchResponse,
14+
MemorySpace,
15+
MemorySpaceCreateRequest,
16+
MemorySpaceListResponse,
1717
SearchField,
1818
SearchMode,
1919
SearchSettings,
2020
)
2121

2222
__all__ = [
2323
"CachedRecall",
24-
"EpisodicMemoryCreateRequest",
25-
"EpisodicMemoryIndex",
26-
"EpisodicMemoryListResponse",
2724
"EscalationMemoryIngestRequest",
2825
"EscalationMemoryMatch",
2926
"EscalationMemorySearchResponse",
@@ -33,6 +30,9 @@
3330
"MemorySearchRequest",
3431
"MemorySearchResponse",
3532
"MemoryService",
33+
"MemorySpace",
34+
"MemorySpaceCreateRequest",
35+
"MemorySpaceListResponse",
3636
"SearchField",
3737
"SearchMode",
3838
"SearchSettings",

packages/uipath-platform/src/uipath/platform/memory/_memory_service.py

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"""Episodic Memory service.
1+
"""Memory Spaces service.
22
3-
Index management (create/list) goes through ECS v2.
3+
Memory space CRUD (create/list) goes through ECS v2.
44
Search and escalation memory operations go through LLMOps, which
55
enriches traces/feedback before forwarding to ECS.
66
"""
@@ -16,24 +16,24 @@
1616
from ..common._models import Endpoint, RequestSpec
1717
from ..orchestrator._folder_service import FolderService
1818
from .memory import (
19-
EpisodicMemoryCreateRequest,
20-
EpisodicMemoryIndex,
21-
EpisodicMemoryListResponse,
2219
EscalationMemoryIngestRequest,
2320
EscalationMemorySearchResponse,
2421
MemorySearchRequest,
2522
MemorySearchResponse,
23+
MemorySpace,
24+
MemorySpaceCreateRequest,
25+
MemorySpaceListResponse,
2626
)
2727

2828
_MEMORY_SPACES_BASE = "/ecs_/v2/episodicmemories"
2929
_LLMOPS_AGENT_BASE = "/llmopstenant_/api/Agent/memory"
3030

3131

3232
class MemoryService(FolderContext, BaseService):
33-
"""Service for Agent Episodic Memory.
33+
"""Service for Agent Memory Spaces.
3434
3535
Agent Memory allows agents to persist context across jobs using dynamic
36-
few-shot retrieval. Memory indexes are folder-scoped and managed via ECS.
36+
few-shot retrieval. Memory spaces are folder-scoped and managed via ECS.
3737
Search is routed through LLMOps, which handles trace/feedback enrichment
3838
and system prompt injection. Escalation memory enables agents to recall
3939
previously resolved escalation outcomes.
@@ -48,7 +48,7 @@ def __init__(
4848
super().__init__(config=config, execution_context=execution_context)
4949
self._folders_service = folders_service
5050

51-
# ── Index operations (ECS) ─────────────────────────────────────────
51+
# ── Memory space operations (ECS) ──────────────────────────────────
5252

5353
@traced(name="memory_create", run_type="uipath")
5454
def create(
@@ -57,17 +57,17 @@ def create(
5757
description: Optional[str] = None,
5858
is_encrypted: Optional[bool] = None,
5959
folder_key: Optional[str] = None,
60-
) -> EpisodicMemoryIndex:
61-
"""Create a new episodic memory index.
60+
) -> MemorySpace:
61+
"""Create a new memory space.
6262
6363
Args:
64-
name: The name of the memory index (max 128 chars).
64+
name: The name of the memory space (max 128 chars).
6565
description: Optional description (max 1024 chars).
66-
is_encrypted: Whether the index should be encrypted.
66+
is_encrypted: Whether the memory space should be encrypted.
6767
folder_key: The folder key for the operation.
6868
6969
Returns:
70-
EpisodicMemoryIndex: The created memory index.
70+
MemorySpace: The created memory space.
7171
"""
7272
spec = self._create_spec(name, description, is_encrypted, folder_key)
7373
response = self.request(
@@ -76,7 +76,7 @@ def create(
7676
json=spec.json,
7777
headers=spec.headers,
7878
).json()
79-
return EpisodicMemoryIndex.model_validate(response)
79+
return MemorySpace.model_validate(response)
8080

8181
@traced(name="memory_create", run_type="uipath")
8282
async def create_async(
@@ -85,17 +85,17 @@ async def create_async(
8585
description: Optional[str] = None,
8686
is_encrypted: Optional[bool] = None,
8787
folder_key: Optional[str] = None,
88-
) -> EpisodicMemoryIndex:
89-
"""Asynchronously create a new episodic memory index.
88+
) -> MemorySpace:
89+
"""Asynchronously create a new memory space.
9090
9191
Args:
92-
name: The name of the memory index (max 128 chars).
92+
name: The name of the memory space (max 128 chars).
9393
description: Optional description (max 1024 chars).
94-
is_encrypted: Whether the index should be encrypted.
94+
is_encrypted: Whether the memory space should be encrypted.
9595
folder_key: The folder key for the operation.
9696
9797
Returns:
98-
EpisodicMemoryIndex: The created memory index.
98+
MemorySpace: The created memory space.
9999
"""
100100
spec = self._create_spec(name, description, is_encrypted, folder_key)
101101
response = (
@@ -106,7 +106,7 @@ async def create_async(
106106
headers=spec.headers,
107107
)
108108
).json()
109-
return EpisodicMemoryIndex.model_validate(response)
109+
return MemorySpace.model_validate(response)
110110

111111
@traced(name="memory_list", run_type="uipath")
112112
def list(
@@ -116,8 +116,8 @@ def list(
116116
top: Optional[int] = None,
117117
skip: Optional[int] = None,
118118
folder_key: Optional[str] = None,
119-
) -> EpisodicMemoryListResponse:
120-
"""List episodic memory indexes with optional OData query parameters.
119+
) -> MemorySpaceListResponse:
120+
"""List memory spaces with optional OData query parameters.
121121
122122
Args:
123123
filter: OData $filter expression.
@@ -127,7 +127,7 @@ def list(
127127
folder_key: The folder key for the operation.
128128
129129
Returns:
130-
EpisodicMemoryListResponse: The list of memory indexes.
130+
MemorySpaceListResponse: The list of memory spaces.
131131
"""
132132
spec = self._list_spec(filter, orderby, top, skip, folder_key)
133133
response = self.request(
@@ -136,7 +136,7 @@ def list(
136136
params=spec.params,
137137
headers=spec.headers,
138138
).json()
139-
return EpisodicMemoryListResponse.model_validate(response)
139+
return MemorySpaceListResponse.model_validate(response)
140140

141141
@traced(name="memory_list", run_type="uipath")
142142
async def list_async(
@@ -146,8 +146,8 @@ async def list_async(
146146
top: Optional[int] = None,
147147
skip: Optional[int] = None,
148148
folder_key: Optional[str] = None,
149-
) -> EpisodicMemoryListResponse:
150-
"""Asynchronously list episodic memory indexes.
149+
) -> MemorySpaceListResponse:
150+
"""Asynchronously list memory spaces.
151151
152152
Args:
153153
filter: OData $filter expression.
@@ -157,7 +157,7 @@ async def list_async(
157157
folder_key: The folder key for the operation.
158158
159159
Returns:
160-
EpisodicMemoryListResponse: The list of memory indexes.
160+
MemorySpaceListResponse: The list of memory spaces.
161161
"""
162162
spec = self._list_spec(filter, orderby, top, skip, folder_key)
163163
response = (
@@ -168,7 +168,7 @@ async def list_async(
168168
headers=spec.headers,
169169
)
170170
).json()
171-
return EpisodicMemoryListResponse.model_validate(response)
171+
return MemorySpaceListResponse.model_validate(response)
172172

173173
# ── Search (LLMOps) ───────────────────────────────────────────────
174174

@@ -179,13 +179,13 @@ def search(
179179
request: MemorySearchRequest,
180180
folder_key: Optional[str] = None,
181181
) -> MemorySearchResponse:
182-
"""Search episodic memory via LLMOps.
182+
"""Search a memory space via LLMOps.
183183
184184
Returns search results with scores and a systemPromptInjection
185185
string ready for the agent loop.
186186
187187
Args:
188-
memory_space_id: The GUID of the memory space (ECS index).
188+
memory_space_id: The GUID of the memory space.
189189
request: The search request payload.
190190
folder_key: The folder key for the operation.
191191
@@ -208,13 +208,13 @@ async def search_async(
208208
request: MemorySearchRequest,
209209
folder_key: Optional[str] = None,
210210
) -> MemorySearchResponse:
211-
"""Asynchronously search episodic memory via LLMOps.
211+
"""Asynchronously search a memory space via LLMOps.
212212
213213
Returns search results with scores and a systemPromptInjection
214214
string ready for the agent loop.
215215
216216
Args:
217-
memory_space_id: The GUID of the memory space (ECS index).
217+
memory_space_id: The GUID of the memory space.
218218
request: The search request payload.
219219
folder_key: The folder key for the operation.
220220
@@ -247,7 +247,7 @@ def escalation_search(
247247
re-escalating for similar situations.
248248
249249
Args:
250-
memory_space_id: The GUID of the memory space (ECS index).
250+
memory_space_id: The GUID of the memory space.
251251
request: The search request payload (same as regular search).
252252
folder_key: The folder key for the operation.
253253
@@ -276,7 +276,7 @@ async def escalation_search_async(
276276
re-escalating for similar situations.
277277
278278
Args:
279-
memory_space_id: The GUID of the memory space (ECS index).
279+
memory_space_id: The GUID of the memory space.
280280
request: The search request payload (same as regular search).
281281
folder_key: The folder key for the operation.
282282
@@ -307,7 +307,7 @@ def escalation_ingest(
307307
without re-escalating.
308308
309309
Args:
310-
memory_space_id: The GUID of the memory space (ECS index).
310+
memory_space_id: The GUID of the memory space.
311311
request: The escalation ingest payload.
312312
folder_key: The folder key for the operation.
313313
"""
@@ -332,7 +332,7 @@ async def escalation_ingest_async(
332332
without re-escalating.
333333
334334
Args:
335-
memory_space_id: The GUID of the memory space (ECS index).
335+
memory_space_id: The GUID of the memory space.
336336
request: The escalation ingest payload.
337337
folder_key: The folder key for the operation.
338338
"""
@@ -381,7 +381,7 @@ def _create_spec(
381381
folder_key: Optional[str] = None,
382382
) -> RequestSpec:
383383
folder_key = self._resolve_folder(folder_key)
384-
body = EpisodicMemoryCreateRequest(
384+
body = MemorySpaceCreateRequest(
385385
name=name,
386386
description=description,
387387
is_encrypted=is_encrypted,

packages/uipath-platform/src/uipath/platform/memory/memory.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"""Pydantic models for the Episodic Memory API.
1+
"""Pydantic models for the Memory Spaces API.
22
3-
Index management goes through ECS v2. Search goes through LLMOps,
3+
Memory space CRUD goes through ECS v2. Search goes through LLMOps,
44
which enriches traces/feedback before forwarding to ECS.
55
Escalation memory operations also go through LLMOps.
66
"""
@@ -14,7 +14,7 @@
1414

1515

1616
class SearchMode(str, Enum):
17-
"""Search mode for episodic memory queries."""
17+
"""Search mode for memory space queries."""
1818

1919
Hybrid = "Hybrid"
2020
Semantic = "Semantic"
@@ -65,11 +65,11 @@ class MemoryMatchField(BaseModel):
6565
weighted_score: float = Field(..., alias="weightedScore")
6666

6767

68-
# ── ECS request models (index CRUD) ───────────────────────────────────
68+
# ── ECS request models (memory space CRUD) ────────────────────────────
6969

7070

71-
class EpisodicMemoryCreateRequest(BaseModel):
72-
"""Request payload for creating an episodic memory index (ECS)."""
71+
class MemorySpaceCreateRequest(BaseModel):
72+
"""Request payload for creating a memory space (ECS)."""
7373

7474
model_config = ConfigDict(populate_by_name=True)
7575

@@ -81,8 +81,8 @@ class EpisodicMemoryCreateRequest(BaseModel):
8181
# ── ECS response models ───────────────────────────────────────────────
8282

8383

84-
class EpisodicMemoryIndex(BaseModel):
85-
"""An episodic memory index (folder-scoped, from ECS)."""
84+
class MemorySpace(BaseModel):
85+
"""A memory space (folder-scoped, from ECS)."""
8686

8787
model_config = ConfigDict(populate_by_name=True)
8888

@@ -96,12 +96,12 @@ class EpisodicMemoryIndex(BaseModel):
9696
is_encrypted: bool = Field(default=False, alias="isEncrypted")
9797

9898

99-
class EpisodicMemoryListResponse(BaseModel):
100-
"""OData response from listing episodic memory indexes (ECS)."""
99+
class MemorySpaceListResponse(BaseModel):
100+
"""OData response from listing memory spaces (ECS)."""
101101

102102
model_config = ConfigDict(populate_by_name=True)
103103

104-
value: List[EpisodicMemoryIndex] = Field(default_factory=list, alias="value")
104+
value: List[MemorySpace] = Field(default_factory=list, alias="value")
105105

106106

107107
# ── LLMOps search models ──────────────────────────────────────────────

packages/uipath-platform/tests/services/test_memory_service.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
from uipath.platform import UiPathApiConfig, UiPathExecutionContext
99
from uipath.platform.memory import (
10-
EpisodicMemoryIndex,
11-
EpisodicMemoryListResponse,
1210
EscalationMemoryIngestRequest,
1311
EscalationMemorySearchResponse,
1412
MemoryMatch,
1513
MemoryMatchField,
1614
MemorySearchRequest,
1715
MemorySearchResponse,
16+
MemorySpace,
17+
MemorySpaceListResponse,
1818
SearchField,
1919
SearchMode,
2020
SearchSettings,
@@ -120,7 +120,7 @@ def test_create_memory_space(
120120
description="A test memory space",
121121
)
122122

123-
assert isinstance(result, EpisodicMemoryIndex)
123+
assert isinstance(result, MemorySpace)
124124
assert result.id == "aaaa-bbbb-cccc-dddd"
125125
assert result.name == "test-memory-space"
126126
assert result.memories_count == 5
@@ -194,7 +194,7 @@ def test_list_memory_spaces(
194194

195195
result = service.list()
196196

197-
assert isinstance(result, EpisodicMemoryListResponse)
197+
assert isinstance(result, MemorySpaceListResponse)
198198
assert len(result.value) == 1
199199
assert result.value[0].name == "test-memory-space"
200200

@@ -219,7 +219,7 @@ def test_list_with_odata_params(
219219
skip=5,
220220
)
221221

222-
assert isinstance(result, EpisodicMemoryListResponse)
222+
assert isinstance(result, MemorySpaceListResponse)
223223

224224
def test_list_empty(
225225
self,
@@ -237,7 +237,7 @@ def test_list_empty(
237237

238238
result = service.list()
239239

240-
assert isinstance(result, EpisodicMemoryListResponse)
240+
assert isinstance(result, MemorySpaceListResponse)
241241
assert len(result.value) == 0
242242

243243
class TestSearch:

0 commit comments

Comments
 (0)