Skip to content

[Feature]: Collaborative Memory with Dynamic Access Controls (ACLs) #78

@zircote

Description

@zircote

Problem Statement

Current Subcog scoping (project/user/org) is static and does not support:

  • Fine-grained sharing of specific memories between users
  • Time-evolving access permissions
  • Selective memory visibility based on roles
  • Compliance requirements for data access auditing

Enterprise deployments need memory sharing with proper access controls, especially in regulated industries (healthcare, finance) where data access must be auditable.

Proposed Solution

Implement collaborative memory with dynamic access controls:

  1. Memory Fragments: Each memory can have individual access rules
  2. Bipartite Access Graph: Links users, agents, and resources
  3. Two Memory Tiers:
    • Private memory: Visible only to originating user
    • Shared memory: Selectively shared fragments
  4. Immutable Provenance: Contributing agents, accessed resources, timestamps

Features:

  • Share specific memories with specific users/teams
  • Time-bounded access (expires after date)
  • Role-based access patterns (viewer, editor, admin)
  • Retrospective permission checks via provenance

Proposed API:

pub struct MemoryAcl {
    memory_id: MemoryId,
    owner: UserId,
    permissions: Vec<Permission>,
}

pub struct Permission {
    grantee: Grantee,           // User, Team, or Role
    access_level: AccessLevel,   // Read, Write, Admin
    valid_from: DateTime,
    valid_until: Option<DateTime>,
}

MCP tools:

subcog_share:
  memory_id: "abc123"
  with: ["user:alice", "team:backend"]
  access: "read"
  expires: "30d"

subcog_permissions:
  memory_id: "abc123"
  action: list  # or: grant, revoke, audit

Alternatives Considered

  • Namespace-level sharing only (too coarse-grained)
  • External IAM integration only (loses memory-specific semantics)
  • Copy-on-share model (loses single source of truth)

Additional Context

Breaking Change: Yes - minor changes (ACL fields on memories)
Priority: Critical
Contribution: Yes, with guidance

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions