The Intelligence Layer Behind NaviStrat
NaviStrat is a complete treasury and technology platform — eight modules, hundreds of workflows, one AI brain. That brain is Sirius. This is the complete technical and product story of how a single intelligence weaves through every tool your team touches, remembers everything, and makes the entire platform smarter than the sum of its parts.
Every great platform has a foundation. NaviStrat has a mind.
Most treasury software is a collection of screens. You log in, you click around, you log out. The software doesn't know you. It doesn't remember yesterday's decision. It can't reach into your inbox or your calendar. It waits, silent, until you touch it again.
NaviStrat is different. At the center of the platform sits Sirius — an AI companion that doesn't just live in one chat box. It weaves through every module: it drafts your board papers, it remembers your risk appetite, it watches your cash position, it flags a payment anomaly before you do, it learns your editorial voice for TrueNorth, it coaches a new treasurer through Ko$ha's treasury scenarios, and it surfaces a PRISM investment insight that connects to a conversation you had three weeks ago.
One brain. Eight modules. Zero disconnected experiences.
This document is the complete story of how Sirius works — how it thinks, how it remembers, how it stays running when a provider goes down, how it protects treasury-grade data, and why it makes NaviStrat the most intelligent treasury platform on the market. We cover both the product narrative and the deep technical architecture underneath: the context-tier router, the prompt-caching strategy, the provider failover loop, the row-level security model, the realtime subscription layer, and the Ko$ha TMS AI agent's unique testing framework and continuous-improvement feedback loop. No engineering degree required. We'll use stick figures.
The 30-second map: where Sirius sits
NaviStrat is a five-layer system, and Sirius is the connective tissue between all of them. Your team (on any device) talks to the NaviStrat platform, which hands every intelligent request to Sirius. Sirius picks a brain (LLM Provider), reads and writes to a shared memory layer that every module can see, and reaches into the outside world through Integrations and Workflows.
wingmanChat) orchestrates all provider calls; the managed entity store with row-level security holds all state; OAuth connectors (Gmail, Calendar, Drive, Sheets) feed event-driven workflows. Sirius is not a separate service — it's a layer that every module invokes through the same SDK. Auth, hosting, database, and scheduling are managed services on the platform.The NaviStrat ecosystem: eight modules, one mind
NaviStrat isn't a chat app with a few extras bolted on. It's a comprehensive treasury and technology platform with seven production-grade modules — and Sirius is the intelligence layer that runs through all of them.
PRISM is the treasury and trading academy: investment plans, portfolio analysis, a trading simulator, and a full curriculum with certificates. Ko$ha TMS is the core treasury management system — cash management, payments, FX exposure, debt and investment, bank account management — with its own embedded AI Command Agent that can create data, run tests, and seed sample data through natural language. TrueNorth is the editorial platform where treasury practitioners publish articles, build an audience, and establish thought leadership. Nexus is the community — a member directory, activity feed, and navigator profiles. Sentinel is the security and compliance layer — access control, segregation of duties, risk register, fraud alerts, audit trails. DataForge manages master data — legal entities, GL accounts, counterparties, currencies, cost centers. GTM CRM is the go-to-market pipeline with AI win-rate predictions and engagement roadmaps.
Every single module invokes the same Sirius engine. A memory saved in a chat conversation can inform a PRISM investment plan. A cash position anomaly detected in Ko$ha TMS can trigger a Sirius alert. An article drafted in TrueNorth can be reviewed by Sirius using your editorial voice. They're not eight disconnected apps — they're one platform with one mind.
Sirius vs. the other AI experiences on NaviStrat
NaviStrat has three distinct AI experiences. They're all powerful. But they serve fundamentally different purposes — and understanding the difference is the key to understanding why Sirius is the platform's power-booster, not just another chatbot.
PRISM's AI Advisor: the specialist
PRISM has its own AI advisor — a focused, investment-trained intelligence that lives inside the PRISM module. It can analyze your portfolio, suggest rebalances, build investment plans, and walk you through the trading academy curriculum. It's excellent at what it does. But it only knows PRISM. It doesn't see your cash position in Ko$ha TMS. It doesn't remember the conversation you had last week about your risk appetite. It can't draft a board paper or scan your inbox for commitments. It's a specialist — a brilliant investment analyst who never leaves the trading desk.
Ko$ha TMS Command Agent: the hands-on operator
The Ko$ha TMS has its own embedded AI agent — a tool-calling agent that can create bank accounts, GL entries, payment templates, and bank statements through natural language, run the full automated test suite across all five TMS modules, seed sample data for testing, and check system health. It's a hands-on operator and QA engineer rolled into one. But it lives inside the TMS: it doesn't carry memories across to PRISM or TrueNorth, it can't reach into Gmail or Calendar, and it doesn't have the three-tier adaptive brain. It's the best TMS operator you've ever hired — but it stays in the treasury department.
Sirius: the power-booster
Sirius is none of those things — and all of them. It's the platform-wide intelligence layer with permanent memory that spans every module, every device, every conversation. It has a three-tier adaptive brain that matches the right amount of thinking to each question. It reaches into your Gmail, Calendar, Drive, and Sheets. It can trigger workflows that run while you sleep. And it's the connective tissue: a memory saved in a Sirius chat can inform a PRISM investment plan; a cash anomaly in Ko$ha TMS can trigger a Sirius alert; a Ko$ha test failure can be surfaced by Sirius in a conversation about treasury operations.
The PRISM advisor and the Ko$ha TMS agent are powerful within their walls. Sirius is the one that walks through all the walls.
wingmanChat with a constrained system prompt and limited entity access. The Ko$ha Command Agent is a separate tool-calling loop: it uses gemini_3_flash with a tool-manifest system prompt, parses {"tool":"name","args":{}} blocks from the model output, and executes them through tmsAgentTools.js — 12 tools that create/read TMS entities, run tests, and seed data. Sirius is the same wingmanChat engine with the full system prompt, the full memory layer, the full integration surface, and cross-module entity access. Same engine family, different aperture — which is why a Sirius memory can surface inside a PRISM plan, but a PRISM plan can't surface inside a Ko$ha test run.How Sirius thinks: one message, one reply, the right brain
When anyone on your team presses send, the message doesn't go straight to an AI. It first passes through a context tier selector that decides how much "brain" the question deserves. A quick "thanks!" needs almost no context; a request to "draft a board paper from last quarter's cash data" needs the full memory vault and your saved documents.
The engine then assembles a single package: the system prompt (Sirius's personality and rules), the most relevant memories from across all modules, and any vault documents that might matter. That package is handed to the Sirius engine, which calls the chosen provider directly and streams the reply back.
useWingmanSync → classifyTier() (from wingmanContextTiers.js) → memory/vault fetch → functions.invoke('wingmanChat', { messages, tier, context_mode }) → provider API → reply. The whole round-trip is one SDK call from the frontend; the backend function owns provider selection, caching, and failover. The tier classifier uses keyword and length heuristics: greetings and confirmations route to minimal; normal conversational turns to standard; long messages, file attachments, or "analyze/draft/write" verbs to full. Each tier maps to a provider + model + context-window budget.Context tiers: the right brain for every question
Not every message deserves the same brain. A two-word reply shouldn't cost the same as a 2,000-word analysis. The tier selector reads each message and routes it to one of three tiers — each with a different model, a different amount of conversation history, and a different price. This is why NaviStrat can offer unlimited Sirius access without the AI bill destroying the business.
wingmanContextTiers.js classifies by keywords and length: greetings and confirmations → minimal; normal turns → standard; long messages, file attachments, or "analyze/draft/write" verbs → full. The tier becomes the tier field on the wingmanChat call, which maps to a provider + model. The standard tier loads the last 8 messages plus the top 3 memories by relevance score; the full tier loads the entire conversation, all relevant memories, and any vault documents whose tags overlap with the conversation topic.Prompt caching: the economics engine that makes Sirius sustainable
In a long conversation, the system prompt and early messages are identical on every turn. Without caching, you pay full price for them every single time. With prompt caching, the provider stores that stable prefix once and reuses it — charging about 10% of normal for the cached portion.
For a platform like NaviStrat, where a single Sirius conversation can run 40+ turns across multiple modules, this is the difference between a sustainable business and a money pit. The Sirius engine places two cache breakpoints: one on the system prompt, one at the end of the stable history — so each new turn reuses everything before it. This is how we can offer unlimited Sirius access to thousands of organizations without the AI bill becoming unsustainable.
cache_control: { type: 'ephemeral' } markers on the system block and the last stable-history message. OpenAI: automatic prefix caching (≥1024 tokens, no flag needed). Google: no explicit caching in v1. The cache lives ~5 minutes; as long as turns come within that window, every turn after the first is mostly a cache read. The wingmanChat function places breakpoint 1 after the system prompt and breakpoint 2 after the last stable user/assistant pair — so only the newest turn plus any newly-fetched memories are billed at full rate.Always on: provider toggle & failover
Three providers, each with its own account and billing. Sirius handles all of that gracefully — and your team never sees an error.
Toggle: an admin sets WINGMAN_PROVIDER_CONFIG (a JSON secret) to enable/disable any provider. A provider is "available" only if enabled and its API key is set. During testing you'd leave only Google on; flip OpenAI on once funded; flip Anthropic on later.
Failover: if the chosen provider returns a quota, billing, or overload error (429, 402, 403, 5xx), the call silently retries on the next available provider — so a free tier exhausting mid-session self-heals onto the next live provider instead of breaking. For a treasury team that depends on Sirius during market hours, this means the platform is never fully down.
availableProviders(tier) builds an ordered candidate list (preferred first, then by tier preference), filtered to enabled + keyed. The failover loop tries each; on a failoverEligible error (429, 402, 403, 5xx) it continues to the next candidate, on a hard error (400 bad request) it throws immediately. The response includes a failover trail and the provider that actually served — so you can see exactly what happened for A/B testing and cost attribution.failover: [
{ provider: "OpenAI", status: 429, failover_eligible: true },
]
provider: "Google" // ← who actually served itMemory & continuity: Sirius never forgets
Most AI tools forget you when you close the tab. Sirius doesn't. Every conversation, every memory, every vault document, every open item, every PRISM plan, and every TMS data point feeds into a single memory graph that Sirius can reference at any time, in any module, on any device.
This is what makes Sirius a power-booster rather than a chatbot. A chatbot answers the question in front of it. Sirius answers the question in front of it with the full context of everything that came before — across every module your team uses. Ask Sirius to draft a board paper, and it pulls your risk appetite from a conversation three weeks ago, your cash position from Ko$ha TMS, and your investment thesis from PRISM. One brain. One memory. Every module.
conversation_summary, journal_entry, fact, goal, preference — stored as WingmanMemory entities with RLS, each carrying an importance score (1–5) and tags. Cross-module entity access via the same SDK. Realtime sync via entity subscriptions + a 60-second polling interval + a window-focus handler that backfills anything missed while the tab was backgrounded. Messages are capped (40 messages, 40K characters per conversation) for storage efficiency — older context is summarized into memory entries rather than kept as raw messages.Treasury-grade privacy: your data is yours
Everything NaviStrat knows about your organization lives in entities — structured database tables with built-in security. But NaviStrat isn't a generic chat app; it handles treasury-grade sensitive data: bank account numbers, trading positions, payment templates, cash forecasts, FX exposures, and client files. The data layer is designed around that reality.
Row-level security: the foundation
Every entity carries an rls block that defines who can create, read, update, and delete its records. For user-scoped data (conversations, memories, vault docs, open items, decisions), the rule is simple: read: { created_by_id: {{user.id}} } — you only ever see your own records, even though everyone's data sits in the same table. For admin-only data (GTM leads, blog management, platform activity logs, change logs), the rule is user_condition: { role: 'admin' } — only admins can access them. Some entities use compound rules: a document you own or one shared with you or an admin viewing everything.
Sensitive data categories
Bank data — account numbers are masked, balances and transactions are stored as entities but access is controlled by BankDataAccessRule records. Trading data — positions and P&L are RLS-locked to the owner. Payment data — every payment template and execution is logged in PaymentAuditLog with who/what/when. Client files — engagement notes and client data are admin-only.
Passcode-locked conversations
Sirius conversations can be passcode-protected for sensitive topics — M&A discussions, personal financial matters, anything you don't want visible if someone glances at your screen. The passcode is SHA-256 hashed before storage; the plaintext is never saved. Verification happens client-side so the server never sees the plaintext either.
Sentinel: the security & compliance module
Sentinel is NaviStrat's dedicated security layer. It maintains an access control matrix, enforces segregation of duties (the person who authorizes a payment can't be the one who executes it), tracks a risk register and fraud alerts, and maps compliance against frameworks (SOX, ISO 27001, etc.). It's the module that turns "we handle sensitive treasury data" into "we can prove we handle it right."
Multi-tenant workspace isolation
For the TMS, NaviStrat supports multi-tenant isolation through TMSWorkspace and TMSWorkspaceMember entities. Each workspace is its own isolated environment — its own bank accounts, GL accounts, counterparties, and configurations. Members are scoped to their workspace, so a user in Workspace A cannot see Workspace B's data.
rls block (read: { created_by_id: {{user.id}} } for user data; user_condition: { role: 'admin' } for admin-only). Bank data access via BankDataAccessRule. Audit via PaymentAuditLog, PlatformActivityLog, TMSEnvSnapshot. Passcodes: SHA-256 hash, client-side verification. Multi-tenant: TMSWorkspace + TMSWorkspaceMember. The RLS rules are enforced at the database query layer — there is no application-level filter that can be bypassed.Sirius has hands: integrations & workflows
Sirius isn't trapped inside NaviStrat. Through OAuth connectors, it can read your Gmail, manage your Calendar, save files to Drive, and sync rows to Sheets — all on your behalf. A Sirius conversation that ends with "set up a weekly cash review" can create a calendar event, save a template to Drive, and schedule a workflow that runs every Monday at 9 AM.
Workflows are the automation layer: "when X happens, do Y." A new blog submission triggers a reviewer notification. A published article auto-saves to Drive. A TMS issue syncs to Sheets. A PRISM course completion generates a certificate. They run even when no one is watching — which means Sirius is working for your team at 3 AM even if no one is logged in.
workflows/*.jsonc with triggers (scheduled, entity, connector webhook) and activities (invoke backend function, wait, switch). Backend functions (functions/*/entry.ts) hold the actual API call logic. Connector webhooks fire on real-time events (new Gmail, calendar changes, Drive file updates) and route to workflow steps that invoke backend functions.The Ko$ha TMS AI agent: a hands-on operator with a testing framework and a feedback loop
The Ko$ha TMS has its own embedded AI agent — the Command Agent — that goes beyond chat. It's a tool-calling agent: it doesn't just answer questions, it takes actions. It can create bank accounts, GL entries, payment templates, and bank statements through natural language. It can run the full automated test suite. It can seed sample data so you can test immediately. And it feeds a continuous-improvement feedback loop that proposes, generates, and applies enhancements to the platform itself.
The testing framework
The TMS ships with a comprehensive automated test framework — 24+ real tests across five modules (Cash Management, Bank Accounts, Payments, FX, Debt & Investment). Each test queries live entities and validates real data: a cash test checks that BAI2 statements exist with populated balances and transactions; a payments test checks segregation-of-duties integrity (the maker is not the approver); an FX test checks for policy-limit breaches. Tests return structured results — pass, fail, or manual-check — with assertions, evidence, and a summary. The Command Agent can run any test or an entire module's suite through a tool call, and it interprets the results in natural language.
Beyond the static test suite, the framework supports AI-generated test injection: the agent can propose new tests based on gaps it observes, and those tests are dynamically added to the suite and run alongside the existing ones. This means the test coverage grows as the system evolves.
The continuous-improvement feedback loop
The platform has a built-in feedback loop where the AI itself proposes improvements. There are two entry points: chat-driven (a user asks the AI to propose an improvement, and it creates a structured proposal) and daily review (a scheduled function analyzes recent platform activity, introspects the live system — entity counts, data health, activity by module, error counts — and proposes 1–3 concrete improvements). Every proposal is deduplicated with fuzzy title matching so the same idea isn't re-proposed twice. Proposals are categorized (technical, efficiency, UX, productivity, bug, performance) and prioritized (urgent, high, medium, low).
Each proposal flows through a review pipeline: proposed → approved → implemented (or rejected). An admin reviews proposals in the Continuous Improvement panel, approves or rejects them, and on approval the system auto-generates the code change.
The enhancement request workflow
When an improvement proposal is approved, the system automatically generates a code change proposal. If the chat conversation already contains embedded code (from an AI that wrote the solution inline), it extracts that code directly — no extra LLM call needed. Otherwise, it invokes an LLM to generate the complete code change based on the proposal's title, description, and proposed change. The generated code proposal lands in a separate Code Proposals queue with status approved, ready to be applied. An admin reviews the generated code and applies it through the builder. The full workflow — proposal → approval → code generation → application — is audit-logged, so every change to the platform is traceable back to the improvement that triggered it.
tmsTestRunner.js holds real test runners that query entities via the SDK and validate data with assertion helpers (eq, gte, exists, contains, length, approx). Each runner returns { status, assertions, evidence, summary }. The TMSTestFramework page renders suites with filters (module, type, status) and a progress bar.Agent:
TMSCommandAgent uses gemini_3_flash with a tool-manifest system prompt. It parses {"tool":"name","args":{}} blocks from model output and executes them via tmsAgentTools.js (12 tools). After each tool call, a follow-up LLM call summarizes the result in natural language.Feedback loop:
SiriusImprovementProposal entity (proposed → approved → implemented/rejected). siriusProposeImprovement creates proposals from chat; siriusDailyImprovementReview runs a scheduled analysis with fuzzy dedup; siriusPlatformIntrospect provides live system stats (entity counts, data health, activity by module, error counts).Enhancement workflow:
CodeChangeProposal entity (proposed → approved → applied/rejected). On approval, ContinuousImprovementPanel auto-generates code — either extracting embedded code from the chat or invoking an LLM with a JSON schema for structured output. Generated proposals land at approved status, ready to apply.A day at NaviStrat: Sirius across every module
The CFO opens Sirius on her phone. The daily briefing is cached (no LLM call today). It mentions last night's platform changes, today's calendar, and an overdue open item from last week's PRISM review.
She asks Sirius to draft a board update. Tier selector picks mid. Memories + last quarter's vault doc + the current cash position from Ko$ha TMS are loaded. Sirius calls Anthropic (cached) and drafts the update — referencing the actual numbers from the TMS.
A quick follow-up goes to Google (cheap tier), but the free tier just hit its per-minute limit — 429. Failover silently retries on OpenAI. The CFO never sees an error and the board paper is finished on time.
The treasurer asks PRISM to analyze the portfolio and suggest a rebalance. Full tier: Opus, the full vault, Plaid account data. PRISM's AI advisor does the analysis — but Sirius surfaces a memory from three weeks ago about the CFO's risk appetite, so the recommendation aligns with the stated strategy.
The treasury analyst opens the Ko$ha TMS test framework and asks the Command Agent to run all cash tests. The agent calls the run_all_tests_for_module tool, executes 7 real tests against live entities, and summarizes: 6 pass, 1 manual check needed. It then seeds a missing MT940 statement so the analyst can re-test.
Sentinel detects an unusual payment pattern in Ko$ha TMS. It triggers a Sirius alert — which pulls the relevant context (who authorized, what's the pattern, what's the segregation-of-duties status) and presents it to the CFO in a single message. The CFO passcode-locks the conversation for discretion.
A contributor submits an article to TrueNorth. Sirius reviews it using the editorial voice saved as a memory — checking tone, structure, and factual accuracy. It suggests edits and notifies the reviewer. The article is filed to Drive by a workflow.
The CFO closes her laptop and opens her phone. The afternoon's conversations are already there — realtime sync pushed them the moment each message landed. She picks up mid-thought on the train home.
Why organizations choose NaviStrat
Most treasury technology vendors sell you a tool. You buy a cash management system, a payments platform, an FX module, a reporting tool — and you spend years stitching them together, training your team on eight different interfaces, and wondering why nothing talks to anything else.
NaviStrat sells you a platform. Eight modules, one interface, one memory, one intelligence layer. Your team learns one system. Your data lives in one place. Your AI — Sirius — knows what every department is doing and can act on it. A cash position anomaly triggers a Sirius alert that references your risk appetite from a conversation three weeks ago. A board paper draft pulls live numbers from the TMS. A PRISM investment plan aligns with a strategy you discussed in a chat. A TrueNorth article is reviewed in your editorial voice. A payment is caught by Sentinel before it leaves the building. And the Ko$ha TMS agent runs a full test suite every morning and proposes improvements before you've had your coffee.
This is what "platform" means. Not a collection of screens. A single, intelligent, secure, auditable environment where every tool makes every other tool smarter — because they all share one brain.
NaviStrat is the only treasury and technology platform where the AI isn't a feature — it's the foundation. Sirius doesn't sit next to your tools. It is your tools, made intelligent.
