convex-agents

convex-agents is a skill for Claude Code, Codex from waynesutton/convexskills. It costs 32 tokens per session (3,299 once invoked), scanned A, original, Apache-2.0.

A set of instructions for building persistent AI agents with Convex, a backend platform, including conversations, tools, streaming responses, search, and long-running workflows.

In plain words
What is it for?
Use it when building Convex agents with conversation threads, Convex functions as tools, retrieval-augmented search, streamed replies, or durable workflows.
Why use it?
It provides implementation guidance for agents whose history and tasks need to survive restarts and whose responses should update clients as they are produced.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { api } from "../convex/_generated/api";.

Part of the convexskills plugin — 14 skills shipped together

Good fit Use it when building Convex agents with conversation threads, Convex functions as tools, retrieval-augmented search, streamed replies, or durable workflows.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/waynesutton/convexskills
agentmods
npx agentmods add skills/waynesutton/convexskills/convex-agents

Made for: Claude Code, Codex.

Or install convexskills, the plugin that ships this one along with the rest of its 14 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for convex-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/waynesutton/convexskills/convex-agents/github.svg)](https://agentmods.dev/skills/waynesutton/convexskills/convex-agents)
Your own site
<a href="https://agentmods.dev/skills/waynesutton/convexskills/convex-agents"><img src="https://agentmods.dev/badge/skills/waynesutton/convexskills/convex-agents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for convex-agents

Your own site · 80×15
<a href="https://agentmods.dev/skills/waynesutton/convexskills/convex-agents"><img src="https://agentmods.dev/badge/skills/waynesutton/convexskills/convex-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,299 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 17 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.03299
Opus 5 $0.00016 $0.01649
Sonnet 5 $0.00006 $0.00660
Haiku 4.5 $0.00003 $0.00330

Measured 11d ago against content hash d23976c0dbe8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

convex-agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

skills/convex-agents/SKILL.md · 517 lines

How it starts

The opening of the file, as written. The whole thing — 517 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Convex Agents

Build persistent, stateful AI agents with Convex including thread management, tool integration, streaming responses, RAG patterns, and workflow orchestration.

Documentation Sources

Before implementing, do not assume; fetch the latest documentation:

Instructions

Why Convex for AI Agents

  • Persistent State - Conversation history survives restarts
  • Real-time Updates - Stream responses to clients automatically
  • Tool Execution - Run Convex functions as agent tools
  • Durable Workflows - Long-running agent tasks with reliability
  • Built-in RAG - Vector search for knowledge retrieval

Setting Up Convex Agent

npm install @convex-dev/agent ai openai
// convex/agent.ts
import { Agent } from "@convex-dev/agent";
import { components } from "./_generated/api";
import { OpenAI } from "openai";

const openai = new OpenAI();

export const agent = new Agent(components.agent, {
  chat: openai.chat,
  textEmbedding: openai.embeddings,
});

Thread Management

// convex/threads.ts
import { mutation, query } from "./_generated/server";
import { v } from "convex/values";
import { agent } from "./agent";

// Create a new conversation thread
export const createThread = mutation({
  args: {
    userId: v.id("users"),
    title: v.optional(v.string()),
  },
  returns: v.id("threads"),
  handler: async (ctx, args) => {
    const threadId = await agent.createThread(ctx, {
      userId: args.userId,
      metadata: {
        title: args.title ?? "New Conversation",
        createdAt: Date.now(),
      },
    });
    return threadId;
  },
});

// List user's threads
export const listThreads = query({
  args: { userId: v.id("users") },
  returns: v.array(v.object({
    _id: v.id("threads"),
    title: v.string(),
    lastMessageAt: v.optional(v.number()),
  })),
  handler: async (ctx, args) => {
    return await agent.listThreads(ctx, {
      userId: args.userId,
    });
  },
});

// Get thread messages
export const getMessages = query({
  args: { threadId: v.id("threads") },
  returns: v.array(v.object({
    role: v.string(),
    content: v.string(),
    createdAt: v.number(),
  })),
  handler: async (ctx, args) => {
    return await agent.getMessages(ctx, {
      threadId: args.threadId,
    });
  },
});

Read the full file on GitHub · 517 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 517 lines · 32 tokens per session scan A d23976c0dbe8

Subscribe to this mod's changes

convex-agents is a skill published in the GitHub repository waynesutton/convexskills (404 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 3,299 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

convex-agents

Building AI agents with the Convex Agent component including thread management, tool integration, streaming responses, RAG patterns, and workflow orchestration.

J-StaR-Films-Studios/VibeCode-Protocol-Suite · 32 tokens

MCP Integration Assistant

Helps design and implement Model Context Protocol (MCP) server integrations for AI agents.

Notysoty/openagentskills · 23 tokens

developing-genkit-tooling

Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency guidelines.

genkit-ai/genkit · 35 tokens

stripe-apps

Use when building, modifying, or reviewing a Stripe App — or when the user describes something that implies one (e.g. "add a panel to the customer page", "customize my Stripe Dashboard", "react to Stripe events from my app", "connect my service to Stripe without sharing API keys"). Covers the full app development…

stripe/ai · 197 tokens

stripe-projects

Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up for a service", "set…

stripe/ai · 213 tokens

stripe-docs

Use when the user or agent needs to read, search, or look up Stripe documentation or API reference. Prefer this over curl or WebFetch for any docs.stripe.com content. Use to fetch gated documentation.

stripe/ai · 46 tokens