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.
44Search and escalation memory operations go through LLMOps, which
55enriches traces/feedback before forwarding to ECS.
66"""
1616from ..common ._models import Endpoint , RequestSpec
1717from ..orchestrator ._folder_service import FolderService
1818from .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
3232class 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 ,
0 commit comments