intentkit 0.8.16.dev1__py3-none-any.whl → 0.8.17.dev2__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.

Files changed (274) hide show
  1. intentkit/__init__.py +1 -1
  2. intentkit/abstracts/agent.py +4 -5
  3. intentkit/abstracts/engine.py +5 -5
  4. intentkit/abstracts/graph.py +6 -5
  5. intentkit/abstracts/skill.py +5 -5
  6. intentkit/abstracts/twitter.py +4 -5
  7. intentkit/clients/cdp.py +19 -77
  8. intentkit/clients/twitter.py +26 -34
  9. intentkit/clients/web3.py +1 -3
  10. intentkit/config/config.py +4 -0
  11. intentkit/core/agent.py +15 -15
  12. intentkit/core/asset.py +1 -2
  13. intentkit/core/client.py +1 -1
  14. intentkit/core/credit.py +19 -20
  15. intentkit/core/engine.py +2 -4
  16. intentkit/core/node.py +2 -1
  17. intentkit/core/prompt.py +3 -4
  18. intentkit/core/scheduler.py +1 -1
  19. intentkit/core/statistics.py +6 -7
  20. intentkit/models/agent.py +125 -92
  21. intentkit/models/agent_data.py +62 -36
  22. intentkit/models/app_setting.py +6 -6
  23. intentkit/models/chat.py +27 -24
  24. intentkit/models/conversation.py +8 -8
  25. intentkit/models/credit.py +62 -64
  26. intentkit/models/db.py +8 -7
  27. intentkit/models/db_mig.py +2 -2
  28. intentkit/models/llm.py +12 -14
  29. intentkit/models/redis.py +2 -3
  30. intentkit/models/skill.py +25 -27
  31. intentkit/models/skills.csv +29 -28
  32. intentkit/models/user.py +21 -22
  33. intentkit/skills/acolyt/ask.py +3 -4
  34. intentkit/skills/acolyt/base.py +1 -3
  35. intentkit/skills/aixbt/base.py +1 -3
  36. intentkit/skills/aixbt/projects.py +13 -13
  37. intentkit/skills/allora/base.py +1 -3
  38. intentkit/skills/allora/price.py +2 -3
  39. intentkit/skills/base.py +15 -22
  40. intentkit/skills/basename/__init__.py +3 -5
  41. intentkit/skills/carv/__init__.py +7 -8
  42. intentkit/skills/carv/base.py +6 -6
  43. intentkit/skills/carv/fetch_news.py +3 -3
  44. intentkit/skills/carv/onchain_query.py +4 -4
  45. intentkit/skills/carv/token_info_and_price.py +5 -5
  46. intentkit/skills/casino/base.py +1 -3
  47. intentkit/skills/casino/deck_draw.py +1 -2
  48. intentkit/skills/casino/deck_shuffle.py +1 -2
  49. intentkit/skills/casino/dice_roll.py +1 -2
  50. intentkit/skills/cdp/__init__.py +3 -5
  51. intentkit/skills/cdp/base.py +1 -3
  52. intentkit/skills/chainlist/base.py +1 -3
  53. intentkit/skills/chainlist/chain_lookup.py +18 -18
  54. intentkit/skills/common/base.py +1 -3
  55. intentkit/skills/common/current_time.py +1 -2
  56. intentkit/skills/cookiefun/base.py +1 -2
  57. intentkit/skills/cookiefun/get_account_details.py +7 -7
  58. intentkit/skills/cookiefun/get_account_feed.py +19 -19
  59. intentkit/skills/cookiefun/get_account_smart_followers.py +7 -7
  60. intentkit/skills/cookiefun/get_sectors.py +3 -3
  61. intentkit/skills/cookiefun/search_accounts.py +9 -9
  62. intentkit/skills/cryptocompare/api.py +2 -3
  63. intentkit/skills/cryptocompare/base.py +6 -6
  64. intentkit/skills/cryptocompare/fetch_news.py +3 -4
  65. intentkit/skills/cryptocompare/fetch_price.py +5 -6
  66. intentkit/skills/cryptocompare/fetch_top_exchanges.py +3 -4
  67. intentkit/skills/cryptocompare/fetch_top_market_cap.py +3 -4
  68. intentkit/skills/cryptocompare/fetch_top_volume.py +3 -4
  69. intentkit/skills/cryptocompare/fetch_trading_signals.py +4 -5
  70. intentkit/skills/cryptopanic/__init__.py +4 -4
  71. intentkit/skills/cryptopanic/base.py +1 -3
  72. intentkit/skills/cryptopanic/fetch_crypto_news.py +3 -5
  73. intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +3 -3
  74. intentkit/skills/dapplooker/base.py +1 -3
  75. intentkit/skills/dapplooker/dapplooker_token_data.py +7 -7
  76. intentkit/skills/defillama/api.py +6 -9
  77. intentkit/skills/defillama/base.py +5 -6
  78. intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +6 -8
  79. intentkit/skills/defillama/coins/fetch_block.py +4 -6
  80. intentkit/skills/defillama/coins/fetch_current_prices.py +6 -8
  81. intentkit/skills/defillama/coins/fetch_first_price.py +5 -7
  82. intentkit/skills/defillama/coins/fetch_historical_prices.py +7 -9
  83. intentkit/skills/defillama/coins/fetch_price_chart.py +7 -9
  84. intentkit/skills/defillama/coins/fetch_price_percentage.py +5 -7
  85. intentkit/skills/defillama/config/chains.py +1 -3
  86. intentkit/skills/defillama/fees/fetch_fees_overview.py +22 -24
  87. intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +14 -16
  88. intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +6 -8
  89. intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +3 -5
  90. intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +5 -7
  91. intentkit/skills/defillama/tests/api_integration.test.py +1 -1
  92. intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +2 -4
  93. intentkit/skills/defillama/tvl/fetch_chains.py +7 -9
  94. intentkit/skills/defillama/tvl/fetch_historical_tvl.py +2 -4
  95. intentkit/skills/defillama/tvl/fetch_protocol.py +30 -36
  96. intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +1 -3
  97. intentkit/skills/defillama/tvl/fetch_protocols.py +35 -43
  98. intentkit/skills/defillama/volumes/fetch_dex_overview.py +40 -46
  99. intentkit/skills/defillama/volumes/fetch_dex_summary.py +33 -35
  100. intentkit/skills/defillama/volumes/fetch_options_overview.py +22 -26
  101. intentkit/skills/defillama/yields/fetch_pool_chart.py +8 -10
  102. intentkit/skills/defillama/yields/fetch_pools.py +24 -28
  103. intentkit/skills/dexscreener/__init__.py +2 -2
  104. intentkit/skills/dexscreener/base.py +3 -3
  105. intentkit/skills/dexscreener/get_pair_info.py +2 -2
  106. intentkit/skills/dexscreener/get_token_pairs.py +2 -2
  107. intentkit/skills/dexscreener/get_tokens_info.py +5 -5
  108. intentkit/skills/dexscreener/model/search_token_response.py +80 -82
  109. intentkit/skills/dexscreener/search_token.py +182 -182
  110. intentkit/skills/dexscreener/utils.py +15 -14
  111. intentkit/skills/dune_analytics/__init__.py +4 -4
  112. intentkit/skills/dune_analytics/base.py +1 -3
  113. intentkit/skills/dune_analytics/fetch_kol_buys.py +4 -4
  114. intentkit/skills/dune_analytics/fetch_nation_metrics.py +5 -5
  115. intentkit/skills/elfa/base.py +1 -3
  116. intentkit/skills/elfa/mention.py +19 -21
  117. intentkit/skills/elfa/stats.py +4 -4
  118. intentkit/skills/elfa/tokens.py +12 -12
  119. intentkit/skills/elfa/utils.py +25 -27
  120. intentkit/skills/enso/__init__.py +2 -2
  121. intentkit/skills/enso/base.py +5 -8
  122. intentkit/skills/enso/best_yield.py +4 -6
  123. intentkit/skills/enso/networks.py +1 -2
  124. intentkit/skills/enso/prices.py +1 -3
  125. intentkit/skills/enso/route.py +1 -3
  126. intentkit/skills/enso/tokens.py +1 -3
  127. intentkit/skills/enso/wallet.py +5 -5
  128. intentkit/skills/erc20/__init__.py +4 -6
  129. intentkit/skills/erc721/__init__.py +4 -6
  130. intentkit/skills/firecrawl/base.py +1 -3
  131. intentkit/skills/firecrawl/clear.py +1 -2
  132. intentkit/skills/firecrawl/crawl.py +9 -10
  133. intentkit/skills/firecrawl/query.py +1 -2
  134. intentkit/skills/firecrawl/scrape.py +7 -8
  135. intentkit/skills/firecrawl/utils.py +13 -13
  136. intentkit/skills/github/base.py +1 -3
  137. intentkit/skills/github/github_search.py +1 -2
  138. intentkit/skills/heurist/base.py +1 -3
  139. intentkit/skills/heurist/image_generation_animagine_xl.py +7 -8
  140. intentkit/skills/heurist/image_generation_arthemy_comics.py +7 -8
  141. intentkit/skills/heurist/image_generation_arthemy_real.py +7 -8
  142. intentkit/skills/heurist/image_generation_braindance.py +7 -8
  143. intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +7 -8
  144. intentkit/skills/heurist/image_generation_flux_1_dev.py +7 -8
  145. intentkit/skills/heurist/image_generation_sdxl.py +7 -8
  146. intentkit/skills/http/base.py +1 -3
  147. intentkit/skills/http/get.py +7 -7
  148. intentkit/skills/http/post.py +9 -9
  149. intentkit/skills/http/put.py +9 -9
  150. intentkit/skills/lifi/__init__.py +4 -4
  151. intentkit/skills/lifi/base.py +1 -3
  152. intentkit/skills/lifi/token_execute.py +13 -13
  153. intentkit/skills/lifi/token_quote.py +6 -6
  154. intentkit/skills/lifi/utils.py +16 -16
  155. intentkit/skills/moralis/__init__.py +3 -3
  156. intentkit/skills/moralis/api.py +6 -7
  157. intentkit/skills/moralis/base.py +2 -4
  158. intentkit/skills/moralis/fetch_chain_portfolio.py +10 -11
  159. intentkit/skills/moralis/fetch_nft_portfolio.py +22 -22
  160. intentkit/skills/moralis/fetch_solana_portfolio.py +11 -12
  161. intentkit/skills/moralis/fetch_wallet_portfolio.py +8 -9
  162. intentkit/skills/morpho/__init__.py +4 -6
  163. intentkit/skills/nation/__init__.py +2 -2
  164. intentkit/skills/nation/base.py +1 -3
  165. intentkit/skills/nation/nft_check.py +3 -4
  166. intentkit/skills/onchain.py +2 -6
  167. intentkit/skills/openai/base.py +1 -3
  168. intentkit/skills/openai/dalle_image_generation.py +1 -3
  169. intentkit/skills/openai/gpt_image_generation.py +2 -3
  170. intentkit/skills/openai/gpt_image_to_image.py +2 -3
  171. intentkit/skills/openai/image_to_text.py +1 -2
  172. intentkit/skills/portfolio/base.py +6 -6
  173. intentkit/skills/portfolio/token_balances.py +21 -21
  174. intentkit/skills/portfolio/wallet_approvals.py +7 -7
  175. intentkit/skills/portfolio/wallet_defi_positions.py +3 -3
  176. intentkit/skills/portfolio/wallet_history.py +21 -21
  177. intentkit/skills/portfolio/wallet_net_worth.py +13 -13
  178. intentkit/skills/portfolio/wallet_nfts.py +19 -19
  179. intentkit/skills/portfolio/wallet_profitability.py +7 -7
  180. intentkit/skills/portfolio/wallet_profitability_summary.py +5 -5
  181. intentkit/skills/portfolio/wallet_stats.py +3 -3
  182. intentkit/skills/portfolio/wallet_swaps.py +19 -19
  183. intentkit/skills/pyth/__init__.py +3 -5
  184. intentkit/skills/slack/base.py +2 -4
  185. intentkit/skills/slack/get_channel.py +8 -8
  186. intentkit/skills/slack/get_message.py +9 -9
  187. intentkit/skills/slack/schedule_message.py +5 -5
  188. intentkit/skills/slack/send_message.py +3 -5
  189. intentkit/skills/supabase/base.py +1 -3
  190. intentkit/skills/supabase/delete_data.py +4 -4
  191. intentkit/skills/supabase/fetch_data.py +12 -12
  192. intentkit/skills/supabase/insert_data.py +4 -4
  193. intentkit/skills/supabase/invoke_function.py +6 -6
  194. intentkit/skills/supabase/update_data.py +6 -6
  195. intentkit/skills/supabase/upsert_data.py +4 -4
  196. intentkit/skills/superfluid/__init__.py +4 -6
  197. intentkit/skills/system/add_autonomous_task.py +8 -10
  198. intentkit/skills/system/edit_autonomous_task.py +12 -14
  199. intentkit/skills/system/list_autonomous_tasks.py +1 -3
  200. intentkit/skills/tavily/base.py +1 -3
  201. intentkit/skills/tavily/tavily_extract.py +1 -2
  202. intentkit/skills/tavily/tavily_search.py +1 -3
  203. intentkit/skills/token/base.py +5 -5
  204. intentkit/skills/token/erc20_transfers.py +19 -19
  205. intentkit/skills/token/token_analytics.py +3 -3
  206. intentkit/skills/token/token_price.py +13 -13
  207. intentkit/skills/token/token_search.py +9 -9
  208. intentkit/skills/twitter/base.py +3 -4
  209. intentkit/skills/twitter/follow_user.py +1 -2
  210. intentkit/skills/twitter/get_mentions.py +3 -4
  211. intentkit/skills/twitter/get_timeline.py +1 -2
  212. intentkit/skills/twitter/get_user_by_username.py +1 -2
  213. intentkit/skills/twitter/get_user_tweets.py +2 -3
  214. intentkit/skills/twitter/like_tweet.py +1 -2
  215. intentkit/skills/twitter/post_tweet.py +3 -4
  216. intentkit/skills/twitter/reply_tweet.py +3 -4
  217. intentkit/skills/twitter/retweet.py +1 -2
  218. intentkit/skills/twitter/search_tweets.py +1 -2
  219. intentkit/skills/unrealspeech/base.py +1 -3
  220. intentkit/skills/unrealspeech/text_to_speech.py +8 -8
  221. intentkit/skills/venice_audio/__init__.py +8 -9
  222. intentkit/skills/venice_audio/base.py +3 -4
  223. intentkit/skills/venice_audio/input.py +41 -41
  224. intentkit/skills/venice_audio/venice_audio.py +6 -6
  225. intentkit/skills/venice_image/__init__.py +5 -5
  226. intentkit/skills/venice_image/api.py +138 -138
  227. intentkit/skills/venice_image/base.py +3 -3
  228. intentkit/skills/venice_image/config.py +33 -35
  229. intentkit/skills/venice_image/image_enhance/image_enhance.py +2 -3
  230. intentkit/skills/venice_image/image_enhance/image_enhance_base.py +21 -23
  231. intentkit/skills/venice_image/image_enhance/image_enhance_input.py +38 -40
  232. intentkit/skills/venice_image/image_generation/image_generation_base.py +9 -9
  233. intentkit/skills/venice_image/image_generation/image_generation_fluently_xl.py +26 -26
  234. intentkit/skills/venice_image/image_generation/image_generation_flux_dev.py +27 -27
  235. intentkit/skills/venice_image/image_generation/image_generation_flux_dev_uncensored.py +26 -26
  236. intentkit/skills/venice_image/image_generation/image_generation_input.py +158 -158
  237. intentkit/skills/venice_image/image_generation/image_generation_lustify_sdxl.py +26 -26
  238. intentkit/skills/venice_image/image_generation/image_generation_pony_realism.py +26 -26
  239. intentkit/skills/venice_image/image_generation/image_generation_stable_diffusion_3_5.py +28 -28
  240. intentkit/skills/venice_image/image_generation/image_generation_venice_sd35.py +28 -28
  241. intentkit/skills/venice_image/image_upscale/image_upscale.py +3 -3
  242. intentkit/skills/venice_image/image_upscale/image_upscale_base.py +21 -23
  243. intentkit/skills/venice_image/image_upscale/image_upscale_input.py +22 -22
  244. intentkit/skills/venice_image/image_vision/image_vision.py +2 -2
  245. intentkit/skills/venice_image/image_vision/image_vision_base.py +17 -17
  246. intentkit/skills/venice_image/image_vision/image_vision_input.py +9 -9
  247. intentkit/skills/venice_image/utils.py +77 -78
  248. intentkit/skills/web_scraper/base.py +1 -3
  249. intentkit/skills/web_scraper/document_indexer.py +1 -2
  250. intentkit/skills/web_scraper/scrape_and_index.py +4 -5
  251. intentkit/skills/web_scraper/utils.py +25 -26
  252. intentkit/skills/web_scraper/website_indexer.py +10 -11
  253. intentkit/skills/weth/__init__.py +4 -6
  254. intentkit/skills/wow/__init__.py +4 -6
  255. intentkit/skills/x402/__init__.py +11 -3
  256. intentkit/skills/x402/ask_agent.py +12 -78
  257. intentkit/skills/x402/base.py +90 -0
  258. intentkit/skills/x402/http_request.py +117 -0
  259. intentkit/skills/x402/schema.json +15 -10
  260. intentkit/skills/xmtp/base.py +3 -3
  261. intentkit/skills/xmtp/price.py +2 -2
  262. intentkit/skills/xmtp/swap.py +2 -4
  263. intentkit/skills/xmtp/transfer.py +4 -6
  264. intentkit/utils/error.py +2 -2
  265. intentkit/utils/logging.py +2 -4
  266. intentkit/utils/s3.py +8 -9
  267. intentkit/utils/schema.py +5 -5
  268. intentkit/utils/slack_alert.py +7 -8
  269. {intentkit-0.8.16.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/METADATA +3 -4
  270. intentkit-0.8.17.dev2.dist-info/RECORD +464 -0
  271. intentkit/models/generator.py +0 -347
  272. intentkit-0.8.16.dev1.dist-info/RECORD +0 -464
  273. {intentkit-0.8.16.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/WHEEL +0 -0
  274. {intentkit-0.8.16.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/licenses/LICENSE +0 -0
@@ -1,9 +1,10 @@
1
1
  """Basename AgentKit skills."""
2
2
 
3
- from typing import TYPE_CHECKING, Optional, TypedDict
3
+ from typing import TypedDict
4
4
 
5
5
  from coinbase_agentkit import basename_action_provider
6
6
 
7
+ from intentkit.models.agent import Agent
7
8
  from intentkit.skills.base import (
8
9
  SkillConfig,
9
10
  SkillState,
@@ -12,9 +13,6 @@ from intentkit.skills.base import (
12
13
  )
13
14
  from intentkit.skills.basename.base import BasenameBaseTool
14
15
 
15
- if TYPE_CHECKING:
16
- from intentkit.models.agent import Agent
17
-
18
16
 
19
17
  class SkillStates(TypedDict):
20
18
  BasenameActionProvider_register_basename: SkillState
@@ -30,7 +28,7 @@ async def get_skills(
30
28
  config: "Config",
31
29
  is_private: bool,
32
30
  agent_id: str,
33
- agent: Optional["Agent"] = None,
31
+ agent: Agent | None = None,
34
32
  **_,
35
33
  ) -> list[BasenameBaseTool]:
36
34
  """Get all Basename skills."""
@@ -1,5 +1,5 @@
1
1
  import logging
2
- from typing import List, Literal, Optional, TypedDict
2
+ from typing import Literal, TypedDict
3
3
 
4
4
  from intentkit.skills.base import SkillConfig, SkillState
5
5
  from intentkit.skills.carv.base import CarvBaseTool
@@ -9,7 +9,6 @@ from intentkit.skills.carv.token_info_and_price import TokenInfoAndPriceTool
9
9
 
10
10
  logger = logging.getLogger(__name__)
11
11
 
12
-
13
12
  _cache: dict[str, CarvBaseTool] = {}
14
13
 
15
14
  _SKILL_NAME_TO_CLASS_MAP: dict[str, type[CarvBaseTool]] = {
@@ -28,14 +27,14 @@ class SkillStates(TypedDict):
28
27
  class Config(SkillConfig):
29
28
  enabled: bool
30
29
  states: SkillStates # type: ignore
31
- api_key_provider: Optional[Literal["agent_owner", "platform"]]
30
+ api_key_provider: Literal["agent_owner", "platform"] | None
32
31
 
33
32
  # conditionally required
34
- api_key: Optional[str]
33
+ api_key: str | None
35
34
 
36
35
  # optional
37
- rate_limit_number: Optional[int]
38
- rate_limit_minutes: Optional[int]
36
+ rate_limit_number: int | None
37
+ rate_limit_minutes: int | None
39
38
 
40
39
 
41
40
  async def get_skills(
@@ -57,7 +56,7 @@ async def get_skills(
57
56
  if not config.get("enabled", False):
58
57
  return []
59
58
 
60
- available_skills: List[CarvBaseTool] = []
59
+ available_skills: list[CarvBaseTool] = []
61
60
  skill_states = config.get("states", {})
62
61
 
63
62
  # Iterate through all known skills defined in the map
@@ -81,7 +80,7 @@ async def get_skills(
81
80
 
82
81
  def get_carv_skill(
83
82
  name: str,
84
- ) -> Optional[CarvBaseTool]:
83
+ ) -> CarvBaseTool | None:
85
84
  """
86
85
  Factory function to retrieve a cached CARV skill instance by name.
87
86
 
@@ -1,5 +1,5 @@
1
1
  import logging
2
- from typing import Any, Dict, Optional, Tuple, Type
2
+ from typing import Any
3
3
 
4
4
  import httpx # Ensure httpx is installed: pip install httpx
5
5
  from langchain_core.tools.base import ToolException
@@ -18,7 +18,7 @@ class CarvBaseTool(IntentKitSkill):
18
18
 
19
19
  name: str = Field(description="Tool name") # type: ignore
20
20
  description: str = Field(description="Tool description")
21
- args_schema: Type[BaseModel] # type: ignore
21
+ args_schema: type[BaseModel] # type: ignore
22
22
 
23
23
  @property
24
24
  def category(self) -> str:
@@ -39,7 +39,7 @@ class CarvBaseTool(IntentKitSkill):
39
39
  skill_config = context.agent.skill_config(self.category)
40
40
  api_key_provider = skill_config.get("api_key_provider")
41
41
  if api_key_provider == "agent_owner":
42
- agent_api_key: Optional[str] = skill_config.get("api_key")
42
+ agent_api_key: str | None = skill_config.get("api_key")
43
43
  if agent_api_key:
44
44
  logger.debug(
45
45
  f"Using agent-specific CARV API key for skill {self.name} in category {self.category}"
@@ -102,9 +102,9 @@ class CarvBaseTool(IntentKitSkill):
102
102
  context,
103
103
  endpoint: str,
104
104
  method: str = "GET",
105
- params: Optional[Dict[str, Any]] = None,
106
- payload: Optional[Dict[str, Any]] = None,
107
- ) -> Tuple[Optional[Dict[str, Any]], Optional[Dict[str, Any]]]:
105
+ params: dict[str, Any] | None = None,
106
+ payload: dict[str, Any] | None = None,
107
+ ) -> tuple[dict[str, Any] | None, dict[str, Any] | None]:
108
108
  """
109
109
  Makes a call to the CARV API and returns a tuple of (success, error).
110
110
 
@@ -1,5 +1,5 @@
1
1
  import logging
2
- from typing import Any, Dict, Type
2
+ from typing import Any
3
3
 
4
4
  from pydantic import BaseModel
5
5
 
@@ -29,12 +29,12 @@ class FetchNewsTool(CarvBaseTool):
29
29
  "Fetches the latest news articles from the CARV API. "
30
30
  "Returns a list of news items, each with a title, URL, and a short summary (card_text)."
31
31
  )
32
- args_schema: Type[BaseModel] = CarvNewsInput
32
+ args_schema: type[BaseModel] = CarvNewsInput
33
33
 
34
34
  async def _arun(
35
35
  self, # type: ignore
36
36
  **kwargs: Any,
37
- ) -> Dict[str, Any]:
37
+ ) -> dict[str, Any]:
38
38
  """
39
39
  Fetches news from the CARV API and returns the response.
40
40
  The expected successful response structure is a dictionary containing an "infos" key,
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
  from decimal import Decimal, InvalidOperation
3
- from typing import Any, Dict, Literal, Type
3
+ from typing import Any, Literal
4
4
 
5
5
  from pydantic import BaseModel, Field
6
6
 
@@ -58,14 +58,14 @@ class OnchainQueryTool(CarvBaseTool):
58
58
  "- ETH values are denominated in 18 decimals—consider 10^18 when interpreting amounts.\n"
59
59
  "- Never fabricate or infer data beyond what the tool provides."
60
60
  )
61
- args_schema: Type[BaseModel] = CarvInput
61
+ args_schema: type[BaseModel] = CarvInput
62
62
 
63
63
  async def _arun(
64
64
  self,
65
65
  question: str,
66
66
  chain: str, # type: ignore
67
67
  **kwargs: Any,
68
- ) -> Dict[str, Any]:
68
+ ) -> dict[str, Any]:
69
69
  """
70
70
  Queries the CARV SQL Query API and returns the response.
71
71
  """
@@ -104,7 +104,7 @@ class OnchainQueryTool(CarvBaseTool):
104
104
  }
105
105
 
106
106
 
107
- def _normalize_unit(response_data: Dict[str, Any], chain: str) -> None:
107
+ def _normalize_unit(response_data: dict[str, Any], chain: str) -> None:
108
108
  """
109
109
  Normalizes the 'value' field in on-chain response data to a human-readable format.
110
110
  Adds the corresponding token ticker after the value.
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
  import re
3
- from typing import Any, Dict, Optional, Type
3
+ from typing import Any
4
4
 
5
5
  from pydantic import BaseModel, Field
6
6
 
@@ -16,7 +16,7 @@ class TokenInfoAndPriceInput(BaseModel):
16
16
  token_name: str = Field(
17
17
  description="The token name (e.g ethereum, bitcoin, solana, ripple)"
18
18
  )
19
- amount: Optional[float] = Field(
19
+ amount: float | None = Field(
20
20
  description="(optional) amount of token, fill this if user asking for how much x amount of specific token worth"
21
21
  )
22
22
 
@@ -38,15 +38,15 @@ class TokenInfoAndPriceTool(CarvBaseTool):
38
38
  "Useful for understanding a token's identity, ecosystem, and market value"
39
39
  "Use this tool when you need comprehensive token data and live pricing from CARV."
40
40
  )
41
- args_schema: Type[BaseModel] = TokenInfoAndPriceInput
41
+ args_schema: type[BaseModel] = TokenInfoAndPriceInput
42
42
 
43
43
  async def _arun(
44
44
  self,
45
45
  ticker: str,
46
46
  token_name: str,
47
- amount: Optional[float] = 1, # type: ignore
47
+ amount: float | None = 1, # type: ignore
48
48
  **kwargs: Any,
49
- ) -> Dict[str, Any]:
49
+ ) -> dict[str, Any]:
50
50
  if not ticker:
51
51
  return {
52
52
  "error": True,
@@ -1,7 +1,5 @@
1
1
  """Base class for Casino tools."""
2
2
 
3
- from typing import Type
4
-
5
3
  from pydantic import BaseModel, Field
6
4
 
7
5
  from intentkit.skills.base import IntentKitSkill
@@ -12,7 +10,7 @@ class CasinoBaseTool(IntentKitSkill):
12
10
 
13
11
  name: str = Field(description="The name of the tool")
14
12
  description: str = Field(description="A description of what the tool does")
15
- args_schema: Type[BaseModel]
13
+ args_schema: type[BaseModel]
16
14
 
17
15
  @property
18
16
  def category(self) -> str:
@@ -1,7 +1,6 @@
1
1
  """Card drawing skill using Deck of Cards API."""
2
2
 
3
3
  import logging
4
- from typing import Type
5
4
 
6
5
  try:
7
6
  import httpx
@@ -49,7 +48,7 @@ class CasinoDeckDraw(CasinoBaseTool):
49
48
 
50
49
  name: str = NAME
51
50
  description: str = PROMPT
52
- args_schema: Type[BaseModel] = CasinoDeckDrawInput
51
+ args_schema: type[BaseModel] = CasinoDeckDrawInput
53
52
 
54
53
  async def _arun(self, count: int = 1, **kwargs) -> dict:
55
54
  try:
@@ -1,7 +1,6 @@
1
1
  """Deck shuffling skill using Deck of Cards API."""
2
2
 
3
3
  import logging
4
- from typing import Type
5
4
 
6
5
  try:
7
6
  import httpx
@@ -53,7 +52,7 @@ class CasinoDeckShuffle(CasinoBaseTool):
53
52
 
54
53
  name: str = NAME
55
54
  description: str = PROMPT
56
- args_schema: Type[BaseModel] = CasinoDeckShuffleInput
55
+ args_schema: type[BaseModel] = CasinoDeckShuffleInput
57
56
 
58
57
  async def _arun(
59
58
  self, deck_count: int = 1, jokers_enabled: bool = False, **kwargs
@@ -1,7 +1,6 @@
1
1
  """Quantum dice rolling skill using QRandom API."""
2
2
 
3
3
  import logging
4
- from typing import Type
5
4
 
6
5
  try:
7
6
  import httpx
@@ -48,7 +47,7 @@ class CasinoDiceRoll(CasinoBaseTool):
48
47
 
49
48
  name: str = NAME
50
49
  description: str = PROMPT
51
- args_schema: Type[BaseModel] = CasinoDiceRollInput
50
+ args_schema: type[BaseModel] = CasinoDiceRollInput
52
51
 
53
52
  async def _arun(self, dice_count: int = 1, **kwargs) -> dict:
54
53
  try:
@@ -1,6 +1,6 @@
1
1
  """CDP wallet interaction skills."""
2
2
 
3
- from typing import TYPE_CHECKING, Optional, TypedDict
3
+ from typing import TypedDict
4
4
 
5
5
  from coinbase_agentkit import (
6
6
  cdp_api_action_provider,
@@ -8,6 +8,7 @@ from coinbase_agentkit import (
8
8
  wallet_action_provider,
9
9
  )
10
10
 
11
+ from intentkit.models.agent import Agent
11
12
  from intentkit.skills.base import (
12
13
  SkillConfig,
13
14
  SkillState,
@@ -16,9 +17,6 @@ from intentkit.skills.base import (
16
17
  )
17
18
  from intentkit.skills.cdp.base import CDPBaseTool
18
19
 
19
- if TYPE_CHECKING:
20
- from intentkit.models.agent import Agent
21
-
22
20
 
23
21
  class SkillStates(TypedDict):
24
22
  WalletActionProvider_get_balance: SkillState
@@ -40,7 +38,7 @@ async def get_skills(
40
38
  config: "Config",
41
39
  is_private: bool,
42
40
  agent_id: str,
43
- agent: Optional["Agent"] = None,
41
+ agent: Agent | None = None,
44
42
  **_,
45
43
  ) -> list[CDPBaseTool]:
46
44
  """Get all CDP skills.
@@ -1,5 +1,3 @@
1
- from typing import Type
2
-
3
1
  from pydantic import BaseModel, Field
4
2
 
5
3
  from intentkit.skills.base import IntentKitSkill
@@ -10,7 +8,7 @@ class CDPBaseTool(IntentKitSkill):
10
8
 
11
9
  name: str = Field(description="The name of the tool")
12
10
  description: str = Field(description="A description of what the tool does")
13
- args_schema: Type[BaseModel]
11
+ args_schema: type[BaseModel]
14
12
 
15
13
  @property
16
14
  def category(self) -> str:
@@ -1,5 +1,3 @@
1
- from typing import Type
2
-
3
1
  from pydantic import BaseModel, Field
4
2
 
5
3
  from intentkit.skills.base import IntentKitSkill
@@ -10,7 +8,7 @@ class ChainlistBaseTool(IntentKitSkill):
10
8
 
11
9
  name: str = Field(description="The name of the tool")
12
10
  description: str = Field(description="A description of what the tool does")
13
- args_schema: Type[BaseModel]
11
+ args_schema: type[BaseModel]
14
12
 
15
13
  @property
16
14
  def category(self) -> str:
@@ -1,5 +1,5 @@
1
1
  import logging
2
- from typing import Any, Dict, List, Optional, Type
2
+ from typing import Any
3
3
 
4
4
  import httpx
5
5
  from pydantic import BaseModel, Field
@@ -12,19 +12,19 @@ logger = logging.getLogger(__name__)
12
12
  class ChainLookupInput(BaseModel):
13
13
  """Input for ChainLookup tool."""
14
14
 
15
- search_term: Optional[str] = Field(
15
+ search_term: str | None = Field(
16
16
  description="Term to search for (chain name, symbol, or chain ID)",
17
17
  default=None,
18
18
  )
19
- chain_id: Optional[int] = Field(
19
+ chain_id: int | None = Field(
20
20
  description="Specific chain ID to look up",
21
21
  default=None,
22
22
  )
23
- no_tracking: Optional[bool] = Field(
23
+ no_tracking: bool | None = Field(
24
24
  description="Whether to return only RPC endpoints with no tracking",
25
25
  default=False,
26
26
  )
27
- limit: Optional[int] = Field(
27
+ limit: int | None = Field(
28
28
  description="Limit the number of results returned",
29
29
  default=5,
30
30
  )
@@ -38,7 +38,7 @@ class ChainLookup(ChainlistBaseTool):
38
38
  "Look up blockchain RPC endpoints and details by chain name, symbol, or chain ID.\n"
39
39
  "Returns information about blockchains including RPC endpoints, native currency, and explorers."
40
40
  )
41
- args_schema: Type[BaseModel] = ChainLookupInput
41
+ args_schema: type[BaseModel] = ChainLookupInput
42
42
 
43
43
  def _normalize_text(self, text: str) -> str:
44
44
  """Normalize text for searching (lowercase, remove spaces)."""
@@ -46,7 +46,7 @@ class ChainLookup(ChainlistBaseTool):
46
46
  return ""
47
47
  return text.lower().strip()
48
48
 
49
- async def _fetch_chains_data(self) -> List[Dict[str, Any]]:
49
+ async def _fetch_chains_data(self) -> list[dict[str, Any]]:
50
50
  """Fetch chains data from Chainlist API."""
51
51
  chainlist_api_url = "https://chainlist.org/rpcs.json"
52
52
 
@@ -57,12 +57,12 @@ class ChainLookup(ChainlistBaseTool):
57
57
 
58
58
  def _filter_chains(
59
59
  self,
60
- chains: List[Dict[str, Any]],
61
- search_term: Optional[str] = None,
62
- chain_id: Optional[int] = None,
60
+ chains: list[dict[str, Any]],
61
+ search_term: str | None = None,
62
+ chain_id: int | None = None,
63
63
  no_tracking: bool = False,
64
64
  limit: int = 5,
65
- ) -> List[Dict[str, Any]]:
65
+ ) -> list[dict[str, Any]]:
66
66
  """Filter chains based on search criteria."""
67
67
  filtered_chains = chains
68
68
 
@@ -118,7 +118,7 @@ class ChainLookup(ChainlistBaseTool):
118
118
 
119
119
  return filtered_chains
120
120
 
121
- def _format_chain(self, chain: Dict[str, Any]) -> Dict[str, Any]:
121
+ def _format_chain(self, chain: dict[str, Any]) -> dict[str, Any]:
122
122
  """Format a chain entry for response."""
123
123
  # Format RPC endpoints
124
124
  formatted_rpcs = []
@@ -155,13 +155,13 @@ class ChainLookup(ChainlistBaseTool):
155
155
 
156
156
  async def _arun(
157
157
  self,
158
- search_term: Optional[str] = None,
159
- chain_id: Optional[int] = None,
160
- no_tracking: Optional[bool] = False,
161
- limit: Optional[int] = 5,
162
- config: Optional[Any] = None,
158
+ search_term: str | None = None,
159
+ chain_id: int | None = None,
160
+ no_tracking: bool | None = False,
161
+ limit: int | None = 5,
162
+ config: Any | None = None,
163
163
  **kwargs,
164
- ) -> Dict:
164
+ ) -> dict:
165
165
  """Lookup blockchain RPC endpoints from Chainlist."""
166
166
  if not search_term and not chain_id:
167
167
  return {
@@ -1,5 +1,3 @@
1
- from typing import Type
2
-
3
1
  from pydantic import BaseModel, Field
4
2
 
5
3
  from intentkit.skills.base import IntentKitSkill
@@ -10,7 +8,7 @@ class CommonBaseTool(IntentKitSkill):
10
8
 
11
9
  name: str = Field(description="The name of the tool")
12
10
  description: str = Field(description="A description of what the tool does")
13
- args_schema: Type[BaseModel]
11
+ args_schema: type[BaseModel]
14
12
 
15
13
  @property
16
14
  def category(self) -> str:
@@ -1,6 +1,5 @@
1
1
  import logging
2
2
  from datetime import datetime
3
- from typing import Type
4
3
 
5
4
  import pytz
6
5
  from pydantic import BaseModel, Field
@@ -36,7 +35,7 @@ class CurrentTime(CommonBaseTool):
36
35
  "Get the current time, converted to a specified timezone.\n"
37
36
  "You must call this tool whenever the user asks for the time."
38
37
  )
39
- args_schema: Type[BaseModel] = CurrentTimeInput
38
+ args_schema: type[BaseModel] = CurrentTimeInput
40
39
 
41
40
  async def _arun(self, timezone: str, **kwargs) -> str:
42
41
  """Implementation of the tool to get the current time.
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Type
3
2
 
4
3
  from langchain_core.tools.base import ToolException
5
4
  from pydantic import BaseModel, Field
@@ -14,7 +13,7 @@ class CookieFunBaseTool(IntentKitSkill):
14
13
 
15
14
  name: str = Field(description="The name of the tool")
16
15
  description: str = Field(description="A description of what the tool does")
17
- args_schema: Type[BaseModel]
16
+ args_schema: type[BaseModel]
18
17
 
19
18
  @property
20
19
  def category(self) -> str:
@@ -1,4 +1,4 @@
1
- from typing import Any, Dict, Optional, Type, Union
1
+ from typing import Any
2
2
 
3
3
  import httpx
4
4
  from pydantic import BaseModel, Field
@@ -10,12 +10,12 @@ from intentkit.skills.cookiefun.constants import DEFAULT_HEADERS, ENDPOINTS
10
10
  class GetAccountDetailsInput(BaseModel):
11
11
  """Input for GetAccountDetails tool."""
12
12
 
13
- username: Optional[str] = Field(
13
+ username: str | None = Field(
14
14
  default=None,
15
15
  description="Twitter username (either username or userId is required)",
16
16
  )
17
17
 
18
- userId: Optional[str] = Field(
18
+ userId: str | None = Field(
19
19
  default=None,
20
20
  description="Twitter user ID (either username or userId is required)",
21
21
  )
@@ -26,14 +26,14 @@ class GetAccountDetails(CookieFunBaseTool):
26
26
 
27
27
  name: str = "cookiefun_get_account_details"
28
28
  description: str = "Retrieves detailed information about a Twitter account including followers, following, posts, metrics, and engagement data."
29
- args_schema: Type[BaseModel] = GetAccountDetailsInput
29
+ args_schema: type[BaseModel] = GetAccountDetailsInput
30
30
 
31
31
  async def _arun(
32
32
  self,
33
- username: Optional[str] = None,
34
- userId: Optional[str] = None,
33
+ username: str | None = None,
34
+ userId: str | None = None,
35
35
  **kwargs,
36
- ) -> Union[Dict[str, Any], str]:
36
+ ) -> dict[str, Any] | str:
37
37
  """
38
38
  Get detailed information about a Twitter account.
39
39
 
@@ -1,5 +1,5 @@
1
1
  from enum import IntEnum
2
- from typing import Any, Dict, List, Optional, Type, Union
2
+ from typing import Any
3
3
 
4
4
  import httpx
5
5
  from pydantic import BaseModel, Field
@@ -33,42 +33,42 @@ class SortOrder(IntEnum):
33
33
  class GetAccountFeedInput(BaseModel):
34
34
  """Input for GetAccountFeed tool."""
35
35
 
36
- username: Optional[str] = Field(
36
+ username: str | None = Field(
37
37
  default=None,
38
38
  description="Twitter username (either username or userId is required)",
39
39
  )
40
40
 
41
- userId: Optional[str] = Field(
41
+ userId: str | None = Field(
42
42
  default=None,
43
43
  description="Twitter user ID (either username or userId is required)",
44
44
  )
45
45
 
46
- startDate: Optional[str] = Field(
46
+ startDate: str | None = Field(
47
47
  default=None,
48
48
  description="Start date for filtering in format dd/mm/yyyy (default: 30 days ago)",
49
49
  )
50
50
 
51
- endDate: Optional[str] = Field(
51
+ endDate: str | None = Field(
52
52
  default=None,
53
53
  description="End date for filtering in format dd/mm/yyyy (default: now)",
54
54
  )
55
55
 
56
- type: Optional[int] = Field(
56
+ type: int | None = Field(
57
57
  default=None,
58
58
  description="Type of tweets to filter: 0 for Original, 1 for Reply, 2 for Quote (leave empty for all types)",
59
59
  )
60
60
 
61
- hasMedia: Optional[bool] = Field(
61
+ hasMedia: bool | None = Field(
62
62
  default=None,
63
63
  description="Filter to only include tweets with media if true",
64
64
  )
65
65
 
66
- sortBy: Optional[int] = Field(
66
+ sortBy: int | None = Field(
67
67
  default=None,
68
68
  description="Sort by: 0 for CreatedDate, 1 for Impressions",
69
69
  )
70
70
 
71
- sortOrder: Optional[int] = Field(
71
+ sortOrder: int | None = Field(
72
72
  default=None,
73
73
  description="Sort order: 0 for Ascending, 1 for Descending",
74
74
  )
@@ -79,20 +79,20 @@ class GetAccountFeed(CookieFunBaseTool):
79
79
 
80
80
  name: str = "cookiefun_get_account_feed"
81
81
  description: str = "Retrieves a list of tweets for a specific Twitter account with various filtering options."
82
- args_schema: Type[BaseModel] = GetAccountFeedInput
82
+ args_schema: type[BaseModel] = GetAccountFeedInput
83
83
 
84
84
  async def _arun(
85
85
  self,
86
- username: Optional[str] = None,
87
- userId: Optional[str] = None,
88
- startDate: Optional[str] = None,
89
- endDate: Optional[str] = None,
90
- type: Optional[int] = None,
91
- hasMedia: Optional[bool] = None,
92
- sortBy: Optional[int] = None,
93
- sortOrder: Optional[int] = None,
86
+ username: str | None = None,
87
+ userId: str | None = None,
88
+ startDate: str | None = None,
89
+ endDate: str | None = None,
90
+ type: int | None = None,
91
+ hasMedia: bool | None = None,
92
+ sortBy: int | None = None,
93
+ sortOrder: int | None = None,
94
94
  **kwargs,
95
- ) -> Union[List[Dict[str, Any]], str]:
95
+ ) -> list[dict[str, Any]] | str:
96
96
  """
97
97
  Get the feed (tweets) of a Twitter account.
98
98
 
@@ -1,4 +1,4 @@
1
- from typing import Any, Dict, List, Optional, Type, Union
1
+ from typing import Any
2
2
 
3
3
  import httpx
4
4
  from pydantic import BaseModel, Field
@@ -10,12 +10,12 @@ from intentkit.skills.cookiefun.constants import DEFAULT_HEADERS, ENDPOINTS
10
10
  class GetAccountSmartFollowersInput(BaseModel):
11
11
  """Input for GetAccountSmartFollowers tool."""
12
12
 
13
- username: Optional[str] = Field(
13
+ username: str | None = Field(
14
14
  default=None,
15
15
  description="Twitter username (either username or userId is required)",
16
16
  )
17
17
 
18
- userId: Optional[str] = Field(
18
+ userId: str | None = Field(
19
19
  default=None,
20
20
  description="Twitter user ID (either username or userId is required)",
21
21
  )
@@ -26,14 +26,14 @@ class GetAccountSmartFollowers(CookieFunBaseTool):
26
26
 
27
27
  name: str = "cookiefun_get_account_smart_followers"
28
28
  description: str = "Returns a list of top smart followers for a specific Twitter account, with detailed metrics about these followers."
29
- args_schema: Type[BaseModel] = GetAccountSmartFollowersInput
29
+ args_schema: type[BaseModel] = GetAccountSmartFollowersInput
30
30
 
31
31
  async def _arun(
32
32
  self,
33
- username: Optional[str] = None,
34
- userId: Optional[str] = None,
33
+ username: str | None = None,
34
+ userId: str | None = None,
35
35
  **kwargs,
36
- ) -> Union[List[Dict[str, Any]], str]:
36
+ ) -> list[dict[str, Any]] | str:
37
37
  """
38
38
  Get smart followers for a Twitter account.
39
39