@inkeep/agents-cli 0.0.0-dev-20251012022558 → 0.0.0-dev-20251012052609
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 +33 -40
- package/dist/index.js +334 -373
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Inkeep CLI
|
|
2
2
|
|
|
3
|
-
A command-line interface for managing and interacting with Inkeep Agent
|
|
3
|
+
A command-line interface for managing and interacting with Inkeep Agent Frameworks.
|
|
4
4
|
|
|
5
5
|
## Installation & Setup
|
|
6
6
|
|
|
@@ -257,14 +257,14 @@ inkeep list-graphs --project my-project-id --agents-manage-api-url http://api.ex
|
|
|
257
257
|
inkeep list-graphs --project my-project-id --tenant-id my-tenant-id
|
|
258
258
|
|
|
259
259
|
# Using config file
|
|
260
|
-
inkeep list-
|
|
260
|
+
inkeep list-agents --project my-project-id --config ./my-config.ts
|
|
261
261
|
```
|
|
262
262
|
|
|
263
263
|
Output:
|
|
264
264
|
|
|
265
265
|
```
|
|
266
266
|
┌─────────────────────────┬────────────────────┬───────────────┬───────────┐
|
|
267
|
-
│
|
|
267
|
+
│ Agent ID │ Name │ Default Agent │ Created │
|
|
268
268
|
├─────────────────────────┼────────────────────┼───────────────┼───────────┤
|
|
269
269
|
│ customer-support-graph │ Customer Support │ router │ 1/15/2025 │
|
|
270
270
|
│ qa-assistant │ QA Assistant │ qa-agent │ 1/14/2025 │
|
|
@@ -295,40 +295,36 @@ inkeep push --project my-project-id --tenant-id my-tenant-id
|
|
|
295
295
|
**Features:**
|
|
296
296
|
|
|
297
297
|
- Automatically injects tenant ID and API URL from `inkeep.config.ts`
|
|
298
|
-
- Validates exactly one
|
|
298
|
+
- Validates exactly one Agent is exported
|
|
299
299
|
- Warns about dangling resources (unreferenced agents/tools)
|
|
300
300
|
- Shows graph summary after successful push
|
|
301
301
|
- Handles graph initialization automatically
|
|
302
302
|
|
|
303
|
-
**
|
|
303
|
+
**Agent files:** Define your agents in your project (e.g., `agents/*.ts`). The CLI pushes the project containing those agents.
|
|
304
304
|
|
|
305
305
|
**Example graph configuration:**
|
|
306
306
|
|
|
307
307
|
```javascript
|
|
308
|
-
// customer-support.
|
|
309
|
-
import { agent,
|
|
308
|
+
// customer-support.agent.ts
|
|
309
|
+
import { agent, subAgent, tool } from "@inkeep/agents-sdk";
|
|
310
310
|
|
|
311
|
-
const
|
|
311
|
+
const assistantSubAgent = subAgent({
|
|
312
312
|
id: "assistant",
|
|
313
313
|
name: "Assistant",
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
search: searchTool,
|
|
317
|
-
},
|
|
314
|
+
prompt: "Help users with their questions",
|
|
315
|
+
canUse: () => [searchTool],
|
|
318
316
|
// No tenantId needed - injected by CLI
|
|
319
317
|
});
|
|
320
318
|
|
|
321
|
-
// Must export exactly one
|
|
322
|
-
export const
|
|
319
|
+
// Must export exactly one agent
|
|
320
|
+
export const myAgent = agent({
|
|
323
321
|
id: "my-assistant",
|
|
324
|
-
name: "My Assistant
|
|
325
|
-
defaultSubAgent:
|
|
326
|
-
|
|
327
|
-
assistant: assistantAgent,
|
|
328
|
-
},
|
|
322
|
+
name: "My Assistant",
|
|
323
|
+
defaultSubAgent: assistantSubAgent,
|
|
324
|
+
subAgents: () => [assistantSubAgent],
|
|
329
325
|
// No tenantId or apiUrl needed - CLI injects from config
|
|
330
326
|
});
|
|
331
|
-
// No
|
|
327
|
+
// No agent.init() call - CLI handles initialization
|
|
332
328
|
```
|
|
333
329
|
|
|
334
330
|
### `inkeep chat [graph-id]`
|
|
@@ -370,17 +366,17 @@ inkeep chat --config ./my-config.ts
|
|
|
370
366
|
Start MCP (Model Context Protocol) servers defined in a graph file.
|
|
371
367
|
|
|
372
368
|
```bash
|
|
373
|
-
# Start MCP servers from a TypeScript
|
|
374
|
-
inkeep mcp start examples/agent-configurations/
|
|
369
|
+
# Start MCP servers from a TypeScript agent file
|
|
370
|
+
inkeep mcp start examples/agent-configurations/weather-agent.ts
|
|
375
371
|
|
|
376
372
|
# Start from compiled JavaScript
|
|
377
|
-
inkeep mcp start dist/examples/agent-configurations/
|
|
373
|
+
inkeep mcp start dist/examples/agent-configurations/weather-agent.js
|
|
378
374
|
|
|
379
375
|
# Run in detached mode
|
|
380
|
-
inkeep mcp start
|
|
376
|
+
inkeep mcp start my-agent.ts --detached
|
|
381
377
|
|
|
382
378
|
# Show verbose output
|
|
383
|
-
inkeep mcp start
|
|
379
|
+
inkeep mcp start my-agent.ts --verbose
|
|
384
380
|
```
|
|
385
381
|
|
|
386
382
|
**Features:**
|
|
@@ -461,14 +457,14 @@ inkeep init
|
|
|
461
457
|
> **⚠️ WARNING: MCP commands shown below are not yet implemented.**
|
|
462
458
|
> This section shows planned functionality that is not available in the current version.
|
|
463
459
|
|
|
464
|
-
1. **Create
|
|
460
|
+
1. **Create an agent with MCP tools** (`my-agent.ts`)
|
|
465
461
|
|
|
466
462
|
```typescript
|
|
467
463
|
import {
|
|
468
464
|
agent,
|
|
469
|
-
|
|
465
|
+
subAgent,
|
|
470
466
|
mcpServer,
|
|
471
|
-
} from "@inkeep/agents-
|
|
467
|
+
} from "@inkeep/agents-sdk";
|
|
472
468
|
|
|
473
469
|
// Define MCP servers (tools)
|
|
474
470
|
const randomNumberServer = mcpServer({
|
|
@@ -483,23 +479,20 @@ const weatherServer = mcpServer({
|
|
|
483
479
|
serverUrl: "https://api.weather.example.com/mcp",
|
|
484
480
|
});
|
|
485
481
|
|
|
486
|
-
// Define agents
|
|
487
|
-
const
|
|
482
|
+
// Define sub-agents
|
|
483
|
+
const assistantSubAgent = subAgent({
|
|
488
484
|
id: "assistant",
|
|
489
485
|
name: "Assistant",
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
random: randomNumberServer,
|
|
493
|
-
weather: weatherServer,
|
|
494
|
-
},
|
|
486
|
+
prompt: "Help users with various tasks",
|
|
487
|
+
canUse: () => [randomNumberServer, weatherServer],
|
|
495
488
|
});
|
|
496
489
|
|
|
497
|
-
// Export the
|
|
498
|
-
export const
|
|
490
|
+
// Export the agent
|
|
491
|
+
export const myAgent = agent({
|
|
499
492
|
id: "my-assistant",
|
|
500
493
|
name: "My Assistant",
|
|
501
|
-
defaultSubAgent:
|
|
502
|
-
|
|
494
|
+
defaultSubAgent: assistantSubAgent,
|
|
495
|
+
subAgents: () => [assistantSubAgent],
|
|
503
496
|
});
|
|
504
497
|
|
|
505
498
|
// Export servers for MCP management
|
|
@@ -510,7 +503,7 @@ export const servers = [randomNumberServer, weatherServer];
|
|
|
510
503
|
|
|
511
504
|
```bash
|
|
512
505
|
# Start MCP servers (works with TypeScript directly!)
|
|
513
|
-
inkeep mcp start my-
|
|
506
|
+
inkeep mcp start my-agent.ts
|
|
514
507
|
|
|
515
508
|
# In another terminal, start chatting
|
|
516
509
|
inkeep chat my-assistant
|