intentkit 0.7.4rc1__py3-none-any.whl → 0.7.4rc2__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.
- intentkit/__init__.py +1 -1
- intentkit/clients/cdp.py +1 -1
- intentkit/core/agent.py +465 -3
- intentkit/core/engine.py +7 -26
- intentkit/core/prompt.py +1 -1
- intentkit/models/agent.py +194 -235
- intentkit/models/agent_schema.json +0 -39
- intentkit/models/db.py +1 -1
- intentkit/models/user.py +12 -5
- intentkit/utils/chain.py +3 -3
- {intentkit-0.7.4rc1.dist-info → intentkit-0.7.4rc2.dist-info}/METADATA +1 -1
- {intentkit-0.7.4rc1.dist-info → intentkit-0.7.4rc2.dist-info}/RECORD +14 -15
- intentkit/core/skill.py +0 -200
- {intentkit-0.7.4rc1.dist-info → intentkit-0.7.4rc2.dist-info}/WHEEL +0 -0
- {intentkit-0.7.4rc1.dist-info → intentkit-0.7.4rc2.dist-info}/licenses/LICENSE +0 -0
intentkit/utils/chain.py
CHANGED
|
@@ -422,9 +422,9 @@ class QuicknodeChainProvider(ChainProvider):
|
|
|
422
422
|
)
|
|
423
423
|
|
|
424
424
|
except httpx.HTTPStatusError as http_err:
|
|
425
|
-
raise (f"Quicknode API HTTP Error: {http_err}")
|
|
425
|
+
raise Exception(f"Quicknode API HTTP Error: {http_err}")
|
|
426
426
|
except httpx.RequestError as req_err:
|
|
427
|
-
raise (f"Quicknode API Request Error: {req_err}")
|
|
427
|
+
raise Exception(f"Quicknode API Request Error: {req_err}")
|
|
428
428
|
except (
|
|
429
429
|
KeyError,
|
|
430
430
|
TypeError,
|
|
@@ -433,4 +433,4 @@ class QuicknodeChainProvider(ChainProvider):
|
|
|
433
433
|
f"Error processing QuickNode API response: {e}. Check the API response format."
|
|
434
434
|
)
|
|
435
435
|
except Exception as e:
|
|
436
|
-
raise (f"Quicknode API An unexpected error occurred: {e}")
|
|
436
|
+
raise Exception(f"Quicknode API An unexpected error occurred: {e}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4rc2
|
|
4
4
|
Summary: Intent-based AI Agent Platform - Core Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/crestalnetwork/intentkit
|
|
6
6
|
Project-URL: Repository, https://github.com/crestalnetwork/intentkit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
intentkit/__init__.py,sha256=
|
|
1
|
+
intentkit/__init__.py,sha256=TwN56FgZdyyNNs4AUkvOPimEjE4SzDZJjIA1mdophCA,383
|
|
2
2
|
intentkit/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
intentkit/abstracts/agent.py,sha256=108gb5W8Q1Sy4G55F2_ZFv2-_CnY76qrBtpIr0Oxxqk,1489
|
|
4
4
|
intentkit/abstracts/api.py,sha256=ZUc24vaQvQVbbjznx7bV0lbbQxdQPfEV8ZxM2R6wZWo,166
|
|
@@ -7,36 +7,35 @@ intentkit/abstracts/graph.py,sha256=sX5hVemXsODvwIYLHufaf-zSXmW97bXRoZuyxYqaEV4,
|
|
|
7
7
|
intentkit/abstracts/skill.py,sha256=cIJ6BkASD31U1IEkE8rdAawq99w_xsg0lt3oalqa1ZA,5071
|
|
8
8
|
intentkit/abstracts/twitter.py,sha256=cEtP7ygR_b-pHdc9i8kBuyooz1cPoGUGwsBHDpowJyY,1262
|
|
9
9
|
intentkit/clients/__init__.py,sha256=pT_4I7drnuiNWPvYAU_CUAv50PjyaqEAsm_kp-vMPW4,372
|
|
10
|
-
intentkit/clients/cdp.py,sha256=
|
|
10
|
+
intentkit/clients/cdp.py,sha256=OKX-itClQpnUSQxExTVzMtcZ29WaGF_t_dYBvc9bTIM,7014
|
|
11
11
|
intentkit/clients/twitter.py,sha256=Lfa7srHOFnY96SXcElW0jfg7XKS_WliWnXjPZEe6SQc,18976
|
|
12
12
|
intentkit/clients/web3.py,sha256=A-w4vBPXHpDh8svsEFj_LkmvRgoDTZw4E-84S-UC9ws,1023
|
|
13
13
|
intentkit/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
intentkit/config/config.py,sha256=xDbm5KSXt4rZh2Nak0bmrYv5Rf__mJz8aJ9PHzar-Lk,8941
|
|
15
15
|
intentkit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
intentkit/core/agent.py,sha256=
|
|
16
|
+
intentkit/core/agent.py,sha256=9M5AmgBEJrELlnqRb3Bd2PWFIrGvie3xL1gy4PSjI8I,31687
|
|
17
17
|
intentkit/core/api.py,sha256=WfoaHNquujYJIpNPuTR1dSaaxog0S3X2W4lG9Ehmkm4,3284
|
|
18
18
|
intentkit/core/chat.py,sha256=dnwqAUk5uVNyhsX9dNZIHzleW1WbI5XSyHdCsD1ORR8,1639
|
|
19
19
|
intentkit/core/client.py,sha256=J5K7f08-ucszBKAbn9K3QNOFKIC__7amTbKYii1jFkI,3056
|
|
20
20
|
intentkit/core/credit.py,sha256=vW3I5c_fKe_bmFvOc9_EaMsMuAbqw-XQ_NbJg_okdA8,75284
|
|
21
|
-
intentkit/core/engine.py,sha256=
|
|
21
|
+
intentkit/core/engine.py,sha256=c5EJp2uxseSv5CLCEAH1UPgqLw6d2C_KlJzOQxSyrM4,36025
|
|
22
22
|
intentkit/core/node.py,sha256=7h9zgDSd928bzUi3m3EZnKkhbwqlbRAQUr_uz7gKB5Y,8880
|
|
23
|
-
intentkit/core/prompt.py,sha256=
|
|
24
|
-
intentkit/
|
|
25
|
-
intentkit/models/agent.py,sha256=uC5AErdVucaEajKCXAcF6C3VwYRVIhXTIfOBp-n-Xhg,66310
|
|
23
|
+
intentkit/core/prompt.py,sha256=ssiyKHDNIjQOLU0KwUlIFX3jy51TqgeKOxrwnW4HBkw,15875
|
|
24
|
+
intentkit/models/agent.py,sha256=Et9X9Geg5sZjJC3KsqpWEk2PyqoM6jn0aOQ4vUvjVPY,64826
|
|
26
25
|
intentkit/models/agent_data.py,sha256=mVsiK8TziYa1W1ujU1KwI9osIVIeSM7XJEogGRL1WVU,28263
|
|
27
|
-
intentkit/models/agent_schema.json,sha256=
|
|
26
|
+
intentkit/models/agent_schema.json,sha256=B7qUrQk8BqlRmyWDpK5XeMRf9_5rgAbrJ88ZtuUvpPw,20237
|
|
28
27
|
intentkit/models/app_setting.py,sha256=iYbW63QD91bt4oEYV3wOXHuRFav2b4VXLwb_StgUQtQ,8230
|
|
29
28
|
intentkit/models/base.py,sha256=o-zRjVrak-f5Jokdvj8BjLm8gcC3yYiYMCTLegwT2lA,185
|
|
30
29
|
intentkit/models/chat.py,sha256=cDccEHU8nd7Y5uhrHDCuZGwqrRwhqCaeztMiZcemiug,20469
|
|
31
30
|
intentkit/models/conversation.py,sha256=nrbDIw-3GK5BYi_xkI15FLdx4a6SNrFK8wfAGLCsrqk,9032
|
|
32
31
|
intentkit/models/credit.py,sha256=JQ_ITxOM98XTkllxGDduKGf9-ZF4R-rYixN3OgNvl-Y,52275
|
|
33
|
-
intentkit/models/db.py,sha256=
|
|
32
|
+
intentkit/models/db.py,sha256=1uX1DJZGMx9A3lq6WKSTSwpXhWgWaiki55-iiED8BYM,5082
|
|
34
33
|
intentkit/models/db_mig.py,sha256=vT6Tanm-BHC2T7dTztuB1UG494EFBAlHADKsNzR6xaQ,3577
|
|
35
34
|
intentkit/models/generator.py,sha256=lyZu9U9rZUGkqd_QT5SAhay9DY358JJY8EhDSpN8I1M,10298
|
|
36
35
|
intentkit/models/llm.py,sha256=ZaCuIwoPQ7e_FGCTiwjSpxpLoqBFt-i-MLwRkffNylM,27211
|
|
37
36
|
intentkit/models/redis.py,sha256=UoN8jqLREO1VO9_w6m-JhldpP19iEHj4TiGVCMutQW4,3702
|
|
38
37
|
intentkit/models/skill.py,sha256=h_2wtKEbYE29TLsMdaSnjfOv6vXY6GwMU_abw-ONX28,16374
|
|
39
|
-
intentkit/models/user.py,sha256=
|
|
38
|
+
intentkit/models/user.py,sha256=r2UWpuBJbS6bbfS-fz_rAtOTHL3zodRt1rccA7HhAQM,9902
|
|
40
39
|
intentkit/skills/__init__.py,sha256=WkjmKB4xvy36zyXMroPMf_DTPgQloNS3L73nVnBmuQI,303
|
|
41
40
|
intentkit/skills/base.py,sha256=2Lw3LpqKPYzsxRlAaSXz5ObG-LQtHfDxsyT4bgPYEhE,5705
|
|
42
41
|
intentkit/skills/skills.toml,sha256=BCqO6nQVaU3wSpY0Js1xjakLzfttsq6hcHcJbw7q958,2734
|
|
@@ -411,14 +410,14 @@ intentkit/skills/xmtp/swap.py,sha256=h3y0cZT0PfoofRRuoYg-1l5iXz5DWza6ltGRFfQrkZQ
|
|
|
411
410
|
intentkit/skills/xmtp/transfer.py,sha256=43t1LG9B_8v5cbGH12F68JDsfd90a9_x2KUsJXnSMbE,7916
|
|
412
411
|
intentkit/skills/xmtp/xmtp.png,sha256=vQzT-71zIb8aPodg-GkGSQbBnjGAPczWGm3es2ZkJe8,6681
|
|
413
412
|
intentkit/utils/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
414
|
-
intentkit/utils/chain.py,sha256=
|
|
413
|
+
intentkit/utils/chain.py,sha256=PubXjJM_kt6NCwzpKm5uXQ596QvKFLfr2L_DP9ntHAs,15162
|
|
415
414
|
intentkit/utils/error.py,sha256=sDMIQPAlE5igzQKCsyN7BLR1otgErcNm0Uak_Rfl8SI,4755
|
|
416
415
|
intentkit/utils/logging.py,sha256=bhwZi5vscjBTd9kaNp_L6ijrfv9Sl3lsr4ARaUB4Iec,2389
|
|
417
416
|
intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
|
|
418
417
|
intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
|
|
419
418
|
intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
|
|
420
419
|
intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
|
|
421
|
-
intentkit-0.7.
|
|
422
|
-
intentkit-0.7.
|
|
423
|
-
intentkit-0.7.
|
|
424
|
-
intentkit-0.7.
|
|
420
|
+
intentkit-0.7.4rc2.dist-info/METADATA,sha256=Fr3MzecqjCpaxFWEDJEc0n228nDSqaWou0m4crdrul0,6407
|
|
421
|
+
intentkit-0.7.4rc2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
422
|
+
intentkit-0.7.4rc2.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
|
|
423
|
+
intentkit-0.7.4rc2.dist-info/RECORD,,
|
intentkit/core/skill.py
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, List, Optional
|
|
2
|
-
|
|
3
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
4
|
-
from intentkit.config.config import config
|
|
5
|
-
from intentkit.core.agent import (
|
|
6
|
-
add_autonomous_task as _add_autonomous_task,
|
|
7
|
-
)
|
|
8
|
-
from intentkit.core.agent import (
|
|
9
|
-
delete_autonomous_task as _delete_autonomous_task,
|
|
10
|
-
)
|
|
11
|
-
from intentkit.core.agent import (
|
|
12
|
-
list_autonomous_tasks as _list_autonomous_tasks,
|
|
13
|
-
)
|
|
14
|
-
from intentkit.core.agent import (
|
|
15
|
-
update_autonomous_task as _update_autonomous_task,
|
|
16
|
-
)
|
|
17
|
-
from intentkit.models.agent import Agent, AgentAutonomous
|
|
18
|
-
from intentkit.models.agent_data import AgentData, AgentQuota
|
|
19
|
-
from intentkit.models.skill import (
|
|
20
|
-
AgentSkillData,
|
|
21
|
-
AgentSkillDataCreate,
|
|
22
|
-
ThreadSkillData,
|
|
23
|
-
ThreadSkillDataCreate,
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class SkillStore(SkillStoreABC):
|
|
28
|
-
"""Implementation of skill data storage operations.
|
|
29
|
-
|
|
30
|
-
This class provides concrete implementations for storing and retrieving
|
|
31
|
-
skill-related data for both agents and threads.
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
@staticmethod
|
|
35
|
-
def get_system_config(key: str) -> Any:
|
|
36
|
-
# TODO: maybe need a whitelist here
|
|
37
|
-
if hasattr(config, key):
|
|
38
|
-
return getattr(config, key)
|
|
39
|
-
return None
|
|
40
|
-
|
|
41
|
-
@staticmethod
|
|
42
|
-
async def get_agent_config(agent_id: str) -> Optional[Agent]:
|
|
43
|
-
return await Agent.get(agent_id)
|
|
44
|
-
|
|
45
|
-
@staticmethod
|
|
46
|
-
async def get_agent_data(agent_id: str) -> AgentData:
|
|
47
|
-
return await AgentData.get(agent_id)
|
|
48
|
-
|
|
49
|
-
@staticmethod
|
|
50
|
-
async def set_agent_data(agent_id: str, data: Dict) -> AgentData:
|
|
51
|
-
return await AgentData.patch(agent_id, data)
|
|
52
|
-
|
|
53
|
-
@staticmethod
|
|
54
|
-
async def get_agent_quota(agent_id: str) -> AgentQuota:
|
|
55
|
-
return await AgentQuota.get(agent_id)
|
|
56
|
-
|
|
57
|
-
@staticmethod
|
|
58
|
-
async def get_agent_skill_data(
|
|
59
|
-
agent_id: str, skill: str, key: str
|
|
60
|
-
) -> Optional[Dict[str, Any]]:
|
|
61
|
-
"""Get skill data for an agent.
|
|
62
|
-
|
|
63
|
-
Args:
|
|
64
|
-
agent_id: ID of the agent
|
|
65
|
-
skill: Name of the skill
|
|
66
|
-
key: Data key
|
|
67
|
-
|
|
68
|
-
Returns:
|
|
69
|
-
Dictionary containing the skill data if found, None otherwise
|
|
70
|
-
"""
|
|
71
|
-
return await AgentSkillData.get(agent_id, skill, key)
|
|
72
|
-
|
|
73
|
-
@staticmethod
|
|
74
|
-
async def save_agent_skill_data(
|
|
75
|
-
agent_id: str, skill: str, key: str, data: Dict[str, Any]
|
|
76
|
-
) -> None:
|
|
77
|
-
"""Save or update skill data for an agent.
|
|
78
|
-
|
|
79
|
-
Args:
|
|
80
|
-
agent_id: ID of the agent
|
|
81
|
-
skill: Name of the skill
|
|
82
|
-
key: Data key
|
|
83
|
-
data: JSON data to store
|
|
84
|
-
"""
|
|
85
|
-
skill_data = AgentSkillDataCreate(
|
|
86
|
-
agent_id=agent_id,
|
|
87
|
-
skill=skill,
|
|
88
|
-
key=key,
|
|
89
|
-
data=data,
|
|
90
|
-
)
|
|
91
|
-
await skill_data.save()
|
|
92
|
-
|
|
93
|
-
@staticmethod
|
|
94
|
-
async def delete_agent_skill_data(agent_id: str, skill: str, key: str) -> None:
|
|
95
|
-
"""Delete skill data for an agent.
|
|
96
|
-
|
|
97
|
-
Args:
|
|
98
|
-
agent_id: ID of the agent
|
|
99
|
-
skill: Name of the skill
|
|
100
|
-
key: Data key
|
|
101
|
-
"""
|
|
102
|
-
await AgentSkillData.delete(agent_id, skill, key)
|
|
103
|
-
|
|
104
|
-
@staticmethod
|
|
105
|
-
async def get_thread_skill_data(
|
|
106
|
-
thread_id: str, skill: str, key: str
|
|
107
|
-
) -> Optional[Dict[str, Any]]:
|
|
108
|
-
"""Get skill data for a thread.
|
|
109
|
-
|
|
110
|
-
Args:
|
|
111
|
-
thread_id: ID of the thread
|
|
112
|
-
skill: Name of the skill
|
|
113
|
-
key: Data key
|
|
114
|
-
|
|
115
|
-
Returns:
|
|
116
|
-
Dictionary containing the skill data if found, None otherwise
|
|
117
|
-
"""
|
|
118
|
-
return await ThreadSkillData.get(thread_id, skill, key)
|
|
119
|
-
|
|
120
|
-
@staticmethod
|
|
121
|
-
async def save_thread_skill_data(
|
|
122
|
-
thread_id: str,
|
|
123
|
-
agent_id: str,
|
|
124
|
-
skill: str,
|
|
125
|
-
key: str,
|
|
126
|
-
data: Dict[str, Any],
|
|
127
|
-
) -> None:
|
|
128
|
-
"""Save or update skill data for a thread.
|
|
129
|
-
|
|
130
|
-
Args:
|
|
131
|
-
thread_id: ID of the thread
|
|
132
|
-
agent_id: ID of the agent that owns this thread
|
|
133
|
-
skill: Name of the skill
|
|
134
|
-
key: Data key
|
|
135
|
-
data: JSON data to store
|
|
136
|
-
"""
|
|
137
|
-
skill_data = ThreadSkillDataCreate(
|
|
138
|
-
thread_id=thread_id,
|
|
139
|
-
agent_id=agent_id,
|
|
140
|
-
skill=skill,
|
|
141
|
-
key=key,
|
|
142
|
-
data=data,
|
|
143
|
-
)
|
|
144
|
-
await skill_data.save()
|
|
145
|
-
|
|
146
|
-
@staticmethod
|
|
147
|
-
async def list_autonomous_tasks(agent_id: str) -> List[AgentAutonomous]:
|
|
148
|
-
"""List all autonomous tasks for an agent.
|
|
149
|
-
|
|
150
|
-
Args:
|
|
151
|
-
agent_id: ID of the agent
|
|
152
|
-
|
|
153
|
-
Returns:
|
|
154
|
-
List[AgentAutonomous]: List of autonomous task configurations
|
|
155
|
-
"""
|
|
156
|
-
return await _list_autonomous_tasks(agent_id)
|
|
157
|
-
|
|
158
|
-
@staticmethod
|
|
159
|
-
async def add_autonomous_task(
|
|
160
|
-
agent_id: str, task: AgentAutonomous
|
|
161
|
-
) -> AgentAutonomous:
|
|
162
|
-
"""Add a new autonomous task to an agent.
|
|
163
|
-
|
|
164
|
-
Args:
|
|
165
|
-
agent_id: ID of the agent
|
|
166
|
-
task: Autonomous task configuration
|
|
167
|
-
|
|
168
|
-
Returns:
|
|
169
|
-
AgentAutonomous: The created task
|
|
170
|
-
"""
|
|
171
|
-
return await _add_autonomous_task(agent_id, task)
|
|
172
|
-
|
|
173
|
-
@staticmethod
|
|
174
|
-
async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
|
|
175
|
-
"""Delete an autonomous task from an agent.
|
|
176
|
-
|
|
177
|
-
Args:
|
|
178
|
-
agent_id: ID of the agent
|
|
179
|
-
task_id: ID of the task to delete
|
|
180
|
-
"""
|
|
181
|
-
await _delete_autonomous_task(agent_id, task_id)
|
|
182
|
-
|
|
183
|
-
@staticmethod
|
|
184
|
-
async def update_autonomous_task(
|
|
185
|
-
agent_id: str, task_id: str, task_updates: dict
|
|
186
|
-
) -> AgentAutonomous:
|
|
187
|
-
"""Update an autonomous task for an agent.
|
|
188
|
-
|
|
189
|
-
Args:
|
|
190
|
-
agent_id: ID of the agent
|
|
191
|
-
task_id: ID of the task to update
|
|
192
|
-
task_updates: Dictionary containing fields to update
|
|
193
|
-
|
|
194
|
-
Returns:
|
|
195
|
-
AgentAutonomous: The updated task
|
|
196
|
-
"""
|
|
197
|
-
return await _update_autonomous_task(agent_id, task_id, task_updates)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
skill_store = SkillStore()
|
|
File without changes
|
|
File without changes
|