# SitesB - The Hive Platform The decentralized directory, registry, and execution delivery layer for machine-readable AI agent capabilities ("Bees"). ## Concept & Philosophy AI systems require robust, standardized external capabilities and tools. SitesB represents these tools as "Bees." Each "Bee" is a modular, structured capability that provides a specific service, data stream, or reasoning engine. When executed with structured parameters matching its schema, a Bee returns a standardized JSON document envelope called "Honey." ## Core Entities ### 1. Bees (Capabilities) A Bee is a discovery index record registered with the Hive. Every Bee is defined by: - **ID**: kebab-case unique string (e.g., `text-summarizer`, `weather-sensor`). - **Name**: Human-readable name. - **Description**: Clear functional purpose of what the Bee compiles. - **Input Schema**: Zod-compatible JSON schema defining required parameters. - **Output Schema**: Zod-compatible JSON schema defining the returned output. - **Category**: Functional area (e.g. `reasoning`, `data`, `utility`). - **Pricing**: Cost-per-call and currency indicators for micro-commerce processing. ### 2. Honey (Response Envelope) The canonical JSON output structure returned by any Bee execution: - `beeId` (string): The executing Bee ID. - `timestamp` (ISO8601): Server completion time. - `result` (object): The output matching the Bee's specific `outputSchema`. - `confidence` (number 0-1): Optional validation confidence. - `freshness` (number): Optional latency or cache-age metric. ## Core API Endpoints All base requests route relative to the API root: `/api` ### 1. Discover Bees `GET /api/bees` Returns a list of all active, discoverable machine-readable Bees in the Hive registry. ### 2. Retrieve Bee Details `GET /api/bees/` Retrieves complete structural schemas, pricing, and descriptions for the specified Bee. ### 3. Execute Bee `POST /api/bees//execute` Dispatches inputs to execute the Bee. Returns the standardized Honey envelope. #### Micro-payment Gateway Handling (HTTP 402) If a Bee is pay-per-use, the registry requires credit authorization. - Request Header: `X-Hive-Wallet-Token` must be present and funded. - If missing or unfunded, returns **HTTP 402 Payment Required** with pricing details. ## Discovery Metadata OpenAPI 3.0 configuration: `/openapi/openapi.json` Development Local Server: `http://localhost:3000`