felo-ai 0.2.18 → 0.2.23
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.
- package/felo-superAgent/README.md +354 -80
- package/felo-superAgent/SKILL.md +466 -65
- package/felo-superAgent/scripts/run_superagent.mjs +569 -0
- package/package.json +2 -3
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
# Felo SuperAgent Skill for Claude Code
|
|
2
2
|
|
|
3
|
-
**AI
|
|
3
|
+
**AI conversation with real-time streaming output, supporting continuous conversation.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use the Felo Open Platform SuperAgent API in Claude Code to initiate conversations with SuperAgent, receive real-time SSE streaming responses, and query conversation details.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Features
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
- **LiveDoc
|
|
13
|
-
-
|
|
14
|
-
- **LiveDoc
|
|
15
|
-
-
|
|
16
|
-
-
|
|
11
|
+
- **Streaming conversation**: Create a conversation and receive AI responses in real-time via SSE
|
|
12
|
+
- **LiveDoc association**: Each conversation corresponds to a LiveDoc for subsequent resource viewing
|
|
13
|
+
- **Continuous conversation**: Continue asking questions in an existing conversation using `--thread-id`
|
|
14
|
+
- **LiveDoc management**: List LiveDocs and view resources within a specific LiveDoc
|
|
15
|
+
- **Multi-language**: Supports `accept_language` (e.g., zh, en, ja, ko)
|
|
16
|
+
- **Tool invocation**: Supports image generation, research reports, documents, PPT, HTML, Twitter search, and more
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
**Use cases:**
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
20
|
+
- Need SuperAgent streaming answers
|
|
21
|
+
- Need conversation associated with LiveDoc for traceable resources
|
|
22
|
+
- Multi-turn/continuous conversation (reuse the same LiveDoc)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
**Not suitable for:**
|
|
25
25
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
26
|
+
- Simple one-off real-time information retrieval → use `felo-search`
|
|
27
|
+
- Only need to fetch webpage content → use `felo-web-fetch`
|
|
28
|
+
- Only need to generate PPT → use `felo-slides`
|
|
29
|
+
- Need LiveDoc knowledge base features → use `felo-livedoc`
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Quick Start
|
|
34
34
|
|
|
35
|
-
### 1.
|
|
35
|
+
### 1. Installation
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
**One-click install (recommended):**
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
npx skills add Felo-Inc/felo-skills --skill felo-superAgent
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
**Manual install:** If the above command is unavailable, copy from this repository to Claude Code's skills directory:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
# Linux/macOS
|
|
@@ -50,15 +50,15 @@ cp -r felo-superAgent ~/.claude/skills/
|
|
|
50
50
|
Copy-Item -Recurse felo-superAgent "$env:USERPROFILE\.claude\skills\"
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
(If using a local skill, ensure Cursor/Claude Code has configured the skill path.)
|
|
54
54
|
|
|
55
|
-
### 2.
|
|
55
|
+
### 2. Configure API Key
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Same as other Felo skills, use the same API Key:
|
|
58
58
|
|
|
59
|
-
1.
|
|
60
|
-
2.
|
|
61
|
-
3.
|
|
59
|
+
1. Open [felo.ai](https://felo.ai) and log in
|
|
60
|
+
2. Avatar → **Settings** → **API Keys** → Create and copy Key
|
|
61
|
+
3. Set environment variable:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
64
|
# Linux/macOS
|
|
@@ -68,114 +68,388 @@ export FELO_API_KEY="your-api-key-here"
|
|
|
68
68
|
$env:FELO_API_KEY="your-api-key-here"
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
For permanent configuration, add to your shell profile (~/.bashrc, ~/.zshrc) or system environment variables.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
### 3. Usage
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
- 描述意图:SuperAgent 对话、流式对话、LiveDoc 对话、连续对话
|
|
75
|
+
**Trigger in conversation:**
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
- Explicit commands: `/felo-superagent`, "use felo super agent"
|
|
78
|
+
- Describe intent: SuperAgent conversation, streaming conversation, LiveDoc conversation, continuous conversation
|
|
79
|
+
|
|
80
|
+
**Run script directly from command line:**
|
|
79
81
|
|
|
80
82
|
```bash
|
|
81
83
|
node felo-superAgent/scripts/run_superagent.mjs --query "What is the latest news about AI?"
|
|
82
84
|
```
|
|
83
85
|
|
|
84
|
-
|
|
86
|
+
Output is the complete answer text after streaming aggregation. Add `--json` to get JSON including `thread_short_id` and `live_doc_short_id`.
|
|
85
87
|
|
|
86
|
-
**CLI
|
|
88
|
+
**CLI commands (after installation):**
|
|
87
89
|
|
|
88
90
|
```bash
|
|
89
|
-
# SuperAgent
|
|
91
|
+
# SuperAgent conversation
|
|
90
92
|
felo superagent "What is the latest news about AI?"
|
|
91
93
|
|
|
92
|
-
#
|
|
94
|
+
# Continue conversation
|
|
93
95
|
felo superagent "Tell me more" --thread-id <thread_short_id>
|
|
94
96
|
|
|
95
|
-
#
|
|
97
|
+
# List LiveDocs
|
|
96
98
|
felo livedocs
|
|
97
99
|
felo livedocs --page 2 --size 10
|
|
98
100
|
felo livedocs --keyword AI
|
|
99
101
|
|
|
100
|
-
#
|
|
102
|
+
# View resources in a specific LiveDoc
|
|
101
103
|
felo livedoc-resources <livedoc-id>
|
|
102
104
|
```
|
|
103
105
|
|
|
104
106
|
---
|
|
105
107
|
|
|
106
|
-
##
|
|
108
|
+
## Script Parameters
|
|
107
109
|
|
|
108
110
|
### superagent
|
|
109
111
|
|
|
110
|
-
|
|
|
111
|
-
| --------------------------------- |
|
|
112
|
-
| `--query <text>` |
|
|
113
|
-
| `--thread-id <id>` |
|
|
114
|
-
| `--live-doc-id <id>` |
|
|
115
|
-
| `--skill-id <id>` | Skill ID
|
|
116
|
-
| `--selected-resource-ids <ids>` |
|
|
117
|
-
| `--ext <json>` |
|
|
118
|
-
| `--accept-language <lang>` |
|
|
119
|
-
| `--timeout <seconds>` |
|
|
120
|
-
| `--json` |
|
|
121
|
-
| `--verbose` |
|
|
112
|
+
| Parameter | Description |
|
|
113
|
+
| --------------------------------- | ----------------------------------------------------------------- |
|
|
114
|
+
| `--query <text>` | User question (required, 1-2000 characters) |
|
|
115
|
+
| `--thread-id <id>` | Existing thread ID for follow-up conversations |
|
|
116
|
+
| `--live-doc-id <id>` | Reuse existing LiveDoc short_id (continuous conversation) |
|
|
117
|
+
| `--skill-id <id>` | Skill ID (new conversations only) |
|
|
118
|
+
| `--selected-resource-ids <ids>` | Comma-separated resource IDs (new conversations only) |
|
|
119
|
+
| `--ext <json>` | Extra parameters as JSON, e.g., `'{"style_id":"xxx"}'` (new conversations only) |
|
|
120
|
+
| `--accept-language <lang>` | Language preference, e.g., zh, en, ja, ko |
|
|
121
|
+
| `--timeout <seconds>` | Request/stream timeout, default 60 |
|
|
122
|
+
| `--json` | Output JSON (includes answer, thread_short_id, live_doc_short_id) |
|
|
123
|
+
| `--verbose` | Log stream connection details to stderr |
|
|
122
124
|
|
|
123
125
|
### livedocs
|
|
124
126
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
| `-p, --page <number>`
|
|
128
|
-
| `-s, --size <number>`
|
|
129
|
-
| `-k, --keyword <text>`
|
|
130
|
-
| `-j, --json`
|
|
131
|
-
| `-t, --timeout <seconds>` |
|
|
127
|
+
| Parameter | Description |
|
|
128
|
+
| -------------------------- | ------------------------------- |
|
|
129
|
+
| `-p, --page <number>` | Page number, default 1 |
|
|
130
|
+
| `-s, --size <number>` | Items per page, default 20 |
|
|
131
|
+
| `-k, --keyword <text>` | Keyword filter |
|
|
132
|
+
| `-j, --json` | Output raw JSON |
|
|
133
|
+
| `-t, --timeout <seconds>` | Request timeout, default 60 |
|
|
132
134
|
|
|
133
135
|
### livedoc-resources
|
|
134
136
|
|
|
135
|
-
|
|
|
136
|
-
| -------------------------- |
|
|
137
|
-
| `<livedoc-id>` | LiveDoc short_id
|
|
138
|
-
| `-j, --json` |
|
|
139
|
-
| `-t, --timeout <seconds>` |
|
|
137
|
+
| Parameter | Description |
|
|
138
|
+
| -------------------------- | ------------------------------- |
|
|
139
|
+
| `<livedoc-id>` | LiveDoc short_id (required) |
|
|
140
|
+
| `-j, --json` | Output raw JSON |
|
|
141
|
+
| `-t, --timeout <seconds>` | Request timeout, default 60 |
|
|
140
142
|
|
|
141
143
|
---
|
|
142
144
|
|
|
143
|
-
##
|
|
145
|
+
## Output Format
|
|
144
146
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
**Default (plain text):**
|
|
148
|
+
Script stdout is the complete answer content (concatenated from SSE `message` events).
|
|
147
149
|
|
|
148
|
-
**`--json
|
|
149
|
-
|
|
150
|
+
**`--json`:**
|
|
151
|
+
Single-line JSON object, for example:
|
|
150
152
|
|
|
151
153
|
```json
|
|
152
154
|
{
|
|
153
155
|
"status": "ok",
|
|
154
156
|
"data": {
|
|
155
|
-
"answer": "
|
|
157
|
+
"answer": "Complete answer content...",
|
|
156
158
|
"thread_short_id": "TvyKouzJirXjFdst4uKRK3",
|
|
157
|
-
"live_doc_short_id": "PvyKouzJirXjFdst4uKRK3"
|
|
159
|
+
"live_doc_short_id": "PvyKouzJirXjFdst4uKRK3",
|
|
160
|
+
"live_doc_url": "https://felo.ai/zh-Hans/livedoc/...",
|
|
161
|
+
"image_urls": [{"url": "...", "title": "..."}],
|
|
162
|
+
"discoveries": [{"title": "Research Report"}],
|
|
163
|
+
"documents": [{"title": "Generated Document"}],
|
|
164
|
+
"ppts": [{"title": "Presentation"}],
|
|
165
|
+
"htmls": [{"title": "HTML Page"}],
|
|
166
|
+
"search_x": [{"tweets": [...]}]
|
|
158
167
|
}
|
|
159
168
|
}
|
|
160
169
|
```
|
|
161
170
|
|
|
162
|
-
|
|
171
|
+
Use `thread_short_id` to call the "query conversation details" API, and `live_doc_short_id` can be passed to `felo-livedoc` to query related resources.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Complete Examples
|
|
176
|
+
|
|
177
|
+
### Example 1: Simple question
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
181
|
+
--query "What is quantum computing?" \
|
|
182
|
+
--accept-language en \
|
|
183
|
+
--timeout 90
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Output:**
|
|
187
|
+
```
|
|
188
|
+
SuperAgent: creating conversation...
|
|
189
|
+
Quantum computing is a revolutionary approach to computation that leverages...
|
|
190
|
+
[complete streaming answer]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Example 2: Continue conversation on existing LiveDoc
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# First conversation
|
|
197
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
198
|
+
--query "Explain artificial intelligence" \
|
|
199
|
+
--json
|
|
200
|
+
|
|
201
|
+
# Returns: {"data": {"live_doc_short_id": "PvyKouzJirXjFdst4uKRK3", ...}}
|
|
202
|
+
|
|
203
|
+
# Continue on same LiveDoc
|
|
204
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
205
|
+
--query "What are the main applications?" \
|
|
206
|
+
--live-doc-id "PvyKouzJirXjFdst4uKRK3"
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Example 3: Follow-up question in thread
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# First question
|
|
213
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
214
|
+
--query "What is machine learning?" \
|
|
215
|
+
--json
|
|
216
|
+
|
|
217
|
+
# Returns: {"data": {"thread_short_id": "TvyKouzJirXjFdst4uKRK3", ...}}
|
|
218
|
+
|
|
219
|
+
# Follow-up question
|
|
220
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
221
|
+
--query "Can you elaborate on neural networks?" \
|
|
222
|
+
--thread-id "TvyKouzJirXjFdst4uKRK3"
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Example 4: With verbose logging
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
229
|
+
--query "Latest developments in AI" \
|
|
230
|
+
--accept-language en \
|
|
231
|
+
--verbose \
|
|
232
|
+
--json
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Stderr output:**
|
|
236
|
+
```
|
|
237
|
+
SuperAgent: creating conversation...
|
|
238
|
+
Stream key: abc123...
|
|
239
|
+
Thread ID: TvyKouzJirXjFdst4uKRK3
|
|
240
|
+
LiveDoc ID: PvyKouzJirXjFdst4uKRK3
|
|
241
|
+
[stream] event=message
|
|
242
|
+
[stream] data={"content":"Recent AI developments..."}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Tool Support
|
|
248
|
+
|
|
249
|
+
SuperAgent may invoke tools during conversation. The script automatically extracts and displays:
|
|
250
|
+
|
|
251
|
+
### Image Generation
|
|
252
|
+
- Tool: `generate_images`
|
|
253
|
+
- Output: Image URLs and titles
|
|
254
|
+
- Example: `[AI Generated Image](https://felo.ai/zh-Hans/livedoc/...)`
|
|
255
|
+
|
|
256
|
+
### Research & Discovery
|
|
257
|
+
- Tool: `generate_discovery`
|
|
258
|
+
- Output: Research report titles
|
|
259
|
+
- Example: `[AI Research Report](https://felo.ai/zh-Hans/livedoc/...)`
|
|
260
|
+
|
|
261
|
+
### Document Generation
|
|
262
|
+
- Tool: `generate_document`
|
|
263
|
+
- Output: Document titles
|
|
264
|
+
- Example: `[Generated Document](https://felo.ai/zh-Hans/livedoc/...)`
|
|
265
|
+
|
|
266
|
+
### Presentation Generation
|
|
267
|
+
- Tool: `generate_ppt`
|
|
268
|
+
- Output: PPT titles
|
|
269
|
+
- Example: `[AI Presentation](https://felo.ai/zh-Hans/livedoc/...)`
|
|
270
|
+
|
|
271
|
+
### HTML Generation
|
|
272
|
+
- Tool: `generate_html`
|
|
273
|
+
- Output: HTML page titles
|
|
274
|
+
- Example: `[HTML Page](https://felo.ai/zh-Hans/livedoc/...)`
|
|
275
|
+
|
|
276
|
+
### Twitter/X Search
|
|
277
|
+
- Tool: `search_x`
|
|
278
|
+
- Output: Tweet content, author info, metrics (likes, retweets, views)
|
|
279
|
+
- Example:
|
|
280
|
+
```
|
|
281
|
+
[Twitter Search Results] (5 tweets)
|
|
282
|
+
Elon Musk (@elonmusk) [1.2K likes | 234 retweets | 45K views]
|
|
283
|
+
AI is the future of humanity...
|
|
284
|
+
https://twitter.com/...
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Error Handling
|
|
290
|
+
|
|
291
|
+
Common error codes (see [SuperAgent API documentation](https://openapi.felo.ai/docs/api-reference/v2/superagent.html)):
|
|
292
|
+
|
|
293
|
+
- `INVALID_API_KEY` (401): Key is invalid or revoked
|
|
294
|
+
- `SUPER_AGENT_CONVERSATION_CREATE_FAILED` (502): Failed to create conversation
|
|
295
|
+
- Other 502 errors: Downstream service issues, retry or contact support
|
|
296
|
+
|
|
297
|
+
If `FELO_API_KEY` is not configured, the script will error and show configuration instructions.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## API Workflow
|
|
302
|
+
|
|
303
|
+
The script handles this workflow automatically:
|
|
304
|
+
|
|
305
|
+
1. **Create conversation:**
|
|
306
|
+
- New: `POST /v2/conversations`
|
|
307
|
+
- Follow-up: `POST /v2/conversations/{threadId}/follow_up`
|
|
308
|
+
- Returns: `stream_key`, `thread_short_id`, `live_doc_short_id`
|
|
309
|
+
|
|
310
|
+
2. **Consume SSE stream:**
|
|
311
|
+
- `GET /v2/conversations/stream/{stream_key}`
|
|
312
|
+
- Supports offset parameter for resuming: `?offset={lastOffset}`
|
|
313
|
+
- Reconnects automatically if connection drops (2-second delay)
|
|
314
|
+
|
|
315
|
+
3. **Parse events:**
|
|
316
|
+
- `message` — Direct text content
|
|
317
|
+
- `stream` — Wrapped content with type information
|
|
318
|
+
- `heartbeat` — Keep-alive signal
|
|
319
|
+
- `done` / `completed` / `complete` — Stream finished
|
|
320
|
+
- `error` — Error event (non-terminal, continues reading)
|
|
321
|
+
|
|
322
|
+
4. **Extract tool results:**
|
|
323
|
+
- Automatically detects and formats tool outputs
|
|
324
|
+
- Deduplicates results to avoid showing the same resource multiple times
|
|
325
|
+
|
|
326
|
+
Base URL: `https://openapi.felo.ai` (override with `FELO_API_BASE` if needed).
|
|
163
327
|
|
|
164
328
|
---
|
|
165
329
|
|
|
166
|
-
##
|
|
330
|
+
## Conversation Continuity
|
|
167
331
|
|
|
168
|
-
|
|
332
|
+
**Three modes of conversation:**
|
|
169
333
|
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
334
|
+
1. **New conversation:** No IDs provided — creates fresh thread and LiveDoc
|
|
335
|
+
2. **LiveDoc continuation:** Provide `--live-doc-id` — new thread, same knowledge base
|
|
336
|
+
3. **Thread follow-up:** Provide `--thread-id` — continue exact conversation
|
|
173
337
|
|
|
174
|
-
|
|
338
|
+
**When to use each mode:**
|
|
339
|
+
- Use **new conversation** for unrelated questions
|
|
340
|
+
- Use **LiveDoc continuation** to build knowledge on a topic across multiple threads
|
|
341
|
+
- Use **thread follow-up** for clarifying questions or continuing the exact same discussion
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Troubleshooting
|
|
346
|
+
|
|
347
|
+
### API Key Not Set
|
|
348
|
+
|
|
349
|
+
**Error:**
|
|
350
|
+
```
|
|
351
|
+
ERROR: FELO_API_KEY not set
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
**Solution:**
|
|
355
|
+
1. Get your API key from https://felo.ai (Settings → API Keys)
|
|
356
|
+
2. Set the environment variable:
|
|
357
|
+
```bash
|
|
358
|
+
export FELO_API_KEY="your-api-key-here"
|
|
359
|
+
```
|
|
360
|
+
3. Restart your terminal or reload the environment
|
|
361
|
+
|
|
362
|
+
### Invalid API Key
|
|
363
|
+
|
|
364
|
+
**Error:**
|
|
365
|
+
```
|
|
366
|
+
HTTP 401: INVALID_API_KEY
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**Solution:**
|
|
370
|
+
- Check if your API key is correct
|
|
371
|
+
- Verify the key hasn't been revoked at https://felo.ai
|
|
372
|
+
- Generate a new key if needed
|
|
373
|
+
|
|
374
|
+
### Stream Timeout
|
|
375
|
+
|
|
376
|
+
**Error:**
|
|
377
|
+
```
|
|
378
|
+
Stream idle timeout (no data for 7200s)
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**Solution:**
|
|
382
|
+
- The stream was idle for 2 hours with no data
|
|
383
|
+
- This is normal for very long-running conversations
|
|
384
|
+
- Retry the query or increase timeout with `--timeout 120`
|
|
385
|
+
|
|
386
|
+
### Connection Issues
|
|
387
|
+
|
|
388
|
+
**Behavior:** Script shows "SuperAgent: creating conversation..." but hangs
|
|
389
|
+
|
|
390
|
+
**Solution:**
|
|
391
|
+
- Check your internet connection
|
|
392
|
+
- Verify `https://openapi.felo.ai` is accessible
|
|
393
|
+
- Try with `--verbose` to see detailed connection logs
|
|
394
|
+
- Check if a firewall is blocking SSE connections
|
|
395
|
+
|
|
396
|
+
### Tool Results Not Showing
|
|
397
|
+
|
|
398
|
+
**Behavior:** Answer appears but tool results (images, documents) are missing
|
|
399
|
+
|
|
400
|
+
**Solution:**
|
|
401
|
+
- Tool results appear inline during streaming
|
|
402
|
+
- Use `--json` to see all tool results in structured format
|
|
403
|
+
- Check if LiveDoc URL is accessible
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Advanced Usage
|
|
408
|
+
|
|
409
|
+
### Custom API Base URL
|
|
410
|
+
|
|
411
|
+
Override the API base URL:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
export FELO_API_BASE="https://custom-api.example.com"
|
|
415
|
+
node felo-superAgent/scripts/run_superagent.mjs --query "test"
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### Custom Web Base URL
|
|
419
|
+
|
|
420
|
+
Override the web base URL for LiveDoc links:
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
export FELO_WEB_BASE="https://custom-web.example.com"
|
|
424
|
+
node felo-superAgent/scripts/run_superagent.mjs --query "test"
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### Extended Parameters
|
|
428
|
+
|
|
429
|
+
Pass custom parameters to the API:
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
433
|
+
--query "Generate a report" \
|
|
434
|
+
--ext '{"style_id":"professional","format":"detailed"}'
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Resource Selection
|
|
438
|
+
|
|
439
|
+
Select specific resources for the conversation:
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
node felo-superAgent/scripts/run_superagent.mjs \
|
|
443
|
+
--query "Summarize these documents" \
|
|
444
|
+
--live-doc-id "PvyKouzJirXjFdst4uKRK3" \
|
|
445
|
+
--selected-resource-ids "res1,res2,res3"
|
|
446
|
+
```
|
|
175
447
|
|
|
176
448
|
---
|
|
177
449
|
|
|
178
|
-
##
|
|
450
|
+
## References
|
|
179
451
|
|
|
180
|
-
- [SuperAgent API
|
|
452
|
+
- [SuperAgent API Documentation](https://openapi.felo.ai/docs/api-reference/v2/superagent.html)
|
|
181
453
|
- [Felo Open Platform](https://openapi.felo.ai/docs/)
|
|
454
|
+
- [Get API Key](https://felo.ai) (Settings → API Keys)
|
|
455
|
+
- [GitHub Repository](https://github.com/Felo-Inc/felo-skills)
|