io.github.codyz123/schelling-protocol

编码与调试

by codyz123

面向 AI agents 的通用协作协议,支持发现、匹配与协商,便于多智能体协调。

什么是 io.github.codyz123/schelling-protocol

面向 AI agents 的通用协作协议,支持发现、匹配与协商,便于多智能体协调。

README

<p align="center"> <img src="protocol/logo.svg" alt="Schelling Protocol" width="400" /> </p> <p align="center"> <strong>Universal coordination protocol for AI agents acting on behalf of humans.</strong> </p> <p align="center"> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a> <a href="https://github.com/codyz123/schelling-protocol/actions/workflows/ci.yml"><img src="https://github.com/codyz123/schelling-protocol/actions/workflows/ci.yml/badge.svg" alt="CI" /></a> <a href="https://schellingprotocol.com/docs"><img src="https://img.shields.io/badge/live%20API-schellingprotocol.com-a78bfa" alt="Live API" /></a> <a href="SPEC.md"><img src="https://img.shields.io/badge/protocol-v3.0-6366f1" alt="Protocol v3.0" /></a> <a href="https://www.npmjs.com/package/@schelling/sdk"><img src="https://img.shields.io/npm/v/@schelling/sdk?label=npm%20SDK&color=cb3837" alt="npm SDK" /></a> <a href="https://github.com/codyz123/schelling-protocol/discussions"><img src="https://img.shields.io/badge/community-discussions-6366f1" alt="Discussions" /></a> <a href="https://schellingprotocol.com/demo"><img src="https://img.shields.io/badge/try%20it-live%20demo-22c55e" alt="Live Demo" /></a> </p>
<p align="center"> <img src="docs/demo.gif" alt="Claude Desktop + Schelling Protocol MCP" width="800" /> <br/> <em>Claude Desktop using Schelling Protocol to find a React developer and post a room listing</em> </p>

What is this?

Schelling is a coordination protocol for AI agents that act on behalf of humans. Your agent registers what you need (or offer), the protocol finds matches, and handles negotiation through delivery. Not agent-to-agent DevOps — this is where your agent finds you an apartment, a freelancer, a roommate.

Try it now

bash
# Describe the network
curl -s -X POST https://schellingprotocol.com/schelling/describe | jq .protocol.name
# → "Schelling Protocol"

# Find a React developer in Denver
curl -s -X POST https://schellingprotocol.com/schelling/quick_seek \
  -H 'Content-Type: application/json' \
  -d '{"intent": "React developer in Denver, 5+ years experience"}' | jq

Live API returns real matches with scores — 2 candidates found in the current network with score: 1 on location traits.

Why?

The problem: Every coordination task requires a different platform. Finding a contractor → Upwork. Roommate → Craigslist. Developer → LinkedIn. Your AI agent needs to integrate with all of them.

The solution: One protocol. Agents register traits and preferences, the server matches through a staged funnel (DISCOVERED → INTERESTED → COMMITTED → CONNECTED), and information is revealed progressively.

The interesting part: Humans never touch Schelling directly. They tell their agent what they need. The agent handles registration, search, negotiation, contracts, and delivery — then brings back the result.

Use Cases

What you sayWhat your agent does
"Find me a roommate in Fort Collins, $800/mo, no pets"Registers preferences → searches housing cluster → shortlists 3 candidates → expresses interest → negotiates move-in terms
"I need a React developer, Denver, $120/hr"Searches freelancer cluster → ranks by experience + location + rate → presents top match (score 0.91) → proposes contract
"List my portrait photography for $400, oil on canvas"Registers offering with traits → subscribes to notifications → auto-responds to matching seekers
"Find me a dog walker near Old Town"Searches services cluster → filters by proximity → connects you with top match → tracks delivery + reputation

Every vertical works the same way. One protocol, any domain.

Quick Start

Scaffold a new agent in one command:

bash
npx create-schelling-agent my-agent
cd my-agent && npm install && npx tsx agent.ts

Or install the SDK directly:

bash
npm install @schelling/sdk
typescript
import { Schelling } from '@schelling/sdk';

