StochStack

Site Start-up + Recruitment Simulation Ops Twin

A2A x MCP in Clinical Ops Digital Twin

Operator Guide

How To Operate

  1. 1.Configure scenario inputs (TA/Phase/Countries/target size) and keep Deterministic Seed on for demo reproducibility.
  2. 2.Enable A2A remote mode and click Run Simulation. Watch orchestrator handoff each step to dedicated agents.
  3. 3.Open View context diff on any agent reply to inspect exact patches written into shared context.
  4. 4.Record an actual enrollment point in the calibration form and run auto-calibration.
  5. 5.Run simulation again and compare confidence, bias, and updated trajectories.

Expected Results

  • - A2A thread shows request -> response sequencing with local/remote transport labels and latency.
  • - Shared context version increments after each patch, with assumptions/sites/risks/decisions updated in tabs.
  • - Confidence panel shows MAPE, signed bias, tracked points, and parameter deltas after calibration.
  • - Decision log captures rationale and tradeoff statements for review and audit.

How To Read Results

  • - Confidence above 75% with low bias indicates planning trajectories are stable enough for operational decisions.
  • - Persistent negative signed bias means actual enrollment lags prediction; prioritize site conversion and screening optimization.
  • - Frequent large parameter shifts indicate model drift or inconsistent operational execution; collect more actuals before scaling decisions.

Scenario Console

Countries

A2A Runtime

When enabled, non-orchestrator agents are routed through `/api/a2a/inbox` and shown as remote transport in thread logs.

When enabled, remote agents append model-based rationale (Qwen if configured; otherwise deterministic fallback).

Run History

Stored locally (max 5 runs). Each run keeps full context + event log.

MCP Server Status

Checking...

Connect Claude Desktop, Cursor, or other MCP clients to interact with this Ops Twin via API.

/api/mcp

8

Tools

7

Resources

4

Prompts

Available Tools
  • • create_session - Create new simulation session
  • • run_simulation - Execute full 6-agent workflow
  • • get_context - Retrieve simulation context
  • • calibrate_with_actuals - Calibrate with real data
  • • analyze_scenario - AI-powered analysis
  • • export_simulation - Export data (JSON/CSV)
  • • list_sessions - List active sessions
  • • replay_simulation - Replay from event log
Claude Desktop Config
{
  "mcpServers": {
    "stochstack-ops-twin": {
      "url": "/api/mcp"
    }
  }
}

A2A Conversation Thread

A2A Topology

Remote Retry Counter

0

Remote Calls

0

Fallbacks

0

ORCHCountrySiteStartUpRecruitmentRisk

MCP-like Shared Context

Run a simulation to populate shared context.

Simulation Output

Run a scenario to generate recruitment and startup simulation outputs.

update log

Prototype Change Log

  1. 2026-03-02 · v0.5.0

    Agent Evaluation Console

    • - Added per-agent scorecards (accuracy, bias, stability, adoption).
    • - Added trial-level filtering and version comparison (vA vs vB).
    • - Added human feedback loop panel with accept/reject decisions and reason capture.
  2. 2026-03-02 · v0.4.1

    A2A Security + Reliability + LLM-native Reasoning

    • - Added HMAC signature signing/verification for A2A envelopes plus timestamp freshness checks.
    • - Added inbox-side idempotency dedup by messageId to prevent duplicate processing.
    • - Added per-agent retry backoff policy (maxRetries/baseDelay/backoff/jitter) with fallback-to-local behavior.
    • - Added A2A topology panel and remote retry counter for live operational visibility.
    • - Added optional LLM-native agent reasoning path (Qwen when configured, deterministic fallback otherwise).
  3. 2026-03-01 · v0.4.0

    A2A Remote Collaboration Layer

    • - Added A2A remote routing layer with agent registry, envelope schema, and inbox API endpoint.
    • - Enabled optional remote execution for non-orchestrator agents with fallback-to-local retry behavior.
    • - A2A thread now displays transport mode, endpoint, latency, and delivery status for each agent response.
    • - Added operator guide panel: clear steps, expected outcomes, and interpretation logic for reviewers.
  4. 2026-03-01 · v0.3.0

    MCP Server Integration

    • - Added full MCP (Model Context Protocol) Server implementation for external tool integration.
    • - Exposed 8 MCP Tools: create_session, run_simulation, get_context, calibrate_with_actuals, analyze_scenario, export_simulation, list_sessions, replay_simulation.
    • - Exposed 7 MCP Resources: context schema, current context, history, KPIs, recruitment curve, risk register, agent registry.
    • - Added 4 MCP Prompts: ops_twin_analyst, risk_assessor, site_selection_advisor, forecast_calibrator.
    • - Created SSE endpoint at /api/mcp for real-time MCP client connections.
    • - Added MCP status panel to Ops Twin Studio UI with connection details and available tools.
    • - Provided Claude Desktop and Cursor configuration examples.
  5. 2026-03-01 · v0.2.0

    Forecast Calibration & Confidence Layer

    • - Added actual observation capture to track predicted vs actual enrollment error over time.
    • - Implemented automatic parameter callback to tune startup/screen-fail/dropout/competition/patient-pool assumptions.
    • - Added confidence panel with MAPE, signed bias, tracked points, and assumption shift diagnostics.
  6. 2026-03-01 · v0.1.0

    Ops Twin MVP Launched

    • - Added three-zone interface: scenario console, A2A timeline, and MCP-like shared context panel.
    • - Implemented six-agent runtime with deterministic seeded simulation and ordered handoff workflow.
    • - Added context patch/event-log model with diff drawer, JSON export, replay, and local run history.