--- title: Multi-User Agent Architecture category: Projects project: System Architecture type: Research/Design status: planning date: 2026-02-24 tags: [openclaw, multi-user, architecture, collaboration, discord, design] --- # Multi-User Agent Architecture **Question:** What's the best way to handle multiple users using one agent for tasks and project management? **Date:** 2026-02-24 **Status:** Planning/Research --- ## Executive Summary Four approaches ranging from simple (separate channels) to complex (multi-agent). Recommendation: **Start with Option 1 (Separate Channels)** and add frontmatter tagging (Option 3) as needed. --- ## Option 1: Separate Channels Per User ⭐ RECOMMENDED **Best for:** Small teams (2-5 people), clear separation ### Setup ``` Discord Server: ├── #home-assistant (shared - only you/active) ├── #corey-projects (your own) ├── #alice-projects (Alice's channel) ├── #bob-projects (Bob's channel) └── #shared-projects (collaborative) ``` ### How It Works - Each user gets their own channel - Agent has separate sessions for each - Context isolation = no cross-contamination - Shared projects in #shared-projects ### Pros - ✅ Total privacy per user - ✅ Simple to manage - ✅ One agent, multiple sessions - ✅ User-specific memory stays isolated ### Cons - More channels to manage - Shared projects need explicit cross-posting --- ## Option 2: User Tagging System (Hybrid) **Best for:** Shared workspace with user-aware tasks ### Setup - One shared channel (#projects) - Users tag messages: `@alice` or `#for-alice` - Or: "Task for Alice: ..." ### How It Works - Agent identifies user from message content - Store tasks with user attribution - Query by user when needed ### Example Workflow ``` Corey: #task for @alice - Review the architecture doc Alice: (in same channel) I reviewed it, looks good Corey: #task for @bob - Deploy the update ``` ### Pros - ✅ Single channel - ✅ Collaborative feel - ✅ Clear ownership ### Cons - Requires discipline with tagging - Context can get messy - Privacy is opt-in (explicit tags) --- ## Option 3: User Profiles in Frontmatter **Best for:** Shared Obsidian vault, Dataview queries ### Setup - Tasks/projects have frontmatter with `assignee: alice` - Query using Dataview: `WHERE assignee = "alice"` ### Example Task ```markdown --- title: Review architecture project: Memory System assignee: alice status: todo due: 2026-02-25 --- Alice needs to review the memory system architecture. ``` ### Query ```dataview TABLE status, due FROM "Tasks" WHERE assignee = "alice" AND status = "todo" SORT due ASC ``` ### Pros - ✅ Perfect for Obsidian - ✅ Dataview-powered dashboards - ✅ Automatic organization ### Cons - Requires frontmatter discipline - Real-time chat = harder to manage --- ## Option 4: Multi-Agent (Advanced) **Best for:** Teams where each person wants their own agent ### Setup - Each user has their own OpenClaw instance - Shared resources via Obsidian/SQLite - Sync via git or shared database ### How It Syncs - Obsidian vault is shared (Syncthing/Nextcloud) - Both agents read/write same files - Different identities, same data ### Pros - ✅ Full separation - ✅ Personalized agents - ✅ Shared long-term memory ### Cons - Complex setup - More resources (multiple agents) - Merge conflicts possible --- ## Recommendation **Start with:** Option 1 (Separate Channels) **Why:** - Simplest to implement - No context pollution - Easy permissions (Discord native) - Can add Option 3 (Frontmatter) later **Hybrid Approach:** - Private channels per user (`#alice-projects`, `#bob-projects`) - Shared channel for collaboration (`#team-projects`) - Obsidian vault is shared with user-tagged frontmatter --- ## Decision Matrix | Factor | Option 1 | Option 2 | Option 3 | Option 4 | |--------|----------|----------|----------|----------| | **Privacy** | High | Medium | High | High | | **Setup Complexity** | Low | Low | Medium | High | | **Collaboration** | Medium | High | Medium | Medium | | **Scalability** | Medium | High | High | High | | **Discord Channels** | Many | One | N/A | Many | --- ## Next Steps 1. **Define users:** How many people? Technical level? 2. **Privacy check:** Do users need isolation from each other? 3. **Collaboration needs:** Shared projects vs individual work? 4. **Pilot:** Start with Option 1, iterate based on feedback --- ## Related - [[Memory System]] — How agent memory works - [[Dataview Query Examples]] — Query by user/assignee --- *Created: 2026-02-24* *Based on discussion in #home-assistant*