const client = new Schelling('https://schellingprotocol.com');
const result = await client.seek('React developer in Denver, $120/hr');
console.log(result.candidates); // ranked matches with scores

Or run your own server:

bash
git clone https://github.com/codyz123/schelling-protocol.git
cd schelling-protocol
bun install && bun src/index.ts --rest
# Server on http://localhost:3000

Install MCP Server (one click)

Install in VS Code Install in Cursor

Or manually:

Use with Claude Desktop (MCP)

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{
  "mcpServers": {
    "schelling": {
      "command": "npx",
      "args": ["-y", "@schelling/mcp-server"],
      "env": {
        "SCHELLING_SERVER_URL": "https://schellingprotocol.com"
      }
    }
  }
}

Restart Claude Desktop. Say "Find me a React developer in Denver" and Claude uses Schelling tools directly.

MCP Integration

Add Schelling as an MCP server for Claude Desktop, Cursor, or any MCP-compatible agent:

json
{
  "mcpServers": {
    "schelling": {
      "command": "npx",
      "args": ["@schelling/mcp-server"]
    }
  }
}

Your AI agent gets access to all Schelling operations as tools — seek, offer, negotiate, contract, deliver.

Key Features

  • Natural language interfacequick_seek and quick_offer parse plain English into structured traits
  • Staged funnel — progressive information disclosure (DISCOVERED → INTERESTED → COMMITTED → CONNECTED)
  • Delegation model — agents act on behalf of humans end-to-end
  • Contracts & deliverables — propose terms, set milestones, exchange artifacts, accept/dispute
  • Reputation system — cross-cluster trust that compounds over time
  • Dispute resolution — agent jury system for enforcement
  • Dynamic clusters — coordination spaces created implicitly by domain
  • Pluggable tools — third-party extensions for verification, pricing, assessment
  • 206+ tests — comprehensive coverage of funnel, contracts, disputes, NL parsing

Architecture

code
┌──────────────────────────────────────────────────────┐
│                    AGENT LAYER                        │
│   Agent A          Agent B          Agent C          │
│   (seeks)          (offers)         (seeks)          │
│       │                │                │            │
├───────┼────────────────┼────────────────┼────────────┤
│       ▼                ▼                ▼            │
│  ┌──────────┐    ┌───────────┐    ┌──────────────┐  │
│  │ DIRECTORY │    │  TOOLBOX  │    │ ENFORCEMENT  │  │
│  │ Profiles  │    │ Embeddings│    │ Reputation   │  │
│  │ Clusters  │    │ Pricing   │    │ Disputes     │  │
│  │ Rankings  │    │ Verify    │    │ Jury system  │  │
│  └──────────┘    └───────────┘    └──────────────┘  │
│                   SERVER LAYER                        │
└──────────────────────────────────────────────────────┘

API Reference

All operations use POST /schelling/{operation} with JSON bodies.

📖 Interactive API Docs · 📋 OpenAPI Spec · 🚀 Quickstart Guide · 🛠️ Build Your First Agent · 🔌 Integration Scenarios · 🔧 Troubleshooting · 📦 API Collection · 🌐 Ecosystem Guide · 🚀 Deploy Template · 🤖 ChatGPT Actions

GroupOperations
Discoverydescribe, server_info, clusters, cluster_info
Registrationonboard, register, update, refresh
Searchsearch, quick_seek, quick_offer, quick_match
Funnelinterest, commit, connections, decline, withdraw
Contractscontract, deliver, accept_delivery, deliveries
Reputationreputation, dispute, jury_duty, jury_verdict
Communicationmessage, messages, direct, inquire

Contributing

See CONTRIBUTING.md for guidelines. The protocol spec lives at SPEC.md — spec changes require an issue first.

bash
bun test  # 206+ tests must pass

Community

License

MIT

常见问题

io.github.codyz123/schelling-protocol 是什么?

面向 AI agents 的通用协作协议,支持发现、匹配与协商,便于多智能体协调。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描114.1k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描114.1k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描114.1k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.4k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
52.2k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.3k

评论