@elevasis/sdk 0.4.5 → 0.4.7

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.
Files changed (40) hide show
  1. package/dist/cli.cjs +829 -413
  2. package/dist/index.d.ts +79 -14
  3. package/dist/index.js +17 -12
  4. package/dist/templates.js +747 -0
  5. package/dist/types/templates.d.ts +1 -0
  6. package/dist/types/worker/index.d.ts +6 -0
  7. package/dist/types/worker/platform.d.ts +32 -0
  8. package/dist/worker/index.js +4701 -9
  9. package/package.json +10 -3
  10. package/reference/_index.md +95 -0
  11. package/reference/_navigation.md +104 -0
  12. package/reference/cli/index.mdx +497 -0
  13. package/reference/concepts/index.mdx +203 -0
  14. package/reference/deployment/api.mdx +297 -0
  15. package/reference/deployment/index.mdx +153 -0
  16. package/reference/developer/interaction-guidance.mdx +213 -0
  17. package/reference/framework/agent.mdx +175 -0
  18. package/reference/framework/documentation.mdx +92 -0
  19. package/reference/framework/index.mdx +95 -0
  20. package/reference/framework/memory.mdx +337 -0
  21. package/reference/framework/project-structure.mdx +294 -0
  22. package/reference/getting-started/index.mdx +148 -0
  23. package/reference/index.mdx +113 -0
  24. package/reference/platform-tools/examples.mdx +187 -0
  25. package/reference/platform-tools/index.mdx +182 -0
  26. package/reference/resources/index.mdx +289 -0
  27. package/reference/resources/patterns.mdx +341 -0
  28. package/reference/resources/types.mdx +207 -0
  29. package/reference/roadmap/index.mdx +147 -0
  30. package/reference/runtime/index.mdx +141 -0
  31. package/reference/runtime/limits.mdx +77 -0
  32. package/reference/security/credentials.mdx +141 -0
  33. package/reference/templates/data-enrichment.mdx +162 -0
  34. package/reference/templates/email-sender.mdx +135 -0
  35. package/reference/templates/lead-scorer.mdx +175 -0
  36. package/reference/templates/pdf-generator.mdx +151 -0
  37. package/reference/templates/recurring-job.mdx +189 -0
  38. package/reference/templates/text-classifier.mdx +147 -0
  39. package/reference/templates/web-scraper.mdx +135 -0
  40. package/reference/troubleshooting/common-errors.mdx +210 -0
