Skip to content

feat: room summary — LLM-free topic clustering and discussion overview #305

Closed

Description

@ajianaz

Problem

There is no way to get a summary or overview of what happened in a room. An agent joining an existing room (e.g., a long-running Discord discussion about project architecture) has no efficient way to understand the room's context without reading every memory.

Currently, the closest option is uteke room stats <room_id>, which returns:

  • Memory count, participant count, participant names, timestamps

This is metadata, not content. An agent needs to understand what was discussed and decided, not just who participated and when.

Current behavior

uteke room stats project-architecture
# → memories: 347, participants: 5, created: 2026-06-01
# But: what was decided? what are the open questions? what's the current state?

Why This Matters

1. Agent onboarding to existing discussions

In multi-agent orchestration, agents join and leave rooms dynamically. When a new agent enters a room with 2 weeks of history, reading all memories is:

  • Expensive: 500+ memories × token cost
  • Slow: sequential dump + processing
  • Inefficient: 80% of memories may be outdated or superseded

A summary gives the agent the current state of the discussion in a single context injection.

2. Room as decision log

Rooms are designed for collaborative discussions. Discussions produce decisions, action items, and open questions. These are the most valuable outputs — but they're buried in chronological memory dumps.

Consider a room product-roadmap-q3 where:

  • Week 1: Discussed feature priorities
  • Week 2: Settled on 3 features, assigned owners
  • Week 3: Revised timeline, dropped 1 feature

An agent needs: "3 features confirmed: A, B, C. Timeline: end of July. Feature D dropped due to scope."

Not 300 memories in reverse chronological order.

3. Handoff between agents

When Kai finishes research and Zeko needs to compile a brief, Zeko doesn't need Kai's full research log. Zeko needs: "Kai found 5 relevant articles about X, summarized findings, recommended articles A and B for inclusion."

Room summary enables this handoff pattern.

Proposed Implementation

New command: uteke room summary

uteke room summary <room_id>
uteke room summary <room_id> --author kai
uteke room summary <room_id> --last 50
uteke room summary <room_id> --format json

Output format (human):

Room: project-architecture
Participants: kai, zeko, cto (3 total, 347 memories)
Summary (last 50 memories, 3 participants):

Key Topics:
  1. Database migration (12 memories) — Decided: PostgreSQL + pgvector
  2. API versioning strategy (8 memories) — Open: REST vs GraphQL
  3. Auth implementation (15 memories) — Decided: JWT + refresh tokens

Recent Activity:
  • cto: "Finalized on PostgreSQL, dropping MySQL option" (2h ago)
  • kai: "Researched pgvector performance benchmarks" (5h ago)
  • zeko: "API versioning comparison doc shared" (1d ago)

Open Questions:
  - GraphQL vs REST for v2 API (debated 3 times, no consensus)
  - Whether to use connection pooling (cto asked, no response yet)

Output format (JSON):

{
  "room_id": "project-architecture",
  "participant_count": 3,
  "total_memories": 347,
  "summarized_memories": 50,
  "topics": [
    {"name": "Database migration", "count": 12, "sentiment": "decided"},
    {"name": "API versioning", "count": 8, "sentiment": "open"}
  ],
  "recent_activity": [...],
  "open_questions": [...]
}

Implementation approach (LLM-free)

Important: Uteke's philosophy is offline-first, zero API keys, single binary. Room summary should work without LLM to maintain this principle.

Algorithm:

  1. Fetch last N memories from room (default: 50, configurable via --last)
  2. Cluster memories by semantic similarity (re-use embedding vectors already stored)
  3. For each cluster:
    • Count memories
    • Extract most representative memory (highest centroid similarity)
    • Determine sentiment: "decided" if memory_type includes "decision", "open" otherwise
  4. Extract recent activity from last 5 memories
  5. Find "open questions" = memories with tags question or open or memory_type context

Clustering approach: Simple agglomerative clustering on stored embeddings. Since memories already have embeddings in the vector index, no additional ONNX calls needed. Threshold-based: group memories with cosine similarity > 0.75 into same cluster.

Future enhancement: When uteke-serve is available and a user configures an LLM endpoint, room summary --llm could delegate summarization to an LLM. But the default must be LLM-free.

Schema changes

None. All data already exists in rooms, room_memories, and memories tables. Clustering operates on stored embeddings.

CLI change

RoomCommands::Summary {
    room_id: String,
    #[arg(long)]
    author: Option<String>,
    #[arg(long, default_value = "50")]
    last: usize,
}

MCP server update

{
  "name": "uteke_room_summary",
  "description": "Get a structured summary of room discussion",
  "input_schema": {
    "room_id": {"type": "string"},
    "last_memories": {"type": "number", "default": 50},
    "author_filter": {"type": "string", "optional": true}
  }
}

Dependencies

Testing

  • Unit test: create room with 20 memories across 3 topics, verify summary clusters correctly
  • Edge case: empty room, room with 1 memory, room with all same-topic memories
  • Performance: room with 500 memories, --last 50 should be <50ms (reuse existing vectors)

Closes

None (new feature)

Activity

  1. added
    scope:core
    type:feature
    v0.1.0
    priority:high
    on Jun 12, 2026
  2. added 2 commits that reference this issue on Jun 13, 2026
  3. ajianaz commented on Jun 13, 2026

    @ajianaz
    CollaboratorAuthor

    Implemented in PR #314, merged to develop.

  4. added this to the milestone on Jun 13, 2026
  5. added a commit that references this issue on Jun 13, 2026
  6. added a commit that references 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

    priority:highscope:coretype:featurev0.1.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions