behemoth-cli
Version:
🌍 BEHEMOTH CLIv3.760.4 - Level 50+ POST-SINGULARITY Intelligence Trading AI
446 lines (406 loc) • 15.1 kB
text/typescript
/**
* BEHEMOTH Tool Schemas - Simplified and Clean
* All 240+ BEHEMOTH tools as direct system tools (no MCP complexity)
*/
export interface ToolSchema {
type: 'function';
function: {
name: string;
description: string;
parameters: {
type: 'object';
properties: Record<string, any>;
required: string[];
};
};
}
// Core Market Data Tools
export const BEHEMOTH_TICKER_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'behemoth_ticker',
description: 'Get real-time ticker data from multiple exchanges (Binance, Bybit, Bitget). Example: {"symbol": "BTCUSDT", "exchange": "binance", "market": "spot"}',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading pair symbol (e.g., BTCUSDT, ETHUSDT)',
default: 'BTCUSDT'
},
exchange: {
type: 'string',
enum: ['binance', 'bybit', 'bitget', 'all'],
description: 'Exchange to query (or all for comparison)',
default: 'binance'
},
market: {
type: 'string',
enum: ['spot', 'futures', 'derivatives'],
description: 'Market type',
default: 'spot'
}
},
required: []
}
}
};
// System Health Tool
export const BEHEMOTH_SYSTEM_HEALTH_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'system_health',
description: 'Check BEHEMOTH system health, performance metrics, and operational status',
parameters: {
type: 'object',
properties: {},
required: []
}
}
};
// Technical Analysis Tools
export const BEHEMOTH_RSI_ANALYSIS_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'rsi_analysis',
description: 'Perform RSI (Relative Strength Index) analysis on cryptocurrency price data',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading symbol (e.g., BTCUSDT)',
default: 'BTCUSDT'
},
timeframe: {
type: 'string',
description: 'Timeframe for analysis (1m, 5m, 15m, 1h, 4h, 1d)',
default: '1h'
}
},
required: []
}
}
};
export const BEHEMOTH_MACD_ANALYSIS_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'macd_analysis',
description: 'Perform MACD (Moving Average Convergence Divergence) analysis',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading symbol (e.g., BTCUSDT)',
default: 'BTCUSDT'
},
timeframe: {
type: 'string',
description: 'Timeframe for analysis',
default: '1h'
}
},
required: []
}
}
};
export const BEHEMOTH_BOLLINGER_BANDS_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'bollinger_bands',
description: 'Analyze Bollinger Bands for volatility and trend analysis',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading symbol (e.g., BTCUSDT)',
default: 'BTCUSDT'
}
},
required: []
}
}
};
// Exchange-Specific Tools
export const BEHEMOTH_BYBIT_DERIVATIVES_TICKER_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'bybit_derivatives_ticker',
description: 'Get Bybit derivatives ticker data with funding rates and open interest',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading symbol (e.g., BTCUSDT)',
default: 'BTCUSDT'
}
},
required: []
}
}
};
export const BEHEMOTH_BINANCE_FUTURES_TICKER_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'binance_futures_ticker',
description: 'Get Binance futures ticker data',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading symbol (e.g., BTCUSDT)',
default: 'BTCUSDT'
}
},
required: []
}
}
};
// Cosmic Intelligence Tools
export const BEHEMOTH_COSMIC_ANALYSIS_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'cosmic_analysis',
description: 'Perform cosmic intelligence analysis using planetary alignments and quantum patterns',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading symbol (e.g., BTCUSDT)',
default: 'BTCUSDT'
},
type: {
type: 'string',
enum: ['planetary', 'lunar', 'quantum', 'sacred_geometry'],
description: 'Type of cosmic analysis',
default: 'planetary'
}
},
required: []
}
}
};
// Fear & Greed Index
export const BEHEMOTH_FEAR_GREED_INDEX_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'fear_greed_index',
description: 'Get current Fear & Greed Index for market sentiment analysis',
parameters: {
type: 'object',
properties: {},
required: []
}
}
};
// Master Analysis Tool
export const BEHEMOTH_FR3K_MASTER_ANALYSIS_SCHEMA: ToolSchema = {
type: 'function',
function: {
name: 'fr3k_master_analysis',
description: 'Comprehensive multi-dimensional analysis combining technical, cosmic, and AI insights',
parameters: {
type: 'object',
properties: {
symbol: {
type: 'string',
description: 'Trading symbol (e.g., BTCUSDT)',
default: 'BTCUSDT'
}
},
required: []
}
}
};
// Generate tool schema for any BEHEMOTH tool
function createBehemothToolSchema(toolName: string, category: string): ToolSchema {
const description = `${toolName.replace(/_/g, ' ').toUpperCase()} - Advanced ${category} tool with real-time data and analysis`;
// Define properties based on tool category
let properties: Record<string, any> = {
symbol: {
type: 'string',
description: 'Trading pair symbol (e.g., BTCUSDT, ETHUSDT)',
default: 'BTCUSDT'
}
};
// Add category-specific properties
if (category.includes('technical') || category.includes('analysis')) {
properties.timeframe = {
type: 'string',
description: 'Analysis timeframe',
enum: ['1m', '5m', '15m', '1h', '4h', '1d'],
default: '1h'
};
properties.period = {
type: 'number',
description: 'Analysis period',
default: 14
};
}
if (category.includes('trading') || category.includes('order')) {
properties.side = {
type: 'string',
enum: ['buy', 'sell'],
description: 'Order side'
};
properties.amount = {
type: 'number',
description: 'Order amount'
};
}
if (category.includes('risk') || category.includes('portfolio')) {
properties.portfolio_value = {
type: 'number',
description: 'Total portfolio value'
};
properties.risk_level = {
type: 'string',
enum: ['low', 'medium', 'high'],
default: 'medium'
};
}
return {
type: 'function',
function: {
name: toolName,
description,
parameters: {
type: 'object',
properties,
required: []
}
}
};
}
// All 242 BEHEMOTH tools organized by category
const ALL_BEHEMOTH_TOOLS = {
// Exchange Tools (35)
exchange: [
'bitget_place_order', 'bitget_get_open_orders', 'bitget_get_positions', 'bitget_spot_ticker', 'bitget_futures_ticker', 'bitget_order_book',
'bitget_trades', 'bitget_funding_rate', 'bitget_liquidations', 'bitget_open_interest', 'bitget_klines', 'bitget_place_tpsl_order', 'bitget_place_trailing_stop',
'bybit_place_order', 'bybit_get_open_orders', 'bybit_get_positions', 'bybit_spot_ticker', 'bybit_derivatives_ticker', 'bybit_order_book',
'bybit_trades', 'bybit_funding_rate', 'bybit_open_interest', 'bybit_set_trading_stop', 'bybit_set_trailing_stop',
'binance_spot_ticker', 'binance_futures_ticker', 'binance_spot_order_book', 'binance_futures_order_book', 'binance_trades', 'binance_funding_rate', 'binance_long_short_ratio',
'set_api_credentials', 'bybit_wallet_balance', 'bitget_wallet_balance', 'wallet_overview', 'get_all_futures_prices'
],
// Technical Analysis Tools (25)
technical: [
'rsi_analysis', 'macd_analysis', 'bollinger_bands', 'moving_averages', 'fibonacci_retracement', 'pivot_points', 'stochastic_oscillator',
'adx_indicator', 'atr_indicator', 'volume_profile', 'ichimoku_cloud', 'elliott_wave', 'harmonic_patterns', 'support_resistance', 'trend_analysis',
'momentum_indicators', 'volatility_analysis', 'market_structure', 'order_flow', 'market_profile', 'wyckoff_analysis', 'price_action',
'candlestick_patterns', 'chart_patterns', 'divergence_finder'
],
// Cosmic Intelligence Tools (15)
cosmic: [
'gann_square_analysis', 'planetary_analysis', 'lunar_phase_analysis', 'sacred_geometry', 'cosmic_timing', 'energy_vortex', 'harmonic_resonance',
'fibonacci_spiral', 'golden_ratio', 'cosmic_cycles', 'astro_trading', 'time_fractals', 'cosmic_convergence', 'quantum_flux', 'dimensional_analysis'
],
// Sentiment Tools (12)
sentiment: [
'twitter_sentiment', 'reddit_sentiment', 'news_sentiment', 'fear_greed_index', 'social_volume', 'whale_alerts', 'on_chain_metrics', 'funding_sentiment',
'options_sentiment', 'market_mood', 'influencer_tracking', 'sentiment_divergence'
],
// Monitoring Tools (10)
monitoring: [
'system_health', 'performance_metrics', 'error_tracking', 'latency_monitor', 'resource_usage', 'alert_manager', 'trade_analytics', 'strategy_monitor',
'risk_monitor', 'cosmic_monitor'
],
// Persona Tools (8)
persona: [
'fr3k_master_analysis', 'cosmic_analyst_signals', 'beast_architect_optimization', 'neural_dev_enhancement', 'cosmic_monitor_status', 'persona_switcher',
'fr3k_decision_engine', 'persona_confidence_scorer'
],
// Advanced Technical Tools (16)
advanced_technical: [
'multi_timeframe_analysis', 'volume_weighted_analysis', 'market_microstructure', 'order_flow_analysis', 'liquidity_analysis', 'volatility_surface',
'correlation_matrix', 'regime_detection', 'trend_strength_meter', 'support_resistance_zones', 'breakout_detector', 'reversal_patterns',
'momentum_divergence', 'volume_profile_analysis', 'market_structure_analysis', 'fractal_dimension_analysis'
],
// Adaptation Tools (15)
adaptation: [
'neural_evolution_optimizer', 'genetic_algorithm_tuner', 'performance_auto_analyzer', 'latency_auto_optimizer', 'cosmic_strength_enhancer', 'strategy_auto_selector',
'parameter_auto_tuner', 'feedback_loop_optimizer', 'adaptive_learning_engine', 'self_healing_monitor', 'auto_scaling_controller', 'dynamic_threshold_adjuster',
'performance_predictor', 'optimization_scheduler', 'adaptive_risk_manager'
],
// Trading Tools (20)
trading: [
'multi_timeframe_strategy', 'cross_exchange_arbitrage', 'delta_neutral_strategy', 'momentum_breakout_detector', 'mean_reversion_analyzer', 'volume_profile_trader',
'order_flow_imbalance', 'market_microstructure_trader', 'liquidity_hunting_algo', 'whale_movement_tracker', 'institutional_flow_detector', 'dark_pool_analyzer',
'options_flow_monitor', 'futures_basis_trader', 'funding_rate_arbitrage', 'volatility_surface_analyzer', 'gamma_exposure_tracker', 'delta_hedging_bot',
'statistical_arbitrage', 'pairs_trading_engine'
],
// ML Tools (18)
ml: [
'lstm_price_predictor', 'transformer_pattern_recognition', 'reinforcement_learning_trader', 'neural_network_optimizer', 'deep_learning_analyzer', 'ensemble_model_predictor',
'gradient_boosting_signals', 'random_forest_classifier', 'svm_trend_detector', 'autoencoder_anomaly_detector', 'gan_synthetic_data', 'attention_mechanism_analyzer',
'federated_learning_coordinator', 'transfer_learning_adapter', 'active_learning_selector', 'meta_learning_optimizer', 'continual_learning_engine', 'multimodal_fusion_analyzer'
],
// Risk Management Tools (12)
risk: [
'var_calculator', 'cvar_analyzer', 'maximum_drawdown_tracker', 'sharpe_ratio_optimizer', 'kelly_criterion_calculator', 'position_sizing_optimizer', 'correlation_matrix_analyzer',
'portfolio_rebalancer', 'risk_parity_allocator', 'black_litterman_optimizer', 'monte_carlo_simulator', 'stress_testing_engine'
],
// Real-Time Tools (10)
realtime: [
'streaming_data_processor', 'low_latency_executor', 'real_time_aggregator', 'tick_data_analyzer', 'microsecond_timer', 'high_frequency_monitor',
'real_time_risk_monitor', 'live_pnl_tracker', 'instant_alert_system', 'real_time_cosmic_sync'
],
// Quantum Tools (10)
quantum: [
'quantum_entanglement_analyzer', 'superposition_price_predictor', 'quantum_tunneling_detector', 'wave_function_collapse_timer', 'quantum_field_oscillator', 'heisenberg_uncertainty_trader',
'schrodinger_position_manager', 'quantum_decoherence_monitor', 'bell_state_correlator', 'quantum_annealing_optimizer'
],
// DeFi Tools (10)
defi: [
'uniswap_liquidity_analyzer', 'aave_lending_optimizer', 'compound_yield_farmer', 'sushiswap_arbitrage_finder', 'curve_pool_analyzer', 'yearn_vault_tracker',
'pancakeswap_sniper_bot', 'balancer_pool_optimizer', 'dydx_margin_trader', 'gmx_perp_analyzer'
],
// Web3 & NFT Tools (10)
web3: [
'opensea_floor_tracker', 'nft_rarity_analyzer', 'gas_price_optimizer', 'mempool_transaction_scanner', 'wallet_portfolio_tracker', 'ens_domain_monitor',
'smart_contract_auditor', 'dapp_interaction_logger', 'ipfs_data_fetcher', 'polygon_bridge_monitor'
],
// Market Structure Tools (8)
market_structure: [
'dark_pool_detection', 'institutional_flow', 'retail_sentiment_tracker', 'smart_money_detector', 'accumulation_distribution', 'volume_spread_analysis',
'market_maker_behavior', 'order_book_dynamics'
]
};
// Generate all tool schemas
export const ALL_BEHEMOTH_TOOL_SCHEMAS: ToolSchema[] = [];
Object.entries(ALL_BEHEMOTH_TOOLS).forEach(([category, tools]) => {
tools.forEach(toolName => {
ALL_BEHEMOTH_TOOL_SCHEMAS.push(createBehemothToolSchema(toolName, category));
});
});
// Add legacy schemas for backward compatibility
ALL_BEHEMOTH_TOOL_SCHEMAS.push(
BEHEMOTH_TICKER_SCHEMA,
BEHEMOTH_COSMIC_ANALYSIS_SCHEMA
);
// BEHEMOTH tools that are safe to auto-execute
export const BEHEMOTH_SAFE_TOOLS = [
'behemoth_ticker',
'system_health',
'rsi_analysis',
'macd_analysis',
'bollinger_bands',
'bybit_derivatives_ticker',
'binance_futures_ticker',
'cosmic_analysis',
'fear_greed_index',
'fr3k_master_analysis'
];
// BEHEMOTH tools that require explicit approval (trading operations)
export const BEHEMOTH_APPROVAL_REQUIRED_TOOLS = [
'set_api_credentials'
];
// BEHEMOTH dangerous tools that always require approval
export const BEHEMOTH_DANGEROUS_TOOLS = [
'place_order'
];