`agent_memory` list index out of range

Open
#273 9 comments 3 reactions 0 assignees View on GitHub

@cyyecao-lappland is already working on this.

Since Aug 20, 2026.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python, streamlit
Domain
ai, backend

Research direction

Start by reproducing the failure with the server and Streamlit commands in the issue, then inspect _generate_references_from_graph in mindsearch/agent/mindsearch_agent.py and the traceback's agent.memory data. Done means the query completes without the list index error and reference generation handles the observed memory contents.

Written by the indexing model from the issue text.

Description

Steps to reproduce

Launch server:

python -m mindsearch.app --lang en --model_format gpt4 --search_engine DuckDuckGoSearch --asy 

Launch streamlit:

streamlit run frontend/mindsearch_streamlit.py

Type in a query and get this error:

Traceback (most recent call last):
  File "/Users/cxrh/Documents/GitHub/MindSearch/mindsearch/app.py", line 142, in generate
    async for message in agent(inputs, session_id=session_id):
  File "/Users/cxrh/Documents/GitHub/MindSearch/mindsearch/agent/streaming.py", line 50, in __call__
    async for response_message in self.forward(*message, session_id=session_id, **kwargs):
  File "/Users/cxrh/Documents/GitHub/MindSearch/mindsearch/agent/mindsearch_agent.py", line 189, in forward
    reference, references_url = _generate_references_from_graph(gen.ret[1])
  File "/Users/cxrh/Documents/GitHub/MindSearch/mindsearch/agent/mindsearch_agent.py", line 41, in _generate_references_from_graph
    assert data_item["memory"]["agent.memory"][2]["sender"].endswith("ActionExecutor")
IndexError: list index out of range
Dominant language
JavaScript
Stars
7k
Forks
684
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InternLM/MindSearch

All issues in InternLM/MindSearch

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.