Reactive Agents is an open-source TypeScript agent framework, positioned as a transparent, composable agent execution harness, with the goal of achieving controllable execution, end-to-end observability, and reliable operation across the full model tier from local small models to frontier APIs.
Purpose and Positioning The framework addresses the engineering problems at the底层 of the agent loop: malformed tool calls, loops that do not terminate, mid-run context overflow, streaming differences across providers, and the lack of a clean intervention entry point when edge cases arise. Rather than taking a black-box runtime approach, it exposes every stage as typed events; prompts are readable templates; components such as the repair pipeline and context curator are inspectable and exportable, allowing local debugging and replay without a SaaS dashboard. The framework is built on Effect-TS, with service boundaries validated by schema, tagged errors, and no untyped throws.
Main Capabilities
- Transparent Execution Engine: a deterministic 12-stage execution engine, with before / after / on-error hooks provided at each stage; every prompt, tool call, and reasoning step is a typed event that is inspectable, steerable, and locally replayable.
- Full-Model-Tier Reliability: model-adaptive context configuration (four tiers: local, mid, large, frontier), tool call repair, output validation, persistent recovery after crashes, single-owner termination determination, enabling the same code to complete the agent loop on a local 4B Ollama model and on Claude, GPT, and Gemini without rewriting per model.
- Reasoning and Cognition: 8 reasoning strategies (ReAct, Blueprint (ReWOO-style single-planning parallel execution), Reflexion, Plan-Execute, Tree-of-Thought, Adaptive meta-strategy, Direct, and @experimental Code-Action); context synthesis (fast-template or deep-LLM); entropy sensors and reactive controllers detect stagnation, loops, and context pressure and trigger early stopping, compression, or strategy switching; three-layer real-time calibration.
- Memory and Skills: 4 layers of memory (working, episodic, semantic (vector + FTS5), procedural), backed by bun:sqlite, supporting background consolidation and decay; ExperienceStore Form a cross-agent learning loop through ToolCallObservation; Living Skills is compatible with SKILL.md, SQLite support, and LLM refinement evolution; provides agent.chat(), agent.session(), and the post-run DebriefSynthesizer.
- Providers and models: 8 LLM providers (Anthropic, OpenAI, Google Gemini, Groq, xAI (Grok), Ollama (local), LiteLLM (40+ models), Test (deterministic)); adaptive tool calling (FC dialect detection routes to a native function-calling driver or a three-tier text parsing driver: XML, JSON, pseudocode); the repair pipeline normalizes tool name aliases, parameter aliases, paths, and type conversions before execution; withFallbacks() fallback chain; native thinking mode; cost-aware routing .withModelRouting().
- Production safety: optional judgment layer .withJudgment() / agent.judge(); guardrails (pre-LLM injection detection, PII filtering, toxicity blocking, optional judgment battery, kill switch, behavioral contracts); Ed25519 cryptographic identity and RBAC, delegation chains, audit trails; verification (semantic entropy, fact decomposition, NLI hallucination detection); fabrication protection enabled by default (rejects fabricated experiential measurements that do not exist in the tool observation corpus); stagnation policy; forced abstention; cost control (complexity router, semantic cache, cross-restart budget); required tools; deliverable authenticity; evidence ledger.
- Observability: 12-stage execution engine with per-stage hooks; EventBus-driven metrics dashboard; OTLP distributed tracing and structured logging; Cortex real-time reporting (WebSocket); agent.runStream() streaming and SSE; per-iteration evaluation.
- Composition and multi-agent: Builder API, agent-as-data (toConfig() / fromJSON()), ReactiveAgents.quick(); functional combinators agentFn(), pipe(), parallel(), race(); A2A protocol (Agent Cards, JSON-RPC 2.0 server/client, SSE streaming, agent-as-tool); orchestration (sequential, parallel, pipeline, map-reduce, bounded-depth dynamic sub-agents); persistent gateway (adaptive heartbeat, cron, webhook (GitHub adapter), policy engine, chat mode with per-sender SQLite history).
- Builder hardening: withStrictValidation, withTimeout, withLlmTimeout, withRetryPolicy, withErrorHandler, withFallbacks, withLogging, withHealthCheck, withMinIterations, withVerificationStep, withOutputValidator, withCustomTermination, withTaskContext; defineTool supports Standard Schema input (Effect Schema, Zod, Valibot, ArkType) with plain async handlers; ToolBuilder streaming API; runtime dynamic tool registration; optional .withLongHorizon(), experimental .withAdaptiveHarness(), .withHarness({...}).
- Frontend integration: @reactive-agents/ui-core (headless, framework-agnostic, versioned wire protocol, resumable stream client, run state machine, safe generative UI tree, persistent human-in-the-loop); @reactive-agents/react (React 18+ hooks and components: useRun, useResumableRun, useInteractions, AgentSurface, AgentDevtools); @reactive-agents/vue (Vue 3 composables); @reactive-agents/svelte (Svelte 4/5 store). All are based on ui-core and consume AgentStream.toSSE().
Usage Installation: Bun ≥1.0.0 is recommended (native SQLite, subprocesses, HTTP API); Node.js 22.5+ is also supported via @reactive-agents/runtime-shim. Install Bun: curl -fsSL https://bun.sh/install | bash. effect is automatically installed as a reactive-agents dependency; if importing effect directly, it must be installed explicitly: bun add effect or npm install effect. After setting the provider key, createAgent(config) is the entry point: a declarative configuration object, consistent in shape with the Vercel AI SDK and the OpenAI SDK. Capabilities are added as configuration keys, grouped by domain, and can start from preset profiles ("lean", "balanced", "intelligent") with individual keys overridden. createAgent(config) and the streaming builder are two syntaxes for the same API, with the same names and nesting. Sessions: agent.chat() for single-turn question answering, agent.session() for multiple turns. An Agent can be defined as a JSON-serializable configuration object. Composable API, AsyncGenerator streaming (an AbortSignal can be passed to cancel midway). Agents are treated as processes: rax ps lists persistent runs, rax attach <runId> follows them, and recorded runs can be re-executed via exact replay with zero tokens (makeReplayLLMLayer; only for unchanged prompts, drift fails explicitly). Lifecycle hooks can intercept the before, after, or error of 12 execution stages. The local studio is started with .withCortex() or rax run --cortex. Project tests: 9,979 tests across 1,312 files, with the most recent full run at 9,979 passed / 0 failed / 26 skipped / 4 todo (2026-10-10).
Applicable scenarios TypeScript agent systems that need to be auditable, observable, and intervenable; running the same code across local small models and frontier APIs; multi-step tasks requiring tool-call repair, validation, crash recovery, and evidence receipts; scenarios requiring memory and skill accumulation, multi-agent orchestration, frontend integration, and production safety guardrails.
Limitations All of the above information comes from the project's own description. Specific pricing, licensing details, and performance benchmarks are not provided in this material and are not available for now.