intentkit 0.5.1__py3-none-any.whl → 0.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- intentkit/__init__.py +17 -0
- {abstracts → intentkit/abstracts}/skill.py +12 -0
- intentkit/clients/cdp.py +151 -0
- {config → intentkit/config}/config.py +12 -4
- {core → intentkit/core}/engine.py +39 -31
- {core → intentkit/core}/node.py +8 -4
- {core → intentkit/core}/prompt.py +5 -6
- {core → intentkit/core}/skill.py +11 -0
- {models → intentkit/models}/agent.py +2 -9
- {models → intentkit/models}/agent_data.py +18 -0
- {models → intentkit/models}/agent_schema.json +12 -0
- {models → intentkit/models}/chat.py +50 -0
- {models → intentkit/models}/skill.py +19 -0
- {skills → intentkit/skills}/base.py +37 -17
- {skills → intentkit/skills}/cdp/__init__.py +6 -14
- intentkit/skills/cdp/get_balance.py +133 -0
- {skills → intentkit/skills}/cdp/schema.json +0 -64
- {skills → intentkit/skills}/cryptocompare/fetch_news.py +2 -2
- {skills → intentkit/skills}/cryptocompare/fetch_price.py +2 -2
- {skills → intentkit/skills}/cryptocompare/fetch_top_exchanges.py +2 -2
- {skills → intentkit/skills}/cryptocompare/fetch_top_market_cap.py +2 -2
- {skills → intentkit/skills}/cryptocompare/fetch_top_volume.py +2 -2
- {skills → intentkit/skills}/cryptocompare/fetch_trading_signals.py +2 -2
- {skills → intentkit/skills}/defillama/base.py +3 -3
- {skills → intentkit/skills}/enso/base.py +27 -4
- {skills → intentkit/skills}/enso/networks.py +1 -1
- {skills → intentkit/skills}/enso/route.py +24 -23
- {skills → intentkit/skills}/enso/tokens.py +1 -1
- {skills → intentkit/skills}/enso/wallet.py +27 -23
- intentkit/skills/firecrawl/README.md +211 -0
- intentkit/skills/firecrawl/__init__.py +107 -0
- intentkit/skills/firecrawl/base.py +28 -0
- intentkit/skills/firecrawl/clear.py +87 -0
- intentkit/skills/firecrawl/crawl.py +399 -0
- intentkit/skills/firecrawl/firecrawl.png +0 -0
- intentkit/skills/firecrawl/query.py +123 -0
- intentkit/skills/firecrawl/schema.json +153 -0
- intentkit/skills/firecrawl/scrape.py +318 -0
- intentkit/skills/firecrawl/utils.py +306 -0
- {skills → intentkit/skills}/heurist/image_generation_animagine_xl.py +1 -1
- {skills → intentkit/skills}/heurist/image_generation_arthemy_comics.py +1 -1
- {skills → intentkit/skills}/heurist/image_generation_arthemy_real.py +1 -1
- {skills → intentkit/skills}/heurist/image_generation_braindance.py +1 -1
- {skills → intentkit/skills}/heurist/image_generation_cyber_realistic_xl.py +1 -1
- {skills → intentkit/skills}/heurist/image_generation_flux_1_dev.py +1 -1
- {skills → intentkit/skills}/heurist/image_generation_sdxl.py +1 -1
- intentkit/skills/http/README.md +78 -0
- intentkit/skills/http/__init__.py +100 -0
- intentkit/skills/http/base.py +21 -0
- intentkit/skills/http/get.py +96 -0
- intentkit/skills/http/http.svg +15 -0
- intentkit/skills/http/post.py +113 -0
- intentkit/skills/http/put.py +113 -0
- intentkit/skills/http/schema.json +80 -0
- {skills → intentkit/skills}/lifi/token_execute.py +1 -1
- {skills → intentkit/skills}/openai/dalle_image_generation.py +1 -1
- {skills → intentkit/skills}/openai/gpt_image_generation.py +1 -1
- {skills → intentkit/skills}/openai/gpt_image_to_image.py +1 -1
- intentkit/skills/supabase/__init__.py +116 -0
- intentkit/skills/supabase/base.py +72 -0
- intentkit/skills/supabase/delete_data.py +102 -0
- intentkit/skills/supabase/fetch_data.py +120 -0
- intentkit/skills/supabase/insert_data.py +70 -0
- intentkit/skills/supabase/invoke_function.py +74 -0
- intentkit/skills/supabase/schema.json +170 -0
- intentkit/skills/supabase/supabase.svg +15 -0
- intentkit/skills/supabase/update_data.py +105 -0
- intentkit/skills/supabase/upsert_data.py +77 -0
- {skills → intentkit/skills}/system/read_agent_api_key.py +1 -1
- {skills → intentkit/skills}/system/regenerate_agent_api_key.py +1 -1
- {skills → intentkit/skills}/token/base.py +1 -39
- {skills → intentkit/skills}/twitter/follow_user.py +3 -3
- {skills → intentkit/skills}/twitter/get_mentions.py +6 -6
- {skills → intentkit/skills}/twitter/get_timeline.py +5 -5
- {skills → intentkit/skills}/twitter/get_user_by_username.py +3 -3
- {skills → intentkit/skills}/twitter/get_user_tweets.py +5 -5
- {skills → intentkit/skills}/twitter/like_tweet.py +3 -3
- {skills → intentkit/skills}/twitter/post_tweet.py +4 -4
- {skills → intentkit/skills}/twitter/reply_tweet.py +4 -4
- {skills → intentkit/skills}/twitter/retweet.py +3 -3
- {skills → intentkit/skills}/twitter/search_tweets.py +5 -5
- {skills → intentkit/skills}/unrealspeech/text_to_speech.py +1 -1
- {skills → intentkit/skills}/web_scraper/README.md +35 -4
- {skills → intentkit/skills}/web_scraper/__init__.py +16 -0
- intentkit/skills/web_scraper/document_indexer.py +143 -0
- {skills → intentkit/skills}/web_scraper/schema.json +28 -0
- intentkit/skills/web_scraper/scrape_and_index.py +262 -0
- intentkit/skills/web_scraper/utils.py +684 -0
- intentkit/skills/web_scraper/website_indexer.py +456 -0
- {utils → intentkit/utils}/logging.py +1 -1
- {intentkit-0.5.1.dist-info → intentkit-0.6.0.dist-info}/METADATA +1 -1
- intentkit-0.6.0.dist-info/RECORD +396 -0
- clients/cdp.py +0 -53
- intentkit-0.5.1.dist-info/RECORD +0 -364
- skills/cdp/get_balance.py +0 -81
- skills/web_scraper/scrape_and_index.py +0 -327
- {abstracts → intentkit/abstracts}/__init__.py +0 -0
- {abstracts → intentkit/abstracts}/agent.py +0 -0
- {abstracts → intentkit/abstracts}/api.py +0 -0
- {abstracts → intentkit/abstracts}/engine.py +0 -0
- {abstracts → intentkit/abstracts}/exception.py +0 -0
- {abstracts → intentkit/abstracts}/graph.py +0 -0
- {abstracts → intentkit/abstracts}/twitter.py +0 -0
- {clients → intentkit/clients}/__init__.py +0 -0
- {clients → intentkit/clients}/twitter.py +0 -0
- {config → intentkit/config}/__init__.py +0 -0
- {core → intentkit/core}/__init__.py +0 -0
- {core → intentkit/core}/agent.py +0 -0
- {core → intentkit/core}/api.py +0 -0
- {core → intentkit/core}/client.py +0 -0
- {core → intentkit/core}/credit.py +0 -0
- {models → intentkit/models}/app_setting.py +0 -0
- {models → intentkit/models}/base.py +0 -0
- {models → intentkit/models}/conversation.py +0 -0
- {models → intentkit/models}/credit.py +0 -0
- {models → intentkit/models}/db.py +0 -0
- {models → intentkit/models}/db_mig.py +0 -0
- {models → intentkit/models}/generator.py +0 -0
- {models → intentkit/models}/llm.py +0 -0
- {models → intentkit/models}/redis.py +0 -0
- {models → intentkit/models}/user.py +0 -0
- {skills → intentkit/skills}/__init__.py +0 -0
- {skills → intentkit/skills}/acolyt/__init__.py +0 -0
- {skills → intentkit/skills}/acolyt/acolyt.jpg +0 -0
- {skills → intentkit/skills}/acolyt/ask.py +0 -0
- {skills → intentkit/skills}/acolyt/base.py +0 -0
- {skills → intentkit/skills}/acolyt/schema.json +0 -0
- {skills → intentkit/skills}/aixbt/README.md +0 -0
- {skills → intentkit/skills}/aixbt/__init__.py +0 -0
- {skills → intentkit/skills}/aixbt/aixbt.jpg +0 -0
- {skills → intentkit/skills}/aixbt/base.py +0 -0
- {skills → intentkit/skills}/aixbt/projects.py +0 -0
- {skills → intentkit/skills}/aixbt/schema.json +0 -0
- {skills → intentkit/skills}/allora/__init__.py +0 -0
- {skills → intentkit/skills}/allora/allora.jpeg +0 -0
- {skills → intentkit/skills}/allora/base.py +0 -0
- {skills → intentkit/skills}/allora/price.py +0 -0
- {skills → intentkit/skills}/allora/schema.json +0 -0
- {skills → intentkit/skills}/carv/README.md +0 -0
- {skills → intentkit/skills}/carv/__init__.py +0 -0
- {skills → intentkit/skills}/carv/base.py +0 -0
- {skills → intentkit/skills}/carv/carv.webp +0 -0
- {skills → intentkit/skills}/carv/fetch_news.py +0 -0
- {skills → intentkit/skills}/carv/onchain_query.py +0 -0
- {skills → intentkit/skills}/carv/schema.json +0 -0
- {skills → intentkit/skills}/carv/token_info_and_price.py +0 -0
- {skills → intentkit/skills}/cdp/base.py +0 -0
- {skills → intentkit/skills}/cdp/cdp.png +0 -0
- {skills → intentkit/skills}/chainlist/README.md +0 -0
- {skills → intentkit/skills}/chainlist/__init__.py +0 -0
- {skills → intentkit/skills}/chainlist/base.py +0 -0
- {skills → intentkit/skills}/chainlist/chain_lookup.py +0 -0
- {skills → intentkit/skills}/chainlist/chainlist.png +0 -0
- {skills → intentkit/skills}/chainlist/schema.json +0 -0
- {skills → intentkit/skills}/common/__init__.py +0 -0
- {skills → intentkit/skills}/common/base.py +0 -0
- {skills → intentkit/skills}/common/common.jpg +0 -0
- {skills → intentkit/skills}/common/current_time.py +0 -0
- {skills → intentkit/skills}/common/schema.json +0 -0
- {skills → intentkit/skills}/cookiefun/README.md +0 -0
- {skills → intentkit/skills}/cookiefun/__init__.py +0 -0
- {skills → intentkit/skills}/cookiefun/base.py +0 -0
- {skills → intentkit/skills}/cookiefun/constants.py +0 -0
- {skills → intentkit/skills}/cookiefun/cookiefun.png +0 -0
- {skills → intentkit/skills}/cookiefun/get_account_details.py +0 -0
- {skills → intentkit/skills}/cookiefun/get_account_feed.py +0 -0
- {skills → intentkit/skills}/cookiefun/get_account_smart_followers.py +0 -0
- {skills → intentkit/skills}/cookiefun/get_sectors.py +0 -0
- {skills → intentkit/skills}/cookiefun/schema.json +0 -0
- {skills → intentkit/skills}/cookiefun/search_accounts.py +0 -0
- {skills → intentkit/skills}/cryptocompare/__init__.py +0 -0
- {skills → intentkit/skills}/cryptocompare/api.py +0 -0
- {skills → intentkit/skills}/cryptocompare/base.py +0 -0
- {skills → intentkit/skills}/cryptocompare/cryptocompare.png +0 -0
- {skills → intentkit/skills}/cryptocompare/schema.json +0 -0
- {skills → intentkit/skills}/cryptopanic/__init__.py +0 -0
- {skills → intentkit/skills}/cryptopanic/base.py +0 -0
- {skills → intentkit/skills}/cryptopanic/cryptopanic.png +0 -0
- {skills → intentkit/skills}/cryptopanic/fetch_crypto_news.py +0 -0
- {skills → intentkit/skills}/cryptopanic/fetch_crypto_sentiment.py +0 -0
- {skills → intentkit/skills}/cryptopanic/schema.json +0 -0
- {skills → intentkit/skills}/dapplooker/README.md +0 -0
- {skills → intentkit/skills}/dapplooker/__init__.py +0 -0
- {skills → intentkit/skills}/dapplooker/base.py +0 -0
- {skills → intentkit/skills}/dapplooker/dapplooker.jpg +0 -0
- {skills → intentkit/skills}/dapplooker/dapplooker_token_data.py +0 -0
- {skills → intentkit/skills}/dapplooker/schema.json +0 -0
- {skills → intentkit/skills}/defillama/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/api.py +0 -0
- {skills → intentkit/skills}/defillama/coins/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/coins/fetch_batch_historical_prices.py +0 -0
- {skills → intentkit/skills}/defillama/coins/fetch_block.py +0 -0
- {skills → intentkit/skills}/defillama/coins/fetch_current_prices.py +0 -0
- {skills → intentkit/skills}/defillama/coins/fetch_first_price.py +0 -0
- {skills → intentkit/skills}/defillama/coins/fetch_historical_prices.py +0 -0
- {skills → intentkit/skills}/defillama/coins/fetch_price_chart.py +0 -0
- {skills → intentkit/skills}/defillama/coins/fetch_price_percentage.py +0 -0
- {skills → intentkit/skills}/defillama/config/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/config/chains.py +0 -0
- {skills → intentkit/skills}/defillama/defillama.jpeg +0 -0
- {skills → intentkit/skills}/defillama/fees/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/fees/fetch_fees_overview.py +0 -0
- {skills → intentkit/skills}/defillama/schema.json +0 -0
- {skills → intentkit/skills}/defillama/stablecoins/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/stablecoins/fetch_stablecoin_chains.py +0 -0
- {skills → intentkit/skills}/defillama/stablecoins/fetch_stablecoin_charts.py +0 -0
- {skills → intentkit/skills}/defillama/stablecoins/fetch_stablecoin_prices.py +0 -0
- {skills → intentkit/skills}/defillama/stablecoins/fetch_stablecoins.py +0 -0
- {skills → intentkit/skills}/defillama/tests/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/tests/api_integration.test.py +0 -0
- {skills → intentkit/skills}/defillama/tests/api_unit.test.py +0 -0
- {skills → intentkit/skills}/defillama/tvl/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/tvl/fetch_chain_historical_tvl.py +0 -0
- {skills → intentkit/skills}/defillama/tvl/fetch_chains.py +0 -0
- {skills → intentkit/skills}/defillama/tvl/fetch_historical_tvl.py +0 -0
- {skills → intentkit/skills}/defillama/tvl/fetch_protocol.py +0 -0
- {skills → intentkit/skills}/defillama/tvl/fetch_protocol_current_tvl.py +0 -0
- {skills → intentkit/skills}/defillama/tvl/fetch_protocols.py +0 -0
- {skills → intentkit/skills}/defillama/volumes/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/volumes/fetch_dex_overview.py +0 -0
- {skills → intentkit/skills}/defillama/volumes/fetch_dex_summary.py +0 -0
- {skills → intentkit/skills}/defillama/volumes/fetch_options_overview.py +0 -0
- {skills → intentkit/skills}/defillama/yields/__init__.py +0 -0
- {skills → intentkit/skills}/defillama/yields/fetch_pool_chart.py +0 -0
- {skills → intentkit/skills}/defillama/yields/fetch_pools.py +0 -0
- {skills → intentkit/skills}/dexscreener/__init__.py +0 -0
- {skills → intentkit/skills}/dexscreener/base.py +0 -0
- {skills → intentkit/skills}/dexscreener/dexscreener.png +0 -0
- {skills → intentkit/skills}/dexscreener/model/__init__.py +0 -0
- {skills → intentkit/skills}/dexscreener/model/search_token_response.py +0 -0
- {skills → intentkit/skills}/dexscreener/schema.json +0 -0
- {skills → intentkit/skills}/dexscreener/search_token.py +0 -0
- {skills → intentkit/skills}/dune_analytics/__init__.py +0 -0
- {skills → intentkit/skills}/dune_analytics/base.py +0 -0
- {skills → intentkit/skills}/dune_analytics/dune.png +0 -0
- {skills → intentkit/skills}/dune_analytics/fetch_kol_buys.py +0 -0
- {skills → intentkit/skills}/dune_analytics/fetch_nation_metrics.py +0 -0
- {skills → intentkit/skills}/dune_analytics/schema.json +0 -0
- {skills → intentkit/skills}/elfa/README.md +0 -0
- {skills → intentkit/skills}/elfa/__init__.py +0 -0
- {skills → intentkit/skills}/elfa/base.py +0 -0
- {skills → intentkit/skills}/elfa/elfa.jpg +0 -0
- {skills → intentkit/skills}/elfa/mention.py +0 -0
- {skills → intentkit/skills}/elfa/schema.json +0 -0
- {skills → intentkit/skills}/elfa/stats.py +0 -0
- {skills → intentkit/skills}/elfa/tokens.py +0 -0
- {skills → intentkit/skills}/enso/README.md +0 -0
- {skills → intentkit/skills}/enso/__init__.py +0 -0
- {skills → intentkit/skills}/enso/abi/__init__.py +0 -0
- {skills → intentkit/skills}/enso/abi/approval.py +0 -0
- {skills → intentkit/skills}/enso/abi/erc20.py +0 -0
- {skills → intentkit/skills}/enso/abi/route.py +0 -0
- {skills → intentkit/skills}/enso/best_yield.py +0 -0
- {skills → intentkit/skills}/enso/enso.jpg +0 -0
- {skills → intentkit/skills}/enso/prices.py +0 -0
- {skills → intentkit/skills}/enso/schema.json +0 -0
- {skills → intentkit/skills}/github/README.md +0 -0
- {skills → intentkit/skills}/github/__init__.py +0 -0
- {skills → intentkit/skills}/github/base.py +0 -0
- {skills → intentkit/skills}/github/github.jpg +0 -0
- {skills → intentkit/skills}/github/github_search.py +0 -0
- {skills → intentkit/skills}/github/schema.json +0 -0
- {skills → intentkit/skills}/heurist/__init__.py +0 -0
- {skills → intentkit/skills}/heurist/base.py +0 -0
- {skills → intentkit/skills}/heurist/heurist.png +0 -0
- {skills → intentkit/skills}/heurist/schema.json +0 -0
- {skills → intentkit/skills}/lifi/README.md +0 -0
- {skills → intentkit/skills}/lifi/__init__.py +0 -0
- {skills → intentkit/skills}/lifi/base.py +0 -0
- {skills → intentkit/skills}/lifi/lifi.png +0 -0
- {skills → intentkit/skills}/lifi/schema.json +0 -0
- {skills → intentkit/skills}/lifi/token_quote.py +0 -0
- {skills → intentkit/skills}/lifi/utils.py +0 -0
- {skills → intentkit/skills}/moralis/README.md +0 -0
- {skills → intentkit/skills}/moralis/__init__.py +0 -0
- {skills → intentkit/skills}/moralis/api.py +0 -0
- {skills → intentkit/skills}/moralis/base.py +0 -0
- {skills → intentkit/skills}/moralis/fetch_chain_portfolio.py +0 -0
- {skills → intentkit/skills}/moralis/fetch_nft_portfolio.py +0 -0
- {skills → intentkit/skills}/moralis/fetch_solana_portfolio.py +0 -0
- {skills → intentkit/skills}/moralis/fetch_wallet_portfolio.py +0 -0
- {skills → intentkit/skills}/moralis/moralis.png +0 -0
- {skills → intentkit/skills}/moralis/schema.json +0 -0
- {skills → intentkit/skills}/moralis/tests/__init__.py +0 -0
- {skills → intentkit/skills}/moralis/tests/test_wallet.py +0 -0
- {skills → intentkit/skills}/nation/__init__.py +0 -0
- {skills → intentkit/skills}/nation/base.py +0 -0
- {skills → intentkit/skills}/nation/nation.png +0 -0
- {skills → intentkit/skills}/nation/nft_check.py +0 -0
- {skills → intentkit/skills}/nation/schema.json +0 -0
- {skills → intentkit/skills}/openai/__init__.py +0 -0
- {skills → intentkit/skills}/openai/base.py +0 -0
- {skills → intentkit/skills}/openai/image_to_text.py +0 -0
- {skills → intentkit/skills}/openai/openai.png +0 -0
- {skills → intentkit/skills}/openai/schema.json +0 -0
- {skills → intentkit/skills}/portfolio/README.md +0 -0
- {skills → intentkit/skills}/portfolio/__init__.py +0 -0
- {skills → intentkit/skills}/portfolio/base.py +0 -0
- {skills → intentkit/skills}/portfolio/constants.py +0 -0
- {skills → intentkit/skills}/portfolio/moralis.png +0 -0
- {skills → intentkit/skills}/portfolio/schema.json +0 -0
- {skills → intentkit/skills}/portfolio/token_balances.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_approvals.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_defi_positions.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_history.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_net_worth.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_nfts.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_profitability.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_profitability_summary.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_stats.py +0 -0
- {skills → intentkit/skills}/portfolio/wallet_swaps.py +0 -0
- {skills → intentkit/skills}/skills.toml +0 -0
- {skills → intentkit/skills}/slack/__init__.py +0 -0
- {skills → intentkit/skills}/slack/base.py +0 -0
- {skills → intentkit/skills}/slack/get_channel.py +0 -0
- {skills → intentkit/skills}/slack/get_message.py +0 -0
- {skills → intentkit/skills}/slack/schedule_message.py +0 -0
- {skills → intentkit/skills}/slack/schema.json +0 -0
- {skills → intentkit/skills}/slack/send_message.py +0 -0
- {skills → intentkit/skills}/slack/slack.jpg +0 -0
- {skills → intentkit/skills}/system/__init__.py +0 -0
- {skills → intentkit/skills}/system/base.py +0 -0
- {skills → intentkit/skills}/system/schema.json +0 -0
- {skills → intentkit/skills}/system/system.svg +0 -0
- {skills → intentkit/skills}/tavily/README.md +0 -0
- {skills → intentkit/skills}/tavily/__init__.py +0 -0
- {skills → intentkit/skills}/tavily/base.py +0 -0
- {skills → intentkit/skills}/tavily/schema.json +0 -0
- {skills → intentkit/skills}/tavily/tavily.jpg +0 -0
- {skills → intentkit/skills}/tavily/tavily_extract.py +0 -0
- {skills → intentkit/skills}/tavily/tavily_search.py +0 -0
- {skills → intentkit/skills}/token/README.md +0 -0
- {skills → intentkit/skills}/token/__init__.py +0 -0
- {skills → intentkit/skills}/token/constants.py +0 -0
- {skills → intentkit/skills}/token/erc20_transfers.py +0 -0
- {skills → intentkit/skills}/token/moralis.png +0 -0
- {skills → intentkit/skills}/token/schema.json +0 -0
- {skills → intentkit/skills}/token/token_analytics.py +0 -0
- {skills → intentkit/skills}/token/token_price.py +0 -0
- {skills → intentkit/skills}/token/token_search.py +0 -0
- {skills → intentkit/skills}/twitter/__init__.py +0 -0
- {skills → intentkit/skills}/twitter/base.py +0 -0
- {skills → intentkit/skills}/twitter/schema.json +0 -0
- {skills → intentkit/skills}/twitter/twitter.png +0 -0
- {skills → intentkit/skills}/unrealspeech/__init__.py +0 -0
- {skills → intentkit/skills}/unrealspeech/base.py +0 -0
- {skills → intentkit/skills}/unrealspeech/schema.json +0 -0
- {skills → intentkit/skills}/unrealspeech/unrealspeech.jpg +0 -0
- {skills → intentkit/skills}/venice_audio/__init__.py +0 -0
- {skills → intentkit/skills}/venice_audio/base.py +0 -0
- {skills → intentkit/skills}/venice_audio/input.py +0 -0
- {skills → intentkit/skills}/venice_audio/schema.json +0 -0
- {skills → intentkit/skills}/venice_audio/venice_audio.py +0 -0
- {skills → intentkit/skills}/venice_audio/venice_logo.jpg +0 -0
- {skills → intentkit/skills}/venice_image/README.md +0 -0
- {skills → intentkit/skills}/venice_image/__init__.py +0 -0
- {skills → intentkit/skills}/venice_image/api.py +0 -0
- {skills → intentkit/skills}/venice_image/base.py +0 -0
- {skills → intentkit/skills}/venice_image/config.py +0 -0
- {skills → intentkit/skills}/venice_image/image_enhance/README.md +0 -0
- {skills → intentkit/skills}/venice_image/image_enhance/__init__.py +0 -0
- {skills → intentkit/skills}/venice_image/image_enhance/image_enhance.py +0 -0
- {skills → intentkit/skills}/venice_image/image_enhance/image_enhance_base.py +0 -0
- {skills → intentkit/skills}/venice_image/image_enhance/image_enhance_input.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/README.md +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/__init__.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_base.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_fluently_xl.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_flux_dev.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_flux_dev_uncensored.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_input.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_lustify_sdxl.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_pony_realism.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_stable_diffusion_3_5.py +0 -0
- {skills → intentkit/skills}/venice_image/image_generation/image_generation_venice_sd35.py +0 -0
- {skills → intentkit/skills}/venice_image/image_upscale/README.md +0 -0
- {skills → intentkit/skills}/venice_image/image_upscale/__init__.py +0 -0
- {skills → intentkit/skills}/venice_image/image_upscale/image_upscale.py +0 -0
- {skills → intentkit/skills}/venice_image/image_upscale/image_upscale_base.py +0 -0
- {skills → intentkit/skills}/venice_image/image_upscale/image_upscale_input.py +0 -0
- {skills → intentkit/skills}/venice_image/image_vision/README.md +0 -0
- {skills → intentkit/skills}/venice_image/image_vision/__init__.py +0 -0
- {skills → intentkit/skills}/venice_image/image_vision/image_vision.py +0 -0
- {skills → intentkit/skills}/venice_image/image_vision/image_vision_base.py +0 -0
- {skills → intentkit/skills}/venice_image/image_vision/image_vision_input.py +0 -0
- {skills → intentkit/skills}/venice_image/schema.json +0 -0
- {skills → intentkit/skills}/venice_image/utils.py +0 -0
- {skills → intentkit/skills}/venice_image/venice_image.jpg +0 -0
- {skills → intentkit/skills}/web_scraper/base.py +0 -0
- {skills → intentkit/skills}/web_scraper/langchain.png +0 -0
- {utils → intentkit/utils}/__init__.py +0 -0
- {utils → intentkit/utils}/chain.py +0 -0
- {utils → intentkit/utils}/error.py +0 -0
- {utils → intentkit/utils}/middleware.py +0 -0
- {utils → intentkit/utils}/random.py +0 -0
- {utils → intentkit/utils}/s3.py +0 -0
- {utils → intentkit/utils}/slack_alert.py +0 -0
- {utils → intentkit/utils}/tx.py +0 -0
- {intentkit-0.5.1.dist-info → intentkit-0.6.0.dist-info}/WHEEL +0 -0
- {intentkit-0.5.1.dist-info → intentkit-0.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
import base64
|
|
3
|
-
import logging
|
|
4
|
-
import os
|
|
5
|
-
import tempfile
|
|
6
|
-
from typing import List, Type
|
|
7
|
-
from urllib.parse import urlparse
|
|
8
|
-
|
|
9
|
-
from langchain_community.document_loaders import WebBaseLoader
|
|
10
|
-
from langchain_community.vectorstores import FAISS
|
|
11
|
-
from langchain_core.runnables import RunnableConfig
|
|
12
|
-
from langchain_openai import OpenAIEmbeddings
|
|
13
|
-
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
|
14
|
-
from pydantic import BaseModel, Field
|
|
15
|
-
|
|
16
|
-
from intentkit.skills.web_scraper.base import WebScraperBaseTool
|
|
17
|
-
|
|
18
|
-
logger = logging.getLogger(__name__)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class ScrapeAndIndexInput(BaseModel):
|
|
22
|
-
"""Input for ScrapeAndIndex tool."""
|
|
23
|
-
|
|
24
|
-
urls: List[str] = Field(
|
|
25
|
-
description="List of URLs to scrape and index. Each URL should be a valid web address starting with http:// or https://",
|
|
26
|
-
min_items=1,
|
|
27
|
-
max_items=10,
|
|
28
|
-
)
|
|
29
|
-
chunk_size: int = Field(
|
|
30
|
-
description="Size of text chunks for indexing (default: 1000)",
|
|
31
|
-
default=1000,
|
|
32
|
-
ge=100,
|
|
33
|
-
le=4000,
|
|
34
|
-
)
|
|
35
|
-
chunk_overlap: int = Field(
|
|
36
|
-
description="Overlap between chunks (default: 200)",
|
|
37
|
-
default=200,
|
|
38
|
-
ge=0,
|
|
39
|
-
le=1000,
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class QueryIndexInput(BaseModel):
|
|
44
|
-
"""Input for QueryIndex tool."""
|
|
45
|
-
|
|
46
|
-
query: str = Field(
|
|
47
|
-
description="Question or query to search in the indexed content",
|
|
48
|
-
min_length=1,
|
|
49
|
-
max_length=500,
|
|
50
|
-
)
|
|
51
|
-
max_results: int = Field(
|
|
52
|
-
description="Maximum number of relevant documents to return (default: 4)",
|
|
53
|
-
default=4,
|
|
54
|
-
ge=1,
|
|
55
|
-
le=10,
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class ScrapeAndIndex(WebScraperBaseTool):
|
|
60
|
-
"""Tool for scraping web content and indexing it into a searchable vector store.
|
|
61
|
-
|
|
62
|
-
This tool can scrape multiple URLs, process the content into chunks,
|
|
63
|
-
and store it in a vector database for later retrieval and question answering.
|
|
64
|
-
"""
|
|
65
|
-
|
|
66
|
-
name: str = "web_scraper_scrape_and_index"
|
|
67
|
-
description: str = (
|
|
68
|
-
"Scrape content from one or more web URLs and index them into a vector store for later querying.\n"
|
|
69
|
-
"Use this tool to collect and index web content that you want to reference later.\n"
|
|
70
|
-
"The indexed content can then be queried using the query_indexed_content tool."
|
|
71
|
-
)
|
|
72
|
-
args_schema: Type[BaseModel] = ScrapeAndIndexInput
|
|
73
|
-
|
|
74
|
-
def _validate_urls(self, urls: List[str]) -> List[str]:
|
|
75
|
-
"""Validate and filter URLs."""
|
|
76
|
-
valid_urls = []
|
|
77
|
-
for url in urls:
|
|
78
|
-
try:
|
|
79
|
-
parsed = urlparse(url)
|
|
80
|
-
if parsed.scheme in ["http", "https"] and parsed.netloc:
|
|
81
|
-
valid_urls.append(url)
|
|
82
|
-
else:
|
|
83
|
-
logger.warning(f"Invalid URL format: {url}")
|
|
84
|
-
except Exception as e:
|
|
85
|
-
logger.warning(f"Error parsing URL {url}: {e}")
|
|
86
|
-
return valid_urls
|
|
87
|
-
|
|
88
|
-
async def _arun(
|
|
89
|
-
self,
|
|
90
|
-
urls: List[str],
|
|
91
|
-
chunk_size: int = 1000,
|
|
92
|
-
chunk_overlap: int = 200,
|
|
93
|
-
config: RunnableConfig = None,
|
|
94
|
-
**kwargs,
|
|
95
|
-
) -> str:
|
|
96
|
-
"""Scrape URLs and index content into vector store."""
|
|
97
|
-
try:
|
|
98
|
-
# Validate URLs
|
|
99
|
-
valid_urls = self._validate_urls(urls)
|
|
100
|
-
if not valid_urls:
|
|
101
|
-
return "Error: No valid URLs provided. URLs must start with http:// or https://"
|
|
102
|
-
|
|
103
|
-
# Get agent context for storage
|
|
104
|
-
context = self.context_from_config(config) if config else None
|
|
105
|
-
agent_id = context.agent.id if context else "default"
|
|
106
|
-
|
|
107
|
-
# Load documents from URLs
|
|
108
|
-
logger.info(f"Scraping {len(valid_urls)} URLs...")
|
|
109
|
-
loader = WebBaseLoader(
|
|
110
|
-
web_paths=valid_urls,
|
|
111
|
-
requests_per_second=2, # Be respectful to servers
|
|
112
|
-
show_progress=True,
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
# Configure loader for better content extraction
|
|
116
|
-
loader.requests_kwargs = {
|
|
117
|
-
"verify": True,
|
|
118
|
-
"timeout": 30,
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
documents = await asyncio.to_thread(loader.load)
|
|
122
|
-
|
|
123
|
-
if not documents:
|
|
124
|
-
return "Error: No content could be extracted from the provided URLs."
|
|
125
|
-
|
|
126
|
-
# Split documents into chunks
|
|
127
|
-
text_splitter = RecursiveCharacterTextSplitter(
|
|
128
|
-
chunk_size=chunk_size,
|
|
129
|
-
chunk_overlap=chunk_overlap,
|
|
130
|
-
length_function=len,
|
|
131
|
-
)
|
|
132
|
-
split_docs = text_splitter.split_documents(documents)
|
|
133
|
-
|
|
134
|
-
if not split_docs:
|
|
135
|
-
return "Error: No content could be processed into chunks."
|
|
136
|
-
|
|
137
|
-
# Create embeddings and vector store
|
|
138
|
-
api_key = self.skill_store.get_system_config("openai_api_key")
|
|
139
|
-
embeddings = OpenAIEmbeddings(api_key=api_key)
|
|
140
|
-
|
|
141
|
-
# Create vector store
|
|
142
|
-
vector_store = FAISS.from_documents(split_docs, embeddings)
|
|
143
|
-
|
|
144
|
-
# Store the vector store for this agent using a temporary directory
|
|
145
|
-
vector_store_key = f"vector_store_{agent_id}"
|
|
146
|
-
metadata_key = f"indexed_urls_{agent_id}"
|
|
147
|
-
|
|
148
|
-
# Save vector store to temporary directory and encode to base64
|
|
149
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
150
|
-
vector_store.save_local(temp_dir)
|
|
151
|
-
|
|
152
|
-
# Read and encode all files in the temporary directory
|
|
153
|
-
encoded_files = {}
|
|
154
|
-
for filename in os.listdir(temp_dir):
|
|
155
|
-
file_path = os.path.join(temp_dir, filename)
|
|
156
|
-
if os.path.isfile(file_path):
|
|
157
|
-
with open(file_path, "rb") as f:
|
|
158
|
-
encoded_files[filename] = base64.b64encode(f.read()).decode(
|
|
159
|
-
"utf-8"
|
|
160
|
-
)
|
|
161
|
-
|
|
162
|
-
# Store vector store data
|
|
163
|
-
await self.skill_store.save_agent_skill_data(
|
|
164
|
-
agent_id=agent_id,
|
|
165
|
-
skill="web_scraper",
|
|
166
|
-
key=vector_store_key,
|
|
167
|
-
data={
|
|
168
|
-
"faiss_files": encoded_files,
|
|
169
|
-
"chunk_size": chunk_size,
|
|
170
|
-
"chunk_overlap": chunk_overlap,
|
|
171
|
-
},
|
|
172
|
-
)
|
|
173
|
-
|
|
174
|
-
# Store metadata about indexed URLs
|
|
175
|
-
existing_metadata = (
|
|
176
|
-
await self.skill_store.get_agent_skill_data(
|
|
177
|
-
agent_id, "web_scraper", metadata_key
|
|
178
|
-
)
|
|
179
|
-
or {}
|
|
180
|
-
)
|
|
181
|
-
existing_metadata.update(
|
|
182
|
-
{
|
|
183
|
-
url: {
|
|
184
|
-
"indexed_at": str(asyncio.get_event_loop().time()),
|
|
185
|
-
"chunks": len(
|
|
186
|
-
[
|
|
187
|
-
doc
|
|
188
|
-
for doc in split_docs
|
|
189
|
-
if doc.metadata.get("source") == url
|
|
190
|
-
]
|
|
191
|
-
),
|
|
192
|
-
}
|
|
193
|
-
for url in valid_urls
|
|
194
|
-
}
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
await self.skill_store.save_agent_skill_data(
|
|
198
|
-
agent_id=agent_id,
|
|
199
|
-
skill="web_scraper",
|
|
200
|
-
key=metadata_key,
|
|
201
|
-
data=existing_metadata,
|
|
202
|
-
)
|
|
203
|
-
|
|
204
|
-
total_chunks = len(split_docs)
|
|
205
|
-
successful_urls = len(valid_urls)
|
|
206
|
-
|
|
207
|
-
return (
|
|
208
|
-
f"Successfully scraped and indexed {successful_urls} URLs:\n"
|
|
209
|
-
f"{'• ' + chr(10) + '• '.join(valid_urls)}\n\n"
|
|
210
|
-
f"Total chunks created: {total_chunks}\n"
|
|
211
|
-
f"Chunk size: {chunk_size} characters\n"
|
|
212
|
-
f"Chunk overlap: {chunk_overlap} characters\n\n"
|
|
213
|
-
f"The content is now indexed and can be queried using the query_indexed_content tool."
|
|
214
|
-
)
|
|
215
|
-
|
|
216
|
-
except Exception as e:
|
|
217
|
-
logger.error(f"Error in scrape_and_index: {e}")
|
|
218
|
-
return f"Error scraping and indexing URLs: {str(e)}"
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
class QueryIndexedContent(WebScraperBaseTool):
|
|
222
|
-
"""Tool for querying previously indexed web content.
|
|
223
|
-
|
|
224
|
-
This tool searches through content that was previously scraped and indexed
|
|
225
|
-
using the scrape_and_index tool to answer questions or find relevant information.
|
|
226
|
-
"""
|
|
227
|
-
|
|
228
|
-
name: str = "web_scraper_query_indexed_content"
|
|
229
|
-
description: str = (
|
|
230
|
-
"Query previously indexed web content to find relevant information and answer questions.\n"
|
|
231
|
-
"Use this tool to search through content that was previously scraped and indexed.\n"
|
|
232
|
-
"This tool can help answer questions based on the indexed web content."
|
|
233
|
-
)
|
|
234
|
-
args_schema: Type[BaseModel] = QueryIndexInput
|
|
235
|
-
|
|
236
|
-
async def _arun(
|
|
237
|
-
self,
|
|
238
|
-
query: str,
|
|
239
|
-
max_results: int = 4,
|
|
240
|
-
config: RunnableConfig = None,
|
|
241
|
-
**kwargs,
|
|
242
|
-
) -> str:
|
|
243
|
-
"""Query the indexed content."""
|
|
244
|
-
try:
|
|
245
|
-
# Get agent context for storage
|
|
246
|
-
context = self.context_from_config(config) if config else None
|
|
247
|
-
agent_id = context.agent.id if context else "default"
|
|
248
|
-
|
|
249
|
-
# Retrieve vector store
|
|
250
|
-
vector_store_key = f"vector_store_{agent_id}"
|
|
251
|
-
metadata_key = f"indexed_urls_{agent_id}"
|
|
252
|
-
|
|
253
|
-
stored_data = await self.skill_store.get_agent_skill_data(
|
|
254
|
-
agent_id, "web_scraper", vector_store_key
|
|
255
|
-
)
|
|
256
|
-
if not stored_data or "faiss_files" not in stored_data:
|
|
257
|
-
return (
|
|
258
|
-
"No indexed content found. Please use the scrape_and_index tool first "
|
|
259
|
-
"to scrape and index some web content before querying."
|
|
260
|
-
)
|
|
261
|
-
|
|
262
|
-
# Restore vector store from base64 encoded files
|
|
263
|
-
api_key = self.skill_store.get_system_config("openai_api_key")
|
|
264
|
-
embeddings = OpenAIEmbeddings(api_key=api_key)
|
|
265
|
-
|
|
266
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
267
|
-
# Decode and write files to temporary directory
|
|
268
|
-
for filename, encoded_content in stored_data["faiss_files"].items():
|
|
269
|
-
file_path = os.path.join(temp_dir, filename)
|
|
270
|
-
with open(file_path, "wb") as f:
|
|
271
|
-
f.write(base64.b64decode(encoded_content))
|
|
272
|
-
|
|
273
|
-
# Load the vector store from the temporary directory
|
|
274
|
-
vector_store = FAISS.load_local(
|
|
275
|
-
temp_dir,
|
|
276
|
-
embeddings,
|
|
277
|
-
allow_dangerous_deserialization=True, # Safe since we control the serialization
|
|
278
|
-
)
|
|
279
|
-
|
|
280
|
-
# Perform similarity search
|
|
281
|
-
relevant_docs = vector_store.similarity_search(query, k=max_results)
|
|
282
|
-
|
|
283
|
-
if not relevant_docs:
|
|
284
|
-
return f"No relevant content found for query: '{query}'"
|
|
285
|
-
|
|
286
|
-
# Get metadata about indexed URLs
|
|
287
|
-
metadata = (
|
|
288
|
-
await self.skill_store.get_agent_skill_data(
|
|
289
|
-
agent_id, "web_scraper", metadata_key
|
|
290
|
-
)
|
|
291
|
-
or {}
|
|
292
|
-
)
|
|
293
|
-
|
|
294
|
-
# Format response
|
|
295
|
-
response_parts = [
|
|
296
|
-
f"Found {len(relevant_docs)} relevant pieces of content for: '{query}'\n",
|
|
297
|
-
"=" * 50,
|
|
298
|
-
]
|
|
299
|
-
|
|
300
|
-
for i, doc in enumerate(relevant_docs, 1):
|
|
301
|
-
source_url = doc.metadata.get("source", "Unknown source")
|
|
302
|
-
title = doc.metadata.get("title", "No title")
|
|
303
|
-
|
|
304
|
-
response_parts.extend(
|
|
305
|
-
[
|
|
306
|
-
f"\n{i}. Source: {source_url}",
|
|
307
|
-
f" Title: {title}",
|
|
308
|
-
f" Content:\n {doc.page_content[:500]}{'...' if len(doc.page_content) > 500 else ''}",
|
|
309
|
-
"",
|
|
310
|
-
]
|
|
311
|
-
)
|
|
312
|
-
|
|
313
|
-
# Add summary of indexed content
|
|
314
|
-
response_parts.extend(
|
|
315
|
-
[
|
|
316
|
-
"\n" + "=" * 50,
|
|
317
|
-
f"Total indexed URLs: {len(metadata)}",
|
|
318
|
-
"Indexed sources:",
|
|
319
|
-
*[f"• {url}" for url in metadata.keys()],
|
|
320
|
-
]
|
|
321
|
-
)
|
|
322
|
-
|
|
323
|
-
return "\n".join(response_parts)
|
|
324
|
-
|
|
325
|
-
except Exception as e:
|
|
326
|
-
logger.error(f"Error in query_indexed_content: {e}")
|
|
327
|
-
return f"Error querying indexed content: {str(e)}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core → intentkit/core}/agent.py
RENAMED
|
File without changes
|
{core → intentkit/core}/api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|