DOC: Incorrect import statement
envgap__langchain-ai__langgraph-5781
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
220314b53a960964a82657451b846f3a7cb2f348- Manifest
docs/pyproject.toml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
langchain-ai/langgraph #5781 · read the original issue
### Issue with current documentation:
<img width="1682" height="830" alt="Image" src="https://github.com/user-attachments/assets/48a18f1a-83d4-4ef9-b6de-f5f9c7782e11" />
It should have imported InMemorySaver instead of MemorySaver
### Idea or request for content:
_No response_
<details>
<summary>Agent Context</summary>
<open-swe-do-not-edit-task-plan>
{
"tasks": [
{
"id": "1cfc4c53-14ac-45a9-a9bd-bb9b7e5763c5",
"taskIndex": 0,
"request": "[original issue]\n**DOC: Incorrect import statement**\n### Issue with current documentation:\n\n<img width=\"1682\" height=\"830\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/48a18f1a-83d4-4ef9-b6de-f5f9c7782e11\" />\n\nIt should have imported InMemorySaver instead of MemorySaver\n\n### Idea or request for content:\n\n_No response_",
"title": "Fix incorrect import statement in documentation tutorial",
"createdAt": 1754059461009,
"completed": true,
"planRevisions": [
{
"revisionIndex": 0,
"plans": [
{
"index": 0,
"plan": "**Fix the incorrect import statement in the Python code block** - In `/home/daytona/langgraph/docs/docs/tutorials/get-started/3-add-memory.md` at line 20, change `from langgraph.checkpoint.memory import MemorySaver` to `from langgraph.checkpoint.memory import InMemorySaver` to match the usage on line 22 where `InMemorySaver()` is instantiated",
"completed": true,
"summary": "**Fixed incorrect import statement in Python documentation**\n\nSuccessfully corrected the import statement in `/home/daytona/langgraph/docs/docs/tutorials/get-started/3-add-memory.md` at line 20:\n\n- **Changed from:** `from langgraph.checkpoint.memory import MemorySaver`\n- **Changed to:** `from langgraph.checkpoint.memory import InMemorySaver`\n\nThis fix ensures consistency between the import statement and the actual usage on line 22 where `InMemorySaver()` is instantiated. The correction aligns with the codebase structure where `InMemorySaver` is the primary class name in Python, while `MemorySaver` is maintained as an alias for backwards compatibility. The JavaScript/TypeScript code blocks in the same file correctly use `MemorySaver`, so no changes were needed there.\n\nThe fix addresses the documentation inconsistency reported in the GitHub issue and ensures that Python developers following the tutorial will have the correct import statement that matches the actual usage."
},
{
"index": 1,
"plan": "**Run formatting and linting commands** - Navigate to the `docs` directory and run `make format` and `make lint` to ensure the documentation follows the project's formatting standards",
"completed": true,
"summary": "**Successfully ran formatting and linting commands in the docs directory**\n\nExecuted the required formatting and linting commands in `/home/daytona/langgraph/docs`:\n\n1. **Formatting command:** `make format-docs`\n - Successfully formatted 41 files with no changes needed (all files were already properly formatted)\n - Applied automatic fixes where needed\n - Result: \"All checks passed!\"\n\n2. **Linting command:** `make lint-docs` \n - Verified that all 41 files are properly formatted\n - Ran linting checks on the documentation\n - Result: \"All checks passed!\"\n\nBoth commands completed successfully with no errors or violations found. The documentation now follows the project's formatting standards. The corrected import statement from the previous task passed all formatting and linting checks, confirming that the fix was implemented correctly and maintains code quality standards."
}
],
"createdAt": 1754059461009,
"createdBy": "agent"
}
],
"activeRevisionIndex": 0,
"pullRequestNumber": 5797,
"completedAt": 1754059627496,
"summary": "The incorrect import statement in the Python tutorial documentation was fixed by changing `from langgraph.checkpoint.memory import MemorySaver` to `from langgraph.checkpoint.memory import InMemorySaver` to match the usage. Formatting and linting were run successfully in the docs directory, confirming the fix meets project standards. The change resolves the reported issue and maintains consistency across the documentation."
}
],
"activeTaskIndex": 0
}
</open-swe-do-not-edit-task-plan>
</details>04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]