|
6712 | 6712 | ] |
6713 | 6713 | ] |
6714 | 6714 | }, |
6715 | | - "Get favourite agents": { |
| 6715 | + "Get Enabled Capabilities": { |
6716 | 6716 | "main": [ |
6717 | 6717 | [ |
6718 | 6718 | { |
|
6728 | 6728 | [ |
6729 | 6729 | { |
6730 | 6730 | "index": 0, |
6731 | | - "node": "Get favourite agents", |
| 6731 | + "node": "Get Enabled Capabilities", |
6732 | 6732 | "type": "main" |
6733 | 6733 | } |
6734 | 6734 | ], |
|
6804 | 6804 | }, |
6805 | 6805 | "name": "Nearai", |
6806 | 6806 | "nodes": [ |
6807 | | - { |
6808 | | - "id": "8a9621e5-a1f6-4e97-aaa1-839583589b90", |
6809 | | - "name": "Get favourite agents", |
6810 | | - "parameters": { |
6811 | | - "headerParameters": { |
6812 | | - "parameters": [ |
6813 | | - { |
6814 | | - "name": "accept", |
6815 | | - "value": "application/json" |
6816 | | - } |
6817 | | - ] |
6818 | | - }, |
6819 | | - "method": "POST", |
6820 | | - "options": { |
6821 | | - "pagination": { |
6822 | | - "pagination": { |
6823 | | - "parameters": { |
6824 | | - "parameters": [ |
6825 | | - { |
6826 | | - "name": "offset", |
6827 | | - "value": "={{ $pageCount * 20}}" |
6828 | | - } |
6829 | | - ] |
6830 | | - }, |
6831 | | - "requestInterval": 1000 |
6832 | | - } |
6833 | | - } |
6834 | | - }, |
6835 | | - "queryParameters": { |
6836 | | - "parameters": [ |
6837 | | - { |
6838 | | - "name": "total", |
6839 | | - "value": "20" |
6840 | | - }, |
6841 | | - { |
6842 | | - "name": "show_hidden", |
6843 | | - "value": "false" |
6844 | | - }, |
6845 | | - { |
6846 | | - "name": "show_latest_version", |
6847 | | - "value": "true" |
6848 | | - }, |
6849 | | - { |
6850 | | - "name": "starred_by", |
6851 | | - "value": "={{ $json.near_account_id }}" |
6852 | | - } |
6853 | | - ] |
6854 | | - }, |
6855 | | - "sendHeaders": true, |
6856 | | - "sendQuery": true, |
6857 | | - "url": "https://api.near.ai/v1/registry/list_entries" |
6858 | | - }, |
6859 | | - "position": [ |
6860 | | - 1420, |
6861 | | - -40 |
6862 | | - ], |
6863 | | - "type": "n8n-nodes-base.httpRequest", |
6864 | | - "typeVersion": 4.2 |
6865 | | - }, |
6866 | 6807 | { |
6867 | 6808 | "id": "6ecde618-0bd1-46fc-9fd2-9915990560f1", |
6868 | 6809 | "name": "Aggregate", |
|
6964 | 6905 | } |
6965 | 6906 | ] |
6966 | 6907 | }, |
6967 | | - "jsonBody": "={\n \"agent_id\": \"{{ $json.agent_id }}\",\n \"new_message\": {{ $json.query.toJsonString() }},\n \"max_iterations\": \"1\"\n}", |
| 6908 | + "jsonBody": "={\n \"agent_id\": \"{{ $json.agent_id }}/latest\",\n \"new_message\": {{ $json.query.toJsonString() }},\n \"max_iterations\": \"1\"\n}", |
6968 | 6909 | "method": "POST", |
6969 | 6910 | "options": { |
6970 | 6911 | "response": { |
|
7098 | 7039 | "id": "6c45176b-c40e-4944-af38-7321ce59f7dd", |
7099 | 7040 | "name": "agent_id", |
7100 | 7041 | "type": "string", |
7101 | | - "value": "={{ $json.namespace }}/{{ $json.name }}/{{ $json.version }}" |
7102 | | - }, |
7103 | | - { |
7104 | | - "id": "f3f626c2-3863-47af-a933-440629d58c0d", |
7105 | | - "name": "description", |
7106 | | - "type": "string", |
7107 | | - "value": "={{ $json.description }}" |
| 7042 | + "value": "={{ $json.capability_name }}" |
7108 | 7043 | }, |
7109 | 7044 | { |
7110 | 7045 | "id": "ce866fd8-3d9f-460f-96e3-e882c61e2965", |
7111 | | - "name": "welcome_title", |
| 7046 | + "name": "title", |
7112 | 7047 | "type": "string", |
7113 | | - "value": "={{ $json.details.agent.welcome.title }}" |
| 7048 | + "value": "={{ $json.title }}" |
7114 | 7049 | }, |
7115 | 7050 | { |
7116 | | - "id": "2e4aba58-ca7d-4652-b6ab-2fa4d9ea28b0", |
7117 | | - "name": "welcome_description", |
| 7051 | + "id": "f3f626c2-3863-47af-a933-440629d58c0d", |
| 7052 | + "name": "description", |
7118 | 7053 | "type": "string", |
7119 | | - "value": "={{ $json.details.agent.welcome.description }}" |
| 7054 | + "value": "={{ $json.description }}" |
7120 | 7055 | } |
7121 | 7056 | ] |
7122 | 7057 | }, |
|
7242 | 7177 | ], |
7243 | 7178 | "type": "n8n-nodes-base.stopAndError", |
7244 | 7179 | "typeVersion": 1 |
| 7180 | + }, |
| 7181 | + { |
| 7182 | + "alwaysOutputData": true, |
| 7183 | + "credentials": { |
| 7184 | + "postgres": { |
| 7185 | + "id": "8ZOLCkWqvhw8gGkU", |
| 7186 | + "name": "Postgres account" |
| 7187 | + } |
| 7188 | + }, |
| 7189 | + "id": "c60746f4-6444-4c52-9368-a39f5a905a86", |
| 7190 | + "name": "Get Enabled Capabilities", |
| 7191 | + "parameters": { |
| 7192 | + "operation": "executeQuery", |
| 7193 | + "options": { |
| 7194 | + "queryReplacement": "={{ $json.username }}" |
| 7195 | + }, |
| 7196 | + "query": "select *\nfrom \"default\".user_capability as uc\njoin \"default\".capability as c on c.domain = uc.capability_domain and c.name = uc.capability_name\nwhere uc.username = $1\n and is_deleted = false\n and is_enabled = true\norder by uc.capability_domain asc, uc.capability_name asc" |
| 7197 | + }, |
| 7198 | + "position": [ |
| 7199 | + 1420, |
| 7200 | + -40 |
| 7201 | + ], |
| 7202 | + "type": "n8n-nodes-base.postgres", |
| 7203 | + "typeVersion": 2.6 |
7245 | 7204 | } |
7246 | 7205 | ], |
7247 | 7206 | "pinData": { |
|
7255 | 7214 | "tags": [ |
7256 | 7215 | ], |
7257 | 7216 | "triggerCount": 0, |
7258 | | - "updatedAt": "2025-04-23T06:45:42.000Z", |
7259 | | - "versionId": "cca0f0bd-3b89-4c69-bb3f-2ce08fe3460a" |
| 7217 | + "updatedAt": "2025-04-24T15:55:52.000Z", |
| 7218 | + "versionId": "a2a61705-bbf3-4762-adbf-07a42f2fc798" |
7260 | 7219 | }, |
7261 | 7220 | { |
7262 | 7221 | "active": false, |
|
0 commit comments