HOW MOVEN WORKS

In-Memory Tool Wrapping & Sub-Millisecond Circuit Protection

Discover how Moven AI intercepts native tool executions, computes SHA-256 state deltas, evaluates trip heuristics, and routes runaway agents to cheaper model tiers.

1

1. Zero-Latency Tool Interception

Sub-millisecond (<0.8ms) evaluation overhead in your agent process.

When you call wrapTools(), Moven creates lightweight proxy wrappers around your agent's tools (OpenAI, LangChain, Vercel AI SDK, LlamaIndex, CrewAI, AutoGen). Every time the agent invokes a tool, Moven intercepts the payload in-memory before executing the actual function.

2

2. Deterministic Canonical Hashing

SHA-256 payload sorting prevents key order mismatches.

Arguments are stringified using deterministic key-sorting. Even if LLM JSON outputs reorder properties across turns (e.g. {a:1, b:2} vs {b:2, a:1}), Moven generates identical SHA-256 hashes to track true execution uniqueness.

3

3. Real-Time Heuristic Evaluation

5 active safety shields watching every tool execution.

A. Repeat Call Interceptor

Flags identical tool calls N times within a 60-second sliding window.

B. Dollar Cost Ceiling

Caps total dollar spending per run while granting 25% headroom if state progress is made.

C. Recursion Limit

Limits sub-agent call graph recursion depth to prevent stack explosions.

D. No-Progress Hash Shield

Trips when tool outputs remain 100% identical for 3 consecutive turns.

4

4. Adaptive Recovery & Cheaper Fallback

Automatic model downgrading and primary model restoration.

When a soft trip occurs, Moven automatically routes subsequent model prompts to a cheaper model (e.g. gpt-4o-mini or gemini-2.5-flash-lite). Once the agent achieves 3 consecutive clean turns under fallback, Moven automatically restores primary model execution.

Complete System Architecture Diagram

Interactive overview of the Moven in-process engine and cloud dashboard.

Decoupled Architecture

OpenCoreArchitecture

Purein-memoryexecutionwrapper+optionalhostedAPIdashboard

1.moven-sdk(MIT)

Lightweight npm package (@moven/sdk). Zero backend dependencies.

✓ Free Standalone Mode
2.RunStateTracker

Tracks per-run tool call counts, argument hashes, cumulative token costs, recursion depth, and turn state hashes.

✓ 0ms latency impact
3.Real-TimeFuse

Synchronous heuristic checks after each tool call. On limit breach, halts stream or throws catchable MovenKillError.

✓ Mid-flight execution kill
4.HostedDashboard

If MOVEN_API_KEY is set, posts trip logs to Next.js API + Supabase for Slack/Email alerting.

✓ Real-time Slack Alerts