AI Strategist
userpaper modeHow a market whisper becomes a validated manifest, in mock or Bankr mode.
Providers: mock and Bankr
The Strategist is a provider abstraction. Two brains can answer a whisper:
- Mock — deterministic, key-free, always available. The same prompt always yields the same basket. This is what the public build runs.
- Bankr — the Bankr Agent API, when configured server-side with an API key.
The server env var AI_PROVIDER selects the mode:
| Field | Type | Required | Description |
|---|---|---|---|
| mock | mode | no | Deterministic mock only. Best for local dev and tests. |
| bankr | mode | no | Bankr only; errors surface to the caller instead of falling back. |
| bankr_or_mock | mode (default) | no | Bankr when configured; graceful mock fallback on missing key, timeout, HTTP error, unparseable output, or guardrail rejection. |
From whisper to manifest
- Parse. The provider's output is scanned for a manifest JSON block (fenced or bare) with
name,tagline,thesis, andallocations. - Repair to the canonical registry. Unknown tickers are dropped, duplicates removed, and each survivor is bound to its verified registry address. If nothing canonical survives, the output is rejected.
- Renormalize to 10,000 bps. Weights are rescaled to sum to exactly 10,000 — integer math, no drift.
- Guardrails. The repaired manifest runs through the same validator as every human-built basket: canonical addresses only, complete risk block, weight caps. Guardrail failures are rejected, never patched over silently.
What it can and can't do
- It plans only. No provider path can place, modify, or cancel anything.
- It never gives personalized financial advice and refuses guarantee language.
- It only allocates across the 27 canonical registry assets.
- Its risk intensity (Venom) is described in the risk summary attached to every response.
Failure modes and fallback
In bankr_or_mock mode, any Bankr failure — missing key, HTTP error, timeout, unparseable output, guardrail rejection — falls back to the mock provider so the whisper is never lost. The response's providerMeta tells you exactly what happened: provider (who actually answered), usedFallback, and fallbackReason. In strict bankr mode, errors surface as typed codes instead: BANKR_NOT_CONFIGURED, BANKR_HTTP_ERROR, BANKR_TIMEOUT, BANKR_INVALID_OUTPUT, GUARDRAIL_REJECTED.
Example
POST /api/agent/hiss
{
"prompt": "Mag 7 momentum with lower drawdown",
"userPreferences": { "maxSingleAssetWeightBps": 2500, "riskTolerance": "medium" }
}{
"manifest": {
"name": "Mag 7, Softer Landing",
"mode": "paper",
"assets": [
{ "ticker": "MSFT", "weightBps": 2000, "rationale": "Steadiest Mag 7 earnings base." },
{ "ticker": "GOOGL", "weightBps": 1800, "rationale": "AI upside at a reasonable multiple." },
{ "ticker": "AAPL", "weightBps": 1700, "rationale": "Cash-flow ballast within the cohort." },
{ "ticker": "NVDA", "weightBps": 1500, "rationale": "Keeps the momentum engine, capped." },
{ "ticker": "META", "weightBps": 1500, "rationale": "Momentum with its own buyback floor." },
{ "ticker": "SGOV", "weightBps": 1500, "rationale": "T-bill ballast to soften drawdown." }
],
"...": "full manifest fields omitted for brevity"
},
"memo": { "title": "🐍 Mag 7, Softer Landing — agent memo", "body": "…", "disclaimer": "…" },
"riskSummary": "Largest position 20.0% (MSFT)…",
"score": { "total": 74, "thesisClarity": 68, "diversification": 71, "...": "…" },
"providerMeta": {
"provider": "mock",
"requested": "bankr_or_mock",
"usedFallback": true,
"fallbackReason": "bankr-not-configured"
},
"disclaimers": ["Educational research tool. Not investment advice. …"]
}