convex-agents

Build persistent, stateful AI agents with Convex for threads, tools, and workflows.

33|2|Updated Feb 21, 2025
One-click install
npx skills add https://github.com/yspreen/dotfiles --skill convex-agents-yspreen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-agents
Source: https://github.com/yspreen/dotfiles/tree/main/.agents/skills/convex-agents
Command: npx skills add https://github.com/yspreen/dotfiles --skill convex-agents-yspreen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build persistent, stateful AI agents with Convex to manage conversations, tool execution, and workflows across sessions.

Core Features & Use Cases

  • Persistent State - Conversation history survives restarts
  • Real-time Updates - Stream responses to clients automatically
  • Tool Execution - Run Convex functions as agent tools
  • Durable Workflows - Long-running agent tasks with reliability
  • Built-in RAG - Vector search for knowledge retrieval

Quick Start

Install and configure the Convex Agent to initialize a sample, persistent chat workflow.

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 conversation history across sessions?

To build persistent AI agents, you use the Convex Agent component to manage thread state, tool execution, and workflow orchestration. This ensures conversation history survives restarts and streams real-time updates to clients automatically.

Can I run Convex functions as tools for LLM agents?

Yes, you can execute Convex functions as agent tools for AI workflows. The Convex Agent component enables tool execution by exposing server APIs, allowing your agent to trigger functions and orchestrate long-running durable tasks reliably.

What's the best way to implement retrieval-augmented generation for stateful agents in Convex?

The best way to implement retrieval-augmented generation is using the Convex Agent component's built-in RAG capabilities. It handles vector search for knowledge retrieval directly, enabling persistent agents to query stored context and ground responses in real-time.

How do I stream real-time AI responses to clients with Convex workflows?

You stream real-time AI responses by configuring the Convex Agent component with client APIs. This setup automatically pushes streaming updates to connected clients, enabling live conversation feeds during persistent, long-running agent workflows.

Do I need the Convex Agent component to manage long-running agent tasks?

Yes, the Convex Agent component is required to manage durable workflows for long-running agent tasks. It provides the server and client APIs needed to orchestrate persistent state, tool execution, and reliable execution across sessions.

Why does my AI agent lose conversation history after server restarts?

AI agents lose conversation history without persistent state management. By applying the Convex Agent component, thread state and conversation history survive server restarts, ensuring continuous and stateful interactions across sessions.