agent-toolbelt 0.2.2 → 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 +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/dist/langchain.js +15 -0
- package/dist/langchain.mjs +15 -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,26 @@ 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
|
+
}
|
|
188
208
|
interface MeetingActionItem {
|
|
189
209
|
id: number;
|
|
190
210
|
owner: string;
|
|
@@ -294,6 +314,13 @@ declare class AgentToolbelt {
|
|
|
294
314
|
format?: "hex" | "rgb" | "hsl" | "all";
|
|
295
315
|
includeShades?: boolean;
|
|
296
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>;
|
|
297
324
|
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
298
325
|
meetingActionItems(input: {
|
|
299
326
|
notes: string;
|
|
@@ -316,4 +343,4 @@ declare class AgentToolbelt {
|
|
|
316
343
|
}): Promise<BrandKitResult>;
|
|
317
344
|
}
|
|
318
345
|
|
|
319
|
-
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type MeetingActionItem, type MeetingActionItemsResult, 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,26 @@ 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
|
+
}
|
|
188
208
|
interface MeetingActionItem {
|
|
189
209
|
id: number;
|
|
190
210
|
owner: string;
|
|
@@ -294,6 +314,13 @@ declare class AgentToolbelt {
|
|
|
294
314
|
format?: "hex" | "rgb" | "hsl" | "all";
|
|
295
315
|
includeShades?: boolean;
|
|
296
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>;
|
|
297
324
|
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
298
325
|
meetingActionItems(input: {
|
|
299
326
|
notes: string;
|
|
@@ -316,4 +343,4 @@ declare class AgentToolbelt {
|
|
|
316
343
|
}): Promise<BrandKitResult>;
|
|
317
344
|
}
|
|
318
345
|
|
|
319
|
-
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type MeetingActionItem, type MeetingActionItemsResult, 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,10 @@ 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
|
+
}
|
|
93
97
|
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
94
98
|
meetingActionItems(input) {
|
|
95
99
|
return this.call("meeting-action-items", input);
|
package/dist/index.mjs
CHANGED
|
@@ -64,6 +64,10 @@ 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
|
+
}
|
|
67
71
|
/** Extract action items, decisions, and summary from meeting notes or transcripts */
|
|
68
72
|
meetingActionItems(input) {
|
|
69
73
|
return this.call("meeting-action-items", input);
|
package/dist/langchain.js
CHANGED
|
@@ -165,6 +165,21 @@ 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
|
+
}),
|
|
168
183
|
// ---- Meeting Action Items ----
|
|
169
184
|
new import_tools.DynamicStructuredTool({
|
|
170
185
|
name: "extract_meeting_action_items",
|
package/dist/langchain.mjs
CHANGED
|
@@ -141,6 +141,21 @@ 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
|
+
}),
|
|
144
159
|
// ---- Meeting Action Items ----
|
|
145
160
|
new DynamicStructuredTool({
|
|
146
161
|
name: "extract_meeting_action_items",
|
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",
|