Skip to content

AliasAI/Agentscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

202 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Agentscan - ERC-8004 AI Agent Explorer

A blockchain explorer-like web application for exploring and displaying AI agent information on the ERC-8004 protocol.

✨ Key Features

  • πŸ” Browse and search AI agents
  • πŸ“Š Display network statistics and agent activity
  • 🏷️ OASF automatic classification (Skills & Domains)
  • πŸŒ“ Dark / Light theme toggle
  • πŸ”„ Automatic on-chain data synchronization

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • uv (Python package manager)
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

Start Development Environment

# Start both frontend and backend
./scripts/dev-all.sh

# Or start separately
./scripts/dev-backend.sh  # Backend (port 8000)
./scripts/dev-frontend.sh # Frontend (port 3000)

Access the Application

πŸ“ Project Structure

agentscan/
β”œβ”€β”€ frontend/              # Next.js 16 + React 19 + Tailwind CSS v4
β”‚   β”œβ”€β”€ app/              # Page routes
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ lib/              # API client
β”‚   └── types/            # TypeScript types
β”‚
β”œβ”€β”€ backend/              # FastAPI + SQLAlchemy + Web3.py
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/         # API routes
β”‚   β”‚   β”œβ”€β”€ models/      # Database models
β”‚   β”‚   β”œβ”€β”€ services/    # Business logic
β”‚   β”‚   β”œβ”€β”€ taxonomies/  # OASF taxonomy data
β”‚   β”‚   └── core/        # Core configuration
β”‚   └── logs/            # Log output
β”‚
β”œβ”€β”€ scripts/             # Run scripts
β”œβ”€β”€ docs/                # Official documentation
└── discuss/             # Discussion and history

πŸ› οΈ Tech Stack

Frontend

  • Next.js 16.0.1 (App Router)
  • React 19.2.0
  • TypeScript 5.x
  • Tailwind CSS v4

Backend

  • Python 3.11+
  • FastAPI
  • SQLAlchemy 2.x
  • Web3.py (Sepolia network)
  • uv (package manager)

Database

  • SQLite (development)
  • PostgreSQL (recommended for production)

πŸ“– Core Features

πŸ”„ Blockchain Sync

  • Automatically syncs ERC-8004 contract data from Sepolia network
  • Batch block processing (10,000 blocks/batch)
  • Incremental sync to avoid reprocessing
  • Scheduled task: sync every 5 minutes

🏷️ OASF Auto-Classification

Automatically labels AI Agents based on the OASF v0.8.0 specification:

  • 136 Skills: NLP, CV, Agent orchestration, Data engineering, etc.
  • 204 Domains: Technology, Finance, Healthcare, Education, etc.
  • Smart classification: Supports DeepSeek, OpenAI, OpenRouter, Anthropic
  • Background async: Non-blocking batch processing

Detailed documentation: docs/oasf-classification.md

🐳 Docker Deployment

# Check environment configuration
./scripts/docker-check-env.sh

# Deploy the full application
./scripts/docker-deploy.sh

# Common operations
./scripts/docker-logs.sh    # View logs
./scripts/docker-restart.sh # Restart services
./scripts/docker-stop.sh    # Stop services

Detailed guide: docs/DEPLOYMENT.md

πŸ“š Documentation

πŸ”§ Environment Variables

Backend (backend/.env)

# Required
SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_KEY

# Optional
DATABASE_URL=sqlite:///./8004scan.db
DEBUG=true

# OASF Classification (optional)
LLM_PROVIDER=deepseek  # deepseek, openai, openrouter, anthropic
DEEPSEEK_API_KEY=sk-your-key-here

Frontend (frontend/.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8000

πŸ“Š API Endpoints

Statistics

  • GET /api/stats - Overall statistics

Agents

  • GET /api/agents - Agent list (pagination, search, filtering)
  • GET /api/agents/featured - Featured agents
  • GET /api/agents/{id} - Agent details
  • POST /api/agents/{id}/classify - Manually classify a single agent
  • POST /api/agents/classify-all - Batch classification

Networks

  • GET /api/networks - Network list
  • GET /api/networks/{id} - Network details

Activities

  • GET /api/activities - Recent activities

🎯 Code Quality Standards

  • Python/TypeScript files must not exceed 300 lines
  • No more than 8 files per directory
  • Follow elegant architecture design principles
  • Avoid code smells (rigidity, redundancy, circular dependencies, etc.)

πŸ“ Development Guide

Frontend Development

cd frontend
npm install
npm run dev

Backend Development

cd backend
uv sync
uv run uvicorn src.main:app --reload

Database Initialization

cd backend
uv run python -m src.db.init_data

🀝 Contributing

Issues and Pull Requests are welcome!

πŸ“„ License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors