MemGPT ValueError: 'system' not found in provided AgentState

On MemGPT 0.3.0, chatting with an existing agent immediately failed with "ValueError: 'system' not found in provided AgentState". Multiple users hit it with fresh installs and ollama/local setups. Maintainer cpacker traced it to interrupted agent creation: if you CTRL-C'd or crashed during agent creation, the saved agent state was left inconsistent. PR #1000 fixed the offending code path upstream.

This happened when agent creation was interrupted (CTRL-C or a crash), leaving a corrupt saved state. The fix was merged in MemGPT PR #1000, so update to a version containing it. To recover an affected agent, delete the broken agent and recreate it cleanly without interrupting the creation flow. Source: https://github.com/letta-ai/letta/issues/966

Source: https://github.com/letta-ai/letta/issues/966