convex-agent
What it does
This skill adds an AI agent backend to a Convex app, storing conversation history and searching your documents for answers. It is for developers building an in-app AI assistant.
When to use it
- ✓When you want to add an AI chat assistant to a Convex app.
- ✓When you need the assistant to remember past messages in durable chat threads.
- ✓When you want the assistant to search your own documents to answer questions.
Skill link
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-agent/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Add an AI assistant to my Convex app that answers questions from our help articles.”
5 new skills a week. 1 minute to read.
How it works
The skill installs the agent component, defines the agent with its tools and instructions, and stores threads and messages in Convex. For document search, it embeds the documents into a vector index. Model calls go through the Convex AI gateway, so you usually do not need your own model key.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
- Install @convex-dev/agent + @convex-dev/ai-sdk-provider; add the agent component to convex.config.ts.
- 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). - Create threads + stream messages; persist history in Convex.
- 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
envmicro power. - Only if the gateway is unavailable (free plan, self-hosted, local backend): call the provider SDK with a key stored via the
envmicro power.
Rules
- Default to the Convex AI Gateway (
convexGatewayfrom @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
envmicro power. - Run model calls in actions ('use node' if the SDK needs it).
- Persist threads/messages in Convex for durability + reactivity.
FAQ
Do I need a model API key?
Usually not. Convex holds the provider credentials when the AI gateway is available.
What is needed for document search?
An embedding provider key, stored in Convex environment settings, since the gateway does not serve embeddings yet.
When is a provider key needed instead?
Only where the gateway is unavailable, such as a free plan, a self-hosted setup or a local backend.
Details
Original description by the author
Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.
repo: openclaw/clawhub
Popularity
- GitHub stars
- 9.5k
- Ranking position
- #12233
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
axiom-alerting
9.5kHelps your agent create and manage Axiom monitors and notification routes through the Axiom API, and check that alerts behave as expected.
axiom-sre
9.5kHelps your agent investigate production incidents and bugs step by step, testing each guess against Axiom logs before drawing a conclusion.
building-dashboards
9.5kHelps your agent design Axiom dashboards with fitting charts, queries and filters, starting from the decisions the dashboard must support.
controlling-costs
9.5kHelps your agent find unused data in Axiom and build dashboards and monitors that track and cut logging costs.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.