cpacker / MemGPT

Letta (fka MemGPT) is a framework for creating stateful LLM services.
https://letta.com
Apache License 2.0
11.85k stars 1.29k forks source link

AttributeError: 'AgentState' object has no attribute 'state' AND other weird behavior #1801

Open NovaBro opened 1 hour ago

NovaBro commented 1 hour ago

Describe the bug

  1. When I run "letta run" and select a previous agent through the CLI, I get the error "AttributeError: 'AgentState' object has no attribute 'state'"
  2. When I create an agent through the CLI, I cannot find it on the ADE. When I create an agent on the ADE, I cannot see it through the CLI

Please describe your setup

Installation

  1. I have created a python 3.12 virtual environment
  2. I then did pip install letta
  3. Followed the quickstart guide

Setup

  1. macOS 14.6.1, m1 chip,
  2. VSCODE
  3. Running letta though terminal
  4. Tried running the python stuff mentioned, but that has not worked for me either, (i assume that once this issue is fixed the python stuff will then work, one problem at a time)

Screenshots If applicable, add screenshots to help explain your problem. letta not showing up on both systems:

Screenshot 2024-09-29 at 3 21 44 PM Screenshot 2024-09-29 at 3 22 02 PM Screenshot 2024-09-29 at 3 22 51 PM

Letta Config [defaults] preset = memgpt_chat persona = sam_pov human = basic

[model] model = memgpt-openai model_endpoint = https://inference.memgpt.ai model_endpoint_type = openai context_window = 8192

[embedding] embedding_endpoint_type = hugging-face embedding_endpoint = https://embeddings.memgpt.ai embedding_model = BAAI/bge-large-en-v1.5 embedding_dim = 1024 embedding_chunk_size = 300

[archival_storage] type = chroma path = /Users/williamzheng/.letta/chroma

[recall_storage] type = sqlite path = /Users/williamzheng/.letta

[metadata_storage] type = sqlite path = /Users/williamzheng/.letta

[version] letta_version = 0.1.16

[client] anon_clientid = user-e15c337c-32fd-4fd5-a6be-10e7e3b86f35


Local LLM details Unsure how to find the following information, if you need them please advise on how to get them:

NovaBro commented 1 hour ago

Here is the full error message:

(my_letta) (base) williamzheng@Williams-MacBook-Pro-258 MemGPT_Letta % letta run

? Would you like to select an existing agent? Yes ? Select agent: PassionateKitten

🔁 Using existing agent PassionateKitten Traceback (most recent call last): File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/bin/letta", line 10, in sys.exit(app()) ^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/typer/main.py", line 328, in call raise e File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/typer/main.py", line 311, in call return get_command(self)(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/typer/core.py", line 783, in main return _main( ^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/typer/core.py", line 225, in _main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/click/core.py", line 783, in invoke return __callback(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/typer/main.py", line 683, in wrapper return callback(**use_params) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/letta/cli/cli.py", line 495, in run printd("Agent state:", agent_state.state) ^^^^^^^^^^^^^^^^^ File "/Users/williamzheng/Documents/UmichFolder/2025 Fall Semester /Research 499/MemGPT_Letta/my_letta/lib/python3.12/site-packages/pydantic/main.py", line 856, in getattr raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}') AttributeError: 'AgentState' object has no attribute 'state'