intentkit 0.6.9.dev2__py3-none-any.whl → 0.6.10__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 +17 -2
- intentkit/core/engine.py +49 -30
- intentkit/core/node.py +10 -20
- intentkit/models/agent.py +215 -11
- intentkit/models/agent_schema.json +4 -0
- intentkit/models/chat.py +9 -1
- intentkit/models/llm.py +53 -0
- intentkit/skills/acolyt/ask.py +2 -5
- intentkit/skills/acolyt/base.py +16 -6
- intentkit/skills/aixbt/__init__.py +3 -7
- intentkit/skills/aixbt/projects.py +12 -36
- intentkit/skills/allora/base.py +16 -6
- intentkit/skills/allora/price.py +2 -4
- intentkit/skills/base.py +8 -1
- intentkit/skills/carv/base.py +12 -10
- intentkit/skills/carv/fetch_news.py +90 -92
- intentkit/skills/carv/onchain_query.py +162 -164
- intentkit/skills/carv/token_info_and_price.py +108 -110
- intentkit/skills/chainlist/chain_lookup.py +1 -2
- intentkit/skills/common/current_time.py +1 -2
- intentkit/skills/cookiefun/base.py +20 -12
- intentkit/skills/cookiefun/get_account_details.py +1 -3
- intentkit/skills/cookiefun/get_account_feed.py +1 -3
- intentkit/skills/cookiefun/get_account_smart_followers.py +1 -3
- intentkit/skills/cookiefun/get_sectors.py +2 -3
- intentkit/skills/cookiefun/search_accounts.py +1 -3
- intentkit/skills/cryptocompare/fetch_news.py +3 -4
- intentkit/skills/cryptocompare/fetch_price.py +3 -4
- intentkit/skills/cryptocompare/fetch_top_exchanges.py +3 -4
- intentkit/skills/cryptocompare/fetch_top_market_cap.py +3 -4
- intentkit/skills/cryptocompare/fetch_top_volume.py +3 -4
- intentkit/skills/cryptocompare/fetch_trading_signals.py +3 -4
- intentkit/skills/cryptopanic/base.py +13 -9
- intentkit/skills/cryptopanic/fetch_crypto_news.py +150 -153
- intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +133 -136
- intentkit/skills/dapplooker/base.py +16 -6
- intentkit/skills/dapplooker/dapplooker_token_data.py +2 -4
- intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +2 -3
- intentkit/skills/defillama/coins/fetch_block.py +2 -3
- intentkit/skills/defillama/coins/fetch_current_prices.py +2 -5
- intentkit/skills/defillama/coins/fetch_first_price.py +2 -5
- intentkit/skills/defillama/coins/fetch_historical_prices.py +2 -3
- intentkit/skills/defillama/coins/fetch_price_chart.py +2 -5
- intentkit/skills/defillama/coins/fetch_price_percentage.py +2 -5
- intentkit/skills/defillama/fees/fetch_fees_overview.py +2 -3
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +2 -3
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +2 -3
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +2 -3
- intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +2 -3
- intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +2 -5
- intentkit/skills/defillama/tvl/fetch_chains.py +2 -3
- intentkit/skills/defillama/tvl/fetch_historical_tvl.py +2 -3
- intentkit/skills/defillama/tvl/fetch_protocol.py +2 -5
- intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +2 -5
- intentkit/skills/defillama/tvl/fetch_protocols.py +2 -3
- intentkit/skills/defillama/volumes/fetch_dex_overview.py +2 -3
- intentkit/skills/defillama/volumes/fetch_dex_summary.py +2 -5
- intentkit/skills/defillama/volumes/fetch_options_overview.py +2 -3
- intentkit/skills/defillama/yields/fetch_pool_chart.py +2 -5
- intentkit/skills/defillama/yields/fetch_pools.py +2 -3
- intentkit/skills/dune_analytics/base.py +15 -9
- intentkit/skills/dune_analytics/fetch_kol_buys.py +125 -128
- intentkit/skills/dune_analytics/fetch_nation_metrics.py +234 -237
- intentkit/skills/elfa/base.py +16 -6
- intentkit/skills/elfa/mention.py +2 -7
- intentkit/skills/elfa/stats.py +2 -6
- intentkit/skills/elfa/tokens.py +1 -4
- intentkit/skills/enso/base.py +25 -13
- intentkit/skills/enso/best_yield.py +1 -4
- intentkit/skills/enso/networks.py +2 -5
- intentkit/skills/enso/prices.py +1 -5
- intentkit/skills/enso/route.py +2 -5
- intentkit/skills/enso/tokens.py +1 -4
- intentkit/skills/enso/wallet.py +3 -9
- intentkit/skills/firecrawl/base.py +16 -6
- intentkit/skills/firecrawl/clear.py +1 -3
- intentkit/skills/firecrawl/crawl.py +7 -8
- intentkit/skills/firecrawl/query.py +7 -9
- intentkit/skills/firecrawl/scrape.py +7 -8
- intentkit/skills/github/github_search.py +1 -3
- intentkit/skills/heurist/base.py +15 -0
- intentkit/skills/heurist/image_generation_animagine_xl.py +3 -4
- intentkit/skills/heurist/image_generation_arthemy_comics.py +3 -4
- intentkit/skills/heurist/image_generation_arthemy_real.py +3 -4
- intentkit/skills/heurist/image_generation_braindance.py +3 -4
- intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +3 -4
- intentkit/skills/heurist/image_generation_flux_1_dev.py +3 -4
- intentkit/skills/heurist/image_generation_sdxl.py +3 -4
- intentkit/skills/http/get.py +0 -2
- intentkit/skills/http/post.py +0 -2
- intentkit/skills/http/put.py +0 -2
- intentkit/skills/lifi/token_execute.py +1 -3
- intentkit/skills/lifi/token_quote.py +0 -2
- intentkit/skills/moralis/base.py +15 -1
- intentkit/skills/nation/nft_check.py +2 -5
- intentkit/skills/openai/base.py +14 -5
- intentkit/skills/openai/dalle_image_generation.py +6 -5
- intentkit/skills/openai/gpt_image_generation.py +6 -5
- intentkit/skills/openai/gpt_image_to_image.py +6 -5
- intentkit/skills/openai/image_to_text.py +6 -6
- intentkit/skills/portfolio/base.py +4 -3
- intentkit/skills/portfolio/token_balances.py +2 -4
- intentkit/skills/portfolio/wallet_approvals.py +2 -4
- intentkit/skills/portfolio/wallet_defi_positions.py +3 -4
- intentkit/skills/portfolio/wallet_history.py +2 -4
- intentkit/skills/portfolio/wallet_net_worth.py +2 -4
- intentkit/skills/portfolio/wallet_nfts.py +2 -4
- intentkit/skills/portfolio/wallet_profitability.py +2 -4
- intentkit/skills/portfolio/wallet_profitability_summary.py +2 -4
- intentkit/skills/portfolio/wallet_stats.py +2 -4
- intentkit/skills/portfolio/wallet_swaps.py +2 -4
- intentkit/skills/slack/base.py +18 -0
- intentkit/skills/slack/get_channel.py +3 -4
- intentkit/skills/slack/get_message.py +3 -4
- intentkit/skills/slack/schedule_message.py +3 -4
- intentkit/skills/slack/send_message.py +3 -4
- intentkit/skills/supabase/delete_data.py +3 -6
- intentkit/skills/supabase/fetch_data.py +3 -6
- intentkit/skills/supabase/insert_data.py +3 -6
- intentkit/skills/supabase/invoke_function.py +3 -6
- intentkit/skills/supabase/update_data.py +3 -6
- intentkit/skills/supabase/upsert_data.py +3 -6
- intentkit/skills/system/add_autonomous_task.py +1 -3
- intentkit/skills/system/delete_autonomous_task.py +1 -3
- intentkit/skills/system/edit_autonomous_task.py +1 -3
- intentkit/skills/system/list_autonomous_tasks.py +1 -3
- intentkit/skills/system/read_agent_api_key.py +2 -3
- intentkit/skills/system/regenerate_agent_api_key.py +2 -5
- intentkit/skills/tavily/base.py +14 -5
- intentkit/skills/tavily/tavily_extract.py +7 -8
- intentkit/skills/tavily/tavily_search.py +11 -9
- intentkit/skills/token/base.py +4 -6
- intentkit/skills/token/erc20_transfers.py +2 -4
- intentkit/skills/token/token_analytics.py +2 -4
- intentkit/skills/token/token_price.py +2 -4
- intentkit/skills/token/token_search.py +2 -4
- intentkit/skills/twitter/base.py +41 -0
- intentkit/skills/twitter/follow_user.py +4 -4
- intentkit/skills/twitter/get_mentions.py +4 -4
- intentkit/skills/twitter/get_timeline.py +4 -4
- intentkit/skills/twitter/get_user_by_username.py +4 -4
- intentkit/skills/twitter/get_user_tweets.py +4 -4
- intentkit/skills/twitter/like_tweet.py +4 -4
- intentkit/skills/twitter/post_tweet.py +3 -4
- intentkit/skills/twitter/reply_tweet.py +3 -4
- intentkit/skills/twitter/retweet.py +4 -4
- intentkit/skills/twitter/search_tweets.py +4 -4
- intentkit/skills/unrealspeech/base.py +16 -0
- intentkit/skills/unrealspeech/text_to_speech.py +4 -4
- intentkit/skills/venice_audio/base.py +11 -9
- intentkit/skills/venice_audio/venice_audio.py +238 -240
- intentkit/skills/venice_image/base.py +23 -19
- intentkit/skills/venice_image/image_enhance/image_enhance.py +78 -80
- intentkit/skills/venice_image/image_generation/image_generation_base.py +115 -117
- intentkit/skills/venice_image/image_upscale/image_upscale.py +88 -90
- intentkit/skills/venice_image/image_vision/image_vision.py +98 -100
- intentkit/skills/web_scraper/document_indexer.py +3 -5
- intentkit/skills/web_scraper/scrape_and_index.py +14 -17
- intentkit/skills/web_scraper/website_indexer.py +8 -10
- intentkit/skills/xmtp/README.md +110 -0
- intentkit/skills/xmtp/__init__.py +82 -0
- intentkit/skills/xmtp/base.py +15 -0
- intentkit/skills/xmtp/schema.json +43 -0
- intentkit/skills/xmtp/transfer.py +155 -0
- intentkit/skills/xmtp/xmtp.png +0 -0
- {intentkit-0.6.9.dev2.dist-info → intentkit-0.6.10.dist-info}/METADATA +4 -3
- {intentkit-0.6.9.dev2.dist-info → intentkit-0.6.10.dist-info}/RECORD +170 -164
- {intentkit-0.6.9.dev2.dist-info → intentkit-0.6.10.dist-info}/WHEEL +0 -0
- {intentkit-0.6.9.dev2.dist-info → intentkit-0.6.10.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
from typing import List, Optional, Tuple, Type
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
from intentkit.models.chat import ChatMessageAttachment, ChatMessageAttachmentType
|
|
6
|
+
from intentkit.skills.xmtp.base import XmtpBaseTool
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TransferInput(BaseModel):
|
|
10
|
+
"""Input for XMTP transfer skill."""
|
|
11
|
+
|
|
12
|
+
from_address: str = Field(description="The sender address for the transfer")
|
|
13
|
+
to_address: str = Field(description="The recipient address for the transfer")
|
|
14
|
+
amount: str = Field(
|
|
15
|
+
description="The amount to transfer (as string to handle large numbers)"
|
|
16
|
+
)
|
|
17
|
+
decimals: int = Field(
|
|
18
|
+
description="Number of decimal places for the token (18 for ETH, varies for ERC20 tokens)"
|
|
19
|
+
)
|
|
20
|
+
currency: str = Field(description="Currency symbol (e.g., 'ETH', 'USDC', 'DAI')")
|
|
21
|
+
token_contract_address: Optional[str] = Field(
|
|
22
|
+
default=None,
|
|
23
|
+
description="Token contract address for ERC20 transfers. Leave empty for ETH transfers.",
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class XmtpTransfer(XmtpBaseTool):
|
|
28
|
+
"""Skill for creating XMTP transfer transactions."""
|
|
29
|
+
|
|
30
|
+
name: str = "xmtp_transfer"
|
|
31
|
+
description: str = """Create an XMTP transaction request for transferring ETH or ERC20 tokens on Base mainnet.
|
|
32
|
+
|
|
33
|
+
This skill generates a wallet_sendCalls transaction request according to XMTP protocol
|
|
34
|
+
that can be sent to users for signing. The transaction can transfer:
|
|
35
|
+
- ETH (when token_contract_address is not provided)
|
|
36
|
+
- ERC20 tokens (when token_contract_address is provided)
|
|
37
|
+
|
|
38
|
+
Only supports Base mainnet network.
|
|
39
|
+
"""
|
|
40
|
+
args_schema: Type[BaseModel] = TransferInput
|
|
41
|
+
|
|
42
|
+
async def _arun(
|
|
43
|
+
self,
|
|
44
|
+
from_address: str,
|
|
45
|
+
to_address: str,
|
|
46
|
+
amount: str,
|
|
47
|
+
decimals: int,
|
|
48
|
+
currency: str,
|
|
49
|
+
token_contract_address: Optional[str],
|
|
50
|
+
) -> Tuple[str, List[ChatMessageAttachment]]:
|
|
51
|
+
"""Create an XMTP transfer transaction request.
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
from_address: The sender address
|
|
55
|
+
to_address: The recipient address
|
|
56
|
+
amount: Amount to transfer
|
|
57
|
+
decimals: Token decimals
|
|
58
|
+
currency: Currency symbol
|
|
59
|
+
token_contract_address: Token contract address (None for ETH)
|
|
60
|
+
config: LangChain runnable config
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Tuple of (content_message, list_of_attachments)
|
|
64
|
+
"""
|
|
65
|
+
# Get context and check network
|
|
66
|
+
context = self.get_context()
|
|
67
|
+
agent = context.agent
|
|
68
|
+
|
|
69
|
+
# Check if agent is on base mainnet
|
|
70
|
+
if agent.network_id != "base-mainnet" and agent.network_id != "base-sepolia":
|
|
71
|
+
raise ValueError(
|
|
72
|
+
f"XMTP transfer only supports base-mainnet or base-sepolia network. "
|
|
73
|
+
f"Current agent network: {agent.network_id}"
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Calculate amount in smallest unit (wei for ETH, token units for ERC20)
|
|
77
|
+
amount_int = int(float(amount) * (10**decimals))
|
|
78
|
+
|
|
79
|
+
if token_contract_address:
|
|
80
|
+
# ERC20 Token Transfer
|
|
81
|
+
transaction_to = token_contract_address
|
|
82
|
+
transaction_value = "0x0" # No ETH value for token transfers
|
|
83
|
+
|
|
84
|
+
# Create ERC20 transfer function call data
|
|
85
|
+
# Function signature: transfer(address,uint256)
|
|
86
|
+
# Method ID: First 4 bytes of keccak256("transfer(address,uint256)")
|
|
87
|
+
method_id = "0xa9059cbb" # transfer(address,uint256) method ID
|
|
88
|
+
|
|
89
|
+
# Encode to_address (32 bytes, left-padded)
|
|
90
|
+
to_address_clean = to_address.replace("0x", "")
|
|
91
|
+
to_address_padded = to_address_clean.zfill(64)
|
|
92
|
+
|
|
93
|
+
# Encode amount (32 bytes, left-padded)
|
|
94
|
+
amount_hex = hex(amount_int)[2:] # Remove 0x prefix
|
|
95
|
+
amount_padded = amount_hex.zfill(64)
|
|
96
|
+
|
|
97
|
+
# Combine method ID + padded address + padded amount
|
|
98
|
+
call_data = method_id + to_address_padded + amount_padded
|
|
99
|
+
|
|
100
|
+
description = f"Send {amount} {currency} to {to_address}"
|
|
101
|
+
metadata = {
|
|
102
|
+
"description": description,
|
|
103
|
+
"transactionType": "erc20_transfer",
|
|
104
|
+
"currency": currency,
|
|
105
|
+
"amount": amount_int,
|
|
106
|
+
"decimals": decimals,
|
|
107
|
+
"toAddress": to_address,
|
|
108
|
+
"tokenContract": token_contract_address,
|
|
109
|
+
}
|
|
110
|
+
else:
|
|
111
|
+
# ETH Transfer
|
|
112
|
+
transaction_to = to_address
|
|
113
|
+
transaction_value = hex(amount_int)
|
|
114
|
+
call_data = "0x" # No call data for simple ETH transfer
|
|
115
|
+
|
|
116
|
+
description = f"Send {amount} {currency} to {to_address}"
|
|
117
|
+
metadata = {
|
|
118
|
+
"description": description,
|
|
119
|
+
"transactionType": "transfer",
|
|
120
|
+
"currency": currency,
|
|
121
|
+
"amount": amount_int,
|
|
122
|
+
"decimals": decimals,
|
|
123
|
+
"toAddress": to_address,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
# Create XMTP wallet_sendCalls transaction request
|
|
127
|
+
wallet_send_calls = {
|
|
128
|
+
"version": "1.0",
|
|
129
|
+
"from": from_address,
|
|
130
|
+
"chainId": "0x2105", # Base mainnet chain ID (8453 in hex)
|
|
131
|
+
"calls": [
|
|
132
|
+
{
|
|
133
|
+
"to": transaction_to,
|
|
134
|
+
"value": transaction_value,
|
|
135
|
+
"data": call_data,
|
|
136
|
+
"metadata": metadata,
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
# Create ChatMessageAttachment
|
|
142
|
+
attachment: ChatMessageAttachment = {
|
|
143
|
+
"type": ChatMessageAttachmentType.XMTP,
|
|
144
|
+
"url": None,
|
|
145
|
+
"json": wallet_send_calls,
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# Create user message
|
|
149
|
+
content_message = (
|
|
150
|
+
f"I have created a transaction request for transferring {amount} {currency} "
|
|
151
|
+
f"to {to_address} on Base mainnet. "
|
|
152
|
+
f"Please review the transaction details and sign to execute the transfer."
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
return content_message, [attachment]
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.10
|
|
4
4
|
Summary: Intent-based AI Agent Platform - Core Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/crestal-network/intentkit
|
|
6
6
|
Project-URL: Repository, https://github.com/crestal-network/intentkit
|
|
@@ -55,6 +55,7 @@ Requires-Dist: eth-utils>=2.1.0
|
|
|
55
55
|
Requires-Dist: fastapi>=0.115.8
|
|
56
56
|
Requires-Dist: filetype<2.0.0,>=1.2.0
|
|
57
57
|
Requires-Dist: httpx>=0.28.1
|
|
58
|
+
Requires-Dist: jsonref>=1.1.0
|
|
58
59
|
Requires-Dist: langchain-community>=0.3.19
|
|
59
60
|
Requires-Dist: langchain-core>=0.3.43
|
|
60
61
|
Requires-Dist: langchain-mcp-adapters>=0.0.11
|
|
@@ -64,8 +65,8 @@ Requires-Dist: langchain-xai>=0.2.1
|
|
|
64
65
|
Requires-Dist: langchain<0.4.0,>=0.3.25
|
|
65
66
|
Requires-Dist: langgraph-checkpoint-postgres<2.0.23,>=2.0.16
|
|
66
67
|
Requires-Dist: langgraph-checkpoint>=2.0.18
|
|
67
|
-
Requires-Dist: langgraph-prebuilt<0.
|
|
68
|
-
Requires-Dist: langgraph<0.
|
|
68
|
+
Requires-Dist: langgraph-prebuilt<0.7.0,>=0.6.1
|
|
69
|
+
Requires-Dist: langgraph<0.7.0,>=0.6.1
|
|
69
70
|
Requires-Dist: langmem>=0.0.27
|
|
70
71
|
Requires-Dist: mypy-boto3-s3<2.0.0,>=1.37.24
|
|
71
72
|
Requires-Dist: openai>=1.59.6
|