intentkit 0.8.11__py3-none-any.whl → 0.8.12__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 +1 -1
- intentkit/abstracts/graph.py +4 -0
- intentkit/abstracts/skill.py +2 -140
- intentkit/clients/twitter.py +35 -28
- intentkit/core/agent.py +2 -374
- intentkit/core/asset.py +63 -16
- intentkit/core/engine.py +16 -7
- intentkit/core/scheduler.py +8 -8
- intentkit/models/agent.py +109 -94
- intentkit/models/agent_schema.json +6 -9
- intentkit/models/llm.csv +15 -12
- intentkit/models/skill.py +38 -40
- intentkit/skills/acolyt/__init__.py +2 -9
- intentkit/skills/acolyt/base.py +2 -5
- intentkit/skills/aixbt/__init__.py +2 -13
- intentkit/skills/aixbt/base.py +0 -4
- intentkit/skills/aixbt/projects.py +1 -2
- intentkit/skills/allora/__init__.py +2 -9
- intentkit/skills/allora/base.py +2 -5
- intentkit/skills/base.py +168 -27
- intentkit/skills/basename/__init__.py +1 -3
- intentkit/skills/carv/__init__.py +116 -121
- intentkit/skills/carv/base.py +184 -185
- intentkit/skills/casino/__init__.py +4 -15
- intentkit/skills/casino/base.py +0 -4
- intentkit/skills/casino/deck_draw.py +4 -6
- intentkit/skills/casino/deck_shuffle.py +5 -4
- intentkit/skills/casino/dice_roll.py +1 -2
- intentkit/skills/cdp/__init__.py +0 -5
- intentkit/skills/cdp/base.py +0 -4
- intentkit/skills/cdp/schema.json +1 -17
- intentkit/skills/chainlist/__init__.py +2 -7
- intentkit/skills/chainlist/base.py +0 -4
- intentkit/skills/common/__init__.py +2 -9
- intentkit/skills/common/base.py +0 -4
- intentkit/skills/cookiefun/__init__.py +6 -9
- intentkit/skills/cookiefun/base.py +0 -4
- intentkit/skills/cryptocompare/__init__.py +7 -24
- intentkit/skills/cryptocompare/base.py +4 -18
- intentkit/skills/cryptocompare/fetch_news.py +1 -1
- intentkit/skills/cryptocompare/fetch_price.py +1 -1
- intentkit/skills/cryptocompare/fetch_top_exchanges.py +1 -1
- intentkit/skills/cryptocompare/fetch_top_market_cap.py +1 -1
- intentkit/skills/cryptocompare/fetch_top_volume.py +1 -1
- intentkit/skills/cryptocompare/fetch_trading_signals.py +1 -1
- intentkit/skills/cryptopanic/__init__.py +3 -6
- intentkit/skills/cryptopanic/base.py +53 -55
- intentkit/skills/cryptopanic/fetch_crypto_news.py +0 -2
- intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +1 -3
- intentkit/skills/dapplooker/__init__.py +2 -9
- intentkit/skills/dapplooker/base.py +2 -5
- intentkit/skills/defillama/__init__.py +24 -74
- intentkit/skills/defillama/base.py +3 -13
- intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +2 -2
- intentkit/skills/defillama/coins/fetch_block.py +2 -2
- intentkit/skills/defillama/coins/fetch_current_prices.py +2 -2
- intentkit/skills/defillama/coins/fetch_first_price.py +2 -2
- intentkit/skills/defillama/coins/fetch_historical_prices.py +2 -2
- intentkit/skills/defillama/coins/fetch_price_chart.py +2 -2
- intentkit/skills/defillama/coins/fetch_price_percentage.py +2 -2
- intentkit/skills/defillama/fees/fetch_fees_overview.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +2 -2
- intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +2 -2
- intentkit/skills/defillama/tvl/fetch_chains.py +2 -2
- intentkit/skills/defillama/tvl/fetch_historical_tvl.py +2 -2
- intentkit/skills/defillama/tvl/fetch_protocol.py +2 -2
- intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +2 -2
- intentkit/skills/defillama/tvl/fetch_protocols.py +2 -2
- intentkit/skills/defillama/volumes/fetch_dex_overview.py +2 -2
- intentkit/skills/defillama/volumes/fetch_dex_summary.py +2 -2
- intentkit/skills/defillama/volumes/fetch_options_overview.py +2 -2
- intentkit/skills/defillama/yields/fetch_pool_chart.py +2 -2
- intentkit/skills/defillama/yields/fetch_pools.py +2 -2
- intentkit/skills/dexscreener/__init__.py +97 -102
- intentkit/skills/dexscreener/base.py +125 -130
- intentkit/skills/dexscreener/get_pair_info.py +2 -3
- intentkit/skills/dexscreener/get_token_pairs.py +2 -3
- intentkit/skills/dexscreener/get_tokens_info.py +2 -3
- intentkit/skills/dexscreener/search_token.py +2 -4
- intentkit/skills/dune_analytics/__init__.py +4 -6
- intentkit/skills/dune_analytics/base.py +50 -52
- intentkit/skills/dune_analytics/fetch_kol_buys.py +0 -2
- intentkit/skills/dune_analytics/fetch_nation_metrics.py +0 -2
- intentkit/skills/elfa/__init__.py +5 -18
- intentkit/skills/elfa/base.py +8 -10
- intentkit/skills/enso/__init__.py +9 -29
- intentkit/skills/enso/base.py +3 -6
- intentkit/skills/enso/networks.py +1 -6
- intentkit/skills/enso/route.py +4 -8
- intentkit/skills/enso/tokens.py +2 -12
- intentkit/skills/erc20/__init__.py +1 -5
- intentkit/skills/erc721/__init__.py +1 -3
- intentkit/skills/firecrawl/__init__.py +5 -18
- intentkit/skills/firecrawl/base.py +2 -5
- intentkit/skills/firecrawl/clear.py +3 -6
- intentkit/skills/firecrawl/crawl.py +10 -9
- intentkit/skills/firecrawl/query.py +3 -1
- intentkit/skills/firecrawl/scrape.py +10 -14
- intentkit/skills/firecrawl/utils.py +39 -31
- intentkit/skills/github/__init__.py +2 -7
- intentkit/skills/github/base.py +0 -4
- intentkit/skills/heurist/__init__.py +8 -27
- intentkit/skills/heurist/base.py +2 -5
- intentkit/skills/heurist/image_generation_animagine_xl.py +5 -5
- intentkit/skills/heurist/image_generation_arthemy_comics.py +5 -5
- intentkit/skills/heurist/image_generation_arthemy_real.py +5 -5
- intentkit/skills/heurist/image_generation_braindance.py +5 -5
- intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +5 -5
- intentkit/skills/heurist/image_generation_flux_1_dev.py +5 -5
- intentkit/skills/heurist/image_generation_sdxl.py +5 -5
- intentkit/skills/http/__init__.py +4 -15
- intentkit/skills/http/base.py +0 -4
- intentkit/skills/lifi/__init__.py +1 -6
- intentkit/skills/lifi/base.py +0 -4
- intentkit/skills/lifi/token_execute.py +1 -4
- intentkit/skills/lifi/token_quote.py +1 -3
- intentkit/skills/moralis/__init__.py +3 -7
- intentkit/skills/moralis/base.py +2 -5
- intentkit/skills/morpho/__init__.py +1 -3
- intentkit/skills/nation/__init__.py +2 -7
- intentkit/skills/nation/base.py +4 -7
- intentkit/skills/openai/__init__.py +5 -18
- intentkit/skills/openai/base.py +8 -10
- intentkit/skills/openai/dalle_image_generation.py +2 -5
- intentkit/skills/openai/gpt_image_generation.py +2 -5
- intentkit/skills/openai/gpt_image_to_image.py +2 -5
- intentkit/skills/openai/image_to_text.py +2 -5
- intentkit/skills/portfolio/__init__.py +11 -35
- intentkit/skills/portfolio/base.py +2 -5
- intentkit/skills/pyth/__init__.py +1 -5
- intentkit/skills/slack/__init__.py +5 -17
- intentkit/skills/slack/base.py +0 -4
- intentkit/skills/supabase/__init__.py +7 -23
- intentkit/skills/supabase/base.py +0 -4
- intentkit/skills/superfluid/__init__.py +1 -3
- intentkit/skills/system/__init__.py +7 -24
- intentkit/skills/system/add_autonomous_task.py +2 -2
- intentkit/skills/system/delete_autonomous_task.py +2 -2
- intentkit/skills/system/edit_autonomous_task.py +2 -4
- intentkit/skills/system/list_autonomous_tasks.py +2 -2
- intentkit/skills/system/read_agent_api_key.py +6 -4
- intentkit/skills/system/regenerate_agent_api_key.py +6 -4
- intentkit/skills/tavily/__init__.py +3 -12
- intentkit/skills/tavily/base.py +2 -5
- intentkit/skills/tavily/tavily_extract.py +1 -2
- intentkit/skills/tavily/tavily_search.py +3 -3
- intentkit/skills/token/__init__.py +5 -10
- intentkit/skills/token/base.py +2 -6
- intentkit/skills/twitter/__init__.py +11 -35
- intentkit/skills/twitter/base.py +18 -29
- intentkit/skills/twitter/follow_user.py +1 -4
- intentkit/skills/twitter/get_mentions.py +2 -8
- intentkit/skills/twitter/get_timeline.py +3 -10
- intentkit/skills/twitter/get_user_by_username.py +1 -4
- intentkit/skills/twitter/get_user_tweets.py +3 -10
- intentkit/skills/twitter/like_tweet.py +1 -4
- intentkit/skills/twitter/post_tweet.py +3 -5
- intentkit/skills/twitter/reply_tweet.py +3 -5
- intentkit/skills/twitter/retweet.py +1 -4
- intentkit/skills/twitter/search_tweets.py +3 -10
- intentkit/skills/unrealspeech/__init__.py +2 -7
- intentkit/skills/unrealspeech/base.py +0 -4
- intentkit/skills/venice_audio/__init__.py +99 -106
- intentkit/skills/venice_audio/base.py +118 -121
- intentkit/skills/venice_audio/venice_audio.py +1 -5
- intentkit/skills/venice_image/__init__.py +147 -154
- intentkit/skills/venice_image/base.py +185 -192
- intentkit/skills/web_scraper/__init__.py +5 -18
- intentkit/skills/web_scraper/base.py +20 -4
- intentkit/skills/web_scraper/document_indexer.py +6 -4
- intentkit/skills/web_scraper/scrape_and_index.py +11 -10
- intentkit/skills/web_scraper/utils.py +38 -38
- intentkit/skills/web_scraper/website_indexer.py +7 -8
- intentkit/skills/weth/__init__.py +1 -5
- intentkit/skills/wow/__init__.py +1 -5
- intentkit/skills/xmtp/__init__.py +4 -15
- {intentkit-0.8.11.dist-info → intentkit-0.8.12.dist-info}/METADATA +1 -1
- {intentkit-0.8.11.dist-info → intentkit-0.8.12.dist-info}/RECORD +183 -183
- {intentkit-0.8.11.dist-info → intentkit-0.8.12.dist-info}/WHEEL +0 -0
- {intentkit-0.8.11.dist-info → intentkit-0.8.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
from epyxid import XID
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
+
from intentkit.config.config import config
|
|
8
9
|
from intentkit.skills.heurist.base import HeuristBaseTool
|
|
9
10
|
from intentkit.utils.s3 import store_image
|
|
10
11
|
|
|
@@ -78,20 +79,19 @@ class ImageGenerationArthemyComics(HeuristBaseTool):
|
|
|
78
79
|
skill_config = context.agent.skill_config(self.category)
|
|
79
80
|
skill_config = skill_config
|
|
80
81
|
|
|
81
|
-
# Get the Heurist API key from
|
|
82
|
+
# Get the Heurist API key from configuration
|
|
82
83
|
if "api_key" in skill_config and skill_config["api_key"]:
|
|
83
84
|
api_key = skill_config["api_key"]
|
|
84
85
|
if skill_config.get("rate_limit_number") and skill_config.get(
|
|
85
86
|
"rate_limit_minutes"
|
|
86
87
|
):
|
|
87
88
|
await self.user_rate_limit_by_category(
|
|
88
|
-
context.user_id,
|
|
89
89
|
skill_config["rate_limit_number"],
|
|
90
|
-
skill_config["rate_limit_minutes"],
|
|
90
|
+
skill_config["rate_limit_minutes"] * 60,
|
|
91
91
|
)
|
|
92
92
|
else:
|
|
93
|
-
api_key =
|
|
94
|
-
await self.user_rate_limit_by_category(
|
|
93
|
+
api_key = config.heurist_api_key
|
|
94
|
+
await self.user_rate_limit_by_category(10, 1440 * 60)
|
|
95
95
|
|
|
96
96
|
# Generate a unique job ID
|
|
97
97
|
job_id = str(XID())
|
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
from epyxid import XID
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
+
from intentkit.config.config import config
|
|
8
9
|
from intentkit.skills.heurist.base import HeuristBaseTool
|
|
9
10
|
from intentkit.utils.s3 import store_image
|
|
10
11
|
|
|
@@ -78,20 +79,19 @@ class ImageGenerationArthemyReal(HeuristBaseTool):
|
|
|
78
79
|
skill_config = context.agent.skill_config(self.category)
|
|
79
80
|
skill_config = skill_config
|
|
80
81
|
|
|
81
|
-
# Get the Heurist API key from
|
|
82
|
+
# Get the Heurist API key from configuration
|
|
82
83
|
if "api_key" in skill_config and skill_config["api_key"]:
|
|
83
84
|
api_key = skill_config["api_key"]
|
|
84
85
|
if skill_config.get("rate_limit_number") and skill_config.get(
|
|
85
86
|
"rate_limit_minutes"
|
|
86
87
|
):
|
|
87
88
|
await self.user_rate_limit_by_category(
|
|
88
|
-
context.user_id,
|
|
89
89
|
skill_config["rate_limit_number"],
|
|
90
|
-
skill_config["rate_limit_minutes"],
|
|
90
|
+
skill_config["rate_limit_minutes"] * 60,
|
|
91
91
|
)
|
|
92
92
|
else:
|
|
93
|
-
api_key =
|
|
94
|
-
await self.user_rate_limit_by_category(
|
|
93
|
+
api_key = config.heurist_api_key
|
|
94
|
+
await self.user_rate_limit_by_category(10, 1440 * 60)
|
|
95
95
|
|
|
96
96
|
# Generate a unique job ID
|
|
97
97
|
job_id = str(XID())
|
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
from epyxid import XID
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
+
from intentkit.config.config import config
|
|
8
9
|
from intentkit.skills.heurist.base import HeuristBaseTool
|
|
9
10
|
from intentkit.utils.s3 import store_image
|
|
10
11
|
|
|
@@ -78,20 +79,19 @@ class ImageGenerationBrainDance(HeuristBaseTool):
|
|
|
78
79
|
skill_config = context.agent.skill_config(self.category)
|
|
79
80
|
skill_config = skill_config
|
|
80
81
|
|
|
81
|
-
# Get the Heurist API key from
|
|
82
|
+
# Get the Heurist API key from configuration
|
|
82
83
|
if "api_key" in skill_config and skill_config["api_key"]:
|
|
83
84
|
api_key = skill_config["api_key"]
|
|
84
85
|
if skill_config.get("rate_limit_number") and skill_config.get(
|
|
85
86
|
"rate_limit_minutes"
|
|
86
87
|
):
|
|
87
88
|
await self.user_rate_limit_by_category(
|
|
88
|
-
context.user_id,
|
|
89
89
|
skill_config["rate_limit_number"],
|
|
90
|
-
skill_config["rate_limit_minutes"],
|
|
90
|
+
skill_config["rate_limit_minutes"] * 60,
|
|
91
91
|
)
|
|
92
92
|
else:
|
|
93
|
-
api_key =
|
|
94
|
-
await self.user_rate_limit_by_category(
|
|
93
|
+
api_key = config.heurist_api_key
|
|
94
|
+
await self.user_rate_limit_by_category(10, 1440 * 60)
|
|
95
95
|
|
|
96
96
|
# Generate a unique job ID
|
|
97
97
|
job_id = str(XID())
|
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
from epyxid import XID
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
+
from intentkit.config.config import config
|
|
8
9
|
from intentkit.skills.heurist.base import HeuristBaseTool
|
|
9
10
|
from intentkit.utils.s3 import store_image
|
|
10
11
|
|
|
@@ -78,20 +79,19 @@ class ImageGenerationCyberRealisticXL(HeuristBaseTool):
|
|
|
78
79
|
skill_config = context.agent.skill_config(self.category)
|
|
79
80
|
skill_config = skill_config
|
|
80
81
|
|
|
81
|
-
# Get the Heurist API key from
|
|
82
|
+
# Get the Heurist API key from configuration
|
|
82
83
|
if "api_key" in skill_config and skill_config["api_key"]:
|
|
83
84
|
api_key = skill_config["api_key"]
|
|
84
85
|
if skill_config.get("rate_limit_number") and skill_config.get(
|
|
85
86
|
"rate_limit_minutes"
|
|
86
87
|
):
|
|
87
88
|
await self.user_rate_limit_by_category(
|
|
88
|
-
context.user_id,
|
|
89
89
|
skill_config["rate_limit_number"],
|
|
90
|
-
skill_config["rate_limit_minutes"],
|
|
90
|
+
skill_config["rate_limit_minutes"] * 60,
|
|
91
91
|
)
|
|
92
92
|
else:
|
|
93
|
-
api_key =
|
|
94
|
-
await self.user_rate_limit_by_category(
|
|
93
|
+
api_key = config.heurist_api_key
|
|
94
|
+
await self.user_rate_limit_by_category(10, 1440 * 60)
|
|
95
95
|
|
|
96
96
|
# Generate a unique job ID
|
|
97
97
|
job_id = str(XID())
|
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
from epyxid import XID
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
+
from intentkit.config.config import config
|
|
8
9
|
from intentkit.skills.heurist.base import HeuristBaseTool
|
|
9
10
|
from intentkit.utils.s3 import store_image
|
|
10
11
|
|
|
@@ -78,20 +79,19 @@ class ImageGenerationFlux1Dev(HeuristBaseTool):
|
|
|
78
79
|
skill_config = context.agent.skill_config(self.category)
|
|
79
80
|
skill_config = skill_config
|
|
80
81
|
|
|
81
|
-
# Get the Heurist API key from
|
|
82
|
+
# Get the Heurist API key from configuration
|
|
82
83
|
if "api_key" in skill_config and skill_config["api_key"]:
|
|
83
84
|
api_key = skill_config["api_key"]
|
|
84
85
|
if skill_config.get("rate_limit_number") and skill_config.get(
|
|
85
86
|
"rate_limit_minutes"
|
|
86
87
|
):
|
|
87
88
|
await self.user_rate_limit_by_category(
|
|
88
|
-
context.user_id,
|
|
89
89
|
skill_config["rate_limit_number"],
|
|
90
|
-
skill_config["rate_limit_minutes"],
|
|
90
|
+
skill_config["rate_limit_minutes"] * 60,
|
|
91
91
|
)
|
|
92
92
|
else:
|
|
93
|
-
api_key =
|
|
94
|
-
await self.user_rate_limit_by_category(
|
|
93
|
+
api_key = config.heurist_api_key
|
|
94
|
+
await self.user_rate_limit_by_category(10, 1440 * 60)
|
|
95
95
|
|
|
96
96
|
# Generate a unique job ID
|
|
97
97
|
job_id = str(XID())
|
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
from epyxid import XID
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
+
from intentkit.config.config import config
|
|
8
9
|
from intentkit.skills.heurist.base import HeuristBaseTool
|
|
9
10
|
from intentkit.utils.s3 import store_image
|
|
10
11
|
|
|
@@ -78,20 +79,19 @@ class ImageGenerationSDXL(HeuristBaseTool):
|
|
|
78
79
|
skill_config = context.agent.skill_config(self.category)
|
|
79
80
|
skill_config = skill_config
|
|
80
81
|
|
|
81
|
-
# Get the Heurist API key from
|
|
82
|
+
# Get the Heurist API key from configuration
|
|
82
83
|
if "api_key" in skill_config and skill_config["api_key"]:
|
|
83
84
|
api_key = skill_config["api_key"]
|
|
84
85
|
if skill_config.get("rate_limit_number") and skill_config.get(
|
|
85
86
|
"rate_limit_minutes"
|
|
86
87
|
):
|
|
87
88
|
await self.user_rate_limit_by_category(
|
|
88
|
-
context.user_id,
|
|
89
89
|
skill_config["rate_limit_number"],
|
|
90
|
-
skill_config["rate_limit_minutes"],
|
|
90
|
+
skill_config["rate_limit_minutes"] * 60,
|
|
91
91
|
)
|
|
92
92
|
else:
|
|
93
|
-
api_key =
|
|
94
|
-
await self.user_rate_limit_by_category(
|
|
93
|
+
api_key = config.heurist_api_key
|
|
94
|
+
await self.user_rate_limit_by_category(10, 1440 * 60)
|
|
95
95
|
|
|
96
96
|
# Generate a unique job ID
|
|
97
97
|
job_id = str(XID())
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import TypedDict
|
|
5
5
|
|
|
6
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
7
6
|
from intentkit.skills.base import SkillConfig, SkillState
|
|
8
7
|
from intentkit.skills.http.base import HttpBaseTool
|
|
9
8
|
from intentkit.skills.http.get import HttpGet
|
|
@@ -33,7 +32,6 @@ class Config(SkillConfig):
|
|
|
33
32
|
async def get_skills(
|
|
34
33
|
config: "Config",
|
|
35
34
|
is_private: bool,
|
|
36
|
-
store: SkillStoreABC,
|
|
37
35
|
**_,
|
|
38
36
|
) -> list[HttpBaseTool]:
|
|
39
37
|
"""Get all HTTP client skills.
|
|
@@ -41,7 +39,6 @@ async def get_skills(
|
|
|
41
39
|
Args:
|
|
42
40
|
config: The configuration for HTTP client skills.
|
|
43
41
|
is_private: Whether to include private skills.
|
|
44
|
-
store: The skill store for persisting data.
|
|
45
42
|
|
|
46
43
|
Returns:
|
|
47
44
|
A list of HTTP client skills.
|
|
@@ -58,7 +55,7 @@ async def get_skills(
|
|
|
58
55
|
# Get each skill using the cached getter
|
|
59
56
|
result = []
|
|
60
57
|
for name in available_skills:
|
|
61
|
-
skill = get_http_skill(name
|
|
58
|
+
skill = get_http_skill(name)
|
|
62
59
|
if skill:
|
|
63
60
|
result.append(skill)
|
|
64
61
|
return result
|
|
@@ -66,34 +63,26 @@ async def get_skills(
|
|
|
66
63
|
|
|
67
64
|
def get_http_skill(
|
|
68
65
|
name: str,
|
|
69
|
-
store: SkillStoreABC,
|
|
70
66
|
) -> HttpBaseTool:
|
|
71
67
|
"""Get an HTTP client skill by name.
|
|
72
68
|
|
|
73
69
|
Args:
|
|
74
70
|
name: The name of the skill to get
|
|
75
|
-
store: The skill store for persisting data
|
|
76
71
|
|
|
77
72
|
Returns:
|
|
78
73
|
The requested HTTP client skill
|
|
79
74
|
"""
|
|
80
75
|
if name == "http_get":
|
|
81
76
|
if name not in _cache:
|
|
82
|
-
_cache[name] = HttpGet(
|
|
83
|
-
skill_store=store,
|
|
84
|
-
)
|
|
77
|
+
_cache[name] = HttpGet()
|
|
85
78
|
return _cache[name]
|
|
86
79
|
elif name == "http_post":
|
|
87
80
|
if name not in _cache:
|
|
88
|
-
_cache[name] = HttpPost(
|
|
89
|
-
skill_store=store,
|
|
90
|
-
)
|
|
81
|
+
_cache[name] = HttpPost()
|
|
91
82
|
return _cache[name]
|
|
92
83
|
elif name == "http_put":
|
|
93
84
|
if name not in _cache:
|
|
94
|
-
_cache[name] = HttpPut(
|
|
95
|
-
skill_store=store,
|
|
96
|
-
)
|
|
85
|
+
_cache[name] = HttpPut()
|
|
97
86
|
return _cache[name]
|
|
98
87
|
else:
|
|
99
88
|
logger.warning(f"Unknown HTTP skill: {name}")
|
intentkit/skills/http/base.py
CHANGED
|
@@ -2,7 +2,6 @@ from typing import Type
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
|
|
5
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
6
5
|
from intentkit.skills.base import IntentKitSkill
|
|
7
6
|
|
|
8
7
|
|
|
@@ -12,9 +11,6 @@ class HttpBaseTool(IntentKitSkill):
|
|
|
12
11
|
name: str = Field(description="The name of the tool")
|
|
13
12
|
description: str = Field(description="A description of what the tool does")
|
|
14
13
|
args_schema: Type[BaseModel]
|
|
15
|
-
skill_store: SkillStoreABC = Field(
|
|
16
|
-
description="The skill store for persisting data"
|
|
17
|
-
)
|
|
18
14
|
|
|
19
15
|
@property
|
|
20
16
|
def category(self) -> str:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import Any, List, Optional, TypedDict
|
|
3
3
|
|
|
4
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
5
4
|
from intentkit.skills.base import SkillConfig, SkillState
|
|
6
5
|
from intentkit.skills.lifi.base import LiFiBaseTool
|
|
7
6
|
from intentkit.skills.lifi.token_execute import TokenExecute
|
|
@@ -31,7 +30,6 @@ class Config(SkillConfig):
|
|
|
31
30
|
async def get_skills(
|
|
32
31
|
config: "Config",
|
|
33
32
|
is_private: bool,
|
|
34
|
-
store: SkillStoreABC,
|
|
35
33
|
**_: Any,
|
|
36
34
|
) -> list[LiFiBaseTool]:
|
|
37
35
|
"""Get all LiFi skills."""
|
|
@@ -60,7 +58,7 @@ async def get_skills(
|
|
|
60
58
|
skills: list[LiFiBaseTool] = []
|
|
61
59
|
for name in available_skills:
|
|
62
60
|
try:
|
|
63
|
-
skill = get_lifi_skill(name,
|
|
61
|
+
skill = get_lifi_skill(name, config)
|
|
64
62
|
skills.append(skill)
|
|
65
63
|
logger.info(f"[LiFi_Skills] Successfully loaded skill: {name}")
|
|
66
64
|
except Exception as e:
|
|
@@ -73,7 +71,6 @@ async def get_skills(
|
|
|
73
71
|
|
|
74
72
|
def get_lifi_skill(
|
|
75
73
|
name: str,
|
|
76
|
-
store: SkillStoreABC,
|
|
77
74
|
config: Config,
|
|
78
75
|
) -> LiFiBaseTool:
|
|
79
76
|
"""Get a LiFi skill by name."""
|
|
@@ -108,7 +105,6 @@ def get_lifi_skill(
|
|
|
108
105
|
logger.info(f"[LiFi_Skills] Allowed chains: {allowed_chains}")
|
|
109
106
|
|
|
110
107
|
_cache[cache_key] = TokenQuote(
|
|
111
|
-
skill_store=store,
|
|
112
108
|
default_slippage=default_slippage,
|
|
113
109
|
allowed_chains=allowed_chains,
|
|
114
110
|
)
|
|
@@ -129,7 +125,6 @@ def get_lifi_skill(
|
|
|
129
125
|
)
|
|
130
126
|
|
|
131
127
|
_cache[cache_key] = TokenExecute(
|
|
132
|
-
skill_store=store,
|
|
133
128
|
default_slippage=default_slippage,
|
|
134
129
|
allowed_chains=allowed_chains,
|
|
135
130
|
max_execution_time=max_execution_time,
|
intentkit/skills/lifi/base.py
CHANGED
|
@@ -2,7 +2,6 @@ from typing import Type
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
|
|
5
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
6
5
|
from intentkit.skills.base import IntentKitSkill
|
|
7
6
|
|
|
8
7
|
|
|
@@ -12,9 +11,6 @@ class LiFiBaseTool(IntentKitSkill):
|
|
|
12
11
|
name: str = Field(description="The name of the tool")
|
|
13
12
|
description: str = Field(description="A description of what the tool does")
|
|
14
13
|
args_schema: Type[BaseModel]
|
|
15
|
-
skill_store: SkillStoreABC = Field(
|
|
16
|
-
description="The skill store for persisting data"
|
|
17
|
-
)
|
|
18
14
|
|
|
19
15
|
@property
|
|
20
16
|
def category(self) -> str:
|
|
@@ -6,7 +6,6 @@ from coinbase_agentkit import CdpEvmWalletProvider
|
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
from web3 import Web3
|
|
8
8
|
|
|
9
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
10
9
|
from intentkit.clients import get_wallet_provider as get_agent_wallet_provider
|
|
11
10
|
from intentkit.models.agent import Agent
|
|
12
11
|
from intentkit.skills.lifi.base import LiFiBaseTool
|
|
@@ -75,20 +74,18 @@ class TokenExecute(LiFiBaseTool):
|
|
|
75
74
|
|
|
76
75
|
def __init__(
|
|
77
76
|
self,
|
|
78
|
-
skill_store: SkillStoreABC,
|
|
79
77
|
default_slippage: float = 0.03,
|
|
80
78
|
allowed_chains: Optional[List[str]] = None,
|
|
81
79
|
max_execution_time: int = 300,
|
|
82
80
|
) -> None:
|
|
83
81
|
"""Initialize the TokenExecute skill with configuration options."""
|
|
84
|
-
super().__init__(
|
|
82
|
+
super().__init__()
|
|
85
83
|
self.default_slippage = default_slippage
|
|
86
84
|
self.allowed_chains = allowed_chains
|
|
87
85
|
self.max_execution_time = max_execution_time
|
|
88
86
|
# Initialize quote tool if not set
|
|
89
87
|
if not self.quote_tool:
|
|
90
88
|
self.quote_tool = TokenQuote(
|
|
91
|
-
skill_store=skill_store,
|
|
92
89
|
default_slippage=default_slippage,
|
|
93
90
|
allowed_chains=allowed_chains,
|
|
94
91
|
)
|
|
@@ -3,7 +3,6 @@ from typing import Any, Dict, List, Optional, Type
|
|
|
3
3
|
import httpx
|
|
4
4
|
from pydantic import BaseModel, Field
|
|
5
5
|
|
|
6
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
7
6
|
from intentkit.skills.lifi.base import LiFiBaseTool
|
|
8
7
|
from intentkit.skills.lifi.utils import (
|
|
9
8
|
LIFI_API_URL,
|
|
@@ -62,12 +61,11 @@ class TokenQuote(LiFiBaseTool):
|
|
|
62
61
|
|
|
63
62
|
def __init__(
|
|
64
63
|
self,
|
|
65
|
-
skill_store: SkillStoreABC,
|
|
66
64
|
default_slippage: float = 0.03,
|
|
67
65
|
allowed_chains: Optional[List[str]] = None,
|
|
68
66
|
) -> None:
|
|
69
67
|
"""Initialize the TokenQuote skill with configuration options."""
|
|
70
|
-
super().__init__(
|
|
68
|
+
super().__init__()
|
|
71
69
|
self.default_slippage = default_slippage
|
|
72
70
|
self.allowed_chains = allowed_chains
|
|
73
71
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import Dict, List, NotRequired, TypedDict
|
|
5
5
|
|
|
6
|
-
from intentkit.
|
|
6
|
+
from intentkit.config.config import config as system_config
|
|
7
7
|
from intentkit.skills.base import SkillConfig, SkillState
|
|
8
8
|
from intentkit.skills.moralis.base import WalletBaseTool
|
|
9
9
|
from intentkit.skills.moralis.fetch_chain_portfolio import FetchChainPortfolio
|
|
@@ -34,7 +34,6 @@ class Config(SkillConfig):
|
|
|
34
34
|
async def get_skills(
|
|
35
35
|
config: "Config",
|
|
36
36
|
is_private: bool,
|
|
37
|
-
store: SkillStoreABC,
|
|
38
37
|
**_,
|
|
39
38
|
) -> List[WalletBaseTool]:
|
|
40
39
|
"""Get all Wallet Portfolio skills.
|
|
@@ -42,7 +41,6 @@ async def get_skills(
|
|
|
42
41
|
Args:
|
|
43
42
|
config: Skill configuration
|
|
44
43
|
is_private: Whether the request is from an authenticated user
|
|
45
|
-
store: Skill store for persistence
|
|
46
44
|
chain_provider: Optional chain provider for blockchain interactions
|
|
47
45
|
**_: Additional arguments
|
|
48
46
|
|
|
@@ -67,12 +65,12 @@ async def get_skills(
|
|
|
67
65
|
if config.get("api_key_provider") == "agent_owner":
|
|
68
66
|
api_key = config.get("api_key")
|
|
69
67
|
else:
|
|
70
|
-
api_key =
|
|
68
|
+
api_key = system_config.moralis_api_key
|
|
71
69
|
|
|
72
70
|
# Get each skill using the getter
|
|
73
71
|
result = []
|
|
74
72
|
for name in available_skills:
|
|
75
|
-
skill = get_wallet_skill(name, api_key
|
|
73
|
+
skill = get_wallet_skill(name, api_key)
|
|
76
74
|
if skill:
|
|
77
75
|
result.append(skill)
|
|
78
76
|
return result
|
|
@@ -81,7 +79,6 @@ async def get_skills(
|
|
|
81
79
|
def get_wallet_skill(
|
|
82
80
|
name: str,
|
|
83
81
|
api_key: str,
|
|
84
|
-
store: SkillStoreABC,
|
|
85
82
|
) -> WalletBaseTool:
|
|
86
83
|
"""Get a specific Wallet Portfolio skill by name.
|
|
87
84
|
|
|
@@ -106,5 +103,4 @@ def get_wallet_skill(
|
|
|
106
103
|
|
|
107
104
|
return skill_classes[name](
|
|
108
105
|
api_key=api_key,
|
|
109
|
-
skill_store=store,
|
|
110
106
|
)
|
intentkit/skills/moralis/base.py
CHANGED
|
@@ -5,7 +5,7 @@ from typing import List, Optional, Type
|
|
|
5
5
|
from langchain_core.tools.base import ToolException
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
-
from intentkit.
|
|
8
|
+
from intentkit.config.config import config
|
|
9
9
|
from intentkit.skills.base import IntentKitSkill
|
|
10
10
|
|
|
11
11
|
# Chain ID to chain name mapping for EVM chains
|
|
@@ -30,9 +30,6 @@ class WalletBaseTool(IntentKitSkill):
|
|
|
30
30
|
name: str = Field(description="The name of the tool")
|
|
31
31
|
description: str = Field(description="A description of what the tool does")
|
|
32
32
|
args_schema: Type[BaseModel]
|
|
33
|
-
skill_store: SkillStoreABC = Field(
|
|
34
|
-
description="The skill store for persisting data"
|
|
35
|
-
)
|
|
36
33
|
|
|
37
34
|
# Optional fields for blockchain providers
|
|
38
35
|
solana_networks: Optional[List[str]] = Field(
|
|
@@ -44,7 +41,7 @@ class WalletBaseTool(IntentKitSkill):
|
|
|
44
41
|
skill_config = context.agent.skill_config(self.category)
|
|
45
42
|
api_key_provider = skill_config.get("api_key_provider")
|
|
46
43
|
if api_key_provider == "platform":
|
|
47
|
-
return
|
|
44
|
+
return config.moralis_api_key
|
|
48
45
|
# for backward compatibility, may only have api_key in skill_config
|
|
49
46
|
elif skill_config.get("api_key"):
|
|
50
47
|
return skill_config.get("api_key")
|
|
@@ -4,7 +4,6 @@ from typing import TYPE_CHECKING, Optional, TypedDict
|
|
|
4
4
|
|
|
5
5
|
from coinbase_agentkit import morpho_action_provider
|
|
6
6
|
|
|
7
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
8
7
|
from intentkit.skills.base import (
|
|
9
8
|
SkillConfig,
|
|
10
9
|
SkillState,
|
|
@@ -31,7 +30,6 @@ class Config(SkillConfig):
|
|
|
31
30
|
async def get_skills(
|
|
32
31
|
config: "Config",
|
|
33
32
|
is_private: bool,
|
|
34
|
-
store: SkillStoreABC,
|
|
35
33
|
agent_id: str,
|
|
36
34
|
agent: Optional["Agent"] = None,
|
|
37
35
|
**_,
|
|
@@ -46,7 +44,7 @@ async def get_skills(
|
|
|
46
44
|
available_skills.append(skill_name)
|
|
47
45
|
|
|
48
46
|
actions = await get_agentkit_actions(
|
|
49
|
-
agent_id,
|
|
47
|
+
agent_id, [morpho_action_provider], agent=agent
|
|
50
48
|
)
|
|
51
49
|
tools: list[MorphoBaseTool] = []
|
|
52
50
|
for skill in available_skills:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import Optional, TypedDict
|
|
3
3
|
|
|
4
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
5
4
|
from intentkit.skills.base import SkillConfig, SkillState
|
|
6
5
|
from intentkit.skills.nation.base import NationBaseTool
|
|
7
6
|
from intentkit.skills.nation.nft_check import NftCheck
|
|
@@ -25,7 +24,6 @@ class Config(SkillConfig):
|
|
|
25
24
|
async def get_skills(
|
|
26
25
|
config: "Config",
|
|
27
26
|
is_private: bool,
|
|
28
|
-
store: SkillStoreABC,
|
|
29
27
|
**_,
|
|
30
28
|
) -> list[NationBaseTool]:
|
|
31
29
|
"""Get all nation skills."""
|
|
@@ -42,20 +40,17 @@ async def get_skills(
|
|
|
42
40
|
return [
|
|
43
41
|
skill
|
|
44
42
|
for name in available_skills
|
|
45
|
-
if (skill := get_nation_skill(name
|
|
43
|
+
if (skill := get_nation_skill(name)) is not None
|
|
46
44
|
]
|
|
47
45
|
|
|
48
46
|
|
|
49
47
|
def get_nation_skill(
|
|
50
48
|
name: str,
|
|
51
|
-
store: SkillStoreABC,
|
|
52
49
|
) -> Optional[NationBaseTool]:
|
|
53
50
|
"""Get a nation skill by name."""
|
|
54
51
|
if name == "nft_check":
|
|
55
52
|
if name not in _cache:
|
|
56
|
-
_cache[name] = NftCheck(
|
|
57
|
-
skill_store=store,
|
|
58
|
-
)
|
|
53
|
+
_cache[name] = NftCheck()
|
|
59
54
|
return _cache[name]
|
|
60
55
|
else:
|
|
61
56
|
logger.error(f"Unknown Nation skill: {name}")
|
intentkit/skills/nation/base.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Type
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
|
|
5
|
-
from intentkit.
|
|
5
|
+
from intentkit.config.config import config
|
|
6
6
|
from intentkit.skills.base import IntentKitSkill
|
|
7
7
|
|
|
8
8
|
default_nation_api_url = "http://backend-api"
|
|
@@ -14,16 +14,13 @@ class NationBaseTool(IntentKitSkill):
|
|
|
14
14
|
name: str = Field(description="The name of the tool")
|
|
15
15
|
description: str = Field(description="A description of what the tool does")
|
|
16
16
|
args_schema: Type[BaseModel]
|
|
17
|
-
skill_store: SkillStoreABC = Field(
|
|
18
|
-
description="The skill store for persisting data"
|
|
19
|
-
)
|
|
20
17
|
|
|
21
18
|
def get_api_key(self) -> str:
|
|
22
|
-
return
|
|
19
|
+
return config.nation_api_key
|
|
23
20
|
|
|
24
21
|
def get_base_url(self) -> str:
|
|
25
|
-
if
|
|
26
|
-
return
|
|
22
|
+
if config.nation_api_url:
|
|
23
|
+
return config.nation_api_url
|
|
27
24
|
return default_nation_api_url
|
|
28
25
|
|
|
29
26
|
@property
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import TypedDict
|
|
5
5
|
|
|
6
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
7
6
|
from intentkit.skills.base import SkillConfig, SkillState
|
|
8
7
|
from intentkit.skills.openai.base import OpenAIBaseTool
|
|
9
8
|
from intentkit.skills.openai.dalle_image_generation import DALLEImageGeneration
|
|
@@ -34,7 +33,6 @@ class Config(SkillConfig):
|
|
|
34
33
|
async def get_skills(
|
|
35
34
|
config: "Config",
|
|
36
35
|
is_private: bool,
|
|
37
|
-
store: SkillStoreABC,
|
|
38
36
|
**_,
|
|
39
37
|
) -> list[OpenAIBaseTool]:
|
|
40
38
|
"""Get all OpenAI skills.
|
|
@@ -42,7 +40,6 @@ async def get_skills(
|
|
|
42
40
|
Args:
|
|
43
41
|
config: The configuration for OpenAI skills.
|
|
44
42
|
is_private: Whether to include private skills.
|
|
45
|
-
store: The skill store for persisting data.
|
|
46
43
|
|
|
47
44
|
Returns:
|
|
48
45
|
A list of OpenAI skills.
|
|
@@ -59,7 +56,7 @@ async def get_skills(
|
|
|
59
56
|
# Get each skill using the cached getter
|
|
60
57
|
result = []
|
|
61
58
|
for name in available_skills:
|
|
62
|
-
skill = get_openai_skill(name
|
|
59
|
+
skill = get_openai_skill(name)
|
|
63
60
|
if skill:
|
|
64
61
|
result.append(skill)
|
|
65
62
|
return result
|
|
@@ -67,40 +64,30 @@ async def get_skills(
|
|
|
67
64
|
|
|
68
65
|
def get_openai_skill(
|
|
69
66
|
name: str,
|
|
70
|
-
store: SkillStoreABC,
|
|
71
67
|
) -> OpenAIBaseTool:
|
|
72
68
|
"""Get an OpenAI skill by name.
|
|
73
69
|
|
|
74
70
|
Args:
|
|
75
71
|
name: The name of the skill to get
|
|
76
|
-
store: The skill store for persisting data
|
|
77
72
|
|
|
78
73
|
Returns:
|
|
79
74
|
The requested OpenAI skill
|
|
80
75
|
"""
|
|
81
76
|
if name == "image_to_text":
|
|
82
77
|
if name not in _cache:
|
|
83
|
-
_cache[name] = ImageToText(
|
|
84
|
-
skill_store=store,
|
|
85
|
-
)
|
|
78
|
+
_cache[name] = ImageToText()
|
|
86
79
|
return _cache[name]
|
|
87
80
|
elif name == "dalle_image_generation":
|
|
88
81
|
if name not in _cache:
|
|
89
|
-
_cache[name] = DALLEImageGeneration(
|
|
90
|
-
skill_store=store,
|
|
91
|
-
)
|
|
82
|
+
_cache[name] = DALLEImageGeneration()
|
|
92
83
|
return _cache[name]
|
|
93
84
|
elif name == "gpt_image_generation":
|
|
94
85
|
if name not in _cache:
|
|
95
|
-
_cache[name] = GPTImageGeneration(
|
|
96
|
-
skill_store=store,
|
|
97
|
-
)
|
|
86
|
+
_cache[name] = GPTImageGeneration()
|
|
98
87
|
return _cache[name]
|
|
99
88
|
elif name == "gpt_image_to_image":
|
|
100
89
|
if name not in _cache:
|
|
101
|
-
_cache[name] = GPTImageToImage(
|
|
102
|
-
skill_store=store,
|
|
103
|
-
)
|
|
90
|
+
_cache[name] = GPTImageToImage()
|
|
104
91
|
return _cache[name]
|
|
105
92
|
else:
|
|
106
93
|
logger.warning(f"Unknown OpenAI skill: {name}")
|