intentkit 0.7.4rc2__py3-none-any.whl → 0.7.4rc3__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.4-rc.2"
6
+ __version__ = "0.7.4-rc.3"
7
7
  __author__ = "hyacinthus"
8
8
  __email__ = "hyacinthus@gmail.com"
9
9
 
intentkit/models/agent.py CHANGED
@@ -166,61 +166,22 @@ class AgentExample(BaseModel):
166
166
  ]
167
167
 
168
168
 
169
- class AgentTable(Base):
170
- """Agent table db model."""
169
+ class AgentUserInputColumns:
170
+ """Abstract base class containing columns that are common to AgentTable and other tables."""
171
171
 
172
- __tablename__ = "agents"
172
+ __abstract__ = True
173
173
 
174
- id = Column(
175
- String,
176
- primary_key=True,
177
- comment="Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens",
178
- )
174
+ # Basic information fields from AgentCore
179
175
  name = Column(
180
176
  String,
181
177
  nullable=True,
182
178
  comment="Display name of the agent",
183
179
  )
184
- slug = Column(
185
- String,
186
- nullable=True,
187
- comment="Slug of the agent, used for URL generation",
188
- )
189
- description = Column(
190
- String,
191
- nullable=True,
192
- comment="Description of the agent, for public view, not contained in prompt",
193
- )
194
- external_website = Column(
195
- String,
196
- nullable=True,
197
- comment="Link of external website of the agent, if you have one",
198
- )
199
180
  picture = Column(
200
181
  String,
201
182
  nullable=True,
202
183
  comment="Picture of the agent",
203
184
  )
204
- ticker = Column(
205
- String,
206
- nullable=True,
207
- comment="Ticker symbol of the agent",
208
- )
209
- token_address = Column(
210
- String,
211
- nullable=True,
212
- comment="Token address of the agent",
213
- )
214
- token_pool = Column(
215
- String,
216
- nullable=True,
217
- comment="Pool of the agent token",
218
- )
219
- fee_percentage = Column(
220
- Numeric(22, 4),
221
- nullable=True,
222
- comment="Fee percentage of the agent",
223
- )
224
185
  purpose = Column(
225
186
  String,
226
187
  nullable=True,
@@ -236,39 +197,8 @@ class AgentTable(Base):
236
197
  nullable=True,
237
198
  comment="Principles or values of the agent",
238
199
  )
239
- owner = Column(
240
- String,
241
- nullable=True,
242
- comment="Owner identifier of the agent, used for access control",
243
- )
244
- upstream_id = Column(
245
- String,
246
- index=True,
247
- nullable=True,
248
- comment="Upstream reference ID for idempotent operations",
249
- )
250
- upstream_extra = Column(
251
- JSON().with_variant(JSONB(), "postgresql"),
252
- nullable=True,
253
- comment="Additional data store for upstream use",
254
- )
255
- wallet_provider = Column(
256
- String,
257
- nullable=True,
258
- comment="Provider of the agent's wallet",
259
- )
260
- readonly_wallet_address = Column(
261
- String,
262
- nullable=True,
263
- comment="Readonly wallet address of the agent",
264
- )
265
- network_id = Column(
266
- String,
267
- nullable=True,
268
- default="base-mainnet",
269
- comment="Network identifier",
270
- )
271
- # AI part
200
+
201
+ # AI model configuration fields from AgentCore
272
202
  model = Column(
273
203
  String,
274
204
  nullable=True,
@@ -303,36 +233,44 @@ class AgentTable(Base):
303
233
  default=0.0,
304
234
  comment="Controls topic adherence (-2.0~2.0). Higher values allow more topic deviation, lower values enforce stricter topic adherence.",
305
235
  )
