convex-agents

Solid

Building AI agents with the Convex Agent component including thread management, tool integration, streaming responses, RAG patterns, and workflow orchestration

AI & Automation 403 stars 30 forks Updated 4 months ago Apache-2.0

Install

View on GitHub

Quality Score: 86/100

Stars 20%
87
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Convex Agents Build persistent, stateful AI agents with Convex including thread management, tool integration, streaming responses, RAG patterns, and workflow orchestration. ## Documentation Sources Before implementing, do not assume; fetch the latest documentation: - Primary: https://docs.convex.dev/ai - Convex Agent Component: https://www.npmjs.com/package/@convex-dev/agent - For broader context: https://docs.convex.dev/llms.txt ## Instructions ### Why Convex for AI Agents - **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 ### Setting Up Convex Agent ```bash npm install @convex-dev/agent ai openai ``` ```typescript // convex/agent.ts 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, }); ``` ### Thread Management ```typescript // convex/threads.ts import { mutation, query } from "./_generated/server"; import { v } from "convex/values"; import { agent } from "./agent"; // Create a new conversation thread export const createThread = mutation({ args: { userId: v.id("users"), title: v....

Details

Author
waynesutton
Repository
waynesutton/convexskills
Created
4 months ago
Last Updated
4 months ago
Language
JavaScript
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category