Skip to content

Commit

Permalink
remove memory
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders committed Nov 7, 2024
1 parent fe31fca commit a083030
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions examples/docs/memory.py
Original file line number Diff line number Diff line change
@@ -1,25 +0,0 @@
from letta import BasicBlockMemory, create_client

client = create_client()


human_block = client.create_block(label="human", value="Name: Sarah")

sad_persona_block = client.create_block(label="persona", value="You are a sad and negative assistant :(")
sad_block_memory = BasicBlockMemory(human=human_block, persona=sad_persona_block)


happy_persona_block = client.create_block(label="persona", value="You are a happy and positive assistant!")
happy_block_memory = BasicBlockMemory(human=human_block, persona=happy_persona_block)

happy_agent = client.create_agent(name="happy_agent", memory=happy_block_memory)
sad_agent = client.create_agent(name="sad_agent", memory=sad_block_memory)

# Update the shared memory block (human) for happy agent
response = client.send_message(agent_id=happy_agent.id, role="user", message="my name is actually Charles")

# Use updated information
response = client.send_message(agent_id=sad_agent.id, role="user", message="whats my name?")


# creating block templates

0 comments on commit a083030

Please sign in to comment.