Inspiration

Most AI systems make decisions. Very few know when those decisions are wrong. None of them fix themselves.

We built Janus because we believe the next frontier of AI isn't just capability — it's accountability. A system that can audit its own reasoning, identify its own failures, and evolve its own behavior without human intervention.

What it does

Janus is a closed-loop autonomous financial intelligence system with five specialized AI agents:

  • Trading Agent — proposes trades based on market signals and news
  • Risk Agent — validates every trade against VaR thresholds and exposure limits
  • Fraud Intelligence Agent — detects reasoning inconsistencies and hallucinations in real time
  • Regulator Agent — makes the final execution decision with full audit trail
  • LLM Judge — scores every decision cycle across 5 dimensions: correctness, safety, hallucination risk, compliance, and explainability

Every score is logged as a live evaluation in Arize Phoenix. Every agent call is a traced span. Every failure becomes a learning event in the Phoenix dataset.

The Janus Loop — our self-correction engine — queries Phoenix via MCP, identifies failure patterns across recent cycles, generates behavioral constraints, and injects them into agent prompts. Phoenix Experiments track the before/after performance automatically.

In our demo: after one loop run triggered by an oil price shock, the Judge score improved from 5.4 to 6.8 — a 26% improvement. Automatically. No human intervention.

How we built it

  • LangGraph — stateful multi-agent graph with 5 specialized nodes
  • Google Gemini (via AI Studio) — primary LLM for all agent reasoning
  • Arize Phoenix — tracing, evaluations, datasets, and experiments (all four pillars)
  • Phoenix MCP Server — Meta-Agent queries Phoenix programmatically for self-correction
  • FastAPI + SSE — real-time agent activity streaming to frontend
  • Google Cloud Run — backend and Phoenix deployed in production
  • Firestore — portfolio state, trade history, behavioral constraints
  • Next.js + Vercel — production frontend
  • yfinance — real market data for portfolio simulation

Challenges we faced

The hardest challenge was building a system that genuinely improves itself — not just one that logs data. Making the Janus Loop actually read Phoenix telemetry, extract meaningful patterns, and generate constraints that change agent behavior required careful prompt engineering and state management across the LangGraph graph.

Deploying Phoenix to Cloud Run with persistent storage and wiring all four pillars (tracing, evaluations, datasets, experiments) in a single coherent pipeline was technically demanding but critical for the Arize track.

What we learned

That observability isn't just for debugging — it's the foundation of AI governance. Arize Phoenix gave us the infrastructure to build a system that doesn't just act, but reflects. The LLM-as-Judge pattern combined with Phoenix evaluations creates a feedback loop that makes AI systems genuinely accountable.

What's next

Janus is a proof of concept for enterprise AI governance. The architecture applies to any domain where AI decisions need to be trusted, audited, and improved — healthcare, legal, logistics. The self-correction loop is the primitive that makes autonomous AI safe to deploy at scale.

Built With

  • arize-phoenix
  • fastapi
  • firestore
  • google-cloud-run
  • google-gemini
  • langgraph
  • next.js
  • opentelementary
  • python
  • vercel
  • yfinance
Share this project:

Updates