manage_conversation
Start, continue, resume, or search conversation threads across sessions. Retrieve history and analytics to track multi-turn interactions.
Instructions
Manage long-running conversation threads across sessions. The conversation state machine: call start (topic is recommended but not required — used for search/grouping) to receive a thread_id + continuation_id; pass continuation_id on each follow-up turn with continue to extend the thread; use resume with a stored thread_id to pick up an old thread from any session. history returns the messages in one thread; search queries across all stored conversations by free-text query; analytics reports per-thread/per-user usage stats. Each action requires only the parameters listed in its description below — extra fields are ignored. Persists conversation state to the configured threading store (non-destructive to user files; the threading store grows over time). Returns: {success, action, data} where data shape varies — start: {thread_id, continuation_id, topic, created_at}. continue: {thread_id, continuation_id, response, message_count}. resume: {thread_id, topic, last_message_at, message_count}. history: {thread_id, messages:[{role, content, timestamp}]} (capped at limit, default 10). search: {query, matches:[{thread_id, topic, snippet, score}]}. analytics: {total_threads, threads_by_user, avg_messages_per_thread, recent_topics}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: start (new thread), continue (with continuation_id), resume (with thread_id), history (get thread history), search (search conversations), analytics (get analytics) | |
| thread_id | No | Thread ID to resume or get history (optional) | |
| continuation_id | No | Continuation ID from previous response (optional) | |
| topic | No | Topic for new conversation (optional) | |
| query | No | Search query for conversations (optional) | |
| user_id | No | User identifier (optional, defaults to "default") | |
| platform | No | Platform identifier (optional) | |
| limit | No | Limit for history results (optional, default 10) |