Skip to content

Configuration Reference

Last updated 1 day ago · 86bf665

Updated yesterday

"fix(runtime): createAgent accepts groq/xai — derive the provider union from the canonical source" · 86bf665 · 2026-07-21

Every aspect of Reactive Agents is configurable through the builder API. This page documents all available options, their defaults, and how they affect agent behavior. For ready-made chains, see Common builder stacks.

The declarative front door takes a single AgentConfig object and returns the same agent the fluent builder produces — createAgent({ tools: { allowedTools } }).withTools({ allowedTools }) (same key, same result). Unknown or malformed keys are rejected loudly with the path named.

import { createAgent } from 'reactive-agents'
const agent = await createAgent({
name: 'researcher',
provider: 'anthropic',
model: 'claude-opus-4-8',
profile: 'balanced',
tools: { allowedTools: ['web-search', 'file-write'] },
})
const result = await agent.run('Summarize the latest on X')

profile ("lean" | "balanced" | "intelligent") sets a preset baseline applied FIRST; explicit sibling keys override it.

Every key of AgentConfig, its type, and whether it is required. This table is generated from AgentConfigSchema (the single source of truth) — see the Builder API for the fluent method that sets each key.

Config keyTypeRequiredDescription
adaptiveHarnessbooleanno
agentIdstringno
budget.costLimitnumberno
budget.tokenLimitnumberno
budget.warningRationumberno
circuitBreakerunknownno
costTracking.dailynumberno
costTracking.monthlynumberno
costTracking.perRequestnumberno
costTracking.perSessionnumberno
durableRuns.checkpointEverynumberno
durableRuns.dirstringno
execution.maxIterationsnumberno
execution.minIterationsnumberno
execution.retryPolicy.backoffMsnumberyes
execution.retryPolicy.maxRetriesnumberyes
execution.strictValidationbooleanno
execution.timeoutMsnumberno
fabricationGuardoff | warn | blockno
fallbacks.providersarrayno
features.auditbooleanno
features.costTrackingbooleanno
features.guardrailsbooleanno
features.healthCheckbooleanno
features.killSwitchbooleanno
features.memorybooleanno
features.observabilitybooleanno
features.promptsbooleanno
features.reactiveIntelligencebooleanno
features.reasoningbooleanno
features.selfImprovementbooleanno
features.streamingbooleanno
features.toolsbooleanno
features.verificationbooleanno
gateway.accessControl.accessPolicyallowlist | blocklist | openno
gateway.accessControl.allowedSendersarrayno
gateway.accessControl.blockedSendersarrayno
gateway.accessControl.modechat | taskno
gateway.accessControl.replyToUnknownstringno
gateway.accessControl.sessionTtlDaysnumberno
gateway.accessControl.unknownSenderActionskip | escalateno
gateway.cronsarrayno
gateway.heartbeat.instructionstringno
gateway.heartbeat.intervalMsnumberno
gateway.heartbeat.maxConsecutiveSkipsnumberno
gateway.heartbeat.policyalways | adaptive | conservativeno
gateway.persistMemoryAcrossRunsbooleanno
gateway.policies.dailyTokenBudgetnumberno
gateway.policies.heartbeatPolicyalways | adaptive | conservativeno
gateway.policies.maxActionsPerHournumberno
gateway.policies.mergeWindowMsnumberno
gateway.policies.requireApprovalForarrayno
gateway.portnumberno
gateway.timezonestringno
gateway.webhooksarrayno
grounding.maxRetriesnumberno
grounding.modeblock | warnyes
grounding.tolerancenumberno
guardrails.customBlocklistarrayno
guardrails.injectionbooleanno
guardrails.piibooleanno
guardrails.toxicitybooleanno
horizonProfilelongno
logging.filePathstringno
logging.formattext | jsonno
logging.leveldebug | info | warn | errorno
logging.maxFilesnumberno
logging.maxFileSizeBytesnumberno
logging.outputconsole | fileno
maxTokensnumberno
mcpServersarrayno
memory.capacitynumberno
memory.dbPathstringno
memory.evictionPolicyfifo | lru | importanceno
memory.experienceLearningbooleanno
memory.importanceThresholdnumberno
memory.maxEntriesnumberno
memory.memoryConsolidationbooleanno
memory.retainDaysnumberno
memory.tierstandard | enhancedno
modelstringno
namestringyes
numCtxnumberno
observability.auditbooleanno
observability.cortexunknownno
observability.costsunknownno
observability.filestringno
observability.healthbooleanno
observability.livebooleanno
observability.logging.filePathstringno
observability.logging.formattext | jsonno
observability.logging.leveldebug | info | warn | errorno
observability.logging.maxFilesnumberno
observability.logging.maxFileSizeBytesnumberno
observability.logging.outputconsole | fileno
observability.logModelIObooleanno
observability.telemetryunknownno
observability.tracingunknownno
observability.verbosityminimal | normal | verbose | debugno
outputSchemaOptions.abstainBelownumberno
outputSchemaOptions.modeauto | fast | groundedno
outputSchemaOptions.onParseFaildegrade | throwno
persona.backgroundstringno
persona.instructionsstringno
persona.namestringno
persona.rolestringno
persona.tonestringno
pricingRegistryobjectno
profilelean | balanced | intelligentno
provideranthropic | openai | ollama | gemini | litellm | groq | xai | testyes
rateLimiting.maxConcurrentnumberno
rateLimiting.requestsPerMinutenumberno
rateLimiting.tokensPerMinutenumberno
reactiveIntelligence.enabledbooleanno
reasoning.auditRationalebooleanno
reasoning.defaultStrategyreactive | plan-execute-reflect | tree-of-thought | reflexion | adaptive | direct | code-action | blueprintno
reasoning.enableStrategySwitchingbooleanno
reasoning.fallbackStrategystringno
reasoning.maxStrategySwitchesnumberno
requiredTools.adaptivebooleanno
requiredTools.maxRetriesnumberno
requiredTools.toolsarrayno
skillPersistencebooleanno
stallPolicy.escalateNudgeContentbooleanno
stallPolicy.ignoredNudgeTolerancenumberno
systemPromptstringno
taskContextobjectno
temperaturenumberno
thinkingbooleanno
tools.adaptivebooleanno
tools.allowedToolsarrayno
tools.focusedToolsarrayno
tools.terminalbooleanno
verification.factDecompositionbooleanno
verification.hallucinationDetectionbooleanno
verification.hallucinationThresholdnumberno
verification.multiSourcebooleanno
verification.nlibooleanno
verification.onRejectblock | annotate | proceedno
verification.passThresholdnumberno
verification.riskThresholdnumberno
verification.selfConsistencybooleanno
verification.semanticEntropybooleanno
verification.useLLMTierbooleanno
MethodDefaultDescription
.withName(name)"agent"Agent identifier used in logs and metrics
.withProvider(provider)"test"LLM provider: "anthropic" | "openai" | "gemini" | "groq" | "xai" | "ollama" | "litellm" | "test"
.withModel(model)Provider defaultModel string or ModelParams (model, thinking?, temperature?, maxTokens?, numCtx?). numCtx pins the exact provider context window (Ollama num_ctx); also a top-level AgentConfig field
.withSystemPrompt(prompt)noneCustom system prompt prepended to all LLM calls
.withPersona(persona)noneStructured persona: { name?, role?, background?, instructions?, tone? }
.withEnvironment(context)noneExtra Record<string, string> merged into system prompt (beyond built-in date/tz/platform)
.withMaxIterations(n)10Maximum reasoning loop iterations before stopping
.withTimeout(ms)nonePer-execution timeout in milliseconds
.withStrictValidation()offMissing API keys / mismatches become build errors
.withRetryPolicy({ maxRetries, backoffMs })maxRetries: 0Transient LLM retries
.withErrorHandler(fn)noneObserve-only callback when run() fails
MethodDefaultDescription
.withReasoning(options?)disabledStrategies, ICS (synthesis, synthesisModel, …), strategy switching, adaptive, per-strategy bundles (may include e.g. kernelMaxIterations on reflexion). See Reasoning and Builder API
MethodDefaultDescription
.withTools(options?)disabled{ tools? (custom defs + Effect handlers), resultCompression?, allowedTools?, adaptive? }
.withDocuments(docs)noneDocumentSpec[] ingested at build; retrieval via the unified find meta-tool
.withRequiredTools(config)none{ tools?, adaptive?, maxRetries? }
.withMCP(config)noneMCP: { name, transport, command?, args?, endpoint?, headers?, env?, cwd? } (see Builder API transport table)
.withMetaTools(config?)on with toolsConductor suite; pass false to disable defaults
MethodDefaultDescription
.withCircuitBreaker(config?)off until setProvider circuit breaker (failureThreshold, cooldownMs, …)
.withRateLimiting(config?)off until setRPM / TPM / concurrency limits
.withModelPricing(registry)noneStatic $/1M token overrides
.withDynamicPricing(provider)noneFetch pricing at build
.withFallbacks(config)noneOrdered provider cascade — { providers }; falls back to the next provider on any error
MethodDefaultDescription
.withMemory(options?)disabledEnable memory. No args = standard tier. Options: { tier: "standard" | "enhanced" }
.withMemoryConsolidation(config?)disabledBackground memory intelligence: { threshold?, decayFactor?, pruneThreshold? }
.withExperienceLearning()disabledCross-agent tool-use pattern learning
MethodDefaultDescription
.withGuardrails(options?)disabledToggles: { injection?, pii?, toxicity? } (default true each when enabled), plus customBlocklist?
.withVerification(options?)disabledStrategy toggles + thresholds (passThreshold, hallucinationDetection, …)
.withKillSwitch()disabledPause / resume / stop / terminate
.withBehavioralContracts(contract)noneBehavioral contract passed to guardrails layer
MethodDefaultDescription
.withCostTracking(options?)disabledBudget enforcement (USD): { perRequest?, perSession?, daily?, monthly? }
.withContextProfile(profile)auto-detectedModel-adaptive context budgets / compaction — see Context engineering
MethodDefaultDescription
.withObservability(options?)disabled{ verbosity?, live?, file? (JSONL), logPrefix?, logModelIO?, telemetry?, tracing? }telemetry: true | TelemetryConfig is the entry point for run telemetry (privacy modes, default { mode: "isolated" })
.withStreaming(options?)"tokens"Default agent.runStream() density: { density?: "tokens" | "full" }
.withLogging(config)noneStructured logs: level, format, output (console / file / stream), rotation
.withAudit()disabledCompliance audit logging
.withEvents()Wire EventBus for agent.subscribe()
MethodDefaultDescription
.withSelfImprovement()disabledCross-task strategy outcome learning
.withReactiveIntelligence(false)onPass false to disable entropy/controller/telemetry stack
.withReactiveIntelligence(options?)defaultsEntropy, controller, hooks — see Reactive Intelligence
.withHealthCheck()disabledExposes agent.health()
MethodDefaultDescription
.withA2A(options?){ port: 3000 }Local A2A JSON-RPC server (port, basePath)
.withAgentTool(name, config)noneRegister a static sub-agent as a tool
.withDynamicSubAgents(options?)disabledAllow LLM to spawn sub-agents at runtime
.withRemoteAgent(name, url)noneConnect to a remote agent via A2A protocol
MethodDefaultDescription
.withGateway(options?)disabledPersistent autonomous harness: { heartbeat?, crons?, webhooks?, policies?, accessControl? }
MethodDefaultDescription
.withTestScenario(turns)noneDeterministic test provider. TestTurn[] from @reactive-agents/llm-provider; forces provider: "test".
.withLayers(layers)noneMerge custom Effect Layers into the runtime
.withSkills(config)disabledLiving skills: { paths } — one or more SKILL.md directories (required; a path-less call throws)
.toConfig() / ReactiveAgents.fromConfig() / fromJSON()Agent as Data — round-trip via agentConfigToJSON / agentConfigFromJSON (reactive-agents or @reactive-agents/runtime)
agentFn / pipe / parallel / racePromise-based multi-agent composition (see Builder API)
agent.registerTool() / unregisterTool() / ingest()Runtime tool + RAG ingestion on built agents
VariableRequired ForDefaultDescription
ANTHROPIC_API_KEYAnthropic providerAnthropic API key
OPENAI_API_KEYOpenAI/LiteLLM providerOpenAI API key
GOOGLE_API_KEYGemini providerGoogle AI API key
GROQ_API_KEYGroq providerGroq API key
XAI_API_KEYxAI providerxAI API key
TAVILY_API_KEYWeb search tool (primary)Tavily search API key
BRAVE_SEARCH_API_KEYWeb search tool (secondary)Brave Search API key (X-Subscription-Token); alias: BRAVE_API_KEY
EMBEDDING_PROVIDEREnhanced memory tier"openai"Embedding provider
EMBEDDING_MODELEnhanced memory tier"text-embedding-3-small"Embedding model name
LLM_DEFAULT_MODELAll providersProvider defaultOverride default model

These values have sensible defaults but are not currently configurable via the builder:

ValueDefaultWhereNotes
Max sub-agent iterations4packages/tools/src/Sub-agents capped at 4 iterations
Max recursion depth3packages/tools/src/Nested sub-agent limit
Parent context forwarding2000 charspackages/tools/src/Max parent context sent to sub-agents
Memory decay half-life7 dayspackages/memory/src/Episodic memory decay rate
Compaction trigger6 iterationspackages/reasoning/src/Steps before context compaction (local tier)