n8n-nodes-vercel-ai-sdk-universal-temp 0.2.55 → 0.2.57

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UNIVERSAL_TRANSCRIPTION_DESCRIPTION = exports.UNIVERSAL_AI_DESCRIPTION = exports.UNIVERSAL_EMBEDDING_DESCRIPTION = exports.UNIVERSAL_IMAGE_GEN_DESCRIPTION = exports.UNIVERSAL_SPEECH_GEN_DESCRIPTION = void 0;
3
+ exports.UNIVERSAL_TRANSCRIPTION_DESCRIPTION = exports.UNIVERSAL_AGENT_DESCRIPTION = exports.UNIVERSAL_AI_DESCRIPTION = exports.UNIVERSAL_EMBEDDING_DESCRIPTION = exports.UNIVERSAL_IMAGE_GEN_DESCRIPTION = exports.UNIVERSAL_SPEECH_GEN_DESCRIPTION = void 0;
4
4
  exports.UNIVERSAL_SPEECH_GEN_DESCRIPTION = {
5
5
  displayName: 'Universal Speech Generation',
6
6
  name: 'universalSpeechGen',
@@ -1133,7 +1133,7 @@ exports.UNIVERSAL_AI_DESCRIPTION = {
1133
1133
  operation: ['generateObject'],
1134
1134
  },
1135
1135
  },
1136
- default: `{\n\t"type": "object",\n\t"properties": {\n\t\t"sentiment": {\n\t\t"type": "string",\n\t\t"enum": ["positive","negative","neutral"],\n\t\t"description": "The overall sentiment of the text"\n\t\t},\n\t\t"score": {\n\t\t"type": "number",\n\t\t"minimum": -1,\n\t\t"maximum": 1,\n\t\t"description": "Sentiment score from -1 (negative) to 1 (positive)"\n\t\t},\n\t\t"text": {\n\t\t"type": "string",\n\t\t"description": "The text content to analyze"\n\t\t}\n\t}\n}`,
1136
+ default: `{\n\t"type": "object",\n\t"properties": {\n\t"sentiment": {\n\t\t"type": "string",\n\t\t"enum": ["positive","negative","neutral"],\n\t\t"description": "The overall sentiment of the text"\n\t\t},\n\t\t"score": {\n\t"type": "number",\n\t\t"minimum": -1,\n\t\t"maximum": 1,\n\t\t"description": "Sentiment score from -1 (negative) to 1 (positive)"\n\t},\n\t"text": {\n\t\t"type": "string",\n\t\t"description": "The text content to analyze"\n\t\t}\n\t}\n}`,
1137
1137
  required: true,
1138
1138
  description: 'JSON schema describing the structure and constraints of the object to generate',
1139
1139
  hint: 'For example, a schema describing sentiment analysis output.',
@@ -1418,6 +1418,306 @@ exports.UNIVERSAL_AI_DESCRIPTION = {
1418
1418
  },
1419
1419
  description: 'Enable Google-specific tools for enhanced capabilities',
1420
1420
  },
