Conversation System
Status: Implemented Crates: crates/application/src/conversation/,
crates/application/src/memory/
Overview
Section titled “Overview”The Conversation System manages the lifecycle of agent conversations, including creation, retrieval, update, and deletion. It also provides a scratchpad mechanism for temporary agent working memory within a conversation. Conversations are the lowest tier in the 4-tier memory hierarchy and are scoped to a single interaction session.
Memory Hierarchy Context
Section titled “Memory Hierarchy Context”Conversations sit at the base of the 4-tier hierarchy:
+-----------------------------------------+| Account (cross-workspace) || + Workspace (project-scoped) || + Channel (topical) || + Conversation (ephemeral) |+-----------------------------------------+- Conversation — Ephemeral working memory cleared when the conversation ends. Contains scratchpad entries, intermediate Researcher results, and task-specific context.
- Channel — User-managed grouping that persists across conversations within a workspace. Each workspace has a default channel; users create additional channels to organize conversations by topic.
Conversation CRUD
Section titled “Conversation CRUD”Five Tauri commands manage the conversation lifecycle:
| Command | Description |
|---|---|
create_conversation | Start a new conversation, optionally assigned to a channel |
get_conversation | Retrieve a conversation by ID |
list_conversations | List conversations, optionally filtered by channel |
update_conversation | Update conversation metadata (title, channel assignment) |
delete_conversation | Delete a conversation and all associated scratchpad data |
Scratchpad System
Section titled “Scratchpad System”The scratchpad provides temporary working memory for agents within a conversation. Scratchpad entries are conversation-scoped and are cleared when the conversation is deleted.
Four Tauri commands manage scratchpad data:
| Command | Description |
|---|---|
create_scratchpad | Create a scratchpad entry for the current conversation |
get_scratchpad | Retrieve a scratchpad entry by ID |
list_scratchpads | List all scratchpad entries for a conversation |
delete_scratchpad | Delete a specific scratchpad entry |
Repository Traits
Section titled “Repository Traits”Both repositories are conversation-scoped:
MemoryRepository— Manages memory entries within a conversation.AgentMemoryFacadeholds a typedArc<dyn MemoryRepository>— notArc<dyn Any>— preventing type erasure bugs.ScratchpadRepository— Manages scratchpad entries within a conversation.
Repository implementations are injected at the framework layer (Tauri commands) and are not constructed by use cases directly.
Channels
Section titled “Channels”Channels are user-managed conversation groupings:
- Every workspace has a default channel
- Users create additional channels to organize conversations by topic
- Memory decay rates differ between channel-scoped and workspace-scoped memories (channels decay faster)
- Conversation list queries can be filtered by channel ID
Diagram
Section titled “Diagram”Related
Section titled “Related”- Agent Memory System — 4-tier hierarchy, decay model, scope isolation
- Agent Core System — Session lifecycle (Orient → Work → Persist)
crates/application/src/conversation/— Conversation use case implementationscrates/application/src/memory/— Memory and scratchpad repository traits
Was this page helpful?
Thanks for your feedback!