faveos8758

Self-improving LLM agent in TypeScript using Reflexion (verbal RL): custom evaluators, reflexion memory, HTTP API, CLI. Built with Vercel AI SDK.

20
0
100% credibility
Found Apr 19, 2026 at 20 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

A TypeScript library for building self-improving AI agents that reflect on failures, retry tasks like code fixes or math problems, and remember lessons, usable via command line, web API, or code integration.

How It Works

1
🕵️ Discover the smart learner

You find this helpful AI tool that gets better by thinking about its mistakes and trying again.

2
💻 Get it ready

Download the tool to your computer and prepare it with simple setup steps.

3
🔌 Connect a thinking brain

Link the tool to an AI service so it can generate smart answers and reflections.

4
Pick your way to play
💬
Chat mode

Talk to it directly by typing tasks and watching live improvements.

🌐
Web helper

Start a simple web service to send tasks and get results back.

🔧
Build inside

Add it to your own project to make your apps smarter.

5
📝 Give it a challenge

Describe a task like fixing a wrong calculation or correcting a simple error.

6
Watch it improve

See the magic as it attempts, learns from slip-ups, remembers lessons, and nails the task.

🎉 Celebrate success

Receive the perfect answer after a few smart tries, with history saved for even better future results.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 20 to 20 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is reflexion-agent-ts?

This GitHub self-improving LLM agent in TypeScript implements the Reflexion pattern to make language models learn from failures: it executes a task, evaluates the output, reflects on errors via verbal feedback, stores lessons in simple memory, and retries until success or max attempts. Developers get a ready-to-use library for tasks like code fixing or math solving, with built-in evaluators, plus a REST API (POST /run on port 3000) and interactive CLI—all powered by Vercel AI SDK for OpenAI or Ollama compatibility. No external vector DB needed at first; memory persists to files for self-improving LLMs across sessions.

Why is it gaining traction?

It stands out as a lightweight TypeScript take on self-improving LLM agents at test-time, with zero-setup Docker, offline CLI demos, and full API embedding without side effects. Custom evaluators handle code fixes, math, or lenient checks out-of-box, while keyword-based memory retrieval boosts retries without heavy dependencies—perfect for quick prototypes versus bloated agent frameworks. Early adopters dig the verbose feedback history and 15 offline tests covering API/CLI/memory.

Who should use this?

AI engineers in Node.js stacks prototyping self-improving coding agents or math solvers. Backend devs needing a drop-in HTTP service for LLM tasks with reflection loops. TS hobbyists experimenting with self-improving LLMs via CLI for bug fixes or recursive problem decomposition.

Verdict

Worth forking for TS LLM tinkering—solid docs, examples, and test coverage punch above 20 stars and 1.0% credibility, but treat as early alpha for production. Spin up the Docker API today if Reflexion's verbal RL hooks you.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.