Skip to content

Conversation

@KDKHD
Copy link
Member

@KDKHD KDKHD commented Jul 22, 2025

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

This PR introduces a new shared platform package containing a langgraph checkpointer backed by elastic search.

Considerations

An alternative approach explored is building the langgraph checkpointer directly inside of the langgraph repo. We chose not to do that, as we would first like to ensure our implementation is mature enough for public use before open-sourcing it to the LangGraph community.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@KDKHD KDKHD marked this pull request as ready for review July 22, 2025 17:00
@kibanamachine kibanamachine requested a review from a team July 22, 2025 17:00
@kibanamachine
Copy link
Contributor

kibanamachine commented Jul 22, 2025

Dependency Review Bot Analysis 🔍

Found 1 new third-party dependencies:

Package Version Vulnerabilities Health Score
@langchain/langgraph-checkpoint ~0.0.17 🔴 C: 0, 🟠 H: 0, 🟡 M: 0, 🟢 L: 0 @langchain/langgraph-checkpoint

Self Checklist

To help with the review, please update the PR description to address the following points for each new third-party dependency listed above:

  • Purpose: What is this dependency used for? Briefly explain its role in your changes.
  • Justification: Why is adding this dependency the best approach?
  • Alternatives explored: Were other options considered (e.g., using existing internal libraries/utilities, implementing the functionality directly)? If so, why was this dependency chosen over them?
  • Existing dependencies: Does Kibana have a dependency providing similar functionality? If so, why is the new one preferred?

Thank you for providing this information!

@KDKHD KDKHD added Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels labels Jul 22, 2025
@KDKHD
Copy link
Member Author

KDKHD commented Jul 22, 2025

@elasticmachine merge upstream

@KDKHD KDKHD added release_note:skip Skip the PR/issue when compiling release notes v9.2.0 labels Jul 22, 2025
@KDKHD
Copy link
Member Author

KDKHD commented Jul 22, 2025

Checklist @langchain/langgraph-checkpoint

  • Purpose: What is this dependency used for? Briefly explain its role in your changes.

The newly added dependency allows us to implement a langgraph checkpointer backed by Elastic Search. An Elastic search checkpointer allows us to develop human-in-the-loop flows using the langgraph framework.

  • Justification: Why is adding this dependency the best approach?

The dependency needed to be added in order to support building a langgraph checkpointer backed by Elastic Search.

  • Alternatives explored: Were other options considered (e.g., using existing internal libraries/utilities, implementing the functionality directly)? If so, why was this dependency chosen over them?

Since we are creating a new implementation of BaseCheckpointSaver, and BaseCheckpointSaver is part of the @langchain/langgraph-checkpoint package, this is the only approach.

  • Existing dependencies: Does Kibana have a dependency providing similar functionality? If so, why is the new one preferred?

No, this is new functionality in Kibana.

@KDKHD KDKHD changed the title [Langgraph Checkpointer] Introduce langgraph checkpointer backed by ES database [Langgraph Checkpoint Saver] Introduce langgraph checkpoint saver backed by ES database Jul 22, 2025
kibanamachine and others added 6 commits July 22, 2025 17:46
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
@KDKHD KDKHD force-pushed the feature/langgraph-checkpointer branch from 7df0245 to e4c3a1e Compare July 23, 2025 07:31
Comment on lines +300 to +301
const [checkpointType, serializedCheckpoint] = this.serde.dumpsTyped(checkpoint);
const [metadataType, serializedMetadata] = this.serde.dumpsTyped(metadata);
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to serialize the data because the BaseCheckpointSaver has unknown types defined for checkpoint and metadata. This implies that the shape of these objects can vary, and only through serialization can we ensure the data is persisted correctly.

import { Checkpoint, CheckpointTuple, uuid6 } from '@langchain/langgraph-checkpoint';

// Define test checkpoints
const checkpoint1: Checkpoint = {
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@elena-shostak elena-shostak left a comment

Choose a reason for hiding this comment

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

@langchain/langgraph-checkpoint dependency LGTM ✅

@KDKHD
Copy link
Member Author

KDKHD commented Jul 29, 2025

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

merge conflict between base and head

@KDKHD KDKHD enabled auto-merge (squash) July 29, 2025 12:02
@KDKHD
Copy link
Member Author

KDKHD commented Jul 31, 2025

@elasticmachine merge upstream

@KDKHD KDKHD merged commit a077f28 into elastic:main Jul 31, 2025
14 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 4, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228997 locally
cc: @KDKHD

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228997 locally
cc: @KDKHD

delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
…ked by ES database (elastic#228997)

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

This PR introduces a new shared platform package containing a langgraph
checkpointer backed by elastic search.

### Considerations

An alternative approach explored is building the langgraph checkpointer
directly inside of the [langgraph
repo](https://github.com/langchain-ai/langgraphjs). We chose not to do
that, as we would first like to ensure our implementation is mature
enough for public use before open-sourcing it to the LangGraph
community.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [X] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228997 locally
cc: @KDKHD

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228997 locally
cc: @KDKHD

@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 228997 locally
cc: @KDKHD

@KDKHD KDKHD added the backport:skip This PR does not require backporting label Aug 11, 2025
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 11, 2025
@KDKHD KDKHD removed the backport:version Backport to applied version labels label Aug 11, 2025
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…ked by ES database (elastic#228997)

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

This PR introduces a new shared platform package containing a langgraph
checkpointer backed by elastic search.

### Considerations

An alternative approach explored is building the langgraph checkpointer
directly inside of the [langgraph
repo](https://github.com/langchain-ai/langgraphjs). We chose not to do
that, as we would first like to ensure our implementation is mature
enough for public use before open-sourcing it to the LangGraph
community.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [X] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants