intentkit 0.6.7.dev2__py3-none-any.whl → 0.6.7.dev3__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 CHANGED
@@ -3,7 +3,7 @@
3
3
  A powerful platform for building AI agents with blockchain and cryptocurrency capabilities.
4
4
  """
5
5
 
6
- __version__ = "0.6.7-dev2"
6
+ __version__ = "0.6.7-dev3"
7
7
  __author__ = "hyacinthus"
8
8
  __email__ = "hyacinthus@gmail.com"
9
9
 
intentkit/core/engine.py CHANGED
@@ -221,6 +221,45 @@ async def create_agent(
221
221
  ):
222
222
  entrypoint_prompt = agent.telegram_entrypoint_prompt
223
223
  logger.debug("telegram entrypoint prompt added")
224
+ elif entrypoint == AuthorType.TRIGGER.value:
225
+ task_id = (
226
+ config["configurable"]
227
+ .get("chat_id", "")
228
+ .removeprefix("autonomous-")
229
+ )
230
+ # Find the autonomous task by task_id
231
+ autonomous_task = None
232
+ if agent.autonomous:
233
+ for task in agent.autonomous:
234
+ if task.id == task_id:
235
+ autonomous_task = task
236
+ break
237
+
238
+ if autonomous_task:
239
+ # Build detailed task info - always include task_id
240
+ if autonomous_task.name:
241
+ task_info = f"You are running an autonomous task '{autonomous_task.name}' (ID: {task_id})"
242
+ else:
243
+ task_info = (
244
+ f"You are running an autonomous task (ID: {task_id})"
245
+ )
246
+
247
+ # Add description if available
248
+ if autonomous_task.description:
249
+ task_info += f": {autonomous_task.description}"
250
+
251
+ # Add cycle info
252
+ if autonomous_task.minutes:
253
+ task_info += f". This task runs every {autonomous_task.minutes} minute(s)"
254
+ elif autonomous_task.cron:
255
+ task_info += (
256
+ f". This task runs on schedule: {autonomous_task.cron}"
257
+ )
258
+
259
+ entrypoint_prompt = f"{task_info}. "
260
+ else:
261
+ # Fallback if task not found
262
+ entrypoint_prompt = f"You are running an autonomous task. The task id is {task_id}. "
224
263
  if entrypoint_prompt:
225
264
  entrypoint_prompt = await explain_prompt(entrypoint_prompt)
226
265
  final_system_prompt = f"{final_system_prompt}## Entrypoint rules\n\n{entrypoint_prompt}\n\n"
@@ -45,7 +45,10 @@ class AddAutonomousTask(SystemBaseTool):
45
45
  description: str = (
46
46
  "Add a new autonomous task configuration to the agent. "
47
47
  "Allows setting up scheduled operations with custom prompts and intervals. "
48
- "The minutes and cron fields are mutually exclusive. But you must provide one of them."
48
+ "The minutes and cron fields are mutually exclusive. But you must provide one of them. "
49
+ "If user want to add a condition task, you can add a 5 minutes task to check the condition. "
50
+ "If the user does not explicitly state that the condition task should be executed continuously, "
51
+ "then add in the task prompt that it will delete itself after successful execution."
49
52
  )
50
53
  args_schema = AddAutonomousTaskInput
51
54
 
@@ -75,7 +78,7 @@ class AddAutonomousTask(SystemBaseTool):
75
78
  AddAutonomousTaskOutput: The created task
76
79
  """
77
80
  context = self.context_from_config(config)
78
- agent_id = context["agent_id"]
81
+ agent_id = context.agent_id
79
82
 
