@iqai/adk-cli 0.1.1
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/CHANGELOG.md +9 -0
- package/LICENSE.md +9 -0
- package/README.md +289 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1040 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1024 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -0
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 IQAI.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://files.catbox.moe/vumztw.png" alt="ADK TypeScript Logo" width="100" />
|
|
4
|
+
|
|
5
|
+
<br/>
|
|
6
|
+
|
|
7
|
+
# @iqai/adk-cli
|
|
8
|
+
|
|
9
|
+
**Command-line interface for the ADK (Agent Development Kit) - a comprehensive toolkit for creating, running, and testing AI agents.**
|
|
10
|
+
|
|
11
|
+
*Interactive Development โข Agent Management โข Production Ready*
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.npmjs.com/package/@iqai/adk-cli">
|
|
15
|
+
<img src="https://img.shields.io/npm/v/@iqai/adk-cli" alt="NPM Version" />
|
|
16
|
+
</a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/@iqai/adk-cli">
|
|
18
|
+
<img src="https://img.shields.io/npm/dm/@iqai/adk-cli" alt="NPM Downloads" />
|
|
19
|
+
</a>
|
|
20
|
+
<a href="https://github.com/IQAIcom/adk-ts/blob/main/LICENSE.md">
|
|
21
|
+
<img src="https://img.shields.io/npm/l/@iqai/adk-cli" alt="License" />
|
|
22
|
+
</a>
|
|
23
|
+
<a href="https://github.com/IQAIcom/adk-ts">
|
|
24
|
+
<img src="https://img.shields.io/github/stars/IQAIcom/adk-ts?style=social" alt="GitHub Stars" />
|
|
25
|
+
</a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
## ๐ Overview
|
|
33
|
+
|
|
34
|
+
The ADK CLI provides a complete toolkit for developing, testing, and deploying AI agents. It streamlines the development workflow from project creation to production deployment with powerful features like interactive testing interfaces and intelligent agent discovery.
|
|
35
|
+
|
|
36
|
+
## ๐ Key Features
|
|
37
|
+
|
|
38
|
+
- **๐๏ธ Project Scaffolding** - Create projects from professional templates with one command
|
|
39
|
+
- **๐ Web Interface** - React-based UI for visual agent testing and management
|
|
40
|
+
- **๐ค Interactive Chat** - Terminal-based chat interface for quick agent testing
|
|
41
|
+
- **๐ก API Server** - RESTful API for agent management and messaging
|
|
42
|
+
- **๐ Smart Discovery** - Automatically finds and loads agents from your project
|
|
43
|
+
- **๐ฆ Multi-Template Support** - Templates for Discord bots, web servers, MCP servers, and more
|
|
44
|
+
|
|
45
|
+
## ๐ Quick Start
|
|
46
|
+
|
|
47
|
+
### Installation
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g @iqai/adk-cli
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Create Your First Agent
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Interactive project creation
|
|
57
|
+
adk new
|
|
58
|
+
|
|
59
|
+
# Or create with specific template
|
|
60
|
+
adk new my-agent --template simple-agent
|
|
61
|
+
cd my-agent
|
|
62
|
+
|
|
63
|
+
# Start developing
|
|
64
|
+
adk run
|
|
65
|
+
|
|
66
|
+
# Test with web interface
|
|
67
|
+
adk web
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## ๐ Commands
|
|
71
|
+
|
|
72
|
+
### `adk new`
|
|
73
|
+
|
|
74
|
+
Create a new ADK project from professionally maintained templates.
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Interactive project creation with guided setup
|
|
78
|
+
adk new
|
|
79
|
+
|
|
80
|
+
# Create with specific name and template
|
|
81
|
+
adk new my-agent --template simple-agent
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Available Templates:**
|
|
85
|
+
- `simple-agent` - Basic agent with chat capabilities and examples
|
|
86
|
+
- `discord-bot` - Agent integrated with Discord bot framework
|
|
87
|
+
- `telegram-bot` - Agent integrated with Telegram bot API
|
|
88
|
+
- `hono-server` - Web server with RESTful agent endpoints
|
|
89
|
+
- `mcp-starter` - Model Context Protocol server integration
|
|
90
|
+
|
|
91
|
+
### `adk run`
|
|
92
|
+
|
|
93
|
+
Run agents with intelligent discovery and interactive chat interface.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Auto-discover and run agent from current directory
|
|
97
|
+
adk run
|
|
98
|
+
|
|
99
|
+
# Run specific agent with path
|
|
100
|
+
adk run path/to/agent.ts
|
|
101
|
+
|
|
102
|
+
# Server-only mode (no chat interface)
|
|
103
|
+
adk run --server
|
|
104
|
+
|
|
105
|
+
# Custom host for server mode
|
|
106
|
+
adk run --server --host 0.0.0.0
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Agent Discovery:**
|
|
110
|
+
- Scans current directory recursively for `agent.ts` or `agent.js` files
|
|
111
|
+
- Skips common directories: `node_modules`, `.git`, `dist`, `build`, `.next`, `.turbo`, `coverage`, `.vscode`, `.idea`
|
|
112
|
+
- Shows interactive selector when multiple agents found
|
|
113
|
+
|
|
114
|
+
### `adk web`
|
|
115
|
+
|
|
116
|
+
Launch a React-based web interface for visual agent testing and management.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Start web interface with default settings
|
|
120
|
+
adk web
|
|
121
|
+
|
|
122
|
+
# Use specific API server port
|
|
123
|
+
adk web --port 8080
|
|
124
|
+
|
|
125
|
+
# Scan custom directory for agents
|
|
126
|
+
adk web --dir ./my-agents
|
|
127
|
+
|
|
128
|
+
# Run local development version
|
|
129
|
+
adk web --local --web-port 3000
|
|
130
|
+
|
|
131
|
+
# Custom web application URL
|
|
132
|
+
adk web --web-url https://custom-web-app.com
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Web Interface Features:**
|
|
136
|
+
- ๐ฏ **Visual Agent Browser** - Browse and select from discovered agents
|
|
137
|
+
- ๐ฌ **Interactive Chat** - Real-time chat interface with message history
|
|
138
|
+
- ๐ **Agent Status Monitoring** - Live status updates and health checks
|
|
139
|
+
- **Responsive Design** - Works seamlessly on desktop and mobile
|
|
140
|
+
|
|
141
|
+
### `adk serve`
|
|
142
|
+
|
|
143
|
+
Start a standalone API server for agent management without the chat interface.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Start API server on default port 8042
|
|
147
|
+
adk serve
|
|
148
|
+
|
|
149
|
+
# Custom host and port configuration
|
|
150
|
+
adk serve --host 0.0.0.0 --port 9000
|
|
151
|
+
|
|
152
|
+
# Scan specific directory for agents
|
|
153
|
+
adk serve --dir ./production-agents
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**API Endpoints:**
|
|
157
|
+
- `GET /api/agents` - List all discovered agents
|
|
158
|
+
- `POST /api/agents/refresh` - Refresh agent discovery scan
|
|
159
|
+
- `POST /api/agents/:id/start` - Start a specific agent
|
|
160
|
+
- `POST /api/agents/:id/stop` - Stop a specific agent
|
|
161
|
+
- `GET /api/agents/running` - Get status of running agents
|
|
162
|
+
- `POST /api/agents/:id/message` - Send message to specific agent
|
|
163
|
+
- `GET /api/agents/:id/messages` - Get conversation history
|
|
164
|
+
- `GET /health` - Server health check
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## ๐ก Usage Examples
|
|
169
|
+
|
|
170
|
+
### Development Workflow
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# 1. Create new project
|
|
174
|
+
adk new my-ai-assistant --template simple-agent
|
|
175
|
+
cd my-ai-assistant
|
|
176
|
+
|
|
177
|
+
# 2. Install dependencies (if not auto-installed)
|
|
178
|
+
npm install
|
|
179
|
+
|
|
180
|
+
# 3. Start development
|
|
181
|
+
adk run
|
|
182
|
+
|
|
183
|
+
# 4. In another terminal, start web interface
|
|
184
|
+
adk web --local
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Multi-Agent Development
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Create multiple agent files
|
|
191
|
+
mkdir -p agents
|
|
192
|
+
echo 'import { LlmAgent } from "@iqai/adk"; export const agent = new LlmAgent({ name: "chatbot" });' > agents/chatbot.ts
|
|
193
|
+
echo 'import { LlmAgent } from "@iqai/adk"; export const agent = new LlmAgent({ name: "assistant" });' > agents/assistant.ts
|
|
194
|
+
|
|
195
|
+
# Web interface will discover all agents automatically
|
|
196
|
+
adk web
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Production Deployment
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# Start API server in production mode
|
|
203
|
+
adk serve --host 0.0.0.0 --port 8042
|
|
204
|
+
|
|
205
|
+
# Health check endpoint available at
|
|
206
|
+
curl http://localhost:8042/health
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Testing and Integration
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Quick agent testing
|
|
213
|
+
adk run my-agent.ts
|
|
214
|
+
|
|
215
|
+
# API testing with curl
|
|
216
|
+
curl -X POST http://localhost:8042/api/agents/my-agent/message \
|
|
217
|
+
-H "Content-Type: application/json" \
|
|
218
|
+
-d '{"message": "Hello, agent!"}'
|
|
219
|
+
|
|
220
|
+
# Get conversation history
|
|
221
|
+
curl http://localhost:8042/api/agents/my-agent/messages
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## โ๏ธ Configuration
|
|
225
|
+
|
|
226
|
+
### Agent File Requirements
|
|
227
|
+
|
|
228
|
+
Each agent file must export an agent instance:
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
// agent.ts
|
|
232
|
+
import { LlmAgent } from '@iqai/adk';
|
|
233
|
+
|
|
234
|
+
export const agent = new LlmAgent({
|
|
235
|
+
name: "my_agent",
|
|
236
|
+
model: "gpt-4-turbo",
|
|
237
|
+
description: "A helpful assistant agent",
|
|
238
|
+
instruction: "You are a helpful AI assistant."
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
## ๐ Documentation
|
|
245
|
+
|
|
246
|
+
For comprehensive guides, API reference, and advanced examples:
|
|
247
|
+
|
|
248
|
+
**[https://adk.iqai.com](https://adk.iqai.com)**
|
|
249
|
+
|
|
250
|
+
The documentation includes:
|
|
251
|
+
- Getting started tutorials
|
|
252
|
+
- CLI command reference
|
|
253
|
+
- Agent development patterns
|
|
254
|
+
- Deployment strategies
|
|
255
|
+
- Troubleshooting guides
|
|
256
|
+
|
|
257
|
+
## ๐งช Examples
|
|
258
|
+
|
|
259
|
+
Explore comprehensive examples in the main repository:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Clone the repository
|
|
263
|
+
git clone https://github.com/IQAIcom/adk-ts
|
|
264
|
+
cd adk-ts/apps/examples
|
|
265
|
+
|
|
266
|
+
# Install dependencies
|
|
267
|
+
pnpm install
|
|
268
|
+
|
|
269
|
+
# Run examples with the CLI
|
|
270
|
+
adk run
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## ๐ง Requirements
|
|
274
|
+
|
|
275
|
+
- **Node.js** v22.0 or higher
|
|
276
|
+
- **npm**, **yarn**, **pnpm**, or **bun** (for project creation)
|
|
277
|
+
- **TypeScript** support (handled automatically)
|
|
278
|
+
|
|
279
|
+
## ๐ค Contributing
|
|
280
|
+
|
|
281
|
+
Contributions are welcome! See our [Contributing Guide](https://github.com/IQAIcom/adk-ts/blob/main/CONTRIBUTION.md) for details.
|
|
282
|
+
|
|
283
|
+
## ๐ License
|
|
284
|
+
|
|
285
|
+
MIT License - see [LICENSE](https://github.com/IQAIcom/adk-ts/blob/main/LICENSE.md) for details.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
**Ready to build your first AI agent?** Visit [https://adk.iqai.com](https://adk.iqai.com) to get started!
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED