UNPKG

@hivetechs/hive-ai

Version:

Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API

128 lines (90 loc) • 3.17 kB
# Hive.AI OpenRouter-powered AI consensus platform - access 300+ models from 55+ providers through unified API with smart presets. ## Installation ### CLI Tool ```bash npm install -g @hivetechs/hive-ai ``` ### Library (for developers) ```bash npm install @hivetechs/hive-ai ``` ## Quick Start ### CLI Usage ```bash # 1. Configure license (unlocks tools & sets conversation limits) hive-ai configure license # 2. Setup OpenRouter API key & profiles hive-ai setup # 3. Run consensus hive-ai consensus "What is the meaning of life?" ``` ### Claude Code Integration Install and configure Hive AI for Claude Code in one command: ```bash # Install globally and configure Claude Code MCP hive-ai quickstart # Start Claude Code and use consensus tools claude ``` šŸ’” **Claude Code Users:** After running consensus, press **Ctrl+R** to expand and view complete detailed results instead of the collapsed summary. **Setup Process:** 1. **License Configuration**: Unlocks Hive.AI tools and sets daily conversation limits based on your tier 2. **OpenRouter Setup**: Configures API access to 300+ models from 55+ providers 3. **Profile Creation**: Sets up 4-stage consensus pipeline with your preferred models ### Library Usage ```javascript import { initializeDatabase, runConsensusPipeline } from '@hivetechs/hive-ai'; // Initialize await initializeDatabase(); // Run consensus const result = await runConsensusPipeline('What is the meaning of life?'); ``` ## API Reference ### Consensus Engine ```javascript import { runConsensusPipeline, validateConsensusPrerequisites } from '@hivetechs/hive-ai/consensus'; // Run consensus pipeline const result = await runConsensusPipeline(question, conversationId); // Validate setup const validation = await validateConsensusPrerequisites(); ``` ### Database Functions ```javascript import { getDatabase, createUser, createConversation, addMessage, getUserTier, checkDailyUsageLimit } from '@hivetechs/hive-ai/database'; // Get database connection const db = await getDatabase(); // User management await createUser('user-id', 'user@example.com'); // Conversation tracking const conversationId = await createConversation('conv-id'); await addMessage('msg-id', conversationId, 'user', 'Hello'); // Usage tracking const tier = await getUserTier(); const usage = await checkDailyUsageLimit(); ``` ## Features - **4-Stage Consensus**: Generator → Refiner → Validator → Curator - **300+ Models**: Access through OpenRouter API - **Unified Database**: SQLite with ACID compliance - **Usage Tracking**: Tier-based limits and monitoring ## License Tiers - **Community**: 10 conversations/day - **Pro**: 100 conversations/day - **Enterprise**: 1000 conversations/day ## Requirements - Node.js 18+ - Hive.AI license key (get from [hivetechs.io/pricing](https://hivetechs.io/pricing)) - OpenRouter API key (get from [openrouter.ai/keys](https://openrouter.ai/keys)) ## Links - [Documentation](https://hivetechs.io/docs) - [OpenRouter Setup](https://openrouter.ai) - [GitHub](https://github.com/hivetechs-collective/hive.ai) - [Issues](https://github.com/hivetechs-collective/hive.ai/issues)