Convex Agent
Build AI agents on Convex with persistent threads, tool calls, streaming, and RAG.
- Source repo
- convex/agent
- Stars
- ★ 361
- Last updated
- 2d ago
- FARS reviewed
- Nov 27, 2026
- License
- Apache-2.0
- Primary language
- TypeScript
- FA score
- 58/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specific
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Product teams building a chat assistant in a Convex app who need persistent thread history and reactive multi-client updates without building an HTTP streaming layer.
- Not a fit if
- Teams that need an agent runtime decoupled from the Convex backend
- Teams looking for a ready-made chat UI rather than a backend component
- Projects standardized on another backend or database and unwilling to adopt Convex
- Website
- docs.convex.dev/agents ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-25
- Source review
- 58/100 · Major gaps 2 safety controls not found
What does this agent do, and when should you use it?
Convex Agent is an npm package (@convex-dev/agent) and Convex component for building AI agents on the Convex backend. It persists threads and messages that agents use in static or dynamic workflows, and threads can be shared by multiple users and agents, including human agents. The Agent abstraction covers use-case-specific prompting, associated models, Tool Calls, and behavior relative to other agents, functions, and APIs. Text and objects stream as deltas over websockets from async functions, so clients stay in sync without HTTP streaming. Conversation context is automatically included in each LLM call, with hybrid vector/text search inside a thread and opt-in search across threads for the same user; RAG, workflows, files, debugging, usage tracking, and rate limiting are supported through the RAG Component, Convex file storage, the agent playground, callbacks, and the Rate Limiter Component. The component runs inside Convex functions and storage boundaries, keeping long-running workflows separate from the UI while clients receive reactive updates.
After installation, the Agent component manages Threads and messages in Convex and stores them as persistent chat history. An Agent defines use-case-specific prompts, associated models, and Tool Calls; it runs LLM calls in static or dynamic workflows and automatically includes conversation context. Context retrieval covers hybrid vector/text search within a thread and optional cross-thread search for the same specified user. RAG can be applied up front in the prompt or as tool calls, either through the RAG Component or a DIY implementation. Output streams text and objects as deltas over websockets, including from async functions; Workflows support durable multi-step operations that span agents and users. Files are saved to Convex file storage with ref-counting, debugging uses callbacks, the agent playground, and dashboard inspection, usage is attributed per provider, model, user, and agent, and rate limiting is powered by the Rate Limiter Component.
- Product teams building a chat assistant in a Convex app who need persistent thread history and reactive multi-client updates without building an HTTP streaming layer.
- Developers implementing multi-step agent workflows that span several agents and users and must run durably and reliably.
- Teams adding retrieval-augmented prompts through the Convex RAG Component or a custom retrieval tool.
- Applications that need file attachments in chat history, saved automatically to Convex file storage with ref-counting.
- Teams that need LLM usage attribution per provider, model, user, and agent, plus rate limiting for billing or provider quotas.
- Developers debugging prompts and context settings through the agent playground and dashboard inspection.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm i @convex-dev/agent
How do you install or deploy this agent?
Install the package:
npm i @convex-dev/agentRun the repository example:
git clone https://github.com/convex/agent.git
cd agent
npm run setup
npm run devThe README does not document the required LLM provider API keys, Convex project credentials, or environment variables; those details are in https://docs.convex.dev/agents. The runtime needs Node.js/npm and a Convex backend.
How do you use this agent?
The example app starts with:
npm run devThen define Agents and create Threads in Convex functions, send messages, and let clients subscribe to thread updates. The README does not include a minimal Agent definition or invocation snippet; use https://docs.convex.dev/agents/agent-usage and https://docs.convex.dev/agents/threads for the actual API.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- confirmation before acting
- sensitive-data handling — Use dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.
What are this agent's strengths and limitations?
- Persists threads and messages as a Convex component and keeps clients in sync with reactive updates plus websocket delta streaming, with no HTTP streaming layer to build.
- Automatically includes conversation context, including hybrid vector/text search within a thread and opt-in cross-thread search for the same user.
- Fits the Convex component ecosystem: RAG Component for retrieval, Rate Limiter Component for limits, and Convex file storage with ref-counting for thread files.
- Supports durable multi-step Workflows across agents and users, plus usage attribution per provider/model/user/agent and an agent playground for prompt and context debugging.
- Core operation depends on the Convex backend and component model; it is not a standalone agent runtime outside Convex.
- The README does not list supported LLM providers or document required API keys, environment variables, or a minimal code example, so provider fit needs separate verification.
- The package is Apache-2.0, but LLM calls require your own provider account and usage-based payment; no local-model path is documented.
- Files, RAG, and rate limiting are tied to Convex file storage, the RAG Component, and the Rate Limiter Component, so moving to another backend requires re-integration.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Convex Agent This agent | 58 · Major gaps | Library / SDKFree + model costs | ★ 361 | 2d ago | TypeScript | — |
| Microsoft Agent Framework for Go | 82 · Good | Library / SDKFree + model costs | ★ 709 | today | Go | OpenAI API |
| AgentOS | 64 · Some gaps | Library / SDKFree + model costs | ★ 693 | today | TypeScript | Claude Code · OpenAI API · Claude API |
| ai4j — Java AI Agentic SDK | 60 · Some gaps | Library / SDKFree + model costs | ★ 443 | 4d ago | Java | OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
Trust evidence is mixed. Tool approval is well documented with needsApproval, approveToolCall/denyToolCall, atomic batch decisions, and auto-denial, so user_confirmation scores 3. least_privilege scores 1: the docs require the application to implement authorizeThreadAccess, and the basic example even comments it out; the component has no default authorization. data_flow_transparency scores 2: context, usageHandler, rawResponseHandler, and streaming callbacks are described, but there is no end-to-end data-flow or retention policy. sensitive_data_handling scores 0: no PII redaction, secret handling, encryption, or retention guidance is visible. dependency_security scores 2: GitHub Actions are SHA-pinned, allowScripts disables some install scripts, and dev dependencies are exact, but there is no audit/SBOM/lockfile evidence. external_effects scores 2: dangerous tools can require human approval and rate limiting exists, but there is no sandbox or global external-effect policy. rollback scores 0: no tool-side-effect rollback or undo mechanism is shown, only an aborted streaming state. source_attribution scores 2: README links docs, a Stack post, video, and DeepWiki, and package metadata includes repository/homepage, but third-party NOTICE/attribution details are absent.
self_consistency scores 2: README, CLAUDE.md, package.json, and docs broadly agree on v0.7, AI SDK v7, and Node 22, but examples mix zod/v3 and zod/v4, a minor inconsistency. dependency_availability scores 1: package.json lists peer/dev dependencies, but no lockfile is included, so static resolution cannot be confirmed. failure_messages scores 1: there are scattered messages such as HTTP error, components.agent type-error guidance, and the auto-denied reason, but no systematic error taxonomy or recovery guidance.
audience_and_scenarios scores 3: README and docs cover chat, RAG, workflows, tool calling, streaming, React hooks, and usage tracking, with a clear developer audience. capability_boundaries scores 2: docs state that object generation does not support tools, client tools cannot set needsApproval, Gateway is for paid teams, and Node 22/AI SDK v7 are required, but boundaries are not centrally summarized. trigger_precision scores 1: tool calling and stopWhen exist, but this is framework behavior rather than an explicit trigger/activation mechanism, so trigger precision evidence is thin. environment_fit scores 2: Convex project, Node >=22, AI SDK v7, and optional React are clearly stated, but the environment is narrow.
information_architecture scores 2: README, docs sidebar structure, and CLAUDE.md architecture notes are organized, but there is no unified index or complete table-of-contents evidence. install_notes scores 3: getting-started provides npm install, convex.config.ts, npx convex dev, and peer dependency requirements, a complete install path. naming_stability scores 2: export surfaces, deprecation notes, and semver versioning exist, but no explicit naming-stability policy is shown. examples_and_faq scores 2: README and docs contain many examples and reference example files, but there is no FAQ. known_limitations scores 2: object generation without tools, client-tool limits, and Gateway paid-tier limits are documented, but not comprehensively. license scores 3: LICENSE is Apache-2.0 and package.json declares Apache-2.0, with sufficient evidence. versioning_changelog scores 2: version 0.7.11, MIGRATION.md, and changesets tooling exist, but no CHANGELOG is in the packet. maintenance_responsibility scores 1: issues link and support email exist, but the publisher is unverified and maintainers/security policy are absent.
output_usability scores 2: the product outputs messages, streaming text, React hooks, and documented examples, usable for ordinary cases, though static review cannot verify runtime behavior. marginal_value scores 2: it adds persistent threads, streaming, RAG, and tool approval on Convex, but overlaps with native AI SDK/Convex capabilities. cost_benefit scores 2: usage tracking and rate limiting exist, but there are no cost caps or budget controls, so LLM cost risk remains application-managed.
claim_traceability scores 2: README feature claims mostly link to docs, examples, and package metadata, so traceability is fair, but no tests or runtime evidence are included. cross_source_corroboration scores 2: README, docs, package.json, and CLAUDE.md corroborate version, installation, and features, but independent or test corroboration is absent. fact_inference_separation scores 1: docs mix examples, recommendations, and factual claims without clearly separating verified facts from inference, so static review remains low-confidence.
- Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- The component has no default authorization; docs require the application to implement authorizeThreadAccess, and the basic example comments it out, so thread-level authorization must be added before deployment.
- No sensitive-data handling guidance is visible: chat history, files, usage data, and raw request/response logs may contain PII or secrets, but there is no redaction, encryption, or retention guidance.
- Tool side effects have no rollback or undo mechanism; for deletion, money transfer, or email sending, rely on needsApproval and design compensating flows yourself.
- No lockfile is included, so dependency resolution cannot be statically confirmed; pin dependencies and run an audit before production use.
- Publisher identity is unverified and maintainers/security policy are absent, leaving maintenance responsibility and vulnerability response paths unclear.
- The repository's Agatha CI workflow pushes PR commits to an external service and requests an OIDC token; this is CI behavior, not product runtime, but its data egress and write permissions still warrant review.
FAQ
Which LLM providers does it support?
Do I need Convex?
How do clients receive streaming output?
Does it include a chat UI?
How is cost handled?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.