Skip to content

Guide · Agent skill

How to use the Convex AI agent backend agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The convex-agent skill teaches an AI coding agent how to add a chatbot-style AI agent backend to an app built on Convex, a hosted backend platform. It walks through installing the @convex-dev/agent package so conversations are saved, tools can be called, and documents can be searched by meaning. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what you need before you start.

Convex AI agent backendopenclaw/clawhub · MIT

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it to get the convex-agent folder containing SKILL.md.
  2. 2Place the folder. Move the folder to ~/.claude/skills/ for personal use, or to .claude/skills/ in your project, or upload it under Settings → Capabilities → Skills in the Claude apps.
  3. 3Check requirements. Confirm Convex 1.45 or later and a Convex Cloud deployment on a paid plan for the AI Gateway.
  4. 4Ask in plain language. Describe the feature you want, such as an AI chat assistant or RAG search over your Convex content, and mention Convex.
  5. 5Install the packages. Let the agent install @convex-dev/agent and @convex-dev/ai-sdk-provider and register the agent component in convex.config.ts.
  6. 6Define the agent and threads. The agent defines tools and instructions with the gateway model, then creates threads and streams messages stored in Convex.
  7. 7Review before deploying. Check the added packages and backend functions, and confirm any provider keys are kept in Convex env.

What is an agent skill, and what does convex-agent do?

An agent skill is a folder containing a SKILL.md file with instructions that an AI agent can load when a task matches the skill's description. The convex-agent skill covers one task: adding an AI agent / RAG backend to a Convex application using the @convex-dev/agent package.

According to the skill, the setup gives you durable threads, message history, tool calls, and vector search for retrieval-augmented generation (RAG). Model calls go through the Convex AI Gateway by default, so Convex holds the provider credentials and you do not need to obtain, store, or rotate an LLM key in most cases.

  • Installs @convex-dev/agent and @convex-dev/ai-sdk-provider and adds the agent component to convex.config.ts
  • Defines an agent with tools and instructions using convexGateway("provider/model")
  • Creates threads, streams messages, and persists history in Convex
  • Embeds documents into a vector index and retrieves them inside a tool for RAG
  • Falls back to a provider key stored in Convex env only where the gateway is unavailable

What you need before installing

The skill lists these requirements. Check them before you start, because the setup assumes a Convex project and deployment.

The skill is for Convex only. Its steps assume Convex functions, config files, and deployments, so it does not help with other backends.

  • Convex 1.45 or later
  • A Convex Cloud deployment on a paid plan, which is needed for the AI Gateway
  • npm packages @convex-dev/agent and @convex-dev/ai-sdk-provider
  • An embedding provider API key, only if you use RAG embeddings (stored in Convex env)
  • A provider API key only where the gateway is unavailable, such as the free plan, self-hosted, or local setups

How do you install the convex-agent skill?

Download the ZIP from this page and unzip it. The skill folder contains a single file, SKILL.md. Put the unzipped folder in one of these locations:

  • Personal skills: ~/.claude/skills/
  • Project skills: .claude/skills/ inside your project folder
  • Claude apps: upload the skill under Settings → Capabilities → Skills

How do you trigger the skill with a natural request?

You do not need a special command. Describe the task in plain language that matches the skill's purpose, such as adding an AI assistant or chat feature to a Convex app, or adding document search over your own content. The agent decides whether the skill applies, so mention Convex and the feature you want to make the match clear.

  • "Add an AI chat assistant to my Convex app that saves conversation history."
  • "Set up RAG over the documents in my Convex project so the chatbot can answer from them."
  • "Add a tool-calling AI agent backend to this Convex app using @convex-dev/agent."

What does the agent do step by step?

The skill's workflow runs in a fixed order. You can review each step as the agent works through it.

  • Install @convex-dev/agent and @convex-dev/ai-sdk-provider, then register the agent component in convex.config.ts.
  • Define the agent with its tools and instructions, using the gateway model by default.
  • Create threads and stream messages, with history persisted in Convex.
  • For RAG, embed documents into a vector index and retrieve them in a tool. The gateway does not serve embeddings yet, so the embedding provider's key is stored via the env micro power.
  • Use a provider key only if the gateway is unavailable.
npm install @convex-dev/agent @convex-dev/ai-sdk-provider

What are the safety rules and what does the skill run?

This skill runs scripts and uses the network. The setup installs packages and adds backend functions to your project, so review the changes before deploying. The skill's rules say to never expose a provider API key client-side and to keep any needed key in Convex env via the env micro power. Model calls should run in actions, using 'use node' if the SDK needs it.

If your project must avoid new dependencies or server-side code execution, do not use this skill.

  • Keep provider keys out of client code.
  • Run model calls in Convex actions.
  • Store threads and messages in Convex for durability and reactivity.
  • Review installed packages and new backend functions before deploying.

Tips for a smoother setup

Confirm your Convex version and plan first, since the gateway needs Convex 1.45 or later on a paid Convex Cloud deployment. If you are on the free plan, self-hosted, or running locally, plan for a provider key stored in Convex env and the extra key-handling responsibility that comes with it.

  • Check the Convex version and deployment type before asking for the setup.
  • Name the feature you need (chat, tools, or RAG) so the agent loads the right steps.
  • Expect to provide an embedding provider key if you need RAG, because the gateway does not serve embeddings yet.

What people use it for

  • Adding an AI chat assistant to a Convex app with saved conversation history
  • Building an agent that calls tools defined in your Convex functions
  • Answering questions from your own documents through RAG over a Convex vector index
  • Showing live updates in AI chats through Convex reactive data

Frequently asked questions

How do I install the convex-agent skill?

Download the ZIP from this page and unzip it. Place the convex-agent folder in ~/.claude/skills/ for personal use or .claude/skills/ inside your project, or upload it in the Claude apps under Settings → Capabilities → Skills.

What are the requirements for the convex-agent skill?

You need Convex 1.45 or later and a Convex Cloud deployment on a paid plan for the AI Gateway. The setup also uses the npm packages @convex-dev/agent and @convex-dev/ai-sdk-provider. An embedding provider key is needed only if you use RAG embeddings.

Is the convex-agent skill free?

The skill is published under the MIT licence. Convex itself has its own plan requirements: the AI Gateway needs a Convex Cloud deployment on a paid plan, according to the skill's requirements.

Do I need my own OpenAI or other model API key?

In most cases, no. The skill calls models through the Convex AI Gateway by default, so Convex holds the provider credentials. You only need a provider key where the gateway is unavailable, such as the free plan, self-hosted, or local setups, and it must be stored in Convex env.

Does this skill work with backends other than Convex?

No. The steps assume Convex functions, config and deployments, and the skill does not help with other backends.

Why does the skill run scripts and use the network?

The setup installs packages, adds backend functions, and calls models over the network. Review the changes before deploying, and avoid this skill if your project must not add dependencies or server-side code execution.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use convex-agent if you are building an AI assistant, chat feature, or document search inside a Convex app and want saved history and reactive updates. Pick something else if your app does not use Convex, if you are on a free, self-hosted, or local setup without a plan for handling a provider key, or if your project must avoid new dependencies or server-side code.

Download the skill