Skip to content

Conversation

@TheovanKraay
Copy link
Contributor

Overview

added cosmos db sample for checkpointer in short term memory section

Type of change

Update existing documentation

Related issues/PRs

N/A

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed
  • I have gotten approval from the relevant reviewers
  • (Internal team members only / optional) I have created a preview deployment using the Create Preview Branch workflow

Additional notes

There are actually many checkpointer store implementations now: https://pypi.org/search/?q=langgraph-checkpoint. Perhaps this doc could further be revised to make that clear. However, I cannot comment authoritatively on those (I am PM in Cosmos DB engineering team). so just adding the Cosmos DB sample in addition to the existing Postgres sample.

Copilot AI review requested due to automatic review settings November 6, 2025 12:16
@github-actions github-actions bot added langchain For docs changes to LangChain oss labels Nov 6, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation for using Azure Cosmos DB as a checkpoint saver for LangChain agents, providing an alternative to the existing PostgreSQL example.

Key changes:

  • Added installation instructions and Python code example for the langgraph-checkpoint-cosmosdb package
  • Included configuration details for authentication and database/container setup
  • Added a note about sync/async support and RBAC credentials

@TheovanKraay TheovanKraay force-pushed the cosmos-db-doc-updates-v2 branch 2 times, most recently from 1cdc77a to 1849682 Compare November 10, 2025 21:14
@TheovanKraay
Copy link
Contributor Author

TheovanKraay commented Nov 10, 2025

Note: the earlier code snippet commit suggestion with the context manager pattern (with CosmosDBSaver(...) as checkpointer) will not work because the CosmosDBSaver class does not implement __enter__ and __exit__ methods on its main __init__() constructor - only the separate from_conn_info() class method returns a context manager.

The standard usage pattern is direct instantiation (checkpointer = CosmosDBSaver(database_name="...", container_name="...")) followed by passing it to the graph's compile method.

TheovanKraay and others added 4 commits November 11, 2025 15:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@TheovanKraay TheovanKraay force-pushed the cosmos-db-doc-updates-v2 branch from 1849682 to 60b2350 Compare November 11, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

langchain For docs changes to LangChain oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant