Every Slack mention runs the same five-stage pipeline. Brass marks the agent's own identity and configuration; teal marks live data moving through it.
ALLOWED_CHANNEL_ID), and the
user must be on the allowlist (viska_chat_users). DMs and existing threads
the bot already joined are carried through automatically.
Daily broker research (Pareto, Arctic, Goldman, DNB…) embedded and hybrid-searched. The primary source of truth for any view.
Read-only view of the IBKR book — positions, cost basis & P&L, theme rotations, strategy conviction, market candles.
Live prices and market colour from public APIs, plus web search as a last resort when the corpus can't answer.
Across every thread, Mímir maintains a short living profile of the analyst it's talking to — what they cover, the shape of questions they ask, and context worth holding onto. Scoped to the Slack user, so it gets more useful to each analyst over time without mixing people up.
Within a thread, Mímir sees the recent back-and-forth, so follow-ups ("and versus its peers?") resolve without repeating the setup. Keyed to the Slack thread, so two parallel discussions never cross.
@mastra/pg)Under the hood memory is a shared Postgres store (connection pool capped at 6 to stay within the database's session limits). If the database is ever unreachable the agent degrades cleanly — it keeps answering, just without carried context, and raises an alert. A separate store also embeds every exchange for future long-term recall — write-side today read-back is on the roadmap.
The lanes are deliberately separate so a credential in one can't reach another.
PDF research is ingested daily from Dropbox (Pareto, Arctic, ABG, Carnegie, DNB, Goldman,
Morgan Stanley and others; corpus begins February 2026). Each document is embedded with
OpenAI text-embedding-3-small and retrieved by a hybrid search that
blends meaning and keywords (70 / 30, fused by reciprocal rank). A second pass
scans report narrative for company mentions, widening the date window
(3d → 7d → 30d → all) until it finds signal.
A SELECT-only database role (viska_mimir_ro) reads a fixed set of views: the
current positions with cost basis and unrealized P&L, per-ticker position history, the
fund's theme rotations (entered / exited / scaled), the strategy surface with conviction
verdicts, and cached market candles. Mímir can read this book but can never write to it.
For live market colour outside the corpus, Mímir calls public market APIs directly, and Perplexity for grounded web answers as a last resort. For equities it never calls a vendor directly — a miss routes through a single dedicated fetch service that is the only writer of the candle cache, keeping one clean source per price.
This is the standing instruction the model runs under on every reply — the full version lives in the system prompt; this is its shape.
The model picks tools from the question — never speculatively. All are live in production.
| Tool | What it does | Reaches | Status |
|---|---|---|---|
| Research corpus | |||
| corpus_search | Default research query on any financial topic | Corpus (hybrid search) | Live |
| search_by_org | What a named broker says on a topic | Corpus | Live |
| scan_doc_matches | Which reports mention a company / ticker / term | Corpus narrative | Live |
| doc_manifest_list | What documents arrived on a date | Corpus | Live |
| discovery | Which brokers publish, and how often | Corpus | Live |
| librarian_scan | How often a term recurs across days | Corpus | Live |
| system_two_briefing | Deep multi-section briefing on a document | Corpus + OpenAI | Live |
| doc_link_lookup | Dropbox link for a named document | n8n → Dropbox | Live |
| Live fund data | |||
| get_positions | Current IBKR book — value, cost basis, unrealized P&L | Read lane | Live |
| get_position_history | How one holding changed over time | Read lane | Live |
| get_theme_transitions | Themes entered / exited / scaled, with NAV delta | Read lane | Live |
| get_strategy | Strategy surface — themes & conviction verdicts | Read lane | Live |
| get_market_data | Recent candles; on-demand fetch on a cache miss | Read lane + fetch svc | Live |
| price_context | Marks a research price against the latest close | Read lane + fetch svc | Live |
| sector_sentiment | Computed scores for the tracked sectors | Internal Supabase | Live |
| External markets & web | |||
| web_search | Grounded web answer — last resort | Perplexity | Live |
| crypto_price | Live crypto price & 24h data | Binance / CoinGecko | Live |
| market_sentiment | Fear & Greed, top funding rates | Alternative.me / Binance | Live |
| derivatives_data | Funding, open interest, mark price | Binance Futures | Live |
| defi_stats | TVL, chains, stablecoin supply | DefiLlama | Live |
| Reports · language · utility | |||
| trigger_report | Fire the daily research report | n8n pipeline | Live |
| custom_report | Branded report from the current thread | n8n pipeline | Live |
| user_prefs | Manage watchlist & preferences | Internal Supabase | Live |
| icelandic_translate | English → Icelandic | Miðeind / Greynir | Live |
| bin_lookup | Icelandic word inflection (BÍN) | Árnastofnun | Live |
| humanize_text | Strip AI fingerprints from prose | Local | Live |
Everything Mímir talks to outside its own database, and why.
| Service | Used for | Auth | Tier |
|---|---|---|---|
| OpenAI | Reasoning model (gpt-5.5) & corpus embeddings | API key | Core |
| Supabase — corpus | Research embeddings, users, query logs, sector scores | Service key | Core |
| Supabase — fund read lane | Positions, themes, strategy, candles (read-only role) | Role JWT + gate key | Core |
| Supabase — memory | Per-user & per-thread agent memory (Postgres) | Connection string | Core |
| Slack | The interface — mentions, DMs, App Home, actions | Bot + app tokens | Core |
| n8n webhooks | Daily & custom reports, Dropbox links, error triage | Webhook URL / secret | Pipeline |
| Candle fetch service | On-demand equity prices (sole writer of the cache) | Shared secret | Pipeline |
| Perplexity | Grounded web search (last resort) | API key | On-demand |
| Binance / CoinGecko | Crypto prices, funding, open interest | Public | On-demand |
| Alternative.me | Fear & Greed index | Public | On-demand |
| DefiLlama | DeFi TVL, chains, stablecoins | Public | On-demand |
| Miðeind / Greynir | Icelandic translation & grammar | API key | On-demand |
| Árnastofnun (BÍN) | Icelandic word morphology | Public | On-demand |
The reason this manifest is a working document: every candidate capability is listed against its prerequisite, so adding one is a scoping decision, not a discovery.
get_exposureget_trade_historyget_fundamentalsget_catalysts