Skip to main content
aifinhub

Agent surface

For agents

Machine-readable entry points for LLMs, MCP clients, and custom agents. Tool contracts, discovery manifests, and explicit routing rules — everything static, no auth, CORS-open.

Tools

45

AI-in-markets tools at /{slug}/. 45 of 45 also ship as a static ES module at /engines/{slug}.js; the rest run browser-only because they need a user-supplied LLM API key.

Contracts

45

JSON contract files at /contracts/{slug}.json — one per shipped tool.

Glossary

30

Term definitions at /learn/{slug}/ with FAQs, citations, and tool cross-links — DefinedTerm + FAQPage JSON-LD.

Calc guides

45

One step-by-step guide per tool at /calculator-guides/{slug}/ with HowTo + FAQPage JSON-LD.

Discovery

Start here

  • Engines manifest (canonical)

    /engines/manifest.json

    Static catalog of every tool's compute as an ES module at /engines/{slug}.js. Import the module and call compute(input) — same math, same result shape as the in-browser UI. Self-contained: no external imports, browser/Node/Deno-safe. 45 engines. No HTTP request, no auth, no rate limit.

  • Full per-engine input/output JSON Schemas + example inputs. Pair with manifest.json when you need shape, not just discovery.

  • Agent tool index

    /agent-tools.json

    Per-tool index. Each entry links to its engine module, contract URL, and input schema.

  • LLM guide

    /llms.txt

    Human-readable entry point for model-aware discovery. Lists every tool, engine, article, benchmark, glossary entry, and calculator guide by URL with a one-sentence summary.

  • Full LLM guide

    /llms-full.txt

    Extended version with descriptions, methodology links, and cross-references.

  • Glossary index

    /learn/

    30 hand-authored glossary entries — risk + portfolio, backtesting, microstructure, AI-in-markets. Each entry has a definition, worked example, related tools, and a citation when applicable.

  • Calculator guides index

    /calculator-guides/

    45 calculator guides, one per tool. Step-by-step usage, FAQ, related tools, and glossary references — the long-form companion to the inline tool how-to.

  • Formulas index

    /formulas/

    The equations behind the tools at /formulas/{slug}/ — formula, every variable, a worked example, and common variations. HowTo + cross-linked to the tool that computes it.

  • Worked examples index

    /examples/

    Reproducible worked examples at /examples/{slug}/ — concrete inputs, the value each metric returns, and the insight per scenario.

  • Guides index

    /guides/

    Task-first how-to guides at /guides/{slug}/ — prerequisites, steps, common mistakes, FAQ. HowTo + FAQPage JSON-LD.

  • Checklists index

    /checklists/

    Priority-tagged pre-flight checklists at /checklists/{slug}/ — essential, recommended, and nice-to-have items, each linked to the tool that verifies it.

  • Comparisons index

    /compare/

    Structured decision matrices at /compare/{slug}/ — two options, a criterion-by-criterion table, pros, cons, and a verdict. Distinct from the prose /articles/ vs-pages.

  • Plugin manifest

    /.well-known/ai-plugin.json

    Discovery metadata for plugin-style agent ingestion (ChatGPT-style clients).

  • WebMCP manifest

    /.well-known/webmcp.json

    Capability surface for WebMCP-compatible MCP clients.

Engines

45 of 45 static engine modules

Each tool's pure compute is a static ES module at /engines/{slug}.js. Import the module and call compute(input). Same math, same result shape as the in-browser UI, no HTTP request, no auth, no rate limits. Self-contained: no external imports, browser/Node/Deno-safe ES2020+. Per-engine input/output JSON Schemas in /engines/manifest.json.

const { compute } = await import('https://aifinhub.io/engines/kelly-sizer.js');
const result = compute({ win_rate: 0.58, win_loss_ratio: 2 });
// { rawKelly, fractionalKelly, cappedBet, bucket, sims, finalP5, finalMedian, finalP95, drawdownMedian, ruinRate }
/engines/agent-cost-envelope-calculator.js /engines/agent-skill-tester.js /engines/backtest-overfitting-score.js /engines/batch-vs-realtime-cost-calculator.js /engines/broker-api-comparator.js /engines/calibration-dojo.js /engines/cointegration-half-life-solver.js /engines/correlation-matrix-visualizer.js /engines/data-vendor-tco.js /engines/deflated-sharpe-ratio.js /engines/drawdown-recovery-markov.js /engines/earnings-call-summarization-cost.js /engines/efficient-frontier-builder.js /engines/execution-simulator.js /engines/fallback-chain-simulator.js /engines/finance-mcp-directory.js /engines/financial-document-token-estimator.js /engines/forecast-scoring-sandbox.js /engines/ftc-vs-nlt-regulatory-cost.js /engines/hallucination-detector.js /engines/kalshi-poly-arb.js /engines/kelly-sizer.js /engines/llm-finance-error-taxonomy.js /engines/model-selector-finance.js /engines/options-greeks-explorer.js /engines/options-payoff-builder.js /engines/order-book-replay.js /engines/pair-trading-tester.js /engines/position-sizing-edge-variance.js /engines/price-blind-auditor.js /engines/prompt-injection-tester.js /engines/prompt-regression-tester.js /engines/quant-interview-question-generator.js /engines/returns-distribution-analyzer.js /engines/risk-adjusted-returns.js /engines/sec-filing-chunk-optimizer.js /engines/sharpe-vs-sortino-calculator.js /engines/statistical-arbitrage-capacity.js /engines/structured-schema-validator-finance.js /engines/synthetic-market-data-generator.js /engines/token-cost-optimizer.js /engines/trading-system-blueprinter.js /engines/var-backtest-kupiec-christoffersen.js /engines/walk-forward-validation-visualizer.js /engines/walk-forward-validator.js

