Skip to content

Commit 46ffc49

Browse files
authored
v0.6.44: streamdown, mothership intelligence, excel extension
2 parents 3a1b1a8 + ff71a07 commit 46ffc49

File tree

104 files changed

+1495
-814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1495
-814
lines changed

apps/docs/content/docs/en/execution/api.mdx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
66
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
77
import { Video } from '@/components/ui/video'
88

9-
Sim provides a comprehensive external API for querying workflow execution logs and setting up webhooks for real-time notifications when workflows complete.
9+
Sim provides a comprehensive external API for querying workflow run logs and setting up webhooks for real-time notifications when workflows complete.
1010

1111
## Authentication
1212

@@ -21,7 +21,7 @@ You can generate API keys from the Sim platform and navigate to **Settings**, th
2121

2222
## Logs API
2323

24-
All API responses include information about your workflow execution limits and usage:
24+
All API responses include information about your workflow run limits and usage:
2525

2626
```json
2727
"limits": {
@@ -48,11 +48,11 @@ All API responses include information about your workflow execution limits and u
4848
}
4949
```
5050

51-
**Note:** Rate limits use a token bucket algorithm. `remaining` can exceed `requestsPerMinute` up to `maxBurst` when you haven't used your full allowance recently, allowing for burst traffic. The rate limits in the response body are for workflow executions. The rate limits for calling this API endpoint are in the response headers (`X-RateLimit-*`).
51+
**Note:** Rate limits use a token bucket algorithm. `remaining` can exceed `requestsPerMinute` up to `maxBurst` when you haven't used your full allowance recently, allowing for burst traffic. The rate limits in the response body are for workflow runs. The rate limits for calling this API endpoint are in the response headers (`X-RateLimit-*`).
5252

5353
### Query Logs
5454

55-
Query workflow execution logs with extensive filtering options.
55+
Query workflow run logs with extensive filtering options.
5656

5757
<Tabs items={['Request', 'Response']}>
5858
<Tab value="Request">
@@ -70,11 +70,11 @@ Query workflow execution logs with extensive filtering options.
7070
- `level` - Filter by level: `info`, `error`
7171
- `startDate` - ISO timestamp for date range start
7272
- `endDate` - ISO timestamp for date range end
73-
- `executionId` - Exact execution ID match
74-
- `minDurationMs` - Minimum execution duration in milliseconds
75-
- `maxDurationMs` - Maximum execution duration in milliseconds
76-
- `minCost` - Minimum execution cost
77-
- `maxCost` - Maximum execution cost
73+
- `executionId` - Exact run ID match
74+
- `minDurationMs` - Minimum run duration in milliseconds
75+
- `maxDurationMs` - Maximum run duration in milliseconds
76+
- `minCost` - Minimum run cost
77+
- `maxCost` - Maximum run cost
7878
- `model` - Filter by AI model used
7979

8080
**Pagination:**
@@ -213,9 +213,9 @@ Retrieve detailed information about a specific log entry.
213213
</Tab>
214214
</Tabs>
215215

216-
### Get Execution Details
216+
### Get Run Details
217217

218-
Retrieve execution details including the workflow state snapshot.
218+
Retrieve run details including the workflow state snapshot.
219219

220220
<Tabs items={['Request', 'Response']}>
221221
<Tab value="Request">
@@ -248,15 +248,15 @@ Retrieve execution details including the workflow state snapshot.
248248

249249
## Notifications
250250

251-
Get real-time notifications when workflow executions complete via webhook, email, or Slack. Notifications are configured at the workspace level from the Logs page.
251+
Get real-time notifications when workflow runs complete via webhook, email, or Slack. Notifications are configured at the workspace level from the Logs page.
252252

253253
### Configuration
254254

255255
Configure notifications from the Logs page by clicking the menu button and selecting "Configure Notifications".
256256

