Multi-Agent Hybrid AI Architecture

How Traffic Engine AI combines 4 worker roles, /v1/systemone zero-token action selection, Playbook Caching, and HirePulse Cloud Credits failover.

Multi-agent hybrid AI that caches instead of burning tokens

Brute-force LLM browser agents send full DOM snapshots on every scroll and click, quickly burning tokens and slowing down Playwright workers. Traffic Engine AI uses a hybrid four-layer model inside src/aiCommander.js and src/wavePlanner.js that separates strategic orchestration from lightweight action routing.

Traffic Engine multi-agent hybrid AI architecture diagram
Dynamic 4-role squad routing, /v1/systemone decision calls, per-route Playbook Cache, and hosted HirePulse failover.

Four specialized worker roles

Agent RoleCore FocusDefault Worker ModelPrimary Steps
Tools & Forms AgentInteractive calculators & feature QAdeepseek-v4.1-flashuse_tool, result extraction, copy checks
Multi-Tab Flow AgentMulti-tab journeys & consent hygienebeamTab switches, external CTA QA, popunder cleanup
Content & UX Dwell AgentLong-form guides & biometric readingminimax-m3.1-flashread_article, scroll cadence, text checks
SERP & Route Healing AgentSearch discovery & selector recoverygpt-oss:20bsearch_entry, ai_explore, ai_route_repair, ai_form_guard

Zero-output-token decisions (/v1/systemone) vs. chat models

  • Typed Decision Routing (clef:27b): Uses callDecisionModel and askActionChoice against /v1/systemone to return compact element IDs and state choices with zero wasted prose tokens.
  • Structured Recovery (callAiChat): When free-form JSON is required for ai_route_repair or ai_form_guard, Traffic Engine automatically promotes to chat-capable models such as deepseek-v4.1-flash or glm-5.3-flash.
  • Persistent Transport Memory: data/ai-models.json records whether each model prefers /api/chat, /api/generate, or /v1/systemone across restarts.

Route Playbook Cache & multi-provider failover

Once an AI worker explores a route pattern or heals a broken selector, aiPagePlaybookCache stores the compact DOM action plan in RAM so concurrent sessions replay human-jittered variations at 0 extra AI tokens.

Provider failover runs cleanly across Ollama Cloud (OLLAMA_API_KEY) → UncensoredLLM (ULLM_API_KEY) → HirePulse Cloud Credits (HIREPULSE_CREDIT_KEY via gethirepulse.xyz/credits) → deterministic offline fallback (buildLocalCommanderFallback).

Hosted Open-Core Mode: Set ai.provider = "hirepulse" and add your key from gethirepulse.xyz/credits to route /v1/qa/commander, /v1/qa/step-decision, /v1/qa/funnel-audit, and temporary email/OTP inboxes from one credit balance.

AI Site Onboarding & Funnel Cloner

Paste any authorized site URL—such as a storefront on CitedCart or a workbench on tools.citedcart.com—into the Onboarding Wizard (POST /api/ai/onboard-site) or Funnel Cloner (POST /api/ai/clone-funnel). The dashboard detects GA4, GTM, Meta, TikTok, Clarity, Hotjar, and Cloudflare Turnstile tags, maps interactive tool routes, and generates a complete test scenario.

Frequently asked questions

What does the Playbook Cache store?

It caches resolved DOM step plans per route pattern in memory (aiPagePlaybookCache) so subsequent workers replay jittered actions with zero extra LLM calls.

What happens if an AI provider hits a 429 rate limit?

Traffic Engine places that provider on a temporary cooldown and fails over automatically to UncensoredLLM, HirePulse Cloud Credits, or the deterministic local fallback.