intentkit 0.7.5.dev21__py3-none-any.whl → 0.7.5.dev23__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.7.5-dev21"
6
+ __version__ = "0.7.5-dev23"
7
7
  __author__ = "hyacinthus"
8
8
  __email__ = "hyacinthus@gmail.com"
9
9
 
intentkit/models/agent.py CHANGED
@@ -1466,81 +1466,109 @@ class Agent(AgentCreate, AgentPublicInfo):
1466
1466
  ):
1467
1467
  model_property["default"] = new_enum[0]
1468
1468
 
1469
- # Process skills property using defaults merged with database overrides
1469
+ # Process skills property using data from Skill.get_all instead of agent_schema.json
1470
1470
  skills_property = schema.get("properties", {}).get("skills", {})
1471
- skills_properties = skills_property.get("properties", {})
1472
1471
 
1473
- if skills_properties:
1474
- skill_states_map: dict[str, dict[str, Skill]] = {}
1472
+ # Build skill_states_map from database
1473
+ skill_states_map: dict[str, dict[str, Skill]] = {}
1474
+ for skill_model in await Skill.get_all(db):
1475
+ if not skill_model.config_name:
1476
+ continue
1477
+ category_states = skill_states_map.setdefault(skill_model.category, {})
1478
+ if skill_model.enabled:
1479
+ category_states[skill_model.config_name] = skill_model
1480
+ else:
1481
+ category_states.pop(skill_model.config_name, None)
1475
1482
 
1476
- for skill_model in await Skill.get_all(db):
1477
- if not skill_model.config_name:
1478
- continue
1479
- category_states = skill_states_map.setdefault(
1480
- skill_model.category, {}
1481
- )
1482
- if skill_model.enabled:
1483
- category_states[skill_model.config_name] = skill_model
1484
- else:
1485
- category_states.pop(skill_model.config_name, None)
1483
+ enabled_categories = {
1484
+ category for category, states in skill_states_map.items() if states
1485
+ }
1486
1486
 
