---
title: Convex Agent Skill for Claude Code
canonical: https://skillselion.com/skills/convex/agent-skills/convex-agent
content_type: text/markdown
description: "convex-agent by convex - Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app."
---

# Convex Agent Skill

Title: Convex Agent Skill for Claude Code

> convex-agent by convex - Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.

Canonical: https://skillselion.com/skills/convex/agent-skills/convex-agent

Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.

## Key facts

- Installs: 49,665
- GitHub stars: 69
- Author: convex
- Repository: convex/agent-skills
- Works in Grok Bot: yes
- Install command: `npx skills add https://github.com/convex/agent-skills --skill convex-agent`
- Last updated: November 30, 2026

## What Convex Agent does

Use convex-agent in a coding agent to apply its workflow on a real project.

- convex-agent

## SKILL.md

<!-- GENERATED from convex-agents content/capabilities/agent.json  -  do not edit by hand. -->

## Add an AI agent / RAG backend

Install @convex-dev/agent for durable threads, message history, tool-calls, and vector search/RAG  -  the backend for an in-app AI agent. Call models through the Convex AI Gateway by default: Convex holds the provider credentials, so there is no LLM key to obtain, store, or rotate.

### Workflow

1. Install @convex-dev/agent + @convex-dev/ai-sdk-provider; add the agent component to convex.config.ts.
2. Define the agent (tools, instructions) with `languageModel: convexGateway("provider/model")`  -  no API key needed (needs convex 1.45+ on a Convex Cloud deployment, paid plan).
3. Create threads + stream messages; persist history in Convex.
4. For RAG: embed docs into a vector index and retrieve in the tool. The gateway does not serve embeddings yet, so store the embedding provider's key via the `env` micro power.
5. Only if the gateway is unavailable (free plan, self-hosted, local backend): call the provider SDK with a key stored via the `env` micro power.

### Rules

- Default to the Convex AI Gateway (`convexGateway` from @convex-dev/ai-sdk-provider) for model calls; fall back to a provider key in Convex env only where the gateway is unavailable (free plan, self-hosted, local backend).
- Never expose a provider API key client-side; when one is needed (embeddings, gateway fallback), keep it in Convex env via the `env` micro power.
- Run model calls in actions ('use node' if the SDK needs it).
- Persist threads/messages in Convex for durability + reactivity.

## Convex Agent FAQ

### Is Convex Agent safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

## Machine access

- [Sitemap](https://skillselion.com/sitemap.xml)
- [llms.txt](https://skillselion.com/llms.txt)
- [llms-full.txt](https://skillselion.com/llms-full.txt)
- [Developer resources](https://skillselion.com/developers)
- [OpenAPI spec](https://skillselion.com/openapi.json)
- [MCP handshake](https://skillselion.com/.well-known/mcp)
- [API catalog](https://skillselion.com/.well-known/api-catalog)
- [AI catalog](https://skillselion.com/.well-known/ai-catalog.json)
- [Pricing](https://skillselion.com/pricing.md)
- [Auth](https://skillselion.com/auth.md)
- [AGENTS.md](https://skillselion.com/AGENTS.md)
- [Contact](https://skillselion.com/contact)
- [Home](https://skillselion.com/)