80
83
  task = AgentAutonomous(
81
84
  name=name,
@@ -47,7 +47,7 @@ class DeleteAutonomousTask(SystemBaseTool):
47
47
  DeleteAutonomousTaskOutput: Confirmation of deletion
48
48
  """
49
49
  context = self.context_from_config(config)
50
- agent_id = context["agent_id"]
50
+ agent_id = context.agent_id
51
51
 
52
52
  await self.skill_store.delete_autonomous_task(agent_id, task_id)
53
53
 
@@ -45,7 +45,7 @@ class ListAutonomousTasks(SystemBaseTool):
45
45
  ListAutonomousTasksOutput: List of autonomous tasks
46
46
  """
47
47
  context = self.context_from_config(config)
48
- agent_id = context["agent_id"]
48
+ agent_id = context.agent_id
49
49
 
50
50
  tasks = await self.skill_store.list_autonomous_tasks(agent_id)
51
51
 
@@ -31,7 +31,7 @@
31
31
  "Agent Owner Only"
32
32
  ],
33
33
  "description": "Retrieve the API key for the agent. If no API key exists, generates and sets a new one.",
34
- "default": "private"
34
+ "default": "disabled"
35
35
  },
36
36
  "regenerate_agent_api_key": {
37
37
  "type": "string",
@@ -45,7 +45,7 @@
45
45
  "Agent Owner Only"
46
46
  ],
47
47
  "description": "Generate a new API key for the agent, replacing any existing key.",
48
- "default": "private"
48
+ "default": "disabled"
49
49
  },
50
50
  "list_autonomous_tasks": {
51
51
  "type": "string",
@@ -59,7 +59,7 @@
59
59
  "Agent Owner Only"
60
60
  ],
61
61
  "description": "List all autonomous task configurations for the agent.",
62
- "default": "private"
62
+ "default": "disabled"
63
63
  },
64
64
  "add_autonomous_task": {
65
65
  "type": "string",
@@ -73,7 +73,7 @@
73
73
  "Agent Owner Only"
74
74
  ],
75
75
  "description": "Add a new autonomous task configuration to the agent.",
76
- "default": "private"
76
+ "default": "disabled"
77
77
  },
78
78
  "delete_autonomous_task": {
79
79
  "type": "string",
@@ -87,7 +87,7 @@
87
87
  "Agent Owner Only"
88
88
  ],
89
89
  "description": "Delete an autonomous task configuration from the agent.",
90
- "default": "private"
90
+ "default": "disabled"
91
91
  }
92
92
  }
93
93
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intentkit
3
- Version: 0.6.7.dev2
3
+ Version: 0.6.7.dev3
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
@@ -1,4 +1,4 @@
1
- intentkit/__init__.py,sha256=j4pfQzvdVs-04Oa90acEli4YPVS92kIGgSFIJV3W2zo,383
1
+ intentkit/__init__.py,sha256=jEDQsJO47xUIwls-EQc0IFWyzf1B8syXRENZH-XNXNM,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
@@ -17,7 +17,7 @@ intentkit/core/agent.py,sha256=5GCcKNqj5FN29VgHErzSS4SdgO4BZ9K1O3A0WepwiAI,14250
17
17
  intentkit/core/api.py,sha256=3GIMJpwduLUSbVPNW6mQVxZncYHH3OlLwdiqFtYtEAE,1208
18
18
  intentkit/core/client.py,sha256=rIwtJVVm-7piXtFNDbeykt9vWdNTecgjW0aA3N-lHnM,1495
19
19
  intentkit/core/credit.py,sha256=vLT47NlLrGyvSU1OP8dkVXV5_VHqRNSeAK5t1FqSSYs,61742
20
- intentkit/core/engine.py,sha256=wuNv2EVKRXxDCwLzC8kgWthXofkEIivHJKyKpQSKgew,40774
20
+ intentkit/core/engine.py,sha256=1JJuTSVs3k57M0aKD87Yx4T86Mc2DeefhLDXcHV13fY,42554
21
21
  intentkit/core/node.py,sha256=RqAdcR1Fcpgw4k7q9l1Sry8LgcuZWdNxSjOHDcoavCI,9108
22
22
  intentkit/core/prompt.py,sha256=RfLhlUktkB2kCr3wfldqq6ZP2l8heZIMc8jVp31KIyQ,3631
23
23
  intentkit/core/skill.py,sha256=WMHEN-0uv8IqvALVDkV_a-0wqYeSbtpN_Xg1RSgrNMc,5188
