#3636th of 64 in Agent and MCP starters

ralph-loop-agent

TypeScript library that reruns an AI SDK agent until a completion check passes

Stars
846
License
Apache-2.0
Last commit
Sep 2026
Language
TypeScript

Missed the latest GitHub check; these facts may be older.

Vercel is hiring: 87 open roles

Overview

ralph-loop-agent wraps the Vercel AI SDK's generateText in an outer loop that calls a user-supplied verifyCompletion function after each pass. If verification fails, its reason string is injected into the next iteration. Stop conditions cap iterations, tokens or estimated cost. The repo includes a CLI example using Vercel Sandbox, Playwright, PostgreSQL and GitHub PRs, and the README marks the package as experimental.

Who it is for: TypeScript developers building long-running, self-verifying agents on the AI SDK

Strengths

  • Combinable stop conditions: iterationCountIs, tokenCountIs and costIs, stopping when any one triggers
  • Failed verification reasons are fed back into the next iteration as feedback
  • Works with AI SDK tools and AI Gateway model strings
  • Built-in context summarization and streaming of the final iteration

Weaknesses

  • Marked experimental; the README warns APIs may change between versions
  • You must write verifyCompletion yourself; no default check is provided
  • Streaming runs earlier iterations non-streaming, so output only appears on the final pass
  • No tagged release is listed on the repository

What it needs

  • TypeScript, Any AI SDK LanguageModel via AI Gateway strings (e.g. anthropic/claude-opus-4.5)
  • Needs ai (Vercel AI SDK), zod, AI Gateway or a model provider

Also in Agent and MCP starters

See all 64
Also in Agent and MCP starters
RankProjectScore
1deepseek-harnessPlugin-based agent harness from DeepSeek with a local Web UI279.6k stars+32,096 (+13%) in 30 daysMIT98 out of 100
2composioTypeScript and Python SDKs that give agents authenticated tools across 1000+ apps31k stars+574 (+1.9%) in 30 daysMIT92 out of 100
3conductorDurable workflow engine that orchestrates microservices and LLM agents from JSON32.5k starsApache-2.091 out of 100
#4mcp-useTypeScript framework for building MCP servers with React Views and an Inspector Live demo ↗ (opens in a new tab)10.9k stars+132 (+1.2%) in 30 daysMIT87 out of 100
#5a2uiProtocol and renderers for agents to stream native UI instead of text Live demo ↗ (opens in a new tab)17.2k starsApache-2.086 out of 100