Skip to content
프로젝트

소개

Agents you can control, audit and improve. An open-source TypeScript framework for building agents, built on a controllable, observable harness that runs reliably on local models and frontier APIs.

AI 및 머신러닝

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
Reactive Agents

Reactive Agents

Agents you can control, audit and improve.

An open-source TypeScript framework for building agents, built on a controllable, observable harness that runs reliably on local models and frontier APIs.

CI npm License: MIT TypeScript Effect-TS Bun PRs Welcome Open in GitHub Codespaces

Documentation · Quick Start · How it compares · Cortex · Discussions · Discord


What's different about Reactive Agents

  • The same code runs on a local or a hosted model. A 4B Ollama model or Claude, GPT or Gemini: only the model line changes. Per-model context profiles, tool-call healing (packages/tools/src/healing), output verification and a single exit gate (terminate.ts) do the adapting. See the demo.
  • A receipt for every run. Each run returns a record of what it used and did (tools called, deliverables, what the harness changed, how it ended) with a verdict on its evidence trail. Ed25519 signing is off by default: add .withReceiptSigning() or set RA_RECEIPT_KEY. Receipt schema.
  • Failed runs explain themselves. Every run writes a trace, and rax diagnose cause <runId> names why it failed. Each of the 12 lifecycle phases of a run (packages/runtime/src/engine) has before, after and on-error hooks, and replay re-runs a trace with tool results held fixed (model calls stay live). rax diagnose · Snapshot & replay.
  • Runs can survive a crash. Opt in with .withDurableRuns(): the run checkpoints each step and a fresh process resumes it. Durable execution · demo.
  • Quiet and private by default. No telemetry unless you opt in (DO_NOT_TRACK always wins), and output is quiet when piped. Memory, guardrails, cost routing and durability run only when you add them with a .with*() call (builder). Reactive Intelligence, the harness layer that watches entropy and progress signals and intervenes, is on by default (experimental) and sends no data anywhere. Observability.
  • A local studio, no hosted dashboard. Cortex shows runs live, lets you inspect traces and build agents, all on your machine. Cortex docs.
8 LLM providers Anthropic, OpenAI, Gemini, Groq, xAI, Ollama (local), LiteLLM (40+ models), Test
8 reasoning strategies ReAct, Blueprint, Reflexion, Plan-Execute, Tree-of-Thought, Adaptive, Direct, Code-Action (@experimental)
20,700+ tests Rounded-down count from a full-suite run (bun run repo test --all)
Effect-TS end to end Schema-validated boundaries and tagged errors; a shrink-only CI ratchet drains the remaining string throws
The same Reactive Agents code investigating an incident with two tools and recommending a fix — completing on a local 4B Ollama model and on Claude, only the provider/model line changes

The same agent investigates an incident with two tools and recommends a fix, on a 4B local model and on Claude. Only the model line changes. Demo source · crash-and-resume demo.

Quick Start

Install and run your first agent in 5 minutes. Bun (recommended) or Node.js 22.5+, same code on both.

bun add reactive-agents        # Bun (recommended)
npm install reactive-agents    # Node.js 22.5+

export ANTHROPIC_API_KEY=sk-ant-...   # or put it in .env; no key? use provider 'ollama'
import { createAgent } from 'reactive-agents'

const agent = await createAgent({
  name: 'assistant',
  provider: 'anthropic',
  model: 'claude-sonnet-4-6',
})

const result = await agent.run('Explain quantum entanglement')
console.log(result.output)
console.log(result.metadata) // { duration, cost, tokensUsed, stepsCount }

No Effect knowledge needed for the basics. effect is a peer dependency; if you import from effect yourself, add it with bun add effect. Next: Quickstart guide · Installation and environment variables · Your first agent.

A tool-using agent on a local model

Capabilities are opt-in, one .with*() call at a time. Swap ollama for anthropic, openai or gemini and nothing else changes:

import { ReactiveAgents, defineTool } from 'reactive-agents'
import { Schema } from 'effect'

const lookupOrder = defineTool({
    name: 'lookup_order',
    description: 'Look up the shipping status of an order',
    input: Schema.Struct({ orderId: Schema.String }),
    // args is typed as { orderId: string }
    handler: async (args) => `Order ${args.orderId}: shipped, arriving Thursday`,
})

const agent = await ReactiveAgents.create()
    .withProvider('ollama')
    .withModel('qwen3:4b')
    .withReasoning()
    .withTools({ tools: [lookupOrder] })
    .build()

const result = await agent.run('Where is order 1042?')
console.log(result.output)

createAgent(config) and the fluent builder are the same API in two syntaxes. Full reference: builder API · configuration · cheatsheet.

How it compares

Reactive Agents focuses on reliability across model tiers, evidence for every run, traces you can diagnose, and capabilities that are all opt-in. It is not a feature-count contest: token streaming, tool calling, and multi-agent orchestration are table stakes in this space. Side-by-side write-ups, dated, corrections welcome: vs Vercel AI SDK · vs LangGraph · vs Mastra · vs agent SDKs · migrating from LangChain.

Cortex Studio

A local studio for live debugging: watch runs as they happen, inspect traces, edit plans, and build agents on your machine. Start it with .withCortex() or rax run --cortex; standalone: bun add @reactive-agents/cortex, then rax cortex.

Cortex run view for a run that hit its iteration limit, with the Why it ended card open: cause, what to try, decisive steps, and the trace below.

The run view's Why it ended card: the cause, who is at fault, what to try, and the steps that decided it. Cortex docs and more screenshots.

Learn more

Everything else lives on the documentation site:

Community

bun install              # Install dependencies
bun test                 # Run full test suite (20,700+ tests / 2,700+ files)
bun run build            # Build all packages

Used by: Reactive Agents is in early access. Using it in production or research? Open a PR adding your name, or say hi in Discussions.

Your team here.

License

MIT

관련 프로젝트 살펴보기

불러오는 중…