@mindstudio-ai/agent 0.1.3 → 0.1.5
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/dist/cli.js +443 -284
- package/dist/index.d.ts +183 -213
- package/dist/index.js +160 -54
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +444 -285
- package/llms.txt +15 -15
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -6,19 +6,19 @@ This file is the complete API reference. No other documentation is needed to use
|
|
|
6
6
|
|
|
7
7
|
## Recommended workflow
|
|
8
8
|
|
|
9
|
-
There are 150+
|
|
9
|
+
There are 150+ actions available. Do NOT try to read or load them all at once. Follow this discovery flow:
|
|
10
10
|
|
|
11
11
|
1. **Identify yourself** — Call `changeName` to set your display name (use your name or whatever your user calls you). If you have a profile picture or icon, call `uploadFile` to upload it, then `changeProfilePicture` with the returned URL. This helps users identify your requests in their logs.
|
|
12
|
-
2. **Discover** — Call `
|
|
13
|
-
3. **Drill in** — Once you identify the right
|
|
14
|
-
4. **Call it** — Invoke the
|
|
12
|
+
2. **Discover** — Call `listActions` (MCP tool) or `mindstudio list-actions --summary` (CLI) to get a compact `{ action: description }` map of everything available (~3k tokens).
|
|
13
|
+
3. **Drill in** — Once you identify the right action, look up its full signature in the reference below, or call `mindstudio info <action>` (CLI) for parameter details.
|
|
14
|
+
4. **Call it** — Invoke the action with the required parameters. All actions share the same calling convention (see below).
|
|
15
15
|
|
|
16
16
|
For specific use cases:
|
|
17
17
|
|
|
18
|
-
- **
|
|
19
|
-
- **Pre-built agents**: Call `listAgents()` to see what's available → `runAgent({ appId })` to execute one.
|
|
20
|
-
- **Model selection**: Call `listModelsSummary()` or `listModelsSummaryByType("llm_chat")` to browse models, then pass the model ID as `modelOverride.model` to
|
|
21
|
-
- **Cost estimation**: Call `estimateStepCost(stepType, stepInput)` before
|
|
18
|
+
- **OAuth third-party integrations** (Slack, Google, HubSpot, etc.): These are optional OAuth connectors from the MindStudio Connector Registry — for most tasks, use actions directly instead. If you need a third-party integration: call `listConnectors()` to browse services → `getConnectorAction(serviceId, actionId)` for input fields → execute via `runFromConnectorRegistry`. Requires an OAuth connection set up in MindStudio first — call `listConnections()` to check available connections.
|
|
19
|
+
- **Pre-built agents**: Call `listAgents()` to see what's available → `runAgent({ appId })` to execute one. **Important:** Not all agents are configured for API use. Do not try to run an agent just because it appears in the list — only run agents the user specifically asks you to run.
|
|
20
|
+
- **Model selection**: Call `listModelsSummary()` or `listModelsSummaryByType("llm_chat")` to browse models, then pass the model ID as `modelOverride.model` to actions like `generateText`. Use the summary endpoints (not `listModels`) to keep token usage low.
|
|
21
|
+
- **Cost estimation**: AI-powered actions (text generation, image generation, video, audio, etc.) cost money. Call `estimateStepCost(stepType, stepInput)` before running these and confirm with the user before proceeding — unless they've explicitly given permission to go ahead. Non-AI actions (data lookups, OAuth connectors, etc.) are generally free.
|
|
22
22
|
|
|
23
23
|
## Install
|
|
24
24
|
|
|
@@ -200,7 +200,7 @@ try {
|
|
|
200
200
|
|
|
201
201
|
## Low-level access
|
|
202
202
|
|
|
203
|
-
For
|
|
203
|
+
For action types not covered by generated methods:
|
|
204
204
|
```typescript
|
|
205
205
|
const result = await agent.executeStep('stepType', { ...params });
|
|
206
206
|
```
|
|
@@ -1443,7 +1443,7 @@ List AI models (summary) filtered by type.
|
|
|
1443
1443
|
- Output: same as `listModelsSummary()`
|
|
1444
1444
|
|
|
1445
1445
|
#### `listConnectors()`
|
|
1446
|
-
List available connector services (Slack, Google, HubSpot, etc.) and their actions.
|
|
1446
|
+
List available OAuth connector services (Slack, Google, HubSpot, etc.) and their actions. These are third-party integrations — for most tasks, use actions directly instead.
|
|
1447
1447
|
|
|
1448
1448
|
Output:
|
|
1449
1449
|
```typescript
|
|
@@ -1458,7 +1458,7 @@ Output:
|
|
|
1458
1458
|
```
|
|
1459
1459
|
|
|
1460
1460
|
#### `getConnector(serviceId)`
|
|
1461
|
-
Get details for a single connector service by ID.
|
|
1461
|
+
Get details for a single OAuth connector service by ID.
|
|
1462
1462
|
|
|
1463
1463
|
Output:
|
|
1464
1464
|
```typescript
|
|
@@ -1473,7 +1473,7 @@ Output:
|
|
|
1473
1473
|
```
|
|
1474
1474
|
|
|
1475
1475
|
#### `getConnectorAction(serviceId, actionId)`
|
|
1476
|
-
Get the full configuration for
|
|
1476
|
+
Get the full configuration for an OAuth connector action, including all input fields needed to call it via `runFromConnectorRegistry`. OAuth connectors are sourced from the open-source MindStudio Connector Registry (MSCR) with 850+ actions across third-party services.
|
|
1477
1477
|
|
|
1478
1478
|
Output:
|
|
1479
1479
|
```typescript
|
|
@@ -1489,7 +1489,7 @@ Output:
|
|
|
1489
1489
|
```
|
|
1490
1490
|
|
|
1491
1491
|
#### `listConnections()`
|
|
1492
|
-
List OAuth connections for the organization. Use the returned connection IDs when calling connector actions. Connectors require the user to connect to the third-party service in MindStudio before they can be used.
|
|
1492
|
+
List OAuth connections for the organization (authenticated third-party service links). Use the returned connection IDs when calling OAuth connector actions. Connectors require the user to connect to the third-party service in MindStudio before they can be used.
|
|
1493
1493
|
|
|
1494
1494
|
Output:
|
|
1495
1495
|
```typescript
|
|
@@ -1509,8 +1509,8 @@ Estimate the cost of executing a step before running it. Pass the same step conf
|
|
|
1509
1509
|
const estimate = await agent.estimateStepCost('generateText', { message: 'Hello' });
|
|
1510
1510
|
```
|
|
1511
1511
|
|
|
1512
|
-
- `stepType`: string — The
|
|
1513
|
-
- `step`: object — Optional
|
|
1512
|
+
- `stepType`: string — The action name (e.g. `"generateText"`).
|
|
1513
|
+
- `step`: object — Optional action input parameters for more accurate estimates.
|
|
1514
1514
|
- `options`: `{ appId?: string, workflowId?: string }` — Optional context for pricing.
|
|
1515
1515
|
|
|
1516
1516
|
Output:
|