convex-agents

Build persistent, stateful AI agents with thread management and tool integration in Convex.

1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/blocknavi/convex-batch-processor --skill convex-agents
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-agents
Source: https://github.com/blocknavi/convex-batch-processor/tree/main/.claude/skills/convex-agents
Command: npx skills add https://github.com/blocknavi/convex-batch-processor --skill convex-agents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex Agents enables developers to create persistent, stateful AI agents that maintain context, orchestrate tools, and provide reliable, streaming responses across sessions.

Core Features & Use Cases

  • Persistent state and memory across restarts for long-running conversations.
  • Tool integration, streaming outputs, and durable workflows for complex tasks.
  • Use Case: Deploy an AI assistant that can manage threads, call Convex functions as tools, and perform RAG-backed knowledge retrieval.

Quick Start

Install the Convex Agent package and initialize a basic agent. Then plug thread management, tools, and workflows into your application. Example: import { Agent } from "@convex-dev/agent"; import { components } from "./_generated/api"; import { OpenAI } from "openai";

const openai = new OpenAI();

export const agent = new Agent(components.agent, { chat: openai.chat, textEmbedding: openai.embeddings, });

Frequently Asked Questions about convex-agents

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

FAQPage Schema
How do I build persistent AI agents that maintain context across sessions?▼

Persistent AI agents are built using the Convex Agent component, which maintains state and memory across restarts for long-running conversations. It enables stateful agents that preserve context reliably across sessions.

Can I use Convex functions as tools for LLM-backed assistants?▼

Yes, Convex functions can be integrated as tools for AI assistants. The Convex Agent component allows tool-enabled assistants to call functions directly during multi-step workflows and chat interactions.

What is the best way to implement streaming responses for long-running conversations?▼

Streaming responses are implemented using the Convex Agent component, which provides durable workflows and streaming outputs for complex tasks across long-running conversations.

Do I need OpenAI to set up thread management and RAG integration in Convex?▼

An LLM provider like OpenAI is required to initialize the Agent component for chat and text embeddings. This setup enables thread management and RAG-backed knowledge retrieval.

How does workflow orchestration work for multi-step AI tasks in Convex?▼

Workflow orchestration in Convex uses the Agent component to coordinate multi-step workflows with tool integration and durable execution, ensuring reliable task completion across complex AI workflows.