hsml.deployment_memory_config #
DeploymentMemoryConfig #
Memory an agent deployment is given, for an agent that configures none itself.
The agent SDK applies this only when the agent passed no memory store of its own, so code always wins: an agent that built one keeps it, and one that deliberately passed none stays without memory.
The policy names the tiers: working memory is the conversation kept server-side, short-term memory folds older turns into a rolling summary, semantic memory keeps what the agent decides to remember across conversations, and episodic memory searches what was said before. All of them are on unless you say otherwise, except the summarizer, which has nothing to fold with until a provider is named.
ms = project.get_model_serving()
agent = ms.deploy_agent(
entry="my_agent.py",
memory=DeploymentMemoryConfig(
summarize={"provider": "hopsworks", "deployment": "my-llm"},
long_term=True,
),
)
| PARAMETER | DESCRIPTION |
|---|---|
enabled | Whether the deployment configures memory at all. Defaults to True. TYPE: |
summarize | Which model folds older turns into the rolling summary, as a dict with a |
long_term | Whether the agent keeps what it decides to remember across conversations. This is the store the TYPE: |
search | Semantic search over the person's past conversations, as a dict naming an embedding |
summarize_after_messages | Messages before older turns are folded. TYPE: |
keep_recent_messages | Messages left verbatim by a fold. Must be smaller than TYPE: |
message_retention_days | Days a recorded conversation is kept. None keeps it. TYPE: |
max_messages | How many of a conversation's messages the agent is handed on a turn. The window the model reads, not a retention rule: older messages stay recorded and readable through the conversation routes. None leaves the agent SDK's own default. TYPE: |
enabled property writable #
Whether the deployment configures memory at all.
keep_recent_messages property writable #
Messages left verbatim by a fold.
long_term property writable #
Whether what the agent remembers is kept across conversations.
max_messages property writable #
How many of a conversation's messages the agent is handed on a turn.
message_retention_days property writable #
Days a recorded conversation is kept.
search property writable #
Semantic search over the person's past conversations.
summarize property writable #
Which model folds older turns into the rolling summary.
summarize_after_messages property writable #
Messages before older turns are folded.