convex-agents

Enable persistent, stateful AI agents within Convex applications.

1|1|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/mauricioacp/tanstack-convex-better-auth-template --skill convex-agents-mauricioacp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-agents
Source: https://github.com/mauricioacp/tanstack-convex-better-auth-template/tree/main/.agents/skills/convex-agents
Command: npx skills add https://github.com/mauricioacp/tanstack-convex-better-auth-template --skill convex-agents-mauricioacp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex Agents enable building persistent, stateful AI agents that survive restarts and can stream responses, manage conversation threads, and orchestrate tooling workflows within Convex-based apps.

Core Features & Use Cases

  • Persistent state: Maintain conversation context and metadata across sessions.
  • Streaming responses: Deliver real-time AI outputs to clients.
  • Tool integration & workflows: Run convex functions as tools and orchestrate durable workflows and RAG patterns.

Quick Start

Install the convex-agent package and initialize your first agent with a simple setup.

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?

To build persistent AI agents that maintain context across sessions, use Convex to store conversation threads and metadata. This approach ensures stateful agents survive application restarts while managing long-running tasks and durable workflows.

What is the best way to integrate RAG patterns into a Convex application?

The best way to integrate RAG patterns into a Convex application is by using the Convex Agent Component alongside vector-based retrieval. This combination enables durable workflows and provides agents with knowledge access for context-aware responses.

Can I run Convex functions as tools within an AI agent workflow?

Yes, you can run Convex functions as tools within an AI agent workflow. The orchestration pattern allows you to integrate tooling directly with OpenAI streaming responses to execute backend logic during conversations.

Does the Convex Agent Component work with OpenAI streaming responses?

Yes, the Convex Agent Component works with OpenAI streaming responses to deliver real-time AI outputs to clients. It supports tool integration and vector-based retrieval while maintaining persistent conversation state.

How do I manage conversation threads for stateful AI agents in Convex?

You manage conversation threads for stateful AI agents in Convex by utilizing the Agent Component's persistent state capabilities. This stores context and metadata, allowing agents to maintain long-running tasks and continuity across restarts.

When do I need persistent state for AI agent workflows?

You need persistent state for AI agent workflows when your application requires maintaining conversation context, surviving server restarts, or orchestrating long-running tasks. Convex provides this durability alongside integrated tooling and streaming.