intentkit 0.6.7.dev3__py3-none-any.whl → 0.6.7.dev5__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-dev3"
6
+ __version__ = "0.6.7-dev5"
7
7
  __author__ = "hyacinthus"
8
8
  __email__ = "hyacinthus@gmail.com"
9
9
 
intentkit/core/agent.py CHANGED
@@ -329,12 +329,15 @@ async def add_autonomous_task(agent_id: str, task: AgentAutonomous) -> AgentAuto
329
329
  # Add the new task
330
330
  current_tasks.append(task)
331
331
 
332
+ # Convert all AgentAutonomous objects to dictionaries for JSON serialization
333
+ serializable_tasks = [task_item.model_dump() for task_item in current_tasks]
334
+
332
335
  # Update the agent in the database
333
336
  async with get_session() as session:
334
337
  update_stmt = (
335
338
  update(AgentTable)
336
339
  .where(AgentTable.id == agent_id)
337
- .values(autonomous=current_tasks)
340
+ .values(autonomous=serializable_tasks)
338
341
  )
339
342
  await session.execute(update_stmt)
340
343
  await session.commit()
@@ -369,7 +372,7 @@ async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
369
372
  task_found = False
370
373
  updated_tasks = []
371
374
  for task_data in current_tasks:
372
- if isinstance(task_data, dict) and task_data.get("id") == task_id:
375
+ if task_data.id == task_id:
373
376
  task_found = True
374
377
  continue
375
378
  updated_tasks.append(task_data)
@@ -379,12 +382,15 @@ async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
379
382
  404, "TaskNotFound", f"Autonomous task with ID {task_id} not found."
380
383
  )
381
384
 
385
+ # Convert remaining AgentAutonomous objects to dictionaries for JSON serialization
386
+ serializable_tasks = [task_item.model_dump() for task_item in updated_tasks]
387
+
382
388
  # Update the agent in the database
383
389
  async with get_session() as session:
384
390
  update_stmt = (
385
391
  update(AgentTable)
386
392
  .where(AgentTable.id == agent_id)
387
- .values(autonomous=updated_tasks)
393
+ .values(autonomous=serializable_tasks)
388
394
  )
389
395
  await session.execute(update_stmt)
390
396
  await session.commit()
@@ -25,9 +25,6 @@ class AddAutonomousTaskInput(BaseModel):
25
25
  description="Cron expression for scheduling operations, mutually exclusive with minutes",
26
26
  )
27
27
  prompt: str = Field(description="Special prompt used during autonomous operation")
28
- enabled: Optional[bool] = Field(
29
- default=False, description="Whether the autonomous configuration is enabled"
30
- )
31
28
 
32
29
 
33
30
  class AddAutonomousTaskOutput(BaseModel):
@@ -48,7 +45,7 @@ class AddAutonomousTask(SystemBaseTool):
48
45
  "The minutes and cron fields are mutually exclusive. But you must provide one of them. "
49
46
  "If user want to add a condition task, you can add a 5 minutes task to check the condition. "
50
47
  "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."
48
+ "then add in the task prompt that it will delete itself after successful execution. "
52
49
  )
53
50
  args_schema = AddAutonomousTaskInput
54
51
 
@@ -59,7 +56,6 @@ class AddAutonomousTask(SystemBaseTool):
59
56
  minutes: Optional[int] = None,
60
57
  cron: Optional[str] = None,
61
58
  prompt: str = "",
62
- enabled: Optional[bool] = False,
63
59
  config: RunnableConfig = None,
64
60
  **kwargs,
65
61
  ) -> AddAutonomousTaskOutput:
@@ -71,7 +67,6 @@ class AddAutonomousTask(SystemBaseTool):
71
67
  minutes: Interval in minutes (mutually exclusive with cron)
72
68
  cron: Cron expression (mutually exclusive with minutes)
73
69
  prompt: Special prompt for autonomous operation
74
- enabled: Whether the task is enabled
75
70
  config: Runtime configuration containing agent context
76
71
 
77
72
  Returns:
@@ -86,7 +81,7 @@ class AddAutonomousTask(SystemBaseTool):
86
81
  minutes=minutes,
87
82
  cron=cron,
88
83
  prompt=prompt,
89
- enabled=enabled,
84
+ enabled=True,
90
85
  )
91
86
 
92
87
  created_task = await self.skill_store.add_autonomous_task(agent_id, task)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intentkit
3
- Version: 0.6.7.dev3
3
+ Version: 0.6.7.dev5
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=jEDQsJO47xUIwls-EQc0IFWyzf1B8syXRENZH-XNXNM,383
1
+ intentkit/__init__.py,sha256=g_sq3U5UU_KYYIIb7TGFo2-oGDGSSIfWKxmXATRLS5Q,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
@@ -13,7 +13,7 @@ intentkit/clients/twitter.py,sha256=Lfa7srHOFnY96SXcElW0jfg7XKS_WliWnXjPZEe6SQc,
13
13
  intentkit/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  intentkit/config/config.py,sha256=Gn3KXgFyh4u0zmb-Awpu4AxvDFaGDa_5GrFrKBbOAXk,7509
15
15
  intentkit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- intentkit/core/agent.py,sha256=5GCcKNqj5FN29VgHErzSS4SdgO4BZ9K1O3A0WepwiAI,14250
16
+ intentkit/core/agent.py,sha256=x_Kz3Vk09ZGDfxBf1sh9CINepGdUiovGGlMZEsBynPI,14553
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
@@ -292,7 +292,7 @@ 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=Rv5Zmka4fE4MAET2nyY3eQ-gLzt4mxueOMQDBKBwDts,3424
295
+ intentkit/skills/system/add_autonomous_task.py,sha256=EzCpCHYICwoum4C8FANj-thOcEhIIRgnf5sUywK1DiA,3204
296
296
  intentkit/skills/system/base.py,sha256=Sm4lSNgbxwGK5YimnBfwi3Hc8E1EwSMZIXsCJbIPiLM,700
297
297
  intentkit/skills/system/delete_autonomous_task.py,sha256=1zChfY3SkWr1V2QFotyitkVLaBsYBtk68qkhyA_qh-A,1741
298
298
  intentkit/skills/system/list_autonomous_tasks.py,sha256=QTPL4He3OuNfil_xLwMwL1uoe1lbww-XZxD1837usuo,1496
@@ -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.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,,
396
+ intentkit-0.6.7.dev5.dist-info/METADATA,sha256=CYzreUD5Z6N3oHKSf8HUgLXEi0LxyDyIR3Mi79lEHT8,6321
397
+ intentkit-0.6.7.dev5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
398
+ intentkit-0.6.7.dev5.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
399
+ intentkit-0.6.7.dev5.dist-info/RECORD,,