306
- short_term_memory_strategy = Column(
236
+
237
+ # Wallet and network configuration fields from AgentCore
238
+ wallet_provider = Column(
307
239
  String,
308
240
  nullable=True,
309
- default="trim",
310
- comment="Strategy for managing short-term memory when context limit is reached. 'trim' removes oldest messages, 'summarize' creates summaries.",
241
+ comment="Provider of the agent's wallet",
311
242
  )
312
- # autonomous mode
313
- autonomous = Column(
314
- JSON().with_variant(JSONB(), "postgresql"),
243
+ readonly_wallet_address = Column(
244
+ String,
315
245
  nullable=True,
316
- comment="Autonomous agent configurations",
246
+ comment="Readonly wallet address of the agent",
317
247
  )
318
- # agent examples
319
- example_intro = Column(
248
+ network_id = Column(
320
249
  String,
321
250
  nullable=True,
322
- comment="Introduction for example interactions",
251
+ default="base-mainnet",
252
+ comment="Network identifier",
323
253
  )
324
- examples = Column(
254
+
255
+ # Skills configuration from AgentCore
256
+ skills = Column(
325
257
  JSON().with_variant(JSONB(), "postgresql"),
326
258
  nullable=True,
327
- comment="List of example interactions for the agent",
259
+ comment="Dict of skills and their corresponding configurations",
328
260
  )
329
- # skills
330
- skills = Column(
261
+
262
+ # Additional fields from AgentUserInput
263
+ short_term_memory_strategy = Column(
264
+ String,
265
+ nullable=True,
266
+ default="trim",
267
+ comment="Strategy for managing short-term memory when context limit is reached. 'trim' removes oldest messages, 'summarize' creates summaries.",
268
+ )
269
+ autonomous = Column(
331
270
  JSON().with_variant(JSONB(), "postgresql"),
332
271
  nullable=True,
333
- comment="Dict of skills and their corresponding configurations",
272
+ comment="Autonomous agent configurations",
334
273
  )
335
- # if telegram_entrypoint_enabled, the telegram_entrypoint_enabled will be enabled, telegram_config will be checked
336
274
  telegram_entrypoint_enabled = Column(
337
275
  Boolean,
338
276
  nullable=True,
@@ -354,6 +292,39 @@ class AgentTable(Base):
354
292
  nullable=True,
355
293
  comment="Extra prompt for xmtp entrypoint",
356
294
  )
295
+
296
+
297
+ class AgentTable(Base, AgentUserInputColumns):
298
+ """Agent table db model."""
299
+
300
+ __tablename__ = "agents"
301
+
302
+ id = Column(
303
+ String,
304
+ primary_key=True,
305
+ comment="Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens",
306
+ )
307
+ slug = Column(
308
+ String,
309
+ nullable=True,
310
+ comment="Slug of the agent, used for URL generation",
311
+ )
312
+ owner = Column(
313
+ String,
314
+ nullable=True,
315
+ comment="Owner identifier of the agent, used for access control",
316
+ )
317
+ upstream_id = Column(
318
+ String,
319
+ index=True,
320
+ nullable=True,
321
+ comment="Upstream reference ID for idempotent operations",
322
+ )
323
+ upstream_extra = Column(
324
+ JSON().with_variant(JSONB(), "postgresql"),
325
+ nullable=True,
326
+ comment="Additional data store for upstream use",
327
+ )
357
328
  version = Column(
358
329
  String,
359
330
  nullable=True,
@@ -379,6 +350,49 @@ class AgentTable(Base):
379
350
  nullable=True,
380
351
  comment="Other helper data fields for query, come from agent and agent data",
381
352
  )
353
+
354
+ # Fields moved from AgentUserInputColumns that are no longer in AgentUserInput
355
+ description = Column(
356
+ String,
357
+ nullable=True,
358
+ comment="Description of the agent, for public view, not contained in prompt",
359
+ )
360
+ external_website = Column(
361
+ String,
362
+ nullable=True,
363
+ comment="Link of external website of the agent, if you have one",
364
+ )
365
+ ticker = Column(
366
+ String,
367
+ nullable=True,
368
+ comment="Ticker symbol of the agent",
369
+ )
370
+ token_address = Column(
371
+ String,
372
+ nullable=True,
373
+ comment="Token address of the agent",
374
+ )
375
+ token_pool = Column(
376
+ String,
377
+ nullable=True,
378
+ comment="Pool of the agent token",
379
+ )
380
+ fee_percentage = Column(
381
+ Numeric(22, 4),
382
+ nullable=True,
383
+ comment="Fee percentage of the agent",
384
+ )
385
+ example_intro = Column(
386
+ String,
387
+ nullable=True,
388
+ comment="Introduction for example interactions",
389
+ )
390
+ examples = Column(
391
+ JSON().with_variant(JSONB(), "postgresql"),
392
+ nullable=True,
393
+ comment="List of example interactions for the agent",
394
+ )
395
+
382
396
  # auto timestamp
383
397
  created_at = Column(
384
398
  DateTime(timezone=True),
@@ -411,29 +425,6 @@ class AgentCore(BaseModel):
411
425
  },
412
426
  ),
413
427
  ]
414
- description: Annotated[
415
- Optional[str],
416
- PydanticField(
417
- default=None,
418
- description="Description of the agent, for public view, not contained in prompt",
419
- json_schema_extra={
420
- "x-group": "basic",
421
- "x-placeholder": "Introduce your agent",
422
- },
423
- ),
424
- ]
425
- external_website: Annotated[
426
- Optional[str],
427
- PydanticField(
428
- default=None,
429
- description="Link of external website of the agent, if you have one",
430
- json_schema_extra={
431
- "x-group": "basic",
432
- "x-placeholder": "Enter agent external website url",
433
- "format": "uri",
434
- },
435
- ),
436
- ]
437
428
  picture: Annotated[
438
429
  Optional[str],
439
430
  PydanticField(
@@ -445,54 +436,6 @@ class AgentCore(BaseModel):
445
436
  },
446
437
  ),
447
438
  ]
448
- ticker: Annotated[
449
- Optional[str],
450
- PydanticField(
451
- default=None,
452
- description="Ticker symbol of the agent",
453
- max_length=10,
454
- min_length=1,
455
- json_schema_extra={
456
- "x-group": "basic",
457
- "x-placeholder": "If one day, your agent has it's own token, what will it be?",
458
- },
459
- ),
460
- ]
461
- token_address: Annotated[
462
- Optional[str],
463
- PydanticField(
464
- default=None,
465
- description="Token address of the agent",
466
- max_length=42,
467
- json_schema_extra={
468
- "x-group": "internal",
469
- "readOnly": True,
470
- },
471
- ),
472
- ]
473
- token_pool: Annotated[
474
- Optional[str],
475
- PydanticField(
476
- default=None,
477
- description="Pool of the agent token",
478
- max_length=42,
479
- json_schema_extra={
480
- "x-group": "internal",
481
- "readOnly": True,
482
- },
483
- ),
484
- ]
485
- fee_percentage: Annotated[
486
- Optional[Decimal],
487
- PydanticField(
488
- default=None,
489
- description="Fee percentage of the agent",
490
- ge=Decimal("0.0"),
491
- json_schema_extra={
492
- "x-group": "basic",
493
- },
494
- ),
495
- ]
496
439
  purpose: Annotated[
497
440
  Optional[str],
498
441
  PydanticField(
@@ -736,29 +679,6 @@ class AgentUserInput(AgentCore):
736
679
  },
737
680
  ),
738
681
  ]
739
- example_intro: Annotated[
740
- Optional[str],
741
- PydanticField(
742
- default=None,
743
- description="Introduction of the example",
744
- max_length=2000,
745
- json_schema_extra={
746
- "x-group": "examples",
747
- },
748
- ),
749
- ]
750
- examples: Annotated[
751
- Optional[List[AgentExample]],
752
- PydanticField(
753
- default=None,
754
- description="List of example prompts for the agent",
755
- max_length=6,
756
- json_schema_extra={
757
- "x-group": "examples",
758
- "x-inline": True,
759
- },
760
- ),
761
- ]
762
682
  # if telegram_entrypoint_enabled, the telegram_entrypoint_enabled will be enabled, telegram_config will be checked
763
683
  telegram_entrypoint_enabled: Annotated[
764
684
  Optional[bool],
@@ -965,61 +885,160 @@ class AgentCreate(AgentUpdate):
965
885
  id: Annotated[
966
886
  str,
967
887
  PydanticField(
968
- default_factory=lambda: str(XID()),
969
- description="Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens",
970
- pattern=r"^[a-z][a-z0-9-]*$",
971
- min_length=2,
972
- max_length=67,
888
+ default_factory=lambda: str(XID()),
889
+ description="Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens",
890
+ pattern=r"^[a-z][a-z0-9-]*$",
891
+ min_length=2,
892
+ max_length=67,
893
+ ),
894
+ ]
895
+ owner: Annotated[
896
+ Optional[str],
897
+ PydanticField(
898
+ default=None,
899
+ description="Owner identifier of the agent, used for access control",
900
+ max_length=50,
901
+ ),
902
+ ]
903
+
904
+ async def check_upstream_id(self) -> None:
905
+ if not self.upstream_id:
906
+ return None
907
+ async with get_session() as db:
908
+ existing = await db.scalar(
909
+ select(AgentTable).where(AgentTable.upstream_id == self.upstream_id)
910
+ )
911
+ if existing:
912
+ raise HTTPException(
913
+ status_code=400,
914
+ detail="Upstream id already in use",
915
+ )
916
+
917
+ async def get_by_upstream_id(self) -> Optional["Agent"]:
918
+ if not self.upstream_id:
919
+ return None
920
+ async with get_session() as db:
921
+ existing = await db.scalar(
922
+ select(AgentTable).where(AgentTable.upstream_id == self.upstream_id)
923
+ )
924
+ if existing:
925
+ return Agent.model_validate(existing)
926
+ return None
927
+
928
+ async def create(self) -> "Agent":
929
+ # Validate autonomous schedule settings if present
930
+ if self.autonomous:
931
+ self.validate_autonomous_schedule()
932
+
933
+ async with get_session() as db:
934
+ db_agent = AgentTable(**self.model_dump())
935
+ db_agent.version = self.hash()
936
+ db.add(db_agent)
937
+ await db.commit()
938
+ await db.refresh(db_agent)
939
+ return Agent.model_validate(db_agent)
940
+
941
+
942
+ class AgentPublicInfo(BaseModel):
943
+ """Public information of the agent."""
944
+
945
+ description: Annotated[
946
+ Optional[str],
947
+ PydanticField(
948
+ default=None,
949
+ description="Description of the agent, for public view, not contained in prompt",
950
+ json_schema_extra={
951
+ "x-group": "basic",
952
+ "x-placeholder": "Introduce your agent",
953
+ },
954
+ ),
955
+ ]
956
+ external_website: Annotated[
957
+ Optional[str],
958
+ PydanticField(
959
+ default=None,
960
+ description="Link of external website of the agent, if you have one",
961
+ json_schema_extra={
962
+ "x-group": "basic",
963
+ "x-placeholder": "Enter agent external website url",
964
+ "format": "uri",
965
+ },
966
+ ),
967
+ ]
968
+ ticker: Annotated[
969
+ Optional[str],
970
+ PydanticField(
971
+ default=None,
972
+ description="Ticker symbol of the agent",
973
+ max_length=10,
974
+ min_length=1,
975
+ json_schema_extra={
976
+ "x-group": "basic",
977
+ "x-placeholder": "If one day, your agent has it's own token, what will it be?",
978
+ },
979
+ ),
980
+ ]
981
+ token_address: Annotated[
982
+ Optional[str],
983
+ PydanticField(
984
+ default=None,
985
+ description="Token address of the agent",
986
+ max_length=42,
987
+ json_schema_extra={
988
+ "x-group": "internal",
989
+ "readOnly": True,
990
+ },
991
+ ),
992
+ ]
993
+ token_pool: Annotated[
994
+ Optional[str],
995
+ PydanticField(
996
+ default=None,
997
+ description="Pool of the agent token",
998
+ max_length=42,
999
+ json_schema_extra={
1000
+ "x-group": "internal",
1001
+ "readOnly": True,
1002
+ },
973
1003
  ),
974
1004
  ]
975
- owner: Annotated[
1005
+ fee_percentage: Annotated[
1006
+ Optional[Decimal],
1007
+ PydanticField(
1008
+ default=None,
1009
+ description="Fee percentage of the agent",
1010
+ ge=Decimal("0.0"),
1011
+ json_schema_extra={
1012
+ "x-group": "basic",
1013
+ },
1014
+ ),
1015
+ ]
1016
+ example_intro: Annotated[
976
1017
  Optional[str],
977
1018
  PydanticField(
978
1019
  default=None,
979
- description="Owner identifier of the agent, used for access control",
980
- max_length=50,
1020
+ description="Introduction of the example",
1021
+ max_length=2000,
1022
+ json_schema_extra={
1023
+ "x-group": "examples",
1024
+ },
1025
+ ),
1026
+ ]
1027
+ examples: Annotated[
1028
+ Optional[List[AgentExample]],
1029
+ PydanticField(
1030
+ default=None,
1031
+ description="List of example prompts for the agent",
1032
+ max_length=6,
1033
+ json_schema_extra={
1034
+ "x-group": "examples",
1035
+ "x-inline": True,
1036
+ },
981
1037
  ),
982
1038
  ]
983
-
984
- async def check_upstream_id(self) -> None:
985
- if not self.upstream_id:
986
- return None
987
- async with get_session() as db:
988
- existing = await db.scalar(
989
- select(AgentTable).where(AgentTable.upstream_id == self.upstream_id)
990
- )
991
- if existing:
992
- raise HTTPException(
993
- status_code=400,
994
- detail="Upstream id already in use",
995
- )
996
-
997
- async def get_by_upstream_id(self) -> Optional["Agent"]:
998
- if not self.upstream_id:
999
- return None
1000
- async with get_session() as db:
1001
- existing = await db.scalar(
1002
- select(AgentTable).where(AgentTable.upstream_id == self.upstream_id)
1003
- )
1004
- if existing:
1005
- return Agent.model_validate(existing)
1006
- return None
1007
-
1008
- async def create(self) -> "Agent":
1009
- # Validate autonomous schedule settings if present
1010
- if self.autonomous:
1011
- self.validate_autonomous_schedule()
1012
-
1013
- async with get_session() as db:
1014
- db_agent = AgentTable(**self.model_dump())
1015
- db_agent.version = self.hash()
1016
- db.add(db_agent)
1017
- await db.commit()
1018
- await db.refresh(db_agent)
1019
- return Agent.model_validate(db_agent)
1020
1039
 
1021
1040
 
1022
- class Agent(AgentCreate):
1041
+ class Agent(AgentCreate, AgentPublicInfo):
1023
1042
  """Agent model."""
1024
1043
 
1025
1044
  model_config = ConfigDict(from_attributes=True)
@@ -1442,7 +1461,7 @@ class Agent(AgentCreate):
1442
1461
  return schema
1443
1462
 
1444
1463
 
1445
- class AgentResponse(BaseModel):
1464
+ class AgentResponse(Agent):
1446
1465
  """Response model for Agent API."""
1447
1466
 
1448
1467
  model_config = ConfigDict(
@@ -1452,179 +1471,6 @@ class AgentResponse(BaseModel):
1452
1471
  },
1453
1472
  )
1454
1473
 
1455
- id: Annotated[
1456
- str,
1457
- PydanticField(
1458
- description="Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens",
1459
- ),
1460
- ]
1461
- # auto timestamp
1462
- created_at: Annotated[
1463
- datetime,
1464
- PydanticField(
1465
- description="Timestamp when the agent was created, will ignore when importing"
1466
- ),
1467
- ]
1468
- updated_at: Annotated[
1469
- datetime,
1470
- PydanticField(
1471
- description="Timestamp when the agent was last updated, will ignore when importing"
1472
- ),
1473
- ]
1474
- # Agent part
1475
- name: Annotated[
1476
- Optional[str],
1477
- PydanticField(
1478
- default=None,
1479
- description="Display name of the agent",
1480
- ),
1481
- ]
1482
- slug: Annotated[
1483
- Optional[str],
1484
- PydanticField(
1485
- default=None,
1486
- description="Slug of the agent, used for URL generation",
1487
- ),
1488
- ]
1489
- description: Annotated[
1490
- Optional[str],
1491
- PydanticField(
1492
- default=None,
1493
- description="Description of the agent, for public view, not contained in prompt",
1494
- ),
1495
- ]
1496
- external_website: Annotated[
1497
- Optional[str],
1498
- PydanticField(
1499
- default=None,
1500
- description="Link of external website of the agent, if you have one",
1501
- ),
1502
- ]
1503
- picture: Annotated[
1504
- Optional[str],
1505
- PydanticField(
1506
- default=None,
1507
- description="Picture of the agent",
1508
- ),
1509
- ]
1510
- ticker: Annotated[
1511
- Optional[str],
1512
- PydanticField(
1513
- default=None,
1514
- description="Ticker symbol of the agent",
1515
- ),
1516
- ]
1517
- token_address: Annotated[
1518
- Optional[str],
1519
- PydanticField(
1520
- default=None,
1521
- description="Token address of the agent",
1522
- ),
1523
- ]
1524
- token_pool: Annotated[
1525
- Optional[str],
1526
- PydanticField(
1527
- default=None,
1528
- description="Pool of the agent token",
1529
- ),
1530
- ]
1531
- fee_percentage: Annotated[
1532
- Optional[Decimal],
1533
- PydanticField(
1534
- default=None,
1535
- description="Fee percentage of the agent",
1536
- ),
1537
- ]
1538
- owner: Annotated[
1539
- Optional[str],
1540
- PydanticField(
1541
- default=None,
1542
- description="Owner identifier of the agent, used for access control",
1543
- max_length=50,
1544
- json_schema_extra={
1545
- "x-group": "internal",
1546
- },
1547
- ),
1548
- ]
1549
- upstream_id: Annotated[
1550
- Optional[str],
1551
- PydanticField(
1552
- default=None,
1553
- description="External reference ID for idempotent operations",
1554
- max_length=100,
1555
- json_schema_extra={
1556
- "x-group": "internal",
1557
- },
1558
- ),
1559
- ]
1560
- upstream_extra: Annotated[
1561
- Optional[Dict[str, Any]],
1562
- PydanticField(
1563
- default=None,
1564
- description="Additional data store for upstream use",
1565
- ),
1566
- ]
1567
- # AI part
1568
- model: Annotated[
1569
- str,
1570
- PydanticField(
1571
- description="AI model identifier to be used by this agent for processing requests. Available models: gpt-4o, gpt-4o-mini, deepseek-chat, deepseek-reasoner, grok-2, eternalai, reigent",
1572
- ),
1573
- ]
1574
- # autonomous mode
1575
- autonomous: Annotated[
1576
- Optional[List[Dict[str, Any]]],
1577
- PydanticField(
1578
- default=None,
1579
- description=("Autonomous agent configurations."),
1580
- ),
1581
- ]
1582
- # agent examples
1583
- example_intro: Annotated[
1584
- Optional[str],
1585
- PydanticField(
1586
- default=None,
1587
- description="Introduction for example interactions",
1588
- ),
1589
- ]
1590
- examples: Annotated[
1591
- Optional[List[AgentExample]],
1592
- PydanticField(
1593
- default=None,
1594
- description="List of example prompts for the agent",
1595
- ),
1596
- ]
1597
- # skills
1598
- skills: Annotated[
1599
- Optional[Dict[str, Any]],
1600
- PydanticField(
1601
- default=None,
1602
- description="Dict of skills and their corresponding configurations",
1603
- ),
1604
- ]
1605
- wallet_provider: Annotated[
1606
- Optional[Literal["cdp", "readonly"]],
1607
- PydanticField(
1608
- default="cdp",
1609
- description="Provider of the agent's wallet",
1610
- ),
1611
- ]
1612
- network_id: Annotated[
1613
- Optional[str],
1614
- PydanticField(
1615
- default="base-mainnet",
1616
- description="Network identifier",
1617
- ),
1618
- ]
1619
- # telegram entrypoint
1620
- telegram_entrypoint_enabled: Annotated[
1621
- Optional[bool],
1622
- PydanticField(
1623
- default=False,
1624
- description="Whether the agent can play telegram bot",
1625
- ),
1626
- ]
1627
-
1628
1474
  # data part
1629
1475
  cdp_wallet_address: Annotated[
1630
1476
  Optional[str], PydanticField(description="CDP wallet address for the agent")
@@ -1712,6 +1558,18 @@ class AgentResponse(BaseModel):
1712
1558
  # Get base data from agent
1713
1559
  data = agent.model_dump()
1714
1560
 
1561
+ # Hide the sensitive fields
1562
+ data.pop("purpose", None)
1563
+ data.pop("personality", None)
1564
+ data.pop("principles", None)
1565
+ data.pop("prompt", None)
1566
+ data.pop("prompt_append", None)
1567
+ data.pop("temperature", None)
1568
+ data.pop("frequency_penalty", None)
1569
+ data.pop("telegram_entrypoint_prompt", None)
1570
+ data.pop("telegram_config", None)
1571
+ data.pop("xmtp_entrypoint_prompt", None)
1572
+
1715
1573
  # Filter sensitive fields from autonomous list
1716
1574
  if data.get("autonomous"):
1717
1575
  filtered_autonomous = []
@@ -1811,4 +1669,4 @@ class AgentResponse(BaseModel):
1811
1669
  }
1812
1670
  )
1813
1671
 
1814
- return cls.model_validate(data)
1672
+ return cls.model_construct(**data)
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "title": "AgentPublicInfo",
5
+ "description": "Public information of the agent",
6
+ "properties": {
7
+ "description": {
8
+ "title": "Description",
9
+ "type": "string",
10
+ "description": "Description of the agent, for public view, not contained in prompt",
11
+ "x-group": "basic",
12
+ "x-placeholder": "Introduce your agent"
13
+ },
14
+ "external_website": {
15
+ "title": "External Website",
16
+ "type": "string",
17
+ "description": "Link of external website of the agent, if you have one",
18
+ "format": "uri",
19
+ "x-group": "basic",
20
+ "x-placeholder": "Enter agent external website url"
21
+ },
22
+ "ticker": {
23
+ "title": "Ticker",
24
+ "type": "string",
25
+ "description": "Ticker symbol of the agent",
26
+ "maxLength": 10,
27
+ "minLength": 1,
28
+ "x-group": "basic",
29
+ "x-placeholder": "If one day, your agent has it's own token, what will it be?"
30
+ },
31
+ "token_address": {
32
+ "title": "Token Address",
33
+ "type": "string",
34
+ "description": "Token address of the agent",
35
+ "maxLength": 42,
36
+ "x-group": "internal",
37
+ "readOnly": true
38
+ },
39
+ "token_pool": {
40
+ "title": "Token Pool",
41
+ "type": "string",
42
+ "description": "Pool of the agent token",
43
+ "maxLength": 42,
44
+ "x-group": "internal",
45
+ "readOnly": true
46
+ },
47
+ "fee_percentage": {
48
+ "title": "Fee Percentage",
49
+ "type": "number",
50
+ "description": "Fee percentage of the agent",
51
+ "minimum": 0,
52
+ "x-group": "basic"
53
+ },
54
+ "example_intro": {
55
+ "title": "Example Introduction",
56
+ "type": "string",
57
+ "description": "Introduction of the example",
58
+ "maxLength": 2000,
59
+ "x-group": "examples"
60
+ },
61
+ "examples": {
62
+ "title": "Examples",
63
+ "type": "array",
64
+ "description": "List of example prompts for the agent",
65
+ "maxItems": 6,
66
+ "items": {
67
+ "type": "object",
68
+ "properties": {
69
+ "name": {
70
+ "title": "Name",
71
+ "type": "string",
72
+ "description": "Name of the example",
73
+ "maxLength": 50,
74
+ "x-group": "examples"
75
+ },
76
+ "description": {
77
+ "title": "Description",
78
+ "type": "string",
79
+ "description": "Description of the example",
80
+ "maxLength": 200,
81
+ "x-group": "examples"
82
+ },
83
+ "prompt": {
84
+ "title": "Prompt",
85
+ "type": "string",
86
+ "description": "Example prompt",
87
+ "maxLength": 2000,
88
+ "x-group": "examples"
89
+ }
90
+ },
91
+ "required": ["name", "description", "prompt"]
92
+ },
93
+ "x-group": "examples",
94
+ "x-inline": true
95
+ }
96
+ },
97
+ "additionalProperties": true
98
+ }
@@ -67,34 +67,6 @@
67
67
  "x-group": "basic",
