Skip to content

fix(neptune): initialize _database to fix add_episode AttributeError#3

Closed
jhurliman wants to merge 1 commit into
mainfrom
fix/neptune-database-attr
Closed

fix(neptune): initialize _database to fix add_episode AttributeError#3
jhurliman wants to merge 1 commit into
mainfrom
fix/neptune-database-attr

Conversation

@jhurliman

Copy link
Copy Markdown
Owner

Closes #1.

NeptuneDriver.__init__ never set the base GraphDriver._database attribute, but Graphiti.add_episode reads self.driver._database — so every add_episode against Neptune raised AttributeError: 'NeptuneDriver' object has no attribute '_database'.

Neptune is a single graph with no named databases, so this defaults _database to '', consistent with get_default_group_id(GraphProvider.NEPTUNE) returning ''. The inherited with_database()/clone() (shallow copy reusing the same Neptune client) works unchanged.

Verified against Amazon Neptune Serverless + OpenSearch Serverless (graphiti-core 0.29.2): with this plus #2, add_episode/search succeed end-to-end.

…sode

NeptuneDriver.__init__ never sets the base GraphDriver._database attribute,
but Graphiti.add_episode reads driver._database (e.g.
`if group_id != self.driver._database:` when mapping a group_id to a database),
so any add_episode call raises:

    AttributeError: 'NeptuneDriver' object has no attribute '_database'

Neptune is a single graph with no named databases, so default _database to ''
— consistent with get_default_group_id(GraphProvider.NEPTUNE) returning ''.
The existing with_database()/clone() path (shallow copy reusing the same Neptune
client) then works unchanged.
@jhurliman

Copy link
Copy Markdown
Owner Author

Closing as redundant — upstream getzep/graphiti already covers this: PR getzep#1539 fixes both Neptune bugs (uninitialized _database + execute_query param nesting), and getzep#1568 fixes the params half. Tracking issue: getzep#1529 (added a current-main + Neptune Serverless validation comment there).

@jhurliman jhurliman closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NeptuneDriver does not initialize _database, breaking add_episode (AttributeError)

1 participant