intentkit 0.7.5.dev29__py3-none-any.whl → 0.7.5.dev31__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/core/scheduler.py +92 -0
- intentkit/models/agent_schema.json +9 -9
- {intentkit-0.7.5.dev29.dist-info → intentkit-0.7.5.dev31.dist-info}/METADATA +1 -1
- {intentkit-0.7.5.dev29.dist-info → intentkit-0.7.5.dev31.dist-info}/RECORD +7 -6
- {intentkit-0.7.5.dev29.dist-info → intentkit-0.7.5.dev31.dist-info}/WHEEL +0 -0
- {intentkit-0.7.5.dev29.dist-info → intentkit-0.7.5.dev31.dist-info}/licenses/LICENSE +0 -0
intentkit/__init__.py
CHANGED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""Core scheduler utilities."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Mapping, MutableMapping
|
|
6
|
+
|
|
7
|
+
from apscheduler.jobstores.base import BaseJobStore
|
|
8
|
+
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
|
9
|
+
from apscheduler.triggers.cron import CronTrigger
|
|
10
|
+
|
|
11
|
+
from intentkit.core.agent import (
|
|
12
|
+
update_agent_action_cost,
|
|
13
|
+
update_agents_account_snapshot,
|
|
14
|
+
update_agents_assets,
|
|
15
|
+
update_agents_statistics,
|
|
16
|
+
)
|
|
17
|
+
from intentkit.core.credit import refill_all_free_credits
|
|
18
|
+
from intentkit.models.agent_data import AgentQuota
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def create_scheduler(
|
|
22
|
+
jobstores: Mapping[str, BaseJobStore]
|
|
23
|
+
| MutableMapping[str, BaseJobStore]
|
|
24
|
+
| None = None,
|
|
25
|
+
) -> AsyncIOScheduler:
|
|
26
|
+
"""Create and configure the APScheduler with all periodic tasks."""
|
|
27
|
+
scheduler = AsyncIOScheduler(jobstores=dict(jobstores or {}))
|
|
28
|
+
|
|
29
|
+
# Reset daily quotas at UTC 00:00
|
|
30
|
+
scheduler.add_job(
|
|
31
|
+
AgentQuota.reset_daily_quotas,
|
|
32
|
+
trigger=CronTrigger(hour=0, minute=0, timezone="UTC"),
|
|
33
|
+
id="reset_daily_quotas",
|
|
34
|
+
name="Reset daily quotas",
|
|
35
|
+
replace_existing=True,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# Reset monthly quotas at UTC 00:00 on the first day of each month
|
|
39
|
+
scheduler.add_job(
|
|
40
|
+
AgentQuota.reset_monthly_quotas,
|
|
41
|
+
trigger=CronTrigger(day=1, hour=0, minute=0, timezone="UTC"),
|
|
42
|
+
id="reset_monthly_quotas",
|
|
43
|
+
name="Reset monthly quotas",
|
|
44
|
+
replace_existing=True,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
# Refill free credits every hour at minute 20
|
|
48
|
+
scheduler.add_job(
|
|
49
|
+
refill_all_free_credits,
|
|
50
|
+
trigger=CronTrigger(minute="20", timezone="UTC"),
|
|
51
|
+
id="refill_free_credits",
|
|
52
|
+
name="Refill free credits",
|
|
53
|
+
replace_existing=True,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
# Update agent account snapshots hourly
|
|
57
|
+
scheduler.add_job(
|
|
58
|
+
update_agents_account_snapshot,
|
|
59
|
+
trigger=CronTrigger(minute=0, timezone="UTC"),
|
|
60
|
+
id="update_agent_account_snapshot",
|
|
61
|
+
name="Update agent account snapshots",
|
|
62
|
+
replace_existing=True,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Update agent assets daily at UTC midnight
|
|
66
|
+
scheduler.add_job(
|
|
67
|
+
update_agents_assets,
|
|
68
|
+
trigger=CronTrigger(hour=0, minute=0, timezone="UTC"),
|
|
69
|
+
id="update_agent_assets",
|
|
70
|
+
name="Update agent assets",
|
|
71
|
+
replace_existing=True,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Update agent action costs hourly at minute 40
|
|
75
|
+
scheduler.add_job(
|
|
76
|
+
update_agent_action_cost,
|
|
77
|
+
trigger=CronTrigger(minute="40", timezone="UTC"),
|
|
78
|
+
id="update_agent_action_cost",
|
|
79
|
+
name="Update agent action costs",
|
|
80
|
+
replace_existing=True,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# Update agent statistics daily at UTC 00:01
|
|
84
|
+
scheduler.add_job(
|
|
85
|
+
update_agents_statistics,
|
|
86
|
+
trigger=CronTrigger(hour=0, minute=1, timezone="UTC"),
|
|
87
|
+
id="update_agent_statistics",
|
|
88
|
+
name="Update agent statistics",
|
|
89
|
+
replace_existing=True,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return scheduler
|
|
@@ -9,29 +9,29 @@
|
|
|
9
9
|
"title": "Basic",
|
|
10
10
|
"order": 1
|
|
11
11
|
},
|
|
12
|
+
{
|
|
13
|
+
"id": "skills",
|
|
14
|
+
"title": "Skills",
|
|
15
|
+
"order": 2
|
|
16
|
+
},
|
|
12
17
|
{
|
|
13
18
|
"id": "llm",
|
|
14
19
|
"title": "LLM",
|
|
15
|
-
"order":
|
|
20
|
+
"order": 3
|
|
16
21
|
},
|
|
17
22
|
{
|
|
18
23
|
"id": "onchain",
|
|
19
24
|
"title": "On-Chain",
|
|
20
|
-
"order":
|
|
25
|
+
"order": 4
|
|
21
26
|
},
|
|
22
27
|
{
|
|
23
28
|
"id": "examples",
|
|
24
29
|
"title": "Quick Actions",
|
|
25
|
-
"order":
|
|
30
|
+
"order": 5
|
|
26
31
|
},
|
|
27
32
|
{
|
|
28
33
|
"id": "entrypoint",
|
|
29
34
|
"title": "Communication Channels",
|
|
30
|
-
"order": 5
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"id": "skills",
|
|
34
|
-
"title": "Skills",
|
|
35
35
|
"order": 6
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
"skills": {
|
|
252
252
|
"title": "Skills",
|
|
253
253
|
"type": "object",
|
|
254
|
-
"description": "
|
|
254
|
+
"description": "Please choose the Agent's skills carefully. Excessive skills will pollute the context and reduce the Agent's intelligence. Only select the necessary skills, and it is best not to exceed 10.",
|
|
255
255
|
"x-group": "skills",
|
|
256
256
|
"x-inline": true,
|
|
257
257
|
"properties": {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.7.5.
|
|
3
|
+
Version: 0.7.5.dev31
|
|
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=zIGe_u-b3jyU1CTA6-rhvl7aHStsHpeo7Ezc0Nz04eI,384
|
|
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
|
|
@@ -22,11 +22,12 @@ intentkit/core/credit.py,sha256=b4f4T6G6eeBTMe0L_r8awWtXgUnqiog4IUaymDPYym0,7558
|
|
|
22
22
|
intentkit/core/engine.py,sha256=8-dlYnwg8BIViAWIAFj65s3O29EXCeQlTjf5Yg9Xfww,37597
|
|
23
23
|
intentkit/core/node.py,sha256=Cjekrg5RFtNNj3k_pLAWTZVGzm33Wnn2JtE__RSNMA8,8880
|
|
24
24
|
intentkit/core/prompt.py,sha256=idNx1ono4Maz2i6IBKfaKOBBbEQiWbaSxr2Eb1vZTI4,15482
|
|
25
|
+
intentkit/core/scheduler.py,sha256=De84aTHYoIH18YPooB_GckHts5oGFZg-XQZQcqFvlXc,2842
|
|
25
26
|
intentkit/core/statistics.py,sha256=-IZmxIBzyzZuai7QyfPEY1tx8Q8ydmmcm6eqbSSy_6o,6366
|
|
26
27
|
intentkit/models/agent.py,sha256=2uz2YlyfqbSH4APycI7kQuBen25Tn07cSvgqQivUWWM,69074
|
|
27
28
|
intentkit/models/agent_data.py,sha256=5zq3EPKnygT2P1OHc2IfEmL8hXkjeBND6sJ0JJsvQJg,28370
|
|
28
29
|
intentkit/models/agent_public.json,sha256=0X8Bd2WOobDJLsok8avWNzmzu4uvKSGEyy6Myn53eT4,2802
|
|
29
|
-
intentkit/models/agent_schema.json,sha256=
|
|
30
|
+
intentkit/models/agent_schema.json,sha256=r7mZCGTy3aIL8iHCrucOO71NK8RDtgeL8NT7Fbys0p8,11855
|
|
30
31
|
intentkit/models/app_setting.py,sha256=iYbW63QD91bt4oEYV3wOXHuRFav2b4VXLwb_StgUQtQ,8230
|
|
31
32
|
intentkit/models/base.py,sha256=o-zRjVrak-f5Jokdvj8BjLm8gcC3yYiYMCTLegwT2lA,185
|
|
32
33
|
intentkit/models/chat.py,sha256=cDccEHU8nd7Y5uhrHDCuZGwqrRwhqCaeztMiZcemiug,20469
|
|
@@ -450,7 +451,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
|
|
|
450
451
|
intentkit/utils/s3.py,sha256=A8Nsx5QJyLsxhj9g7oHNy2-m24tjQUhC9URm8Qb1jFw,10057
|
|
451
452
|
intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
|
|
452
453
|
intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
|
|
453
|
-
intentkit-0.7.5.
|
|
454
|
-
intentkit-0.7.5.
|
|
455
|
-
intentkit-0.7.5.
|
|
456
|
-
intentkit-0.7.5.
|
|
454
|
+
intentkit-0.7.5.dev31.dist-info/METADATA,sha256=0e2uBp4xCc6HAtlTfQmQJU_i30BrGB9EWHm07dNqx1c,6331
|
|
455
|
+
intentkit-0.7.5.dev31.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
456
|
+
intentkit-0.7.5.dev31.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
|
|
457
|
+
intentkit-0.7.5.dev31.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|