Skip to content

feat(graph_builder): add retry mechanism for Zep Cloud connection failures#214

Closed
ChinmayShringi wants to merge 1 commit intomainfrom
feat/zep-retry-mechanism
Closed

feat(graph_builder): add retry mechanism for Zep Cloud connection failures#214
ChinmayShringi wants to merge 1 commit intomainfrom
feat/zep-retry-mechanism

Conversation

@ChinmayShringi
Copy link
Owner

Description

Adds automatic retry mechanism to handle transient network errors when connecting to Zep Cloud API. This prevents graph build failures caused by temporary connection issues such as "Connection reset by peer" (errno 54).

The retry logic uses exponential backoff (2s, 4s, 6s) and provides detailed progress feedback to users.

Changes

  • Added retry logic (max 3 attempts) to create_graph() method in graph_builder.py
  • Added retry logic to set_ontology() method for robust ontology configuration
  • Added retry logic to add_text_batches() method for batch data uploads
  • Implemented exponential backoff strategy with detailed console logging
  • Added progress messages showing retry attempts and wait times

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Testing

  • Manually tested with unstable network conditions
  • Verified retry mechanism triggers on connection failures
  • Confirmed successful graph creation after transient network errors
  • Tested with various network interruption scenarios

Related Issue

Related to #60 - Improves robustness when connecting to Zep Cloud API

Additional Notes

This change is backward compatible and doesn't modify the API interface. The retry mechanism is transparent to users and only activates when network errors occur.


Original PR: 666ghj/MiroFish#131
Original Author: @EuanTop

@ChinmayShringi ChinmayShringi added the enhancement New feature or request label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant