-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Langgraph Checkpoint Saver] Introduce langgraph checkpoint saver backed by ES database #228997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@elasticmachine merge upstream |
…ana into feature/langgraph-checkpointer
Checklist @langchain/langgraph-checkpoint
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.
The dependency needed to be added in order to support building a langgraph checkpointer backed by Elastic Search.
Since we are creating a new implementation of BaseCheckpointSaver, and BaseCheckpointSaver is part of the @langchain/langgraph-checkpoint package, this is the only approach.
No, this is new functionality in Kibana. |
…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'
7df0245 to
e4c3a1e
Compare
| const [checkpointType, serializedCheckpoint] = this.serde.dumpsTyped(checkpoint); | ||
| const [metadataType, serializedMetadata] = this.serde.dumpsTyped(metadata); |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test adapted from sample test in langgraph repo https://github.com/langchain-ai/langgraphjs/blob/4be3c418cbe3493522bdf761b541bf51a1f9faf6/libs/checkpoint-mongodb/src/tests/checkpoints.int.test.ts
elena-shostak
left a comment
There was a problem hiding this 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 ✅
…ibana into feature/langgraph-checkpointer
|
@elasticmachine merge upstream |
|
merge conflict between base and head |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
|
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…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>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…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>
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.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*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.