Engine modules are the only programmatic surface. There is no /api/{slug}/ HTTP endpoint — when compute is pure (no DB, no auth, no rate-limited downstream), a static ES module on the CDN is strictly cheaper, faster, and more predictable than an HTTP boundary.

Modes

How to invoke

static · import · zero HTTP

Engine module (recommended)

45 of 45 tools expose a deterministic compute(input) via static ES modules. Idempotent, cacheable forever at the edge, no rate limits, no auth, no HTTP round-trip.

const { compute } = await import('https://aifinhub.io/engines/options-greeks-explorer.js');
compute({ type: 'call', spot: 100, strike: 100, vol_pct: 25, days_to_exp: 30, rf_pct: 4.5 });

const { compute: sharpe } = await import('https://aifinhub.io/engines/sharpe-vs-sortino-calculator.js');
sharpe({ returns: [0.001, -0.002, 0.003, /* ... */], rf_annual: 0.045 });

client_side · browser

Visualizer + canvas tools

All 45 tools also run in-browser at /{slug}/ for users who want the rendered chart and interactive controls. Agents should surface the tool URL when the user wants the visual output.

Routing rules

How to pick the right tool

  • Resolve user intent to a tool by category.

    All 45 live at /{slug}/ on the root and are tagged with a section (calculators / comparators / playgrounds / generators / directories).

  • Never invent parameter names.

    Every contract JSON has an explicit input_schema + sample_input. Copy field names verbatim. snake_case.

  • Never claim a result is investment advice.

    All tools are educational under BaFin + EU framework. Relay the disclaimer if surfacing numeric output.

Example contract

What a contract JSON looks like

Every tool has a contract at /contracts/{slug}.json. Example: /contracts/kelly-sizer.json.

{
  "tool_id":     "kelly-sizer",
  "slug":        "kelly-sizer",
  "path":        "/kelly-sizer/",
  "mode":        "client_side",
  "usage":       "Client-side calculator. Open https://aifinhub.io/kelly-sizer/ and fill in the inputs; results render in-browser.",
  "methodology": "https://aifinhub.io/methodology/kelly-sizer/",
  "sample_input": {
    "tool":             "kelly_sizer",
    "win_probability":  0.58,
    "win_loss_ratio":   1.2,
    "kelly_fraction":   0.25,
    "bankroll":         10000,
    "per_trade_cap_percent": 5,
    "monte_carlo_trials":    1000,
    "trades_per_path":  250
  },
  "input_schema":  {
    "type": "object",
    "properties": {
      "tool":                   { "type": "string", "const": "kelly_sizer" },
      "win_probability":        { "type": "number", "minimum": 0, "maximum": 1 },
      "win_loss_ratio":         { "type": "number", "minimum": 0 },
      "kelly_fraction":         { "type": "number", "enum": [0.125, 0.25, 0.5, 1] },
      "bankroll":               { "type": "number", "minimum": 0 },
      "per_trade_cap_percent":  { "type": "number", "minimum": 0, "maximum": 100 },
      "monte_carlo_trials":     { "type": "integer", "minimum": 100 },
      "trades_per_path":        { "type": "integer", "minimum": 1 }
    },
    "required": ["tool", "win_probability", "win_loss_ratio", "kelly_fraction", "bankroll", "per_trade_cap_percent", "monte_carlo_trials", "trades_per_path"]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "raw_kelly_fraction":     { "type": "number" },
      "fractional_kelly":       { "type": "number" },
      "capped_bet":             { "type": "number" },
      "kelly_bucket":           { "type": "string", "enum": ["weak", "moderate", "strong"] },
      "stats": {
        "type": "object",
        "properties": {
          "median_max_drawdown":  { "type": "number" },
          "p95_max_drawdown":     { "type": "number" },
          "ruin_rate":            { "type": "number" },
          "p5_final":             { "type": "number" },
          "median_final":         { "type": "number" },
          "p95_final":            { "type": "number" }
        }
      }
    }
  }
}

Representative response shape from the in-browser computation (Kelly Sizer with the sample_input above):

{
  "ok":   true,
  "tool": "kelly-sizer",
  "result": {
    "raw_kelly_fraction":    0.2300,
    "fractional_kelly":      0.0575,
    "capped_bet":            0.0500,
    "kelly_bucket":          "strong",
    "expected_growth_rate":  0.0142,
    "stats": {
      "median_max_drawdown": 0.459,
      "p95_max_drawdown":    0.626,
      "ruin_rate":           0.004,
      "p5_final":            18205.42,
      "median_final":        25109.96,
      "p95_final":           355583.84
    }
  },
  "meta": {
    "hub":          "aifinhub",
    "disclaimer":   "Education, not investment advice. BaFin / EU framework.",
    "tool_url":     "https://aifinhub.io/kelly-sizer/",
    "methodology":  "https://aifinhub.io/methodology/kelly-sizer/"
  }
}

Note: the tool runs client-side, so the JSON above is the shape an agent would surface to a user after the user opens the page and executes the calculator — not a server response. Numbers vary by Monte Carlo seed.

Terms

Use by agents is welcome, with conditions

  • Attribute the publisher (AI Fin Hub) when surfacing numeric output to users.
  • Relay the education-only disclaimer verbatim when producing trade-relevant numbers.
  • Do not scrape tool pages for inputs. Read the contract JSON.
  • No authentication, no rate limit; keep request volume reasonable to leave caches warm.