lamemind

React Agent TS — AI skill for Claude Code

AI community

A lightweight, streaming-first ReAct (Reasoning + Acting) agent that works with any LangChain-compatible model.

How to install React Agent TS

This entry records only its repository, not the path inside it, so there is no exact command to give. Open lamemind/react-agent-ts and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What React Agent TS does

A lightweight, streaming-first ReAct (Reasoning + Acting) agent that works with any LangChain-compatible model. Focus on agent logic while LangChain handles the provider complexity.

Alternatives in AI

  • My Free Code — Open-source multi-provider AI gateway for Claude Code and other coding agents, with model routing, streaming 633 ★
  • Model Hierarchy Skill — Cost-optimized model routing based on task complexity 333 ★
  • PRD Taskmaster V2 — Zero-config goal-to-tasks engine 187 ★

README

@lamemind/react-agent-ts

[![npm version](https://badge.fury.io/js/@lamemind%2Freact-agent-ts.svg)](https://badge.fury.io/js/@lamemind%2Freact-agent-ts) [![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue)](https://www.typescriptlang.org/) [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

**Streaming ReAct agent in TypeScript - bring your own LLM model**

A lightweight, streaming-first ReAct (Reasoning + Acting) agent that works with any LangChain-compatible model. Focus on agent logic while LangChain handles the provider complexity.

✨ Features

  • 🔄 Streaming-first: Real-time chunked response processing
  • 🔧 Tool Integration: Seamless function calling with automatic iteration
  • 🎯 Provider Agnostic: Works with any LangChain model (Anthropic, OpenAI, Groq, local, etc.)
  • 💡 Minimal: ~200 LOC focused on ReAct pattern only
  • 🔐 Type Safe: Full TypeScript support with proper interfaces
  • ⚡ Zero Config: Just pass your model and tools

📦 Installation

npm install @lamemind/react-agent-ts

You'll also need a LangChain model provider:

# Choose your provider
npm install @langchain/anthropic    # for Claude
npm install @langchain/openai       # for GPT
npm install @langchain/google-genai  # for Gemini

🚀 Quick Start

import { ChatAnthropic } from "@langchain/anthropic";
import { ReActAgent } from "@lamemind/react-agent-ts";
import { DynamicTool } from "@langchain/core/tools";

// Create your model
const model = new ChatAnthropic({
  apiKey: process.env.ANTHROPIC_API_KEY,
  model: "claude-3-sonnet-20240229"
});

// Define tools
const tools = [
  new DynamicTool({
    name: "calculator",
    description: "Performs basic math operations",
    func: async (input: string) => {
      return eval(input).toString();
    }
  })
];

// Create and use agent
const agent = new ReActAgent(model, tools);
const response = await agent.invoke("What'