257257
**Notification Channels:**
258258
- **Webhook**: Send HTTP POST requests to your endpoint
259-
- **Email**: Receive email notifications with execution details
259+
- **Email**: Receive email notifications with run details
260260
- **Slack**: Post messages to a Slack channel
261261

262262
**Workflow Selection:**
@@ -269,38 +269,38 @@ Configure notifications from the Logs page by clicking the menu button and selec
269269

270270
**Optional Data:**
271271
- `includeFinalOutput`: Include the workflow's final output
272-
- `includeTraceSpans`: Include detailed execution trace spans
272+
- `includeTraceSpans`: Include detailed trace spans
273273
- `includeRateLimits`: Include rate limit information (sync/async limits and remaining)
274274
- `includeUsageData`: Include billing period usage and limits
275275

276276
### Alert Rules
277277

278-
Instead of receiving notifications for every execution, configure alert rules to be notified only when issues are detected:
278+
Instead of receiving notifications for every run, configure alert rules to be notified only when issues are detected:
279279

280280
**Consecutive Failures**
281-
- Alert after X consecutive failed executions (e.g., 3 failures in a row)
282-
- Resets when an execution succeeds
281+
- Alert after X consecutive failed runs (e.g., 3 failures in a row)
282+
- Resets when a run succeeds
283283

284284
**Failure Rate**
285285
- Alert when failure rate exceeds X% over the last Y hours
286-
- Requires minimum 5 executions in the window
286+
- Requires minimum 5 runs in the window
287287
- Only triggers after the full time window has elapsed
288288

289289
**Latency Threshold**
290-
- Alert when any execution takes longer than X seconds
290+
- Alert when any run takes longer than X seconds
291291
- Useful for catching slow or hanging workflows
292292

293293
**Latency Spike**
294-
- Alert when execution is X% slower than the average
294+
- Alert when a run is X% slower than the average
295295
- Compares against the average duration over the configured time window
296-
- Requires minimum 5 executions to establish baseline
296+
- Requires minimum 5 runs to establish baseline
297297

298298
**Cost Threshold**
299-
- Alert when a single execution costs more than $X
299+
- Alert when a single run costs more than $X
300300
- Useful for catching expensive LLM calls
301301

302302
**No Activity**
303-
- Alert when no executions occur within X hours
303+
- Alert when no runs occur within X hours
304304
- Useful for monitoring scheduled workflows that should run regularly
305305

306306
**Error Count**
@@ -317,7 +317,7 @@ For webhooks, additional options are available:
317317

318318
### Payload Structure
319319

320-
When a workflow execution completes, Sim sends the following payload (via webhook POST, email, or Slack):
320+
When a workflow run completes, Sim sends the following payload (via webhook POST, email, or Slack):
321321