@@ -292,13 +292,13 @@ intentkit/skills/supabase/supabase.svg,sha256=65_80QCtJiKKV4EAuny_xbOD5JlTONEiq9
292
292
  intentkit/skills/supabase/update_data.py,sha256=Hbwsoa52GZNTPIhWdR9vj9VlcPRUn_vCMOYDzmMoPsI,4023
293
293
  intentkit/skills/supabase/upsert_data.py,sha256=JgKLFPcQkUwnQhqTZojT4Ae53hYULeGEkQ1gxZJEe-c,2538
294
294
  intentkit/skills/system/__init__.py,sha256=kVnWjsFinpLzB9pADRzAkP8BvIjmaqJ9sURVFyfXry4,3354
295
- intentkit/skills/system/add_autonomous_task.py,sha256=iLMa0a1hzCUSpm613aFHXWeboRb6Y_WazMpULjnaM0Q,3125
295
+ intentkit/skills/system/add_autonomous_task.py,sha256=Rv5Zmka4fE4MAET2nyY3eQ-gLzt4mxueOMQDBKBwDts,3424
296
296
  intentkit/skills/system/base.py,sha256=Sm4lSNgbxwGK5YimnBfwi3Hc8E1EwSMZIXsCJbIPiLM,700
297
- intentkit/skills/system/delete_autonomous_task.py,sha256=t2tNSECIUmSbhP7AFAPhvaE8OzD2cB_bY5D-_8VGq2w,1744
298
- intentkit/skills/system/list_autonomous_tasks.py,sha256=fFLiJm65r2JqcCKC9-7E-GvhvDuAx5orHSa8Xtq_rlQ,1499
297
+ intentkit/skills/system/delete_autonomous_task.py,sha256=1zChfY3SkWr1V2QFotyitkVLaBsYBtk68qkhyA_qh-A,1741
298
+ intentkit/skills/system/list_autonomous_tasks.py,sha256=QTPL4He3OuNfil_xLwMwL1uoe1lbww-XZxD1837usuo,1496
299
299
  intentkit/skills/system/read_agent_api_key.py,sha256=x8DIQwDxZ1MONz4tyN3o6QUf2-2aEjZd4yVOY28-IaU,3410
300
300
  intentkit/skills/system/regenerate_agent_api_key.py,sha256=AiFXOEIRxXJRWiDufKCi3_ViyAyK19P1XZOleM1eQUc,3070
301
- intentkit/skills/system/schema.json,sha256=Fmk4vwot7Cho1IkaDjn6g-puVJMHRWahfkJyWPnfFvY,2681
301
+ intentkit/skills/system/schema.json,sha256=w5bjnWd6-5dG2irT3w8SJBmdrn7XkUevIgBWuJD9XgM,2686
302
302
  intentkit/skills/system/system.svg,sha256=PVbC6r6rOhvht0lB1fcxDNTcbMUa7haHAkJ8rxp7gm0,3740
303
303
  intentkit/skills/tavily/README.md,sha256=VagMkuHrS_ge2Sir9M9CoeqmWc_rysKhTO9-LGICQsA,2840
304
304
  intentkit/skills/tavily/__init__.py,sha256=PDtH-O3fdAPCc3lGMbgcXKK1fDdkTO1CW-40825FtGU,2386
@@ -393,7 +393,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
393
393
  intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
394
394
  intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
395
395
  intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
396
- intentkit-0.6.7.dev2.dist-info/METADATA,sha256=xZ4mswNvfOe5bw4nuk6s1VfECytQIEvizMmbamCULYI,6321
397
- intentkit-0.6.7.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
398
- intentkit-0.6.7.dev2.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
399
- intentkit-0.6.7.dev2.dist-info/RECORD,,
396
+ intentkit-0.6.7.dev3.dist-info/METADATA,sha256=ImFGB-wEEO04dBYmcADlFzTC7kkgUp8Gb3iAn_afSPA,6321
397
+ intentkit-0.6.7.dev3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
398
+ intentkit-0.6.7.dev3.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
399
+ intentkit-0.6.7.dev3.dist-info/RECORD,,