intentkit 0.8.11.dev1__py3-none-any.whl → 0.8.12__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 +4 -0
- intentkit/abstracts/skill.py +2 -140
- intentkit/clients/twitter.py +35 -28
- intentkit/core/agent.py +2 -374
- intentkit/core/asset.py +63 -16
- intentkit/core/engine.py +16 -7
- intentkit/core/scheduler.py +8 -8
- intentkit/models/agent.py +109 -94
- intentkit/models/agent_schema.json +6 -9
- intentkit/models/llm.csv +15 -12
- intentkit/models/skill.py +38 -40
- intentkit/skills/acolyt/__init__.py +2 -9
- intentkit/skills/acolyt/base.py +2 -5
- intentkit/skills/aixbt/__init__.py +2 -13
- intentkit/skills/aixbt/base.py +0 -4
- intentkit/skills/aixbt/projects.py +1 -2
- intentkit/skills/allora/__init__.py +2 -9
- intentkit/skills/allora/base.py +2 -5
- intentkit/skills/base.py +168 -27
- intentkit/skills/basename/__init__.py +1 -3
- intentkit/skills/carv/__init__.py +116 -121
- intentkit/skills/carv/base.py +184 -185
- intentkit/skills/casino/__init__.py +4 -15
- intentkit/skills/casino/base.py +0 -4
- intentkit/skills/casino/deck_draw.py +4 -6
- intentkit/skills/casino/deck_shuffle.py +5 -4
- intentkit/skills/casino/dice_roll.py +1 -2
- intentkit/skills/cdp/__init__.py +0 -5
- intentkit/skills/cdp/base.py +0 -4
- intentkit/skills/cdp/schema.json +1 -17
- intentkit/skills/chainlist/__init__.py +2 -7
- intentkit/skills/chainlist/base.py +0 -4
- intentkit/skills/common/__init__.py +2 -9
- intentkit/skills/common/base.py +0 -4
- intentkit/skills/cookiefun/__init__.py +6 -9
- intentkit/skills/cookiefun/base.py +0 -4
- intentkit/skills/cryptocompare/__init__.py +7 -24
- intentkit/skills/cryptocompare/base.py +4 -18
- intentkit/skills/cryptocompare/fetch_news.py +1 -1
- intentkit/skills/cryptocompare/fetch_price.py +1 -1
- intentkit/skills/cryptocompare/fetch_top_exchanges.py +1 -1
- intentkit/skills/cryptocompare/fetch_top_market_cap.py +1 -1
- intentkit/skills/cryptocompare/fetch_top_volume.py +1 -1
- intentkit/skills/cryptocompare/fetch_trading_signals.py +1 -1
- intentkit/skills/cryptopanic/__init__.py +3 -6
- intentkit/skills/cryptopanic/base.py +53 -55
- intentkit/skills/cryptopanic/fetch_crypto_news.py +0 -2
- intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +1 -3
- intentkit/skills/dapplooker/__init__.py +2 -9
- intentkit/skills/dapplooker/base.py +2 -5
- intentkit/skills/defillama/__init__.py +24 -74
- intentkit/skills/defillama/base.py +3 -13
- intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +2 -2
- intentkit/skills/defillama/coins/fetch_block.py +2 -2
- intentkit/skills/defillama/coins/fetch_current_prices.py +2 -2
- intentkit/skills/defillama/coins/fetch_first_price.py +2 -2
- intentkit/skills/defillama/coins/fetch_historical_prices.py +2 -2
- intentkit/skills/defillama/coins/fetch_price_chart.py +2 -2
- intentkit/skills/defillama/coins/fetch_price_percentage.py +2 -2
- intentkit/skills/defillama/fees/fetch_fees_overview.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +2 -2
- intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +2 -2
- intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +2 -2
- intentkit/skills/defillama/tvl/fetch_chains.py +2 -2
- intentkit/skills/defillama/tvl/fetch_historical_tvl.py +2 -2
- intentkit/skills/defillama/tvl/fetch_protocol.py +2 -2
- intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +2 -2
- intentkit/skills/defillama/tvl/fetch_protocols.py +2 -2
- intentkit/skills/defillama/volumes/fetch_dex_overview.py +2 -2
- intentkit/skills/defillama/volumes/fetch_dex_summary.py +2 -2
- intentkit/skills/defillama/volumes/fetch_options_overview.py +2 -2
- intentkit/skills/defillama/yields/fetch_pool_chart.py +2 -2
- intentkit/skills/defillama/yields/fetch_pools.py +2 -2
- intentkit/skills/dexscreener/__init__.py +97 -102
- intentkit/skills/dexscreener/base.py +125 -130
- intentkit/skills/dexscreener/get_pair_info.py +2 -3
- intentkit/skills/dexscreener/get_token_pairs.py +2 -3
- intentkit/skills/dexscreener/get_tokens_info.py +2 -3
- intentkit/skills/dexscreener/search_token.py +2 -4
- intentkit/skills/dune_analytics/__init__.py +4 -6
- intentkit/skills/dune_analytics/base.py +50 -52
- intentkit/skills/dune_analytics/fetch_kol_buys.py +0 -2
- intentkit/skills/dune_analytics/fetch_nation_metrics.py +0 -2
- intentkit/skills/elfa/__init__.py +5 -18
- intentkit/skills/elfa/base.py +8 -10
- intentkit/skills/enso/__init__.py +9 -29
- intentkit/skills/enso/base.py +3 -6
- intentkit/skills/enso/networks.py +1 -6
- intentkit/skills/enso/route.py +4 -8
- intentkit/skills/enso/tokens.py +2 -12
- intentkit/skills/erc20/__init__.py +1 -5
- intentkit/skills/erc721/__init__.py +1 -3
- intentkit/skills/firecrawl/__init__.py +5 -18
- intentkit/skills/firecrawl/base.py +2 -5
- intentkit/skills/firecrawl/clear.py +3 -6
- intentkit/skills/firecrawl/crawl.py +10 -9
- intentkit/skills/firecrawl/query.py +3 -1
- intentkit/skills/firecrawl/scrape.py +10 -14
- intentkit/skills/firecrawl/utils.py +39 -31
- intentkit/skills/github/__init__.py +2 -7
- intentkit/skills/github/base.py +0 -4
- intentkit/skills/heurist/__init__.py +8 -27
- intentkit/skills/heurist/base.py +2 -5
- intentkit/skills/heurist/image_generation_animagine_xl.py +5 -5
- intentkit/skills/heurist/image_generation_arthemy_comics.py +5 -5
- intentkit/skills/heurist/image_generation_arthemy_real.py +5 -5
- intentkit/skills/heurist/image_generation_braindance.py +5 -5
- intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +5 -5
- intentkit/skills/heurist/image_generation_flux_1_dev.py +5 -5
- intentkit/skills/heurist/image_generation_sdxl.py +5 -5
- intentkit/skills/http/__init__.py +4 -15
- intentkit/skills/http/base.py +0 -4
- intentkit/skills/lifi/__init__.py +1 -6
- intentkit/skills/lifi/base.py +0 -4
- intentkit/skills/lifi/token_execute.py +1 -4
- intentkit/skills/lifi/token_quote.py +1 -3
- intentkit/skills/moralis/__init__.py +3 -7
- intentkit/skills/moralis/base.py +2 -5
- intentkit/skills/morpho/__init__.py +1 -3
- intentkit/skills/nation/__init__.py +2 -7
- intentkit/skills/nation/base.py +4 -7
- intentkit/skills/openai/__init__.py +5 -18
- intentkit/skills/openai/base.py +8 -10
- intentkit/skills/openai/dalle_image_generation.py +2 -5
- intentkit/skills/openai/gpt_image_generation.py +2 -5
- intentkit/skills/openai/gpt_image_to_image.py +2 -5
- intentkit/skills/openai/image_to_text.py +2 -5
- intentkit/skills/portfolio/__init__.py +11 -35
- intentkit/skills/portfolio/base.py +2 -5
- intentkit/skills/pyth/__init__.py +1 -5
- intentkit/skills/slack/__init__.py +5 -17
- intentkit/skills/slack/base.py +0 -4
- intentkit/skills/supabase/__init__.py +7 -23
- intentkit/skills/supabase/base.py +0 -4
- intentkit/skills/superfluid/__init__.py +1 -3
- intentkit/skills/system/__init__.py +7 -24
- intentkit/skills/system/add_autonomous_task.py +2 -2
- intentkit/skills/system/delete_autonomous_task.py +2 -2
- intentkit/skills/system/edit_autonomous_task.py +2 -4
- intentkit/skills/system/list_autonomous_tasks.py +2 -2
- intentkit/skills/system/read_agent_api_key.py +6 -4
- intentkit/skills/system/regenerate_agent_api_key.py +6 -4
- intentkit/skills/tavily/__init__.py +3 -12
- intentkit/skills/tavily/base.py +2 -5
- intentkit/skills/tavily/tavily_extract.py +1 -2
- intentkit/skills/tavily/tavily_search.py +3 -3
- intentkit/skills/token/__init__.py +5 -10
- intentkit/skills/token/base.py +2 -6
- intentkit/skills/twitter/__init__.py +11 -35
- intentkit/skills/twitter/base.py +18 -29
- intentkit/skills/twitter/follow_user.py +1 -4
- intentkit/skills/twitter/get_mentions.py +2 -8
- intentkit/skills/twitter/get_timeline.py +3 -10
- intentkit/skills/twitter/get_user_by_username.py +1 -4
- intentkit/skills/twitter/get_user_tweets.py +3 -10
- intentkit/skills/twitter/like_tweet.py +1 -4
- intentkit/skills/twitter/post_tweet.py +3 -5
- intentkit/skills/twitter/reply_tweet.py +3 -5
- intentkit/skills/twitter/retweet.py +1 -4
- intentkit/skills/twitter/search_tweets.py +3 -10
- intentkit/skills/unrealspeech/__init__.py +2 -7
- intentkit/skills/unrealspeech/base.py +0 -4
- intentkit/skills/venice_audio/__init__.py +99 -106
- intentkit/skills/venice_audio/base.py +118 -121
- intentkit/skills/venice_audio/venice_audio.py +1 -5
- intentkit/skills/venice_image/__init__.py +147 -154
- intentkit/skills/venice_image/base.py +185 -192
- intentkit/skills/web_scraper/__init__.py +5 -18
- intentkit/skills/web_scraper/base.py +20 -4
- intentkit/skills/web_scraper/document_indexer.py +6 -4
- intentkit/skills/web_scraper/scrape_and_index.py +11 -10
- intentkit/skills/web_scraper/utils.py +38 -38
- intentkit/skills/web_scraper/website_indexer.py +7 -8
- intentkit/skills/weth/__init__.py +1 -5
- intentkit/skills/wow/__init__.py +1 -5
- intentkit/skills/xmtp/__init__.py +4 -15
- {intentkit-0.8.11.dev1.dist-info → intentkit-0.8.12.dist-info}/METADATA +1 -1
- {intentkit-0.8.11.dev1.dist-info → intentkit-0.8.12.dist-info}/RECORD +183 -183
- {intentkit-0.8.11.dev1.dist-info → intentkit-0.8.12.dist-info}/WHEEL +0 -0
- {intentkit-0.8.11.dev1.dist-info → intentkit-0.8.12.dist-info}/licenses/LICENSE +0 -0
intentkit/models/agent.py
CHANGED
|
@@ -436,21 +436,13 @@ class AgentCore(BaseModel):
|
|
|
436
436
|
title="Name",
|
|
437
437
|
description="Display name of the agent",
|
|
438
438
|
max_length=50,
|
|
439
|
-
json_schema_extra={
|
|
440
|
-
"x-group": "basic",
|
|
441
|
-
"x-placeholder": "Name your agent",
|
|
442
|
-
},
|
|
443
439
|
),
|
|
444
440
|
]
|
|
445
441
|
picture: Annotated[
|
|
446
442
|
Optional[str],
|
|
447
443
|
PydanticField(
|
|
448
444
|
default=None,
|
|
449
|
-
description="
|
|
450
|
-
json_schema_extra={
|
|
451
|
-
"x-group": "experimental",
|
|
452
|
-
"x-placeholder": "Upload a picture of your agent",
|
|
453
|
-
},
|
|
445
|
+
description="Avatar of the agent",
|
|
454
446
|
),
|
|
455
447
|
]
|
|
456
448
|
purpose: Annotated[
|
|
@@ -459,14 +451,6 @@ class AgentCore(BaseModel):
|
|
|
459
451
|
default=None,
|
|
460
452
|
description="Purpose or role of the agent",
|
|
461
453
|
max_length=20000,
|
|
462
|
-
json_schema_extra={
|
|
463
|
-
"x-group": "basic",
|
|
464
|
-
"x-placeholder": "Enter agent purpose, it will be a part of the system prompt",
|
|
465
|
-
"pattern": "^(([^#].*)|#[^# ].*|#{3,}[ ].*|$)(\n(([^#].*)|#[^# ].*|#{3,}[ ].*|$))*$",
|
|
466
|
-
"errorMessage": {
|
|
467
|
-
"pattern": "Level 1 and 2 headings (# and ##) are not allowed. Please use level 3+ headings (###, ####, etc.) instead."
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
454
|
),
|
|
471
455
|
]
|
|
472
456
|
personality: Annotated[
|
|
@@ -475,14 +459,6 @@ class AgentCore(BaseModel):
|
|
|
475
459
|
default=None,
|
|
476
460
|
description="Personality traits of the agent",
|
|
477
461
|
max_length=20000,
|
|
478
|
-
json_schema_extra={
|
|
479
|
-
"x-group": "basic",
|
|
480
|
-
"x-placeholder": "Enter agent personality, it will be a part of the system prompt",
|
|
481
|
-
"pattern": "^(([^#].*)|#[^# ].*|#{3,}[ ].*|$)(\n(([^#].*)|#[^# ].*|#{3,}[ ].*|$))*$",
|
|
482
|
-
"errorMessage": {
|
|
483
|
-
"pattern": "Level 1 and 2 headings (# and ##) are not allowed. Please use level 3+ headings (###, ####, etc.) instead."
|
|
484
|
-
},
|
|
485
|
-
},
|
|
486
462
|
),
|
|
487
463
|
]
|
|
488
464
|
principles: Annotated[
|
|
@@ -491,14 +467,6 @@ class AgentCore(BaseModel):
|
|
|
491
467
|
default=None,
|
|
492
468
|
description="Principles or values of the agent",
|
|
493
469
|
max_length=20000,
|
|
494
|
-
json_schema_extra={
|
|
495
|
-
"x-group": "basic",
|
|
496
|
-
"x-placeholder": "Enter agent principles, it will be a part of the system prompt",
|
|
497
|
-
"pattern": "^(([^#].*)|#[^# ].*|#{3,}[ ].*|$)(\n(([^#].*)|#[^# ].*|#{3,}[ ].*|$))*$",
|
|
498
|
-
"errorMessage": {
|
|
499
|
-
"pattern": "Level 1 and 2 headings (# and ##) are not allowed. Please use level 3+ headings (###, ####, etc.) instead."
|
|
500
|
-
},
|
|
501
|
-
},
|
|
502
470
|
),
|
|
503
471
|
]
|
|
504
472
|
# AI part
|
|
@@ -506,10 +474,7 @@ class AgentCore(BaseModel):
|
|
|
506
474
|
str,
|
|
507
475
|
PydanticField(
|
|
508
476
|
default="gpt-5-mini",
|
|
509
|
-
description="
|
|
510
|
-
json_schema_extra={
|
|
511
|
-
"x-group": "ai",
|
|
512
|
-
},
|
|
477
|
+
description="LLM of the agent",
|
|
513
478
|
),
|
|
514
479
|
]
|
|
515
480
|
prompt: Annotated[
|
|
@@ -518,13 +483,6 @@ class AgentCore(BaseModel):
|
|
|
518
483
|
default=None,
|
|
519
484
|
description="Base system prompt that defines the agent's behavior and capabilities",
|
|
520
485
|
max_length=20000,
|
|
521
|
-
json_schema_extra={
|
|
522
|
-
"x-group": "ai",
|
|
523
|
-
"pattern": "^(([^#].*)|#[^# ].*|#{3,}[ ].*|$)(\n(([^#].*)|#[^# ].*|#{3,}[ ].*|$))*$",
|
|
524
|
-
"errorMessage": {
|
|
525
|
-
"pattern": "Level 1 and 2 headings (# and ##) are not allowed. Please use level 3+ headings (###, ####, etc.) instead."
|
|
526
|
-
},
|
|
527
|
-
},
|
|
528
486
|
),
|
|
529
487
|
]
|
|
530
488
|
prompt_append: Annotated[
|
|
@@ -533,13 +491,6 @@ class AgentCore(BaseModel):
|
|
|
533
491
|
default=None,
|
|
534
492
|
description="Additional system prompt that has higher priority than the base prompt",
|
|
535
493
|
max_length=20000,
|
|
536
|
-
json_schema_extra={
|
|
537
|
-
"x-group": "ai",
|
|
538
|
-
"pattern": "^(([^#].*)|#[^# ].*|#{3,}[ ].*|$)(\n(([^#].*)|#[^# ].*|#{3,}[ ].*|$))*$",
|
|
539
|
-
"errorMessage": {
|
|
540
|
-
"pattern": "Level 1 and 2 headings (# and ##) are not allowed. Please use level 3+ headings (###, ####, etc.) instead."
|
|
541
|
-
},
|
|
542
|
-
},
|
|
543
494
|
),
|
|
544
495
|
]
|
|
545
496
|
temperature: Annotated[
|
|
@@ -549,9 +500,6 @@ class AgentCore(BaseModel):
|
|
|
549
500
|
description="The randomness of the generated results is such that the higher the number, the more creative the results will be. However, this also makes them wilder and increases the likelihood of errors. For creative tasks, you can adjust it to above 1, but for rigorous tasks, such as quantitative trading, it's advisable to set it lower, around 0.2. (0.0~2.0)",
|
|
550
501
|
ge=0.0,
|
|
551
502
|
le=2.0,
|
|
552
|
-
json_schema_extra={
|
|
553
|
-
"x-group": "ai",
|
|
554
|
-
},
|
|
555
503
|
),
|
|
556
504
|
]
|
|
557
505
|
frequency_penalty: Annotated[
|
|
@@ -561,9 +509,6 @@ class AgentCore(BaseModel):
|
|
|
561
509
|
description="The frequency penalty is a measure of how much the AI is allowed to repeat itself. A lower value means the AI is more likely to repeat previous responses, while a higher value means the AI is more likely to generate new content. For creative tasks, you can adjust it to 1 or a bit higher. (-2.0~2.0)",
|
|
562
510
|
ge=-2.0,
|
|
563
511
|
le=2.0,
|
|
564
|
-
json_schema_extra={
|
|
565
|
-
"x-group": "ai",
|
|
566
|
-
},
|
|
567
512
|
),
|
|
568
513
|
]
|
|
569
514
|
presence_penalty: Annotated[
|
|
@@ -573,9 +518,6 @@ class AgentCore(BaseModel):
|
|
|
573
518
|
description="The presence penalty is a measure of how much the AI is allowed to deviate from the topic. A higher value means the AI is more likely to deviate from the topic, while a lower value means the AI is more likely to follow the topic. For creative tasks, you can adjust it to 1 or a bit higher. (-2.0~2.0)",
|
|
574
519
|
ge=-2.0,
|
|
575
520
|
le=2.0,
|
|
576
|
-
json_schema_extra={
|
|
577
|
-
"x-group": "ai",
|
|
578
|
-
},
|
|
579
521
|
),
|
|
580
522
|
]
|
|
581
523
|
wallet_provider: Annotated[
|
|
@@ -583,9 +525,6 @@ class AgentCore(BaseModel):
|
|
|
583
525
|
PydanticField(
|
|
584
526
|
default=None,
|
|
585
527
|
description="Provider of the agent's wallet",
|
|
586
|
-
json_schema_extra={
|
|
587
|
-
"x-group": "onchain",
|
|
588
|
-
},
|
|
589
528
|
),
|
|
590
529
|
]
|
|
591
530
|
readonly_wallet_address: Annotated[
|
|
@@ -599,24 +538,16 @@ class AgentCore(BaseModel):
|
|
|
599
538
|
Optional[
|
|
600
539
|
Literal[
|
|
601
540
|
"base-mainnet",
|
|
602
|
-
"base-sepolia",
|
|
603
541
|
"ethereum-mainnet",
|
|
604
|
-
"ethereum-sepolia",
|
|
605
542
|
"polygon-mainnet",
|
|
606
|
-
"polygon-mumbai",
|
|
607
543
|
"arbitrum-mainnet",
|
|
608
|
-
"arbitrum-sepolia",
|
|
609
544
|
"optimism-mainnet",
|
|
610
|
-
"optimism-sepolia",
|
|
611
545
|
"solana",
|
|
612
546
|
]
|
|
613
547
|
],
|
|
614
548
|
PydanticField(
|
|
615
549
|
default="base-mainnet",
|
|
616
550
|
description="Network identifier",
|
|
617
|
-
json_schema_extra={
|
|
618
|
-
"x-group": "onchain",
|
|
619
|
-
},
|
|
620
551
|
),
|
|
621
552
|
]
|
|
622
553
|
skills: Annotated[
|
|
@@ -624,10 +555,6 @@ class AgentCore(BaseModel):
|
|
|
624
555
|
PydanticField(
|
|
625
556
|
default=None,
|
|
626
557
|
description="Dict of skills and their corresponding configurations",
|
|
627
|
-
json_schema_extra={
|
|
628
|
-
"x-group": "skills",
|
|
629
|
-
"x-inline": True,
|
|
630
|
-
},
|
|
631
558
|
),
|
|
632
559
|
]
|
|
633
560
|
|
|
@@ -674,9 +601,6 @@ class AgentUserInput(AgentCore):
|
|
|
674
601
|
PydanticField(
|
|
675
602
|
default="trim",
|
|
676
603
|
description="Strategy for managing short-term memory when context limit is reached. 'trim' removes oldest messages, 'summarize' creates summaries.",
|
|
677
|
-
json_schema_extra={
|
|
678
|
-
"x-group": "ai",
|
|
679
|
-
},
|
|
680
604
|
),
|
|
681
605
|
]
|
|
682
606
|
# autonomous mode
|
|
@@ -698,10 +622,6 @@ class AgentUserInput(AgentCore):
|
|
|
698
622
|
" prompt: |-\n"
|
|
699
623
|
" Say hi [sequence], use number for sequence.\n"
|
|
700
624
|
),
|
|
701
|
-
json_schema_extra={
|
|
702
|
-
"x-group": "autonomous",
|
|
703
|
-
"x-inline": True,
|
|
704
|
-
},
|
|
705
625
|
),
|
|
706
626
|
]
|
|
707
627
|
# if telegram_entrypoint_enabled, the telegram_entrypoint_enabled will be enabled, telegram_config will be checked
|
|
@@ -710,9 +630,6 @@ class AgentUserInput(AgentCore):
|
|
|
710
630
|
PydanticField(
|
|
711
631
|
default=False,
|
|
712
632
|
description="Whether the agent can play telegram bot",
|
|
713
|
-
json_schema_extra={
|
|
714
|
-
"x-group": "entrypoint",
|
|
715
|
-
},
|
|
716
633
|
),
|
|
717
634
|
]
|
|
718
635
|
telegram_entrypoint_prompt: Annotated[
|
|
@@ -721,9 +638,6 @@ class AgentUserInput(AgentCore):
|
|
|
721
638
|
default=None,
|
|
722
639
|
description="Extra prompt for telegram entrypoint",
|
|
723
640
|
max_length=10000,
|
|
724
|
-
json_schema_extra={
|
|
725
|
-
"x-group": "entrypoint",
|
|
726
|
-
},
|
|
727
641
|
),
|
|
728
642
|
]
|
|
729
643
|
telegram_config: Annotated[
|
|
@@ -731,9 +645,6 @@ class AgentUserInput(AgentCore):
|
|
|
731
645
|
PydanticField(
|
|
732
646
|
default=None,
|
|
733
647
|
description="Telegram integration configuration settings",
|
|
734
|
-
json_schema_extra={
|
|
735
|
-
"x-group": "entrypoint",
|
|
736
|
-
},
|
|
737
648
|
),
|
|
738
649
|
]
|
|
739
650
|
xmtp_entrypoint_prompt: Annotated[
|
|
@@ -742,9 +653,6 @@ class AgentUserInput(AgentCore):
|
|
|
742
653
|
default=None,
|
|
743
654
|
description="Extra prompt for xmtp entrypoint, xmtp support is in beta",
|
|
744
655
|
max_length=10000,
|
|
745
|
-
json_schema_extra={
|
|
746
|
-
"x-group": "entrypoint",
|
|
747
|
-
},
|
|
748
656
|
),
|
|
749
657
|
]
|
|
750
658
|
|
|
@@ -1380,6 +1288,113 @@ class Agent(AgentCreate, AgentPublicInfo):
|
|
|
1380
1288
|
return None
|
|
1381
1289
|
return cls.model_validate(item)
|
|
1382
1290
|
|
|
1291
|
+
@staticmethod
|
|
1292
|
+
def _deserialize_autonomous(
|
|
1293
|
+
autonomous_data: Optional[List[Any]],
|
|
1294
|
+
) -> List[AgentAutonomous]:
|
|
1295
|
+
if not autonomous_data:
|
|
1296
|
+
return []
|
|
1297
|
+
|
|
1298
|
+
deserialized: List[AgentAutonomous] = []
|
|
1299
|
+
for entry in autonomous_data:
|
|
1300
|
+
if isinstance(entry, AgentAutonomous):
|
|
1301
|
+
deserialized.append(entry)
|
|
1302
|
+
else:
|
|
1303
|
+
deserialized.append(AgentAutonomous.model_validate(entry))
|
|
1304
|
+
return deserialized
|
|
1305
|
+
|
|
1306
|
+
@staticmethod
|
|
1307
|
+
def _serialize_autonomous(tasks: List[AgentAutonomous]) -> List[Dict[str, Any]]:
|
|
1308
|
+
return [task.model_dump() for task in tasks]
|
|
1309
|
+
|
|
1310
|
+
@staticmethod
|
|
1311
|
+
def _autonomous_not_allowed_error() -> IntentKitAPIError:
|
|
1312
|
+
return IntentKitAPIError(
|
|
1313
|
+
400,
|
|
1314
|
+
"AgentNotDeployed",
|
|
1315
|
+
"Only deployed agents can call this feature.",
|
|
1316
|
+
)
|
|
1317
|
+
|
|
1318
|
+
async def list_autonomous_tasks(self) -> List[AgentAutonomous]:
|
|
1319
|
+
persisted = await Agent.get(self.id)
|
|
1320
|
+
if persisted is None:
|
|
1321
|
+
raise self._autonomous_not_allowed_error()
|
|
1322
|
+
|
|
1323
|
+
tasks = persisted.autonomous or []
|
|
1324
|
+
# Keep local state in sync with persisted data
|
|
1325
|
+
self.autonomous = tasks
|
|
1326
|
+
return tasks
|
|
1327
|
+
|
|
1328
|
+
async def add_autonomous_task(self, task: AgentAutonomous) -> AgentAutonomous:
|
|
1329
|
+
async with get_session() as session:
|
|
1330
|
+
db_agent = await session.get(AgentTable, self.id)
|
|
1331
|
+
if db_agent is None:
|
|
1332
|
+
raise self._autonomous_not_allowed_error()
|
|
1333
|
+
|
|
1334
|
+
current_tasks = self._deserialize_autonomous(db_agent.autonomous)
|
|
1335
|
+
current_tasks.append(task)
|
|
1336
|
+
|
|
1337
|
+
db_agent.autonomous = self._serialize_autonomous(current_tasks)
|
|
1338
|
+
await session.commit()
|
|
1339
|
+
|
|
1340
|
+
self.autonomous = current_tasks
|
|
1341
|
+
return task
|
|
1342
|
+
|
|
1343
|
+
async def delete_autonomous_task(self, task_id: str) -> None:
|
|
1344
|
+
async with get_session() as session:
|
|
1345
|
+
db_agent = await session.get(AgentTable, self.id)
|
|
1346
|
+
if db_agent is None:
|
|
1347
|
+
raise self._autonomous_not_allowed_error()
|
|
1348
|
+
|
|
1349
|
+
current_tasks = self._deserialize_autonomous(db_agent.autonomous)
|
|
1350
|
+
|
|
1351
|
+
updated_tasks = [task for task in current_tasks if task.id != task_id]
|
|
1352
|
+
if len(updated_tasks) == len(current_tasks):
|
|
1353
|
+
raise IntentKitAPIError(
|
|
1354
|
+
404,
|
|
1355
|
+
"TaskNotFound",
|
|
1356
|
+
f"Autonomous task with ID {task_id} not found.",
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
db_agent.autonomous = self._serialize_autonomous(updated_tasks)
|
|
1360
|
+
await session.commit()
|
|
1361
|
+
|
|
1362
|
+
self.autonomous = updated_tasks
|
|
1363
|
+
|
|
1364
|
+
async def update_autonomous_task(
|
|
1365
|
+
self, task_id: str, task_updates: dict
|
|
1366
|
+
) -> AgentAutonomous:
|
|
1367
|
+
async with get_session() as session:
|
|
1368
|
+
db_agent = await session.get(AgentTable, self.id)
|
|
1369
|
+
if db_agent is None:
|
|
1370
|
+
raise self._autonomous_not_allowed_error()
|
|
1371
|
+
|
|
1372
|
+
current_tasks = self._deserialize_autonomous(db_agent.autonomous)
|
|
1373
|
+
|
|
1374
|
+
updated_task: Optional[AgentAutonomous] = None
|
|
1375
|
+
rewritten_tasks: List[AgentAutonomous] = []
|
|
1376
|
+
for task in current_tasks:
|
|
1377
|
+
if task.id == task_id:
|
|
1378
|
+
task_dict = task.model_dump()
|
|
1379
|
+
task_dict.update(task_updates)
|
|
1380
|
+
updated_task = AgentAutonomous.model_validate(task_dict)
|
|
1381
|
+
rewritten_tasks.append(updated_task)
|
|
1382
|
+
else:
|
|
1383
|
+
rewritten_tasks.append(task)
|
|
1384
|
+
|
|
1385
|
+
if updated_task is None:
|
|
1386
|
+
raise IntentKitAPIError(
|
|
1387
|
+
404,
|
|
1388
|
+
"TaskNotFound",
|
|
1389
|
+
f"Autonomous task with ID {task_id} not found.",
|
|
1390
|
+
)
|
|
1391
|
+
|
|
1392
|
+
db_agent.autonomous = self._serialize_autonomous(rewritten_tasks)
|
|
1393
|
+
await session.commit()
|
|
1394
|
+
|
|
1395
|
+
self.autonomous = rewritten_tasks
|
|
1396
|
+
return updated_task
|
|
1397
|
+
|
|
1383
1398
|
def skill_config(self, category: str) -> Dict[str, Any]:
|
|
1384
1399
|
return self.skills.get(category, {}) if self.skills else {}
|
|
1385
1400
|
|
|
@@ -158,7 +158,8 @@
|
|
|
158
158
|
"trim",
|
|
159
159
|
"summarize"
|
|
160
160
|
],
|
|
161
|
-
"x-group": "llm"
|
|
161
|
+
"x-group": "llm",
|
|
162
|
+
"x-advanced": true
|
|
162
163
|
},
|
|
163
164
|
"temperature": {
|
|
164
165
|
"title": "Temperature",
|
|
@@ -168,7 +169,8 @@
|
|
|
168
169
|
"minimum": 0.0,
|
|
169
170
|
"maximum": 1.5,
|
|
170
171
|
"x-group": "llm",
|
|
171
|
-
"x-step": 0.1
|
|
172
|
+
"x-step": 0.1,
|
|
173
|
+
"x-advanced": true
|
|
172
174
|
},
|
|
173
175
|
"frequency_penalty": {
|
|
174
176
|
"title": "Frequency Penalty",
|
|
@@ -346,16 +348,11 @@
|
|
|
346
348
|
"description": "Default Network, please note that some CDP Wallet native skills like swap only support the base network.",
|
|
347
349
|
"default": "base-mainnet",
|
|
348
350
|
"enum": [
|
|
351
|
+
"base-mainnet",
|
|
349
352
|
"ethereum-mainnet",
|
|
350
|
-
"ethereum-sepolia",
|
|
351
353
|
"polygon-mainnet",
|
|
352
|
-
"polygon-mumbai",
|
|
353
|
-
"base-mainnet",
|
|
354
|
-
"base-sepolia",
|
|
355
354
|
"arbitrum-mainnet",
|
|
356
|
-
"
|
|
357
|
-
"optimism-mainnet",
|
|
358
|
-
"optimism-sepolia"
|
|
355
|
+
"optimism-mainnet"
|
|
359
356
|
],
|
|
360
357
|
"x-group": "onchain"
|
|
361
358
|
}
|
intentkit/models/llm.csv
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
id,name,provider,enabled,input_price,output_price,price_level,context_length,output_length,intelligence,speed,supports_image_input,supports_skill_calls,supports_structured_output,has_reasoning,supports_search,supports_temperature,supports_frequency_penalty,supports_presence_penalty,api_base,timeout
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
minimax/minimax-m2:free,MiniMax M2,gatewayz,TRUE,0,0,1,204800,131000,4,2,FALSE,TRUE,FALSE,FALSE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
|
|
3
|
+
qwen/qwen3-235b-a22b-2507,Qwen3 235B A22B Instruct 2507,gatewayz,TRUE,0.1,0.6,1,262000,262000,3,3,FALSE,TRUE,FALSE,FALSE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
|
|
4
|
+
qwen/qwen3-max,Qwen3 Max,gatewayz,TRUE,1.2,6,4,128000,32000,4,2,FALSE,TRUE,FALSE,FALSE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
|
|
5
|
+
google/gemini-2.5-flash,Gemini 2.5 Flash,gatewayz,TRUE,0.3,2.5,2,1050000,65000,3,4,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
|
|
6
|
+
google/gemini-2.5-pro,Gemini 2.5 Pro,gatewayz,TRUE,1.25,10,4,1050000,65000,4,2,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
|
|
7
|
+
anthropic/claude-sonnet-4.5,Anthropic Claude Sonnet 4.5,gatewayz,TRUE,3,15,5,200000,64000,5,1,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
|
|
8
|
+
gpt-5-nano,GPT-5 Nano,openai,TRUE,0.05,0.4,1,400000,128000,3,5,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,,180
|
|
9
|
+
gpt-5-mini,GPT-5 Mini,openai,TRUE,0.25,2,2,400000,128000,4,4,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,,180
|
|
10
|
+
gpt-5,GPT-5,openai,TRUE,1.25,10,4,400000,128000,5,3,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,,180
|
|
7
11
|
gpt-4o,GPT-4o,openai,FALSE,2.5,10,4,128000,4096,4,3,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE,FALSE,,180
|
|
8
12
|
gpt-4o-mini,GPT-4o Mini,openai,FALSE,0.15,0.6,1,128000,4096,3,4,FALSE,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE,FALSE,,180
|
|
9
13
|
gpt-4.1-nano,GPT-4.1 Nano,openai,TRUE,0.1,0.4,1,128000,4096,3,5,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,FALSE,FALSE,,180
|
|
10
14
|
gpt-4.1-mini,GPT-4.1 Mini,openai,TRUE,0.4,1.6,2,128000,4096,4,4,FALSE,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE,FALSE,,180
|
|
11
15
|
gpt-4.1,GPT-4.1,openai,TRUE,2,8,4,128000,4096,5,3,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE,FALSE,,180
|
|
12
|
-
gpt-5-nano,GPT-5 Nano,openai,TRUE,0.05,0.4,1,400000,128000,3,5,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,,180
|
|
13
|
-
gpt-5-mini,GPT-5 Mini,openai,TRUE,0.25,2,2,400000,128000,4,4,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,,180
|
|
14
|
-
gpt-5,GPT-5,openai,TRUE,1.25,10,4,400000,128000,5,3,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,,180
|
|
15
16
|
o3,OpenAI o3,openai,TRUE,2,8,4,200000,100000,5,1,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,,180
|
|
16
17
|
o4-mini,OpenAI o4-mini,openai,TRUE,1.1,4.4,3,128000,4096,4,3,FALSE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,,180
|
|
17
|
-
deepseek-chat,Deepseek V3.
|
|
18
|
-
deepseek-reasoner,DeepSeek V3.
|
|
19
|
-
grok-
|
|
20
|
-
grok-
|
|
18
|
+
deepseek-chat,Deepseek V3.2 Exp,deepseek,TRUE,0.28,0.42,2,128000,4096,4,3,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,https://api.deepseek.com,300
|
|
19
|
+
deepseek-reasoner,DeepSeek V3.2 Exp (Thinking Mode),deepseek,TRUE,0.28,0.42,2,128000,32000,5,1,FALSE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,https://api.deepseek.com,300
|
|
20
|
+
grok-4,Grok 4,xai,TRUE,3,15,4,256000,4096,5,3,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,,180
|
|
21
|
+
grok-4-fast-non-reasoning,Grok 4 Fast,xai,TRUE,0.2,0.5,2,2000000,4096,3,4,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,,180
|
|
22
|
+
grok-code-fast-1,Grok Code Fast 1,xai,TRUE,0.2,1.5,3,256000,4096,4,4,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,,180
|
|
23
|
+
grok-3,Grok 3,xai,TRUE,3,15,4,131072,4096,5,3,FALSE,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE,FALSE,,180
|
|
21
24
|
grok-3-mini,Grok 3 Mini,xai,TRUE,0.3,0.5,2,131072,4096,5,3,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,,180
|
|
22
25
|
eternalai,Eternal AI (Llama-3.3-70B),eternal,FALSE,0.25,0.75,2,64000,4096,4,3,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,https://api.eternalai.org/v1,300
|
|
23
26
|
reigent,REI Network,reigent,FALSE,0.5,1.5,3,32000,4096,4,3,FALSE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,https://api.reisearch.box/v1,300
|
intentkit/models/skill.py
CHANGED
|
@@ -213,12 +213,12 @@ class AgentSkillData(AgentSkillDataCreate):
|
|
|
213
213
|
await db.commit()
|
|
214
214
|
|
|
215
215
|
|
|
216
|
-
class
|
|
217
|
-
"""Database table model for storing skill-specific data for
|
|
216
|
+
class ChatSkillDataTable(Base):
|
|
217
|
+
"""Database table model for storing skill-specific data for chats."""
|
|
218
218
|
|
|
219
|
-
__tablename__ = "
|
|
219
|
+
__tablename__ = "chat_skill_data"
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
chat_id = Column(String, primary_key=True)
|
|
222
222
|
skill = Column(String, primary_key=True)
|
|
223
223
|
key = Column(String, primary_key=True)
|
|
224
224
|
agent_id = Column(String, nullable=False)
|
|
@@ -236,31 +236,29 @@ class ThreadSkillDataTable(Base):
|
|
|
236
236
|
)
|
|
237
237
|
|
|
238
238
|
|
|
239
|
-
class
|
|
240
|
-
"""Base model for creating
|
|
239
|
+
class ChatSkillDataCreate(BaseModel):
|
|
240
|
+
"""Base model for creating chat skill data records."""
|
|
241
241
|
|
|
242
242
|
model_config = ConfigDict(from_attributes=True)
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
str, Field(description="ID of the thread this data belongs to")
|
|
246
|
-
]
|
|
244
|
+
chat_id: Annotated[str, Field(description="ID of the chat this data belongs to")]
|
|
247
245
|
skill: Annotated[str, Field(description="Name of the skill this data is for")]
|
|
248
246
|
key: Annotated[str, Field(description="Key for this specific piece of data")]
|
|
249
|
-
agent_id: Annotated[str, Field(description="ID of the agent that owns this
|
|
247
|
+
agent_id: Annotated[str, Field(description="ID of the agent that owns this chat")]
|
|
250
248
|
data: Annotated[Dict[str, Any], Field(description="JSON data stored for this key")]
|
|
251
249
|
|
|
252
|
-
async def save(self) -> "
|
|
250
|
+
async def save(self) -> "ChatSkillData":
|
|
253
251
|
"""Save or update skill data.
|
|
254
252
|
|
|
255
253
|
Returns:
|
|
256
|
-
|
|
254
|
+
ChatSkillData: The saved chat skill data instance
|
|
257
255
|
"""
|
|
258
256
|
async with get_session() as db:
|
|
259
257
|
record = await db.scalar(
|
|
260
|
-
select(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
258
|
+
select(ChatSkillDataTable).where(
|
|
259
|
+
ChatSkillDataTable.chat_id == self.chat_id,
|
|
260
|
+
ChatSkillDataTable.skill == self.skill,
|
|
261
|
+
ChatSkillDataTable.key == self.key,
|
|
264
262
|
)
|
|
265
263
|
)
|
|
266
264
|
|
|
@@ -270,18 +268,18 @@ class ThreadSkillDataCreate(BaseModel):
|
|
|
270
268
|
record.agent_id = self.agent_id
|
|
271
269
|
else:
|
|
272
270
|
# Create new record
|
|
273
|
-
record =
|
|
271
|
+
record = ChatSkillDataTable(**self.model_dump())
|
|
274
272
|
db.add(record)
|
|
275
273
|
await db.commit()
|
|
276
274
|
await db.refresh(record)
|
|
277
|
-
return
|
|
275
|
+
return ChatSkillData.model_validate(record)
|
|
278
276
|
|
|
279
277
|
|
|
280
|
-
class
|
|
281
|
-
"""Model for storing skill-specific data for
|
|
278
|
+
class ChatSkillData(ChatSkillDataCreate):
|
|
279
|
+
"""Model for storing skill-specific data for chats.
|
|
282
280
|
|
|
283
|
-
This model uses a composite primary key of (
|
|
284
|
-
skill-specific data for
|
|
281
|
+
This model uses a composite primary key of (chat_id, skill, key) to store
|
|
282
|
+
skill-specific data for chats in a flexible way. It also includes agent_id
|
|
285
283
|
as a required field for tracking ownership.
|
|
286
284
|
"""
|
|
287
285
|
|
|
@@ -298,11 +296,11 @@ class ThreadSkillData(ThreadSkillDataCreate):
|
|
|
298
296
|
]
|
|
299
297
|
|
|
300
298
|
@classmethod
|
|
301
|
-
async def get(cls,
|
|
302
|
-
"""Get skill data for a
|
|
299
|
+
async def get(cls, chat_id: str, skill: str, key: str) -> Optional[dict]:
|
|
300
|
+
"""Get skill data for a chat.
|
|
303
301
|
|
|
304
302
|
Args:
|
|
305
|
-
|
|
303
|
+
chat_id: ID of the chat
|
|
306
304
|
skill: Name of the skill
|
|
307
305
|
key: Data key
|
|
308
306
|
|
|
@@ -311,10 +309,10 @@ class ThreadSkillData(ThreadSkillDataCreate):
|
|
|
311
309
|
"""
|
|
312
310
|
async with get_session() as db:
|
|
313
311
|
record = await db.scalar(
|
|
314
|
-
select(
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
312
|
+
select(ChatSkillDataTable).where(
|
|
313
|
+
ChatSkillDataTable.chat_id == chat_id,
|
|
314
|
+
ChatSkillDataTable.skill == skill,
|
|
315
|
+
ChatSkillDataTable.key == key,
|
|
318
316
|
)
|
|
319
317
|
)
|
|
320
318
|
return record.data if record else None
|
|
@@ -323,33 +321,33 @@ class ThreadSkillData(ThreadSkillDataCreate):
|
|
|
323
321
|
async def clean_data(
|
|
324
322
|
cls,
|
|
325
323
|
agent_id: str,
|
|
326
|
-
|
|
324
|
+
chat_id: Annotated[
|
|
327
325
|
str,
|
|
328
326
|
Field(
|
|
329
327
|
default="",
|
|
330
|
-
description="Optional ID of the
|
|
328
|
+
description="Optional ID of the chat. If provided, only cleans data for that chat.",
|
|
331
329
|
),
|
|
332
330
|
],
|
|
333
331
|
):
|
|
334
|
-
"""Clean all skill data for a
|
|
332
|
+
"""Clean all skill data for a chat or agent.
|
|
335
333
|
|
|
336
334
|
Args:
|
|
337
335
|
agent_id: ID of the agent
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
chat_id: Optional ID of the chat. If provided, only cleans data for that chat.
|
|
337
|
+
If empty, cleans all data for the agent.
|
|
340
338
|
"""
|
|
341
339
|
async with get_session() as db:
|
|
342
|
-
if
|
|
340
|
+
if chat_id and chat_id != "":
|
|
343
341
|
await db.execute(
|
|
344
|
-
delete(
|
|
345
|
-
|
|
346
|
-
|
|
342
|
+
delete(ChatSkillDataTable).where(
|
|
343
|
+
ChatSkillDataTable.agent_id == agent_id,
|
|
344
|
+
ChatSkillDataTable.chat_id == chat_id,
|
|
347
345
|
)
|
|
348
346
|
)
|
|
349
347
|
else:
|
|
350
348
|
await db.execute(
|
|
351
|
-
delete(
|
|
352
|
-
|
|
349
|
+
delete(ChatSkillDataTable).where(
|
|
350
|
+
ChatSkillDataTable.agent_id == agent_id
|
|
353
351
|
)
|
|
354
352
|
)
|
|
355
353
|
await db.commit()
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import NotRequired, TypedDict
|
|
5
5
|
|
|
6
|
-
from intentkit.abstracts.skill import SkillStoreABC
|
|
7
6
|
from intentkit.skills.acolyt.ask import AcolytAskGpt
|
|
8
7
|
from intentkit.skills.acolyt.base import AcolytBaseTool
|
|
9
8
|
from intentkit.skills.base import SkillConfig, SkillState
|
|
@@ -28,7 +27,6 @@ class Config(SkillConfig):
|
|
|
28
27
|
async def get_skills(
|
|
29
28
|
config: "Config",
|
|
30
29
|
is_private: bool,
|
|
31
|
-
store: SkillStoreABC,
|
|
32
30
|
**_,
|
|
33
31
|
) -> list[AcolytBaseTool]:
|
|
34
32
|
"""Get all Acolyt skills.
|
|
@@ -36,7 +34,6 @@ async def get_skills(
|
|
|
36
34
|
Args:
|
|
37
35
|
config: The configuration for Acolyt skills.
|
|
38
36
|
is_private: Whether to include private skills.
|
|
39
|
-
store: The skill store for persisting data.
|
|
40
37
|
|
|
41
38
|
Returns:
|
|
42
39
|
A list of Acolyt skills.
|
|
@@ -53,7 +50,7 @@ async def get_skills(
|
|
|
53
50
|
# Get each skill using the cached getter
|
|
54
51
|
result = []
|
|
55
52
|
for name in available_skills:
|
|
56
|
-
skill = get_acolyt_skill(name
|
|
53
|
+
skill = get_acolyt_skill(name)
|
|
57
54
|
if skill:
|
|
58
55
|
result.append(skill)
|
|
59
56
|
return result
|
|
@@ -61,22 +58,18 @@ async def get_skills(
|
|
|
61
58
|
|
|
62
59
|
def get_acolyt_skill(
|
|
63
60
|
name: str,
|
|
64
|
-
store: SkillStoreABC,
|
|
65
61
|
) -> AcolytBaseTool | None:
|
|
66
62
|
"""Get an Acolyt skill by name.
|
|
67
63
|
|
|
68
64
|
Args:
|
|
69
65
|
name: The name of the skill to get
|
|
70
|
-
store: The skill store for persisting data
|
|
71
66
|
|
|
72
67
|
Returns:
|
|
73
68
|
The requested Acolyt skill
|
|
74
69
|
"""
|
|
75
70
|
if name == "ask_gpt":
|
|
76
71
|
if name not in _cache:
|
|
77
|
-
_cache[name] = AcolytAskGpt(
|
|
78
|
-
skill_store=store,
|
|
79
|
-
)
|
|
72
|
+
_cache[name] = AcolytAskGpt()
|
|
80
73
|
return _cache[name]
|
|
81
74
|
else:
|
|
82
75
|
logger.warning(f"Unknown Acolyt skill: {name}")
|