#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| Rank | Project | Score |
|---|---|---|
| 1 | deepseek-harnessPlugin-based agent harness from DeepSeek with a local Web UI | 98 out of 100 |
| 2 | composioTypeScript and Python SDKs that give agents authenticated tools across 1000+ apps | 92 out of 100 |
| 3 | conductorDurable workflow engine that orchestrates microservices and LLM agents from JSON | 91 out of 100 |
| #4 | mcp-useTypeScript framework for building MCP servers with React Views and an Inspector | 87 out of 100 |
| #5 | a2uiProtocol and renderers for agents to stream native UI instead of text | 86 out of 100 |