Oracle3
Open-source trading engine and MCP server for prediction markets. Fee-aware no-arbitrage trading across related contracts, live on Kalshi, Polymarket and Solana or on paper.
GlassBox turns AI-assisted advice into a documented control. Every answer cited, every refusal logged, every decision replayable.
Translation pending
FinancePython · TypeScriptGitHub @yash-vks-chauhanOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Auditable wealth-advisory AI: answers only from cited sources, refuses to guess, and keeps a tamper-evident audit trail. FastAPI + Next.js + Postgres, deployed on AWS. Try the live demo.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
GlassBox — An Auditable Wealth-Advisory AI Agent
An AI agent that answers financial advisory & compliance questions only from cited sources, refuses to guess, logs every decision for audit, and measures its own trustworthiness on a live dashboard.
Built for the real problem banks (like UBS) have in 2026: not "make a smarter AI" but "make an AI we can actually trust, defend, and deploy."
Try the live demo → One click, no signup.
Open the live demo and
choose a seat:Read the full README ↗An AI agent that answers financial advisory & compliance questions only from cited sources, refuses to guess, logs every decision for audit, and measures its own trustworthiness on a live dashboard.
Built for the real problem banks (like UBS) have in 2026: not "make a smarter AI" but "make an AI we can actually trust, defend, and deploy."
Try the live demo → One click, no signup.
Open the live demo and choose a seat:
The demo workspace is shared, so other visitors see what you ask there. The demo accounts can't change their sign-in settings or the client list.
A working multi-tenant web app, not a notebook:
With Docker (Postgres, the API and the web app):
BOOTSTRAP_SETUP_KEY=choose-a-long-random-string docker compose up --build
Open http://localhost:3000/setup, enter that key and create the first owner.
Use workspace ID demo to get the four sample clients and their documents.
Without Docker (Python 3.12, Node 22):
python3.12 -m venv .venv
.venv/bin/pip install -r backend/requirements-dev.txt
cp .env.example .env # then set BOOTSTRAP_SETUP_KEY in it
cd backend && ../.venv/bin/uvicorn app.main:app --reload --port 8000
# in a second terminal:
cd frontend && npm ci && npm run dev
Then open http://localhost:3000/setup as above. Locally the database is
SQLite (backend/glassbox_local.db) unless DATABASE_URL points at Postgres;
see backend/README.md for migrations, evaluation and
optional model routes.
| What | Command | Now |
|---|---|---|
| Backend, SQLite | cd backend && ../.venv/bin/pytest | 249 passed, 5 skipped (Postgres-only) |
| Backend, Postgres | GLASSBOX_TEST_DATABASE_URL=postgresql+psycopg://…/glassbox_test ../.venv/bin/pytest | 254 passed |
| Frontend | cd frontend && npm run lint && npm run typecheck && npm run build | clean |
| End to end | cd frontend && npm run test:e2e (against a running stack) | 11 Playwright specs |
| Dependencies | npm audit --omit=dev in frontend/, ../.venv/bin/pip-audit -r requirements.txt in backend/ | none known in what ships. Tailwind's build-time braces has an advisory with no fix yet (GHSA-vfj7-8cjw-p6xm); it only affects glob patterns, which our build config sets |
The backend suite is hermetic: a throwaway database, index and mail
directory, and it never reads your .env. CI
(.github/workflows/ci.yml) runs all of it on
every pull request, on SQLite and on Postgres 15, and builds and smoke-tests
the Docker stack.
On the project's 183-question benchmark (glassbox-eval-v4), re-run on
2 October 2026 with the local evidence engine:
| Outcome accuracy | Citation accuracy | Hallucination rate | Determinism | Faithfulness | Retrieval recall | p95 latency |
|---|---|---|---|---|---|---|
| 100% | 100% | 0% | 1.00 | 0.98 | 100% | 1 ms |
The benchmark was written alongside the engine over a synthetic corpus, so
it shows the engine does what it was designed to do. It doesn't show how it
would do on a real firm's documents; that needs a firm's documents and
reviewers. Reproduce it with
PYTHONPATH=. ../.venv/bin/python -m scripts.run_model_eval --routes local:glassbox-evidence-engine --gate full --determinism-runs 2 --no-persist
from backend/.
It's live at https://glassbox.15-252-203-137.sslip.io (API:
https://api.glassbox.15-252-203-137.sslip.io/health). It runs on one Graviton
t4g.small server in AWS Mumbai for about $14 a month. Caddy handles HTTPS,
Postgres runs in Docker, secrets live in SSM Parameter Store, and the disk
is snapshotted daily. infra/single-server/
has the files and the steps to update or remove it.
Every change that passes CI on main is deployed by the
Deploy workflow: arm64 images to ECR, a
rollout over SSM, and a smoke test. AWS access is through OIDC, with no
stored keys. Each run is listed under the repository's
Deployments.
Both images run as non-root, have health checks, and migrate on start safely even with several replicas. For a managed, multi-server setup (ECS Fargate, RDS PostgreSQL, an ALB, Secrets Manager), follow infra/aws-notes.md.
MIT. Use it, fork it, build on it. Security reports go through SECURITY.md.
| docs/design-decisions.md | Why grounded-only, why no fine-tuning, and the trade-offs behind threads, reviews and the hash chain |
| docs/threat-model.md | STRIDE threats per surface, each mapped to code and a test |
| docs/SECURITY-IMPLEMENTATION.md | The auth and hardening plan of record |
| docs/PRODUCTION-LLM.md | Adding a hosted or self-hosted model behind the evaluation gate |
| Runbooks and checklists in docs/ | Release, rollback, security operations, tenant onboarding, escalations, compliance review, audit verification, model evaluation, , , , , , |
Refresh the screenshots with npm run screenshots from frontend/ against a
running stack.
| Question | Decision | Why |
|---|---|---|
| Train our own LLM from scratch? | No | Costs millions, pointless for this. |
| Fine-tune an open LLM on finance data? | No | Bakes knowledge into weights → encourages hallucination → kills the whole "grounded only" thesis. |
| What runs the advisor answer path? | Private local evidence engine first; hosted LLM optional later | Runs without paid APIs by using retrieval, deterministic policy checks, claim verification, and audit replay. |
| Do we train ANY of our own models? | Yes — small ML models for the trust layer (grounding scorer, refusal router, fallback classifier) | Cheap to train, runs free, makes the project genuinely ours, mirrors skills already on the resume. |
| Where does it get hosted? | AWS (using the $150 credits) — app, audit DB, document storage, public URL | Turns paper AWS certs into a real deployed project. |
| Who pays when strangers use the demo? | Nobody | No paid model calls in the default path + AWS free/cheap tiers + rate limiting. |
One-line pitch: Everyone is building AI agents that give finance answers; almost nobody is building the trust-and-audit layer that makes those answers safe to use. GlassBox is that missing layer.
A financial advisor asks: "Can my client move $2M into this single tech stock?" Answering correctly means checking: the client's contract rules, their risk profile, position limits, cross-border/tax triggers. Advisors do this manually and miss things — and misses cost banks millions in fines.
The obvious fix is an AI agent. But banks won't deploy one because of three unsolved problems:
GlassBox attacks all three directly. That's the novelty.
┌─────────────────────────────────────────┐
│ FRONTEND (Next.js) │
│ Advisor chat UI + Governance Dashboard │
└───────────────────┬───────────────────────┘
│ (REST / WebSocket)
┌───────────────────▼───────────────────────┐
│ BACKEND API (FastAPI) │
│ "Orchestrator" │
└───┬──────┬───────┬────────┬────────┬───────┘
│ │ │ │ │
┌───────────▼┐ ┌───▼────┐ ┌▼──────┐ ┌▼──────┐ ┌▼─────────┐
│ RETRIEVAL │ │ANSWER │ │VERIFY │ │TRUST │ │PROVENANCE│
│ (RAG) │ │ AGENT │ │ AGENT │ │METRICS│ │ LOGGER │
└─────┬──────┘ └───┬────┘ └───┬───┘ └───┬───┘ └────┬─────┘
│ │ │ │ │
┌─────▼─────┐ ┌───▼──────────▼───┐ ┌───▼───┐ ┌───▼──────┐
│ Vector DB │ │ LOCAL EVIDENCE │ │ OUR │ │ Audit │
│ + S3 │ │ ENGINE / LLM OPT│ │ SMALL │ │ DB │
│ corpus │ │ │ │MODELS │ │ (Postgres)│
└───────────┘ └──────────────────┘ └───────┘ └──────────┘
A. Document Corpus + S3 storage The knowledge GlassBox is allowed to use. We assemble:
backend/corpus/ (shared factsheets and regulation, per-tenant IPS and portfolio snapshots) and indexed at build time; S3 sync is optional.B. Retrieval layer (RAG)
Takes the advisor's question, finds the most relevant document chunks, restricted to the caller's tenant plus shared documents. A small NumPy vector index with hash embeddings by default; BAAI/bge-small-en-v1.5 (sentence-transformers) is optional.
C. Answer Path The default path is a private local evidence engine: source retrieval, deterministic finance-policy extraction, claim verification, and advisor-safe rendering. Hosted/self-hosted LLMs remain optional candidates only after they pass the model gate.
D. Verify Agent (Chain-of-Verification) Breaks the draft into atomic claims → checks each against its cited source → discards/flags unsupported claims → returns the validated answer or a refusal.
E. Trust Metrics engine (uses OUR trained models)
F. Provenance Logger + Audit DB Every interaction logged: question, retrieved sources, claims kept/discarded, final answer or refusal, which rule applied, timestamps. Stored in SQLite locally and Postgres (RDS) in production, hash-chained per tenant. Replayable — an auditor can reconstruct exactly what the agent "knew" at decision time.
G. Governance Dashboard (frontend) Live view of: hallucination rate, refusal/escalation frequency, determinism score, audit-trail completeness, per-query traces. This is the "show, don't tell" trust display.
local:glassbox-evidence-engine is the default no-paid product route.| Model | Job | How trained | Compute |
|---|---|---|---|
| Grounding/Hallucination scorer | Score if answer is supported by sources | scikit-learn classifier on labeled good/bad answer pairs | CPU, free (Kaggle/Colab) |
| Refusal router | Answerable vs escalate-to-human | small classifier on labeled questions | CPU, free |
| Fallback classifier | Safe structured reply when an optional hosted route fails | Random Forest on logged incidents | CPU, free |
These run free, are deployable on AWS without a GPU, and make the project demonstrably yours — directly echoing the IIT metric-design work and the AutoScaler fallback classifier already on the resume.
| Layer | Tool | Note |
|---|---|---|
| Frontend | Next.js + React + TypeScript + Tailwind + Recharts | Already known from Kalakraft & AutoScaler |
| Backend | Python + FastAPI | Already known from IIT/AutoScaler |
| Inference | Private local evidence engine; optional OpenRouter/Ollama/vLLM candidates | No paid API required by default |
| Embeddings | Hash embeddings; optional sentence-transformers / bge | Free |
| Vector index | NumPy, built from the corpus | Free, lightweight; pgvector if the corpus grows |
| Our ML models | scikit-learn | CPU only |
| Audit DB | SQLite locally, PostgreSQL (AWS RDS) in production; Alembic migrations | Mirrors AutoScaler's TimescaleDB use |
| Corpus storage | Files in the image; AWS S3 optional | Pennies |
| Hosting | Docker images; AWS ECS Fargate + ALB planned | Uses the $150 credits |
| Access control | Tenants + RBAC, TOTP MFA, AWS IAM for the deployment | Bank-relevant |
| Public-demo safety | Rate limiting per tier, body-size caps | Keeps it free for visitors |
Use credits for: EC2/Lambda hosting, RDS Postgres (audit logs), S3 (corpus), API Gateway, IAM. Comfortably runs a public demo for months.
Do NOT use credits for: GPU instances for LLM training or long idle instances.
Guardrails (do this on day one):
Resume payoff: turns the existing AWS Cloud Practitioner + AWS ML Specialty certs into a deployed project — IAM/RBAC, RDS audit store, S3 corpus, public URL. "I can ship to a regulated cloud environment."
Status, October 2026: phases 0–6 and 8 are built. Phase 7 is built except the deployment itself; see infra/aws-notes.md.
Lean demo ≈ 2–3 weeks (Phases 0–4). Full version ≈ 5–6 weeks (all phases).
GLASSBOX_LOCAL_EVIDENCE_MODE=1 and test a grounded /ask call.GlassBox — Auditable Wealth-Advisory AI Agent
- Built a multi-agent advisory system that answers compliance/suitability questions only from cited sources, implementing retrieval-grounding, Chain-of-Verification, and automatic refusal on ungrounded claims (0% hallucination and 100% citation accuracy on a 183-question benchmark).
- Trained custom grounding, refusal-routing, and fallback classifiers (scikit-learn) to guard the trust boundary and provide an LLM-failure fallback with zero external dependency.
- Designed a determinism harness measuring answer-drift across repeated runs, surfacing the consistency/accuracy trade-off that current financial-AI research treats as an open problem.
- Generated replayable decision traces and a live governance dashboard (hallucination, refusal, determinism, audit-completeness), addressing the auditability gap regulators require under the EU AI Act.
- Deployed on AWS (EC2 Graviton with Docker and automatic TLS, ECR, SSM Parameter Store, daily EBS snapshots; Postgres audit store; CI on SQLite and Postgres) with rate-limited public access and no paid model dependency.
| Risk | Mitigation |
|---|---|
| Optional hosted LLM rate limits | Default to local evidence mode; queue hosted requests and keep BYO-key as an admin option |
| AWS credits burn | Billing alarms, no idle GPU, train models off-AWS |
| Scope creep | Lean demo (Phases 0–4) is already shippable; rest is bonus |
| Weak grounding on small models | Tight corpus, strong retrieval, verification pass |
| Synthetic data looks fake | Base IPS rules on real public mandate templates; use real public factsheets |
| README-LATER.md | What's left |