Skip to content

Feature: Restrict conversation visibility by assignment and/or labels #51

Description

@dvlexp

Summary

Add an option to restrict an agent's conversation visibility within an inbox to only the conversations assigned to them and/or conversations with specific labels/tags.

Current Behavior

When an agent is added as a member of an inbox, they have full visibility over all conversations in that inbox, regardless of assignment. The "Mine" filter is a UI convenience — it does not enforce access control at the data level.

Desired Behavior

A per-inbox (or per-agent) setting that enforces one or both of the following visibility scopes:

  1. Assignment-based restriction — the agent only sees conversations where assignee = themselves. Conversations assigned to other agents or unassigned are hidden.
  2. Label/tag-based restriction — the agent only sees conversations that carry one or more specific labels (e.g., luzia, support-tier-1). Useful for routing specific topics to specific agents.

These two modes should be combinable (e.g., "only show conversations assigned to me AND tagged as ai-best").

Use Case

A team with multiple agents shares a single high-volume inbox (e.g., a WhatsApp inbox with 200+ daily conversations). Each agent should only see their own queue to avoid confusion, accidental replies on someone else's lead, and information leakage between agents handling different accounts or products.

Suggested Implementation

  • Add a visibility_scope setting on InboxMember (or a new InboxMemberPolicy model):
    • all (default, current behavior)
    • assigned_only
    • label_filter: string[]
  • Enforce at the query level (not just UI filter) so agents cannot bypass via API.
  • Admins and supervisors retain full visibility regardless of policy.

Impact

Medium — affects multi-agent teams sharing inboxes. Does not break existing behavior (default remains all).


Reported by a production team using evo-ai with 7 agents on a shared WhatsApp inbox. Diagnosed via API: agents added to an inbox can read all 236 conversations even when only 0 are assigned to them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions