Build AI agents with message history, vector search, and long-running workflows that stay reactive to your Convex database changes.
npm install @convex-dev/agentConvex provides powerful building blocks for building agentic AI applications, leveraging Components and existing Convex features.
With Convex, you can separate your long-running agentic workflows from your UI, without the user losing reactivity and interactivity.
The Convex AI Agent component provides built-in message history storage that persists across sessions. Your agents maintain conversation context and can reference previous interactions while staying synchronized with your database state.
This component includes integrated vector search functionality for semantic retrieval within agent workflows. Agents can search through documents, previous conversations, or knowledge bases using embeddings without setting up separate vector databases.
The component separates AI agent execution from your user interface using Convex's reactive architecture. Users get real-time updates on agent progress while the AI processes run independently in the background.
Agents built with this component can subscribe to Convex database changes and trigger actions automatically. When your data updates, agents can respond immediately without polling or manual triggers.
The Convex AI Agent component automatically stores conversation history in your Convex database with full ACID guarantees. Message threads persist across user sessions and remain queryable, with built-in indexing for fast retrieval during agent reasoning.
Yes, agents built with the Convex AI Agent component can subscribe to database mutations and trigger workflows automatically. This enables agents that respond immediately to new data, user actions, or external events without polling.
The AI Agent component includes built-in vector search powered by Convex's vector database features. Agents can perform semantic search over documents, conversation history, or custom embeddings without managing separate vector infrastructure.
The Convex AI Agent component runs workflows as background processes that don't block your UI. Agents can execute multi-step reasoning, make API calls, and update state over time while users receive real-time progress updates through Convex's reactive subscriptions.
No, the Convex AI Agent component runs entirely within your existing Convex backend. Message storage, vector search, and workflow execution all use Convex's infrastructure, eliminating the need for additional databases or orchestration tools.