Skip to content

nightowl121/blockchain-intelligence-poc

Repository files navigation

Orynt AI: Blockchain Intelligence Agent POC

Orynt AI is a sophisticated Proof-of-Concept (POC) blockchain agent designed to transform natural language queries into verified on-chain insights. It leverages the Gemini 3 Pro reasoning engine and Etherscan v2 authenticated infrastructure to provide a "Think-Before-Act" intelligence workflow.

🏗 Architecture Diagram

Architecture Diagram

🛠 The Agentic Process

Orynt AI follows a strict 6-step lifecycle to ensure data accuracy and user trust:

  1. Intent Parsing: The user's query is analyzed to extract the Subject (e.g., Ethereum), Action (e.g., Cost Estimation), and Urgency. This prevents "hallucinated actions" by anchoring the request to a known schema.
  2. Data Planning: Instead of blindly calling APIs, the agent formulates a Data Strategy. It selects specific tools (e.g., getMempoolStats + getEthMarketData) required to satisfy the specific intent.
  3. Tool Execution: The agent executes authenticated calls to the Etherscan v2 API. This layer includes robust hex-to-decimal conversion and error handling for sub-gwei environments.
  4. Aggregation: Raw JSON-RPC responses and Oracle data are normalized. We calculate the pressureIndex (Node Price / Oracle Price) to measure real-time mempool congestion.
  5. Insight Generation: Gemini synthesizes the collected data into a human-readable report. This includes specific USD costs (formatted as < $0.01 for low-gas environments) and uncertainty scores.
  6. Grounding & Sources: Every insight is linked back to its origin (Etherscan v2), providing a transparent "Chain of Custody" for the intelligence.

🚀 Key Features

  • Gemini 3 Pro Reasoning: Advanced semantic understanding of complex blockchain queries.
  • Etherscan v2 Integration: Uses the latest v2 API for higher performance and broader chain support.
  • Execution Control: Includes an AbortController mechanism allowing users to stop the reasoning process mid-flight.
  • Sub-Gwei Precision: Specifically tuned to handle extremely low gas environments with high decimal precision.
  • Live Console: A terminal-style view that provides transparency into the agent's internal "thought process" and API interactions.

🔒 Security Policy

  • Read-Only: The agent has no "Write" permissions. It cannot sign transactions or access private keys.
  • Authenticated Traffic: All data is fetched via authenticated Etherscan endpoints to ensure reliability and higher rate limits.
  • Context Isolation: Each session is grounded only in the data retrieved during that specific execution cycle.

🚀 Getting Started

Prerequisites

  • Node.js (v20 or higher)
  • npm or yarn package manager
  • Gemini API Key - Get it from Google AI Studio
  • Etherscan API Key - Get it from Etherscan

Installation

  1. Clone or download the repository:

    cd blockchain-intelligence-poc
  2. Install dependencies:

    npm install
    # or
    yarn install

Configuring API Keys (BYOK - Bring Your Own Keys)

Orynt AI implements a secure BYOK (Bring Your Own Keys) model where API keys are never exposed or stored on servers:

  1. Launch the application - On first visit, a settings modal will prompt you to enter your API keys
  2. Enter your keys:
  3. Keys are stored securely:
    • Stored in browser sessionStorage (cleared when tab is closed)
    • Never sent to any backend server
    • Never logged or persisted to disk
  4. Update keys anytime - Click the "Keys" button in the header to reconfigure

Security Benefits:

  • 🔒 Frontend-only key management
  • 🚫 No backend exposure
  • 🔄 Session-scoped (auto-clear on tab close)
  • 👤 Complete user control

Running the Project

Development Mode:

npm run dev
# or
yarn dev

The application will start on http://localhost:3000. A settings modal will appear for API key configuration.

Build for Production:

npm run build
# or
yarn build

This creates an optimized build in the dist/ directory.

Preview Production Build:

npm run preview
# or
yarn preview

This serves the production build locally for testing.

Usage

  1. Start the application - The Settings modal will appear
  2. Configure your API keys - Enter your Gemini and Etherscan keys (BYOK model)
  3. Query the blockchain - Enter a natural language query about Ethereum data
  4. Review the results - Watch the live console for the agent's reasoning process
  5. Explore insights - See synthesized data with sources and confidence metrics

🌐 Deployment

Netlify Deployment

This project is optimized for Netlify with a preconfigured netlify.toml file.

  1. Push to GitHub (or your Git provider):

    git add .
    git commit -m "Initial commit"
    git push origin main
  2. Connect to Netlify:

    • Go to Netlify
    • Click "New site from Git"
    • Connect your repository
    • Build command: npm run build
    • Publish directory: dist
    • Deploy!
  3. Configure Environment Variables (if needed):

    • In Netlify dashboard, go to Site settings → Build & deploy → Environment
    • Note: API keys are configured in the browser UI (BYOK), no backend env vars needed

The netlify.toml file automatically handles:

  • ✅ Correct MIME types for JavaScript modules
  • ✅ Single-page app routing (SPA)
  • ✅ Security headers
  • ✅ Proper asset serving

Powered by Google Gemini 3 Pro & Etherscan v2 Infrastructure.

About

Blockchain intelligence agent to provide insights on gas report of ethereum blockchain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors