Crate riglr_web_tools

Crate riglr_web_tools 

Source
Expand description

§riglr-web-tools

Web-based data tools for riglr agents, providing access to social media, market data, and web search capabilities.

This crate bridges the gap between on-chain data and off-chain information sources, enabling AI agents to gather comprehensive market intelligence and social sentiment.

§Features

  • Social Media Tools: Twitter/X integration for sentiment analysis
  • Market Data Tools: DexScreener integration for token metrics
  • Web Search Tools: Exa API integration for intelligent web search
  • Rate Limiting: Built-in rate limiting and API quota management
  • Caching: Optional response caching to improve performance

§Quick Start

// Example usage (requires rig-core dependency):
use riglr_web_tools::twitter::search_tweets;
use rig_core::Agent;

let agent = Agent::builder()
    .preamble("You are a market sentiment analyst.")
    .tool(search_tweets)
    .build();

let response = agent.prompt("What's the current sentiment on Twitter about $SOL?").await?;
println!("Agent response: {}", response);

§API Configuration

Most tools require API keys. Set the following environment variables:

  • TWITTER_BEARER_TOKEN - For Twitter API access
  • EXA_API_KEY - For Exa web search
  • DEXSCREENER_API_KEY - For DexScreener (if required)
  • LUNARCRUSH_API_KEY - For LunarCrush social analytics
  • FASTER100X_API_KEY - For Faster100x holder analysis

§Tool Categories

  • twitter - Twitter/X integration for social sentiment
  • dexscreener - Token market data and trading metrics
  • web_search - Intelligent web search capabilities
  • news - Cryptocurrency news aggregation
  • lunarcrush - LunarCrush social analytics and sentiment tracking
  • faster100x - Token holder analysis and whale activity tracking
  • rugcheck - Solana token security analysis and rug pull detection
  • trenchbot - Solana token bundle analysis and sniper detection
  • pocketuniverse - Solana token rug pull detection based on wallet history
  • tweetscout - Twitter/X account credibility scoring and social network analysis

Re-exports§

pub use dexscreener::analyze_token_market;
pub use dexscreener::get_token_info;
pub use dexscreener::get_top_pairs;
pub use dexscreener::search_tokens;
pub use dexscreener::ChainInfo;
pub use dexscreener::MarketAnalysis;
pub use dexscreener::TokenInfo;
pub use dexscreener::TokenPair;
pub use news::analyze_market_sentiment;
pub use news::get_crypto_news;
pub use news::monitor_breaking_news;
pub use news::LexiconSentimentAnalyzer;
pub use news::NewsAggregationResult;
pub use news::NewsArticle;
pub use news::NewsSource;
pub use news::SentimentAnalyzer;
pub use twitter::analyze_crypto_sentiment;
pub use twitter::get_user_tweets;
pub use twitter::search_tweets;
pub use twitter::SentimentAnalysis;
pub use twitter::SentimentBreakdown;
pub use twitter::TwitterPost;
pub use twitter::TwitterSearchResult;
pub use twitter::TwitterUser;
pub use web_search::find_similar_pages;
pub use web_search::search_recent_news;
pub use web_search::search_web;
pub use web_search::summarize_web_content;
pub use web_search::ContentSummary;
pub use web_search::SearchResult;
pub use web_search::WebSearchResult;
pub use lunarcrush::get_influencer_mentions;
pub use lunarcrush::get_social_sentiment;
pub use lunarcrush::InfluencerMention;
pub use lunarcrush::InfluencerMentionsResult;
pub use lunarcrush::SentimentData;
pub use lunarcrush::TrendingCrypto;
pub use faster100x::analyze_token_holders;
pub use faster100x::get_whale_activity;
pub use faster100x::ConcentrationRisk;
pub use faster100x::HolderTrends;
pub use faster100x::TokenHolderAnalysis;
pub use faster100x::WalletHolding;
pub use faster100x::WhaleActivity;
pub use price::get_token_price;
pub use price::get_token_prices_batch;
pub use price::TokenPriceResult;
pub use rugcheck::analyze_token_risks;
pub use rugcheck::check_if_rugged;
pub use rugcheck::get_token_report;
pub use rugcheck::RiskAnalysis;
pub use rugcheck::RiskLevel;
pub use rugcheck::RugCheckResult;
pub use rugcheck::TokenCheck;
pub use rugcheck::TokenHolder as RugCheckTokenHolder;
pub use trenchbot::analyze_creator_risk;
pub use trenchbot::analyze_token_bundles;
pub use trenchbot::check_bundle_risk;
pub use trenchbot::get_bundle_info;
pub use trenchbot::BundleAnalysisResult;
pub use trenchbot::BundleResponse;
pub use trenchbot::BundleRiskCheck;
pub use trenchbot::CreatorAnalysisResult;
pub use pocketuniverse::analyze_rug_risk;
pub use pocketuniverse::check_rug_pull;
pub use pocketuniverse::check_rug_pull_raw;
pub use pocketuniverse::is_token_safe;
pub use pocketuniverse::DetailedRugAnalysis;
pub use pocketuniverse::RugApiResponse;
pub use pocketuniverse::RugCheckResult as PocketUniverseRugCheck;
pub use pocketuniverse::SafetyCheck;
pub use tweetscout::analyze_account;
pub use tweetscout::analyze_social_network;
pub use tweetscout::get_account_info;
pub use tweetscout::get_account_score;
pub use tweetscout::get_top_followers;
pub use tweetscout::get_top_friends;
pub use tweetscout::is_account_credible;
pub use tweetscout::AccountAnalysis;
pub use tweetscout::AccountInfo;
pub use tweetscout::CredibilityCheck;
pub use tweetscout::SocialNetworkAnalysis;
pub use client::WebClient;
pub use error::Result;
pub use error::WebToolError;

Modules§

client
Web client for interacting with various web APIs
dexscreener
DexScreener integration for comprehensive token market data and DEX analytics
dexscreener_api
Complete DexScreener API implementation with real market data fetching
error
Error types for riglr-web-tools.
faster100x
Faster100x holder analysis integration for advanced on-chain analytics
lunarcrush
LunarCrush social analytics integration for cryptocurrency sentiment analysis
news
Comprehensive cryptocurrency and financial news aggregation
pocketuniverse
PocketUniverse integration for Solana token rug pull detection
price
Price fetching tools using DexScreener API
rugcheck
RugCheck integration for Solana token security analysis and risk assessment
trenchbot
TrenchBot integration for Solana token bundle analysis and risk assessment
tweetscout
TweetScout integration for Twitter/X account analysis and credibility scoring
twitter
Twitter/X integration for social sentiment analysis and trend monitoring
web_search
Web search integration using Exa API and web scraping

Constants§

VERSION
Current version of riglr-web-tools