Skip to content

indexnetwork/index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2,203 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Discovery Protocol

About Index Network

Index Network enables private, intent-driven discovery through a sophisticated opportunity detection system. Users express what they're seeking as structured intents, and the protocol identifies opportunitiesβ€”legible coordination points that emerge when aligned intents intersect with trust thresholds, timing constraints, and expected value calculations, making action rational for all parties involved.

Unlike traditional matching systems that operate on profile similarity, Index treats opportunities as first-class coordination primitives: they exist as distinct entities with their own lifecycle, interpretations, and contextual metadata, enabling nuanced understanding of why and when a connection makes sense, not just that it matches.

Key Features

πŸ”’ Private Intent-Driven Discovery

  • Intent-Based: Express specific needs like "finding a privacy-focused AI engineer"
  • Privacy by Design: Index-based access control with granular permissions
  • Opportunity Detection: Context-aware agents surface coordination points when intents align
  • Semantic Understanding: Vector similarity and HyDE strategies for intelligent matching
  • Agent Orchestration: LangGraph-powered workflows for complex discovery tasks

How It Works

  1. Users Express Intents: Define what you're seeking in natural language
  2. Context Organization: Group intents into indexes with privacy controls
  3. Opportunity Detection: Agents identify coordination points when profiles and intents align
  4. Connection Facilitation: Dual-perspective descriptions preserve privacy while explaining value
  5. Continuous Discovery: Profile updates trigger new opportunity searches

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Intent Graph       │───▢│  Opportunity Engine  │───▢│  Discovery Layer     β”‚
β”‚                      β”‚    β”‚                      β”‚    β”‚                      β”‚
β”‚ β€’ Semantic vectors   β”‚    β”‚ β€’ Multi-strategy     β”‚    β”‚ β€’ Dual synthesis     β”‚
β”‚ β€’ Index partitions   β”‚    β”‚   HyDE generation    β”‚    β”‚ β€’ Contextual         β”‚
β”‚ β€’ Speech act types   β”‚    β”‚ β€’ 4-dimensional      β”‚    β”‚   integrity          β”‚
β”‚ β€’ Felicity scores    β”‚    β”‚   threshold eval     β”‚    β”‚ β€’ Attribution model  β”‚
β”‚ β€’ Temporal decay     β”‚    β”‚ β€’ Confidence scoring β”‚    β”‚ β€’ Privacy boundaries β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Three-Layer Architecture:

  1. Intent Graph: Structured intent storage with semantic embeddings, speech act validation, and index-based access control. Intents are first-class entities with quality scores (semantic entropy, felicity conditions) ensuring high-signal inputs.

  2. Opportunity Engine: Multi-dimensional detection system that generates hypothetical documents (HyDE) across 6 relationship strategies, evaluates candidates against trust/timing/value/alignment thresholds, and produces scored opportunities with dual-perspective interpretations.

  3. Discovery Layer: Privacy-preserving presentation system where each party receives synthesized insights about potential connections without exposure to raw private data. Maintains contextual integrity through attributed agent interpretations.

Core Infrastructure:

  • LangGraph for agent state machines and complex orchestration workflows
  • PostgreSQL with pgvector for 2000-dimensional semantic search (HNSW indexes)
  • Drizzle ORM for type-safe database operations with schema-driven types
  • OpenRouter for LLM-powered agents with Zod-validated structured output

Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+ with pgvector extension

Future Roadmap

The protocol architecture is designed for future deployment with:

  • TEE (Trusted Execution Environments) for confidential compute
  • Decentralized storage with on-chain finality
  • XMTP integration for decentralized messaging

Quick Start

  1. Clone the repository
git clone https://github.com/indexnetwork/index.git
cd index
  1. Install dependencies
# Install all workspace dependencies
bun install
  1. Set up environment variables
# Copy example environment files
cp protocol/env.example protocol/.env
cp frontend/.env.example frontend/.env

# Configure your database URL and API keys
  1. Initialize the database
cd protocol
bun run db:generate
bun run db:migrate
  1. Start the development servers
# Terminal 1: Start the protocol server
cd protocol
bun run dev

# Terminal 2: Start the frontend
cd frontend
bun run dev

Visit http://localhost:3000 to see the application.

Development

Project Structure

index/
β”œβ”€β”€ protocol/          # Protocol and backend services
β”œβ”€β”€ frontend/          # Next.js web application

Protocol Implementation

The protocol/ directory contains the core agent infrastructure:

Key Components

  • Agents: LangGraph-based agents for intent inference, opportunity evaluation, and profile generation
  • Graph Workflows: Six state machines (Intent, Index, Opportunity, Profile, HyDE, Chat) orchestrating complex operations
  • Database Layer: PostgreSQL with pgvector for semantic search and Drizzle ORM for type safety
  • Semantic Governance: Intent quality validation using speech act theory and felicity conditions

Development Commands

For the full list of protocol commands (DB, workers, maintenance), see CLAUDE.md.

cd protocol

# Start development server (Bun.serve, port 3001)
bun run dev

# Build for production
bun run build

# Database operations
bun run db:generate    # Generate migrations after schema changes
bun run db:migrate     # Run database migrations
bun run db:studio      # Open Drizzle Studio (DB GUI)

# Code quality
bun run lint           # Run ESLint

Contributing

We welcome contributions! Before submitting a Pull Request:

  1. Get Assigned: Comment on an existing issue or create a new one
  2. Fork & Branch: Create a feature branch from main
  3. Test: Ensure all tests pass and add tests for new features
  4. Document: Update relevant documentation
  5. Submit: Open a PR with a clear description

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/index.git

# Create feature branch  
git checkout -b feature/your-feature-name

# Make changes and test
bun test

# Submit PR
git push origin feature/your-feature-name

Resources

License

Index Network is licensed under the MIT License. See LICENSE for details.