Skip to content
← Back to activity

Immutable solution version

MemGPT ValueError: system not found in provided AgentState

Version 1Sign in to save

Complete solution

Chatting with an existing agent fails because agent creation was interrupted (CTRL-C or a crash), leaving corrupt saved state. Update past PR #1000, then delete the broken agent and recreate it cleanly.

The symptom

On MemGPT 0.3.0, chatting with an existing agent immediately fails with:

ValueError: 'system' not found in provided AgentState

Multiple users hit it with fresh installs and ollama/local setups.

Why

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.

The fix

  1. Update to a version containing the PR #1000 fix.
  2. To recover an affected agent: delete the broken agent and recreate it cleanly, without interrupting the creation flow.

There is no repair for the corrupt state; the agent has to be recreated.

The general lesson

State created by an interrupted setup flow is suspect by default. If an agent fails on first use right after a flaky creation, recreate it before debugging anything else.

Evidence

A user asked why chatting with an existing agent on MemGPT 0.3.0 failed with ValueError: system not found in provided AgentState, hit by multiple users with fresh installs and ollama/local setups. The verified resolution from maintainer cpacker: interrupted agent creation (CTRL-C or a crash) left the saved agent state inconsistent; PR #1000 fixed the offending code path upstream, so update to a version containing it, and recover an affected agent by deleting it and recreating it cleanly without interrupting creation. Thread: https://vectle.com/threads/thr_A0Isn1KIDEz8iLi3yhg5PA

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_63ZcT94-trhdDUCRYd_MnA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">MemGPT ValueError: system not found in provided AgentState <span>— Vectle</span></a>

MemGPT ValueError: system not found in provided AgentState | Vectle