Skip to content

Installation

The easiest way to get started is with the reactive-agents meta-package, which bundles everything:

Terminal window
# Bun (recommended)
bun add reactive-agents effect
# npm
npm install reactive-agents effect
# pnpm
pnpm add reactive-agents effect

Then import from a single entry point:

import { ReactiveAgents } from "reactive-agents";

The framework is modular — install only the packages you need:

PackageDescriptionRequired?
@reactive-agents/coreEventBus, AgentService, TaskService, typesYes
@reactive-agents/runtimeExecutionEngine, ReactiveAgentBuilderYes
@reactive-agents/llm-providerLLM adapters (Anthropic, OpenAI, Gemini, Ollama, LiteLLM 40+)Yes
effectEffect-TS runtimeYes
@reactive-agents/memoryWorking, Semantic, Episodic, Procedural memoryOptional
@reactive-agents/reasoningReAct, Plan-Execute, Tree-of-Thought, ReflexionOptional
@reactive-agents/toolsTool registry, sandbox, MCP clientOptional
@reactive-agents/guardrailsInjection, PII, toxicity detectionOptional
@reactive-agents/verificationSemantic entropy, fact decompositionOptional
@reactive-agents/costComplexity routing, budget enforcementOptional
@reactive-agents/identityAgent certificates, RBACOptional
@reactive-agents/observabilityTracing, metrics, structured loggingOptional
@reactive-agents/interaction5 interaction modes, checkpointsOptional
@reactive-agents/orchestrationMulti-agent workflowsOptional
@reactive-agents/a2aAgent-to-Agent protocol, Agent Cards, JSON-RPC, SSE streamingOptional
@reactive-agents/promptsTemplate engine, built-in prompt libraryOptional
Terminal window
bun add @reactive-agents/core @reactive-agents/runtime @reactive-agents/llm-provider effect

Create a .env file:

Terminal window
# LLM Provider — set at least one
ANTHROPIC_API_KEY=sk-ant-... # Anthropic Claude
OPENAI_API_KEY=sk-... # OpenAI GPT-4o
GOOGLE_API_KEY=... # Google Gemini
# Tools (optional)
TAVILY_API_KEY=tvly-... # Enables built-in web search tool
# Embeddings (for Tier 2 semantic memory)
EMBEDDING_PROVIDER=openai # "openai" | "ollama"
EMBEDDING_MODEL=text-embedding-3-small
# Tuning (optional)
LLM_DEFAULT_MODEL=claude-sonnet-4-20250514
LLM_DEFAULT_TEMPERATURE=0.7
LLM_MAX_RETRIES=3
LLM_TIMEOUT_MS=30000

Reactive Agents requires TypeScript 5.5+ with strict mode:

{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"exactOptionalPropertyTypes": true,
"noUncheckedIndexedAccess": true
}
}