MemGPT: ValueError: 'system' not found in provided AgentState
People,
My first experiment with creating an agent (I am up to my fifth now so this error reporting is just for academic interest or in case it is useful) - otherwise using the default setup:
Describe the bug See the output below
Please describe your setup
-
MemGPT version
- What is the output of
memgpt version? (eg “0.2.4”) 0.3.0
- What is the output of
-
How did you install memgpt?
pip install pymemgpt
-
Describe your setup
-
What’s your OS Fedora Linux
-
How are you running
memgpt? tmux Terminal
-
I can’t remember what the chat was about when this happened but now whenever I try to chat to this agent, I get the following straight away:
Using existing agent phi_rho_01
Traceback (most recent call last):
File "/usr/local/bin/memgpt", line 8, in <module>
sys.exit(app())
^^^^^
File "/usr/local/lib/python3.11/site-packages/typer/main.py", line 328, in __call__
raise e
File "/usr/local/lib/python3.11/site-packages/typer/main.py", line 311, in __call__
return get_command(self)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/typer/core.py", line 778, in main
return _main(
^^^^^^
File "/usr/local/lib/python3.11/site-packages/typer/core.py", line 216, in _main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/typer/main.py", line 683, in wrapper
return callback(**use_params) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/memgpt/cli/cli.py", line 543, in run
memgpt_agent = Agent(agent_state, interface=interface())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/memgpt/agent.py", line 184, in __init__
raise ValueError(f"'system' not found in provided AgentState")
ValueError: 'system' not found in provided AgentState
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 3
- Comments: 24 (4 by maintainers)
Hi Sarah, thanks for jumping in.
There isn’t one problematic agent. Any agent will generate the error.
When prompted with “Would you like to select an existing agent?”, it doesn’t matter if I select Y or N. Y triggers the attached error. N creates a new agent, then triggers the same error, adding another MemGPT-generated agent to the list. There are three now (see attached).
Subsequent selection of any of the newly generated agents triggers the same error. This I don’t understand.
Reinstalling doesn’t fix anything, suggesting I am failing to delete the troublesome referrence somewhere. Noob alert 😃
I ran memgpt run --debug as instructed (see attached). ~/.memgpt/logs/MemGPT.log is empty.
philiprhoades has been able to reinstall successfully, repeatedly, to get past this rooadblock. He should be waking up in Australia soon 😃
Thank you both for your interst and assistance. This is valuable learning for me.
Much appreciated.
240225.1931.01 - Terminal Saved Output.txt
MemGPT.log
I’m still having this same issue. Version 0.3.3. Running
memgpt quickstart–>memgpt run-->y--> errorSame here. just set it up for ollama/local use, and I get this error straight when I run
memgpt run.philiprhoades,
Appreciate you sharing your experience. I can’t seem to get a clean install, or find another solution anywhere online. I must be missing a file or database entry somewhere?
I delete all of the files identified in the error message (see below), and all the memgpt folders I can find (see below), then force reinstall. On first memgpt run, the error persists. It just won’t die 😃
How do you ensure you get a clean install when you do it? Appreciate your time with this.
Thanks!
Deleted folders: ~/.memgpt (including chroma and sqlite.db) /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/memgpt
Deleted files: /Library/Frameworks/Python.framework/Versions/3.11/bin/memgpt /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/typer/main.py /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/typer/core.py /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/click/core.py /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/memgpt/cli/cli.py /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/memgpt/presets/presets.py
pergunar,
On 2024-02-26 04:35, pergunar wrote: . ,
Yes, I think that happened to me as well - one reason (not the main one) why I keep doing a clean of the DBs and starting from scratch.
That is what I have been inclined to do as well . .
Well for my use case doing a clean install is quick and frequently necessary - I need to be able to replicate issues that need fixing - to help develop a system that does what I want - as I gradually increase the amount of information my chatbot needs to know about and can respond safely to without hallucinating . .
P.
– Philip Rhoades
PO Box 896 Cowra NSW 2794 Australia E-mail: @.***
Thank you both for the quick and kind assistance!
Successfully removed ~/.memgpt/chroma and ~/.memgpt/sqlite.db files without difficulty, but no resolution. Terminal output attached.
If it helps, I was using MemGPT successfully using the default LLM for some time. Adding and removing agents, personas, humans, without difficulty. Powerful tool, very smooth, awesome! Thank you for developing and upporting this project.
Then I pointed MemGPT to use Ollama locally. This worked, but the results were not as fast or smooth as the default LLM, so I tried going back to the default configuration. That’s when I started getting this error. I believe this was the sequence for another user having the same problem.
If I can get the default configuration working again, I will just stick with it. Any other thoughts? Or tips for wiping completely and doing a clean install?
Thanks!
240225 - Terminal Saved Output.txt