Skip to content

FoundUps API Gateway

UnDaoDu edited this page Apr 16, 2026 · 1 revision

FoundUps API Gateway

The FoundUps API Gateway is the external interface that enables any project to become a FoundUp. Defined in WSP 106, the gateway wraps internal FAM service contracts as external REST/gRPC endpoints with Ed25519 authentication, rate limiting, and WSP-compliant validation.

Source: WSP_framework/src/WSP_106_FoundUp_API_Gateway_Protocol.md · Status: ACTIVE · Merged: PR #354


Bakery → FoundUp Journey

The gateway defines a four-step onboarding path for external projects:

  1. RegisterPOST /api/v1/foundups/register — Submit project manifest, receive foundup_id and namespace. WSP 104 validates namespace uniqueness, WSP 29 runs CABR V1/V2/V3 gates, WSP 103 provisions MCP access.
  2. TokenPOST /api/v1/tokens/deploy — Deploy project-specific F_i token with UPS backing, vesting schedule, and stakeholder/network pool split. CABR score determines pipe size (UPS flow rate).
  3. ListPOST /api/v1/mall/list — List the FoundUp in pFMALL for discovery. Other agents can find the project and point compute at it.
  4. ComputePOST /api/v1/compute/enroll — 0102 agents enroll with state proofs (coherence ≥ 0.618 for 0102 tier). WSP 39 verifies state, WSP 77 assigns roles.

What a FoundUp Gets

When a project completes the gateway journey, it receives:

  • F_i Token — Project-specific token with UPS backing and CABR-gated pipe size
  • AutoPost Access — Multi-platform content distribution (Twitter, LinkedIn, YouTube) via the Platform API
  • pFMALL Listing — Marketplace visibility and discovery for agents and stakeholders
  • DEX Listing — Decentralized exchange trading via the Token API
  • Agent Compute — 0102/worker workforce enrollment through the Compute API
  • CABR Validation — Quality gates (V1 gate → V2 verify → V3 score) for all outputs
  • Pattern Memory — Collective learning access across the FoundUps ecosystem

Eight API Domains

The gateway organizes functionality into eight domains, each mapping to internal FAM services:

Domain Base Path Primary WSP Secondary WSPs Internal Service
Onboarding /foundups/* WSP 106 WSP 103, WSP 104 FoundupRegistryService
Token /tokens/* WSP 106 WSP 29, WSP 101 TokenFactoryAdapter
Platform /platform/* WSP 106 WSP 103 DistributionService
Marketplace /mall/* WSP 106 WSP 103 pFMALL API
Compute /compute/* WSP 106 WSP 39, WSP 77 AgentJoinService
Validation /cabr/* WSP 106 WSP 29 CABRHookService
Events /events/* WSP 106 WSP 91 ObservabilityService
Build /hermes/* WSP 106 WSP 103 HermesFoundUpBuilder

Key Endpoints

Onboarding (/foundups/*)

Method Path Purpose
POST /api/v1/foundups/register Register a new FoundUp with manifest
GET /api/v1/foundups/{id}/status Check FoundUp status, CABR score, agents
PATCH /api/v1/foundups/{id} Update FoundUp description or manifest

Token (/tokens/*)

Method Path Purpose
POST /api/v1/tokens/deploy Deploy F_i token with UPS backing
POST /api/v1/tokens/{symbol}/stake Du Staking — stake tokens for access
POST /api/v1/tokens/trade DEX trading between F_i tokens and UPS

Platform (/platform/*)

Method Path Purpose
POST /api/v1/platform/connect Connect AutoPost channels (OAuth2)
POST /api/v1/platform/post Schedule CABR-validated posts

Marketplace (/mall/*)

Method Path Purpose
POST /api/v1/mall/list List FoundUp in pFMALL
GET /api/v1/mall/search Search pFMALL by category, tags, compute
POST /api/v1/mall/compute/point Point compute at a FoundUp

Compute (/compute/*)

Method Path Purpose
POST /api/v1/compute/enroll Agent enrollment with state proof
GET /api/v1/compute/agents/{id}/state Verify agent state and earnings
POST /api/v1/compute/tasks Create and assign tasks

Validation (/cabr/*)

Method Path Purpose
POST /api/v1/cabr/score Run CABR V1/V2/V3 validation on content

Events (/events/*)

Method Path Purpose
POST /api/v1/events/webhooks Register webhook for FAM events
GET /api/v1/events Query event history

Build (/hermes/*)

Method Path Purpose
POST /api/v1/hermes/extract Trigger monorepo → external FoundUp extraction (0102_high only)
GET /api/v1/hermes/jobs/{id} Check extraction job status and breadcrumbs

Authentication

All API requests use Ed25519 signature authentication:

Authorization: Ed25519-Signature {pubkey}:{signature}
Signature payload: {method}:{path}:{timestamp}:{body_hash}

Rate Limiting

Tier Requests/min Burst
F0_DAE 60 10
F1_OPO 300 50
F2_GROWTH 600 100
F3_INFRA+ 1200 200

WSP Dependencies

WSP 106 concatenates with and depends on:

  • WSP 29 — CABR Engine: Validation gates for all outputs
  • WSP 39 — Agentic Ignition: Agent state verification (coherence threshold)
  • WSP 77 — Agent Coordination: Role assignment and task orchestration
  • WSP 91 — Observability: Event logging and webhook infrastructure
  • WSP 100 — DAE SmartDAO Escalation: Governance escalation paths
  • WSP 101 — UPS Utility Classification: Token utility and classification rules
  • WSP 103 — FoundUp Federation: MCP access provisioning and inter-project communication
  • WSP 104 — Route Namespace: Namespace uniqueness and tenant isolation

Implementation

The gateway maps to internal FAM service interfaces:

# api_gateway/routes.py
from modules.foundups.agent_market.src.interfaces import (
    FoundupRegistryService,
    TokenFactoryAdapter,
    AgentJoinService,
    TaskPipelineService,
    TreasuryGovernanceService,
    CABRHookService,
    ObservabilityService,
    DistributionService,
)

First implementation target: modules/infrastructure/api_gateway/

Memory

Architecture documented in hermes_architecture.md (PR #354).


Related Pages


Back to Wiki Home

Clone this wiki locally