chore: update sleeptime verbiage everywhere (#1867)

This commit is contained in:
cthomas
2025-04-23 17:01:07 -07:00
committed by GitHub
parent 7605675f23
commit 923af54d0b
6 changed files with 15 additions and 19 deletions

View File

@@ -90,7 +90,7 @@ class VoiceAgent(BaseAgent):
# )
self.message_buffer_limit = message_buffer_limit
# self.message_buffer_min = message_buffer_min
self.offline_memory_agent = EphemeralMemoryAgent(
self.sleeptime_memory_agent = EphemeralMemoryAgent(
agent_id=agent_id, openai_client=openai_client, message_manager=message_manager, agent_manager=agent_manager, actor=actor
)
@@ -372,7 +372,7 @@ class VoiceAgent(BaseAgent):
return f"Failed to call tool. Error: {e}", False
async def _recall_memory(self, query, agent_state: AgentState) -> None:
results = await self.offline_memory_agent.step([MessageCreate(role="user", content=[TextContent(text=query)])])
results = await self.sleeptime_memory_agent.step([MessageCreate(role="user", content=[TextContent(text=query)])])
target_block = next(b for b in agent_state.memory.blocks if b.label == self.summary_block_label)
self.block_manager.update_block(
block_id=target_block.id, block_update=BlockUpdate(value=results[0].content[0].text), actor=self.actor

View File

@@ -1,4 +0,0 @@
I am an expert memory agent that can do the following:
- Consolidate memories into more concise blocks
- Identify patterns in user behavior
- Make inferences based on the memory

View File

@@ -0,0 +1,5 @@
I am an expert conversation memory agent that can do the following:
- Consolidate memories into more concise blocks
- Identify patterns in user behavior
- Make inferences based on the memory
I manage the memory blocks such that they contain everything that is important about the conversation.

View File

@@ -766,12 +766,7 @@ class SyncServer(Server):
memory_blocks=[
CreateBlock(
label="memory_persona",
value=(
"I am an expert conversation memory manager. "
"I manage the memory blocks such that they "
"contain everything that is important about "
"the conversation."
),
value=get_persona_text("sleeptime_memory_persona"),
),
],
llm_config=main_agent.llm_config,

View File

@@ -240,13 +240,13 @@ async def test_sleeptime_edit(server, actor):
agent_type="sleeptime_agent",
memory_blocks=[
CreateBlock(
label="persona",
label="human",
value=get_human_text(DEFAULT_HUMAN),
limit=2000,
),
CreateBlock(
label="human",
value=get_persona_text("offline_memory_persona"),
label="memory_persona",
value=get_persona_text("sleeptime_memory_persona"),
limit=2000,
),
CreateBlock(

View File

@@ -529,7 +529,7 @@ def test_send_message_async(client: LettaSDKClient, agent: AgentState):
def test_agent_creation(client: LettaSDKClient):
"""Test that block IDs are properly attached when creating an agent."""
offline_memory_agent_system = """
sleeptime_agent_system = """
You are a helpful agent. You will be provided with a list of memory blocks and a user preferences block.
You should use the memory blocks to remember information about the user and their preferences.
You should also use the user preferences block to remember information about the user's preferences.
@@ -555,13 +555,13 @@ def test_agent_creation(client: LettaSDKClient):
tool2 = client.tools.upsert_from_function(func=another_test_tool, tags=["test"])
# Create test blocks
offline_persona_block = client.blocks.create(label="persona", value="persona description", limit=5000)
sleeptime_persona_block = client.blocks.create(label="persona", value="persona description", limit=5000)
mindy_block = client.blocks.create(label="mindy", value="Mindy is a helpful assistant", limit=5000)
# Create agent with the blocks and tools
agent = client.agents.create(
name=f"test_agent_{str(uuid.uuid4())}",
memory_blocks=[offline_persona_block, mindy_block],
memory_blocks=[sleeptime_persona_block, mindy_block],
model="openai/gpt-4o-mini",
embedding="openai/text-embedding-ada-002",
tool_ids=[tool1.id, tool2.id],
@@ -575,7 +575,7 @@ def test_agent_creation(client: LettaSDKClient):
assert agent.id is not None
# Verify all memory blocks are properly attached
for block in [offline_persona_block, mindy_block, user_preferences_block]:
for block in [sleeptime_persona_block, mindy_block, user_preferences_block]:
agent_block = client.agents.blocks.retrieve(agent_id=agent.id, block_label=block.label)
assert block.value == agent_block.value and block.limit == agent_block.limit