Skip to content

feat(core): memory loop and child mailboxes on uteke rooms (#422, 2/3) - #425

Merged
ajianaz merged 1 commit into
developfrom
feat/memory-rooms
Oct 26, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/memory-rooms

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

What

The memory loop (--memory uteke) and the child-agent mailboxes move from uteke namespaces to uteke rooms. Part 2 of 3 of #422.

Why

uteke 0.21 deprecates namespaces: every write with --namespace prints a warning, and they will be removed in a future 0.x. Rooms are the replacement. Without this, the memory loop and child-agent results break the day uteke drops namespaces.

Changes

  • tole-core/src/memory.rs
    • MemoryConfig.namespace → room (tole-core API change, noted in CHANGELOG for 0.9.0).
    • Recall: uteke room recall --limit N --json -- <room> <query>. The parser accepts both payload shapes: flat {content, score} and room-with-query {memory: {...}, score}.
    • Legacy fallback: while the room is empty, recall the namespace of the same name (memory written before this change). Soft: if uteke no longer has namespaces, the result is simply empty.
    • Remember: --room <room> instead of --namespace.
  • tole-core/src/agents.rs: mailbox cleanup forgets each memory of room agent-<id> (forget --confirm -- <id>; deleting a room only unlinks its memories), deletes the room (room delete --confirm), then cleans the legacy namespace (now with --limit 1000; the old listing stopped at 20). The room still comes only from the validated agent id, never from meta.json.
  • main.rs: messages and docs say room; TOLE_MEMORY_NAMESPACE keeps its name and now overrides the room.
  • README (memory loop, env table) and CHANGELOG.

Testing

  • Unit tests: flat and nested payload parsing (and a hit without content still fails the batch, feat(memory): injection hygiene for the uteke integration — bounded, deduped, no silent fallback #384); fake-binary e2e for recall argv (room recall … -- repo-tole <query>, a leading-hyphen query stays positional); remember uses --room and never --namespace; an empty room falls back to the legacy namespace, and a failing legacy recall is soft.
  • Against the real uteke 0.21.1 on throwaway stores: remember --room creates the room; room recall with and without a query (both shapes); a missing room returns []; the forget-by-id → room delete cleanup leaves nothing behind.
  • cargo fmt, cargo clippy --workspace --all-targets -- -D warnings, cargo clippy -p tole-core --no-default-features --tests, bare-profile clippy, cargo test --workspace (all green); cora review --staged: No issues found.

Not covered: a live memory-loop session against the owner's real (remote) uteke store, deliberately not touched.

uteke 0.21 deprecates namespaces in favour of rooms. The memory loop now remembers with --room repo-<dir> and recalls with uteke room recall; while the room is empty it falls back (softly) to the legacy namespace of the same name, so memory from earlier tole versions is still found. Child-agent mailboxes are rooms (agent-<id>); consuming one forgets its memories (forget --confirm), deletes the room and cleans any legacy namespace. MemoryConfig.namespace is renamed room.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 70701de into develop Oct 26, 2026
16 checks passed
@ajianaz
ajianaz deleted the feat/memory-rooms branch October 26, 2026 05:48
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