convex-agent

Adds an AI agent and RAG backend to a Convex app using @convex-dev/agent.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-agent-tehzeeb07
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-agent
Source: https://github.com/Tehzeeb07/CodeRush/tree/main/.agents/skills/convex-agent
Command: npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-agent-tehzeeb07

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @convex-dev/agent.

What problem does it solve? Building an in-app AI agent requires durable conversation threads, message history, tool-calling, and vector search, which are complex to wire together from scratch in a Convex backend. ## Core Features & Use Cases - Agent Backend Setup: Installs and configures @convex-dev/agent in convex.config.ts with a defined model, tools, and instructions. - Durable Threads & Streaming: Creates threads, streams messages, and persists conversation history in Convex for reactivity. - RAG Support: Embeds documents into a vector index and retrieves them inside agent tools for retrieval-augmented generation. - Use Case: Add a support chatbot to your Convex app that remembers past conversations and answers questions grounded in your documentation. ## Quick Start Add an AI agent with RAG to my Convex app using @convex-dev/agent, with threads, streaming messages, and a vector index over my docs.

Frequently Asked Questions about convex-agent

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

FAQPage Schema
How do I add an AI agent to a Convex app?▼

Install @convex-dev/agent, register it in convex.config.ts, then define the agent with a model, tools, and instructions. Create threads and stream messages while persisting history in Convex tables.

How do I build RAG with Convex and vector search?▼

Embed your documents into a Convex vector index, then retrieve relevant chunks inside an agent tool during generation. The @convex-dev/agent package integrates this retrieval with durable threads and message history.

Where should I store my LLM API key in Convex?▼

Store the LLM API key in Convex environment variables using the env configuration, never in client-side code. Model calls run in actions, using 'use node' when the SDK requires the Node runtime.

Does @convex-dev/agent persist conversation history?▼

Yes, threads and messages are persisted in Convex tables, giving conversations durability and reactivity. Clients can subscribe to message streams and history updates in real time.

Why run model calls in Convex actions instead of mutations?▼

Actions support non-deterministic work like LLM API calls and can use the Node runtime via 'use node' when the SDK requires it. Mutations must be deterministic and cannot call external model APIs.