Skip to content
7 changes: 5 additions & 2 deletions src/oss/langchain/short-term-memory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ const checkpointer = PostgresSaver.fromConnString(DB_URI);
```
:::

<Note>
For more checkpointer options including SQLite, Postgres, and Azure Cosmos DB, see the [list of checkpointer libraries](/oss/langgraph/persistence#checkpointer-libraries) in the Persistence documentation.
</Note>

## Customizing agent memory

Expand Down Expand Up @@ -679,7 +682,7 @@ def update_user_info(
runtime: ToolRuntime[CustomContext, CustomState],
) -> Command:
"""Look up and update user info."""
user_id = runtime.context.user_id
user_id = runtime.context.user_id
name = "John Smith" if user_id == "user_123" else "Unknown user"
return Command(update={ # [!code highlight]
"user_name": name,
Expand All @@ -704,7 +707,7 @@ agent = create_agent(
model="gpt-5-nano",
tools=[update_user_info, greet],
state_schema=CustomState, # [!code highlight]
context_schema=CustomContext,
context_schema=CustomContext,
)

agent.invoke(
Expand Down
1 change: 1 addition & 0 deletions src/oss/langgraph/persistence.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,7 @@ Under the hood, checkpointing is powered by checkpointer objects that conform to
* `langgraph-checkpoint`: The base interface for checkpointer savers (@[`BaseCheckpointSaver`]) and serialization/deserialization interface (@[`SerializerProtocol`]). Includes in-memory checkpointer implementation (@[`InMemorySaver`]) for experimentation. LangGraph comes with `langgraph-checkpoint` included.
* `langgraph-checkpoint-sqlite`: An implementation of LangGraph checkpointer that uses SQLite database (@[`SqliteSaver`] / @[`AsyncSqliteSaver`]). Ideal for experimentation and local workflows. Needs to be installed separately.
* `langgraph-checkpoint-postgres`: An advanced checkpointer that uses Postgres database (@[`PostgresSaver`] / @[`AsyncPostgresSaver`]), used in LangSmith. Ideal for using in production. Needs to be installed separately.
* `langgraph-checkpoint-cosmosdb`: An implementation of LangGraph checkpointer that uses Azure Cosmos DB (@[`CosmosDBSaver`] / @[`AsyncCosmosDBSaver`]). Ideal for using in production with Azure. Supports both sync and async operations. Needs to be installed separately.
:::

:::js
Expand Down