Gamma AI

About the Project

Inspiration

Gamma AI was inspired by the gap between everyday personal finance curiosity and the complexity of traditional investing platforms. Many people want to understand portfolios, research companies, test investment ideas, and learn how markets work, but existing tools often feel either too simplistic or too risky for beginners.

Gamma AI is intentionally designed as a paper-trading simulation only platform. Rather than connecting users to a live brokerage account, it provides a safe environment where AI-powered finance agents assist with research, explain portfolio decisions, generate simulated trade proposals, and help users better understand investing.

The goal is education rather than execution. Gamma AI does not provide investment advice or place real trades. Instead, it enables users to safely explore investing concepts while maintaining complete control over every simulated decision.

The project was also inspired by modern agentic development workflows using Codex and OpenAI models. Throughout development, AI served as a collaborative engineering partner for system design, implementation planning, documentation, code review, architecture refinement, and safety analysis.


What I Built

Gamma AI is an AI-assisted personal finance simulator focused on investment research, portfolio analysis, and paper trading.

Users can:

  • Sign in securely using Supabase Authentication
  • Receive a default paper trading account
  • View portfolio balances, holdings, and transaction history
  • Chat with specialized AI finance agents
  • Research securities and market conditions
  • Review AI-generated investment proposals
  • Approve or reject simulated trades
  • Monitor portfolio performance over time

The application intentionally separates AI explanations from deterministic execution.

AI agents can:

  • Research securities
  • Analyze portfolios
  • Explain market conditions
  • Recommend paper trades

However, deterministic backend services remain responsible for:

  • Risk validation
  • Proposal creation
  • Order processing
  • Portfolio accounting
  • Audit logging
  • Paper execution

Every paper trade follows an approval workflow before execution, ensuring users always remain in control.

Core Features

  • Authenticated personal dashboard
  • Paper trading accounts
  • Portfolio balances and holdings
  • Orders, transactions, and ledger history
  • Realized and unrealized P&L tracking
  • AI-powered finance assistant
  • Specialist research agents
  • Portfolio analysis
  • Risk explanations
  • Evidence-backed recommendations
  • Paper trade proposal workflow
  • User approval/rejection flow
  • Internal paper broker simulation
  • Slippage and fee simulation
  • Portfolio accounting
  • Trade audit history
  • Conversation persistence
  • Tool call tracing
  • EODHD MCP market data integration
  • Supabase PostgreSQL persistence
  • Row-Level Security (RLS)
  • Signed automation endpoints
  • Kill switches
  • Rate limiting
  • Paper trading disclaimer

How I Built It

Gamma AI is built using:

  • Next.js App Router
  • React
  • TypeScript
  • Tailwind CSS
  • Supabase
  • PostgreSQL
  • OpenAI JavaScript SDK
  • OpenAI Agents SDK
  • EODHD MCP Server
  • Vercel

High-Level Architecture

Browser
    │
    ▼
Next.js (Vercel)
    │
    ├── Supabase Auth
    ├── Row-Level Security
    ├── API Routes
    │
    ▼
Agent Orchestration
    │
    ├── Manager Agent
    ├── Research Agent
    ├── Portfolio Agent
    ├── Risk Agent
    └── Execution Agent
    │
    ▼
EODHD MCP Market Data
    │
    ▼
Trade Proposal Services
    │
    ▼
Deterministic Risk Engine
    │
    ▼
Paper Broker
    │
    ▼
Supabase PostgreSQL
    ├── Accounts
    ├── Positions
    ├── Orders
    ├── Ledger
    ├── Transactions
    ├── Proposals
    ├── Conversations
    └── Audit Logs

Signed Cron Jobs
    │
    ▼
Automation Workflows

The browser never communicates directly with OpenAI or external providers. All requests pass through trusted Next.js API routes where authentication, authorization, validation, logging, and business rules are enforced.


Agent Architecture

Gamma AI follows a Manager + Specialist Agents pattern.

Manager Agent

  • Understands user intent
  • Coordinates specialist agents
  • Produces structured responses
  • Synthesizes recommendations

Research Agent

Responsible for:

  • Company research
  • Fundamentals
  • Market context
  • News analysis
  • Evidence gathering

Portfolio Agent

Responsible for:

  • Holdings analysis
  • Position review
  • Exposure calculations
  • Portfolio summaries
  • Historical activity

Risk Agent

Responsible for:

  • Explaining deterministic policies
  • Describing portfolio risks
  • Explaining proposal outcomes

The Risk Agent cannot override backend rules.

Execution Agent

Responsible for:

  • Creating paper trade proposals
  • Submitting approved proposals
  • Coordinating backend execution

The Execution Agent never writes directly to portfolio state.


Paper Trading Workflow