1421
+ {
1422
+ displayName: 'Enable Streaming',
1423
+ name: 'enableStreaming',
1424
+ type: 'boolean',
1425
+ default: false,
1426
+ displayOptions: {
1427
+ show: {
1428
+ operation: ['generateText'],
1429
+ },
1430
+ },
1431
+ description: 'Stream the response in chunks. Output will contain multiple items.',
1432
+ },
1433
+ ],
1434
+ };
1435
+ exports.UNIVERSAL_AGENT_DESCRIPTION = {
1436
+ displayName: 'Universal Agent',
1437
+ name: 'universalAgent',
1438
+ icon: 'file:icons/UniversalAI.svg',
1439
+ iconColor: 'purple',
1440
+ group: ['transform'],
1441
+ version: 1,
1442
+ subtitle: '={{$parameter["provider"] + ": " + $parameter["operation"]}}',
1443
+ description: 'Interact with stateful AI agents using Letta',
1444
+ defaults: {
1445
+ name: 'Universal Agent',
1446
+ },
1447
+ inputs: ['main'],
1448
+ outputs: ['main'],
1449
+ credentials: [
1450
+ {
1451
+ name: 'lettaApi',
1452
+ required: false,
1453
+ displayOptions: {
1454
+ show: {
1455
+ provider: ['letta'],
1456
+ },
1457
+ },
1458
+ },
1459
+ ],
1460
+ properties: [
1461
+ {
1462
+ displayName: 'Provider',
1463
+ name: 'provider',
1464
+ type: 'options',
1465
+ required: true,
1466
+ noDataExpression: true,
1467
+ options: [
1468
+ {
1469
+ name: 'Letta AI',
1470
+ value: 'letta',
1471
+ description: 'Stateful AI agents with long-term memory',
1472
+ },
1473
+ ],
1474
+ default: 'letta',
1475
+ description: 'Choose which agent provider to use',
1476
+ },
1477
+ {
1478
+ displayName: 'Operation',
1479
+ name: 'operation',
1480
+ type: 'options',
1481
+ required: true,
1482
+ noDataExpression: true,
1483
+ options: [
1484
+ {
1485
+ name: 'Chat',
1486
+ value: 'chat',
1487
+ description: 'Send a message to an agent and receive a response',
1488
+ action: 'Chat with agent',
1489
+ },
1490
+ {
1491
+ name: 'Create Agent',
1492
+ value: 'createAgent',
1493
+ description: 'Create a new agent',
1494
+ action: 'Create agent',
1495
+ },
1496
+ {
1497
+ name: 'Manage Agent',
1498
+ value: 'manageAgent',
1499
+ description: 'Get, update, or delete an existing agent',
1500
+ action: 'Manage agent',
1501
+ },
1502
+ ],
1503
+ default: 'chat',
1504
+ description: 'The operation to perform',
1505
+ },
1506
+ {
1507
+ displayName: 'Input Type',
1508
+ name: 'inputType',
1509
+ type: 'options',
1510
+ required: true,
1511
+ noDataExpression: true,
1512
+ displayOptions: {
1513
+ show: {
1514
+ operation: ['chat'],
1515
+ },
1516
+ },
1517
+ options: [
1518
+ {
1519
+ name: 'Simple Prompt',
1520
+ value: 'prompt',
1521
+ description: 'Use a single prompt',
1522
+ },
1523
+ {
1524
+ name: 'Messages',
1525
+ value: 'messages',
1526
+ description: 'Use a conversation with multiple messages',
1527
+ },
1528
+ ],
1529
+ default: 'prompt',
1530
+ description: 'Choose how you want to provide input to the model',
1531
+ },
1532
+ {
1533
+ displayName: 'Prompt',
1534
+ name: 'prompt',
1535
+ type: 'string',
1536
+ typeOptions: {
1537
+ rows: 4,
1538
+ },
1539
+ displayOptions: {
1540
+ show: {
1541
+ operation: ['chat'],
1542
+ inputType: ['prompt'],
1543
+ },
1544
+ },
1545
+ default: '',
1546
+ required: true,
1547
+ description: 'The single text prompt to send to the agent',
1548
+ hint: 'You can drag data from previous nodes here using expressions.',
1549
+ requiresDataPath: 'single',
1550
+ },
1551
+ {
1552
+ displayName: 'Messages',
1553
+ name: 'messages',
1554
+ type: 'fixedCollection',
1555
+ typeOptions: {
1556
+ multipleValues: true,
1557
+ sortable: true,
1558
+ minValue: 1,
1559
+ },
1560
+ displayOptions: {
1561
+ show: {
1562
+ operation: ['chat'],
1563
+ inputType: ['messages'],
1564
+ },
1565
+ },
1566
+ description: 'The messages for the conversation',
1567
+ default: {
1568
+ messagesUi: [
1569
+ {
1570
+ role: 'user',
1571
+ content: 'Hello!',
1572
+ },
1573
+ ],
1574
+ },
1575
+ required: true,
1576
+ options: [
1577
+ {
1578
+ name: 'messagesUi',
1579
+ displayName: 'Message',
1580
+ values: [
1581
+ {
1582
+ displayName: 'Role',
1583
+ name: 'role',
1584
+ type: 'options',
1585
+ noDataExpression: true,
1586
+ options: [
1587
+ {
1588
+ name: 'Assistant',
1589
+ value: 'assistant',
1590
+ },
1591
+ {
1592
+ name: 'System',
1593
+ value: 'system',
1594
+ },
1595
+ {
1596
+ name: 'User',
1597
+ value: 'user',
1598
+ },
1599
+ ],
1600
+ default: 'user',
1601
+ required: true,
1602
+ },
1603
+ {
1604
+ displayName: 'Text Content',
1605
+ name: 'content',
1606
+ type: 'string',
1607
+ typeOptions: {
1608
+ rows: 4,
1609
+ },
1610
+ displayOptions: {
1611
+ show: {
1612
+ role: ['assistant', 'user'],
1613
+ },
1614
+ },
1615
+ default: '',
1616
+ description: 'Primary text content of the message',
1617
+ required: true,
1618
+ requiresDataPath: 'single',
1619
+ },
1620
+ ],
1621
+ },
1622
+ ],
1623
+ },
1624
+ {
1625
+ displayName: 'Create New Agent',
1626
+ name: 'lettaCreateNewAgent',
1627
+ type: 'boolean',
1628
+ default: false,
1629
+ displayOptions: {
1630
+ show: {
1631
+ operation: ['chat'],
1632
+ },
1633
+ },
1634
+ description: 'Create a new agent instead of using an existing one. This allows for dynamic agent creation per workflow run.',
1635
+ },
1636
+ {
1637
+ displayName: 'New Agent Configuration',
1638
+ name: 'lettaNewAgentConfig',
1639
+ type: 'collection',
1640
+ displayOptions: {
1641
+ show: {
1642
+ operation: ['chat'],
1643
+ lettaCreateNewAgent: [true],
1644
+ },
1645
+ },
1646
+ default: {},
1647
+ description: 'Configuration for creating a new agent',
1648
+ options: [
1649
+ {
1650
+ displayName: 'Agent Name',
1651
+ name: 'name',
1652
+ type: 'string',
1653
+ default: '',
1654
+ description: 'Name for the new agent',
1655
+ },
1656
+ {
1657
+ displayName: 'Model',
1658
+ name: 'model',
1659
+ type: 'string',
1660
+ default: 'openai/gpt-4o-mini',
1661
+ description: 'Model to use for the new agent',
1662
+ },
1663
+ {
1664
+ displayName: 'Embedding Model',
1665
+ name: 'embedding',
1666
+ type: 'string',
1667
+ default: 'openai/text-embedding-3-small',
1668
+ description: 'Embedding model for the new agent',
1669
+ },
1670
+ {
1671
+ displayName: 'System Prompt',
1672
+ name: 'system',
1673
+ type: 'string',
1674
+ typeOptions: {
1675
+ rows: 4,
1676
+ },
1677
+ default: '',
1678
+ description: 'System prompt for the new agent',
1679
+ },
1680
+ {
1681
+ displayName: 'Tags',
1682
+ name: 'tags',
1683
+ type: 'string',
1684
+ default: '',
1685
+ description: 'Comma-separated tags for the new agent',
1686
+ },
1687
+ {
1688
+ displayName: 'Memory Blocks',
1689
+ name: 'memoryBlocks',
1690
+ type: 'fixedCollection',
1691
+ typeOptions: {
1692
+ multipleValues: true,
1693
+ },
1694
+ default: [],
1695
+ description: 'Initial memory blocks for the new agent',
1696
+ options: [
1697
+ {
1698
+ name: 'block',
1699
+ displayName: 'Block',
1700
+ values: [
1701
+ {
1702
+ displayName: 'Label',
1703
+ name: 'label',
1704
+ type: 'string',
1705
+ default: '',
1706
+ description: 'Memory block label',
1707
+ },
1708
+ {
1709
+ displayName: 'Value',
1710
+ name: 'value',
1711
+ type: 'string',
1712
+ default: '',
1713
+ description: 'Memory block value',
1714
+ },
1715
+ ],
1716
+ },
1717
+ ],
1718
+ },
1719
+ ],
1720
+ },
1421
1721
  {
1422
1722
  displayName: 'Agent ID',
1423
1723
  name: 'lettaAgentId',
@@ -1429,11 +1729,96 @@ exports.UNIVERSAL_AI_DESCRIPTION = {
1429
1729
  },
1430
1730
  displayOptions: {
1431
1731
  show: {
1432
- provider: ['letta'],
1732
+ operation: ['chat'],
1733
+ lettaCreateNewAgent: [false],
1433
1734
  },
1434
1735
  },
1435
1736
  description: 'The Letta agent to use. Select from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a> (format: agent-<uuid>).',
1436
1737
  },
1738
+ {
1739
+ displayName: 'Multi-User Mode',
1740
+ name: 'lettaMultiUserMode',
1741
+ type: 'boolean',
1742
+ default: false,
1743
+ displayOptions: {
1744
+ show: {
1745
+ operation: ['chat'],
1746
+ },
1747
+ },
1748
+ description: 'Enable multi-user mode where each user gets isolated context. Requires proper identity management.',
1749
+ },
1750
+ {
1751
+ displayName: 'User Context Field',
1752
+ name: 'lettaUserContextField',
1753
+ type: 'string',
1754
+ default: '{{$json.userId || $json.chatId || $json.id}}',
1755
+ displayOptions: {
1756
+ show: {
1757
+ operation: ['chat'],
1758
+ lettaMultiUserMode: [true],
1759
+ },
1760
+ },
1761
+ description: 'Expression to extract the user identifier for context isolation. Use n8n expressions to reference user ID, chat ID, or other unique identifiers from input data.',
1762
+ },
1763
+ {
1764
+ displayName: 'Multi-Agent Mode',
1765
+ name: 'lettaMultiAgentMode',
1766
+ type: 'boolean',
1767
+ default: false,
1768
+ displayOptions: {
1769
+ show: {
1770
+ operation: ['chat'],
1771
+ },
1772
+ },
1773
+ description: 'Enable multi-agent mode where a message can be sent to multiple agents. Requires proper agent selection.',
1774
+ },
1775
+ {
1776
+ displayName: 'Agent IDs',
1777
+ name: 'lettaAgentIds',
1778
+ type: 'multiOptions',
1779
+ default: [],
1780
+ required: true,
1781
+ typeOptions: {
1782
+ loadOptionsMethod: 'getLettaAgents',
1783
+ },
1784
+ displayOptions: {
1785
+ show: {
1786
+ operation: ['chat'],
1787
+ lettaMultiAgentMode: [true],
1788
+ },
1789
+ },
1790
+ description: 'The Letta agents to use in multi-agent mode. Select from the list (format: agent-<uuid>).',
1791
+ },
1792
+ {
1793
+ displayName: 'Multi-Agent Type',
1794
+ name: 'lettaMultiAgentType',
1795
+ type: 'options',
1796
+ default: 'sequential',
1797
+ options: [
1798
+ {
1799
+ name: 'Sequential',
1800
+ value: 'sequential',
1801
+ description: 'Process agents one after another',
1802
+ },
1803
+ {
1804
+ name: 'Parallel',
1805
+ value: 'parallel',
1806
+ description: 'Send message to all agents simultaneously',
1807
+ },
1808
+ {
1809
+ name: 'First Response',
1810
+ value: 'first_response',
1811
+ description: 'Use the response from the first agent that responds',
1812
+ },
1813
+ ],
1814
+ displayOptions: {
1815
+ show: {
1816
+ operation: ['chat'],
1817
+ lettaMultiAgentMode: [true],
1818
+ },
1819
+ },
1820
+ description: 'How to handle multiple agents in multi-agent mode.',
1821
+ },
1437
1822
  {
1438
1823
  displayName: 'Max Steps',
1439
1824
  name: 'lettaMaxSteps',
@@ -1445,7 +1830,7 @@ exports.UNIVERSAL_AI_DESCRIPTION = {
1445
1830
  },
1446
1831
  displayOptions: {
1447
1832
  show: {
1448
- provider: ['letta'],
1833
+ operation: ['chat'],
1449
1834
  },
1450
1835
  },
1451
1836
  description: 'Maximum number of steps the agent can take',
@@ -1457,7 +1842,7 @@ exports.UNIVERSAL_AI_DESCRIPTION = {
1457
1842
  default: false,
1458
1843
  displayOptions: {
1459
1844
  show: {
1460
- provider: ['letta'],
1845
+ operation: ['chat'],
1461
1846
  },
1462
1847
  },
1463
1848
  description: 'Run the agent in background mode for long-running tasks',
@@ -1469,77 +1854,198 @@ exports.UNIVERSAL_AI_DESCRIPTION = {
1469
1854
  default: false,
1470
1855
  displayOptions: {
1471
1856
  show: {
1472
- provider: ['letta'],
1473
- operation: ['generateText'],
1857
+ operation: ['chat'],
1474
1858
  },
1475
1859
  },
1476
1860
  description: 'Stream individual tokens in the response (requires streaming enabled)',
1477
1861
  },
1478
1862
  {
1479
- displayName: 'Include Pings',
1480
- name: 'lettaIncludePings',
1481
- type: 'boolean',
1482
- default: false,
1863
+ displayName: 'Agent Configuration',
1864
+ name: 'createAgentConfig',
1865
+ type: 'collection',
1483
1866
  displayOptions: {
1484
1867
  show: {
1485
- provider: ['letta'],
1868
+ operation: ['createAgent'],
1486
1869
  },
1487
1870
  },
1488
- description: 'Include ping messages during agent processing',
1489
- },
1490
- {
1491
- displayName: 'Timeout (Seconds)',
1492
- name: 'lettaTimeoutInSeconds',
1493
- type: 'number',
1494
- default: 300,
1495
- typeOptions: {
1496
- minValue: 10,
1497
- maxValue: 3600,
1498
- },
1499
- displayOptions: {
1500
- show: {
1501
- provider: ['letta'],
1871
+ default: {},
1872
+ description: 'Configuration for creating a new agent',
1873
+ options: [
1874
+ {
1875
+ displayName: 'Agent Name',
1876
+ name: 'name',
1877
+ type: 'string',
1878
+ default: '',
1879
+ description: 'Name for the new agent',
1502
1880
  },
1503
- },
1504
- description: 'Maximum time to wait for agent response',
1881
+ {
1882
+ displayName: 'Model',
1883
+ name: 'model',
1884
+ type: 'string',
1885
+ default: 'openai/gpt-4o-mini',
1886
+ description: 'Model to use for the new agent',
1887
+ },
1888
+ {
1889
+ displayName: 'Embedding Model',
1890
+ name: 'embedding',
1891
+ type: 'string',
1892
+ default: 'openai/text-embedding-3-small',
1893
+ description: 'Embedding model for the new agent',
1894
+ },
1895
+ {
1896
+ displayName: 'System Prompt',
1897
+ name: 'system',
1898
+ type: 'string',
1899
+ typeOptions: {
1900
+ rows: 4,
1901
+ },
1902
+ default: '',
1903
+ description: 'System prompt for the new agent',
1904
+ },
1905
+ {
1906
+ displayName: 'Tags',
1907
+ name: 'tags',
1908
+ type: 'string',
1909
+ default: '',
1910
+ description: 'Comma-separated tags for the new agent',
1911
+ },
1912
+ {
1913
+ displayName: 'Memory Blocks',
1914
+ name: 'memoryBlocks',
1915
+ type: 'fixedCollection',
1916
+ typeOptions: {
1917
+ multipleValues: true,
1918
+ },
1919
+ default: [],
1920
+ description: 'Initial memory blocks for the new agent',
1921
+ options: [
1922
+ {
1923
+ name: 'block',
1924
+ displayName: 'Block',
1925
+ values: [
1926
+ {
1927
+ displayName: 'Label',
1928
+ name: 'label',
1929
+ type: 'string',
1930
+ default: '',
1931
+ description: 'Memory block label',
1932
+ },
1933
+ {
1934
+ displayName: 'Value',
1935
+ name: 'value',
1936
+ type: 'string',
1937
+ default: '',
1938
+ description: 'Memory block value',
1939
+ },
1940
+ ],
1941
+ },
1942
+ ],
1943
+ },
1944
+ ],
1505
1945
  },
1506
1946
  {
1507
- displayName: 'Use Assistant Message',
1508
- name: 'lettaUseAssistantMessage',
1509
- type: 'boolean',
1510
- default: false,
1947
+ displayName: 'Manage Agent Operation',
1948
+ name: 'manageAgentOperation',
1949
+ type: 'options',
1950
+ required: true,
1511
1951
  displayOptions: {
1512
1952
  show: {
1513
- provider: ['letta'],
1953
+ operation: ['manageAgent'],
1514
1954
  },
1515
1955
  },
1516
- description: 'Use assistant message format for responses',
1956
+ options: [
1957
+ {
1958
+ name: 'Get Agent',
1959
+ value: 'get',
1960
+ description: 'Retrieve agent details',
1961
+ },
1962
+ {
1963
+ name: 'Update Agent',
1964
+ value: 'update',
1965
+ description: 'Update agent configuration',
1966
+ },
1967
+ {
1968
+ name: 'Delete Agent',
1969
+ value: 'delete',
1970
+ description: 'Delete an agent',
1971
+ },
1972
+ ],
1973
+ default: 'get',
1974
+ description: 'The specific operation to perform on the agent',
1517
1975
  },
1518
1976
  {
1519
- displayName: 'Assistant Message Tool Name',
1520
- name: 'lettaAssistantMessageToolName',
1977
+ displayName: 'Agent ID',
1978
+ name: 'manageAgentId',
1521
1979
  type: 'string',
1522
1980
  default: '',
1981
+ required: true,
1523
1982
  displayOptions: {
1524
1983
  show: {
1525
- provider: ['letta'],
1526
- lettaUseAssistantMessage: [true],
1984
+ operation: ['manageAgent'],
1527
1985
  },
1528
1986
  },
1529
- description: 'Tool name for assistant messages',
1987
+ description: 'The ID of the agent to manage',
1530
1988
  },
1531
1989
  {
1532
- displayName: 'Assistant Message Tool Kwarg',
1533
- name: 'lettaAssistantMessageToolKwarg',
1534
- type: 'string',
1535
- default: '',
1990
+ displayName: 'Update Agent Configuration',
1991
+ name: 'updateAgentConfig',
1992
+ type: 'collection',
1536
1993
  displayOptions: {
1537
1994
  show: {
1538
- provider: ['letta'],
1539
- lettaUseAssistantMessage: [true],
1995
+ operation: ['manageAgent'],
1996
+ manageAgentOperation: ['update'],
1540
1997
  },
1541
1998
  },
1542
- description: 'Tool keyword argument for assistant messages',
1999
+ default: {},
2000
+ description: 'Configuration for updating the agent',
2001
+ options: [
2002
+ {
2003
+ displayName: 'Model',
2004
+ name: 'model',
2005
+ type: 'string',
2006
+ default: '',
2007
+ description: 'New model for the agent',
2008
+ },
2009
+ {
2010
+ displayName: 'Tags',
2011
+ name: 'tags',
2012
+ type: 'string',
2013
+ default: '',
2014
+ description: 'Comma-separated tags for the agent (leave empty to not change)',
2015
+ },
2016
+ {
2017
+ displayName: 'Memory Blocks',
2018
+ name: 'memoryBlocks',
2019
+ type: 'fixedCollection',
2020
+ typeOptions: {
2021
+ multipleValues: true,
2022
+ },
2023
+ default: [],
2024
+ description: 'New memory blocks for the agent',
2025
+ options: [
2026
+ {
2027
+ name: 'block',
2028
+ displayName: 'Block',
2029
+ values: [
2030
+ {
2031
+ displayName: 'Label',
2032
+ name: 'label',
2033
+ type: 'string',
2034
+ default: '',
2035
+ description: 'Memory block label',
2036
+ },
2037
+ {
2038
+ displayName: 'Value',
2039
+ name: 'value',
2040
+ type: 'string',
2041
+ default: '',
2042
+ description: 'Memory block value',
2043
+ },
2044
+ ],
2045
+ },
2046
+ ],
2047
+ },
2048
+ ],
1543
2049
  },
1544
2050
  {
1545
2051
  displayName: 'Enable Streaming',
@@ -1548,7 +2054,7 @@ exports.UNIVERSAL_AI_DESCRIPTION = {
1548
2054
  default: false,
1549
2055
  displayOptions: {
1550
2056
  show: {
1551
- operation: ['generateText'],
2057
+ operation: ['chat'],
1552
2058
  },
1553
2059
  },
1554
2060
  description: 'Stream the response in chunks. Output will contain multiple items.',