@indemn/cli 1.2.1 → 1.2.2
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/.claude-plugin/marketplace.json +2 -4
- package/dist/cli/index.js +47 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/agent-builder/SKILL.md +299 -0
- package/skills/evaluations/SKILL.md +509 -0
- package/src/cli/index.ts +52 -0
- package/skills/agent-setup/SKILL.md +0 -131
- package/skills/eval-analysis/SKILL.md +0 -178
- package/skills/eval-orchestration/SKILL.md +0 -257
- package/skills/rubric-creation/SKILL.md +0 -163
- package/skills/test-set-creation/SKILL.md +0 -250
- /package/skills/{eval-analysis → evaluations}/references/data-shapes.md +0 -0
|
@@ -18,10 +18,8 @@
|
|
|
18
18
|
"homepage": "https://github.com/indemn-ai/indemn-cli",
|
|
19
19
|
"source": "./",
|
|
20
20
|
"skills": [
|
|
21
|
-
"./skills/
|
|
22
|
-
"./skills/
|
|
23
|
-
"./skills/rubric-creation",
|
|
24
|
-
"./skills/agent-setup"
|
|
21
|
+
"./skills/agent-builder",
|
|
22
|
+
"./skills/evaluations"
|
|
25
23
|
]
|
|
26
24
|
}
|
|
27
25
|
]
|
package/dist/cli/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { dirname, join, resolve } from 'node:path';
|
|
5
|
+
import { cpSync, mkdirSync, writeFileSync, existsSync } from 'node:fs';
|
|
3
6
|
import { registerAuthCommands } from './auth.js';
|
|
4
7
|
import { registerAgentCommands } from './agents.js';
|
|
5
8
|
import { registerConfigCommands } from './config.js';
|
|
@@ -60,5 +63,49 @@ program
|
|
|
60
63
|
process.exit(1);
|
|
61
64
|
}
|
|
62
65
|
});
|
|
66
|
+
// Init command — set up Claude Code integration
|
|
67
|
+
program
|
|
68
|
+
.command('init')
|
|
69
|
+
.description('Set up Claude Code skills in the current project')
|
|
70
|
+
.option('--force', 'Overwrite existing files')
|
|
71
|
+
.action(async (options) => {
|
|
72
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
73
|
+
const __dirname = dirname(__filename);
|
|
74
|
+
const packageRoot = resolve(__dirname, '..', '..');
|
|
75
|
+
const skillsSource = join(packageRoot, 'skills');
|
|
76
|
+
const cwd = process.cwd();
|
|
77
|
+
const skillsTarget = join(cwd, '.claude', 'skills', 'indemn');
|
|
78
|
+
const rulesTarget = join(cwd, '.claude', 'rules');
|
|
79
|
+
if (existsSync(skillsTarget) && !options.force) {
|
|
80
|
+
console.log('Indemn skills already installed. Use --force to overwrite.');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// Copy skills
|
|
84
|
+
mkdirSync(skillsTarget, { recursive: true });
|
|
85
|
+
cpSync(skillsSource, skillsTarget, { recursive: true });
|
|
86
|
+
// Write rules file
|
|
87
|
+
mkdirSync(rulesTarget, { recursive: true });
|
|
88
|
+
const rulesPath = join(rulesTarget, 'indemn.md');
|
|
89
|
+
if (!existsSync(rulesPath) || options.force) {
|
|
90
|
+
writeFileSync(rulesPath, [
|
|
91
|
+
'# Indemn CLI',
|
|
92
|
+
'',
|
|
93
|
+
'The `indemn` CLI is available for managing AI agents. Run `indemn whoami` to verify authentication.',
|
|
94
|
+
'',
|
|
95
|
+
'## Skills',
|
|
96
|
+
'',
|
|
97
|
+
'- **agent-builder** — Create, configure, and test agents (prompts, functions, knowledge bases, chat)',
|
|
98
|
+
'- **evaluations** — Create rubrics and test sets, run evaluations, analyze results, export reports',
|
|
99
|
+
'',
|
|
100
|
+
'Use these skills for any agent management or evaluation task. They contain the complete command reference.',
|
|
101
|
+
'',
|
|
102
|
+
].join('\n'));
|
|
103
|
+
}
|
|
104
|
+
console.log('Indemn CLI integration set up:');
|
|
105
|
+
console.log(` Skills: ${skillsTarget}/`);
|
|
106
|
+
console.log(` Rules: ${rulesPath}`);
|
|
107
|
+
console.log('');
|
|
108
|
+
console.log('Claude Code will now discover the indemn skills automatically.');
|
|
109
|
+
});
|
|
63
110
|
program.parse();
|
|
64
111
|
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,mCAAmC,CAAC;KAChD,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,iCAAiC,CAAC,CAAC;AAEzE,kDAAkD;AAClD,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,EAAE;IACxC,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC;IACpC,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,8BAA8B;AAC9B,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,qBAAqB,CAA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AC,gEAAgE,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-builder
|
|
3
|
+
description: Build and configure Indemn AI agents — create agents, set prompts, add functions/tools, manage knowledge bases, and test via chat. Use when creating, configuring, or testing agents.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Builder
|
|
7
|
+
|
|
8
|
+
You build and configure AI agents using the `indemn` CLI. This skill covers the full lifecycle: create an agent, set its prompt, attach functions and knowledge bases, and test via chat.
|
|
9
|
+
|
|
10
|
+
**Prerequisite:** The `indemn` CLI must be installed and authenticated. Run `indemn whoami` to verify.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
Create agent -> Set prompt & model -> Add functions -> Add knowledge bases -> Link KBs -> Test via chat -> Iterate.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1: Create the Agent
|
|
21
|
+
|
|
22
|
+
Before creating, determine: name/purpose, channels (WEB, WHATSAPP, etc.), persona, functions needed, knowledge sources, and model (`indemn models [--json]`).
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
indemn agents create --name "Acme Insurance Assistant" --channels "WEB,WHATSAPP"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- `--channels` defaults to `"WEB"` if omitted. Comma-separated for multiple.
|
|
29
|
+
- Save the returned agent ID -- every subsequent command needs it.
|
|
30
|
+
|
|
31
|
+
### Other Agent Operations
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
indemn agents list [--json] [--limit 20] [--page 2]
|
|
35
|
+
indemn agents get <agent-id> [--json]
|
|
36
|
+
indemn agents update <agent-id> --name "New Name" --description "Updated description"
|
|
37
|
+
indemn agents update <agent-id> --webhook-url "https://example.com/webhook"
|
|
38
|
+
indemn agents clone <agent-id>
|
|
39
|
+
indemn agents delete <agent-id> # requires confirmation
|
|
40
|
+
indemn agents card <agent-id> --output ./agent-card.pdf # branded PDF
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Step 2: Set the System Prompt and Model
|
|
46
|
+
|
|
47
|
+
### Inline prompt
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
indemn config set <agent-id> --prompt "You are an insurance assistant for Acme Corp..."
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Prompt from file (preferred for long prompts)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
indemn config set <agent-id> --prompt-file ./prompts/acme-assistant.txt
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If both `--prompt` and `--prompt-file` are provided, `--prompt-file` takes precedence.
|
|
60
|
+
|
|
61
|
+
### Set the model
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
indemn config set <agent-id> --model "claude-sonnet-4-20250514"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Combine prompt and model in one call:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
indemn config set <agent-id> --prompt-file ./prompts/acme.txt --model "claude-sonnet-4-20250514"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Read current configuration
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
indemn config get <agent-id> [--json]
|
|
77
|
+
indemn config get <agent-id> --field prompt
|
|
78
|
+
indemn config get <agent-id> --field model
|
|
79
|
+
indemn config get <agent-id> --field greeting
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Step 3: Add Functions (Tools)
|
|
85
|
+
|
|
86
|
+
Functions are tools the agent can invoke during conversation (e.g., generate a quote, transfer to a human, look up policy details).
|
|
87
|
+
|
|
88
|
+
### Create a function
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
indemn functions create <agent-id> --type ACTION --name "get_quote" --description "Generate an insurance quote"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Add parameters to a function
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
indemn functions params add <agent-id> <func-id> \
|
|
98
|
+
--name "state" --type string --description "US state abbreviation" --required
|
|
99
|
+
|
|
100
|
+
indemn functions params add <agent-id> <func-id> \
|
|
101
|
+
--name "coverage_amount" --type number --description "Coverage amount in dollars"
|
|
102
|
+
|
|
103
|
+
indemn functions params add <agent-id> <func-id> \
|
|
104
|
+
--name "has_claims" --type boolean --description "Whether applicant has prior claims"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Parameter types: `string`, `number`, `boolean`. Use `--required` for mandatory params.
|
|
108
|
+
|
|
109
|
+
### Manage parameters
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
indemn functions params list <agent-id> <func-id> [--json]
|
|
113
|
+
indemn functions params update <agent-id> <func-id> <param-id> --description "Updated desc" --required
|
|
114
|
+
indemn functions params delete <agent-id> <func-id> <param-id>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Import functions from an OpenAPI spec
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
indemn functions import <agent-id> --url "https://api.example.com/openapi.json"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This parses the spec and creates functions with parameters automatically.
|
|
124
|
+
|
|
125
|
+
### Other function operations
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
indemn functions list <agent-id> [--json] [--limit 10] [--page 1]
|
|
129
|
+
indemn functions update <agent-id> <func-id> --name "updated_name" --description "New desc"
|
|
130
|
+
indemn functions test <agent-id> <func-id> [--json]
|
|
131
|
+
indemn functions export <agent-id> [--json]
|
|
132
|
+
indemn functions delete <agent-id> <func-id> # requires confirmation
|
|
133
|
+
indemn functions master-list [--json] # available function templates
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Step 4: Create and Link Knowledge Bases
|
|
139
|
+
|
|
140
|
+
Knowledge bases provide the agent with reference information. Three data source types: QNA pairs, URLs, and files.
|
|
141
|
+
|
|
142
|
+
### Create a knowledge base
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
indemn kb create --name "Acme FAQ" --type QNA
|
|
146
|
+
indemn kb create --name "Product Pages" --type URL
|
|
147
|
+
indemn kb create --name "Policy Documents" --type FILE
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Type defaults to `QNA` if omitted. Must be uppercased: `QNA`, `URL`, or `FILE`.
|
|
151
|
+
|
|
152
|
+
### Add data -- QNA pairs
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
indemn kb data add <kb-id> --question "What is the deductible?" --answer "The standard deductible is $500."
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Add data -- URL scraping
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
indemn kb data add <kb-id> --source-url "https://acme.com/faq"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Scrapes the URL and ingests the content.
|
|
165
|
+
|
|
166
|
+
### Add data -- File upload
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
indemn kb data add <kb-id> --file ./documents/policy-handbook.pdf
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Uploads the file and polls until processing is complete.
|
|
173
|
+
|
|
174
|
+
### Link knowledge bases to an agent
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
indemn kb link <agent-id> <kb-id>
|
|
178
|
+
indemn kb link <agent-id> <kb-id-1> <kb-id-2> <kb-id-3> # link multiple at once
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The link command is variadic -- pass multiple KB IDs to link them all in one call.
|
|
182
|
+
|
|
183
|
+
### Unlink a knowledge base
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
indemn kb unlink <agent-id> <kb-id>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Other KB operations
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
indemn kb list [--json] [--limit 20] [--page 1]
|
|
193
|
+
indemn kb get <kb-id> [--json]
|
|
194
|
+
indemn kb update <kb-id> --name "Updated Name"
|
|
195
|
+
indemn kb delete <kb-id> # requires confirmation
|
|
196
|
+
indemn kb data list <kb-id> [--json] [--limit 20] [--page 1] # shows Total, Page X of Y
|
|
197
|
+
indemn kb data update <kb-id> <source-id> --question "New Q" --answer "New A"
|
|
198
|
+
indemn kb data update <kb-id> <source-id> --source-url "https://new-url.com"
|
|
199
|
+
indemn kb data update <kb-id> <source-id> --content "Replacement content"
|
|
200
|
+
indemn kb data delete <kb-id> <source-id> # requires confirmation
|
|
201
|
+
indemn kb export <kb-id> --format csv # or xlsx
|
|
202
|
+
indemn kb import <kb-id> --file ./data.json # must be valid JSON
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Step 5: Test via Chat
|
|
208
|
+
|
|
209
|
+
### Interactive mode
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
indemn chat <agent-id>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Opens a live chat session. Type messages, see responses in real time. Ctrl+C to exit.
|
|
216
|
+
|
|
217
|
+
### Single message (scripting / quick check)
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
indemn chat <agent-id> --message "What types of insurance do you offer?"
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Sends one message, prints the response, exits.
|
|
224
|
+
|
|
225
|
+
### Resume a previous session
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
indemn chat <agent-id> --session <session-id>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Continues an existing conversation thread with its history intact.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Step 6: Iterate
|
|
236
|
+
|
|
237
|
+
After testing, refine: update the prompt (`config set --prompt-file`), add functions (`functions create`), add/update KB data (`kb data add` / `kb data update`), or switch models (`config set --model`). Repeat steps 2-5 until the agent performs correctly.
|
|
238
|
+
|
|
239
|
+
## Complete Build Example
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# 1. Create agent
|
|
243
|
+
indemn agents create --name "Acme Wedding Insurance" --channels "WEB"
|
|
244
|
+
# -> agent_id: abc123
|
|
245
|
+
|
|
246
|
+
# 2. Set prompt and model
|
|
247
|
+
indemn config set abc123 --prompt-file ./prompts/wedding.txt --model "claude-sonnet-4-20250514"
|
|
248
|
+
|
|
249
|
+
# 3. Add functions
|
|
250
|
+
indemn functions create abc123 --type ACTION --name "get_quote" --description "Generate a wedding insurance quote"
|
|
251
|
+
# -> func_id: func456
|
|
252
|
+
indemn functions params add abc123 func456 --name "event_date" --type string --description "Wedding date" --required
|
|
253
|
+
indemn functions params add abc123 func456 --name "guest_count" --type number --description "Number of guests" --required
|
|
254
|
+
indemn functions params add abc123 func456 --name "venue_cost" --type number --description "Total venue cost in dollars"
|
|
255
|
+
|
|
256
|
+
# 4. Create and populate knowledge base
|
|
257
|
+
indemn kb create --name "Wedding FAQ" --type QNA
|
|
258
|
+
# -> kb_id: kb789
|
|
259
|
+
indemn kb data add kb789 --question "What does wedding insurance cover?" --answer "Coverage includes venue damage, vendor no-shows, severe weather, and illness."
|
|
260
|
+
indemn kb data add kb789 --source-url "https://acme.com/wedding-insurance/faq"
|
|
261
|
+
|
|
262
|
+
# 5. Link KB to agent
|
|
263
|
+
indemn kb link abc123 kb789
|
|
264
|
+
|
|
265
|
+
# 6. Test
|
|
266
|
+
indemn chat abc123 --message "Hi, I'm getting married in June and want to protect my investment."
|
|
267
|
+
indemn chat abc123 # interactive session for deeper testing
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## CLI Quick Reference
|
|
273
|
+
|
|
274
|
+
| Group | Command | Purpose |
|
|
275
|
+
|-------|---------|---------|
|
|
276
|
+
| **Agents** | `agents list / get / create / update / delete` | CRUD operations |
|
|
277
|
+
| | `agents clone <id>` | Duplicate an agent |
|
|
278
|
+
| | `agents card <id> [--output <path>]` | Generate branded PDF |
|
|
279
|
+
| **Config** | `config get <id> [--field prompt\|model\|greeting]` | Read configuration |
|
|
280
|
+
| | `config set <id> [--prompt\|--prompt-file\|--model]` | Write configuration |
|
|
281
|
+
| **Functions** | `functions list / create / update / delete` | CRUD operations |
|
|
282
|
+
| | `functions test <id> <func-id>` | Test a function |
|
|
283
|
+
| | `functions export <id>` | Export all functions |
|
|
284
|
+
| | `functions import <id> --url "<spec>"` | Import from OpenAPI |
|
|
285
|
+
| | `functions master-list` | Available templates |
|
|
286
|
+
| | `functions params list / add / update / delete` | Manage parameters |
|
|
287
|
+
| **KB** | `kb list / get / create / update / delete` | CRUD operations |
|
|
288
|
+
| | `kb data list / add / update / delete` | Manage KB entries |
|
|
289
|
+
| | `kb link <agent-id> <kb-id...>` | Link KB(s) to agent |
|
|
290
|
+
| | `kb unlink <agent-id> <kb-id>` | Unlink KB from agent |
|
|
291
|
+
| | `kb export <kb-id> [--format csv\|xlsx]` | Export KB data |
|
|
292
|
+
| | `kb import <kb-id> --file <path>` | Import from JSON |
|
|
293
|
+
| **Chat** | `chat <id>` | Interactive session |
|
|
294
|
+
| | `chat <id> --message "<text>"` | Single message mode |
|
|
295
|
+
| | `chat <id> --session <sid>` | Resume session |
|
|
296
|
+
| **Other** | `whoami` | Show authenticated user |
|
|
297
|
+
| | `models` | List available LLMs |
|
|
298
|
+
|
|
299
|
+
All commands accept `--json` for machine-readable output. List commands accept `--limit <n>` and `--page <n>`. Delete commands require confirmation.
|