Inspiration Most SMEs in emerging markets make financial decisions based on gut feeling, not data. They can't afford financial analysts or expensive forecasting tools. A single AI model gives one perspective — but real business decisions are multi-dimensional. A bank sees risk differently than a supplier sees opportunity. We asked: what if we could simulate that multi-stakeholder analysis automatically, and make it accessible to any business owner? What it does Fiswarm lets SMEs forecast their financial future using 4 specialized AI agents that analyze in parallel:
- Owner Agent — strategic decisions, profit margins, growth direction
- Supplier Agent — supply chain risks, delivery delays, material costs
- Customer Agent — purchase patterns, price sensitivity, loyalty
- Bank Agent — credit eligibility, liquidity ratios, default risk Users log transactions (manual entry or CSV/Excel import), configure what-if scenario parameters (price changes, new hires, inventory budget, market growth), and launch a simulation. The output includes month-by-month cashflow forecasts with confidence scores, a 4-level risk alert system (low → critical), interactive agent chat for follow-up questions, full financial reports with executive summary, and auto-generated 9-slide pitch deck PDF. How we built it Frontend: React 19 + Vite 7 + Tailwind CSS v4 + shadcn/ui + Recharts for visualizations. Routing via wouter. Server state managed through tRPC + React Query. Backend: Express + tRPC 11 for end-to-end type-safe APIs. Drizzle ORM with MySQL. Three auth tiers (public, protected, admin) via JWT session cookies through an OAuth platform. AI Engine: The core runSwarmSimulation() pipeline runs 4 agents in parallel via Promise.all, each receiving a structured financial seed (monthly P&L, top categories, cashflow ratio) + scenario params + role-specific system prompts. Cashflow forecasts use LLM structured JSON output (json_schema response format) with a rule-based fallback. Post-simulation agent chat maintains conversation history (last 10 messages per agent) for context continuity. PDF Generation: Puppeteer + serverless Chromium for pitch deck exports. Storage: AWS S3 for file uploads. Challenges we ran into
- Structured LLM output reliability — Getting consistent JSON from LLMs for cashflow forecasts required implementing json_schema response format with a complete fallback pipeline when the model fails or returns malformed data.
- Multi-agent prompt engineering — Each agent needs a distinct, realistic perspective. A generic "analyze this" prompt doesn't work — we had to craft persona-specific system prompts that produce genuinely different insights (bank focuses on creditworthiness, supplier on payment terms, etc.).
- MySQL strict mode with Drizzle — ONLY_FULL_GROUP_BY rejected Drizzle's query builder output for monthly trend aggregation, forcing raw SQL with named aliases.
- Graceful degradation without database — The app needed to work for demos and testing without a live MySQL connection, so the DB layer returns empty/null gracefully instead of crashing. Accomplishments that we're proud of
- Real parallel multi-agent analysis — not sequential calls, true Promise.all parallelism so all 4 agents analyze simultaneously
- Structured JSON output from LLM with json_schema — reliable, parseable forecasts instead of free-text interpretation
- 4-level risk alert system that auto-detects negative cashflow months, labor cost impact, and inventory strain with actionable descriptions
- Full pitch deck PDF generation — 9 auto-generated slides from simulation data
- CSV/Excel import with auto-detect column mapping — users don't need to format their data perfectly
- End-to-end type safety from database schema (Drizzle) through tRPC API to React frontend — no manual type definitions What we learned
- Multi-agent AI is significantly more valuable than single-agent for financial analysis — the cross-perspective validation catches risks a single model misses
- Structured output (json_schema) is essential for production AI features — free-text LLM responses break downstream logic
- Fallback pipelines are not optional for AI features — they're the difference between a demo and a product
- Financial data summarization (seed generation) matters more than prompt engineering — the quality of context fed to agents determines output quality What's next for Fiswarm
- Historical accuracy tracking — compare past forecasts against actuals to improve confidence scoring
- More agent personas — add Government/Regulatory, Competitor, and Investor agents for deeper analysis
- Recurring simulations — automated weekly/monthly forecast runs with alert notifications
- Multi-business benchmarking — anonymous industry comparison data so SMEs can see how they stack up
- Mobile-first redesign — most SME owners manage finances from their phone, not a desktop
- Integration with accounting software — direct sync with popular bookkeeping tools instead of CSV import
- Fix the issue Pitch Deck Download from Chrominium to Puppetter
Log in or sign up for Devpost to join the conversation.