osai-agent 4.0.0 → 4.0.3
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/README.md +305 -0
- package/package.json +1 -1
- package/src/services/server-url.js +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# OS AI Agent v4.0.0
|
|
2
|
+
|
|
3
|
+
> Intelligent system administration, software engineering, and network management — all in one terminal agent.
|
|
4
|
+
|
|
5
|
+
**Copyright © 2026 OLOJEDE Samuel. All rights reserved. PRIVATE SOFTWARE.**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
OS AI Agent is a terminal-based AI assistant that operates across four specialized modes. It connects to 30+ LLM providers, manages SSH devices, executes local and remote commands, and provides a rich interactive terminal experience.
|
|
12
|
+
|
|
13
|
+
### Modes
|
|
14
|
+
|
|
15
|
+
| Mode | Purpose |
|
|
16
|
+
|------|---------|
|
|
17
|
+
| **GENERAL** | System administration, file operations, command execution, web tools |
|
|
18
|
+
| **CODING** | Software engineering with full Git integration and code editing |
|
|
19
|
+
| **NETWORK** | Remote network device management via SSH (Cisco, MikroTik, pfSense, Juniper) |
|
|
20
|
+
| **SSH** | Live remote execution on a single Linux or Windows machine |
|
|
21
|
+
|
|
22
|
+
Execution sub-modes: **PLAN** (read-only, no modifications) and **EXEC** (full execution).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Global installation
|
|
30
|
+
npm install -g osai-agent
|
|
31
|
+
|
|
32
|
+
# Register and log in (server-managed mode)
|
|
33
|
+
osai-agent register
|
|
34
|
+
osai-agent login
|
|
35
|
+
osai-agent run
|
|
36
|
+
|
|
37
|
+
# Run locally with your own LLM API key
|
|
38
|
+
osai-agent run --local
|
|
39
|
+
|
|
40
|
+
# Software engineering mode
|
|
41
|
+
osai-agent run --coding
|
|
42
|
+
|
|
43
|
+
# Connect to a remote device
|
|
44
|
+
osai-agent connect
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### From source
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone <repository-url>
|
|
51
|
+
cd osai-agent
|
|
52
|
+
npm install
|
|
53
|
+
node src/index.js run --local
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## CLI Reference
|
|
59
|
+
|
|
60
|
+
### Run & Connect
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
osai-agent run Start in GENERAL mode (server)
|
|
64
|
+
osai-agent run --local Start locally (BYOK)
|
|
65
|
+
osai-agent run --coding Start in CODING mode
|
|
66
|
+
osai-agent run --local --coding CODING mode locally
|
|
67
|
+
osai-agent run <session-id> Resume a past session
|
|
68
|
+
osai-agent connect Connect to an SSH-managed device
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Authentication
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
osai-agent register Create an account
|
|
75
|
+
osai-agent login Authenticate with the server
|
|
76
|
+
osai-agent logout Clear authentication
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Device Management
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
osai-agent devices list List managed devices
|
|
83
|
+
osai-agent devices list --local List local devices
|
|
84
|
+
osai-agent devices add Add a device (interactive wizard)
|
|
85
|
+
osai-agent devices add --local Add a device locally
|
|
86
|
+
osai-agent devices remove <id> Remove a device
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### LLM Provider Management
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
osai-agent provider list List all available providers
|
|
93
|
+
osai-agent provider set <type> Configure a provider (--key, --model, --url)
|
|
94
|
+
osai-agent provider models <type> List models for a provider
|
|
95
|
+
osai-agent provider show Show current provider configuration
|
|
96
|
+
osai-agent provider reset Reset to default provider
|
|
97
|
+
osai-agent provider add custom Add a custom OpenAI-compatible provider
|
|
98
|
+
osai-agent provider configured List configured providers
|
|
99
|
+
osai-agent provider switch <type> Switch to a configured provider
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Sessions
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
osai-agent session list List saved sessions
|
|
106
|
+
osai-agent session load <id> Resume a session
|
|
107
|
+
osai-agent session export <id> Export session (markdown / JSON)
|
|
108
|
+
osai-agent session delete <id> Delete a session
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### MCP
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
osai-agent mcp list List configured MCP servers
|
|
115
|
+
osai-agent mcp add <name> Register an MCP server
|
|
116
|
+
osai-agent mcp remove <name> Remove an MCP server
|
|
117
|
+
osai-agent mcp reload Reload MCP configurations
|
|
118
|
+
osai-agent mcp test <name> Test connection to an MCP server
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Search Configuration
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
osai-agent search set serpapi --key <k> Set SerpAPI key
|
|
125
|
+
osai-agent search set tavily --key <k> Set Tavily key
|
|
126
|
+
osai-agent search list List configured search providers
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
DuckDuckGo is always available with no API key required.
|
|
130
|
+
|
|
131
|
+
### Other Commands
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
osai-agent config Show current configuration
|
|
135
|
+
osai-agent config set-os <os> Override OS detection
|
|
136
|
+
osai-agent skills Manage installed skills
|
|
137
|
+
osai-agent stop-subagent Stop a running sub-agent
|
|
138
|
+
osai-agent --version Show version
|
|
139
|
+
osai-agent --help Show help
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## LLM Providers
|
|
145
|
+
|
|
146
|
+
OS AI Agent supports 30+ LLM providers with a Bring Your Own Key (BYOK) model.
|
|
147
|
+
|
|
148
|
+
**OpenAI-compatible:** OpenAI, Anthropic (via fetch), Groq, Mistral, DeepSeek, xAI (Grok), Cohere, Perplexity, Together, Fireworks, Cerebras, OpenRouter, Ollama, LM Studio, vLLM, Cloudflare, Hugging Face, NVIDIA, GitHub Models, SiliconFlow, Hyperbolic, Novita, DeepInfra, Replicate, Codestral, Qwen, Azure, Bedrock, Vertex AI, Moonshot, Zhipu, Yi, Baidu, and any custom OpenAI-compatible endpoint.
|
|
149
|
+
|
|
150
|
+
**Native SDK:** Anthropic (direct streaming), Google Gemini.
|
|
151
|
+
|
|
152
|
+
**Keyless (local models):** Ollama, LM Studio, vLLM — no API key required.
|
|
153
|
+
|
|
154
|
+
**Usage:** Configure with `osai-agent provider set <type> --key <key>`.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Device Management
|
|
159
|
+
|
|
160
|
+
Connect to and manage remote devices via SSH with encrypted credential storage.
|
|
161
|
+
|
|
162
|
+
**Supported device types:** Cisco IOS, IOS-XE, NX-OS, ASA, MikroTik RouterOS, pfSense, Juniper JunOS, Linux, Windows Server.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
osai-agent devices add
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The agent auto-detects the appropriate mode (SSH or NETWORK) based on device type.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## MCP Protocol Support
|
|
173
|
+
|
|
174
|
+
OS AI Agent can both consume external MCP servers and expose its own tools as an MCP server.
|
|
175
|
+
|
|
176
|
+
### Client (consuming MCP servers)
|
|
177
|
+
|
|
178
|
+
Register an MCP server and call its tools during an agent session:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
osai-agent mcp add my-server --command "node" --args "./server.js"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Server (exposing tools)
|
|
185
|
+
|
|
186
|
+
Run the OS AI Agent MCP server for any MCP-compatible client:
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"mcpServers": {
|
|
191
|
+
"osai-agent": {
|
|
192
|
+
"command": "node",
|
|
193
|
+
"args": ["path/to/osai-agent-server/src/mcp/index.js"]
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Web Search
|
|
202
|
+
|
|
203
|
+
| Provider | API Key Required |
|
|
204
|
+
|----------|-----------------|
|
|
205
|
+
| DuckDuckGo | No |
|
|
206
|
+
| SerpAPI | Yes (`osai-agent search set serpapi --key <key>`) |
|
|
207
|
+
| Tavily | Yes (`osai-agent search set tavily --key <key>`) |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Keyboard Shortcuts
|
|
212
|
+
|
|
213
|
+
| Key | Action |
|
|
214
|
+
|-----|--------|
|
|
215
|
+
| `Enter` | Submit input |
|
|
216
|
+
| `Escape` | Cancel current task / close modal |
|
|
217
|
+
| `Tab` | Open slash command menu |
|
|
218
|
+
| `Ctrl+C` | Auto-save session and exit |
|
|
219
|
+
| `PageUp` | Pause auto-scroll |
|
|
220
|
+
| `PageDown` / `End` | Resume auto-scroll |
|
|
221
|
+
| `Up` / `Down` | Navigate frozen transcript |
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Slash Commands
|
|
226
|
+
|
|
227
|
+
Available within a running session via the `Tab` key or by typing `/`:
|
|
228
|
+
|
|
229
|
+
| Command | Action |
|
|
230
|
+
|---------|--------|
|
|
231
|
+
| `/clear` | Clear the transcript |
|
|
232
|
+
| `/help` or `/?` | Show help |
|
|
233
|
+
| `/new` | Start a fresh session |
|
|
234
|
+
| `/save` | Manually save the session |
|
|
235
|
+
| `/history` | Browse session history |
|
|
236
|
+
| `/status` | Show session statistics |
|
|
237
|
+
| `/context` | Show context window usage |
|
|
238
|
+
| `/mode` | Open mode selection picker |
|
|
239
|
+
| `/provider` | Open LLM provider picker |
|
|
240
|
+
| `/devices` | List configured devices |
|
|
241
|
+
| `/todos` | Show task list |
|
|
242
|
+
| `/plan` | Switch to PLAN mode (read-only) |
|
|
243
|
+
| `/exec` | Switch to EXEC mode |
|
|
244
|
+
| `/logout` | Log out of the server |
|
|
245
|
+
| `/exit` | Exit without saving |
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Configuration
|
|
250
|
+
|
|
251
|
+
### Environment variables (CLI)
|
|
252
|
+
|
|
253
|
+
| Variable | Default | Description |
|
|
254
|
+
|----------|---------|-------------|
|
|
255
|
+
| `OSAI_MAX_ITERATIONS` | 100 | Max agent loop iterations |
|
|
256
|
+
| `OSAI_AUTO_CONTINUE` | 10 | Max auto-continues on incomplete signal |
|
|
257
|
+
| `OSAI_COMMAND_TIMEOUT` | 30000 | Command execution timeout (ms) |
|
|
258
|
+
| `OSAI_UI_ANIMATIONS` | 1 | Set to 0 to disable UI animations |
|
|
259
|
+
| `AES_SECRET` | — | Override encryption key (local mode) |
|
|
260
|
+
|
|
261
|
+
### Server setup
|
|
262
|
+
|
|
263
|
+
The backend server provides authentication, device storage, and LLM proxying:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
cd osai-agent-server
|
|
267
|
+
cp .env.example .env
|
|
268
|
+
# Edit .env with your MongoDB, Redis, and JWT configuration
|
|
269
|
+
npm start
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Required server environment:**
|
|
273
|
+
|
|
274
|
+
| Variable | Description |
|
|
275
|
+
|----------|-------------|
|
|
276
|
+
| `MONGODB_URI` | MongoDB connection string |
|
|
277
|
+
| `JWT_SECRET` | JWT signing secret |
|
|
278
|
+
| `AES_SECRET` | Encryption key for stored credentials |
|
|
279
|
+
| `AGENT_WORKER_URL` | LLM worker endpoint |
|
|
280
|
+
| `AGENT_SECRET` | Shared worker secret |
|
|
281
|
+
| `UPSTASH_REDIS_REST_URL` | Redis URL for caching and rate limiting |
|
|
282
|
+
| `UPSTASH_REDIS_REST_TOKEN` | Redis authentication token |
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Deployment
|
|
287
|
+
|
|
288
|
+
The server requires Node.js 18+ and can be deployed on any VM or container platform:
|
|
289
|
+
|
|
290
|
+
- **Free tier:** Oracle Cloud Always Free, MongoDB Atlas M0, Upstash Redis Free
|
|
291
|
+
- **Production:** Any VPS (Hetzner, DigitalOcean) with MongoDB Atlas M2+ and Upstash Pro
|
|
292
|
+
|
|
293
|
+
The CLI agent is installed via npm and connects to the server over HTTP and WebSocket.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## License
|
|
298
|
+
|
|
299
|
+
**PRIVATE SOFTWARE** — Copyright © 2026 OLOJEDE Samuel. All rights reserved.
|
|
300
|
+
|
|
301
|
+
This software and its source code are proprietary and confidential. Unauthorized copying, distribution, modification, or use is strictly prohibited without prior written permission from the copyright holder.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
<div align="center">Built with React Ink, Hono, MongoDB</div>
|
package/package.json
CHANGED