Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.62 KB

File metadata and controls

36 lines (23 loc) · 1.62 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

TIM (The Inference Mesh) is a peer-to-peer network for sharing spare inference capacity. It routes inference requests to available nodes that can be local models (Ollama, LMStudio, llama.cpp), API keys (OpenAI, Anthropic, Google), or subscription headroom.

Core Philosophy: "We route inference requests. That's it." The network handles routing, discovery, reputation. Clients own context, orchestration, tool execution, and sandboxing.

Project Status

Specification phase only. No implementation code exists yet. The project is being designed before coding begins.

Key Architecture Decisions

  • Unit of work: Single request/response pair (stateless at network layer)
  • API: OpenAI Completions API compatible with optional X-Tim-* headers for routing hints
  • Language: Rust recommended (rust-libp2p has best maturity)
  • Transport: libp2p + QUIC with DCUtR for NAT traversal
  • Discovery: Kademlia DHT (slow path) + GossipSub (fast path for capacity)
  • Identity: Public key cryptography (node ID = hash of public key)
  • Reputation: EigenTrust++ with spot-check verification probes

Node Types

  • Provider: Has inference capacity, serves requests
  • Consumer: Sends requests to the mesh
  • Relay: Routes traffic, participates in discovery (no inference)

Temporary Files

Use tmp/ at the project root for scratch files.