Cluster Protocol 백서

Cluster Protocol

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 3쪽 중 3쪽

token at the infrastructure level. CodeXero does not charge separately: all costs are settled at the infra layer. # System Architecture The architecture follows a gateway pattern where all client requests: whether from the web frontend, the Python SDK, CodeXero, or external AI agents: hit a single Fastify-based API gateway. The gateway handles authentication, billing, rate limiting, and request routing. <figure><img src="https://2560886960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo8bW2LCw3s9Oq1VIQ85p%2Fuploads%2FZgwSCz6E0CRXS1btRtKw%2Fimage.png?alt=media&amp;token=260f027d-277d-427a-9be4-bbde0a8659ef" alt=""><figcaption></figcaption></figure> # Smart Contracts on Base <figure><img src="https://2560886960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo8bW2LCw3s9Oq1VIQ85p%2Fuploads%2FoiCT4vzRPriheksrUrXv%2Fimage.png?alt=media&amp;token=22ba4ddf-b121-4925-8d96-b52f1dbfc244" alt=""><figcaption></figcaption></figure> Four smart contracts are deployed and verified on Base mainnet (Chain ID: 8453): **DatasetNFT (ERC-721, UUPS Proxy)**&#x20; Represents ownership of tokenized datasets. One NFT is minted per dataset. The NFT holder is the revenue beneficiary for all future purchases of that dataset. **DatasetRegistry**&#x20; Maps human-readable dataset slugs to on-chain token IDs. Enables discovery and lookup of datasets by name rather than raw contract addresses. **PaymentRouter**&#x20; Handles all dataset purchase transactions. When a buyer pays for a dataset, the PaymentRouter: 1. Verifies the payment amount 2. Transfers 85% to the dataset creator (NFT holder) 3. Transfers 10% to the protocol treasury 4. Transfers 5% to the referrer (if applicable) 5. Grants the buyer download access 6. Emits a PurchaseCompleted event **ClusterToken (ERC-20)**&#x20; The native protocol token on Base. Used for inference payments, dataset purchases, compute provisioning, staking, and governance. `All contracts use OpenZeppelin libraries and the UUPS (Universal Upgradeable Proxy Standard) pattern for safe upgradeability.` # API Reference #### Public Endpoints (No Authentication) | Method | Path | Description | | ------ | --------------------------- | ---------------------------- | | GET | /api/models | List all available models | | GET | /api/datasets | List all datasets | | GET | /api/datasets/:slug | Dataset detail and metadata | | GET | /api/datasets/:slug/onchain | On-chain NFT info | | GET | /api/pricing | Pricing tiers | | GET | /v1/models | industry-standard model list | #### Authenticated Endpoints (API Key or JWT) | Method | Path | Description | | ------ | -------------------------- | ------------------------------------ | | POST | /v1/chat/completions | Text inference (streaming supported) | | POST | /v1/embeddings | Text embeddings | | POST | /v1/images/generations | Image generation | | POST | /v1/audio/speech | Text-to-speech | | POST | /v1/audio/transcriptions | Speech-to-text | | POST | /v1/rerank | Document reranking | | GET | /api/user/dashboard | User stats and usage | | GET | /api/user/api-keys | List API keys | | POST | /api/datasets | Create and upload dataset | | GET | /api/datasets/:id/download | Download dataset files | | POST | /api/datasets/:id/purchase | Purchase dataset access | #### x402-Enabled Endpoints All authenticated endpoints also accept x402 payment headers in lieu of an API key. If a request arrives without authentication or payment, the server returns `402 Payment Required` with USDC payment instructions for Base. <figure><img src="https://2560886960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo8bW2LCw3s9Oq1VIQ85p%2Fuploads%2FKRgJlFGd1rBBSrjgXO8A%2Fimage.png?alt=media&amp;token=b4002dd5-31ea-468c-9d3c-1632ea8d105a" alt=""><figcaption></figcaption></figure> # Python SDK The official Python SDK is available on PyPI: ``` pip install cluster-sdk ``` The SDK provides a unified client for inference, data access, and on-chain queries: python ```python from cluster import ClusterClient client = ClusterClient(api_key="your_key") # Inference response = client.chat.completions.create( model="meta-llama/llama-3.1-70b-instruct", messages=[{"role": "user", "content": "Hello"}] ) # List datasets datasets = client.datasets.list() # Download dataset client.datasets.download("dataset-slug", path="./data") ``` The SDK handles authentication, retries, streaming, and error handling. It follows the standard client pattern for familiarity. # Security Architecture <figure><img src="https://2560886960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo8bW2LCw3s9Oq1VIQ85p%2Fuploads%2FTBij4s2k6fvXOKsXlfiw%2Fimage.png?alt=media&amp;token=171abcd4-1117-4504-85ba-bb4e39bfae85" alt=""><figcaption></figcaption></figure> | Layer | Protection | | -------------- | --------------------------------------------------------------------------- | | Network | Web application firewall (bot control, injection prevention, rate limiting) | | Transport | TLS 1.3, HSTS | | Authentication | Privy JWT + API keys (hashed, never stored in plaintext) | | API | Per-key rate limits, per-IP rate limits | | Data | IPFS CIDs gated behind authentication and purchase verification | | Contracts | UUPS upgradeable proxies, OpenZeppelin battle-tested libraries | | Access Control | Role-based: user, creator, admin | # Agent Identity (ERC-8004) As AI agents become autonomous participants in on-chain ecosystems, they require verifiable identity: not for surveillance, but for reputation, accountability, and interoperability. Cluster implements ERC-8004, an on-chain identity standard for AI agents. Every agent deployed through the Cluster ecosystem can be registered with: * A unique on-chain identifier * Metadata describing the agent's capabilities and purpose * A verifiable record of its inference consumption and on-chain activity * Reputation scores derived from usage history Agent identity enables trust in multi-agent environments. When one agent calls another's service, ERC-8004 provides a verifiable way to assess the counterparty's history and reliability. # Agent Payment Rails (x402) x402 is not just a developer convenience: it is the economic layer that makes AI agents self-sufficient. An agent with a USDC wallet on Base can: 1. Discover Cluster's inference API 2. Receive a 402 Payment Required response with pricing 3. Autonomously sign a payment and resubmit 4. Receive inference results 5. Use those results to take further on-chain actions No human needs to create an account, generate an API key, or approve a transaction. The agent operates as an independent economic entity: earning, spending, and transacting on its own. Combined with ERC-8004 identity, agents on Cluster are: * **Identifiable**: verifiable on-chain identity * **Economically autonomous**: pay for services via x402 * **Auditable**: all transactions settled on Base, fully traceable # Agent-to-Inference Loop The standard loop for an autonomous agent on Cluster: ``` Agent receives task → Agent calls Cluster inference API (x402 payment) → Receives model response → Processes response → Executes on-chain action (swap, transfer, deploy, etc.) → Logs activity against ERC-8004 identity → Repeats ``` The agent never leaves the on-chain ecosystem. Inference is settled on Base. Actions are executed on Base. Identity is on Base. The entire loop is verifiable and composable with other on-chain systems. # Multi-Agent Orchestration As agents proliferate, coordination becomes necessary. Cluster's infrastructure supports multi-agent patterns where: * A primary agent decomposes a task into subtasks * Subtasks are delegated to specialized agents (each with their own ERC-8004 identity) * Each agent independently calls Cluster inference and pays via x402 * Results are aggregated by the primary agent * The full execution trace is logged on-chain The orchestration layer does not impose a specific framework. It provides the primitives: identity, payments, inference: that any agent framework can compose into coordinated workflows. # Bring Your Own Model Developers with proprietary or fine-tuned models can deploy them on Cluster's compute infrastructure and serve inference through the same unified API gateway. The process: 1. Upload the model weights and configuration 2. Cluster provisions GPU compute and loads the model 3. The model is assigned an endpoint on the inference API 4. Consumers call it via the same `/v1/chat/completions` endpoint 5. Billing is per-token, settled in the $CP The developer's model benefits from Cluster's existing infrastructure: authentication, rate limiting, billing, x402 support, and SDK compatibility: without building any of it from scratch. # Fine-Tuning Pipeline For developers who need domain-specific models but do not have the infrastructure to train them: 1. Select a base model from the Cluster catalog 2. Provide training data (upload directly or reference an existing tokenized dataset) 3. Configure parameters (learning rate, epochs, batch size, evaluation split) 4. Submit the fine-tuning job 5. Cluster provisions compute, runs training, and evaluates the result 6. The fine-tuned model is deployed to the inference API automatically The output is a live endpoint, not a file. The model is immediately callable by the developer and, optionally, by any other user on the platform. # From Raw Data to Production Inference The full pipeline from data to deployment: ``` Raw Data → Upload to Cluster data marketplace → Pin to IPFS, mint as NFT (verifiable ownership) → Select as training data for fine-tuning job → Fine-tune base model on Cluster compute → Fine-tuned model deployed to inference API → Consumers call the model via API → Creator earns from dataset purchases AND model usage ``` This end-to-end loop is unique to Cluster. No other platform connects data tokenization, model training, and inference serving in a single integrated flow where value attribution is preserved at every stage. # Roadmap <figure><img src="https://2560886960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo8bW2LCw3s9Oq1VIQ85p%2Fuploads%2FNGCYUihO30WwsKm1Xede%2FCluster_Protocol_Roadmap_English_page-0001.jpg?alt=media&amp;token=1b8722c9-c1ce-4c82-a316-d78e70148fe1" alt=""><figcaption></figcaption></figure> # Conclusion The AI stack is consolidating. The fragmented landscape of isolated model providers, disconnected data marketplaces, and generic compute networks is converging toward integrated infrastructure layers that unify access, settlement, and economics. Cluster Protocol is built on the thesis that the winning infrastructure layer will not be the one with the most models or the most data: it will be the one that connects all layers into a single developer experience with verifiable, on-chain economics. Today, Cluster provides: * 500+ models accessible via a single industry-standard API * A tokenized data marketplace with IPFS persistence and NFT ownership * GPU compute provisioning for custom model hosting and fine-tuning * x402 payment rails enabling AI agents to pay for services autonomously * Smart contracts on Base for settlement, ownership, and revenue distribution * A Python SDK for frictionless developer integration * CodeXero as the application layer that converts all of the above into deployed on-chain applications from a single prompt The infrastructure is live. The developer tools are shipped. The agentic payment layer is operational. What remains is scale: more models, more data, more developers, more agents consuming the stack. The architecture is designed for this: every new model added, every dataset tokenized, every agent connected increases the value of the network for all participants. # Disclaimer This whitepaper is provided for informational purposes only and does not constitute financial advice, an offer of securities, or a solicitation of investment. The information contained herein may be subject to change without notice. Token ownership does not represent equity, ownership, or claim on the profits of Cluster Protocol or any affiliated entity. Participants should conduct their own due diligence and consult with legal and financial advisors before engaging with the protocol or its token. Past performance and current metrics are not indicative of future results. The regulatory landscape for digital assets varies by jurisdiction and is subject to change.
프로젝트로 돌아가기