convex-agents

Build persistent stateful AI agents with Convex and OpenAI.

Updated Aug 30, 2025
One-click install
npx skills add https://github.com/kristofferaas/deep-stortinget --skill convex-agents-kristofferaas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-agents
Source: https://github.com/kristofferaas/deep-stortinget/tree/main/.agents/skills/convex-agents
Command: npx skills add https://github.com/kristofferaas/deep-stortinget --skill convex-agents-kristofferaas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @convex-dev/agent, openai, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a robust framework for building persistent, stateful AI agents that can manage conversations, integrate tools, stream responses, and orchestrate complex workflows.

Core Features & Use Cases

  • Persistent State: Conversation history is saved and survives restarts.
  • Real-time Streaming: Responses are streamed to clients for a dynamic user experience.
  • Tool Integration: Agents can execute Convex functions and external APIs as tools.
  • RAG Patterns: Built-in support for Retrieval Augmented Generation for knowledge retrieval.
  • Workflow Orchestration: Enables multi-step, reliable agent tasks.
  • Use Case: Develop a customer support chatbot that remembers past interactions, can access a knowledge base to answer questions, and can create support tickets using integrated tools.

Quick Start

Install the Convex Agent component and initialize an agent with OpenAI's chat and embedding capabilities.

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, stateful AI agents with conversation history?

You can build stateful AI agents using the Convex Agent component, which facilitates thread management and ensures conversation history is saved and survives restarts. This framework provides built-in support for maintaining continuous chat interactions.

Can I integrate external APIs and custom tools into Convex workflows?

Yes, you can integrate external APIs and custom tools into Convex workflows by defining custom tool definitions for extended capabilities. Agents can execute Convex functions as tools to perform specific tasks during their orchestration processes.

Does the Convex Agent component support Retrieval Augmented Generation patterns?

Yes, the Convex Agent component supports Retrieval Augmented Generation (RAG) patterns for knowledge retrieval. It integrates with OpenAI for text embedding functionalities to enable agents to access and utilize external knowledge bases effectively.

How do I stream AI agent responses in real-time to clients?

You can stream AI agent responses in real-time to clients using the streaming capabilities integrated within the Convex Agent component. This framework facilitates real-time streaming to provide a dynamic user experience during chat interactions.

What is needed to orchestrate multi-step AI agent workflows reliably?

Orchestrating multi-step AI agent workflows reliably requires the Convex Agent component, which enables workflow orchestration for complex tasks. You need OpenAI integration for chat capabilities and custom tool definitions to execute extended functions.