convex-agents_skill

This skill helps you build persistent AI agents with Convex, enabling streaming responses, tool usage, and durable workflows.
  • JavaScript

225

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill waynesutton/convexskills --skill convex-agents

  • SKILL.md13.4 KB

Overview

This skill shows how to build persistent, stateful AI agents using the Convex Agent component. It highlights thread management, tool integration, streaming responses, retrieval-augmented generation (RAG), and durable workflow orchestration. The patterns are focused on production-ready backend flows with JavaScript and Convex.

How this skill works

The skill wires Convex agent APIs to manage conversation threads, store messages and embeddings, and perform vector search for RAG. Agents call defined tools (Convex functions or external APIs) and stream tokens back to clients while saving final responses to the database. Durable workflows coordinate multi-step tasks like research and synthesis using Convex actions and mutations.

When to use it

  • Building chat experiences that must persist conversations across restarts
  • Streaming long model responses to web clients for better UX
  • Integrating domain-specific tools (search, task creation, external APIs) into assistant flows
  • Implementing RAG pipelines with vector indexes and embeddings
  • Orchestrating multi-step, long-running processes reliably in the backend

Best practices

  • Persist threads and messages in Convex to retain history and enable indexing
  • Use streaming token callbacks to append partial responses and reduce perceived latency
  • Wrap tool handlers with robust error handling and timeouts to avoid agent crashes
  • Generate and store embeddings on document insert and use vector indexes for fast RAG
  • Rate-limit heavy agent interactions and log tool usage for cost control and debugging

Example use cases

  • A customer support assistant that searches product docs, creates tickets, and streams replies
  • A research workflow that finds documents, synthesizes analysis, and produces insights
  • A personal assistant that schedules tasks, fetches weather, and summarizes conversations
  • An internal knowledge bot that runs secure Convex queries as agent tools for business data
  • A chat UI that shows live token updates while the model composes a long-form response

FAQ

Agents provide an onToken callback where each token can be appended to a Convex record, allowing the client to subscribe and render partial output in real time.

Where should embeddings live for RAG?

Store embeddings in a documents table with a vector index; generate embeddings when inserting documents and use agent.search for nearest-neighbor retrieval.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
convex-agents skill by waynesutton/convexskills | VeilStrat