Is your feature request related to a problem?
evaluation/utils/agent_utils.py constructs LongTermMemory by calling LongTermMemoryParams(...). However, since #1395 , LongTermMemoryParams is no longer a class. It is an Annotated discriminated union.
LongTermMemoryParams = Annotated[
DeclarativeBackendParams | EventBackendParams,
Field(discriminator="backend"),
]
Calling this type alias as a constructor raises TypeError: 'types.UnionType' object is not callable under Python 3.12, so the evaluation entry point crashes at startup.
Describe the solution you'd like
Use the concrete backend params class directly when constructing LongTermMemory in init_memmachine_params. For the declarative backend, replace:
from memmachine_server.episodic_memory.long_term_memory import (
LongTermMemory,
LongTermMemoryParams,
)
...
long_term_memory = LongTermMemory(
LongTermMemoryParams(...)
)
with:
from memmachine_server.episodic_memory.long_term_memory import (
DeclarativeBackendParams,
LongTermMemory,
)
...
long_term_memory = LongTermMemory(
DeclarativeBackendParams(...)
)
Describe alternatives you've considered
Making LongTermMemoryParams callable (e.g. a factory/dispatch over the union based on the backend discriminator) so existing call sites keep working. This would require upstream changes in the long_term_memory module rather than a one-line fix in agent_utils.py.
Additional context
No response
Is your feature request related to a problem?
evaluation/utils/agent_utils.pyconstructs LongTermMemory by calling LongTermMemoryParams(...). However, since #1395 , LongTermMemoryParams is no longer a class. It is an Annotated discriminated union.Calling this type alias as a constructor raises TypeError: 'types.UnionType' object is not callable under Python 3.12, so the evaluation entry point crashes at startup.
Describe the solution you'd like
Use the concrete backend params class directly when constructing LongTermMemory in
init_memmachine_params. For the declarative backend, replace:with:
Describe alternatives you've considered
Making LongTermMemoryParams callable (e.g. a factory/dispatch over the union based on the backend discriminator) so existing call sites keep working. This would require upstream changes in the
long_term_memorymodule rather than a one-line fix inagent_utils.py.Additional context
No response