convex-agent
Build AI agents with persistent threads, tool calling, and streaming on Convex. Use when implementing chat interfaces, AI assistants, multi-agent workflows, RAG systems, or any LLM-powered features with message history.
npx skills add majiayu000/claude-skill-registry --skill convex-agent-skill --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Convex Agent Component Build AI agents with persistent message history, tool calling, real-time streaming, and durable workflows. ## Installation ```bash npm install @convex-dev/agent ``` ```typescript // convex/convex.config.ts import { defineApp } from 'convex/server'; import agent from '@convex-dev/agent/convex.config'; const app = defineApp(); app.use(agent); export default app; ``` Run `npx convex dev` to generate component code before defining agents. ## Core Concepts ### Agent Definition ```typescript // convex/agents.ts import { Agent } from '@convex-dev/agent'; import { openai } from '@ai-sdk/openai'; import { components } from './_generated/api'; const supportAgent = new Agent(components.agent, { name: 'Support Agent', languageModel: openai.chat('gpt-4o-mini'), textEmbeddingModel: openai.embedding('text-embedding-3-small'), // For vector search instructions: 'You are a helpful support assistant.', tools: { lookupAccount, createTicket }, stopWhen: stepCountIs(10) // Or use maxSteps: 10 }); ``` ### Basic Usage (Two Approaches) **Approach 1: Direct generation (simpler)** ```typescript import { createThread } from '@convex-dev/agent'; export const chat = action({ args: { pr
- Installation
- Core Concepts
- Agent Definition
- Basic Usage (Two Approaches)
- Continue Existing Thread
- Asynchronous Pattern (Recommended)
- Generation Methods
- Querying Messages
- Agent Configuration Options
- Key References
- Best Practices
npm install @convex-dev/agent
What does the convex-agent skill do?
Build AI agents with persistent threads, tool calling, and streaming on Convex. Use when implementing chat interfaces, AI assistants, multi-agent workflows, RAG systems, or any LLM-powered features with message history.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill convex-agent-skill --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
