MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / update_agent_core_memory

Method update_agent_core_memory

methods/letta/server/server.py:932–942  ·  view source on GitHub ↗

Update the value of a block in the agent's memory

(self, agent_id: str, label: str, value: str, actor: User)

Source from the content-addressed store, hash-verified

930 return response
931
932 def update_agent_core_memory(self, agent_id: str, label: str, value: str, actor: User) -> Memory:
933 """Update the value of a block in the agent's memory"""
934
935 # get the block id
936 block = self.agent_manager.get_block_with_label(agent_id=agent_id, block_label=label, actor=actor)
937
938 # update the block
939 self.block_manager.update_block(block_id=block.id, block_update=BlockUpdate(value=value), actor=actor)
940
941 # rebuild system prompt for agent, potentially changed
942 return self.agent_manager.rebuild_system_prompt(agent_id=agent_id, actor=actor).memory
943
944 def delete_source(self, source_id: str, actor: User):
945 """Delete a data source"""

Callers

nothing calls this directly

Calls 4

BlockUpdateClass · 0.90
get_block_with_labelMethod · 0.80
update_blockMethod · 0.45
rebuild_system_promptMethod · 0.45

Tested by

no test coverage detected