@octen.ai/cli 0.1.0
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/LICENSE +21 -0
- package/README.md +184 -0
- package/dist/api/chat.d.ts +33 -0
- package/dist/api/chat.js +23 -0
- package/dist/api/client.d.ts +19 -0
- package/dist/api/client.js +111 -0
- package/dist/api/constants.d.ts +38 -0
- package/dist/api/constants.js +32 -0
- package/dist/api/embedding.d.ts +18 -0
- package/dist/api/embedding.js +27 -0
- package/dist/api/errors.d.ts +14 -0
- package/dist/api/errors.js +22 -0
- package/dist/api/extract.d.ts +34 -0
- package/dist/api/extract.js +26 -0
- package/dist/api/search.d.ts +33 -0
- package/dist/api/search.js +34 -0
- package/dist/api/sse.d.ts +6 -0
- package/dist/api/sse.js +53 -0
- package/dist/api/vlEmbedding.d.ts +39 -0
- package/dist/api/vlEmbedding.js +68 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +39 -0
- package/dist/commands/chat.d.ts +2 -0
- package/dist/commands/chat.js +122 -0
- package/dist/commands/configureMcp.d.ts +11 -0
- package/dist/commands/configureMcp.js +101 -0
- package/dist/commands/configureSkills.d.ts +11 -0
- package/dist/commands/configureSkills.js +118 -0
- package/dist/commands/embed.d.ts +2 -0
- package/dist/commands/embed.js +69 -0
- package/dist/commands/fetch.d.ts +2 -0
- package/dist/commands/fetch.js +26 -0
- package/dist/commands/reset.d.ts +11 -0
- package/dist/commands/reset.js +112 -0
- package/dist/commands/search.d.ts +2 -0
- package/dist/commands/search.js +31 -0
- package/dist/commands/utils.d.ts +10 -0
- package/dist/commands/utils.js +24 -0
- package/dist/commands/vlEmbed.d.ts +2 -0
- package/dist/commands/vlEmbed.js +98 -0
- package/dist/config/resolve.d.ts +2 -0
- package/dist/config/resolve.js +12 -0
- package/dist/mcp/clients.d.ts +9 -0
- package/dist/mcp/clients.js +58 -0
- package/dist/mcp/detect.d.ts +2 -0
- package/dist/mcp/detect.js +35 -0
- package/dist/mcp/install.d.ts +20 -0
- package/dist/mcp/install.js +56 -0
- package/dist/mcp/write.d.ts +3 -0
- package/dist/mcp/write.js +104 -0
- package/dist/output/pretty/chat.d.ts +2 -0
- package/dist/output/pretty/chat.js +9 -0
- package/dist/output/pretty/embedding.d.ts +11 -0
- package/dist/output/pretty/embedding.js +43 -0
- package/dist/output/pretty/extract.d.ts +2 -0
- package/dist/output/pretty/extract.js +41 -0
- package/dist/output/pretty/search.d.ts +2 -0
- package/dist/output/pretty/search.js +28 -0
- package/dist/output/pretty/vlEmbedding.d.ts +13 -0
- package/dist/output/pretty/vlEmbedding.js +47 -0
- package/dist/output/render.d.ts +6 -0
- package/dist/output/render.js +13 -0
- package/dist/skills/clients.d.ts +7 -0
- package/dist/skills/clients.js +47 -0
- package/dist/skills/install.d.ts +18 -0
- package/dist/skills/install.js +77 -0
- package/dist/skills/source.d.ts +12 -0
- package/dist/skills/source.js +56 -0
- package/dist/util/preflightColor.d.ts +1 -0
- package/dist/util/preflightColor.js +7 -0
- package/package.json +44 -0
- package/skills/manifest.json +8 -0
- package/skills/octen-design/SKILL.md +218 -0
- package/skills/octen-design/scripts/search.py +304 -0
- package/skills/octen-search/SKILL.md +199 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: octen-search
|
|
3
|
+
description: USE FOR web search. Real-time web search for AI agents powered by Octen. Fast, fresh, and relevant — returns ranked results with highlights, full content, domain filtering, and time filtering. Average response under 80ms with minute-level index freshness.
|
|
4
|
+
homepage: https://octen.ai
|
|
5
|
+
keywords: [web search, search, octen, real-time search, web, news, research, LLM search, AI search]
|
|
6
|
+
metadata: {"clawdbot":{"emoji":"🔍","requires":{"bins":["curl"],"env":["OCTEN_API_KEY"]},"primaryEnv":"OCTEN_API_KEY"}, "homepage": "https://octen.ai", "support": "support@octen.ai"}
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Octen Search
|
|
10
|
+
|
|
11
|
+
Octen's search skill. Today it provides real-time **web search**; broad
|
|
12
|
+
(multi-query) search and image/video search are coming and will be added here.
|
|
13
|
+
|
|
14
|
+
> **Requires API Key**: Get one at https://octen.ai
|
|
15
|
+
>
|
|
16
|
+
> Set it: `export OCTEN_API_KEY=your-api-key`
|
|
17
|
+
|
|
18
|
+
## API Key Setup
|
|
19
|
+
|
|
20
|
+
**Before searching, ensure `OCTEN_API_KEY` is set. If it is missing — or any call returns `401` — stop and do not retry blindly: tell the user a key is required, point them to https://octen.ai to get one, help them configure it for their agent (below), then continue once it's set.**
|
|
21
|
+
|
|
22
|
+
Configure the key for the relevant agent/runtime:
|
|
23
|
+
|
|
24
|
+
- **Claude Code** — add `{ "env": { "OCTEN_API_KEY": "your-key" } }` to `~/.claude/settings.json` (a transient shell `export` will not persist)
|
|
25
|
+
- **Cursor / Hermes / generic shell** — `export OCTEN_API_KEY="your-key"` in `~/.zshrc` or `~/.bashrc`
|
|
26
|
+
- **Codex** — `~/.codex/config.toml` → `[shell_environment_policy]`, `set = { OCTEN_API_KEY = "your-key" }`
|
|
27
|
+
- **OpenClaw** — add `OCTEN_API_KEY=your-key` to `~/.openclaw/.env`
|
|
28
|
+
|
|
29
|
+
See the [README](https://github.com/Octen-Team/octen-skills#prerequisites) for full per-agent instructions.
|
|
30
|
+
|
|
31
|
+
## Quick Start (cURL)
|
|
32
|
+
|
|
33
|
+
### Basic Search
|
|
34
|
+
```bash
|
|
35
|
+
curl -s -X POST "https://api.octen.ai/search" \
|
|
36
|
+
-H "Content-Type: application/json" \
|
|
37
|
+
-H "X-Api-Key: ${OCTEN_API_KEY}" \
|
|
38
|
+
-d '{"query": "latest AI research 2026", "count": 5}'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Highlight and Time Filtering
|
|
42
|
+
```bash
|
|
43
|
+
curl -s -X POST "https://api.octen.ai/search" \
|
|
44
|
+
-H "Content-Type: application/json" \
|
|
45
|
+
-H "X-Api-Key: ${OCTEN_API_KEY}" \
|
|
46
|
+
-d '{
|
|
47
|
+
"query": "summary judgment",
|
|
48
|
+
"count": 10,
|
|
49
|
+
"time_basis": "published",
|
|
50
|
+
"start_time": "2025-01-01T00:00:00Z",
|
|
51
|
+
"end_time": "2026-01-01T00:00:00Z",
|
|
52
|
+
"highlight": {"enable": true, "max_tokens": 300}
|
|
53
|
+
}'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### With Domain Filtering
|
|
57
|
+
```bash
|
|
58
|
+
curl -s -X POST "https://api.octen.ai/search" \
|
|
59
|
+
-H "Content-Type: application/json" \
|
|
60
|
+
-H "X-Api-Key: ${OCTEN_API_KEY}" \
|
|
61
|
+
-d '{
|
|
62
|
+
"query": "climate change policy",
|
|
63
|
+
"count": 5,
|
|
64
|
+
"include_domains": ["nature.com", "science.org"],
|
|
65
|
+
"exclude_domains": ["spam.com"]
|
|
66
|
+
}'
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### With Full Content
|
|
70
|
+
```bash
|
|
71
|
+
curl -s -X POST "https://api.octen.ai/search" \
|
|
72
|
+
-H "Content-Type: application/json" \
|
|
73
|
+
-H "X-Api-Key: ${OCTEN_API_KEY}" \
|
|
74
|
+
-d '{
|
|
75
|
+
"query": "latest WHO guidance on influenza vaccination",
|
|
76
|
+
"count": 5,
|
|
77
|
+
"full_content": {"enable": true, "max_tokens": 1000}
|
|
78
|
+
}'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Endpoint
|
|
82
|
+
|
|
83
|
+
```http
|
|
84
|
+
POST https://api.octen.ai/search
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Authentication**: `X-Api-Key: <API_KEY>` header
|
|
88
|
+
|
|
89
|
+
**Content-Type**: `application/json`
|
|
90
|
+
|
|
91
|
+
## Parameters
|
|
92
|
+
|
|
93
|
+
| Parameter | Type | Required | Default | Description |
|
|
94
|
+
|--|--|--|--|--|
|
|
95
|
+
| `query` | string | **Yes** | - | Search query (max 500 chars) |
|
|
96
|
+
| `count` | integer | No | `5` | Number of results (1–100) |
|
|
97
|
+
| `include_domains` | string[] | No | - | Only include results from these domains (max 1000 domains, each max 30 chars) |
|
|
98
|
+
| `exclude_domains` | string[] | No | - | Exclude results from these domains (max 150 domains, each max 30 chars) |
|
|
99
|
+
| `include_text` | string[] | No | - | Strings that must appear in result page text (max 5 items, each max 30 chars) |
|
|
100
|
+
| `exclude_text` | string[] | No | - | Strings that must not appear in result page text (max 5 items, each max 30 chars) |
|
|
101
|
+
| `time_basis` | string | No | `auto` | Time field used for filtering: `auto`, `published`, `crawled` |
|
|
102
|
+
| `start_time` | string | No | - | Start time filter, ISO 8601 (e.g. `2025-01-01T00:00:00Z`) |
|
|
103
|
+
| `end_time` | string | No | - | End time filter, ISO 8601 (must be after `start_time`) |
|
|
104
|
+
| `highlight` | object | No | `{"enable": true}` | Highlight options (see below) |
|
|
105
|
+
| `format` | string | No | `text` | Output format for highlights: `text` or `markdown` |
|
|
106
|
+
| `safesearch` | string | No | `strict` | Adult content filter: `off` or `strict` |
|
|
107
|
+
| `full_content` | object | No | `{"enable": false}` | Full content options (see below) |
|
|
108
|
+
|
|
109
|
+
### Highlight Options
|
|
110
|
+
|
|
111
|
+
| Field | Type | Default | Description |
|
|
112
|
+
|--|--|--|--|
|
|
113
|
+
| `enable` | boolean | `true` | Return query-relevant highlights in each result |
|
|
114
|
+
| `max_tokens` | integer | `512` | Max tokens per highlight (100–20000) |
|
|
115
|
+
|
|
116
|
+
### Full Content Options
|
|
117
|
+
|
|
118
|
+
| Field | Type | Default | Description |
|
|
119
|
+
|--|--|--|--|
|
|
120
|
+
| `enable` | boolean | `false` | Return full raw page content for each result |
|
|
121
|
+
| `max_tokens` | integer | `2048` | Max tokens per result (100–100000) |
|
|
122
|
+
|
|
123
|
+
## Response Format
|
|
124
|
+
|
|
125
|
+
### Response Fields
|
|
126
|
+
|
|
127
|
+
| Field | Type | Description |
|
|
128
|
+
|--|--|--|
|
|
129
|
+
| `code` | integer | Status code. `0` = success |
|
|
130
|
+
| `msg` | string | Human-readable status message |
|
|
131
|
+
| `request_id` | string | Unique request identifier |
|
|
132
|
+
| `data.query` | string | The original query |
|
|
133
|
+
| `data.results[]` | array | List of search results |
|
|
134
|
+
| `data.results[].title` | string | Page title |
|
|
135
|
+
| `data.results[].url` | string | Page URL |
|
|
136
|
+
| `data.results[].highlight` | string? | Query-relevant snippets (when `highlight.enable` is true) |
|
|
137
|
+
| `data.results[].full_content` | string? | Full page content (when `full_content.enable` is true) |
|
|
138
|
+
| `data.results[].authors` | string? | Website name or author |
|
|
139
|
+
| `data.results[].time_published` | string? | Publish time, ISO 8601 |
|
|
140
|
+
| `data.results[].time_last_crawled` | string? | Last crawl time, ISO 8601 |
|
|
141
|
+
| `meta.usage.num_search_queries` | integer | Number of search queries executed |
|
|
142
|
+
| `meta.usage.full_content_tokens` | integer | Total tokens returned in full_content |
|
|
143
|
+
| `meta.latency` | number | Response time in milliseconds |
|
|
144
|
+
| `meta.warning` | string? | Warning message, if any |
|
|
145
|
+
|
|
146
|
+
### JSON Example
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"code": 0,
|
|
151
|
+
"msg": "success",
|
|
152
|
+
"request_id": "req_abc123def456",
|
|
153
|
+
"data": {
|
|
154
|
+
"query": "latest WHO guidance on influenza vaccination",
|
|
155
|
+
"results": [
|
|
156
|
+
{
|
|
157
|
+
"title": "Influenza (Seasonal) - World Health Organization (WHO)",
|
|
158
|
+
"url": "https://www.who.int/news-room/fact-sheets/detail/influenza-(seasonal)",
|
|
159
|
+
"highlight": "WHO recommends annual vaccination for high-risk groups\n\n...\n\nSeasonal influenza vaccination policies vary by region...",
|
|
160
|
+
"authors": "World Health Organization",
|
|
161
|
+
"time_published": "2024-10-15T00:00:00Z",
|
|
162
|
+
"time_last_crawled": "2026-01-20T02:12:34Z"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"meta": {
|
|
167
|
+
"usage": {
|
|
168
|
+
"num_search_queries": 1,
|
|
169
|
+
"full_content_tokens": 0
|
|
170
|
+
},
|
|
171
|
+
"latency": 237,
|
|
172
|
+
"warning": null
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Error Codes
|
|
178
|
+
|
|
179
|
+
| HTTP Status | Description |
|
|
180
|
+
|--|--|
|
|
181
|
+
| `400` | Missing or invalid parameter |
|
|
182
|
+
| `401` | Invalid or missing API key |
|
|
183
|
+
| `403` | Insufficient balance |
|
|
184
|
+
| `429` | Rate limited |
|
|
185
|
+
| `500` | Internal server error |
|
|
186
|
+
|
|
187
|
+
## Security
|
|
188
|
+
|
|
189
|
+
- API key is sent **only** to the hardcoded endpoint `https://api.octen.ai/search` via HTTPS
|
|
190
|
+
- Authentication uses the standard `X-Api-Key` header
|
|
191
|
+
- No environment variables are sent to any other endpoints or external services
|
|
192
|
+
|
|
193
|
+
## Notes
|
|
194
|
+
|
|
195
|
+
- **Highlight** is enabled by default — set `"highlight": {"enable": false}` to disable
|
|
196
|
+
- **Full content** is disabled by default — enable it to get raw page text for RAG/grounding
|
|
197
|
+
- Use `include_domains` / `exclude_domains` to scope results to trusted sources
|
|
198
|
+
- Use `start_time` / `end_time` with `time_basis` to filter by publish or crawl time
|
|
199
|
+
- `format: "markdown"` returns highlights in markdown; `format: "text"` returns plain text
|