@mindstudio-ai/agent 0.1.1 → 0.1.4
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 +40 -4
- package/dist/cli.js +260 -54
- package/dist/index.d.ts +34 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +3522 -0
- package/llms.txt +43 -8
- package/package.json +2 -1
package/llms.txt
CHANGED
|
@@ -8,19 +8,26 @@ This file is the complete API reference. No other documentation is needed to use
|
|
|
8
8
|
|
|
9
9
|
There are 150+ methods available. Do NOT try to read or load them all at once. Follow this discovery flow:
|
|
10
10
|
|
|
11
|
-
1. **
|
|
12
|
-
2. **
|
|
13
|
-
3. **
|
|
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 `listSteps` (MCP tool) or `mindstudio list --summary` (CLI) to get a compact `{ method: description }` map of everything available (~3k tokens).
|
|
13
|
+
3. **Drill in** — Once you identify the right method, look up its full signature in the Methods reference below, or call `mindstudio info <method>` (CLI) for parameter details.
|
|
14
|
+
4. **Call it** — Invoke the method with the required parameters. All step methods share the same calling convention (see below).
|
|
14
15
|
|
|
15
16
|
For specific use cases:
|
|
16
17
|
|
|
17
18
|
- **Third-party integrations** (Slack, Google, HubSpot, etc.): 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.
|
|
18
|
-
- **Pre-built agents**: Call `listAgents()` to see what's available → `runAgent({ appId })` to execute one.
|
|
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.
|
|
19
20
|
- **Model selection**: Call `listModelsSummary()` or `listModelsSummaryByType("llm_chat")` to browse models, then pass the model ID as `modelOverride.model` to methods like `generateText`. Use the summary endpoints (not `listModels`) to keep token usage low.
|
|
20
|
-
- **Cost estimation**: Call `estimateStepCost(stepType, stepInput)` before
|
|
21
|
+
- **Cost estimation**: AI-powered steps (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 steps (data lookups, connectors, etc.) are generally free.
|
|
21
22
|
|
|
22
23
|
## Install
|
|
23
24
|
|
|
25
|
+
Standalone binary (CLI/MCP, no dependencies):
|
|
26
|
+
```bash
|
|
27
|
+
curl -fsSL https://msagent.ai/install.sh | bash
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
npm (SDK + CLI):
|
|
24
31
|
```bash
|
|
25
32
|
npm install @mindstudio-ai/agent
|
|
26
33
|
```
|
|
@@ -81,13 +88,13 @@ The package includes an MCP server exposing all methods as tools. Start by calli
|
|
|
81
88
|
mindstudio mcp
|
|
82
89
|
```
|
|
83
90
|
|
|
84
|
-
MCP client config:
|
|
91
|
+
MCP client config (standalone binary — recommended):
|
|
85
92
|
```json
|
|
86
93
|
{
|
|
87
94
|
"mcpServers": {
|
|
88
95
|
"mindstudio": {
|
|
89
|
-
"command": "
|
|
90
|
-
"args": ["
|
|
96
|
+
"command": "mindstudio",
|
|
97
|
+
"args": ["mcp"],
|
|
91
98
|
"env": { "MINDSTUDIO_API_KEY": "your-api-key" }
|
|
92
99
|
}
|
|
93
100
|
}
|
|
@@ -1520,3 +1527,31 @@ Output:
|
|
|
1520
1527
|
}[]
|
|
1521
1528
|
}
|
|
1522
1529
|
```
|
|
1530
|
+
|
|
1531
|
+
#### `changeName(displayName)`
|
|
1532
|
+
Update the display name of the authenticated agent. Useful for agents to set their own name after connecting.
|
|
1533
|
+
|
|
1534
|
+
```typescript
|
|
1535
|
+
await agent.changeName('My Agent');
|
|
1536
|
+
```
|
|
1537
|
+
|
|
1538
|
+
#### `changeProfilePicture(profilePictureUrl)`
|
|
1539
|
+
Update the profile picture of the authenticated agent. Useful for agents to set their own avatar after connecting.
|
|
1540
|
+
|
|
1541
|
+
```typescript
|
|
1542
|
+
await agent.changeProfilePicture('https://example.com/avatar.png');
|
|
1543
|
+
```
|
|
1544
|
+
|
|
1545
|
+
#### `uploadFile(content, options)`
|
|
1546
|
+
Upload a file to the MindStudio CDN. Gets a signed upload URL, PUTs the file content, and returns the permanent public URL.
|
|
1547
|
+
|
|
1548
|
+
```typescript
|
|
1549
|
+
import { readFileSync } from 'fs';
|
|
1550
|
+
const { url } = await agent.uploadFile(readFileSync('photo.png'), { extension: 'png', type: 'image/png' });
|
|
1551
|
+
```
|
|
1552
|
+
|
|
1553
|
+
- `content`: `Buffer | Uint8Array` — The file content.
|
|
1554
|
+
- `options.extension`: string — File extension without the dot (e.g. `"png"`, `"jpg"`, `"mp4"`).
|
|
1555
|
+
- `options.type`: string (optional) — MIME type (e.g. `"image/png"`). Determines which CDN subdomain is used.
|
|
1556
|
+
|
|
1557
|
+
Output: `{ url: string }` — The permanent public CDN URL.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindstudio-ai/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "TypeScript SDK for MindStudio direct step execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"dev": "tsup --watch",
|
|
26
26
|
"codegen": "tsx scripts/codegen.ts",
|
|
27
27
|
"typecheck": "tsc --noEmit",
|
|
28
|
+
"postinstall": "node dist/postinstall.js || true",
|
|
28
29
|
"prepare": "npm run build",
|
|
29
30
|
"prepublishOnly": "npm run build"
|
|
30
31
|
},
|