feat(agent-memory): add agent memory client module#101
Merged
cassiofariasmachado merged 1 commit intoMay 11, 2026
Conversation
cassiofariasmachado
approved these changes
May 11, 2026
Member
cassiofariasmachado
left a comment
There was a problem hiding this comment.
Great work and contribution!
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.
Description
Adds the
agent_memorymodule — a client for the SAP HANA Agent Memory service that lets AI agents persist and retrieve memories and conversation messages. Key capabilities:FilterDefinitionfor substring filtering oncontentandmetadatafields, with safe single-quote escaping to prevent OData injection/etc/secrets/appfnd/hana-agent-memory/default/) with environment variable fallback (CLOUD_SDK_CFG_HANA_AGENT_MEMORY_DEFAULT_*)record_metricsdecoratorType of Change
How to Test
Install the SDK and configure credentials:
Run unit tests:
Verify key scenarios covered by unit tests:
test_client.py— all CRUD, search, and retention operations; validation errors; paginationtest_config.py— credential loading from mounted volume and environment variablestest_http_transport.py— OAuth2 token acquisition, retry, error mappingtest_odata.py— filter expression building and single-quote injection escapingtest_models.py—Memory,Message,SearchResult,RetentionConfigserializationSmoke test with the public API:
Checklist
user-guide.md) in the module directoryAdditional Notes
requests-oauthlibfor OAuth2 client-credentials flow; token refresh is handled automatically.FilterDefinition.targetis validated against an explicit allowlist at call time; duplicate targets in a single filter list are intentionally allowed (AND-combined) so callers can express multi-value substring checks on the same field.py.typed/__all__/user-guide.mdconventions as existing SDK modules.