@@ -0,0 +1,497 @@
1
+ ---
2
+ title: CLI Reference
3
+ description: Full reference for every elevasis CLI command -- scaffold, validate, deploy, execute, and inspect resources
4
+ loadWhen: "Running CLI operations"
5
+ ---
6
+
7
+ The `elevasis` CLI is the primary interface for working with your Elevasis SDK project. Install it as part of `@elevasis/sdk` and use it to scaffold projects, validate resource definitions, deploy to the platform, and inspect execution history.
8
+
9
+ **Installation:**
10
+
11
+ ```bash
12
+ npm install @elevasis/sdk
13
+ ```
14
+
15
+ After installation, the `elevasis` binary is available in your project's `node_modules/.bin/`. Most commands require `ELEVASIS_API_KEY` to be set in your environment or a `.env` file.
16
+
17
+ ---
18
+
19
+ ## elevasis init
20
+
21
+ Scaffold a new Elevasis SDK project in the specified directory.
22
+
23
+ **Synopsis:**
24
+
25
+ ```
26
+ elevasis init [directory]
27
+ ```
28
+
29
+ **Behavior:**
30
+
31
+ - Derives the organization slug from the directory name
32
+ - Checks for file conflicts before writing any files
33
+ - Scaffolds project structure including `src/index.ts`, `elevasis.config.ts`, `package.json`, `tsconfig.json`, and a `CLAUDE.md` with CLI reference and SDK patterns
34
+ - Non-interactive: all values are derived automatically
35
+
36
+ **Flags:**
37
+
38
+ | Flag | Description |
39
+ | ---- | ----------- |
40
+ | (none) | Uses current directory if no argument is provided |
41
+
42
+ **Example:**
43
+
44
+ ```bash
45
+ elevasis init my-project
46
+ ```
47
+
48
+ ```
49
+ Scaffolding my-project/...
50
+
51
+ Created 23 files.
52
+
53
+ Next steps:
54
+ cd my-project
55
+ npm install
56
+ elevasis check
57
+ ```
58
+
59
+ ---
60
+
61
+ ## elevasis check
62
+
63
+ Validate all resource definitions in your project without deploying.
64
+
65
+ **Synopsis:**
66
+
67
+ ```
68
+ elevasis check
69
+ ```
70
+
71
+ **Behavior:**
72
+
73
+ - Imports your `src/index.ts` and runs it through `ResourceRegistry` validation
74
+ - Catches the same errors that the platform catches at deploy time:
75
+ - Duplicate `resourceId` within the organization
76
+ - Invalid model configuration (temperature and token bounds)
77
+ - `ExecutionInterface` form fields not matching `inputSchema`
78
+ - Broken workflow step chains (`next` referencing non-existent steps)
79
+ - Relationship declarations referencing non-existent resources
80
+ - Exits with code 0 on success, code 1 on validation failure
81
+
82
+ **Flags:**
83
+
84
+ | Flag | Description |
85
+ | ---- | ----------- |
86
+ | `--api-url <url>` | Override the API base URL |
87
+
88
+ **Example output (success):**
89
+
90
+ ```
91
+ $ elevasis check
92
+
93
+ Validating... done (4 resources, 0 errors)
94
+ ```
95
+
96
+ **Example output (failure):**
97
+
98
+ ```
99
+ $ elevasis check
100
+
101
+ Validating...
102
+ ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
103
+ ERROR Workflow step 'send-email' references non-existent next step 'notify'
104
+
105
+ 2 errors.
106
+ ```
107
+
108
+ ---
109
+
110
+ ## elevasis deploy
111
+
112
+ Bundle your project with esbuild and deploy it to the Elevasis platform.
113
+
114
+ **Synopsis:**
115
+
116
+ ```
117
+ elevasis deploy
118
+ ```
119
+
120
+ **Behavior:**
121
+
122
+ - Authenticates with `ELEVASIS_API_KEY` and resolves your organization name
123
+ - Runs the same `ResourceRegistry` validation as `elevasis check`
124
+ - Bundles your `src/index.ts` and all dependencies into a single self-contained JS file (`dist/bundle.js`, approximately 50-200 KB)
125
+ - Uploads the bundle plus resource metadata to `POST /api/external/deploy`
126
+ - Streams deploy status and prints the result
127
+ - Resources are live immediately after a successful deploy
128
+
129
+ **Flags:**
130
+
131
+ | Flag | Description |
132
+ | ---- | ----------- |
133
+ | `--api-url <url>` | Override the API base URL (default: production) |
134
+
135
+ **Environment variables:**
136
+
137
+ | Variable | Description |
138
+ | -------- | ----------- |
139
+ | `ELEVASIS_API_KEY` | Required. Your `sk_...` API key |
140
+ | `ELEVASIS_API_URL` | Optional. Override the API base URL |
141
+
142
+ **Example output (success):**
143
+
144
+ ```
145
+ $ elevasis deploy
146
+
147
+ Authenticating... done (acme-corp)
148
+ Validating... done (4 resources, 0 errors)
149
+ Bundling... done (142 KB)
150
+ Uploading... done
151
+
152
+ Deployed! 4 resources live.
153
+ Deployment: deploy_abc123
154
+ ```
155
+
156
+ **Example output (validation failure):**
157
+
158
+ ```
159
+ $ elevasis deploy
160
+
161
+ Authenticating... done (acme-corp)
162
+ Validating...
163
+ ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
164
+ ERROR Workflow step 'send-email' references non-existent next step 'notify'
165
+
166
+ 2 errors. Deploy aborted.
167
+ ```
168
+
169
+ ---
170
+
171
+ ## elevasis exec
172
+
173
+ Execute a deployed resource by ID.
174
+
175
+ **Synopsis:**
176
+
177
+ ```
178
+ elevasis exec <resource> --input '{...}'
179
+ ```
180
+
181
+ **Behavior:**
182
+
183
+ - Executes the named resource synchronously by default and streams the result
184
+ - Use `--async` to return an `executionId` immediately and poll for completion
185
+ - `--input` accepts a JSON string matching the resource's `inputSchema`
186
+ - Organization is derived from your API key -- no org prefix needed
187
+
188
+ **Flags:**
189
+
190
+ | Flag | Description |
191
+ | ---- | ----------- |
192
+ | `--input <json>` | JSON input matching the resource's input schema |
193
+ | `--async` | Execute asynchronously, return execution ID immediately |
194
+ | `--json` | Output raw JSON instead of formatted display |
195
+ | `--api-url <url>` | Override the API base URL |
196
+
197
+ **Example:**
198
+
199
+ ```bash
200
+ elevasis exec onboard-client --input '{"clientName": "Jane", "email": "jane@example.com"}'
201
+ ```
202
+
203
+ ```
204
+ Executing onboard-client...
205
+
206
+ Status: completed
207
+ Duration: 1.4s
208
+
209
+ Output:
210
+ {
211
+ "success": true,
212
+ "clientId": "client_1708521600000",
213
+ "welcomeEmailSent": true
214
+ }
215
+ ```
216
+
217
+ **Async example:**
218
+
219
+ ```bash
220
+ elevasis exec onboard-client --input '{"clientName": "Jane"}' --async
221
+ ```
222
+
223
+ ```
224
+ Execution started: exec_550e8400
225
+ Poll with: elevasis execution onboard-client exec_550e8400
226
+ ```
227
+
228
+ ---
229
+
230
+ ## elevasis resources
231
+
232
+ List all deployed resources for your organization.
233
+
234
+ **Synopsis:**
235
+
236
+ ```
237
+ elevasis resources
238
+ ```
239
+
240
+ **Behavior:**
241
+
242
+ - Lists all resources registered to your organization on the platform
243
+ - In production, only `status: 'prod'` resources are shown
244
+ - Displays resource ID, type, name, and status
245
+
246
+ **Flags:**
247
+
248
+ | Flag | Description |
249
+ | ---- | ----------- |
250
+ | `--json` | Output raw JSON |
251
+ | `--api-url <url>` | Override the API base URL |
252
+
253
+ **Example output:**
254
+
255
+ ```
256
+ $ elevasis resources
257
+
258
+ onboard-client workflow Onboard Client prod
259
+ send-report workflow Send Weekly Report prod
260
+ email-assistant agent Email Assistant prod
261
+ support-bot agent Support Bot dev
262
+ ```
263
+
264
+ ---
265
+
266
+ ## elevasis executions
267
+
268
+ View execution history for a resource.
269
+
270
+ **Synopsis:**
271
+
272
+ ```
273
+ elevasis executions [resource]
274
+ ```
275
+
276
+ **Behavior:**
277
+
278
+ - Lists recent executions for the specified resource
279
+ - If `resource` is omitted, lists executions across all resources
280
+ - Supports filtering by status and limiting result count
281
+
282
+ **Flags:**
283
+
284
+ | Flag | Description |
285
+ | ---- | ----------- |
286
+ | `--limit <n>` | Maximum number of executions to return (default: 20) |
287
+ | `--status <status>` | Filter by status: `running`, `completed`, `failed`, `cancelled` |
288
+ | `--json` | Output raw JSON |
289
+ | `--api-url <url>` | Override the API base URL |
290
+
291
+ **Example:**
292
+
293
+ ```bash
294
+ elevasis executions onboard-client --limit 5
295
+ ```
296
+
297
+ ```
298
+ exec_abc001 completed 2026-02-25 14:32:01 1.2s
299
+ exec_abc002 completed 2026-02-25 13:18:44 0.9s
300
+ exec_abc003 failed 2026-02-25 12:05:22 0.3s
301
+ exec_abc004 completed 2026-02-24 17:51:09 1.8s
302
+ exec_abc005 completed 2026-02-24 16:30:55 1.1s
303
+ ```
304
+
305
+ ---
306
+
307
+ ## elevasis execution
308
+
309
+ View full detail for a single execution.
310
+
311
+ **Synopsis:**
312
+
313
+ ```
314
+ elevasis execution <resource> <id>
315
+ ```
316
+
317
+ **Behavior:**
318
+
319
+ - Shows the complete execution record: input, output, logs, duration, and error (if any)
320
+ - Use `--json` to get the raw JSON response for programmatic use
321
+
322
+ **Flags:**
323
+
324
+ | Flag | Description |
325
+ | ---- | ----------- |
326
+ | `--json` | Output raw JSON |
327
+ | `--api-url <url>` | Override the API base URL |
328
+
329
+ **Example:**
330
+
331
+ ```bash
332
+ elevasis execution onboard-client exec_abc001
333
+ ```
334
+
335
+ ```
336
+ Resource: onboard-client
337
+ Status: completed
338
+ Started: 2026-02-25 14:32:01
339
+ Duration: 1.2s
340
+
341
+ Input:
342
+ {
343
+ "clientName": "Jane",
344
+ "email": "jane@example.com"
345
+ }
346
+
347
+ Output:
348
+ {
349
+ "success": true,
350
+ "clientId": "client_1708521600000",
351
+ "welcomeEmailSent": true
352
+ }
353
+
354
+ Logs:
355
+ [14:32:01.123] Starting onboard-client workflow
356
+ [14:32:01.456] Created client record
357
+ [14:32:01.891] Welcome email sent to jane@example.com
358
+ ```
359
+
360
+ ---
361
+
362
+ ## elevasis deployments
363
+
364
+ List all deployments for your organization.
365
+
366
+ **Synopsis:**
367
+
368
+ ```
369
+ elevasis deployments
370
+ ```
371
+
372
+ **Behavior:**
373
+
374
+ - Shows deployment history with status, timestamp, and resource count
375
+ - Active deployment is marked; previous deployments show as `stopped`
376
+
377
+ **Flags:**
378
+
379
+ | Flag | Description |
380
+ | ---- | ----------- |
381
+ | `--json` | Output raw JSON |
382
+ | `--api-url <url>` | Override the API base URL |
383
+
384
+ **Example output:**
385
+
386
+ ```
387
+ $ elevasis deployments
388
+
389
+ deploy_abc123 active 2026-02-25 14:00:00 4 resources
390
+ deploy_abc122 stopped 2026-02-24 09:30:00 3 resources
391
+ deploy_abc121 stopped 2026-02-23 11:15:00 3 resources
392
+ ```
393
+
394
+ ---
395
+
396
+ ## elevasis describe
397
+
398
+ Show the definition of a deployed resource.
399
+
400
+ **Synopsis:**
401
+
402
+ ```
403
+ elevasis describe <resource>
404
+ ```
405
+
406
+ **Behavior:**
407
+
408
+ - Displays resource metadata: name, type, description, status, and domains
409
+ - Shows the full `inputSchema` and `outputSchema` as JSON
410
+ - Type is color-coded: yellow for workflows, magenta for agents
411
+
412
+ **Flags:**
413
+
414
+ | Flag | Description |
415
+ | ---- | ----------- |
416
+ | `--json` | Output raw JSON response |
417
+ | `--api-url <url>` | Override the API base URL |
418
+
419
+ **Example:**
420
+
421
+ ```bash
422
+ elevasis describe onboard-client
423
+ ```
424
+
425
+ ```
426
+ onboard-client [workflow]
427
+
428
+ Name: Onboard Client
429
+ Description: Creates a client record and sends a welcome email
430
+ Status: prod
431
+ Domains: crm, email
432
+
433
+ Input Schema:
434
+ {
435
+ "type": "object",
436
+ "properties": {
437
+ "clientName": { "type": "string" },
438
+ "email": { "type": "string", "format": "email" }
439
+ },
440
+ "required": ["clientName", "email"]
441
+ }
442
+ ```
443
+
444
+ ---
445
+
446
+ ## elevasis env
447
+
448
+ Manage environment variables for your project.
449
+
450
+ **Synopsis:**
451
+
452
+ ```
453
+ elevasis env list
454
+ elevasis env set <key> <value>
455
+ elevasis env remove <key>
456
+ ```
457
+
458
+ **Behavior:**
459
+
460
+ - `list` -- display all environment variables configured for the project
461
+ - `set` -- add or update an environment variable
462
+ - `remove` -- delete an environment variable
463
+
464
+ **Flags:**
465
+
466
+ | Flag | Description |
467
+ | ---- | ----------- |
468
+ | `--api-url <url>` | Override the API base URL |
469
+
470
+ **Examples:**
471
+
472
+ ```bash
473
+ elevasis env list
474
+ elevasis env set OPENAI_API_KEY sk-proj-***
475
+ elevasis env remove OPENAI_API_KEY
476
+ ```
477
+
478
+ ---
479
+
480
+ ## Global Flags
481
+
482
+ These flags are accepted by all commands:
483
+
484
+ | Flag | Description |
485
+ | ---- | ----------- |
486
+ | `--api-url <url>` | Override the API base URL. Priority: flag > `ELEVASIS_API_URL` env var > `NODE_ENV`-based default |
487
+ | `--json` | Output raw JSON (available on most commands) |
488
+
489
+ **API base URL resolution:**
490
+
491
+ - Production (default): `https://api.elevasis.io`
492
+ - Development (`NODE_ENV=development`): `http://localhost:<port>`
493
+ - Override: set `ELEVASIS_API_URL` or pass `--api-url`
494
+
495
+ ---
496
+
497
+ **Last Updated:** 2026-02-25
@@ -0,0 +1,203 @@
1
+ ---
2
+ title: Concepts Reference
3
+ description: Plain-English explanations of Elevasis SDK concepts -- glossary, workflow analogies, Zod schemas, execution model, platform tools, common errors, and design decisions
4
+ loadWhen: "User asks what is or needs conceptual grounding"
5
+ ---
6
+
7
+ This page covers core Elevasis concepts in plain English. It is the teaching vocabulary for the agent when helping you build workflows, and a reference you can return to whenever a term or behavior is unclear.
8
+
9
+ ## Glossary
10
+
11
+ | Term | Definition |
12
+ | --- | --- |
13
+ | Workflow | A series of named steps that run one after another. Each step does one job. The workflow receives input data and produces output data. |
14
+ | Agent | An autonomous AI resource with access to platform tools. Agents can make decisions and call tools on their own. (Execution deferred -- see Known Limitations in the SDK overview.) |
15
+ | Resource | Anything you deploy to the platform -- a workflow or an agent. Each resource has a unique ID. |
16
+ | Step | One job inside a workflow. A step receives data, processes it, and passes data to the next step. |
17
+ | Schema | A description of what your data looks like. Schemas validate that input and output data has the right shape -- the right fields with the right types. |
18
+ | Credential | A saved API key or login for an external service (Gmail, Attio, Stripe). Stored securely on the platform, never in your code. |
19
+ | Execution | One run of a resource. Each time someone triggers your workflow, that is one execution. |
20
+ | Deployment | The act of uploading your code to the platform. After deploying, your resources are live and can be executed. |
21
+ | Platform Tool | A pre-built integration the platform provides. You call platform tools from your workflow steps using `platform.call()`. |
22
+ | Organization | Your team or company on the Elevasis platform. Resources, credentials, and executions belong to an organization. |
23
+ | Handler | The function inside a step that does the actual work. It receives input data and returns output data. |
24
+ | Entry Point | The first step that runs when a workflow is executed. Every workflow must have one. |
25
+ | Resource ID | A unique lowercase name for your resource (e.g., `lead-scorer`, `send-welcome-email`). Must be unique within your organization. |
26
+ | Workspace | Your Elevasis project directory. Contains resources (workflows and agents), documentation, and optionally a database connection and custom apps. Created by `elevasis init`. |
27
+ | Data Table | A table in your database (e.g., Supabase) that stores structured data your workflows can read and write. Defined in `data/schema.ts` as documentation for the agent. |
28
+
29
+ ---
30
+
31
+ ## What is a Workflow?
32
+
33
+ A workflow is a piece of automation that runs on the Elevasis platform. You define the steps in TypeScript; the platform handles running them, logging results, and retrying on failure.
34
+
35
+ ### Two Analogies
36
+
37
+ **Recipe analogy:** A recipe has ingredients (input), instructions (steps), and a finished dish (output). Each instruction is one step. You follow them in order. If a step fails (you burn the sauce), the recipe stops.
38
+
39
+ **Assembly line analogy:** Raw material goes in one end (input). Each station does one job (step). The finished product comes out the other end (output).
40
+
41
+ ### When to Use a Workflow
42
+
43
+ - Automating a repeatable task with defined input and output
44
+ - Chaining multiple actions together (fetch data, process it, send an email)
45
+ - When you need the platform to handle execution, retries, and logging
46
+
47
+ ### When NOT to Use a Workflow
48
+
49
+ - One-off tasks you will only do once
50
+ - Tasks that need constant human judgment at every step
51
+
52
+ ---
53
+
54
+ ## Understanding Schemas (Zod)
55
+
56
+ ### What Schemas Do
57
+
58
+ Schemas describe and validate the shape of data your workflow expects and produces. If someone sends the wrong data, the platform rejects it before your code runs. This prevents confusing errors deep inside your handler.
59
+
60
+ The Elevasis SDK uses [Zod](https://zod.dev) for schema definition. Zod is a TypeScript-first validation library. Every workflow has an `inputSchema` and an `outputSchema`.
61
+
62
+ ### Common Zod Types
63
+
64
+ | Zod Type | What It Means | Example |
65
+ | --- | --- | --- |
66
+ | `z.string()` | Text | `"hello"`, `"user@email.com"` |
67
+ | `z.number()` | A number | `42`, `3.14` |
68
+ | `z.boolean()` | True or false | `true`, `false` |
69
+ | `z.array(z.string())` | A list of text values | `["a", "b", "c"]` |
70
+ | `z.object({ name: z.string() })` | A group of named fields | `{ "name": "Jane" }` |
71
+ | `z.string().optional()` | Text that might be missing | `"hello"` or not provided |
72
+ | `z.enum(['a', 'b', 'c'])` | One of a specific set of values | `"a"` |
73
+ | `z.string().email()` | Text that must be a valid email | `"user@example.com"` |
74
+
75
+ ### Why `z.infer` Exists
76
+
77
+ `z.infer` creates a TypeScript type from a schema so the type system can check your code. You define the schema once and get both runtime validation and compile-time checking. Without it, you would have to define the same shape twice -- once as a Zod schema and once as a TypeScript type.
78
+
79
+ ```ts
80
+ const myInput = z.object({ name: z.string(), age: z.number() });
81
+ type MyInput = z.infer<typeof myInput>;
82
+ // MyInput is now: { name: string; age: number }
83
+ ```
84
+
85
+ ### Common Schema Mistakes
86
+
87
+ - Forgetting `.optional()` on fields that might be missing -- the platform will reject valid input that omits those fields
88
+ - Returning data from a handler that does not match the output schema -- causes `outputSchema validation failed`
89
+ - Misspelling field names -- the schema says `companyName`, but the handler returns `company_name`
90
+
91
+ ---
92
+
93
+ ## The Execution Model
94
+
95
+ ### What Happens When You Run a Workflow
96
+
97
+ 1. A request arrives at the Elevasis platform (someone runs `elevasis exec` or a schedule triggers)
98
+ 2. The platform creates a temporary server just for this execution
99
+ 3. Your code runs on that server
100
+ 4. The result is sent back
101
+ 5. The temporary server is deleted
102
+
103
+ ### Practical Implications
104
+
105
+ | What You Might Expect | What Actually Happens | Why |
106
+ | --- | --- | --- |
107
+ | Files I create persist | Files disappear after execution | The server is temporary |
108
+ | I can see logs in real-time | Logs appear after execution completes | No streaming from workers |
109
+ | My code runs on my computer | Your code runs on Elevasis servers | That is what "deploy" means |
110
+ | I can use unlimited memory | 256MB memory limit per execution | Prevents runaway processes |
111
+ | Executions share state | Each execution is independent | No shared memory between runs |
112
+ | I can call external APIs | Yes, outbound network is unrestricted | Workers have internet access |
113
+
114
+ ### What "completed" vs "failed" Means
115
+
116
+ - **completed** -- Your code ran successfully and returned output
117
+ - **failed** -- Something went wrong: your code threw an error, timed out (300s default), or ran out of memory
118
+
119
+ ---
120
+
121
+ ## Platform Tools Overview
122
+
123
+ Platform tools are pre-built integrations the platform provides. You call them from inside workflow steps using `platform.call()` without managing API keys in your code.
124
+
125
+ ### Tool Categories
126
+
127
+ | Category | Tools | Example Use |
128
+ | --- | --- | --- |
129
+ | Communication | Gmail, Resend, email | Send transactional emails, notifications |
130
+ | CRM | Attio (11 methods) | Create leads, update records, search contacts |
131
+ | Documents | PDF, Google Sheets, Notion | Generate invoices, read spreadsheets, update pages |
132
+ | AI | LLM (GPT, Gemini, Claude) | Classify text, extract data, generate content |
133
+ | Storage | Dropbox, platform storage | Upload files, create signed URLs |
134
+ | Scheduling | Scheduler | Run workflows on a schedule or after a delay |
135
+ | Approvals | Approval gates | Pause workflow until a human approves |
136
+ | Verification | Mailso | Verify email addresses |
137
+ | E-Signatures | SignatureAPI | Create and manage document envelopes |
138
+ | Marketing | Instantly | Send email campaigns |
139
+ | Payments | Stripe | Create payment links, checkout sessions |
140
+ | Automation | Apify | Run web scraping actors |
141
+
142
+ ### How Credentials Work
143
+
144
+ 1. Create a credential in the Elevasis platform (API key, OAuth token, etc.) via the command center UI
145
+ 2. Give it a name (e.g., `my-gmail`, `production-attio`)
146
+ 3. In your code, pass that name: `platform.call({ credential: 'my-gmail', ... })`
147
+ 4. The platform injects the actual API key at runtime -- it never appears in your code
148
+
149
+ ### What Happens When a Credential Name is Wrong
150
+
151
+ You will see a `PlatformToolError` with the message "credential not found". Check for typos -- credential names are case-sensitive.
152
+
153
+ ---
154
+
155
+ ## Common Errors and Fixes
156
+
157
+ | Error | What It Means | How to Fix |
158
+ | --- | --- | --- |
159
+ | `ELEVASIS_API_KEY not set` | Your `.env` file is missing the API key | Add `ELEVASIS_API_KEY=sk_...` to `.env` |
160
+ | `Schema validation failed` | The input data does not match your Zod schema | Compare the error's field names to your schema definition. Check types (string vs number) and required vs optional fields. |
161
+ | `Cannot find module '@elevasis/sdk'` | Dependencies are not installed | Run `pnpm install` |
162
+ | `PlatformToolError: credential not found` | The credential name in your code does not match any stored credential | Check spelling and case. Verify the credential name in the command center UI. |
163
+ | `Execution timeout (300s)` | Your workflow took too long | Optimize your handler or break it into smaller steps. Check for infinite loops. |
164
+ | `Cannot find name 'z'` | Missing Zod import | Add `import { z } from 'zod'` at the top of your file |
165
+ | `Type 'X' is not assignable to type 'Y'` | Your handler returns data that does not match the output schema | Compare what your handler returns to what `outputSchema` expects. Field names and types must match exactly. |
166
+ | `outputSchema validation failed` | Handler returned data but it does not match the output schema | Check field names, types, and required fields against your output schema. |
167
+ | `Duplicate resource ID` | Two resources have the same `resourceId` | Each resource needs a unique ID within your organization. Rename one. |
168
+ | `NODE_ENV=development` in .env | SDK is trying to connect to a local API server | Remove `NODE_ENV` from your `.env` file. The SDK connects to the hosted platform by default. |
169
+
170
+ ---
171
+
172
+ ## Design Decisions Guide
173
+
174
+ ### Single-Step vs Multi-Step
175
+
176
+ Use a single step when the workflow does one thing -- validate an email, format a message, call one API.
177
+
178
+ Use multiple steps when you have distinct phases (fetch data, process it, send a notification) or when you want separate error handling per phase. Each step failure is logged independently, making it easier to identify where something went wrong.
179
+
180
+ ### dev vs production Status
181
+
182
+ - **dev** -- Resource is visible in the dashboard and can be triggered manually, but will not auto-trigger from schedules or webhooks. Use while building and testing.
183
+ - **production** -- Resource is fully live. All trigger sources work. Use when you are confident it works correctly.
184
+
185
+ You can switch between them by changing `status` in the workflow config and redeploying.
186
+
187
+ ### When to Use Conditional Routing
188
+
189
+ Use `StepType.CONDITIONAL` when different inputs should follow different processing paths.
190
+
191
+ Example: score >= 80 goes to the approve path, score >= 50 goes to the review path, everything else goes to the reject path. Each path can have its own steps and logic.
192
+
193
+ Always include a `defaultTarget` fallback for inputs that do not match any condition. Without a fallback, an unmatched execution will fail.
194
+
195
+ ### When to Use Platform Tools vs Custom Code
196
+
197
+ Use platform tools when the integration exists in the tool catalog -- they handle auth, retries, and error normalization for you.
198
+
199
+ Write custom code (e.g., using `fetch` directly) only when you need a service or API method that is not in the catalog, or when you need fine-grained control over the HTTP request.
200
+
201
+ ---
202
+
203
+ **Last Updated:** 2026-02-26