68
68
  "x-placeholder": "Enter agent name"
69
69
  },
70
- "fee_percentage": {
71
- "title": "Service Fee",
72
- "type": "number",
73
- "description": "A CAPs % added to the base cost, paid to the agent for delivering its unique logic and execution.",
74
- "minimum": 0,
75
- "maximum": 100,
76
- "default": 0,
77
- "x-step": 1,
78
- "x-group": "basic",
79
- "x-component": "slider-with-box",
80
- "x-nft-extra": 10
81
- },
82
- "description": {
83
- "title": "Description",
84
- "type": "string",
85
- "description": "Description of the agent, for public view, not contained in prompt",
86
- "maxLength": 3000,
87
- "x-group": "basic",
88
- "x-placeholder": "Introduce your agent"
89
- },
90
- "external_website": {
91
- "title": "External Website",
92
- "type": "string",
93
- "description": "Link of external website of the agent, if you have one",
94
- "format": "uri",
95
- "x-group": "basic",
96
- "x-placeholder": "Enter agent external website url"
97
- },
98
70
  "picture": {
99
71
  "title": "Picture",
100
72
  "type": "string",
@@ -563,52 +535,6 @@
563
535
  "x-group": "autonomous",
564
536
  "x-inline": true
565
537
  },
566
- "example_intro": {
567
- "title": "Agent Greeting",
568
- "type": "string",
569
- "description": "This is the first thing users see when they meet your agent. Use it to explain what your agent does, the services it provides and how it fits into the Nation.",
570
- "maxLength": 2000,
571
- "x-group": "examples"
572
- },
573
- "examples": {
574
- "title": "Quick Action List",
575
- "type": "array",
576
- "maxItems": 6,
577
- "items": {
578
- "type": "object",
579
- "properties": {
580
- "name": {
581
- "title": "Action Name",
582
- "type": "string",
583
- "description": "Quick action will show up on the UI as this name",
584
- "maxLength": 50,
585
- "x-group": "examples"
586
- },
587
- "description": {
588
- "title": "Description",
589
- "type": "string",
590
- "description": "Description of what this action does",
591
- "maxLength": 200,
592
- "x-group": "examples"
593
- },
594
- "prompt": {
595
- "title": "Prompt",
596
- "type": "string",
597
- "description": "When user clicks this action, the agent will execute this prompt",
598
- "maxLength": 2000,
599
- "x-str-type": "prompt",
600
- "x-group": "examples"
601
- }
602
- },
603
- "required": [
604
- "name",
605
- "description",
606
- "prompt"
607
- ]
608
- },
609
- "description": "Quick clickable actions users can use with the agent without having to type any text instructions.",
610
- "x-group": "examples"
611
- },
612
538
  "wallet_provider": {
613
539
  "title": "Wallet Provider",
614
540
  "type": "string",
@@ -642,29 +568,6 @@
642
568
  "optimism-sepolia"
643
569
  ],
