Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Reactive Agents?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tylerjrbuell-reactive-agents)
---
name: reactive-agents
description: Orient to the Reactive Agents framework, understand the builder API shape, and select the right capability skills for your task.
compatibility: Reactive Agents TypeScript projects using @reactive-agents/*
metadata:
author: reactive-agents
version: "2.0"
tier: "discovery"
---
# Reactive Agents — Framework Orientation
## Agent objective
After loading this skill you know: (1) what the framework does, (2) the canonical builder chain pattern, (3) which capability skills to load for the task at hand.
## Framework overview
Agents you can control, audit and improve. Reactive Agents is an open-source TypeScript framework for building agents, built on a controllable, observable harness that runs reliably on local models and frontier APIs. It is an Effect-TS layered runtime. Agents are composed via a fluent `ReactiveAgentBuilder` — each `.withX()` call wires in an optional capability layer. The runtime ships as focused `@reactive-agents/*` packages covering reasoning, memory, tools, MCP, guardrails, identity, observability, orchestration, cost, verification, eval, A2A networking, and web framework integrations (React, Vue, Svelte).
Eight LLM providers are supported: `anthropic`, `openai`, `gemini`, `groq`, `xai`, `ollama`, `litellm`, and `test`.
## Terms
One name per concept (full definitions: https://docs.reactiveagents.dev/concepts/how-it-fits/?utm_source=agent-skills, one-liners: https://docs.reactiveagents.dev/reference/glossary/).
- **Builder**: the typed, chainable API (`ReactiveAgents.create().with*()`) that produces an agent.
- **Run**: one execution of a task, with exactly one outcome (success, partial, failed, aborted).
- **Session and turn**: a chat session is a sequence of turns; a turn is one user message and the agent's reply.
- **Pass**: one execution of the kernel loop inside a run; plan-execute runs one pass per plan step.
- **Iteration**: one model turn inside a pass; `maxIterations` counts iterations across all passes.
- **Lifecycle phase**: one of the 12 ordered phases of the run lifecycle; `.withHook()` attaches here.
- **Harness**: everything that governs the model's work inside a run: strategy, kernel, context, tools, guards and gates, Reactive Intelligence, verification.
- **Kernel**: the one reasoning loop every looping strategy runs on.
- **Strategy**: the policy over the kernel: how many passes and in what shape.
- **Guard**: a kernel check that can block or redirect an action on one iteration.
- **Approval gate**: waits for a person to approve a risky action.
- **Exit gate**: the single place that decides a pass is done and with what outcome.
- **Guardrails**: safety checks on inputs and outputs (injection, PII, toxicity); not kernel guards.
- **Reactive Intelligence**: the harness layer that watches run signals and intervenes through the RI controller; on by default, experimental.
- **Built-in tools and meta tools**: built-in tools do work; meta tools (`final-answer`, `todo`, `recall`, …) steer the run.
- **rax diagnose**: the command that explains a recorded run (`rax diagnose cause <run>`).
## Two syntaxes, one API
`createAgent(config)` (declarative) and `ReactiveAgents.create().withX()` (fluent)
are the **same API** — same key names, same nesting, validated against the same
`AgentConfigSchema`. Prefer `createAgent` for static definitions (the 90% case);
reach for the builder when construction is conditional/imperative or needs a
code-only escape hatch (`.withHook`, `.withLayers`, `.compose`).
### Canonical pattern — `createAgent(config)` (front door)
```ts
import { createAgent } from "@reactive-agents/runtime";
const agent = await createAgent({
name: "my-agent",
provider: "anthropic", // required
model: "claude-sonnet-4-6", // optional — provider default if omitted
reasoning: { defaultStrategy: "adaptive" },
execution: { maxIterations: 10 }, // `execution.maxIterations` in a config object
tools: {}, // enables built-in tools
memory: { tier: "enhanced", dbPath: "./agent.db" },
observability: { verbosity: "normal", live: true },
});
const result = await agent.run("Your task here");
console.log(result.output);
console.log(result.metadata.iterations, result.metadata.strategyUsed); // iterations = kernel iterations across all passes
```
### Same agent — fluent builder
```ts
import { ReactiveAgents } from "@reactive-agents/runtime";
const agent = await ReactiveAgents.create()
.withName("my-agent")
.withProvider("anthropic")
.withModel("claude-sonnet-4-6")
.withReasoning({ defaultStrategy: "adaptive", maxIterations: 10 })
.withTools({ builtins: true })
.withMemory({ tier: "enhanced", dbPath: "./agent.db" })
.withObservability({ verbosity: "normal", live: true })
.build(); // always await — returns Promise<ReactiveAgent>
```
## Skill routing — select by what you're building
| Building... | Load these skills |
|---|---|
| Any agent (start here) | `builder-api-reference` |
| Task agent (research, analysis, coding) | `reasoning-strategy-selection`, `tool-creation` |
| Agent that runs shell commands | `shell-execution-sandbox` |
| Agent with persistent memory | `memory-patterns`, `context-and-continuity` |
| Agent using MCP tools | `mcp-tool-integration` |
| Always-on / scheduled agent | `gateway-persistent-agents` |
| Multi-agent workflow | `multi-agent-orchestration` |
| Agent embedded in a web app | `ui-integration`, `interaction-autonomy` |
| Production / multi-tenant agent | `identity-and-guardrails`, `cost-budget-enforcement` |
| Agent with output quality guarantees | `reasoning-strategy-selection`, `quality-assurance` |
| Agent-to-agent networking | `a2a-agent-networking` |
| Custom provider behavior or local models | `provider-patterns` |
| Local studio: watch runs, chat, build agents without code | `cortex-studio` |
## Recipe skills — complete reference implementations
Load a recipe skill for a full working example:
| Recipe | What it builds |
|---|---|
| `recipe-research-agent` | Research/analysis agent with memory + verification |
| `recipe-code-assistant` | Code generation + sandboxed shell execution |
| `recipe-persistent-monitor` | Always-on monitoring via gateway + crons |
| `recipe-orchestrated-workflow` | Multi-agent pipeline, lead/worker pattern |
| `recipe-saas-agent` | Multi-tenant agent with identity + cost controls |
| `recipe-embedded-app-agent` | Agent in React/Vue/Svelte with streaming UI |
## Builder factory methods
```ts
createAgent(config) // declarative front door — validate + build in one call
ReactiveAgents.create() // blank builder
ReactiveAgents.fromConfig(config) // from AgentConfig object → builder
ReactiveAgents.fromJSON(json) // from JSON string
builder.runOnce("task") // build + run + dispose in one call (builder method)
builder.buildEffect() // returns Effect<ReactiveAgent> for Effect runtimes
```
## Pitfalls
- `.build()` is async — always `await` it; forgetting causes silent "agent is undefined" errors
- `.withProvider()` is required — there is no default provider
- `.withTools()` with no args registers the built-ins but hides them from the model (and logs a build warning that the agent has no tools that do work if nothing else is configured). Opt in with `.withTools({ builtins: true })` for the 5 standard tools (`web-search`, `http-get`, `file-read`, `file-write`, `code-execute`) or `builtins: [...]` for a subset. `code-execute` runs JavaScript/TypeScript (Bun) or Python 3 (`language: "python"`, host `python3`; `print()` the answer) as a host subprocess in `/tmp` with a minimal env; it is not isolated unless `RA_SANDBOX=docker`. Shell execution is **opt-in only** via `.withTools({ terminal: true })`; use `allowedTools` to restrict standard tools
- Strategy name is `"plan-execute-reflect"` — **not** `"plan-execute"` (throws `StrategyNotFoundError`)
- Memory tiers are `"standard"` and `"enhanced"` — **not** `"1"` and `"2"` (those are deprecated)
- `"groq"` and `"openrouter"` are not valid provider names — use `"litellm"` for proxy/router providers