1. Full Configuration Options Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
| agentId | string | "agent_run" | Unique deterministic slug for tracing multi-agent sub-trees. |
| agentName | string | "default-agent" | Human-readable agent identifier shown in cloud telemetry. |
| maxRepeatCalls | number | 5 | Trips when identical SHA-256 argument hashes repeat N times within time window. |
| maxCostDollar | number | $2.00 | Dollar spending ceiling for a single agent execution run. |
| maxDepth | number | 15 | Maximum recursion step depth before tripping depth ceiling. |
| maxNoProgressTurns | number | 3 | Trips when N consecutive turns produce identical output state hashes. |
| autoFallbackCheaperModel | boolean | true | Automatically switch model to cheaper tier on soft trip before terminating. |
| apiKey | string | undefined | Moven hosted telemetry API Key (`moven_sk_live_...`). |
2. Complete `moven.config.ts` Code Example
Below is a complete enterprise-grade moven.config.ts configuration example initializing circuit breaker rules, provider mappings, and hallucination alerts:
import { createMovenCircuitBreaker } from 'moven-sdk';
export const movenCircuitBreaker = createMovenCircuitBreaker({
// Production Agent Identity
agentId: 'agent_inventory_prod_01',
agentName: 'inventory_production_agent',
framework: 'LangGraph / LangChain',
version: '1.2.0',
tags: ['production', 'e-commerce'],
// Rule 01: Intercept tool called 5x in 60s with identical arguments
maxRepeatCalls: 5,
repeatTimeWindowMs: 60000,
// Rule 02: Strict Dollar Cost Ceiling ($2.00 max per agent run)
maxCostDollar: 2.00,
// Rule 03: Recursion & Depth Limit (Max 15 sub-agent steps)
maxDepth: 15,
// Rule 04: No-Progress State Hash Shield (3 consecutive identical turn outputs)
maxNoProgressTurns: 3,
// Rule 05: Cheaper Model Fallback & LLM Judge Arbitrator
provider: 'openai',
currentModel: 'gpt-4o',
cheaperModel: 'gpt-4o-mini',
autoFallbackCheaperModel: true,
enableLlmJudgeArbitrator: true,
// Callbacks
onHallucination: ({ agentName, reason, toolName }) => {
console.warn(`[Moven Alert] Agent '${agentName}' hallucination on tool '${toolName}': ${reason}`);
},
// Telemetry API Key
apiKey: process.env.MOVEN_API_KEY,
});