322322
```json
323323
{
@@ -456,7 +456,7 @@ Failed webhook deliveries are retried with exponential backoff and jitter:
456456
- Deliveries timeout after 30 seconds
457457

458458
<Callout type="info">
459-
Webhook deliveries are processed asynchronously and don't affect workflow execution performance.
459+
Webhook deliveries are processed asynchronously and don't affect workflow run performance.
460460
</Callout>
461461

462462
## Best Practices
@@ -596,11 +596,11 @@ app.listen(3000, () => {
596596
import { FAQ } from '@/components/ui/faq'
597597

598598
<FAQ items={[
599-
{ question: "How do I trigger async execution via the API?", answer: "Set the X-Execution-Mode header to 'async' on your POST request to /api/workflows/{id}/execute. The API returns a 202 response with a jobId, executionId, and a statusUrl you can poll to check when the job completes. Async mode does not support draft state, workflow overrides, or selective output options." },
599+
{ question: "How do I trigger an async run via the API?", answer: "Set the X-Execution-Mode header to 'async' on your POST request to /api/workflows/{id}/execute. The API returns a 202 response with a jobId, executionId, and a statusUrl you can poll to check when the job completes. Async mode does not support draft state, workflow overrides, or selective output options." },
600600
{ question: "What authentication methods does the API support?", answer: "The API supports two authentication methods: API keys passed in the x-api-key header, and session-based authentication for logged-in users. API keys can be generated from Settings > Sim Keys in the platform. Workflows with public API access enabled can also be called without authentication." },
601601
{ question: "How does the webhook retry policy work?", answer: "Failed webhook deliveries are retried up to 5 times with exponential backoff: 5 seconds, 15 seconds, 1 minute, 3 minutes, and 10 minutes, plus up to 10% jitter. Only HTTP 5xx and 429 responses trigger retries. Each delivery times out after 30 seconds." },
602-
{ question: "What rate limits apply to the Logs API?", answer: "Rate limits use a token bucket algorithm. Free plans get 30 requests/minute with 60 burst capacity, Pro gets 100/200, Team gets 200/400, and Enterprise gets 500/1000. These are separate from workflow execution rate limits, which are shown in the response body." },
602+
{ question: "What rate limits apply to the Logs API?", answer: "Rate limits use a token bucket algorithm. Free plans get 30 requests/minute with 60 burst capacity, Pro gets 100/200, Team gets 200/400, and Enterprise gets 500/1000. These are separate from workflow run rate limits, which are shown in the response body." },
603603
{ question: "How do I verify that a webhook is from Sim?", answer: "Configure a webhook secret when setting up notifications. Sim signs each delivery with HMAC-SHA256 using the format 't={timestamp},v1={signature}' in the sim-signature header. Compute the HMAC of '{timestamp}.{body}' with your secret and compare it to the signature value." },
604604
{ question: "What alert rules are available for notifications?", answer: "You can configure alerts for consecutive failures, failure rate thresholds, latency thresholds, latency spikes (percentage above average), cost thresholds, no-activity periods, and error counts within a time window. All alert types include a 1-hour cooldown to prevent notification spam." },
605-
{ question: "Can I filter which executions trigger notifications?", answer: "Yes. You can filter notifications by specific workflows (or select all), log level (info or error), and trigger type (api, webhook, schedule, manual, chat). You can also choose whether to include final output, trace spans, rate limits, and usage data in the notification payload." },
605+
{ question: "Can I filter which runs trigger notifications?", answer: "Yes. You can filter notifications by specific workflows (or select all), log level (info or error), and trigger type (api, webhook, schedule, manual, chat). You can also choose whether to include final output, trace spans, rate limits, and usage data in the notification payload." },
606606
]} />

apps/docs/content/docs/en/execution/basics.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import { Callout } from 'fumadocs-ui/components/callout'
66
import { Card, Cards } from 'fumadocs-ui/components/card'
77
import { Image } from '@/components/ui/image'
88

9-
Understanding how workflows execute in Sim is key to building efficient and reliable automations. The execution engine automatically handles dependencies, concurrency, and data flow to ensure your workflows run smoothly and predictably.
9+
Understanding how workflows run in Sim is key to building efficient and reliable automations. The execution engine automatically handles dependencies, concurrency, and data flow to ensure your workflows run smoothly and predictably.
1010

1111
## How Workflows Execute
1212

1313
Sim's execution engine processes workflows intelligently by analyzing dependencies and running blocks in the most efficient order possible.
1414

1515
### Concurrent Execution by Default
1616

17-
Multiple blocks run concurrently when they don't depend on each other. This parallel execution dramatically improves performance without requiring manual configuration.
17+
Multiple blocks run concurrently when they don't depend on each other. This dramatically improves performance without requiring manual configuration.
1818

1919
<Image
2020
src="/static/execution/concurrency.png"
@@ -49,15 +49,15 @@ Workflows can branch in multiple directions using routing blocks. The execution
4949
height={500}
5050
/>
5151

52-
This workflow demonstrates how execution can follow different paths based on conditions or AI decisions, with each path executing independently.
52+
This workflow demonstrates how a run can follow different paths based on conditions or AI decisions, with each path running independently.
5353

5454
## Block Types
5555

5656
Sim provides different types of blocks that serve specific purposes in your workflows:
5757

5858
<Cards>
5959
<Card title="Triggers" href="/triggers">
60-
**Starter blocks** initiate workflows and **Webhook blocks** respond to external events. Every workflow needs a trigger to begin execution.
60+
**Starter blocks** initiate workflows and **Webhook blocks** respond to external events. Every workflow needs a trigger to begin a run.
6161
</Card>
6262

6363
<Card title="Processing Blocks" href="/blocks">
@@ -73,37 +73,37 @@ Sim provides different types of blocks that serve specific purposes in your work
7373
</Card>
7474
</Cards>
7575

76-
All blocks execute automatically based on their dependencies - you don't need to manually manage execution order or timing.
76+
All blocks run automatically based on their dependencies - you don't need to manually manage run order or timing.
7777

78-
## Execution Monitoring
78+
## Run Monitoring
7979

80-
When workflows run, Sim provides real-time visibility into the execution process:
80+
When workflows run, Sim provides real-time visibility into the process:
8181

82-
- **Live Block States**: See which blocks are currently executing, completed, or failed
83-
- **Execution Logs**: Detailed logs appear in real-time showing inputs, outputs, and any errors
84-
- **Performance Metrics**: Track execution time and costs for each block
85-
- **Path Visualization**: Understand which execution paths were taken through your workflow
82+
- **Live Block States**: See which blocks are currently running, completed, or failed
83+
- **Run Logs**: Detailed logs appear in real-time showing inputs, outputs, and any errors
84+
- **Performance Metrics**: Track run time and costs for each block
85+
- **Path Visualization**: Understand which paths were taken through your workflow
8686

8787
<Callout type="info">
88-
All execution details are captured and available for review even after workflows complete, helping with debugging and optimization.
88+
All run details are captured and available for review even after workflows complete, helping with debugging and optimization.
8989
</Callout>
9090

91-
## Key Execution Principles
91+
## Key Principles
9292

9393
Understanding these core principles will help you build better workflows:
9494

9595
1. **Dependency-Based Execution**: Blocks only run when all their dependencies have completed
9696
2. **Automatic Parallelization**: Independent blocks run concurrently without configuration
9797
3. **Smart Data Flow**: Outputs flow automatically to connected blocks
98-
4. **Error Handling**: Failed blocks stop their execution path but don't affect independent paths
99-
5. **Response Blocks as Exit Points**: When a Response block executes, the entire workflow stops and the API response is sent immediately. Multiple Response blocks can exist on different branches — the first one to execute wins
100-
6. **State Persistence**: All block outputs and execution details are preserved for debugging
101-
7. **Cycle Protection**: Workflows that call other workflows (via Workflow blocks, MCP tools, or API blocks) are tracked with a call chain. If the chain exceeds 25 hops, execution is stopped to prevent infinite loops
98+
4. **Error Handling**: Failed blocks stop their run path but don't affect independent paths
99+
5. **Response Blocks as Exit Points**: When a Response block runs, the entire workflow stops and the API response is sent immediately. Multiple Response blocks can exist on different branches — the first one to run wins
100+
6. **State Persistence**: All block outputs and run details are preserved for debugging
101+
7. **Cycle Protection**: Workflows that call other workflows (via Workflow blocks, MCP tools, or API blocks) are tracked with a call chain. If the chain exceeds 25 hops, the run is stopped to prevent infinite loops
102102

103103
## Next Steps
104104

105105
Now that you understand execution basics, explore:
106106
- **[Block Types](/blocks)** - Learn about specific block capabilities
107-
- **[Logging](/execution/logging)** - Monitor workflow executions and debug issues
107+
- **[Logging](/execution/logging)** - Monitor workflow runs and debug issues
108108
- **[Cost Calculation](/execution/costs)** - Understand and optimize workflow costs
109109
- **[Triggers](/triggers)** - Set up different ways to run your workflows

0 commit comments

Comments
 (0)