644
570
  "x-group": "onchain"
645
- },
646
- "ticker": {
647
- "title": "Ticker",
648
- "type": "string",
649
- "description": "Ticker symbol of the agent",
650
- "maxLength": 10,
651
- "minLength": 1,
652
- "x-group": "onchain",
653
- "x-placeholder": "Enter agent ticker"
654
- },
655
- "token_address": {
656
- "title": "Token Address",
657
- "type": "string",
658
- "description": "Token address of the agent, if it already has one",
659
- "maxLength": 42,
660
- "x-group": "onchain"
661
- },
662
- "token_pool": {
663
- "title": "Token Pool",
664
- "type": "string",
665
- "description": "Pool of the agent token, if it has one",
666
- "maxLength": 42,
667
- "x-group": "onchain"
668
571
  }
669
572
  },
670
573
  "if": {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intentkit
3
- Version: 0.7.4rc2
3
+ Version: 0.7.4rc3
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=TwN56FgZdyyNNs4AUkvOPimEjE4SzDZJjIA1mdophCA,383
1
+ intentkit/__init__.py,sha256=s2YFGMc0CUDn5y5wMq8V0MH2BS9nzN7wZ4Ip9doC2A4,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
@@ -21,9 +21,10 @@ intentkit/core/credit.py,sha256=vW3I5c_fKe_bmFvOc9_EaMsMuAbqw-XQ_NbJg_okdA8,7528
21
21
  intentkit/core/engine.py,sha256=c5EJp2uxseSv5CLCEAH1UPgqLw6d2C_KlJzOQxSyrM4,36025
22
22
  intentkit/core/node.py,sha256=7h9zgDSd928bzUi3m3EZnKkhbwqlbRAQUr_uz7gKB5Y,8880
23
23
  intentkit/core/prompt.py,sha256=ssiyKHDNIjQOLU0KwUlIFX3jy51TqgeKOxrwnW4HBkw,15875
24
- intentkit/models/agent.py,sha256=Et9X9Geg5sZjJC3KsqpWEk2PyqoM6jn0aOQ4vUvjVPY,64826
24
+ intentkit/models/agent.py,sha256=tFBJjH18q0giEEydAH3vT_O4NtvZPXwKXqOoHiPjXsI,60951
25
25
  intentkit/models/agent_data.py,sha256=mVsiK8TziYa1W1ujU1KwI9osIVIeSM7XJEogGRL1WVU,28263
26
- intentkit/models/agent_schema.json,sha256=B7qUrQk8BqlRmyWDpK5XeMRf9_5rgAbrJ88ZtuUvpPw,20237
26
+ intentkit/models/agent_public.json,sha256=0X8Bd2WOobDJLsok8avWNzmzu4uvKSGEyy6Myn53eT4,2802
27
+ intentkit/models/agent_schema.json,sha256=hFGUE57JIiN8V4olgLf2LBXPejA2QLiQoFc6riM1UFo,17139
27
28
  intentkit/models/app_setting.py,sha256=iYbW63QD91bt4oEYV3wOXHuRFav2b4VXLwb_StgUQtQ,8230
28
29
  intentkit/models/base.py,sha256=o-zRjVrak-f5Jokdvj8BjLm8gcC3yYiYMCTLegwT2lA,185
29
30
  intentkit/models/chat.py,sha256=cDccEHU8nd7Y5uhrHDCuZGwqrRwhqCaeztMiZcemiug,20469
@@ -417,7 +418,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
417
418
  intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
418
419
  intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
419
420
  intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
420
- intentkit-0.7.4rc2.dist-info/METADATA,sha256=Fr3MzecqjCpaxFWEDJEc0n228nDSqaWou0m4crdrul0,6407
421
- intentkit-0.7.4rc2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
422
- intentkit-0.7.4rc2.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
423
- intentkit-0.7.4rc2.dist-info/RECORD,,
421
+ intentkit-0.7.4rc3.dist-info/METADATA,sha256=qm4IQmh6s40Wloz4pJUwzgM0JfHqibsSHI21ykAsiOI,6407
422
+ intentkit-0.7.4rc3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
423
+ intentkit-0.7.4rc3.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
424
+ intentkit-0.7.4rc3.dist-info/RECORD,,