Skip to content

🏠 Feature: Room-based collaborative memory for multi-agent discussions #286

Closed

Description

@ajianaz

Feature: Room-based Collaborative Memory

Problem

Uteke memories are isolated per-namespace (agent). When multiple agents collaborate (e.g., in a Discord thread), there is no way to:

  • Share memory context across agents in the same discussion
  • Let a new agent join mid-discussion and catch up
  • Track who contributed what in a multi-agent session
  • Continue a session later without losing context

Proposed Solution

Add --room flag for collaborative memory spaces. A room is a shared context identified by an external ID (e.g., Discord thread ID, meeting ID).

┌─────────────────────────────────────────────┐
│              ROOM (thread ID)                │
├─────────────────────────────────────────────┤
│  CTO stores:    "SurrealDB graph relevant"  │
│  Zeko stores:   "Qdrant health check OK"    │
│  BadSector:     "Risk: BSL license concern" │
│                                             │
│  ANY agent: uteke recall --room <id>        │
│  → returns ALL contributions from room      │
│                                             │
│  New agent joins:                           │
│  uteke recall --room <id> --summary         │
│  → condensed room context                   │
└─────────────────────────────────────────────┘

CLI Design

# Agent store memory in room
uteke remember "SurrealDB graph layer relevan untuk Uteke" \
  --room 1514528701109506199 \
  --author cto \
  --type analysis \
  --tags surrealdb,uteke,graph

# Agent recall room context (full)
uteke recall --room 1514528701109506199

# Agent recall room context (summary for new joiners)
uteke recall --room 1514528701109506199 --summary

# Filter by author within room
uteke recall --room 1514528701109506199 --author cto

# List all rooms
uteke room list

# Room stats
uteke room stats 1514528701109506199

Schema (Option B: New Tables)

CREATE TABLE rooms (
    id TEXT PRIMARY KEY,              -- room ID (e.g., Discord thread ID)
    title TEXT,                        -- optional room title
    namespace TEXT NOT NULL,           -- which agent created the room
    created_at TEXT NOT NULL,
    updated_at TEXT NOT NULL
);

CREATE TABLE room_memories (
    room_id TEXT NOT NULL REFERENCES rooms(id) ON DELETE CASCADE,
    memory_id TEXT NOT NULL REFERENCES memories(id) ON DELETE CASCADE,
    author TEXT NOT NULL,              -- who contributed
    role TEXT NOT NULL DEFAULT 'participant', -- participant | lead | observer
    joined_at TEXT NOT NULL DEFAULT (datetime('now')),
    PRIMARY KEY (room_id, memory_id)
);
CREATE INDEX idx_room_memories_room ON room_memories(room_id);
CREATE INDEX idx_room_memories_author ON room_memories(author);

Key Behaviors

  1. --room on remember: Stores memory in agent namespace AND links to room (dual-write). Memory is findable via personal recall AND room recall.
  2. --author on remember/recall: Tracks who contributed. Enables attribution and filtering.
  3. uteke recall --room <id>: Returns all memories linked to the room, sorted by time, with author attribution.
  4. uteke recall --room <id> --summary: Returns condensed room context — top-K diverse results using MMR-like selection to avoid redundancy.
  5. uteke room list: Lists all rooms the current namespace has participated in.
  6. uteke room stats <id>: Shows room metadata — participant count, memory count, last activity, authors.
  7. Cross-namespace recall: Room recall searches across ALL namespaces that contributed to the room.

Why v0.1.0

Implementation Order within v0.1.0

1. #249 Pluggable embedding (foundation)
2. THIS ISSUE — Room-based memory
3. #246 Graph relations (enhance room with traversal)
4. #248 MCP Server (expose room + graph)
5. #247 Smart decay (room participation as signal)
6. #181 Agent recall optimization (room as trigger)

Acceptance Criteria

  • --room and --author CLI flags on remember/recall commands
  • rooms and room_memories tables with schema migration (version bump)
  • uteke room list command — lists rooms for current namespace
  • uteke room stats <id> command — room metadata and participants
  • Room recall returns all contributions sorted by time with author attribution
  • Author filtering: uteke recall --room X --author cto
  • --summary flag returns condensed room context (top-K diverse)
  • JSON output includes author attribution and timestamps
  • Cross-namespace recall within room context
  • FTS5 + vector hybrid search scoped to room when --room is specified
  • Room memories also exist in agent personal namespace (dual-write)
  • Schema migration safe for existing databases
  • Tests for room CRUD, cross-namespace recall, author filtering

Activity

  1. added this to the milestone on Jun 11, 2026
  2. added
    enhancement
    scope:core
    v0.1.0
    priority:high
    on Jun 11, 2026
  3. added 2 commits that reference this issue on Jun 12, 2026
  4. added 2 commits that reference this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:highscope:corev0.1.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions