feat(memory): expose get_session to client layer - #39
Open
Isuzu-ren wants to merge 1 commit into
Open
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
=======================================
Coverage ? 54.01%
=======================================
Files ? 95
Lines ? 7848
Branches ? 1210
=======================================
Hits ? 4239
Misses ? 3316
Partials ? 293 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Expose get_session from the HTTP service layer through dataplane, client, and session layers, matching the delete_session pattern. - dataplane.py: add get_session() returning SessionInfo via from_dict() - dataplane_async.py: add async get_session() - client.py: expose get_session() in MemoryClient - async_client.py: expose get_session() in AsyncMemoryClient - session.py: add get_info() convenience method; import SessionInfo - async_session.py: add async get_info() with _ensure_initialized()
Isuzu-ren
force-pushed
the
feature/get-session-api
branch
from
August 12, 2026 02:24
4d4655c to
6597edc
Compare
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
get_sessionfrom the HTTP service layer through to the dataplane and client layers, for both sync and async variantsget_info()convenience method toMemorySessionandAsyncMemorySessionthat retrievesSessionInfofor the current sessiondictresponse intoSessionInfoviafrom_dict(), consistent withcreate_memory_sessionget_info()calls_ensure_initialized()before querying, matching the pattern of other async session methodsChanged Files
src/agentarts/sdk/memory/inner/dataplane.pyget_session()with space_id/session_id validation, returnsSessionInfosrc/agentarts/sdk/memory/inner/dataplane_async.pyget_session(), identical to sync versionsrc/agentarts/sdk/memory/client.pyget_session()inMemoryClient, returnsSessionInfosrc/agentarts/sdk/memory/async_client.pyget_session()inAsyncMemoryClientsrc/agentarts/sdk/memory/session.pyget_info()convenience method; importSessionInfosrc/agentarts/sdk/memory/async_session.pyget_info()convenience method; importSessionInfoVerification
The get_session API was verified across all three access layers using a test script that creates a session, queries it via the new get_session or get_info method, and asserts the returned SessionInfo fields match the created session. MemoryClient.get_session() successfully retrieves SessionInfo with matching id, space_id, actor_id, and created_at fields. MemorySession.get_info() produces identical results through the convenience method. AsyncMemoryClient.get_session() and AsyncMemorySession.get_info() both complete without error, confirming that the async path correctly calls _ensure_initialized before querying and that the dataplane layer properly parses the raw dict response into SessionInfo via from_dict. All assertions pass, confirming end-to-end propagation from service layer through dataplane to client and session.