Convex Agents Threads

Organize multi-turn conversations into persistent threads with Convex Agent core APIs.

25|4|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/Sstobo/convex-skills --skill convex-agents-threads
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Convex Agents Threads
Source: https://github.com/Sstobo/convex-skills/tree/main/convex-agents-threads
Command: npx skills add https://github.com/Sstobo/convex-skills --skill convex-agents-threads

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Threads group related messages into organized, linear conversation histories. Every message in the Agent component belongs to a thread.

Core Features & Use Cases

  • Organize conversations by userId into persistent threads.
  • Query, continue, and manage thread metadata across sessions.
  • Clean up old or completed threads to keep histories manageable.

Quick Start

Create a new thread for a user: startNewThread(ctx, { userId: "user-123" }) Continue a thread: continueConversation(ctx, { threadId: "thread-456", prompt: "Hello" }) List threads for a user: getUserThreads(ctx, { userId: "user-123", paginationOpts: { limit: 20 } })

Frequently Asked Questions about Convex Agents Threads

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I store multi-turn conversation history for individual users in Convex?

You can organize multi-turn conversation history by grouping messages into persistent threads tied to a specific userId using Convex Agent core APIs. This skill implements thread creation and per-user history queries to manage these linear conversations across sessions.

What is the best way to manage and clean up old conversation threads in a Convex application?

To manage old conversation threads in a Convex application, you can use sample mutations and queries to list threads by userId and delete completed histories. This skill includes cleanup actions to keep conversation histories manageable and remove outdated threads.

Can I continue an existing agent conversation thread across different sessions using Convex?

Yes, you can continue an existing agent conversation thread across sessions in Convex by calling the continuation action with the existing threadId and a new prompt. This skill provides the necessary mutations to append messages to an active thread.

Do I need the Convex Agent core APIs to implement thread management for my chat application?

Yes, this skill relies directly on the Convex Agent core APIs to implement thread creation, continuation, listing, and deletion. Every message in the Agent component belongs to a thread, making these APIs essential for organizing conversation histories.

How do I retrieve and paginate a user's conversation threads in Convex?

You retrieve and paginate a user's conversation threads in Convex by querying the user history with a specific userId and pagination options. This skill provides sample queries like getUserThreads to fetch organized thread metadata efficiently.