Gamma AI uses a conservative execution model.

  1. User requests research or portfolio analysis.
  2. AI agents gather evidence.
  3. Agents generate structured recommendations.
  4. Backend creates a paper trade proposal.
  5. User reviews the proposal.
  6. User approves or rejects the proposal.
  7. Deterministic backend revalidates the proposal.
  8. Internal paper broker simulates execution.
  9. Orders, positions, transactions, and ledger entries are recorded.

Safety Architecture

Gamma AI prioritizes safety over automation.

Safety mechanisms include:

  • Paper trading only
  • Manual proposal approval
  • Deterministic backend validation
  • Proposal snapshots
  • Idempotency protection
  • Audit logging
  • Kill switches
  • Rate limiting
  • Signed cron endpoints
  • Server-only API secrets
  • Provider allowlists
  • Market data normalization
  • Persistent paper trading disclaimer

The application is intentionally designed so AI cannot bypass backend business rules.


Persistence

Gamma AI stores all important application state inside Supabase PostgreSQL.

Stored data includes:

  • User accounts
  • Paper portfolios
  • Holdings
  • Positions
  • Orders
  • Ledger entries
  • Transactions
  • Trade proposals
  • Conversations
  • Tool traces
  • Audit events
  • Automation history

Row-Level Security ensures every user's data remains isolated.


Market Data Integration

Gamma AI integrates with the EODHD MCP Server to provide:

  • Security lookup
  • Live prices
  • Historical prices
  • Fundamentals
  • Market news
  • Company information

The integration includes:

  • Tool discovery
  • Allowlisting
  • Response normalization
  • Health checks
  • Timeouts
  • Retries
  • Failure handling

This ensures market data enriches the application without becoming a single point of failure.


Automation

Gamma AI supports multiple automation modes:

  • Analysis-only
  • Proposal-only
  • Policy-authorized paper execution

Automation is protected by:

  • Global kill switches
  • Authorization checks
  • Manual approval policies
  • Signed cron endpoints
  • Backend validation

What I Learned

Building Gamma AI reinforced that successful AI applications require carefully designed boundaries rather than simply adding a chatbot to an existing product.

Some of the most important lessons included:

  • Separating AI explanations from deterministic execution
  • Distinguishing recommendations from business logic
  • Protecting hidden prompts and provider secrets
  • Maintaining complete auditability
  • Designing graceful fallback behavior
  • Building resilient agent orchestration
  • Keeping safety as the highest priority

Another major takeaway was the importance of preserving evidence.

Rather than simply answering user questions, Gamma AI records:

  • Agent decisions
  • Tool calls
  • Supporting evidence
  • Structured outputs
  • Proposal history
  • Final outcomes

This creates a fully auditable AI system.

The project also demonstrated how valuable Codex-style development workflows can be throughout an entire software lifecycle, from planning and implementation to documentation, refactoring, testing, and architecture review.


Challenges I Faced

Designing a finance application around AI presented several unique challenges.

Safety

The application needed to remain educational without encouraging real investing behavior.

To accomplish this, Gamma AI includes:

  • Paper-only execution
  • Manual approvals
  • Risk validation
  • Kill switches
  • Backend enforcement
  • Persistent disclaimers

Agent Orchestration

Rather than allowing one AI agent to perform every task, responsibilities were intentionally separated into specialized agents with clearly defined boundaries.

Security

Protecting user data required careful implementation of:

  • Supabase Row-Level Security
  • Server-side authorization
  • Secure persistence
  • Audit logging
  • Ownership validation

Market Data Integration

Integrating EODHD MCP introduced challenges around:

  • Tool discovery
  • Transport reliability
  • Response normalization
  • Allowlisting
  • Health monitoring
  • Timeout handling
  • Provider failures

Automation

Supporting automation while maintaining safety required multiple layers of validation before any simulated trade could be executed.


Why It Matters

Gamma AI demonstrates that AI can be useful in sensitive domains when combined with deterministic software engineering and strong product boundaries.

Rather than encouraging users to make real trades, Gamma AI provides a transparent environment where they can:

  • Ask financial questions
  • Research investments
  • Review supporting evidence
  • Understand portfolio behavior
  • Practice investment decision making
  • Learn from simulated outcomes

The project combines:

  • Agentic AI
  • Personal finance
  • Paper trading
  • Market data
  • Auditability
  • Backend safety
  • Secure cloud architecture

into a single educational platform designed to make investing more understandable without exposing users to financial risk.


Disclaimer

Gamma AI is not a brokerage platform.

Gamma AI does not execute real trades.

Gamma AI does not provide financial or investment advice.

Gamma AI is a paper-trading simulator built for education, experimentation, and learning in a safe, auditable environment.

Built With

  • chatgpt
  • codex
  • eodhd
Share this project:

Updates