Next Smart Finance Hub
Un agent d'investissement simulé qui s'adapte à vous et prouve chacun de ses chiffres. A simulated investing assistant that adapts to you and proves every number it shows.
Simulation only · No real trades · No investment advice
Inspiration
The challenge gave us the rules: everything simulated, no investment advice, uncertainty shown, and explanations that match what the system actually did. How to solve it was up to us.
We noticed that most stock apps show everyone the same screen, whether they are a first-time investor or a seasoned one. So our idea was to adapt the app to the person: a short profile sets their level and risk band, and an AI agent helps them explore, with the quotes, the watchlist and the portfolio all following that profile.
An agent that sounds convincing is easy to build. We wanted one that can prove where each number came from, since the rule about faithful explanations is the hardest part of the case. That meant tracing every figure and logging every action.
What it does
Next Smart Finance Hub is a bilingual (English/French) simulated investing app that adapts to the user's profile.
| Feature | What the user gets |
|---|---|
| Profile onboarding | A short questionnaire sets the user's level and risk band. Versioned rules score the answers on the server, not a language model. |
| Smart watchlist | Ranked picks from a 210-asset universe, with a plain-language "Why?" for each pick: its score, the factors behind it and the filters applied. |
| Simulated portfolio | Trades, investment rules and a Portfolio X-ray showing where the money and the risk are concentrated. |
| Portfolio X-ray | Replays today's mix over past periods as a labelled scenario, and answers "what if I add or reduce this holding?". |
| Traceable agent | Looks up quotes, explains picks, simulates trades, creates rules and changes the dashboard layout. |
| Voice | Voice input and read-aloud. |
Two guarantees run through the whole app:
- Every figure shows its source and timestamp.
- The agent never applies anything on its own. Every change gets a preview, a confirmation and an undo.
How we built it
Stack
| Layer | Technology |
|---|---|
| App | Next.js 15, React 19, TypeScript, Tailwind 4, shadcn/ui, next-intl (fork of the open-source OpenStock, AGPL-3.0) |
| Agent | Python service on the Strands Agents SDK |
| Models | Claude Sonnet 5.5 (orchestrator) and Claude Haiku 5.5 (sub-agents for layout, rules, profile and portfolio) on Amazon Bedrock, with a Guardrail |
| Market data | Yahoo, Finnhub, TMX Money, Bank of Canada, Kraken |
| AWS | DynamoDB, CloudTrail, ECS behind a load balancer, Amazon Polly and Transcribe |
Design principles
- The code computes, the model explains. The agent has no calculator of its own and calls the web app's internal tools.
- Append-only audit trail. Decision and agent-action logs live in DynamoDB with conditional writes, no update or delete permission, and point-in-time recovery.
- Source and fetch time on every value. Each data point carries its provider and the time it was obtained.
- Live agent view. Replies stream over SSE, showing which specialist is working and which tool was called. The text appears only after it passes the word check and the guardrail.
Challenges we ran into
- Faithful explanations. An explanation can sound right and still be invented. Wording comes from deterministic templates and the audit log, and any figure in an agent reply is checked against the numbers the tools returned.
- Honest data. Free sources lag, rate-limit and disagree. We label delays, show stale-data warnings and say when something is unavailable instead of filling the gap.
- The X-ray. Past-window results can look like performance. We label them as scenarios, state their limits, and checked the risk figures against independent recomputations.
- Long agent calls. An agent request takes several model calls, which hit the load balancer's idle timeout. We added heartbeats and a longer timeout.
Accomplishments that we're proud of
- A full audit trail: every agent action, from the question to the applied change and its undo, is logged in an append-only store.
- No number appears without a source and a time.
- Safe by design: the agent only proposes, and the user confirms.
- A Portfolio X-ray whose maths is tested against independent computations.
- A real, deployed AWS system, not a mock-up.
What we learned
- Explainability has to be built into the data model from the start; adding it later does not work.
- The best use of an LLM here is to explain results that code already computed.
- Showing uncertainty (delays, missing data, scenarios versus facts) earns more trust than a polished but overconfident answer.
- Small, strict action vocabularies make an agent far easier to audit than free-form ones.
What's next for Smart Finance Hub
| Next step | Description |
|---|---|
| Time machine | Replay a profile's rules from 2021 on a frozen Yahoo Finance snapshot, with a with-rules vs without-rules comparison, a log of every operation the rules triggered, and a sensitivity check over several start dates. |
| Agent-built dashboards | The agent assembles modules (heatmap, donut, histogram…) from a validated, declarative spec, and users can edit the layout by hand. |
| Agent-proposed rules | Investment rules suggested by the agent, with a plain-language preview. |
| Guided onboarding demo | A model portfolio built from the user's answers, with a rule they create and see replayed. |
| Portfolio import | CSV, manual entry, statement photo, and a simulated bank connector. |
| Persona presets | Ready-made profiles and a full profile reset. |
Built with: nextjs react typescript tailwindcss python strands-agents amazon-bedrock claude dynamodb aws-ecs cloudtrail amazon-polly amazon-transcribe
Built With
- amazon-bedrock
- amazon-dynamodb
- amazon-ecr
- amazon-ecs-fargate
- amazon-polly
- amazon-transcribe
- aws-cloudtrail
- aws-iam
- aws-secrets-manager
- bedrock-agentcore
- bedrock-guardrails
- claude
- docker
- elastic-load-balancing
- github-actions
- next-intl
- next.js
- python
- react
- shadcn/ui
- strands-agents-sdk
- tailwind-css
- typescript
- vitest
- zod