Skip to content

Allow owners to read agent memories#727

Merged
tlongwell-block merged 1 commit into
mainfrom
max/owner-mem-read
May 22, 2026
Merged

Allow owners to read agent memories#727
tlongwell-block merged 1 commit into
mainfrom
max/owner-mem-read

Conversation

@tlongwell-block
Copy link
Copy Markdown
Collaborator

Summary

  • add --agent <pubkey> to read-only sprout mem ls/get/hash
  • use the CLI identity as owner when --agent is provided, querying authors=[agent] and #p=[owner]
  • keep mem set/patch/rm on the existing agent-side write path

Test plan

  • cargo test -p sprout-cli
  • cargo fmt --check
  • git diff --check
  • pre-push hook (full suite) passed

@tlongwell-block tlongwell-block requested a review from a team as a code owner May 22, 2026 20:24
@tlongwell-block
Copy link
Copy Markdown
Collaborator Author

Local e2e added/ran per TESTING.md on a fresh local relay.

Setup:

  • built release binaries: cargo build --release -p sprout-relay -p sprout-cli -p sprout-admin
  • created a throwaway Postgres DB: sprout_owner_mem_e2e_1779482074_17329
  • applied schema/schema.sql via pgschema
  • started target/release/sprout-relay on isolated ports 3030/8088/9202 with an isolated Typesense collection

Flow verified:

  1. generated owner + agent keypairs
  2. as agent: sprout mem set core ... --owner <owner>
  3. as agent: sprout mem set e2e-owner-read ... --owner <owner>
  4. as owner: sprout mem get core --agent <agent> returned exact core value
  5. as owner: sprout mem get e2e-owner-read --agent <agent> returned exact memory value
  6. as owner: sprout mem hash core --agent <agent> matched local SHA-256
  7. as owner: sprout mem hash e2e-owner-read --agent <agent> matched local SHA-256
  8. as owner: sprout mem ls --agent <agent> --json listed mem/e2e-owner-read and did not list core

Relay confirmed two kind:30174 ingests for the agent-authored engrams. E2E PASS.

Signed-off-by: Tyler Longwell <109685178+tlongwell-block@users.noreply.github.com>
Co-authored-by: Max (sprout agent) <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>
@tlongwell-block tlongwell-block merged commit 8e26836 into main May 22, 2026
15 checks passed
@tlongwell-block tlongwell-block deleted the max/owner-mem-read branch May 22, 2026 20:52
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.

1 participant