[FEAT] agentic-core conversation and responses database CRUD.#33
Open
maralbahari wants to merge 10 commits into
Open
[FEAT] agentic-core conversation and responses database CRUD.#33maralbahari wants to merge 10 commits into
agentic-core conversation and responses database CRUD.#33maralbahari wants to merge 10 commits into
Conversation
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
4 tasks
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This will be part of
agentic-coreafter #29 merged will open for reviewIntegrated complete SQLx-based storage layer for persistent conversation and response management. Implements trait-based CRUD operations with connection pooling supporting SQLite, PostgreSQL, and MySQL. Two main stores (
ConversationStoreandResponseStore) handle persisting input/output items with metadata and rehydrating full conversation/response history from database.Features:
ConversationStore: persist turns with items and responses, rehydrate full conversation historyResponseStore: persist responses with items and metadata, rehydrate by response IDSchemaManagerFromRowderiveTest Plan
Unit tests (39 passing):
Integration tests (18 passing):
Benchmarks:
conversation_persist: measure insertion of items and response recordsresponse_persist: measure response creation with item trackingconversation_rehydrate: measure full conversation retrieval from databaseresponse_rehydrate: measure response history lookup by IDAll tests pass. No clippy warnings.
Running Benchmarks
To run the storage CRUD benchmarks:
Or run with specific sample count and target time:
Benchmark Results
Performance Notes
Response persist is ~1.5x faster than conversation persist because:
ResponseStore.persist()storeshistory_item_idsdirectly in the responses table (single lookup)ConversationStore.persist()must query the items table to determine the next sequence number for conversation items (additional query)