Convex logo

Skill

agent

build AI agents with Convex

Published by Convex Updated Jul 12
Covers RAG Search Agents Engineering

Description

Build an AI agent / RAG feature on Convex (@convex-dev/agent: threads, tools, vector search). TRIGGER on an AI-agent/chatbot/RAG request.

SKILL.md

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.

Steps

  1. Install @convex-dev/agent + add to convex.config.ts.
  2. Define the agent (model, tools, instructions); store the LLM key via the env micro power.
  3. Create threads + stream messages; persist history in Convex.
  4. For RAG: embed docs into a vector index and retrieve in the tool.

Rules

  • Keep the LLM API key in Convex env (use the env micro power), never client-side.
  • Run model calls in actions ('use node' if the SDK needs it).
  • Persist threads/messages in Convex for durability + reactivity.

© 2026 YourAI.tools. Every skill from an identity-verified publisher.

Independent catalog. Not affiliated with, endorsed by, or sponsored by Anthropic or any listed publisher. All trademarks belong to their respective owners.