crewai - ✅(Solved) Fix [FEATURE] Kalki as a high-performance long-term memory checkpointer for agentic applications. [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#4644Fetched 2026-04-08 00:40:56
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×2labeled ×2cross-referenced ×1mentioned ×1

Fix Action

Fixed

PR fix notes

PR #4732: feat(flow): add Kalki-backed persistence checkpointer (#4644)

Description (problem / solution / changelog)

Summary

This PR implements issue #4644.

  • Scope: [FEATURE] Kalki as a high-performance long-term memory checkpointer for agentic applications.
  • Source branch: yuweuii:codex/issue-4644
  • Commit: d589a408

Linked Issue

Closes #4644

<!-- CURSOR_SUMMARY -->

[!NOTE] Medium Risk Adds a new non-default persistence backend that checkpoints and restores flow state (including async pending-feedback resume markers) via external gRPC service calls, which could affect flow recovery behavior and introduce dependency/compatibility issues with Kalki protos.

Overview Adds an optional Kalki-backed flow persistence backend (KalkiFlowPersistence) that checkpoints flow state to a running Kalki service via gRPC and restores the latest checkpoint by querying and timestamp-sorting stored log payloads.

The new backend also supports async human-feedback resume by writing pending-feedback markers and clearing them via an append-only tombstone entry, and it is exported from crewai.flow.persistence and documented in the Flows persistence guide with a usage example.

<sup>Written by Cursor Bugbot for commit 10e3c2c6a073f54bd3218bdd73623c828a90745a. This will update automatically on new commits. Configure here.</sup>

<!-- /CURSOR_SUMMARY -->

Changed files

  • docs/en/concepts/flows.mdx (modified, +17/-0)
  • lib/crewai/src/crewai/flow/persistence/__init__.py (modified, +2/-1)
  • lib/crewai/src/crewai/flow/persistence/kalki.py (added, +361/-0)
  • lib/crewai/tests/test_kalki_flow_persistence.py (added, +132/-0)
RAW_BUFFERClick to expand / collapse

Feature Area

Core functionality

Is your feature request related to a an existing bug? Please link it here.

Storage for agentic applications is an open problem. I see a lot of work arounds like creating timestamped markdown files, using graph like databases. These solutions are either too simplistic or too overkill. Models are continually evolving and are smart enough to understand linkages given enough context. They just need to be given the right context.

Kalki is my opinionated take on what a swarm of agents generating thousands of conversations needs.

  • Ability to quickly persist their state
  • Query contextual state extremely fast Benchmarks show that Kali can store and query thousands of conversations with single digit ms latency. Would appreciate the community taking a look.

I’d like to see Kalki be the backbone of all agentic applications.

https://github.com/sushrut141/kalki

Describe the solution you'd like

I'm happy to help integrate Kalki into crew AI.

Describe alternatives you've considered

No response

Additional context

No response

Willingness to Contribute

Yes, I'd be happy to submit a pull request

extent analysis

Fix Plan

To integrate Kalki into the crew AI system, we'll need to make the following changes:

  • Implement Kalki as a storage solution for agent state
  • Modify the agent code to use Kalki for persistence and querying
  • Integrate Kalki with the existing crew AI architecture

Example Code

Here's an example of how you might use Kalki to store and query agent state:

import kalki

# Initialize Kalki
kalki.init()

# Define an agent class
class Agent:
    def __init__(self, id):
        self.id = id
        self.state = {}

    def save_state(self):
        kalki.put(self.id, self.state)

    def load_state(self):
        self.state = kalki.get(self.id)

# Create an agent and save its state
agent = Agent(1)
agent.state['context'] = 'some context'
agent.save_state()

# Load the agent's state
agent.load_state()
print(agent.state)  # prints: {'context': 'some context'}

Verification

To verify that Kalki is working correctly, you can use the benchmarks provided in the Kalki repository to test its performance. You can also add logging and debugging statements to the agent code to ensure that it's correctly storing and querying state.

Extra Tips

  • Make sure to handle errors and exceptions properly when using Kalki
  • Consider adding a caching layer to improve performance
  • Review the Kalki documentation and code to ensure you're using it correctly and efficiently.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

crewai - ✅(Solved) Fix [FEATURE] Kalki as a high-performance long-term memory checkpointer for agentic applications. [1 pull requests, 2 comments, 3 participants]