Agent API

Analyse a strategy and return machine-readable robustness semantics.

Accepts either a natural-language description (input_type=natural_language) or a canonical strategy JSON (input_type=strategy_json). Parses (if NL), runs the robustness backtest across the curated case set, and returns agent-optimized structured semantics: per-regime behavior labels, top failure modes with impact-type ontology, evaluation confidence, and methodological limitations. Output is descriptive, not advisory. Schema family ctys-agent, current version ctys-agent-v1.

post/api/v1/agent/analyze

Request

  • Base URL: https://crashtestyourstrategy.com (the document declares no server; this is the origin it was published from)
  • URL: https://crashtestyourstrategy.com/api/v1/agent/analyze
  • Auth: none declared

Request body

OR

Example request

{
  "asset": "BTC",
  "input_type": "natural_language",
  "num_runs": 30,
  "strategy_text": "Buy BTC when RSI(14) falls below 30, sell when RSI(14) rises above 70. Use a 5% stop loss."
}

Response

Successful robustness analysis with structured agent-optimized output.

robustness_scorenumber required

V2 composite robustness score on the 0..100 scale. Equal-weight mean across populated FM-buckets with shrinkage. Higher = more uniform behaviour across the curated regimes.

robustness_class'fragile' | 'moderate' | 'robust' required

Monotonic class derived from robustness_score. 'fragile' (<50) | 'moderate' (50–70) | 'robust' (≥70).

summarystring required

Short deterministic machine-friendly summary (≤200 chars). Names the score, class, strongest and weakest regimes. Use for one-line citations.

interpretation_textstring required

Longer narrative, LLM-citable. Use for human-readable answers / generated reports / agent reasoning chains. Descriptive, not advisory.

top_failure_modes_status'present' | 'no_underperforming_buckets' | 'barely_active' required

Disambiguates an empty top_failure_modes list. 'present' — list contains entries. 'no_underperforming_buckets' — every FM-bucket score is at or above the overall pool baseline; no regime-specific weakness identified. 'barely_active' — strategy rarely takes positions or holds minimal exposure across cases, so bucket scores are uniform and not informative. An empty list does NOT mean 'no risk'.

regime_class_summaryobject required

Aggregation into 4 regime classes: trend_regimes | mean_reverting_regimes | volatility_regimes | tail_event_regimes. Descriptive only — does NOT imply suitability or recommendation for any regime.

caveatsstring[] required

Inline trust caveats — always include the BaFin/WpHG framing and the curated-case-set qualifier.

methodological_limitationsstring[] required

Explicit model boundaries — agents should not infer beyond these.

report_urlstring nullable

Persistent citable URL. /s/{slug} when the input matched a catalog strategy; /r/{hash} for ad-hoc inputs (DB-persisted).

methodology_urlstring required

Link to the full methodology page describing case catalog, simulator, and scoring architecture.

catalog_match_slugstring nullable

Slug of the matching catalog strategy if entry/exit conditions are an exact match. Null for ad-hoc inputs.

schema_familystring

Schema family name. Stable across versions within the family.

schema_versionstring

Specific schema version within the family. Bump for breaking changes; additive changes keep this stable.

generated_utcstring required

ISO-8601 UTC timestamp when the response was produced. Use for cache invalidation.

Example response

{
  "robustness_score": 53.2,
  "robustness_class": "moderate",
  "evaluation_confidence": {
    "level": "moderate",
    "classified_ratio": 0.59,
    "sparse_bucket_count": 5,
    "augmented_replicas_total": 305,
    "rationale": "59% of replicas classified ex-post; 5 bucket(s) augmented from a-priori tags."
  },
  "summary": "Robustness 53/100 (moderate). Strong in TREND_UP, SLOW_BEAR. Weak in LIQUIDITY_STRESS, SHARP_CRASH.",
  "interpretation_text": "Returns vary substantially across the curated regimes — the model shows very different outcomes in bull versus bear and stress scenarios.",
  "headline_metrics": {
    "median_return": 0.05,
    "p5_return": -0.541,
    "wcdd_95": 0.57,
    "median_drawdown": 0.19,
    "failure_rate_pct": 12,
    "n_replicas": 255,
    "asset": "BTC"
  },
  "per_regime": [
    {
      "regime": "TREND_UP",
      "label": "persistent directional uptrend",
      "behavior": "stable",
      "score": 81.6,
      "n_replicas": 39,
      "shrinkage_alpha": 1
    }
  ],
  "top_failure_modes": [
    {
      "mode": "LIQUIDITY_STRESS",
      "severity": "high",
      "impact_type": "drawdown_expansion",
      "expected_behavior": "drawdowns deeper than the pool baseline in these scenarios",
      "bucket_score": 37,
      "delta_from_pool": -16.3
    }
  ],
  "top_failure_modes_status": "present",
  "caveats": [
    "Scenario-simulation across 63 curated cases (31 empirical + 32 synthetic), not predictions.",
    "BaFin/WpHG framing: descriptive output, not investment advice or suitability assessment.",
    "Per-FM-bucket scores use a-priori augmentation when ex-post classification is sparse (Phase 18d)."
  ],
  "methodological_limitations": [
    "Synthetic stress probes are not probabilistic forecasts.",
    "Intraday liquidity and execution slippage simplified to a single per-bar assumption.",
    "WCDD₉₅ is descriptive, not a true out-of-sample tail estimate."
  ],
  "report_url": "https://crashtestyourstrategy.com/r/H0Qc46MTgm9_R2_w",
  "methodology_url": "https://crashtestyourstrategy.com/methodology",
  "catalog_match_slug": "rsi-30-70-btc",
  "schema_family": "ctys-agent",
  "schema_version": "ctys-agent-v1",
  "generated_utc": "2026-05-15T14:32:11.123456+00:00"
}

Changes

No recorded changes to this operation across all 1 revision of this API.