1487
- enabled_categories = {
1488
- category for category, states in skill_states_map.items() if states
1487
+ # Calculate price levels and skills data
1488
+ category_avg_price_levels = {}
1489
+ skills_data = {}
1490
+ for category, states in skill_states_map.items():
1491
+ if not states:
1492
+ continue
1493
+ price_levels = [
1494
+ state.price_level
1495
+ for state in states.values()
1496
+ if state.price_level is not None
1497
+ ]
1498
+ if price_levels:
1499
+ category_avg_price_levels[category] = int(
1500
+ sum(price_levels) / len(price_levels)
1501
+ )
1502
+ skills_data[category] = {
1503
+ config_name: state.price_level
1504
+ for config_name, state in states.items()
1489
1505
  }
1490
1506
 
1491
- category_avg_price_levels = {}
1492
- skills_data = {}
1493
- for category, states in skill_states_map.items():
1494
- if not states:
1495
- continue
1496
- price_levels = [
1497
- state.price_level
1498
- for state in states.values()
1499
- if state.price_level is not None
1500
- ]
1501
- if price_levels:
1502
- category_avg_price_levels[category] = int(
1503
- sum(price_levels) / len(price_levels)
1504
- )
1505
- skills_data[category] = {
1506
- config_name: state.price_level
1507
- for config_name, state in states.items()
1508
- }
1507
+ # Dynamically generate skills_properties from Skill.get_all data
1508
+ skills_properties = {}
1509
+ current_dir = Path(__file__).parent
1510
+
1511
+ for category in enabled_categories:
1512
+ # Skip if filtered for auto-generation
1513
+ skill_schema_path = current_dir / f"../skills/{category}/schema.json"
1514
+ if skill_schema_path.exists():
1515
+ try:
1516
+ with open(skill_schema_path) as f:
1517
+ skill_schema = json.load(f)
1518
+
1519
+ # Check if this skill should be filtered for owner API requirements
1520
+ if filter_owner_api_skills and cls._is_agent_owner_only_skill(
1521
+ skill_schema
1522
+ ):
1523
+ logger.info(
1524
+ f"Filtered out skill '{category}' from auto-generation: requires agent owner API key"
1525
+ )
1526
+ continue
1527
+
1528
+ # Create skill property with embedded schema instead of reference
1529
+ # Load and embed the full skill schema directly
1530
+ base_uri = f"file://{skill_schema_path}"
1531
+ with open(skill_schema_path) as f:
1532
+ embedded_skill_schema = jsonref.load(
1533
+ f, base_uri=base_uri, proxies=False, lazy_load=False
1534
+ )
1509
1535
 
1510
- skill_keys = list(skills_properties.keys())
1511
-
1512
- for skill_category in skill_keys:
1513
- if skill_category not in enabled_categories:
1514
- skills_properties.pop(skill_category, None)
1515
- elif filter_owner_api_skills and cls._is_agent_owner_only_skill(
1516
- skills_properties[skill_category]
1517
- ):
1518
- skills_properties.pop(skill_category, None)
1519
- logger.info(
1520
- f"Filtered out skill '{skill_category}' from auto-generation: requires agent owner API key"
1521
- )
1522
- else:
1523
- if skill_category in category_avg_price_levels:
1524
- skills_properties[skill_category]["x-avg-price-level"] = (
1525
- category_avg_price_levels[skill_category]
1536
+ skills_properties[category] = {
1537
+ "title": skill_schema.get("title", category.title()),
1538
+ **embedded_skill_schema, # Embed the full schema instead of using $ref
1539
+ }
1540
+
1541
+ # Add price level information
1542
+ if category in category_avg_price_levels:
1543
+ skills_properties[category]["x-avg-price-level"] = (
1544
+ category_avg_price_levels[category]
1526
1545
  )
1527
1546
 
1528
- if skill_category in skills_data:
1547
+ if category in skills_data:
1548
+ # Add price level to states in the embedded schema
1529
1549
  skill_states = (
1530
- skills_properties[skill_category]
1550
+ skills_properties[category]
1531
1551
  .get("properties", {})
1532
1552
  .get("states", {})
1533
1553
  .get("properties", {})
1534
1554
  )
1535
1555
  for state_name, state_config in skill_states.items():
1536
1556
  if (
1537
- state_name in skills_data[skill_category]
1538
- and skills_data[skill_category][state_name]
1539
- is not None
1557
+ state_name in skills_data[category]
1558
+ and skills_data[category][state_name] is not None
1540
1559
  ):
1541
1560
  state_config["x-price-level"] = skills_data[
1542
- skill_category
1561
+ category
1543
1562
  ][state_name]
1563
+ except (FileNotFoundError, json.JSONDecodeError) as e:
1564
+ logger.warning(
1565
+ f"Could not load schema for skill category '{category}': {e}"
1566
+ )
1567
+ continue
1568
+
1569
+ # Update the skills property in the schema
1570
+ if skills_property:
1571
+ skills_property["properties"] = skills_properties
1544
1572
 
1545
1573
  # Log the changes for debugging
1546
1574
  logger.debug(
@@ -321,152 +321,7 @@
321
321
  "description": "Dict of skills and their corresponding configurations",
322
322
  "x-group": "skills",
323
323
  "x-inline": true,
324
- "properties": {
325
- "allora": {
326
- "title": "Allora",
327
- "$ref": "../skills/allora/schema.json"
328
- },
329
- "cdp": {
330
- "title": "Coinbase Wallet",
331
- "$ref": "../skills/cdp/schema.json"
332
- },
333
- "dapplooker": {
334
- "title": "DappLooker",
335
- "$ref": "../skills/dapplooker/schema.json"
336
- },
337
- "elfa": {
338
- "title": "Elfa",
339
- "$ref": "../skills/elfa/schema.json"
340
- },
341
- "openai": {
342
- "title": "OpenAI",
343
- "$ref": "../skills/openai/schema.json"
344
- },
345
- "portfolio": {
346
- "title": "Blockchain Portfolio",
347
- "$ref": "../skills/portfolio/schema.json"
348
- },
349
- "tavily": {
350
- "title": "Tavily",
351
- "$ref": "../skills/tavily/schema.json"
352
- },
353
- "token": {
354
- "title": "Token Operations",
355
- "$ref": "../skills/token/schema.json"
356
- },
357
- "twitter": {
358
- "title": "X",
359
- "$ref": "../skills/twitter/schema.json"
360
- },
361
- "xmtp": {
362
- "title": "XMTP",
363
- "$ref": "../skills/xmtp/schema.json"
364
- },
365
- "chainlist": {
366
- "title": "Chainlist RPC Endpoints",
367
- "$ref": "../skills/chainlist/schema.json"
368
- },
369
- "dexscreener": {
370
- "title": "DEX Screener",
371
- "$ref": "../skills/dexscreener/schema.json"
372
- },
373
- "heurist": {
374
- "title": "Heurist",
375
- "$ref": "../skills/heurist/schema.json"
376
- },
377
- "nation": {
378
- "title": "Nation",
379
- "$ref": "../skills/nation/schema.json"
380
- },
381
- "defillama": {
382
- "title": "Defillama",
383
- "$ref": "../skills/defillama/schema.json"
384
- },
385
- "enso": {
386
- "title": "Enso",
387
- "$ref": "../skills/enso/schema.json"
388
- },
389
- "common": {
390
- "title": "Common",
391
- "$ref": "../skills/common/schema.json"
392
- },
393
- "github": {
394
- "title": "GitHub",
395
- "$ref": "../skills/github/schema.json"
396
- },
397
- "moralis": {
398
- "title": "Moralis",
399
- "$ref": "../skills/moralis/schema.json"
400
- },
401
- "system": {
402
- "title": "System",
403
- "$ref": "../skills/system/schema.json"
404
- },
405
- "http": {
406
- "title": "HTTP Client",
407
- "$ref": "../skills/http/schema.json"
408
- },
409
- "web_scraper": {
410
- "title": "Web Scraper & Content Indexing",
411
- "$ref": "../skills/web_scraper/schema.json"
412
- },
413
- "firecrawl": {
414
- "title": "Firecrawl Web Scraping",
415
- "$ref": "../skills/firecrawl/schema.json"
416
- },
417
- "aixbt": {
418
- "title": "AIXBT",
419
- "$ref": "../skills/aixbt/schema.json"
420
- },
421
- "cookiefun": {
422
- "title": "cookie.fun",
423
- "$ref": "../skills/cookiefun/schema.json"
424
- },
425
- "cryptocompare": {
426
- "title": "Cryptocompare",
427
- "$ref": "../skills/cryptocompare/schema.json"
428
- },
429
- "cryptopanic": {
430
- "title": "CryptoPanic",
431
- "$ref": "../skills/cryptopanic/schema.json"
432
- },
433
- "dune_analytics": {
434
- "title": "Dune Analytics",
435
- "$ref": "../skills/dune_analytics/schema.json"
436
- },
437
- "slack": {
438
- "title": "Slack",
439
- "$ref": "../skills/slack/schema.json"
440
- },
441
- "supabase": {
442
- "title": "Supabase",
443
- "$ref": "../skills/supabase/schema.json"
444
- },
445
- "venice_audio": {
446
- "title": "Venice Audio",
447
- "$ref": "../skills/venice_audio/schema.json"
448
- },
449
- "venice_image": {
450
- "title": "Venice Image",
451
- "$ref": "../skills/venice_image/schema.json"
452
- },
453
- "unrealspeech": {
454
- "title": "UnrealSpeech",
455
- "$ref": "../skills/unrealspeech/schema.json"
456
- },
457
- "carv": {
458
- "title": "Carv",
459
- "$ref": "../skills/carv/schema.json"
460
- },
461
- "lifi": {
462
- "title": "LiFi",
463
- "$ref": "../skills/lifi/schema.json"
464
- },
465
- "casino": {
466
- "title": "Casino",
467
- "$ref": "../skills/casino/schema.json"
468
- }
469
- }
324
+ "properties": {}
470
325
  },
471
326
  "autonomous": {
472
327
  "title": "Autonomous",
intentkit/models/llm.csv CHANGED
@@ -1,6 +1,6 @@
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
2
  qwen/qwen3-235b-a22b-2507,Qwen3 235B A22B Instruct 2507,gatewayz,TRUE,0.1,0.6,1,262000,262000,4,2,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
3
- google/gemini-2.5-flash,Grok 4 Fast,gatewayz,TRUE,0.2,0.5,1,128000,30000,4,2,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
3
+ google/gemini-2.5-flash,Gemini 2.5 Flash,gatewayz,TRUE,0.3,2.5,2,1050000,65000,4,2,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
4
4
  x-ai/grok-4-fast:free,Grok 4 Fast,gatewayz,TRUE,0.2,0.5,1,128000,30000,4,2,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
5
5
  x-ai/grok-code-fast-1,Grok Code Fast 1,gatewayz,TRUE,3,15,5,200000,64000,5,1,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
6
6
  anthropic/claude-sonnet-4,Anthropic Claude Sonnet 4,gatewayz,TRUE,3,15,5,200000,64000,5,1,TRUE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,FALSE,https://api.gatewayz.ai/v1,300
intentkit/models/llm.py CHANGED
@@ -106,9 +106,10 @@ class LLMProvider(str, Enum):
106
106
  self.OPENAI: "OpenAI",
107
107
  self.DEEPSEEK: "DeepSeek",
108
108
  self.XAI: "xAI",
109
- self.ETERNAL: "Others",
110
- self.REIGENT: "Others",
111
- self.VENICE: "Others",
109
+ self.GATEWAYZ: "Gatewayz",
110
+ self.ETERNAL: "Eternal",
111
+ self.REIGENT: "Reigent",
112
+ self.VENICE: "Venice",
112
113
  }
113
114
  return display_names.get(self, self.value)
114
115
 
intentkit/models/skill.py CHANGED
@@ -583,6 +583,17 @@ class Skill(BaseModel):
583
583
  result = await session.execute(select(SkillTable))
584
584
  for row in result.scalars():
585
585
  skill_model = cls.model_validate(row)
586
+
587
+ default_skill = DEFAULT_SKILLS_BY_NAME.get(skill_model.name)
588
+ if default_skill is not None:
589
+ # Merge database overrides with default skill configuration while
590
+ # keeping default values for fields that are omitted in the
591
+ # database (e.g. config_name).
592
+ skill_model = default_skill.model_copy(
593
+ update=skill_model.model_dump(exclude_none=True),
594
+ deep=True,
595
+ )
596
+
586
597
  skills[skill_model.name] = skill_model
587
598
 
588
599
  return list(skills.values())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intentkit
3
- Version: 0.7.5.dev21
3
+ Version: 0.7.5.dev23
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=qmTXwOHpPeHT0PEHab_5W7Z6MJ0UCxkoPcmTMmBJOHo,384
1
+ intentkit/__init__.py,sha256=qxYG6ZRdDZh1H-I6Ec4MSJavp1rwIt1LwvDJrYMKsUs,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
@@ -21,10 +21,10 @@ intentkit/core/credit.py,sha256=b4f4T6G6eeBTMe0L_r8awWtXgUnqiog4IUaymDPYym0,7558
21
21
  intentkit/core/engine.py,sha256=-atLOlPKAt3WDzI0cSsN9LgK1eldd0J0dLxxKrmCCOc,37256
22
22
  intentkit/core/node.py,sha256=P0LiBrjFtNBVC0JpQntTgDVfaLJM8aqhJZCJfPx6MJ0,8880
23
23
  intentkit/core/prompt.py,sha256=idNx1ono4Maz2i6IBKfaKOBBbEQiWbaSxr2Eb1vZTI4,15482
24
- intentkit/models/agent.py,sha256=9zcu9QkI0p-Nipbhe_mMA7ndQwL7mgPAP9MJwmXaRJA,67712
24
+ intentkit/models/agent.py,sha256=AIx5LCE8VvMcI-_Ya3Vj1PTJnIuGQn8Ak0jEcpCtWjs,69083
25
25
  intentkit/models/agent_data.py,sha256=5zq3EPKnygT2P1OHc2IfEmL8hXkjeBND6sJ0JJsvQJg,28370
26
26
  intentkit/models/agent_public.json,sha256=0X8Bd2WOobDJLsok8avWNzmzu4uvKSGEyy6Myn53eT4,2802
27
- intentkit/models/agent_schema.json,sha256=hFGUE57JIiN8V4olgLf2LBXPejA2QLiQoFc6riM1UFo,17139
27
+ intentkit/models/agent_schema.json,sha256=fnNGvT4R6IzJcXvtIs-56-EOw5cYXFwf-6jKFlqbBcg,12964
28
28
  intentkit/models/app_setting.py,sha256=iYbW63QD91bt4oEYV3wOXHuRFav2b4VXLwb_StgUQtQ,8230
29
29
  intentkit/models/base.py,sha256=o-zRjVrak-f5Jokdvj8BjLm8gcC3yYiYMCTLegwT2lA,185
30
30
  intentkit/models/chat.py,sha256=cDccEHU8nd7Y5uhrHDCuZGwqrRwhqCaeztMiZcemiug,20469
@@ -33,10 +33,10 @@ intentkit/models/credit.py,sha256=CM_oOhcpKHkdCVTe86osYsBM9vIo-9N65SWrNKEKy7Y,52
33
33
  intentkit/models/db.py,sha256=1uX1DJZGMx9A3lq6WKSTSwpXhWgWaiki55-iiED8BYM,5082
34
34
  intentkit/models/db_mig.py,sha256=vT6Tanm-BHC2T7dTztuB1UG494EFBAlHADKsNzR6xaQ,3577
35
35
  intentkit/models/generator.py,sha256=lyZu9U9rZUGkqd_QT5SAhay9DY358JJY8EhDSpN8I1M,10298
36
- intentkit/models/llm.csv,sha256=QU72XSUSPq52AjR2yCI-GzindQ6NmBBFN67gTGWd3Hw,3397
37
- intentkit/models/llm.py,sha256=drr7LVwXvdwPfXchszx4bWVmajCM6p3cYNzY-Jgi0a4,21440
36
+ intentkit/models/llm.csv,sha256=R298CcmK-pcD8-2Q8xPgaymu6Gqc50yBFtBjRQI4aXM,3403
37
+ intentkit/models/llm.py,sha256=SCmTV4cuEJ2ZYHXCUHlIlkKivm8qbev4vaPWVibdyTQ,21481
38
38
  intentkit/models/redis.py,sha256=UoN8jqLREO1VO9_w6m-JhldpP19iEHj4TiGVCMutQW4,3702
39
- intentkit/models/skill.py,sha256=-6FYzjnh2OL-l-K69dBUhmQZ-acJnXTRYBSOcjzy5mI,20329
39
+ intentkit/models/skill.py,sha256=n9d1VKWxACe852wMOUC5P7Ps1EUMzIDAYT62Vfs8pQU,20826
40
40
  intentkit/models/skills.csv,sha256=lvQg_1byPvJaHToQbEqRZarfYDuXpP4EXeVJVMc8aDs,19132
41
41
  intentkit/models/user.py,sha256=r2UWpuBJbS6bbfS-fz_rAtOTHL3zodRt1rccA7HhAQM,9902
42
42
  intentkit/skills/__init__.py,sha256=WkjmKB4xvy36zyXMroPMf_DTPgQloNS3L73nVnBmuQI,303
@@ -450,7 +450,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
450
450
  intentkit/utils/s3.py,sha256=A8Nsx5QJyLsxhj9g7oHNy2-m24tjQUhC9URm8Qb1jFw,10057
451
451
  intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
452
452
  intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
453
- intentkit-0.7.5.dev21.dist-info/METADATA,sha256=w5x4Bsz3bOMKeRbWlsvCWpu9Tgiwdl953wwSjrd4YKI,6360
454
- intentkit-0.7.5.dev21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
455
- intentkit-0.7.5.dev21.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
456
- intentkit-0.7.5.dev21.dist-info/RECORD,,
453
+ intentkit-0.7.5.dev23.dist-info/METADATA,sha256=OBk4LasyvUJR7sxFwW6XopugHk028dnLFf2q488ig4Y,6360
454
+ intentkit-0.7.5.dev23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
455
+ intentkit-0.7.5.dev23.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
456
+ intentkit-0.7.5.dev23.dist-info/RECORD,,