agent-toolbelt 0.2.1 → 0.2.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 +13 -1
- package/dist/index.d.mts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +8 -0
- package/dist/index.mjs +8 -0
- package/dist/langchain.js +29 -0
- package/dist/langchain.mjs +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Official SDK for [Agent Toolbelt](https://agent-toolbelt-production.up.railway.app) — a suite of focused API tools for AI agents and developers.
|
|
4
4
|
|
|
5
|
-
**Typed client + LangChain tool wrappers** for schema generation, text extraction, token counting, CSV conversion, Markdown conversion, URL metadata, regex building, cron expressions, address normalization, color palette generation,
|
|
5
|
+
**Typed client + LangChain tool wrappers** for schema generation, text extraction, token counting, CSV conversion, Markdown conversion, URL metadata, regex building, cron expressions, address normalization, color palette generation, brand kit creation, meeting action item extraction, and prompt optimization.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -121,6 +121,12 @@ await client.colorPalette({ description: "calm fintech blue", count: 5 });
|
|
|
121
121
|
|
|
122
122
|
// Generate a full brand kit — colors, typography, CSS/Tailwind tokens
|
|
123
123
|
await client.brandKit({ name: "Solaris Health", industry: "healthcare", vibe: ["modern", "trustworthy"], format: "full" });
|
|
124
|
+
|
|
125
|
+
// Extract action items, decisions, and summary from meeting notes
|
|
126
|
+
await client.meetingActionItems({ notes: transcript, format: "full", participants: ["Sarah", "John"] });
|
|
127
|
+
|
|
128
|
+
// Analyze and improve an LLM prompt
|
|
129
|
+
await client.promptOptimizer({ prompt: "Summarize this and tell me the main points.", model: "gpt-4o", mode: "both" });
|
|
124
130
|
```
|
|
125
131
|
|
|
126
132
|
---
|
|
@@ -163,6 +169,9 @@ const result = await agent.invoke({
|
|
|
163
169
|
| `normalize_address` | Normalize US addresses to USPS format |
|
|
164
170
|
| `generate_color_palette` | Generate color palettes with WCAG scores and CSS variables |
|
|
165
171
|
| `generate_brand_kit` | Generate full brand kit — colors, typography, CSS/Tailwind tokens |
|
|
172
|
+
| `strip_image_metadata` | Strip EXIF/GPS/IPTC/XMP metadata from images for privacy |
|
|
173
|
+
| `extract_meeting_action_items` | Extract action items, decisions, and summary from meeting notes |
|
|
174
|
+
| `optimize_prompt` | Analyze and improve LLM prompts with scores and rewrite |
|
|
166
175
|
|
|
167
176
|
---
|
|
168
177
|
|
|
@@ -181,6 +190,9 @@ const result = await agent.invoke({
|
|
|
181
190
|
| `address-normalizer` | $0.0005 / call |
|
|
182
191
|
| `color-palette` | $0.0005 / call |
|
|
183
192
|
| `brand-kit` | $0.001 / call |
|
|
193
|
+
| `image-metadata-stripper` | $0.001 / call |
|
|
194
|
+
| `meeting-action-items` | $0.05 / call |
|
|
195
|
+
| `prompt-optimizer` | $0.05 / call |
|
|
184
196
|
|
|
185
197
|
## License
|
|
186
198
|
|
package/dist/index.d.mts
CHANGED
|
@@ -185,6 +185,41 @@ interface BrandKitResult {
|
|
|
185
185
|
googleFontsUrl?: string;
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
+
interface PromptOptimizerResult {
|
|
189
|
+
mode: "improve" | "analyze" | "both";
|
|
190
|
+
model: string;
|
|
191
|
+
scores?: {
|
|
192
|
+
clarity: number;
|
|
193
|
+
specificity: number;
|
|
194
|
+
structure: number;
|
|
195
|
+
completeness: number;
|
|
196
|
+
overall: number;
|
|
197
|
+
};
|
|
198
|
+
issues?: string[];
|
|
199
|
+
suggestions?: string[];
|
|
200
|
+
improvedPrompt?: string;
|
|
201
|
+
changesSummary?: string[];
|
|
202
|
+
tokenStats: {
|
|
203
|
+
original: number;
|
|
204
|
+
improved?: number;
|
|
205
|
+
delta?: number;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
interface MeetingActionItem {
|
|
209
|
+
id: number;
|
|
210
|
+
owner: string;
|
|
211
|
+
task: string;
|
|
212
|
+
deadline?: string;
|
|
213
|
+
priority: "high" | "medium" | "low";
|
|
214
|
+
context?: string;
|
|
215
|
+
}
|
|
216
|
+
interface MeetingActionItemsResult {
|
|
217
|
+
meetingTitle: string;
|
|
218
|
+
actionItems: MeetingActionItem[];
|
|
219
|
+
actionItemCount: number;
|
|
220
|
+
summary?: string;
|
|
221
|
+
decisions?: string[];
|
|
222
|
+
}
|
|
188
223
|
interface ImageMetadataStripperResult {
|
|
189
224
|
image: string;
|
|
190
225
|
outputFormat: string;
|
|
@@ -279,6 +314,19 @@ declare class AgentToolbelt {
|
|
|
279
314
|
format?: "hex" | "rgb" | "hsl" | "all";
|
|
280
315
|
includeShades?: boolean;
|
|
281
316
|
}): Promise<ColorPaletteResult>;
|
|
317
|
+
/** Analyze and improve an LLM prompt — scores clarity, specificity, structure, and completeness */
|
|
318
|
+
promptOptimizer(input: {
|
|
319
|
+
prompt: string;
|
|
320
|
+
model?: string;
|
|
321
|
+
task?: string;
|
|
322
|
+
mode?: "improve" | "analyze" | "both";
|
|
323
|
+
}): Promise<PromptOptimizerResult>;
|
|
324
|
+
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
325
|
+
meetingActionItems(input: {
|
|
326
|
+
notes: string;
|
|
327
|
+
format?: "action_items_only" | "full";
|
|
328
|
+
participants?: string[];
|
|
329
|
+
}): Promise<MeetingActionItemsResult>;
|
|
282
330
|
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
283
331
|
imageMetadataStripper(input: {
|
|
284
332
|
image: string;
|
|
@@ -295,4 +343,4 @@ declare class AgentToolbelt {
|
|
|
295
343
|
}): Promise<BrandKitResult>;
|
|
296
344
|
}
|
|
297
345
|
|
|
298
|
-
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
|
346
|
+
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type MeetingActionItem, type MeetingActionItemsResult, type PromptOptimizerResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -185,6 +185,41 @@ interface BrandKitResult {
|
|
|
185
185
|
googleFontsUrl?: string;
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
+
interface PromptOptimizerResult {
|
|
189
|
+
mode: "improve" | "analyze" | "both";
|
|
190
|
+
model: string;
|
|
191
|
+
scores?: {
|
|
192
|
+
clarity: number;
|
|
193
|
+
specificity: number;
|
|
194
|
+
structure: number;
|
|
195
|
+
completeness: number;
|
|
196
|
+
overall: number;
|
|
197
|
+
};
|
|
198
|
+
issues?: string[];
|
|
199
|
+
suggestions?: string[];
|
|
200
|
+
improvedPrompt?: string;
|
|
201
|
+
changesSummary?: string[];
|
|
202
|
+
tokenStats: {
|
|
203
|
+
original: number;
|
|
204
|
+
improved?: number;
|
|
205
|
+
delta?: number;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
interface MeetingActionItem {
|
|
209
|
+
id: number;
|
|
210
|
+
owner: string;
|
|
211
|
+
task: string;
|
|
212
|
+
deadline?: string;
|
|
213
|
+
priority: "high" | "medium" | "low";
|
|
214
|
+
context?: string;
|
|
215
|
+
}
|
|
216
|
+
interface MeetingActionItemsResult {
|
|
217
|
+
meetingTitle: string;
|
|
218
|
+
actionItems: MeetingActionItem[];
|
|
219
|
+
actionItemCount: number;
|
|
220
|
+
summary?: string;
|
|
221
|
+
decisions?: string[];
|
|
222
|
+
}
|
|
188
223
|
interface ImageMetadataStripperResult {
|
|
189
224
|
image: string;
|
|
190
225
|
outputFormat: string;
|
|
@@ -279,6 +314,19 @@ declare class AgentToolbelt {
|
|
|
279
314
|
format?: "hex" | "rgb" | "hsl" | "all";
|
|
280
315
|
includeShades?: boolean;
|
|
281
316
|
}): Promise<ColorPaletteResult>;
|
|
317
|
+
/** Analyze and improve an LLM prompt — scores clarity, specificity, structure, and completeness */
|
|
318
|
+
promptOptimizer(input: {
|
|
319
|
+
prompt: string;
|
|
320
|
+
model?: string;
|
|
321
|
+
task?: string;
|
|
322
|
+
mode?: "improve" | "analyze" | "both";
|
|
323
|
+
}): Promise<PromptOptimizerResult>;
|
|
324
|
+
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
325
|
+
meetingActionItems(input: {
|
|
326
|
+
notes: string;
|
|
327
|
+
format?: "action_items_only" | "full";
|
|
328
|
+
participants?: string[];
|
|
329
|
+
}): Promise<MeetingActionItemsResult>;
|
|
282
330
|
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
283
331
|
imageMetadataStripper(input: {
|
|
284
332
|
image: string;
|
|
@@ -295,4 +343,4 @@ declare class AgentToolbelt {
|
|
|
295
343
|
}): Promise<BrandKitResult>;
|
|
296
344
|
}
|
|
297
345
|
|
|
298
|
-
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
|
346
|
+
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type MeetingActionItem, type MeetingActionItemsResult, type PromptOptimizerResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
package/dist/index.js
CHANGED
|
@@ -90,6 +90,14 @@ var AgentToolbelt = class {
|
|
|
90
90
|
colorPalette(input) {
|
|
91
91
|
return this.call("color-palette", input);
|
|
92
92
|
}
|
|
93
|
+
/** Analyze and improve an LLM prompt — scores clarity, specificity, structure, and completeness */
|
|
94
|
+
promptOptimizer(input) {
|
|
95
|
+
return this.call("prompt-optimizer", input);
|
|
96
|
+
}
|
|
97
|
+
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
98
|
+
meetingActionItems(input) {
|
|
99
|
+
return this.call("meeting-action-items", input);
|
|
100
|
+
}
|
|
93
101
|
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
94
102
|
imageMetadataStripper(input) {
|
|
95
103
|
return this.call("image-metadata-stripper", input);
|
package/dist/index.mjs
CHANGED
|
@@ -64,6 +64,14 @@ var AgentToolbelt = class {
|
|
|
64
64
|
colorPalette(input) {
|
|
65
65
|
return this.call("color-palette", input);
|
|
66
66
|
}
|
|
67
|
+
/** Analyze and improve an LLM prompt — scores clarity, specificity, structure, and completeness */
|
|
68
|
+
promptOptimizer(input) {
|
|
69
|
+
return this.call("prompt-optimizer", input);
|
|
70
|
+
}
|
|
71
|
+
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
72
|
+
meetingActionItems(input) {
|
|
73
|
+
return this.call("meeting-action-items", input);
|
|
74
|
+
}
|
|
67
75
|
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
68
76
|
imageMetadataStripper(input) {
|
|
69
77
|
return this.call("image-metadata-stripper", input);
|
package/dist/langchain.js
CHANGED
|
@@ -165,6 +165,35 @@ function createLangChainTools(client) {
|
|
|
165
165
|
return JSON.stringify(result);
|
|
166
166
|
}
|
|
167
167
|
}),
|
|
168
|
+
// ---- Prompt Optimizer ----
|
|
169
|
+
new import_tools.DynamicStructuredTool({
|
|
170
|
+
name: "optimize_prompt",
|
|
171
|
+
description: "Analyze and improve an LLM prompt for clarity, specificity, structure, and completeness. Use this when a prompt isn't performing well, to prepare prompts before deploying them, or to learn what makes a good prompt for a specific model. Returns scores (1-10) for each quality dimension, a list of issues found, an improved rewrite, and a summary of what changed and why. Supports targeting specific models: gpt-4o, claude-3-5-sonnet, gpt-3.5-turbo, etc.",
|
|
172
|
+
schema: import_zod.z.object({
|
|
173
|
+
prompt: import_zod.z.string().describe("The LLM prompt to analyze and/or improve"),
|
|
174
|
+
model: import_zod.z.string().default("gpt-4o").describe("Target model to optimize for"),
|
|
175
|
+
task: import_zod.z.string().optional().describe("What this prompt is trying to accomplish (helps generate targeted suggestions)"),
|
|
176
|
+
mode: import_zod.z.enum(["improve", "analyze", "both"]).default("both").describe("'both' returns analysis + improved prompt; 'analyze' scores only; 'improve' rewrites only")
|
|
177
|
+
}),
|
|
178
|
+
func: async ({ prompt, model, task, mode }) => {
|
|
179
|
+
const result = await client.promptOptimizer({ prompt, model, task, mode });
|
|
180
|
+
return JSON.stringify(result);
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
// ---- Meeting Action Items ----
|
|
184
|
+
new import_tools.DynamicStructuredTool({
|
|
185
|
+
name: "extract_meeting_action_items",
|
|
186
|
+
description: "Extract structured action items, key decisions, and a summary from meeting notes or transcripts. Use this after a meeting to automatically generate a task list with owners, deadlines, and priorities. Works with raw transcripts, bullet-point notes, or any free-form meeting text. Returns each action item with the responsible person, what needs to be done, deadline (if mentioned), and priority level. The 'full' format also includes a meeting summary and list of decisions made.",
|
|
187
|
+
schema: import_zod.z.object({
|
|
188
|
+
notes: import_zod.z.string().describe("Meeting notes or transcript to extract action items from"),
|
|
189
|
+
format: import_zod.z.enum(["action_items_only", "full"]).default("full").describe("'full' includes summary and decisions; 'action_items_only' returns just the task list"),
|
|
190
|
+
participants: import_zod.z.array(import_zod.z.string()).optional().describe("Known participant names to help with owner attribution")
|
|
191
|
+
}),
|
|
192
|
+
func: async ({ notes, format, participants }) => {
|
|
193
|
+
const result = await client.meetingActionItems({ notes, format, participants });
|
|
194
|
+
return JSON.stringify(result);
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
168
197
|
// ---- Image Metadata Stripper ----
|
|
169
198
|
new import_tools.DynamicStructuredTool({
|
|
170
199
|
name: "strip_image_metadata",
|
package/dist/langchain.mjs
CHANGED
|
@@ -141,6 +141,35 @@ function createLangChainTools(client) {
|
|
|
141
141
|
return JSON.stringify(result);
|
|
142
142
|
}
|
|
143
143
|
}),
|
|
144
|
+
// ---- Prompt Optimizer ----
|
|
145
|
+
new DynamicStructuredTool({
|
|
146
|
+
name: "optimize_prompt",
|
|
147
|
+
description: "Analyze and improve an LLM prompt for clarity, specificity, structure, and completeness. Use this when a prompt isn't performing well, to prepare prompts before deploying them, or to learn what makes a good prompt for a specific model. Returns scores (1-10) for each quality dimension, a list of issues found, an improved rewrite, and a summary of what changed and why. Supports targeting specific models: gpt-4o, claude-3-5-sonnet, gpt-3.5-turbo, etc.",
|
|
148
|
+
schema: z.object({
|
|
149
|
+
prompt: z.string().describe("The LLM prompt to analyze and/or improve"),
|
|
150
|
+
model: z.string().default("gpt-4o").describe("Target model to optimize for"),
|
|
151
|
+
task: z.string().optional().describe("What this prompt is trying to accomplish (helps generate targeted suggestions)"),
|
|
152
|
+
mode: z.enum(["improve", "analyze", "both"]).default("both").describe("'both' returns analysis + improved prompt; 'analyze' scores only; 'improve' rewrites only")
|
|
153
|
+
}),
|
|
154
|
+
func: async ({ prompt, model, task, mode }) => {
|
|
155
|
+
const result = await client.promptOptimizer({ prompt, model, task, mode });
|
|
156
|
+
return JSON.stringify(result);
|
|
157
|
+
}
|
|
158
|
+
}),
|
|
159
|
+
// ---- Meeting Action Items ----
|
|
160
|
+
new DynamicStructuredTool({
|
|
161
|
+
name: "extract_meeting_action_items",
|
|
162
|
+
description: "Extract structured action items, key decisions, and a summary from meeting notes or transcripts. Use this after a meeting to automatically generate a task list with owners, deadlines, and priorities. Works with raw transcripts, bullet-point notes, or any free-form meeting text. Returns each action item with the responsible person, what needs to be done, deadline (if mentioned), and priority level. The 'full' format also includes a meeting summary and list of decisions made.",
|
|
163
|
+
schema: z.object({
|
|
164
|
+
notes: z.string().describe("Meeting notes or transcript to extract action items from"),
|
|
165
|
+
format: z.enum(["action_items_only", "full"]).default("full").describe("'full' includes summary and decisions; 'action_items_only' returns just the task list"),
|
|
166
|
+
participants: z.array(z.string()).optional().describe("Known participant names to help with owner attribution")
|
|
167
|
+
}),
|
|
168
|
+
func: async ({ notes, format, participants }) => {
|
|
169
|
+
const result = await client.meetingActionItems({ notes, format, participants });
|
|
170
|
+
return JSON.stringify(result);
|
|
171
|
+
}
|
|
172
|
+
}),
|
|
144
173
|
// ---- Image Metadata Stripper ----
|
|
145
174
|
new DynamicStructuredTool({
|
|
146
175
|
name: "strip_image_metadata",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-toolbelt",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Official SDK for Agent Toolbelt — typed API client and LangChain tool wrappers for schema generation, text extraction, token counting, CSV conversion, and more.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|