tylerjrbuell/reactive-agents-ts
About
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 & Machine LearningMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalReactive 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.
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 setRA_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) hasbefore,afterandon-errorhooks, 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_TRACKalways 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 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.
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:
- Packages and architecture: modular install (package list) ·
packages/(each package has its own README) · how it fits together (terms) · architecture · run lifecycle and hooks · composable kernel - Models and reasoning: LLM providers · local models · choosing a strategy · context engineering
- Tools and memory: custom tools · MCP · sub-agents · memory
- Running in production: guardrails · verification · cost · judgment layer · process model · gateway · production checklist
- Building apps: streaming · chat and sessions · composition · multi-agent · A2A · web UI (React, Vue, Svelte) · testing
- Tooling:
raxCLI · observability · examples - Versioning: pre-1.0, so minor releases may break things. Each break is listed in the changelog and What's New with migration notes; stability tiers say which surfaces are safest. Roadmap:
ROADMAP.md.
Community
- GitHub Discussions: ask questions and share what you build
- Discord: community chat
- Newsletter: the sign-up form is at the end of every docs page (double opt-in)
- GitHub: Issues · security reports go privately to a Security Advisory
- Contributing: start with
CONTRIBUTING.mdand the contributing guide
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
Explore related projects
Loading…