Skip to content

Commit fc1be3f

Browse files
committed
improvement(docs): add quick reference page and update SDK documentation
1 parent cf7813b commit fc1be3f

File tree

6 files changed

+397
-4
lines changed

6 files changed

+397
-4
lines changed

apps/docs/app/global.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,19 @@ aside#nd-sidebar {
119119
}
120120
}
121121

122+
/* Hide TOC popover on tablet/medium screens (768px - 1279px) */
123+
/* Keeps it visible on mobile (<768px) for easy navigation */
124+
/* Desktop (>=1280px) already hides it via fumadocs xl:hidden */
125+
@media (min-width: 768px) and (max-width: 1279px) {
126+
#nd-docs-layout {
127+
--fd-toc-popover-height: 0px !important;
128+
}
129+
130+
[data-toc-popover] {
131+
display: none !important;
132+
}
133+
}
134+
122135
/* Desktop only: Apply custom navbar offset, sidebar width and margin offsets */
123136
/* On mobile, let fumadocs handle the layout natively */
124137
@media (min-width: 1024px) {

apps/docs/content/docs/en/keyboard-shortcuts/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Speed up your workflow building with these keyboard shortcuts and mouse controls
3434
| `Mod` + `V` | Paste blocks |
3535
| `Delete` or `Backspace` | Delete selected blocks or edges |
3636
| `Shift` + `L` | Auto-layout canvas |
37+
| `Mod` + `Shift` + `F` | Fit to view |
38+
| `Mod` + `Shift` + `Enter` | Accept Copilot changes |
3739

3840
## Panel Navigation
3941

apps/docs/content/docs/en/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"pages": [
44
"./introduction/index",
55
"./getting-started/index",
6+
"./quick-reference/index",
67
"triggers",
78
"blocks",
89
"tools",
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
title: Quick Reference
3+
description: Essential actions for navigating and using the Sim workflow editor
4+
---
5+
6+
import { Callout } from 'fumadocs-ui/components/callout'
7+
8+
A quick lookup for everyday actions in the Sim workflow editor. For keyboard shortcuts, see [Keyboard Shortcuts](/keyboard-shortcuts).
9+
10+
<Callout type="info">
11+
**Mod** refers to `Cmd` on macOS and `Ctrl` on Windows/Linux.
12+
</Callout>
13+
14+
## Workspaces
15+
16+
| Action | How |
17+
|--------|-----|
18+
| Create a workspace | Click workspace dropdown in sidebar → **New Workspace** |
19+
| Rename a workspace | Workspace settings → Edit name |
20+
| Switch workspaces | Click workspace dropdown in sidebar → Select workspace |
21+
| Invite team members | Workspace settings → **Team****Invite** |
22+
23+
## Workflows
24+
25+
| Action | How |
26+
|--------|-----|
27+
| Create a workflow | Click **New Workflow** button or `Mod+Shift+A` |
28+
| Rename a workflow | Double-click workflow name in sidebar, or right-click → **Rename** |
29+
| Duplicate a workflow | Right-click workflow → **Duplicate** |
30+
| Reorder workflows | Drag workflow up/down in the sidebar list |
31+
| Import a workflow | Sidebar menu → **Import** → Select file |
32+
| Create a folder | Right-click in sidebar → **New Folder** |
33+
| Rename a folder | Right-click folder → **Rename** |
34+
| Delete a folder | Right-click folder → **Delete** |
35+
| Collapse/expand folder | Click folder arrow, or double-click folder |
36+
| Move workflow to folder | Drag workflow onto folder in sidebar |
37+
| Delete a workflow | Right-click workflow → **Delete** |
38+
| Export a workflow | Right-click workflow → **Export** |
39+
| Assign workflow color | Right-click workflow → **Change Color** |
40+
| Multi-select workflows | `Mod+Click` or `Shift+Click` workflows in sidebar |
41+
| Open in new tab | Right-click workflow → **Open in New Tab** |
42+
43+
## Blocks
44+
45+
| Action | How |
46+
|--------|-----|
47+
| Add a block | Drag from Toolbar panel, or right-click canvas → **Add Block** |
48+
| Select a block | Click on the block |
49+
| Multi-select blocks | `Mod+Click` additional blocks, or right-drag to draw selection box |
50+
| Move blocks | Drag selected block(s) to new position |
51+
| Copy blocks | `Mod+C` with blocks selected |
52+
| Paste blocks | `Mod+V` to paste copied blocks |
53+
| Duplicate blocks | Right-click → **Duplicate** |
54+
| Delete blocks | `Delete` or `Backspace` key, or right-click → **Delete** |
55+
| Rename a block | Click block name in header, or edit in the Editor panel |
56+
| Enable/Disable a block | Right-click → **Enable/Disable** |
57+
| Toggle handle orientation | Right-click → **Toggle Handles** |
58+
| Toggle trigger mode | Right-click trigger block → **Toggle Trigger Mode** |
59+
| Configure a block | Select block → use Editor panel on right |
60+
61+
## Connections
62+
63+
| Action | How |
64+
|--------|-----|
65+
| Create a connection | Drag from output handle to input handle |
66+
| Delete a connection | Click edge to select → `Delete` key |
67+
| Use output in another block | Drag connection tag into input field |
68+
69+
## Canvas Navigation
70+
71+
| Action | How |
72+
|--------|-----|
73+
| Pan/move canvas | Left-drag on empty space, or scroll/trackpad |
74+
| Zoom in/out | Scroll wheel or pinch gesture |
75+
| Auto-layout | `Shift+L` |
76+
| Draw selection box | Right-drag on empty canvas area |
77+
78+
## Panels & Views
79+
80+
| Action | How |
81+
|--------|-----|
82+
| Open Copilot tab | Press `C` or click Copilot tab |
83+
| Open Toolbar tab | Press `T` or click Toolbar tab |
84+
| Open Editor tab | Press `E` or click Editor tab |
85+
| Search toolbar | `Mod+F` |
86+
| Toggle advanced mode | Click toggle button on input fields |
87+
| Resize panels | Drag panel edge |
88+
| Collapse/expand sidebar | Click collapse button on sidebar |
89+
90+
## Running & Testing
91+
92+
| Action | How |
93+
|--------|-----|
94+
| Run workflow | Click Play button or `Mod+Enter` |
95+
| Stop workflow | Click Stop button or `Mod+Enter` while running |
96+
| Test with chat | Use Chat panel on the right side |
97+
| Select output to view | Click dropdown in Chat panel → Select block output |
98+
| Clear chat history | Click clear button in Chat panel |
99+
| View execution logs | Open terminal panel at bottom, or `Mod+L` |
100+
| Filter logs by block | Click block filter in terminal |
101+
| Filter logs by status | Click status filter in terminal |
102+
| Search logs | Use search field in terminal |
103+
| Copy log entry | Right-click log entry → **Copy** |
104+
| Clear terminal | `Mod+D` |
105+
106+
## Deployment
107+
108+
| Action | How |
109+
|--------|-----|
110+
| Deploy a workflow | Click **Deploy** button in Deploy tab |
111+
| Update deployment | Click **Update** when changes are detected |
112+
| View deployment status | Check status indicator (Live/Update/Deploy) in Deploy tab |
113+
| Revert deployment | Access previous versions in Deploy tab |
114+
| Copy webhook URL | Deploy tab → Copy webhook URL |
115+
| Copy API endpoint | Deploy tab → Copy API endpoint URL |
116+
| Set up a schedule | Add Schedule trigger block → Configure interval |
117+
118+
## Variables
119+
120+
| Action | How |
121+
|--------|-----|
122+
| Add workflow variable | Variables tab → **Add Variable** |
123+
| Edit workflow variable | Variables tab → Click variable to edit |
124+
| Delete workflow variable | Variables tab → Click delete icon on variable |
125+
| Add environment variable | Settings → **Environment Variables****Add** |
126+
| Reference a variable | Use `{{variableName}}` syntax in block inputs |
127+
128+
## Credentials
129+
130+
| Action | How |
131+
|--------|-----|
132+
| Add API key | Block credential field → **Add Credential** → Enter API key |
133+
| Connect OAuth account | Block credential field → **Connect** → Authorize with provider |
134+
| Manage credentials | Settings → **Credentials** |
135+
| Remove credential | Settings → **Credentials** → Delete credential |
136+

packages/python-sdk/README.md

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ result = client.execute_workflow("workflow-id", {"message": "Hello"}, timeout=60
6363
- `input` (any, optional): Input data to pass to the workflow. Dicts are spread at the root level, primitives/lists are wrapped in `{ input: value }`. File objects are automatically converted to base64.
6464
- `timeout` (float, keyword-only): Timeout in seconds (default: 30.0)
6565
- `stream` (bool, keyword-only): Enable streaming responses
66+
- `selected_outputs` (list, keyword-only): Block outputs to stream (e.g., `["agent1.content"]`)
6667
- `async_execution` (bool, keyword-only): Execute asynchronously and return execution ID
6768

68-
**Returns:** `WorkflowExecutionResult`
69+
**Returns:** `WorkflowExecutionResult` or `AsyncExecutionResult`
6970

7071
##### get_workflow_status(workflow_id)
7172

@@ -114,6 +115,73 @@ result = client.execute_workflow_sync("workflow-id", {"data": "some input"}, tim
114115

115116
**Returns:** `WorkflowExecutionResult`
116117

118+
##### get_job_status(task_id)
119+
120+
Get the status of an async job.
121+
122+
```python
123+
status = client.get_job_status("task-id-from-async-execution")
124+
print("Job status:", status)
125+
```
126+
127+
**Parameters:**
128+
- `task_id` (str): The task ID returned from async execution
129+
130+
**Returns:** `dict`
131+
132+
##### execute_with_retry(workflow_id, input=None, *, timeout=30.0, stream=None, selected_outputs=None, async_execution=None, max_retries=3, initial_delay=1.0, max_delay=30.0, backoff_multiplier=2.0)
133+
134+
Execute a workflow with automatic retry on rate limit errors.
135+
136+
```python
137+
result = client.execute_with_retry(
138+
"workflow-id",
139+
{"message": "Hello"},
140+
timeout=30.0,
141+
max_retries=3,
142+
initial_delay=1.0,
143+
max_delay=30.0,
144+
backoff_multiplier=2.0
145+
)
146+
```
147+
148+
**Parameters:**
149+
- `workflow_id` (str): The ID of the workflow to execute
150+
- `input` (any, optional): Input data to pass to the workflow
151+
- `timeout` (float, keyword-only): Timeout in seconds (default: 30.0)
152+
- `stream` (bool, keyword-only): Enable streaming responses
153+
- `selected_outputs` (list, keyword-only): Block outputs to stream
154+
- `async_execution` (bool, keyword-only): Execute asynchronously
155+
- `max_retries` (int, keyword-only): Maximum retry attempts (default: 3)
156+
- `initial_delay` (float, keyword-only): Initial delay in seconds (default: 1.0)
157+
- `max_delay` (float, keyword-only): Maximum delay in seconds (default: 30.0)
158+
- `backoff_multiplier` (float, keyword-only): Backoff multiplier (default: 2.0)
159+
160+
**Returns:** `WorkflowExecutionResult` or `AsyncExecutionResult`
161+
162+
##### get_rate_limit_info()
163+
164+
Get current rate limit information from the last API response.
165+
166+
```python
167+
rate_info = client.get_rate_limit_info()
168+
if rate_info:
169+
print("Remaining requests:", rate_info.remaining)
170+
```
171+
172+
**Returns:** `RateLimitInfo` or `None`
173+
174+
##### get_usage_limits()
175+
176+
Get current usage limits and quota information.
177+
178+
```python
179+
limits = client.get_usage_limits()
180+
print("Current usage:", limits.usage)
181+
```
182+
183+
**Returns:** `UsageLimits`
184+
117185
##### set_api_key(api_key)
118186

119187
Update the API key.
@@ -174,6 +242,39 @@ class SimStudioError(Exception):
174242
self.status = status
175243
```
176244

245+
### AsyncExecutionResult
246+
247+
```python
248+
@dataclass
249+
class AsyncExecutionResult:
250+
success: bool
251+
task_id: str
252+
status: str # 'queued'
253+
created_at: str
254+
links: Dict[str, str]
255+
```
256+
257+
### RateLimitInfo
258+
259+
```python
260+
@dataclass
261+
class RateLimitInfo:
262+
limit: int
263+
remaining: int
264+
reset: int
265+
retry_after: Optional[int] = None
266+
```
267+
268+
### UsageLimits
269+
270+
```python
271+
@dataclass
272+
class UsageLimits:
273+
success: bool
274+
rate_limit: Dict[str, Any]
275+
usage: Dict[str, Any]
276+
```
277+
177278
## Examples
178279

179280
### Basic Workflow Execution
@@ -330,14 +431,14 @@ def execute_workflows_batch(workflow_data_pairs):
330431
"""Execute multiple workflows with different input data."""
331432
results = []
332433

333-
for workflow_id, input in workflow_data_pairs:
434+
for workflow_id, workflow_input in workflow_data_pairs:
334435
try:
335436
# Validate workflow before execution
336437
if not client.validate_workflow(workflow_id):
337438
print(f"Skipping {workflow_id}: not deployed")
338439
continue
339440

340-
result = client.execute_workflow(workflow_id, input)
441+
result = client.execute_workflow(workflow_id, workflow_input)
341442
results.append({
342443
"workflow_id": workflow_id,
343444
"success": result.success,

0 commit comments

Comments
 (0)