CoolFace
Apppublic

im-amrith/nerve

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
App README

Agentic Brokerage OS

An intelligence-first brokerage layer that governs trading through autonomous AI agents.

๐ŸŽฏ Core Philosophy

Problem: Brittle execution-only models lead to retail losses through emotional trading and lack of behavioral guardrails.

Solution: Self-healing adaptive automation using Vision Language Models and multi-agent orchestration.

๏ฟฝ Interactive Dashboard (Recommended for Judges)

We've built a beautiful web-based dashboard to showcase all features interactively!

One-Click Launch (Windows):

bash
run_dashboard.bat

One-Click Launch (Linux/Mac):

bash
chmod +x run_dashboard.sh
./run_dashboard.sh

Manual Launch:

bash
# Install Streamlit
pip install streamlit>=1.30.0

# Launch dashboard
streamlit run dashboard.py

Then open your browser to: http://localhost:8501

The dashboard provides:

  • โ€”โœ… Interactive demos of all 4 core features
  • โ€”โœ… Real-time visualization of AI agents
  • โ€”โœ… Live code generation and execution
  • โ€”โœ… Beautiful UI for judges to evaluate
  • โ€”โœ… One-click feature switching

๏ฟฝ๐Ÿ—๏ธ Architecture

Perception (CV + Groq VLM) โ†’ Reasoning (LangGraph) โ†’ Action (Trading APIs)

Core Components

  • โ€”Orchestrator: LangGraph-based multi-agent coordination
  • โ€”Perception Engine: Computer Vision + Groq for UI understanding (no DOM selectors)
  • โ€”Reasoning Engine: LLM-based planning and decision-making
  • โ€”Pre-Trade Sentinel: Sub-50ms safety checks and kill switch
  • โ€”Strategy Engine: Natural language to executable trading algorithms
  • โ€”RAG Journaling: Context-aware trade autopsy system

๐Ÿš€ Quick Start

Prerequisites

bash
Python 3.10+
pip install -r requirements.txt

Environment Setup

Create a .env file:

env
GROQ_API_KEY=your_groq_api_key
PINECONE_API_KEY=your_pinecone_key
PINECONE_ENV=your_environment

Run the System

bash
# Start the orchestrator
python src/main.py

# Run demos
python demos/ui_adaptation_demo.py
python demos/strategy_generation_demo.py

๐Ÿ“ Project Structure

zerodha/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ agents/              # Specialized agents
โ”‚   โ”‚   โ”œโ”€โ”€ perception_agent.py
โ”‚   โ”‚   โ”œโ”€โ”€ reasoning_agent.py
โ”‚   โ”‚   โ”œโ”€โ”€ sentinel_agent.py
โ”‚   โ”‚   โ””โ”€โ”€ strategy_agent.py
โ”‚   โ”œโ”€โ”€ core/                # Core systems
โ”‚   โ”‚   โ”œโ”€โ”€ orchestrator.py  # LangGraph workflow
โ”‚   โ”‚   โ”œโ”€โ”€ perception.py    # CV + VLM perception
โ”‚   โ”‚   โ””โ”€โ”€ state.py         # Agent state definitions
โ”‚   โ”œโ”€โ”€ engines/             # Business logic
โ”‚   โ”‚   โ”œโ”€โ”€ pre_trade_sentinel.py
โ”‚   โ”‚   โ”œโ”€โ”€ strategy_engine.py
โ”‚   โ”‚   โ””โ”€โ”€ rag_journal.py
โ”‚   โ”œโ”€โ”€ utils/               # Utilities
โ”‚   โ”‚   โ”œโ”€โ”€ vision.py
โ”‚   โ”‚   โ”œโ”€โ”€ memory.py
โ”‚   โ”‚   โ””โ”€โ”€ validators.py
โ”‚   โ””โ”€โ”€ main.py              # Entry point
โ”œโ”€โ”€ demos/                   # Demonstrations
โ”œโ”€โ”€ tests/                   # Test suite
โ”œโ”€โ”€ config/                  # Configuration files
โ””โ”€โ”€ docs/                    # Documentation

๐ŸŽช Demos

1. UI Adaptation Demo ("Sabotage Test")

Demonstrates self-healing when UI elements are moved/modified.

bash
python demos/ui_adaptation_demo.py

2. Strategy Generation

Convert natural language to backtested trading algorithms.

bash
python demos/strategy_generation_demo.py

3. Pre-Trade Sentinel

Live demonstration of the kill switch blocking risky trades.

bash
python demos/sentinel_demo.py

๐Ÿ” Security Features

  • โ€”Zero-Knowledge ML: Verifiable inference without data exposure
  • โ€”User Constitution: Personalized trading rules and guardrails
  • โ€”Kill Switch: Hard blocks on rule violations (<50ms latency)

๐Ÿ“Š Key Metrics

  • โ€”Perception Latency: <200ms for screen-to-JSON mapping
  • โ€”Sentinel Response: <50ms for trade safety checks
  • โ€”UI Adaptation: Real-time self-healing without code changes

๐Ÿ› ๏ธ Technology Stack

  • โ€”VLM: Groq (llama-3.2-90b-vision-preview)
  • โ€”Agent Framework: LangGraph
  • โ€”Vector DB: Pinecone
  • โ€”Computer Vision: OpenCV + Pillow
  • โ€”API Layer: FastAPI (future)

๐Ÿ“ License

MIT

๐Ÿค Contributing

See CONTRIBUTING.md