Compare commits

...

877 Commits

Author SHA1 Message Date
Waleed
eb5d1f3e5b v0.5.48: copy-paste workflow blocks, docs updates, mcp tool fixes 2025-12-31 18:00:04 -08:00
Waleed
4da128d77c improvement(context-menu): gray out undo redo if the stack is empty (#2657) 2025-12-31 17:59:44 -08:00
Waleed
0c8d05fc98 feat(workflow): added context menu for block, pane, and multi-block selection on canvas (#2656)
* feat(workflow): added context menu for block, pane, and multi-block selection on canvas

* added more

* ack PR comments
2025-12-31 14:42:33 -08:00
Vikhyath Mondreti
4301342ffb fix(mcp): exclude serverUrl from mcp tool call params (#2654) 2025-12-31 11:44:21 -08:00
Waleed
56e485d13b feat(i18n): update translations 2025-12-31 06:48:03 -08:00
Vikhyath Mondreti
1ed746bacf fix(paste): single instance trigger notification correction (#2653) 2025-12-31 03:34:14 -08:00
Vikhyath Mondreti
bf5d0a5573 feat(copy-paste): allow cross workflow selection, paste, move for blocks (#2649)
* feat(copy-paste): allow cross workflow selection, paste, move for blocks

* fix drag options

* add keyboard and mouse controls into docs

* refactor sockets and undo/redo for batch additions and removals

* fix tests

* cleanup more code

* fix perms issue

* fix subflow copy/paste

* remove log file

* fit paste in viewport bounds

* fix deselection
2025-12-31 02:47:06 -08:00
Adam Gough
fb148c6203 fix(jsm): renamed operation (#2651)
* renamed operaiton

* revert icons file
2025-12-31 00:08:20 -08:00
Waleed
54ab82c8dd v0.5.47: deploy workflow as mcp, kb chunks tokenizer, UI improvements, jira service management tools 2025-12-30 23:18:58 -08:00
Waleed
b90cc5b874 fix(build): resolve failing build due to symlink issue in main app dockerfile (#2650) 2025-12-30 22:48:55 -08:00
Waleed
4787909851 improvement(kb): removed zustand cache syncing in kb, added chunk text tokenizer (#2647)
* improvement(kb): removed zustand cache syncing in kb, added chunk text tokenizer

* removed dead code

* removed redundant hook

* remove unused hook

* remove alert notification and use simple error

* added more popover actions

* removed debug instrumentation

* remove extraneous comments

* removed unused handler
2025-12-30 20:15:08 -08:00
Waleed
776f82c0a6 feat(i18n): update translations (#2645)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-30 19:50:11 -08:00
Vikhyath Mondreti
2cfd75a422 fix(tool-input): code subblock should be emptyable (#2646) 2025-12-30 17:45:56 -08:00
Priyanshu Solanki
c77268c13d feat(workflow-as-mcp): added ability to deploy workflows as mcp servers and mcp tools (#2415)
* added a workflow as mcp

* fixed the issue of UI rendering for deleted mcp servers

* fixing lint issues

* using mcn components

* fixing merge conflicts

* fix

* fix lint errors

* refactored code to use hasstartblock from the tirgger utils

* removing unecessary auth

* using official mcp sdk and added description fields

* using normalised input schema function

* ui fixes part 1

* remove migration before merge

* fix merge conflicts

* remove migration to prep merge

* re-add migration

* cleanup code to use mcp sdk types

* fix discovery calls

* add migration

* ui improvements

* fix lint

* fix types

* fix lint

* fix spacing

* remove migration to prep merge

* add migration back

* fix imports

* fix tool refresh ux

* fix test failures

* fix tests

* cleanup code

* styling improvements, ability to edit mcp server description, etc

* fixed ui in light mode api keys modal

* update docs

* deprecated unused input components, shifted to emcn

* updated playground, simplified components

* move images and videos

* updated more docs images

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: waleed <walif6@gmail.com>
2025-12-30 16:52:50 -08:00
Waleed
34bc115468 feat(i18n): update translations (#2643)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-30 16:27:37 -08:00
Adam Gough
2697da5d9c fix(jsm): combined jira providers for jsm (#2644) 2025-12-30 16:01:35 -08:00
Waleed
eca91232bf improvement(tools): added input validation to jira service management routes (#2642) 2025-12-30 14:55:08 -08:00
Adam Gough
7356edccbb added jsm (#2641)
Co-authored-by: aadamgough <adam@sim.ai>
2025-12-30 14:46:31 -08:00
Waleed
9208375523 feat(cursorrules): updated cursorrules and claude md file (#2640)
* feat(cursorrules): updated cursorrules and claude md file

* added rules for adding new integrations
2025-12-30 10:58:33 -08:00
Waleed
df099e9485 feat(filtering): added the ability to filter logs by date and date range (#2639) 2025-12-30 10:42:44 -08:00
ppippi-dev
f8b1880575 fix(docker): resolve @sim/logger module not found in realtime container (#2637) 2025-12-29 23:06:28 -08:00
Emir Karabeg
a7a7c8601c improvement(copilot): ui/ux; refactor: store dimensions (#2636) 2025-12-29 20:42:42 -08:00
Waleed
97a9295230 feat(kb): added permissions to workspace popover, added kb popover to view tags, edit description and kb name (#2634) 2025-12-29 18:56:50 -08:00
Emir Karabeg
e9e5721610 improvement: HITL, subblocks, general (#2633)
* improvement: knowledge tags subblock, start subblock

* improvement: terminal height, subblocks

* improvement: general settings, HITL
2025-12-29 17:51:07 -08:00
Emir Karabeg
a08d86d42b fix(note): light mode (#2631) 2025-12-29 15:39:47 -08:00
Vikhyath Mondreti
400178a3b0 fix(templates): only change updatedAt for actual updates to workflow or metadata (#2630) 2025-12-29 12:11:32 -08:00
Waleed
da1f668272 improvement(sidebar): fix workspace name truncation on sidebar preview (#2628) 2025-12-29 11:11:00 -08:00
Waleed
f895bf469b v0.5.46: build improvements, greptile, light mode improvements 2025-12-29 02:17:52 -08:00
Waleed
88065088bf fix(deploy): fix workflow change detection to handle old variable reference format (#2623) 2025-12-29 02:09:38 -08:00
Emir Karabeg
1c626dfcae improvement(globals): light colors (#2620)
* improvement(globals): light colors

* improvement(ui): logs, templates, kb, light globals

* improvement(subflows): start node and ui/ux
2025-12-28 13:28:36 -08:00
Waleed
132aae1615 feat(i18n): update translations (#2619)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-28 12:37:20 -08:00
Waleed
f44fc18041 fix(build): add tsconfig to db dockerfile (#2617)
* fix(build): add tsconfig to db dockerfile

* ack pr comment
2025-12-28 12:29:34 -08:00
Waleed
7761b16b87 feat(tools): added greptile tools/block, updated copilot panel styling (#2618) 2025-12-28 12:12:22 -08:00
Waleed
71130c8b0a improvement(monorepo): added tsconfig package, resolved type errors in testing package (#2613) 2025-12-28 00:36:48 -08:00
Waleed
dd3209af06 v0.5.45: light mode fixes, realtime usage indicator, docker build improvements 2025-12-27 19:57:42 -08:00
Waleed
7c0a3c15ac improvement(build): migrate to blacksmith sticky disks for faster builds, other build improvements (#2611) 2025-12-27 18:09:29 -08:00
Waleed
cdc1a832d7 fix(docker): add logger package to realtime dockerfile (#2610) 2025-12-27 17:55:16 -08:00
Waleed
aa9cc5604a improvement(usage-indicator): update query invalidation for usage to update in realtime (#2607)
* improvement(usage-indicator): update query invalidation for usage to update in realtime

* ack PR comments
2025-12-27 15:23:02 -08:00
Emir Karabeg
fdba1cfac2 improvement: required permissions, oauth modal badge (#2609) 2025-12-27 15:18:03 -08:00
Waleed
2e1ccb16f5 improvement(ui): hide divider when following subblock value is null (#2608)
* improvement(ui): hide divider when following subblock value is null

* closed gap in mcp dynamic args subblock
2025-12-27 15:15:43 -08:00
Waleed
b6ba3b50a7 v0.5.44: keyboard shortcuts, autolayout, light mode, byok, testing improvements 2025-12-26 21:25:19 -08:00
Waleed
8651896277 feat(i18n): update translations (#2604)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-26 21:11:01 -08:00
Emir Karabeg
3054d6c1ed fix: bg styling outside workspace (#2605) 2025-12-26 21:08:13 -08:00
Waleed
3d75445459 feat(tools): added new firecrawl agent endpoint (#2603) 2025-12-26 20:34:39 -08:00
Waleed
5add2613ff improvement(easyconnect): use native reactflow getIntersectingNodes instead of custom impl for easy connect (#2601) 2025-12-26 18:29:03 -08:00
Waleed
bd0eca04d7 fix(tag-dropdown): fix the way variables are displayed in the tag dropdown (#2597) 2025-12-26 17:17:01 -08:00
Adam Gough
a60a1fc49a improvement(edges): drag edge over block (#2596)
* drag edge over block

* fix minor stale closure

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-26 17:05:15 -08:00
Vikhyath Mondreti
298546daf1 fix(parallel): add parallel sentinel to make parallel-parallel and parallel-loop work correctly (#2593)
* fix(parallel): add parallel sentinel to make parallel-parallel and parallel-loop work correctly

* fix regular -> parallel + copilot nested subflows

* add tests

* consolidate to always explode parallel dag at runtime
2025-12-26 16:51:54 -08:00
Waleed
b60b98e42c improvement(tag-dropdown): added option to select block in tag dropdown, custom tools modal improvements, light mode fixes (#2594)
* improvement(tag-dropdown): added option to select block in tag dropdown, custom tools modal improvements, light mode fixes

* fix UI bugs

* remove unused components

* tag drop ordering fix
2025-12-26 16:24:38 -08:00
Waleed
7793a6d597 feat(kb): added tags information to kb docs table (#2589)
* feat(kb): added tags information to kb docs table

* improvement(base): table and tags styling

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-12-26 13:54:33 -08:00
Vikhyath Mondreti
66b8434861 fix(block-name): updating block name should update downstream var refs (#2592)
* fix(block-name): updating block name should update downstream var refs

* remove random comments
2025-12-26 12:56:02 -08:00
Adam Gough
27ec4120bc fix(tools): fixed tool outputs (#2534)
* fixed typeform

* fixed supabase tools

* salesforce fix

* removed comments

* pinecone fix

* fixed intercom

* regex constant

* removed fallback logic
2025-12-26 12:46:39 -08:00
Emir Karabeg
1f0e3f2be6 feat: light mode (#2457)
* feat(light): restored light theme

* feat: styling consolidation, note block upgrades

* improvement(zoom-prevention): moved downstream

* fix(notifications): mismatching workflow ID

* feat(light): button variant updates and controls consolidation

* improvement: UI consolidation

* feat: badges, usage limit; fix(note): iframe security; improvement(s-modal): sizing

* improvement: oauth modal, subscription

* improvement(team): ui/ux

* feat: emcn, subscription, tool input

* improvement(copilot): styling consolidation

* feat: colors consolidation

* improvement(ui): light styling

* fix(build): unused billing component

* improvement: addressed comments
2025-12-26 12:45:06 -08:00
Waleed
88cda3a9ce improvement(billing): migrate to decimaljs from number.parseFloat (#2588)
* improvement(billing): migrate to decimaljs from number.parseFloat

* ack PR comments

* ack pr comment

* consistency
2025-12-26 12:35:49 -08:00
Waleed
d707d18ee6 fix(build): update dockerfile to contain testing package deps (#2591)
* fix(build): update dockerfile to contain testing package deps

* added logger package
2025-12-26 12:20:38 -08:00
Waleed
b7f6bab282 feat(tests): added testing package, overhauled tests (#2586)
* feat(tests): added testing package, overhauled tests

* fix build
2025-12-25 16:06:47 -08:00
Waleed
61e7213425 feat(i18n): update translations (#2585)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-25 13:33:14 -08:00
Waleed
3201abab56 improvement(schedules): use tanstack query to fetch schedule data, cleanup ui on schedule info component (#2584)
* improvement(schedules): use tanstack query to fetch schedule data, cleanup ui on schedule info component

* update trigger-save UI, increase auto disable to 100 consecutive from 10

* updated docs

* consolidate consts
2025-12-25 12:09:58 -08:00
Waleed
d79696beae feat(docs): added vector search (#2583)
* feat(docs): added vector search

* ack comments
2025-12-25 11:00:57 -08:00
Waleed
f604ca39a5 feat(chat-otp): added db fallback for chat otp (#2582)
* feat(chat-otp): added db fallback for chat otp

* ack PR comments
2025-12-25 09:37:20 -08:00
Waleed
26ec12599f improvement(byok): updated styling for byok page (#2581) 2025-12-25 08:36:55 -08:00
Waleed
97372533ec feat(i18n): update translations (#2578) 2025-12-24 23:37:35 -08:00
Vikhyath Mondreti
66766a9d81 improvement(byok): remove web search block exa (#2579)
* remove exa from byok

* improvement(byok): remove web search block exa

* fix autolayout

* fix type
2025-12-24 19:26:48 -08:00
Vikhyath Mondreti
47a259b428 feat(byok): byok for hosted model capabilities (#2574)
* feat(byok): byok for hosted model capabilities

* fix type

* add ignore lint

* accidentally added feature flags

* centralize byok fetch for LLM calls

* remove feature flags ts

* fix tests

* update docs
2025-12-24 18:20:54 -08:00
Waleed
40a6bf5c8c improvement(variables): update workflows to use deployed variables, not local ones to align with the rest of the canvas components (#2577)
* improvement(variables): update workflows to use deployed variables, not local ones to align with the rest of the canvas components

* update change detection to ignore trigger id since it is runtime metadata and not actually required to be redeployed
2025-12-24 17:40:23 -08:00
Waleed
da7eca9590 fix(change-detection): move change detection logic to client-side to prevent unnecessary API calls, consolidate utils (#2576)
* fix(change-detection): move change detection logic to client-side to prevent unnecessary API calls, consolidate utils

* added tests

* ack PR comments

* added isPublished to API response
2025-12-24 17:16:35 -08:00
Waleed
92b2e34d25 feat(autolayout): add fitToView on autolayout and reduce horizontal spacing between blocks (#2575)
* feat(autolayout): add fitToView on autolayout and reduce horizontal spacing between blocks

* remove additional yaml code
2025-12-24 16:19:29 -08:00
Vikhyath Mondreti
77521a3a57 fix(cancel-workflow-exec): move cancellation tracking for multi-task envs to redis (#2573)
* fix(cancel-workflow-exec): move cancellation tracking for multi-task envs to redis

* cleanup cancellation keys after execution
2025-12-24 11:51:09 -08:00
Waleed
cb8b9c547a fix(router): update router to handle azure creds the same way the agent block does (#2572)
* fix(router): update router to handle azure creds the same way the agent block does

* cleanup
2025-12-24 10:22:47 -08:00
Vikhyath Mondreti
b1cd8d151d fix(executor): workflow abort has to send abort signal to route for correct state update (#2571) 2025-12-24 02:50:58 -08:00
Waleed
1145f5c043 fix(shortcut): fixed global keyboard commands provider to follow latest ref pattern (#2569)
* fix(shortcut): fixed global commands provider to follow best practices

* cleanup

* ack PR comment
2025-12-24 00:25:15 -08:00
Waleed
b304233062 v0.5.43: export logs, circleback, grain, vertex, code hygiene, schedule improvements 2025-12-23 19:19:18 -08:00
Waleed
3a50ce4d99 feat(i18n): update translations (#2568)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 19:03:43 -08:00
Waleed
810d2089cf feat(schedules): remove save button for schedules, couple schedule deployment with workflow deployment (#2566)
* feat(schedules): remove save button for schedules, couple schedule deployment with workflow deployment

* added tests

* ack PR comments

* update turborepo

* cleanup, edge cases

* ack PR comment
2025-12-23 18:53:40 -08:00
Vikhyath Mondreti
8c89507247 improvement(logs): state machine of workflow execution (#2560)
* improvement(logs): state machine of workflow execution

* cleanup more code

* fallback consistency

* fix labels

* backfill in migration correctly

* make streaming stop in chat window correctly
2025-12-23 18:27:19 -08:00
Vikhyath Mondreti
169dd4a503 fix(grafana): tool outputs (#2565)
* fix(grafana): list annotations outputs

* fix more grafana tools
2025-12-23 17:23:12 -08:00
Vikhyath Mondreti
dc4e5d3bdc fix(dropbox): access type param pass through to get refresh token (#2564) 2025-12-23 16:32:58 -08:00
Emir Karabeg
31de55cbdf feat(ux): add expandFolder to auto expand folders on nested folder creation (#2562)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-23 16:27:00 -08:00
Waleed
eaca49037d fix(ui): remove css transition on popover and dropdown items to avoid flicker (#2563) 2025-12-23 15:46:27 -08:00
Waleed
2d26c0cb32 feat(i18n): update translations (#2561)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 15:42:54 -08:00
Waleed
cdf3d759b9 fix(jina): removed conditionally included outputs from jina (#2559)
* fix(jina): removed conditionally included outputs from jina

* ack PR comments
2025-12-23 15:20:10 -08:00
Vikhyath Mondreti
bf8fbebe22 improvement(code-quality): centralize regex checks, normalization (#2554)
* improvement(code-quality): centralize regex checks, normalization

* simplify resolution

* fix(copilot): don't allow duplicate name blocks

* centralize uuid check
2025-12-23 15:12:04 -08:00
Waleed
b23299dae4 feat(i18n): update translations (#2558)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 14:54:44 -08:00
Waleed
6c8f1a81c1 feat(tools): added grain and circleback (#2557)
* feat(tools): added grain and circleback

* oauth to pat and tool fix

* updated docs

* remove remaining oauth references

* cleanup

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-23 14:34:12 -08:00
Waleed
2c36926a4e fix(perplexity): remove deprecated perplexity sonar reasoning model (#2556) 2025-12-23 13:24:18 -08:00
Waleed
89c1085950 improvement(vertex): added vertex to all LLM-based blocks, fixed refresh (#2555)
* improvement(vertex): added vertex to all LLM-based blocks, fixed refresh

* fix build
2025-12-23 13:11:56 -08:00
Waleed
4e09c389e8 improvement(usage): update usage limit in realtime, standardize token output object across providers (#2553)
* improvement(usage-limit): update usage in real time, fix token output object

* updated tokenBreakdown to tokens, standardized input/output/total token object type across providers

* update remaining references

* ack PR comment

* remove singleton query client instance from hooks, leave only in zustand
2025-12-23 13:04:47 -08:00
Vikhyath Mondreti
641ac58017 fix(frozen-canvas): need to fetch the deployment version correctly (#2552) 2025-12-23 11:37:07 -08:00
Waleed
6c1e4ff7d6 improvement(oauth): remove unused scope hints (#2551)
* improvement(oauth): remove unused scope hints

* improvement(oauth): remove scopeHints and extraneous oauth provider data

* cleanup
2025-12-23 11:26:49 -08:00
Waleed
40e30a11e9 improvement(logs): update logs export route to respect filters (#2550) 2025-12-23 10:23:27 -08:00
Vikhyath Mondreti
57e4b49bd6 v0.5.42: fix memory migration 2025-12-23 01:24:54 -08:00
Vikhyath Mondreti
d1ebad912e fix memory migration (#2548) 2025-12-23 01:19:29 -08:00
Vikhyath Mondreti
e12dd204ed v0.5.41: memory fixes, copilot improvements, knowledgebase improvements, LLM providers standardization 2025-12-23 00:15:18 -08:00
Vikhyath Mondreti
621f9a40c7 improvement(landing): free usage limit (#2547) 2025-12-23 00:07:13 -08:00
Siddharth Ganesan
3100daa346 feat(copilot): add tools to access block outputs and upstream references (#2546)
* Add copilot references tools

* Minor fixes

* Omit vars field in block outputs when id is provided
2025-12-23 00:06:24 -08:00
Priyanshu Solanki
c252e885af improvement(logs): fixed logs for parallel and loop execution flow (#2468)
* fixed logs for parallel and loop execution flow

* Fix array check for collection

* fixed for empty loop and paralle blocks and showing input on dashboard

* extracted utility functions

* fixed the refrencing errors and making sure it propogates to the console

* fix parallel

* fix tests'

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-23 00:02:02 -08:00
Waleed
b0748c82f9 fix(search): removed full text param from built-in search, anthropic provider streaming fix (#2542)
* fix(search): removed full text param from built-in search, anthropic provider streaming fix

* rewrite gemini provider with official sdk + add thinking capability

* vertex gemini consolidation

* never silently use different model

* pass oauth client through the googleAuthOptions param directly

* make server side provider registry

* remove comments

* take oauth selector below model selector

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-22 23:57:11 -08:00
Waleed
f5245f3eca fix(billing): add line items for wand (#2543)
* fix(billing): add line items for wand

* ack pr comment
2025-12-22 23:06:14 -08:00
Waleed
f2ef5f0811 feat(i18n): update translations (#2541)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-22 21:17:01 -08:00
Waleed
37443a7b77 improvement(kb): improve chunkers, respect user-specified chunk configurations, added tests (#2539)
* improvement(kb): improve chunkers, respect user-specified chunk configurations, added tests

* ack PR commnets

* updated docs

* cleanup
2025-12-22 20:47:29 -08:00
lif
e0d96e2126 fix(oauth): add User-Agent header to Reddit token refresh (#2517)
Reddit API requires User-Agent header for all requests including OAuth
token refresh. Without it, requests fail with 403 error after the
initial token expires.

Fixes #1822
2025-12-22 20:09:38 -08:00
Waleed
827dd0466f feat(i18n): update translations (#2538)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-22 20:09:03 -08:00
Vikhyath Mondreti
ccd92b9054 improvement(block-metadata): remove references to yaml syntax in best practices (#2537) 2025-12-22 20:07:29 -08:00
Vikhyath Mondreti
6af291ca9f improvement(pricing): increase free user limit to 20 usd (#2536)
* improvement(pricing): increase free user limit to 20 usd

* make gemini pricing accurate

* generate migration for db constant

* update docs

* test notif data
2025-12-22 19:51:22 -08:00
Vikhyath Mondreti
be9ab4c833 fix(dashboard): flash based on loading check (#2535) 2025-12-22 18:49:41 -08:00
Emir Karabeg
ab3a3d12fe improvement(logs): dashboard/logs optimizations and improvements (#2414)
* improvement(logs): dashboard/logs optimizations and improvements

* improvement: addressed comments

* improvement: loading

* cleanup

* ack PR comments

* cleanup more

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-22 16:44:10 -08:00
Waleed
e01d4cb990 feat(i18n): update translations (#2530)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-22 16:11:59 -08:00
Vikhyath Mondreti
8c2c49eb14 fix(models): memory fixes, provider code typing, cost calculation cleanup (#2515)
* improvement(memory): should not be block scoped

* cleanup provider code

* update other providers

* cleanup fallback code

* remove flaky test

* fix memory

* move streaming fix to right level

* cleanup streaming server

* make memories workspace scoped

* update docs

* fix dedup logic

* fix streaming parsing issue for multiple onStream calls for same block

* fix(provieders): support parallel agent tool calls, consolidate utils

* address greptile comments

* remove all comments

* fixed openrouter response format handling, groq & cerebras response formats

* removed duplicate type

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-22 15:59:53 -08:00
Waleed
086982c7a3 improvement(docs): update og image (#2529) 2025-12-22 13:16:39 -08:00
Waleed
2b7807a7de feat(i18n): update translations (#2526)
* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-22 11:20:42 -08:00
Waleed
2d4a660246 feat(intercom): added additional params to intercom tools (#2523) 2025-12-22 10:24:49 -08:00
Siddharth Ganesan
e981b1dc1b improvement(copilot): improve copilot metadata processing and tool output memory (#2516) 2025-12-21 23:24:55 -08:00
Vikhyath Mondreti
3d9d9cbc54 v0.5.40: supabase ops to allow non-public schemas, jira uuid 2025-12-21 22:28:05 -08:00
Adam Gough
58fcb4ed80 fix(jira): added uuid (#2513)
* added uuid param

* revmoed comment

* fixed naming
2025-12-21 22:04:05 -08:00
Vikhyath Mondreti
e4d211c2f0 improvement(supabase): allow non-public schemas (#2511) 2025-12-21 21:20:36 -08:00
Waleed
0f4ec962ad v0.5.39: notion, workflow variables fixes 2025-12-20 20:44:00 -08:00
Waleed
f21eaf1f10 fix(vars): add socket persistence when variable names are changed, update variable name normalization to match block name normalization, added space constraint on envvar names (#2508)
* fix(vars): add socket persistence when variable names are changed, update variable name normalization to match block name normalization, added space constraint on envvar names

* removed redundant queueing, removed unused immediate flag from sockets ops

* ack PR comments
2025-12-20 20:35:28 -08:00
Waleed
942da8815d fix(notion): remove hyphenation of incoming page ID's (#2507) 2025-12-20 19:35:44 -08:00
Waleed
4827866f9a v0.5.38: snap to grid, copilot ux improvements, billing line items 2025-12-20 17:24:38 -08:00
Waleed
214632604d feat(settings): added snap to grid slider to settings (#2504)
* feat(settings): added snap to grid slider to settings

* ack PR comments

* ack PR comment
2025-12-20 16:54:40 -08:00
Vikhyath Mondreti
1ddbac1d2e fix(code): cmd-z after refocus should not clear subblock (#2503) 2025-12-20 16:26:30 -08:00
Waleed
35a57bfad4 feat(audit): added audit log for billing line items (#2500)
* feat(audit): added audit log for billing line items

* remove migration

* reran migrations after resolving merge conflict

* ack PR comment
2025-12-20 14:10:01 -08:00
Waleed
f8678b179a fix(migrations): remove duplicate indexes (#2501) 2025-12-20 13:55:26 -08:00
Siddharth Ganesan
0ebb45b2db feat(copilot): show inline prompt to increase usage limit or upgrade plan (#2465)
* Add limit v1

* fix ui for copilot upgrade limit inline

* open settings modal

* Upgrade plan button

* Remove comments

* Ishosted check

* Fix hardcoded bumps

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-20 13:46:06 -08:00
Waleed
6247f421bc improvement(queries): add workspaceId to execution logs, added missing indexes based on query insights (#2471)
* improvement(queries): added missing indexes

* add workspaceId to execution logs

* remove migration to prep merge

* regen migration

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-20 13:33:10 -08:00
Waleed
3e697d9ed9 v0.5.37: redaction utils consolidation, logs updates, autoconnect improvements, additional kb tag types 2025-12-19 22:31:55 -08:00
Waleed
6385d82b85 improvement(ui): updated kb tag component to match existing table (#2498)
* improvement(ui): updated kb tag component to match existing table

* fix selection

* fix more ui

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-19 22:26:24 -08:00
Waleed
f91beb324e fix(condition): fixed deactivated edges when if and else if conditions connected to same destination block, added 100+ unit tests (#2497) 2025-12-19 21:12:49 -08:00
Priyanshu Solanki
4f69b171f2 feat(kb): Adding support for more tags to the KB (#2433)
* creating boolean, number and date tags with different equality matchings

* feat: add UI for tag field types with filter operators

- Update base-tags-modal with field type selector dropdown
- Update document-tags-modal with different input types per fieldType
- Update knowledge-tag-filters with operator dropdown and type-specific inputs
- Update search routes to support all tag slot types
- Update hook to use AllTagSlot type

* feat: add field type support to document-tag-entry component

- Add dropdown with all field types (Text, Number, Date, Boolean)
- Render different value inputs based on field type
- Update slot counting to include all field types (28 total)

* fix: resolve MAX_TAG_SLOTS error and z-index dropdown issue

- Replace MAX_TAG_SLOTS with totalSlots in document-tag-entry
- Add z-index to SelectContent in base-tags-modal for proper layering

* fix: handle non-text columns in getTagUsage query

- Only apply empty string check for text columns (tag1-tag7)
- Numeric/date/boolean columns only check IS NOT NULL
- Cast values to text for consistent output

* refactor: use EMCN components for KB UI

- Replace @/components/ui imports with @/components/emcn
- Use Combobox instead of Select for dropdowns
- Use EMCN Switch, Button, Input, Label components
- Remove unsupported 'size' prop from EMCN Button

* fix: layout for delete button next to date picker

- Change delete button from absolute to inline positioning
- Add proper column width (w-10) for delete button
- Add empty header cell for delete column
- Apply fix to both document-tag-entry and knowledge-tag-filters

* fix: clear value when switching tag field type

- Reset value to empty when changing type (e.g., boolean to text)
- Reset value when tag name changes and type differs
- Prevents 'true'/'false' from sticking in text inputs

* feat: add full support for number/date/boolean tag filtering in KB search

- Copy all tag types (number, date, boolean) from document to embedding records
- Update processDocumentTags to handle all field types with proper type conversion
- Add number/date/boolean columns to document queries in checkDocumentWriteAccess
- Update chunk creation to inherit all tag types from parent document
- Add getSearchResultFields helper for consistent query result selection
- Support structured filters with operators (eq, gt, lt, between, etc.)
- Fix search queries to include all 28 tag fields in results

* fixing tags import issue

* fix rm file

* reduced number to 3 and date to 2

* fixing lint

* fixed the prop size issue

* increased number from 3 to 5 and boolean from 7 to 2

* fixed number the sql stuff

* progress

* fix document tag and kb tag modals

* update datepicker emcn component

* fix ui

* progress on KB block tags UI

* fix issues with date filters

* fix execution parsing of types for KB tags

* remove migration before merge

* regen migrations

* fix tests and types

* address greptile comments

* fix more greptile comments

* fix filtering logic for multiple of same row

* fix tests

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-19 21:00:35 -08:00
Waleed
a1a189f328 fix(condition): remove dead code from condition handler, defer resolution to function execute tool like the function block (#2496) 2025-12-19 20:18:42 -08:00
Waleed
7dc48510dc fix(tool-input): allow multiple instances of workflow block or kb tools as agent tools (#2495)
* fix(tool-input): allow multiple instances of workflow block or kb tools as agent tools

* ack PR comments
2025-12-19 19:19:42 -08:00
Martin Yankov
4431a1a484 fix(helm): add custom egress rules to realtime network policy (#2481)
The realtime service network policy was missing the custom egress rules section
that allows configuration of additional egress rules via values.yaml. This caused
the realtime pods to be unable to connect to external databases (e.g., PostgreSQL
on port 5432) when using external database configurations.

The app network policy already had this section, but the realtime network policy
was missing it, creating an inconsistency and preventing the realtime service
from accessing external databases configured via networkPolicy.egress values.

This fix adds the same custom egress rules template section to the realtime
network policy, matching the app network policy behavior and allowing users to
configure database connectivity via values.yaml.
2025-12-19 18:59:08 -08:00
Waleed
93fe68785e fix(subflow): prevent auto-connect across subflow edges with keyboard shortcut block additions, make positioning for auto-drop smarter (#2489)
* fix(subflow): prevent auto-connect across subflow edges with keyboard shortcut block additions, make positioning for auto-drop smarter

* stronger typing
2025-12-19 18:31:29 -08:00
Vikhyath Mondreti
50c1c6775b fix(logs): always capture cost, logging size failures (#2487)
* fix(logs): truncate strings in tracespans crashing insertion

* add depth check to not crash

* custom serialization to not break tracepsans

* log costs even in log creation failure

* code cleanup?

* fix typing

* remove null bytes

* increase char limit

* reduce char limit
2025-12-19 17:39:18 -08:00
Waleed
df5f823d1c fix(autofill): add dummy inputs to prevent browser autofill for various fields, prevent having 0 workflows in workspace (#2482)
* fix(autofill): add dummy inputs to prevent browser autofill for various fields, prevent having 0 workflows in workspace

* cleanup

* ack PR comments

* fix failing test
2025-12-19 15:29:01 -08:00
Waleed
094f87fa1f fix(edges): prevent autoconnect outgoing edges from response block (#2479) 2025-12-19 13:19:53 -08:00
Waleed
65efa039da fix(redaction): consolidate redaction utils, apply them to inputs and outputs before persisting logs (#2478)
* fix(redaction): consolidate redaction utils, apply them to inputs and outputs before persisting logs

* added testing utils
2025-12-19 13:17:51 -08:00
Waleed
6b15a50311 improvement(ui): updated subscription and team settings modals to emcn (#2477) 2025-12-19 11:41:47 -08:00
Waleed
65787d7cc3 fix(api-keys): remove billed account check during api key generation (#2476) 2025-12-19 11:33:00 -08:00
Waleed
4d1a9a3f22 v0.5.36: hitl improvements, opengraph, slack fixes, one-click unsubscribe, auth checks, new db indexes 2025-12-19 01:27:49 -08:00
Waleed
656a6b8abd fix(sanitization): added more input sanitization to tool routes (#2475)
* fix(sanitization): added more input sanitization to tool routes

* ack PR comments
2025-12-19 01:27:20 -08:00
Waleed
889b44c90a improvement(db): added missing indexes for common access patterns (#2473) 2025-12-19 00:46:10 -08:00
Waleed
3a33ec929f fix(authentication): added auth checks for various routes, mysql and postgres query validation, csp improvements (#2472) 2025-12-19 00:44:52 -08:00
Waleed
24356d99ec fix(unsubscribe): add one-click unsubscribe (#2467)
* fix(unsubscribe): add one-click unsubscribe

* ack Pr comments
2025-12-18 21:16:24 -08:00
Waleed
6de1c04517 feat(i18n): update translations (#2470) 2025-12-18 21:01:51 -08:00
Adam Gough
38be2b76c4 fix(slack): respect message limit, remove duplicate canonical representations (#2469)
* fix(slack): respect message limit, remove duplicate canonical representations

* removed comment

* updated docs script

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-18 20:37:14 -08:00
Waleed
a2f14cab54 feat(og): add opengraph images for templates, blogs, and updated existing opengraph image for all other pages (#2466)
* feat(og): add opengraph images for templates, blogs, and updated existing opengraph image for all other pages

* added to workspace templates page as well

* ack PR comments
2025-12-18 19:15:06 -08:00
Priyanshu Solanki
474762d6fb improvement(hitl): show resume url in tag dropdown within hitl block (#2464)
* fixed the human in the loop url resolution:

* greptilecomments

* greptilecomments

---------

Co-authored-by: Pbonmars-20031006@users.noreply.github.com
2025-12-18 19:43:37 -07:00
Waleed
0005c3e465 feat(i18n): update translations (#2463)
Co-authored-by: aadamgough <aadamgough@users.noreply.github.com>
2025-12-18 18:18:31 -08:00
Adam Gough
fc40b4f7af fix(tools): improved slack output ux and jira params (#2462)
* fixed slack output

* updated jira

* removed comment

* change team uuid
2025-12-18 17:56:10 -08:00
Vikhyath Mondreti
eb07a080fb v0.5.35: helm updates, copilot improvements, 404 for docs, salesforce fixes, subflow resize clamping 2025-12-18 16:23:19 -08:00
Priyanshu Solanki
2a7f51a2f6 adding clamps for subflow drag and drops of blocks (#2460)
Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
2025-12-18 16:57:58 -07:00
Waleed
90c3c43607 fix(blog): add back unoptimized tag, fix styling (#2461) 2025-12-18 15:55:47 -08:00
Siddharth Ganesan
83d813a7cc improvement(copilot): add edge handle validation to copilot edit workflow (#2448)
* Add edge handle validation

* Clean

* Fix lint

* Fix empty target handle
2025-12-18 15:40:00 -08:00
Vikhyath Mondreti
811c736705 fix failing lint from os contributor (#2459) 2025-12-18 15:03:31 -08:00
Vikhyath Mondreti
c6757311af Merge branch 'main' into staging 2025-12-18 14:58:48 -08:00
div
b5b12ba2d1 fix(teams): webhook notifications crash (#2426)
* fix(docs): clarify working directory for drizzle migration (#2375)

* fix(landing): prevent url encoding for spaces for footer links (#2376)

* fix: handle empty body.value in Teams webhook notification parser (#2425)

* Update directory path for migration command

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: mosa <mosaxiv@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Shivam <shivamprajapati035@gmail.com>
Co-authored-by: Gaurav Chadha <65453826+Chadha93@users.noreply.github.com>
Co-authored-by: root <root@Delta.localdomain>
2025-12-18 14:57:27 -08:00
Waleed
0d30676e34 fix(blog): revert back to using next image tags in blog (#2458) 2025-12-18 13:51:58 -08:00
Waleed
36bdccb449 fix(ui): fixed visibility issue on reset passowrd page (#2456) 2025-12-18 13:24:32 -08:00
Waleed
f45730a89e improvement(helm): added SSO and cloud storage variables to helm charts (#2454)
* improvement(helm): added SSO and cloud storage variables to helm charts

* consolidated sf types
2025-12-18 13:12:21 -08:00
Vikhyath Mondreti
04cd837e9c fix(notifs): inactivity polling filters, consolidate trigger types, minor consistency issue with filter parsing (#2452)
* fix(notifs-slac): display name for account

* fix inactivity polling check

* consolidate trigger types

* remove redundant defaults

* fix
2025-12-18 12:49:58 -08:00
Waleed
c23130a26e Revert "fix(salesforce): updated to more flexible oauth that allows production, developer, and custom domain salesforce orgs (#2441) (#2444)" (#2453)
This reverts commit 9da19e84b7.
2025-12-18 12:46:24 -08:00
Priyanshu Solanki
7575cd6f27 Merge pull request #2451 from simstudioai/improvement/SIM-514-useWebhookUrl-conditioning
improvement(useWebhookUrl): GET api/webhook is called when useWebhookUrl:true
2025-12-18 13:31:06 -07:00
priyanshu.solanki
fbde64f0b0 fixing lint errors 2025-12-18 13:04:25 -07:00
Waleed
25f7ed20f6 feat(docs): added 404 page for the docs (#2450)
* feat(docs): added 404 page for the docs

* added metadata
2025-12-18 11:46:42 -08:00
priyanshu.solanki
261aa3d72d fixing a react component: 2025-12-18 12:39:47 -07:00
Waleed
9da19e84b7 fix(salesforce): updated to more flexible oauth that allows production, developer, and custom domain salesforce orgs (#2441) (#2444)
* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records (#2441)

* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records

* ack PR comments

* ack PR comments

* cleanup salesforce refresh logic

* ack more PR comments
2025-12-18 11:39:28 -08:00
priyanshu.solanki
e83afc0a62 fixing the useWbehookManangement call to only call the loadwebhookorgenerateurl function when the useWebhookurl flag is true 2025-12-18 12:31:18 -07:00
Vikhyath Mondreti
1720fa8749 feat(compare-schema): ci check to make sure schema.ts never goes out of sync with migrations (#2449)
* feat(compare-schema): ci check to make sure schema.ts never goes out of sync with migrations

* test out of sync [do not merge]

* Revert "test out of sync [do not merge]"

This reverts commit 9771f66b84.
2025-12-18 11:25:19 -08:00
Waleed
f3ad7750af fix(auth): added same-origin validation to forget password route, added confirmation for disable auth FF (#2447)
* fix(auth): added same-origin validation to forget password route, added confirmation for disable auth FF

* ack PR comments
2025-12-18 11:07:25 -08:00
Vikhyath Mondreti
78b7643e65 fix(condition): async execution isolated vm error (#2446)
* fix(condition): async execution isolated vm error

* fix tests
2025-12-18 11:02:01 -08:00
Siddharth Ganesan
7ef1150383 fix(workflow-state, copilot): prevent copilot from setting undefined state, fix order of operations for copilot edit workflow, add sleep tool (#2440)
* Fix copilot ooo

* Add copilot sleep tool

* Fix lint
2025-12-18 09:57:01 -08:00
Waleed
67cfb21d08 v0.5.34: servicenow, code cleanup, prevent cyclic edge connections, custom tool fixes 2025-12-17 23:39:10 -08:00
Waleed
a337af92bc fix(custom-tools): added missing _toolSchema to internal param set for agents calling custom tools (#2445) 2025-12-17 23:38:36 -08:00
Waleed
b4a99779eb feat(i18n): update translations (#2443)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-17 20:55:06 -08:00
Waleed
471cb4747c fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records (#2441)
* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records

* ack PR comments
2025-12-17 20:45:38 -08:00
Priyanshu Solanki
491bd783b5 fix(servicenow): update servicenow block to use basic auth instead of oauth (#2435)
* fix adding client ID and secret fields to supprot ouath

* revert servicenow to use basic auth instead of oauth

* fix failing tests

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: waleed <walif6@gmail.com>
2025-12-17 20:41:46 -08:00
Waleed
5516fa39c3 fix(graph): prevent cyclic dependencies in graph following ReactFlow examples (#2439)
* fix(graph): prevent cyclic dependencies in graph following ReactFlow examples

* ack PR comment
2025-12-17 19:13:39 -08:00
Waleed
21fa92bc41 feat(i18n): update translations (#2438)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-17 18:01:43 -08:00
Vikhyath Mondreti
26ca37328a fix(conditions): make outputs correct (#2437) 2025-12-17 17:15:16 -08:00
Waleed
731997f768 fix(envvars): cleanup unused envvars (#2436)
* fix(envvars): cleanup unused envvars

* removed unused react-google-drive-picker dep
2025-12-17 17:13:01 -08:00
Waleed
1d6975db49 v0.5.33: loops, chat fixes, subflow resizing refactor, terminal updates 2025-12-17 15:45:39 -08:00
Waleed
c4a6d11cc0 fix(condition): used isolated vms for condition block RCE (#2432)
* fix(condition): used isolated vms for condition block RCE

* ack PR comment

* one more

* remove inputForm from sched, update loop condition to also use isolated vm

* hide servicenow
2025-12-17 15:29:25 -08:00
Waleed
7b5405e968 feat(vertex): added vertex to list of supported providers (#2430)
* feat(vertex): added vertex to list of supported providers

* added utils files for each provider, consolidated gemini utils, added dynamic verbosity and reasoning fetcher
2025-12-17 14:57:58 -08:00
Vikhyath Mondreti
1ae3b47f5c fix(inactivity-poll): need to respect level and trigger filters (#2431) 2025-12-17 14:50:33 -08:00
Waleed
3120a785df fix(terminal): fix text wrap for errors and messages with long strings (#2429) 2025-12-17 13:42:43 -08:00
Vikhyath Mondreti
8775e76c32 improvement(subflow): resize vertical height estimate (#2428)
* improvement(node-dims): share constants for node padding

* fix vertical height estimation
2025-12-17 12:07:57 -08:00
Vikhyath Mondreti
9a6c68789d fix(subflow): resizing live update 2025-12-17 11:49:24 -08:00
Waleed
08bc1125bd fix(cmd-k): when navigating to current workspace/workflow, close modal instead of navigating (#2420)
* fix(cmd-k): when navigating to current workspace, close modal instead of navigating

* ack PR comment
2025-12-17 10:21:35 -08:00
Waleed
f4f74da1dc feat(i18n): update translations (#2421)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-17 10:21:15 -08:00
Vikhyath Mondreti
de330d80f5 improvement(mcp): restructure mcp tools caching/fetching info to improve UX (#2416)
* feat(mcp): improve cache practice

* restructure mcps fetching, caching, UX indicators

* fix schema

* styling improvements

* fix tooltips and render issue

* fix loading sequence + add redis

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-16 21:23:18 -08:00
Emir Karabeg
b7228d57f7 feat(service-now): added service now block (#2404)
* feat(service-now): added service now block

* fix: bun lock

* improvement: fixed @trigger.dev/sdk imports and removal of sentry blocks

* improvement: fixed @trigger.dev/sdk import

* improvement: fixed @trigger.dev/sdk import

* fix(servicenow): save accessTokenExpiresAt on initial OAuth account creation

* docs(servicenow): add ServiceNow tool documentation and icon mapping

* fixing bun lint issues

* fixing username/password fields

* fixing test file for refreshaccesstoken to support instance uri

* removing basic auth and fixing undo-redo/store.ts

* removed import set api code, changed CRUD operations to CRUD_record and added wand configuration to help users to generate JSON Arrays

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
2025-12-16 21:16:09 -08:00
Waleed
dcbeca1abe fix(subflow): fix json stringification in subflow collections (#2419)
* fix(subflow): fix json stringification in subflow collections

* cleanup
2025-12-16 20:47:58 -08:00
Waleed
27ea333974 fix(chat): fix stale closure in workflow runner for chat (#2418) 2025-12-16 19:59:02 -08:00
Waleed
9861d3a0ac improvement(helm): added more to helm charts, remove instance selector for various cloud providers (#2412)
* improvement(helm): added more to helm charts, remove instance selector for various cloud providers

* ack PR comment
2025-12-16 18:24:00 -08:00
Waleed
fdbf8be79b fix(logs-search): restored support for log search queries (#2417) 2025-12-16 18:18:46 -08:00
Adam Gough
6f4f4e22f0 fix(loop): increased max loop iterations to 1000 (#2413) 2025-12-16 16:08:56 -08:00
Waleed
837aabca5e v0.5.32: google sheets fix, schedule input format 2025-12-16 15:41:04 -08:00
Vikhyath Mondreti
f7d2c9667f fix(serializer): condition check should check if any condition are met (#2410)
* fix(serializer): condition check should check if any condition are met

* remove comments

* remove more comments
2025-12-16 14:36:40 -08:00
Waleed
29befbc5f6 feat(schedule): add input form to schedule (#2405)
* feat(schedule): add input form to schedule

* change placeholder
2025-12-16 11:23:57 -08:00
Vikhyath Mondreti
f9cfca92bf v0.5.31: add zod as direct dep 2025-12-15 20:40:02 -08:00
Vikhyath Mondreti
9cf8aaee1b fix(sockets): add zod as direct sockets server dep (#2397)
* fix(sockets): add zod as direct sockets server dep

* fix bun lock
2025-12-15 20:25:40 -08:00
Waleed
25afacb25e v0.5.30: vllm fixes, permissions fixes, isolated vms for code execution, tool fixes 2025-12-15 19:38:01 -08:00
Emir Karabeg
0e6a1315d0 improvement: workflow loading, sidebar scrolling (#2322)
* improvement: workflow loading, sidebar scrolling

* further optimizations

* remove redundant perms calls

* remove redundant api calls

* use displayNodes local state to make dragging smooth even in larger workflows

* improvement(logs): trace span output styling

* fix(s-modal): sidebar overflow scrolling

* fix(footer): guardrails link

* improvement(loading): spinner

* refactor(training-modal): changed file name

* improvement(spinner): optimize spinner in background

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-15 19:21:21 -08:00
Waleed
f0dc8e81d9 fix(build): downgrade nextjs from canary to 16.0.9 (#2394) 2025-12-15 19:00:52 -08:00
Waleed
ab30d37020 feat(i18n): update translations (#2395)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-15 18:45:19 -08:00
Waleed
12d42e29ac fix(docs): regen docs (#2393) 2025-12-15 18:30:48 -08:00
Waleed
a5b7148375 fix(node): use node subprocess explicitly (#2391)
* fix(node): use node subprocess explicitly

* add explicit documentation

* fixed build
2025-12-15 18:18:26 -08:00
Adam Gough
57e6a0b621 fixed jira output (#2392) 2025-12-15 18:16:50 -08:00
Waleed
b72e111e22 fix(vm): use node child process for RCE (#2389)
* fix(vm): use node child process for RCE

* ack PR comments

* cleanup oprhaned processes

* cleaned up

* ack pr comment

* fix path

* use spawn instead of fork

* acked PR comments
2025-12-15 17:52:19 -08:00
Vikhyath Mondreti
300aaa5368 feat(slack): ability to have DM channels as destination for slack tools (#2388)
* feat(slack): tool to allow dms

* don't make new tool but separate out destination

* add log for message limit

* consolidate slack selector code

* add scopes correctly

* fix zod validation

* update message logs

* add console logs

* fix

* remove from tools where feature not needed

* add correct condition

* fix type

* fix cond eval logic
2025-12-15 17:39:53 -08:00
Waleed
bdcc42e566 fix(permissions): add client-side hints to prevent read-only users from creating workflows or folders (#2390) 2025-12-15 17:14:33 -08:00
Waleed
a45bb1bf3b fix(rce): add 'isolate' to list of trusted deps, fixed custom tools environment resolution (#2387)
* fix(rce): add isolate to list of trusted deps

* updated error enchancer in RCE

* fixed

* fix build

* fix failing test

* fix build

* fix build

* remove extraneous comment
2025-12-15 15:24:11 -08:00
Waleed
3a5363ac54 feat(i18n): update translations (#2386)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-15 14:23:29 -08:00
Waleed
17b2e58c32 improvement(rce): updated rce to use isolate pkg for RCE (#2385)
* improvement(rce): updated rce to use isolate pkg for RCE

* lazy load isolate instance

* update zoom docs
2025-12-15 13:26:39 -08:00
Vikhyath Mondreti
8d38c2f15e fix(wand): should not be able to use wand ui without write/admin perms (#2384) 2025-12-15 13:17:05 -08:00
Waleed
9762bbc451 fix(wand): validate session before allowing access to wand generation (#2383)
* fix(wand): validate session before allowing access to wand generation

* ack PR comment

* ack PR comments
2025-12-15 12:20:45 -08:00
Vikhyath Mondreti
e43afc8b6c fix(subscription): incomplete team subscription race condition (#2381) 2025-12-15 11:36:08 -08:00
Gaurav Chadha
fcf52ac4d5 fix(landing): prevent url encoding for spaces for footer links (#2376) 2025-12-15 10:59:12 -08:00
Shivam
842200bcf2 fix(docs): clarify working directory for drizzle migration (#2375) 2025-12-15 10:58:27 -08:00
Waleed
6009a7359f fix(vllm): remove requirement for api key for vllm (#2380) 2025-12-15 10:48:48 -08:00
Waleed
0acd86023c fix(blog): use unoptimized tag for image assets (#2374) 2025-12-14 23:16:09 -08:00
Waleed
a0fb889644 v0.5.29: chat voice mode, opengraph for docs, option to disable auth 2025-12-13 19:50:06 -08:00
Waleed
431f206930 fix(tools): add validation for ids in tool routes (#2371) 2025-12-13 19:40:33 -08:00
Waleed
7443e28054 feat(i18n): update translations (#2370)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-13 19:26:31 -08:00
Waleed
c962e3b398 feat(webflow): added collection, item, & site selectors for webflow (#2368)
* feat(webflow): added collection, item, & site selectors for webflow

* ack PR comments

* ack PR comments
2025-12-13 19:14:33 -08:00
Waleed
d5b95cbd33 fix(organizations): move organization better-auth client to conditionally be included based on FF (#2367)
* fix(organizations): move organization better-auth client to conditionally be included based on FF

* ack PR comment
2025-12-13 19:06:12 -08:00
Waleed
0fb084b9e4 fix(subflows): prevent cross-boundary connections on autoconnect drop between subflow blocks and regular blocks (#2366) 2025-12-13 17:38:59 -08:00
Waleed
95b9ca4670 feat(registration): allow self-hosted users to disable registration altogether (#2365)
* feat(registration): allow self-hosted users to disable registration altogether

* updated tests

* fix build
2025-12-13 17:34:53 -08:00
Vikhyath Mondreti
746ff68a2e fix(sub-deletion): subscription deletion handling for pro vs team/enterprise (#2364)
* fix(subscription): deletion should sync pro limits back to free

* consolidate duplicate code
2025-12-13 16:10:47 -08:00
Waleed
75a5b43252 feat(og): update og image (#2362) 2025-12-13 15:52:13 -08:00
Vikhyath Mondreti
8d0e50fd0d improvement(admin-routes): cleanup code that could accidentally desync stripe and DB (#2363)
* remove non-functional admin route

* stripe updates cleanup
2025-12-13 15:11:14 -08:00
Waleed
f7d1b06d75 feat(docs): add opengraph to docs for dynamic link preview (#2360) 2025-12-13 13:51:43 -08:00
Vikhyath Mondreti
73940ab390 fix(deployed-chat): voice mode (#2358)
* fix(deployed-chat): voice mode

* remove redundant check

* consolidate query

* invalidate session on password change + race condition fix
2025-12-13 12:31:03 -08:00
Vikhyath Mondreti
f111dac020 improvement(autolayout): reduce horizontal spacing (#2357) 2025-12-13 11:06:42 -08:00
Waleed
690be530c8 chore(icons): update spotify icon (#2356) 2025-12-13 02:11:42 -08:00
Waleed
4edb3be52d fix(spotify): added missing human readable scopes to oauth required modal (#2355) 2025-12-12 21:09:12 -08:00
Waleed
f526c36fc0 v0.5.28: tool fixes, sqs, spotify, nextjs update, component playground 2025-12-12 21:05:57 -08:00
Waleed
9c8d845ba4 feat(ui): added component playground & fixed training modal (#2354) 2025-12-12 21:05:26 -08:00
Waleed
65ac64c2cf feat(i18n): update translations (#2351)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-12 20:15:06 -08:00
Waleed
9e3e18601c fix(next): externalize playwright and ws (#2352) 2025-12-12 20:14:53 -08:00
Waleed
821d127c00 fix(build): explicitly install shims module from anthropic and openai in stagehand route (#2350) 2025-12-12 19:24:47 -08:00
Siddharth Ganesan
ecf5209e6f feat(integration): add spotify (#2347)
* Add spotify

* Finish spotify integration

* Fix logo

* fix build

* Rename tools

* Fix docs

* Fix lint

* Fix imports

* ran lint

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-12 19:22:17 -08:00
Vikhyath Mondreti
132f4bca38 fix(validation): don't validate disabled blocks (#2348) 2025-12-12 19:02:08 -08:00
Waleed
d27f7c232b fix(next): remove openai and anthropic sdk's from serverExternalPackages (#2349) 2025-12-12 18:09:17 -08:00
Siddharth Ganesan
d06d2b01e3 fix(copilot): fix incorrectly sanitizing json state (#2346)
* Fix

* Fix

* Remove dead code

* Fix lint
2025-12-12 17:55:29 -08:00
Waleed
92db054c53 feat(i18n): update translations (#2345)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-12 17:50:34 -08:00
Waleed
cd7fa688c9 fix(build): fix DB dockerfile (#2344) 2025-12-12 17:11:01 -08:00
Waleed
e359dc2946 fix(cron): reject CRON requests when CRON secret is not set (#2343) 2025-12-12 17:08:48 -08:00
Vikhyath Mondreti
0415eb47fe fix(minor-bugs): grafana, zep, video generation, templates fixes (#2336)
* make creator profile required

* fix grafana tag dropdown / outputs mismatch

* fix grafana annotations to make dashboard id required

* fix fal ai

* fix fal ai

* fix zep
2025-12-12 17:02:36 -08:00
Waleed
49d31c80f5 feat(i18n): update translations (#2339)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-12 16:59:04 -08:00
Waleed
0ea600d0e8 fix(browserbase): consoldiated stagehand agent and extract, updated wand UI to resize based on panel size (#2340) 2025-12-12 16:58:51 -08:00
Waleed
deb085881f chore(db): remove unused table and unused route (#2342) 2025-12-12 16:58:38 -08:00
Waleed
dda44f7382 fix(build): remove incompatible --frozen-lockfile and --omit dev from docker (#2341)
* fix(build): remove incompatible --frozen-lockfile and --omit dev from docker

* ack PR comments
2025-12-12 16:58:23 -08:00
Waleed
668118b19b fix(tools): remove pylon (#2338) 2025-12-12 16:00:52 -08:00
Waleed
323e03520d feat(releases): tag releases to main with version numbers, speed up docker builds (#2337)
* feat(releases): tag releases to main with version numbers, speed up docker builds

* resize runners
2025-12-12 15:57:10 -08:00
Waleed
ffcaa65590 feat(mcp): added the ability to refresh servers to grab new tools (#2335)
* feat(mcp): added the ability to refresh servers to grab new tools

* added tests
2025-12-12 11:22:57 -08:00
Adam Gough
cd66fa84d1 fix(tools): fixed trello and telegram operations (#2332)
* fixed trello output

* fixed telegram

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-11 23:42:10 -08:00
Waleed
045475b9fe feat(i18n): update translations (#2334)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-11 23:39:48 -08:00
Waleed
3334dfeefa fix(firecrawl): updated output for firecrawl extract (#2333)
* fix(firecrawl): fixed optional params for firecrawl

* fix(build): fixed firecrawl tools

* ack PR comments
2025-12-11 23:06:34 -08:00
Waleed
cb9b88127f fix(envvars): added industry standard dotenv parsing regex for adding envvars in settings (#2327)
* fix(envvars): added industry standard dotenv parsing regex for adding envvars in settings

* ack PR comments

* added more edge cases
2025-12-11 22:58:01 -08:00
Waleed
3c8478405c feat(i18n): update translations (#2331) 2025-12-11 21:12:23 -08:00
Waleed
c4fd39df54 fix(firecrawl): fixed optional params for firecrawl (#2329)
* fix(firecrawl): fixed optional params for firecrawl

* fix(typeform): fixed optional params and outputs for typeform

* ack PR comments
2025-12-11 20:39:15 -08:00
Emir Karabeg
06d2db78ff improvement(kb): modals, page layouts (#2330) 2025-12-11 20:35:26 -08:00
Waleed
516dee14b7 feat(i18n): update translations (#2328)
Co-authored-by: aadamgough <aadamgough@users.noreply.github.com>
2025-12-11 18:55:53 -08:00
Adam Gough
030ae5cc0a fix(tools): fixed tool outputs (#2325)
* fix for asana and apify

* fixed onedrive

* fixed confluence error throwing and added upload file

* fixed google vault tag dropdown and output

* fix google group tag dropdown, var reference

* fixed hubspot output

* fixed pipedrive output

* removed comments

* removed more comments

* consolidated file utils

* fixed hubspot json schema

* fix hubspot search tools

* minor change
2025-12-11 18:24:56 -08:00
Waleed
855e2c418c fix(kb): handle larger files in the kb (#2324)
* fix(kb): handle larger files in the kb

* fixed images on login page
2025-12-11 18:22:16 -08:00
Waleed
3bde9e853f fix(mistral): remove wrapped output from mistral parse for kb parsing pdfs (#2326) 2025-12-11 18:15:37 -08:00
Waleed
31b795f8b1 fix(tools): fixed webflow limit and offset params (#2323) 2025-12-11 17:07:25 -08:00
Waleed
57b6bc3684 feat(i18n): update translations (#2321)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-11 15:28:31 -08:00
Esteban Canela
8d4f2e0233 feat(tools): added sqs integration (#2310)
* feat(tools): added sqs integration

* remove console log

* fix linter issues
2025-12-11 15:14:39 -08:00
Waleed
4da5dd7f74 fix(nextjs): upgrade nextjs to patch security vuln (#2320) 2025-12-11 14:58:31 -08:00
Waleed
e24f31cbce v0.5.27: sidebar updates, ssrf patches, gpt-5.2, stagehand fixes 2025-12-11 14:45:25 -08:00
Waleed
3b9cbeaa49 fix(tools): updated browser use and stagehand to use the latest models (#2319)
* fix(stagehand): incl stagehand in the standalone build

* fix(stagehand): updated browser use and stagehand to use the latest models
2025-12-11 14:39:25 -08:00
Waleed
c592e54118 fix(pg): for pg tools, use count isntead of length for number of rows impacted (#2317) 2025-12-11 14:03:00 -08:00
Waleed
d02499a915 fix(ollama): fixed messages array for ollama, added gpt-5.2 (#2315)
* fix(ollama): fixed messages array for ollama, added gpt-5.2

* ack PR comments
2025-12-11 13:51:51 -08:00
Siddharth Ganesan
c0bb85479d fix(parallel): variable resolution in collection (#2314)
* Fix var resolution in parallel

* Fix parallel

* Clean logs

* FIx loop error port
2025-12-11 13:51:22 -08:00
Waleed
b595273c3f fix(vuln): fix dns rebinding/ssrf vulnerability (#2316) 2025-12-11 13:42:28 -08:00
Emir Karabeg
193a15aca4 improvement(sidebar): auto-scroll (#2312)
* fix(sidebar): re-render auto-scroll

* improvement: sidebar-scrolling listener
2025-12-11 12:54:14 -08:00
Vikhyath Mondreti
39d5d797ec fix(workflow-changes): changes detected in autolayout (#2313) 2025-12-11 12:45:48 -08:00
Waleed
3fbd57caf1 v0.5.26: tool fixes, templates and knowledgebase fixes, deployment versions in logs 2025-12-11 00:52:13 -08:00
Waleed
3db8f82449 feat(deployment-version): capture deployment version in log (#2304)
* feat(deployment-version): capture deployment version in log

* improvement: terminal store, logs version, toolbar

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-12-11 00:34:08 -08:00
Waleed
207a14970b fix(dbs): remove harness from validation on user-provided db creds (#2308) 2025-12-11 00:25:48 -08:00
Waleed
0997989f36 fix(x): fix x optional tool params (#2307)
* fix(x): fix x optional tool params

* ack pr comments
2025-12-11 00:09:35 -08:00
Waleed
7fd912d8a9 fix(stagehand): upgraded stagehand sdk to remove deps incomptaible with bun runtime (#2305)
* fix(stagehand): upgraded stagehand sdk to remove deps incomptaible with bun runtime

* ack PR comments
2025-12-10 23:42:33 -08:00
Siddharth Ganesan
c550e4591c fix(condition): fix condition block for no outgoing edge (#2306)
* Fix condition block evaluation

* Lint
2025-12-10 23:24:27 -08:00
Emir Karabeg
a881dc1877 feat(sidebar): scroll to workflow/folder (#2302)
* feat(sidebar): scroll to workflow/folder

* improvement: sidebar scrolling optimizations
2025-12-10 22:08:10 -08:00
Waleed
da36c453b5 feat(i18n): update translations (#2303)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-10 22:07:18 -08:00
Waleed
635823664c fix(tools): fix perplexity & parallel ai tag dropdown inaccuracies (#2300)
* fix(tools): fix perplexity & parallel ai tag dropdown inaccuracies

* fixed stt, tts and added output conditions to conditionally display tag dropdown values based on other subblock values

* updated exa to match latest API
2025-12-10 21:46:31 -08:00
Waleed
14846ab05c feat(i18n): update translations (#2299)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-10 21:16:32 -08:00
Waleed
6c99c841f4 fix(tools): fixed zendesk tools, kb upload failure for md files, stronger typing (#2297)
* fix(tools): fixed zendesk tools, kb upload failure for md files, stronger typing

* ack PR comments
2025-12-10 20:42:16 -08:00
Waleed
37d7902fcd fix(dashboard): prevent dashboard from getting unmounted when on the logs page (#2298) 2025-12-10 20:41:26 -08:00
Emir Karabeg
1e563b1e0a fix(ui/ux): templates and knowledge pages (#2296) 2025-12-10 19:56:23 -08:00
Vikhyath Mondreti
b5da61377c v0.5.25: minor ui improvements, copilot billing fix 2025-12-10 18:32:27 -08:00
Vikhyath Mondreti
1d62ece915 fix(billing): copilot should directly deduct credit balance (#2294) 2025-12-10 18:25:36 -08:00
Emir Karabeg
bbab2ff732 improvement(ui/ux): small styling improvements (#2293)
* improvement: action-bar duplicate, copilot header name truncating, dashboard table scrolling

* improvement: workflow block handle positioning

* improvement: copilot notification fix message

* improvement: dashboard layout, popover hovering

* fix: filtering table into row, workflow name truncating
2025-12-10 17:20:59 -08:00
Waleed
18b7032494 v0.5.24: agent tool and UX improvements, redis service overhaul (#2291)
* feat(folders): add the ability to create a folder within a folder in popover (#2287)

* fix(agent): filter out empty params to ensure LLM can set tool params at runtime (#2288)

* fix(mcp): added backfill effect to add missing descriptions for mcp tools (#2290)

* fix(redis): cleanup access pattern across callsites (#2289)

* fix(redis): cleanup access pattern across callsites

* swap redis command to be non blocking

* improvement(log-details): polling, trace spans (#2292)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
2025-12-10 13:09:21 -08:00
Emir Karabeg
76bc2fae83 improvement(log-details): polling, trace spans (#2292) 2025-12-10 13:08:24 -08:00
Vikhyath Mondreti
1cfe229056 fix(redis): cleanup access pattern across callsites (#2289)
* fix(redis): cleanup access pattern across callsites

* swap redis command to be non blocking
2025-12-10 12:37:33 -08:00
Waleed
6791d968b8 fix(mcp): added backfill effect to add missing descriptions for mcp tools (#2290) 2025-12-10 11:57:18 -08:00
Waleed
163db5cf50 fix(agent): filter out empty params to ensure LLM can set tool params at runtime (#2288) 2025-12-10 11:38:54 -08:00
Waleed
bbbb13af7e feat(folders): add the ability to create a folder within a folder in popover (#2287) 2025-12-10 11:19:57 -08:00
Waleed
b7bbef8620 v0.5.23: kb, logs, general ui improvements, token bucket rate limits, docs, mcp, autolayout improvements (#2286)
* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead (#2273)

* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead

* added backfill, added loading state for tools in settings > mcp

* fix tool inp

* feat(rate-limiter): token bucket algorithm  (#2270)

* fix(ratelimit): make deployed chat rate limited

* improvement(rate-limiter): use token bucket algo

* update docs

* fix

* fix type

* fix db rate limiter

* address greptile comments

* feat(i18n): update translations (#2275)

Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>

* fix(tools): updated kalshi and polymarket tools to accurately reflect outputs (#2274)

* feat(i18n): update translations (#2276)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(autolayout): align by handle (#2277)

* fix(autolayout): align by handle

* use shared constants everywhere

* cleanup

* fix(copilot): fix custom tools (#2278)

* Fix title custom tool

* Checkpoitn (broken)

* Fix custom tool flash

* Edit workflow returns null fix

* Works

* Fix lint

* fix(ime): prevent form submission during IME composition steps (#2279)

* fix(ui): prevent form submission during IME composition steps

* chore(gitignore): add IntelliJ IDE files to .gitignore

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(ui): logs, kb, emcn (#2207)

* feat(kb): emcn alignment; sidebar: popover primary; settings-modal: expand

* feat: EMCN breadcrumb; improvement(KB): UI

* fix: hydration error

* improvement(KB): UI

* feat: emcn modal sizing, KB tags; refactor: deleted old sidebar

* feat(logs): UI

* fix: add documents modal name

* feat: logs, emcn, cursorrules; refactor: logs

* feat: dashboard

* feat: notifications; improvement: logs details

* fixed random rectangle on canvas

* fixed the name of the file to align

* fix build

---------

Co-authored-by: waleed <walif6@gmail.com>

* fix(creds): glitch allowing multiple credentials in an integration (#2282)

* improvement: custom tools modal, logs-details (#2283)

* fix(docs): fix copy page button and header hook (#2284)

* improvement(chat): add the ability to download files from the deployed chat (#2280)

* added teams download and chat download file

* Removed comments

* removed comments

* component structure and download all

* removed comments

* cleanup code

* fix empty files case

* small fix

* fix(container): resize heuristic improvement (#2285)

* estimate block height for resize based on subblocks

* fix hydration error

* make more conservative

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: mosa <mosaxiv@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
2025-12-10 00:57:58 -08:00
Vikhyath Mondreti
6fd4087a79 fix(container): resize heuristic improvement (#2285)
* estimate block height for resize based on subblocks

* fix hydration error

* make more conservative
2025-12-10 00:20:03 -08:00
Adam Gough
cb6e763714 improvement(chat): add the ability to download files from the deployed chat (#2280)
* added teams download and chat download file

* Removed comments

* removed comments

* component structure and download all

* removed comments

* cleanup code

* fix empty files case

* small fix
2025-12-09 22:08:03 -08:00
Waleed
d06b360b1d fix(docs): fix copy page button and header hook (#2284) 2025-12-09 21:58:54 -08:00
Emir Karabeg
0713580862 improvement: custom tools modal, logs-details (#2283) 2025-12-09 21:50:09 -08:00
Vikhyath Mondreti
f421f27d3f fix(creds): glitch allowing multiple credentials in an integration (#2282) 2025-12-09 21:07:14 -08:00
Emir Karabeg
0083c89fa5 feat(ui): logs, kb, emcn (#2207)
* feat(kb): emcn alignment; sidebar: popover primary; settings-modal: expand

* feat: EMCN breadcrumb; improvement(KB): UI

* fix: hydration error

* improvement(KB): UI

* feat: emcn modal sizing, KB tags; refactor: deleted old sidebar

* feat(logs): UI

* fix: add documents modal name

* feat: logs, emcn, cursorrules; refactor: logs

* feat: dashboard

* feat: notifications; improvement: logs details

* fixed random rectangle on canvas

* fixed the name of the file to align

* fix build

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-09 20:50:28 -08:00
mosa
3cec449402 fix(ime): prevent form submission during IME composition steps (#2279)
* fix(ui): prevent form submission during IME composition steps

* chore(gitignore): add IntelliJ IDE files to .gitignore

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-09 19:58:33 -08:00
Siddharth Ganesan
c5b3fcb181 fix(copilot): fix custom tools (#2278)
* Fix title custom tool

* Checkpoitn (broken)

* Fix custom tool flash

* Edit workflow returns null fix

* Works

* Fix lint
2025-12-09 17:42:17 -08:00
Vikhyath Mondreti
dd7db6e144 fix(autolayout): align by handle (#2277)
* fix(autolayout): align by handle

* use shared constants everywhere

* cleanup
2025-12-09 16:28:25 -08:00
Waleed
306043eedb feat(i18n): update translations (#2276)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-09 16:20:43 -08:00
Waleed
569598b39e fix(tools): updated kalshi and polymarket tools to accurately reflect outputs (#2274) 2025-12-09 15:35:36 -08:00
Waleed
cc66aa5a3e feat(i18n): update translations (#2275)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-09 15:25:03 -08:00
Vikhyath Mondreti
aea32d423f feat(rate-limiter): token bucket algorithm (#2270)
* fix(ratelimit): make deployed chat rate limited

* improvement(rate-limiter): use token bucket algo

* update docs

* fix

* fix type

* fix db rate limiter

* address greptile comments
2025-12-09 14:57:17 -08:00
Waleed
22abf98835 fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead (#2273)
* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead

* added backfill, added loading state for tools in settings > mcp

* fix tool inp
2025-12-09 12:44:53 -08:00
Waleed
52edbea659 v0.5.22: rss feed trigger, sftp tool, billing fixes, 413 surfacing, copilot improvements 2025-12-09 10:27:36 -08:00
Waleed
aa1d896b38 feat(i18n): update translations (#2268)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-09 00:46:09 -08:00
Waleed
2fcd07e82d feat(triggers): added rss feed trigger & poller (#2267) 2025-12-08 23:07:07 -08:00
Vikhyath Mondreti
0db5ba1b27 fix(org-limits): remove fallbacks for enterprise plan (#2255)
* fix(org-limits): remove fallbacks for enterprise plan

* remove comment

* remove comments

* make logger use new helper
2025-12-08 21:43:43 -08:00
Waleed
e390ba0491 feat(dropdowns): added searchbox to the operation dropdown for all blocks (#2266) 2025-12-08 20:54:59 -08:00
Vikhyath Mondreti
2f0509adaf fix(nextjs-size-limit): surface 413s accurately (#2265)
* fix(api-call-size-limit): cannot exceed nextjs size limits

* fix

* Convert to buffer

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
2025-12-08 20:54:25 -08:00
Waleed
9f0584a818 feat(redis): added redis option for rate limiter, 10x speed improvement in rate limit checks & reduction of DB load (#2263)
* feat(redis): added redis option for rate limiter, 10x speed improvement in rate limit checks & reduction of DB load

* ack PR comments

* improvements
2025-12-08 20:39:29 -08:00
Siddharth Ganesan
6b4d76298f fix(custom-tools, copilot): custom tools state + copilot fixes (#2264)
* Workspace env vars

* Fix execution animation on copilot run

* Custom tools toolg

* Custom tools

* Fix custom tool

* remove extra fallback

* Fix lint
2025-12-08 20:14:49 -08:00
Vikhyath Mondreti
b7a1e8f5cf fix(pre-proc-checks): deployed checks should precede cost/ratelimit increments" (#2250) 2025-12-08 20:04:21 -08:00
Waleed
3ce2788562 feat(i18n): update translations (#2262)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 19:40:42 -08:00
Waleed
17a084cd61 feat(copilot): updated copilot keys to have names, full parity with API keys page (#2260) 2025-12-08 19:28:40 -08:00
Waleed
dafd2f5ce8 feat(tools): added sftp tool to accompany smtp and ssh tools (#2261) 2025-12-08 19:21:10 -08:00
Waleed
5af67d08ba feat(i18n): update translations (#2259)
* feat(i18n): update translations

* fix chinese page

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 17:58:49 -08:00
Waleed
209b0f1906 feat(tools): added duckduckgo (#2258) 2025-12-08 17:34:18 -08:00
Waleed
e067b584ee feat(admin): updated admin routes to consolidate duplicate behavior (#2257)
* feat(admin): updated admin routes to consolidate duplicate behavior

* ack PR comments
2025-12-08 17:29:55 -08:00
Waleed
87084edbe6 fix(timeouts): increased timeouts for function execution & agent (#2256) 2025-12-08 16:25:58 -08:00
Vikhyath Mondreti
99e0b81233 improvement(org): remove dead seats get endpoint (#2247)
* improvement(org): remove dead seats get endpoint

* remove more dead code

* remove fallback limit
2025-12-08 15:38:08 -08:00
Vikhyath Mondreti
d480057fd3 fix(migration): migration got removed by force push (#2253) 2025-12-08 14:08:12 -08:00
Vikhyath Mondreti
c197b04bcc fix(migration): migration got removed by force push (#2253) 2025-12-08 14:07:03 -08:00
Waleed
c27c233da0 v0.5.21: google groups, virtualized code viewer, ui, autolayout, docs improvements 2025-12-08 13:10:50 -08:00
Waleed
4fb039f3e8 feat(i18n): update translations (#2249)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 12:44:37 -08:00
Waleed
feb591867e fix(docs): fix salesforce docs & update styling (#2248) 2025-12-08 12:08:53 -08:00
Waleed
598c3bc684 feat(i18n): update translations (#2246)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-08 10:45:48 -08:00
Vikhyath Mondreti
01b2f809d1 feat(cursor): add cursor block and tools (#2245)
* fix(autolayout): reduce horizontal spacing in autolayout

* feat(cursor): add cursor cloud agents tools

* address greptile prompt
2025-12-08 09:49:28 -08:00
Waleed
d200f664e8 feat(i18n): update translations (#2244)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 00:26:39 -08:00
Waleed
e2b077f582 fix(conditional): don't error in condition blocks when no conditions are satisfied (#2243)
* fix(conditional): don't error in condition blocks when no conditions are satisfied

* updated docs
2025-12-08 00:15:51 -08:00
Waleed
d09fd6cf92 fix(import): fixed trigger save on export/import flow (#2239)
* fix(import): fixed trigger save on export/import flow

* optimized test runners

* ack PR comments
2025-12-07 23:00:28 -08:00
Vikhyath Mondreti
434d12956e fix(autolayout): reduce horizontal spacing in autolayout (#2240) 2025-12-07 22:36:10 -08:00
Waleed
b49b8eeb9d feat(i18n): update translations (#2238)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-07 19:43:12 -08:00
Waleed
5b9f3d3d02 feat(docs): added additional self-hosting documentation (#2237)
* feat(docs): added additional self-hosting documentation

* added more
2025-12-07 19:25:44 -08:00
Vikhyath Mondreti
05022e3468 fix(copilot-autolayout): more subflow cases and deal with resizing (#2236)
* fix sidebar hydration issue accurately

* improve autolayout subflow cases

* fix DOM structure to prevent HMR hydration issues
2025-12-07 19:14:18 -08:00
Vikhyath Mondreti
9f884c151c feat(credits): prepurchase credits (#2174)
* add credit balances

* add migrations

* remove handling for disputes

* fix idempotency key

* prep merge into staging

* code cleanup

* add back migration + prevent enterprise from purchasing credits

* remove circular import

* add dispute blocking

* fix lint

* fix: hydration error

* remove migration before merge staging
'

* moved credits addition to invoice payment success

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-12-06 19:11:58 -08:00
Adam Gough
92c03b825b improvement(salesforce): fixed refresh and added endpoints (#2177)
* added salesforce other tools

* modified scope and change salesforce refresh

* fixed refresh

* remove dup code
2025-12-06 19:03:25 -08:00
Vikhyath Mondreti
e9d53042f6 fix(inactivity-notif): add cron to helm (#2235) 2025-12-06 18:54:58 -08:00
Waleed
22c9384f19 improvement(code): removed dedicated code-optimized virtualized viewer, baked it into the code component (#2234)
* improvement(code): removed dedicated code-optimized virtualized viewer, baked it into the code component

* ack PR comments
2025-12-06 18:12:51 -08:00
Waleed
6e02a73259 feat(i18n): update translations (#2233)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-06 17:57:46 -08:00
Adam Gough
683b4476fa fix(google-drive): added support for shared drive (#2232)
* added param for shared drive

* removed comments

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-06 17:37:02 -08:00
Adam Gough
ae7937280e feat(google-groups): added google groups (#2229)
* added google-groups

* added a few more endpoints

* removed comments

* removed named imports, fixed comments

* fixed google groups tool names

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: waleed <walif6@gmail.com>
2025-12-06 17:32:30 -08:00
Waleed
ebef5f3a27 v0.5.20: google slides, ui fixes, subflow resizing improvements 2025-12-06 15:36:09 -08:00
Waleed
7bfc6ebe48 fix(copilot): fixed copilot code component overflowing gutter (#2230) 2025-12-06 15:20:41 -08:00
Vikhyath Mondreti
23ef39de72 improvement(ui): revert settings > envvar ui (#2227) 2025-12-06 14:26:39 -08:00
Waleed
507fc112be feat(admin): added more billing, subscriptions, and organization admin API routes (#2225)
* feat(admin): added more billing, subscriptions, and organization admin API routes

* cleanup

* ack PR comments

* cleanup

* ack PR comment
2025-12-06 14:13:50 -08:00
Waleed
26670e289d fix(hosted): fixed hosted providers to exact string match model names rather than check provider names (#2228) 2025-12-06 13:33:34 -08:00
Waleed
e52bd575e7 feat(i18n): update translations (#2226)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-06 13:33:00 -08:00
Emir Karabeg
0b28128f25 feat(tools): google slides tool, terminal console virtualization, tool fixes (#2209)
* feat: google slides tool

* fix oauth for slides, add remaining endpoints, update docs

* optimize json dump viewer using react window

* change slides to use google drive credentials

* fix some tools

* ack PR comments

---------

Co-authored-by: waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-06 12:16:21 -08:00
Vikhyath Mondreti
a50edf8131 fix(autolayout): subflow calculation (#2223)
* fix(autolayout): subflow calculation

* cleanup code

* fix missing import

* add back missing import
2025-12-05 16:31:10 -08:00
Vikhyath Mondreti
12c4c2d44f v0.5.19: copilot fix 2025-12-05 15:27:31 -08:00
Siddharth Ganesan
656dfafb8f fix(copilot): fix function execute tool (#2222) 2025-12-05 15:19:39 -08:00
Siddharth Ganesan
9f604f379e fix(copilot): fix tool call flash (#2221)
* Fix copilot tool call flash

* Fix lint
2025-12-05 15:12:35 -08:00
Siddharth Ganesan
75da06adf8 fix(copilot): fix hanging tool calls (#2218) 2025-12-05 14:59:38 -08:00
Vikhyath Mondreti
929a352edb fix(build): added trigger.dev sdk mock to tests (#2216) 2025-12-05 14:26:50 -08:00
Vikhyath Mondreti
c7b473f55f fix(build): added trigger.dev sdk mock to tests (#2216) 2025-12-05 14:24:52 -08:00
Vikhyath Mondreti
6cd078b0fe v0.5.18: ui fixes, nextjs16, workspace notifications, admin APIs, loading improvements, new slack tools 2025-12-05 14:03:09 -08:00
Vikhyath Mondreti
fb4c9827f8 fix(custom-bot-slack): dependsOn incorrectly set for bot_token (#2214)
* fix(custom-bot-slack): dependsOn incorrectly set for bot_token"

* fix other references to be compatible

* fix dependsOn for things depending on authMethod"
2025-12-05 13:54:52 -08:00
Siddharth Ganesan
4fd5f0051f fix(copilot): validation (#2215)
* Fix validation error

* Fix lint
2025-12-05 13:46:50 -08:00
Waleed
002713ec4b feat(i18n): update translations (#2208)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-05 13:29:44 -08:00
Waleed
5d6c1f7b88 feat(tools): added more slack tools (#2212) 2025-12-05 13:22:35 -08:00
Siddharth Ganesan
7752beac01 fix(import): fix array errors on import/export (#2211)
* Fix import/export

* Remove copilot gdrive tools

* Null

* Fix lint

* Add copilot validation

* Fix validation
2025-12-05 13:07:01 -08:00
Emir Karabeg
7101dc58d4 improvement: loading, optimistic actions (#2193)
* improvement: loading, optimistic operations

* improvement: folders update

* fix usage indicator rounding + new tsconfig

* remove redundant checks

* fix hmr case for missing workflow loads

* add abstraction for zustand/react hybrid optimism

* remove comments

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-05 13:01:12 -08:00
Siddharth Ganesan
58251e28e6 feat(copilot): superagent (#2201)
* Superagent poc

* Checkpoint brokeN

* tool call rag

* Fix

* Fixes

* Improvements

* Creds stuff

* Fix

* Fix tools

* Fix stream

* Prompt

* Update sheets descriptions

* Better

* Copilot components

* Delete stuff

* Remove db migration

* Fix migrations

* Fix things

* Copilot side superagent

* Build workflow from chat

* Combine superagent into copilkot

* Render tools

* Function execution

* Max mode indicators

* Tool call confirmations

* Credential settings

* Remove betas

* Bump version

* Dropdown options in block metadata

* Copilot kb tools

* Fix lint

* Credentials modal

* Fix lint

* Cleanup

* Env var resolution in superagent tools

* Get id for workflow vars

* Fix insert into subflow

* Fix executor for while and do while loops

* Fix metadata for parallel

* Remove db migration

* Rebase

* Add migrations back

* Clean up code

* Fix executor logic issue

* Cleanup

* Diagram tool

* Fix tool naems

* Comment out g3p

* Remove popup option

* Hide o3

* Remove db migration

* Fix merge conflicts

* Fix lint

* Fix tests

* Remove webhook change

* Remove cb change

* Fix lint

* Fix

* Fix lint

* Fix build

* comment out gemini

* Add gemini back

* Remove bad test

* Fix

* Fix test

* Fix

* Nuke bad test

* Fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-04 21:26:18 -08:00
Vikhyath Mondreti
8ef9a45125 fix(env-vars): refactor for workspace/personal env vars to work with server side execution correctly (#2197)
* fix(env-var-resolution): new executor env var resolution changes

* add sessionuser id"

* cleanup code

* add doc update

* fix build

* fix client session pass through"

* add type change

* fix env var with hitl

* fix types
2025-12-04 21:08:20 -08:00
Waleed
ca818a6503 feat(admin): added admin APIs for admin management (#2206) 2025-12-04 20:52:32 -08:00
Waleed
1b903f2db5 fix(images): updated helm charts with branding URL guidance, removed additional nextjs image optimizations (#2205) 2025-12-04 19:39:51 -08:00
Waleed
414a54c358 feat(i18n): update translations (#2204)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-04 19:03:03 -08:00
Vikhyath Mondreti
3b9f0f9ce2 feat(error-notifications): workspace-level configuration of slack, email, webhook notifications for workflow execution (#2157)
* feat(notification): slack, email, webhook notifications from logs

* retain search params for filters to link in notification

* add alerting rules

* update selector

* fix lint

* add limits on num of emails and notification triggers per workspace

* address greptile comments

* add search to combobox

* move notifications to react query

* fix lint

* fix email formatting

* add more alert types

* fix imports

* fix test route

* use emcn componentfor modal

* refactor: consolidate notification config fields into jsonb objects

* regen migration

* fix delete notif modal ui

* make them multiselect dropdowns

* update tag styling

* combobox font size with multiselect tags'
2025-12-04 18:29:22 -08:00
Waleed
dcbdcb43aa chore(deps): upgrade to nextjs 16 (#2203)
* chore(deps): upgrade to nextjs 16

* upgraded fumadocs

* ensure vercel uses bun

* fix build

* fix bui;d

* remove redundant vercel.json
2025-12-04 17:55:37 -08:00
Emir Karabeg
1642ed754b improvement: modal UI (#2202)
* fix: trigger-save delete modal

* improvement: old modal styling
2025-12-04 17:10:59 -08:00
Vikhyath Mondreti
d22b5783be fix(enterprise-plan): seats should be taken from metadata (#2200)
* fix(enterprise): seats need to be picked up from metadata not column

* fix env var access

* fix user avatar
2025-12-04 16:22:29 -08:00
Waleed
8e7d8c93e3 fix(profile-pics): remove sharp dependency for serving profile pics in settings (#2199) 2025-12-04 15:46:10 -08:00
Waleed
ca3eb5b5a5 fix(subscription): fixed text clipping on subscription panel (#2198) 2025-12-04 15:12:50 -08:00
Waleed
dc5a2b1ad1 fix(envvar): fix envvar dropdown positioning, remove dead code (#2196) 2025-12-04 14:35:25 -08:00
Waleed
3f84ed9b72 fix(settings): fix long description on wordpress integration (#2195) 2025-12-04 14:10:50 -08:00
Waleed
31874939ee v0.5.17: modals, billing fixes, bun update, zoom, dropbox, kalshi, polymarket, datadog, ahrefs, gitlab, shopify, ssh, wordpress integrations 2025-12-04 13:29:46 -08:00
Waleed
b54ca604b6 fix(chat): fix download & clear popover staying open after pressing in floating chat (#2192) 2025-12-04 13:03:12 -08:00
Waleed
e581608472 fix(copilot): fix code viewer in copilot user inp (#2191) 2025-12-04 12:50:11 -08:00
Emir Karabeg
a4d4dfaa32 fix: tooltip on env settings (#2190) 2025-12-04 12:39:37 -08:00
Waleed
099e86e3c1 fix(settings): fixed sso form validation (#2189) 2025-12-04 12:34:28 -08:00
Emir Karabeg
042de6a944 fix: modals, settings, panel (#2187) 2025-12-04 12:01:36 -08:00
Waleed
f44e7e34ec fix(input): allow test value if no real value provided for inputs in deployed executions (#2186)
* fix(input): allow test value if no real value provided for inputs in deployed executions

* ack PR comments
2025-12-04 11:41:08 -08:00
Waleed
6bfb643ef8 fix(polling): fixed gmail and outlook polling to respect disabled status (#2185) 2025-12-04 11:31:33 -08:00
Siddharth Ganesan
cd5d1c0958 fix(executor): nested error activation (#2184) 2025-12-04 10:55:26 -08:00
Waleed
9df87d9b88 fix(mcp): remove client-side cache and reduce server cache from 5m to 30s (#2182)
* fix(mcp): remove client-side cache and reduce server cache from 5m to 30s

* ack PR comments
2025-12-04 08:51:06 -08:00
Waleed
c864d17991 chore(deps): upgrade to bun v1.3 (#2181)
* chore(deps): upgrade to bun v1.3

* ack PR comments
2025-12-04 00:43:01 -08:00
Emir Karabeg
36c91f4ca9 feat: terminal serach; fix: delete-modal (#2176) 2025-12-04 00:41:38 -08:00
Waleed
6d4ba6d5cf chore(deps): upgrade from nextjs 15.4.1 to 15.4.8 and upgrade turborepo (#2180) 2025-12-04 00:20:50 -08:00
Waleed
5d791cd55f feat(i18n): update translations (#2178)
* feat(i18n): update translations

* memory optimizations

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-04 00:18:21 -08:00
Waleed
5630e133fd feat(tools): added zoom, elasticsearch, dropbox, kalshi, polymarket, datadog, ahrefs, gitlab, shopify, ssh, wordpress (#2175)
* feat(tools): added zoom, elasticsearch, dropbox, box, datadog, ahrefs, gitlab, shopify, ssh, wordpress

* added polymarket & kalshi, fixed ssh

* fix search modal bg instead of bgColor, added polymarket and kalshi new endpoints

* split up grafana

* update docs script & docs

* added more zoom endpoints

* remove unused box creds

* finished wordpress, shopify, kalshi

* cleanup

* revert envvar dropdown changes

* updated grafana endpoints
2025-12-03 20:09:27 -08:00
Emir Karabeg
08a11935af fix: commented out light mode (#2173) 2025-12-03 16:52:35 -08:00
Emir Karabeg
3158b62da8 feat: light, emcn, modals (#2104)
* feat: aligned current unassigned hex to old globals

* feat: emcn modal, help-modal; improvement(ui): emcn textarea, emcn combobox, messages-input

* improvement(modal): ui, transition

* improvement: terminal expand, variables styling; refactor(float): hooks

* improvement(invite-modal): emcn aligned

* feat(terminal): height memory

* improvement(invite-modal): skeleton ui

* improvement(invite-modal): badges UI

* feat: deploy-modal, emcn

* refactor: deleted duplicate dark styles

* feat: emcn, settings, light

* improvement: emcn, settings

* improvement: settings-modal, emcn

* improvement: SSO, light-mode

* improvement: EMCN, light

* fix issues, run lint

* fix: reverted mock data
2025-12-03 16:31:27 -08:00
Waleed
e157ce5fbc v0.5.16: MCP fixes, code refactors, jira fixes, new mistral models 2025-12-02 22:02:11 -08:00
Vikhyath Mondreti
7de721e090 fix(logs): logging with error issues for model costs (#2169)
* fix(async-execution): restore async executions

* fix schedules trace span collection'

* fix execution trace spans for schedules + cost tracking when workflow errors
2025-12-02 20:54:17 -08:00
Waleed
3e83fb398c fix(trace-spans): fix input/output token count in trace spans (#2168) 2025-12-02 20:36:16 -08:00
Waleed
a6e3c92c10 fix(jira): fixed incorrect dependsOn for jira project/issue subblcks (#2167) 2025-12-02 20:18:01 -08:00
Vikhyath Mondreti
9670d96eca fix(templates-page): loading issue due to loading extensive workflow block in preview for all listings (#2166)
* fix(templates-page): loading issue due to loading extensive workflow block in preview for all listings

* add more properties
2025-12-02 19:47:48 -08:00
Waleed
eb0d4cbd57 fix(templates): fixed verified creator status displaying & tooltip on templates (#2165) 2025-12-02 19:23:35 -08:00
Waleed
ffd12e1da4 fix(subblocks): update guardrails pii selector component to use emcn (#2164) 2025-12-02 18:36:34 -08:00
Waleed
84c2335a37 feat(i18n): update translations (#2163)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-02 16:37:30 -08:00
Waleed
2ab8cec8c3 fix(icons): fix mailgun, restore tts and smtp blocks (#2162)
* fix(icons): fix mailgun

* register smtp block that was missing
2025-12-02 16:21:43 -08:00
Waleed
bf54c88ae4 feat(models): added xai models and updated gemini pricing (#2161) 2025-12-02 14:31:23 -08:00
Waleed
41c068c023 improvement(lib): refactored lib/ to be more aligned with queries and api directory (#2160)
* fix(lib): consolidate into core dir in lib/

* refactored lib/
2025-12-02 14:17:41 -08:00
Waleed
6fda9bd72e feat(models): added latest mistral models (#2159) 2025-12-02 13:46:00 -08:00
Waleed
3b4f227e43 fix(mcp): reuse sessionID for consecutive MCP tool calls, fix dynamic args clearing, fix refreshing tools on save (#2158)
* fix(mcp): reuse sessionID for consecutive MCP tool calls, fix dynamic args clearing, fix refreshing tools on save

* prevent defaults

* fix subblock text area

* added placeholders in tool-inp for mcp dynamic args

* ack PR comments
2025-12-02 12:37:59 -08:00
Siddharth Ganesan
0ae7eb197a improvement(agent): switch default model to claude 4.5 sonnet (#2156)
* Switch default model to claude 4.5 sonnet

* Fix defaults

* Switch back to medium
2025-12-01 18:34:46 -08:00
Waleed
304b5d9c7e feat(i18n): update translations (#2153)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-01 15:15:13 -08:00
Waleed
ee3e1e8cf9 fix(docs): update docs to background instead of backgroundColor (#2154) 2025-12-01 14:16:23 -08:00
Vikhyath Mondreti
774e5d585c v0.5.15: add tools, revert subblock prop change 2025-12-01 13:52:12 -08:00
Vikhyath Mondreti
ede41af674 fix(selector): remove subblock state prop for subblock component (#2151) 2025-12-01 13:46:32 -08:00
Waleed
cb0c55c6f6 feat(tools): added rds, dynamodb, background color gradient (#2150)
* feat(tools): added rds tools/block

* feat(tools): added rds, dynamodb, background color gradient

* changed conditions for WHERE condition to be json conditions instead of raw string
2025-12-01 13:42:05 -08:00
Vikhyath Mondreti
54cc93743f v0.5.14: fix issue with teams, google selectors + cleanup code 2025-12-01 12:39:39 -08:00
Vikhyath Mondreti
d22b21c8d1 improvement(selectors): make serviceId sole source of truth (#2128)
* improvement(serviceId): make serviceId sole source of truth

* incorrect gmail service id

* fix teams selectors

* fix linkedin
2025-12-01 12:33:26 -08:00
Waleed
8c32ad4c0d v0.5.13: polling fixes, generic agent search tool, status page, smtp, sendgrid, linkedin, more tools (#2148)
* feat(tools): added smtp, sendgrid, mailgun, linkedin, fixed permissions in context menu (#2133)

* feat(tools): added twilio sendgrid integration

* feat(tools): added smtp, sendgrid, mailgun, fixed permissions in context menu

* added top level mocks for sporadically failing tests

* incr type safety

* fix(team-plans): track departed member usage so value not lost (#2118)

* fix(team-plans): track departed member usage so value not lost

* reset usage to 0 when they leave team

* prep merge with stagig

* regen migrations

* fix org invite + ws selection'

---------

Co-authored-by: Waleed <walif6@gmail.com>

* feat(i18n): update translations (#2134)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(creators): add verification for creators (#2135)

* feat(tools): added apify block/tools  (#2136)

* feat(tools): added apify

* cleanup

* feat(i18n): update translations (#2137)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(env): added more optional env var examples (#2138)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes (#2139)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes

* ack PR comments

* feat(tools): add generic search tool (#2140)

* feat(i18n): update translations (#2141)

* fix(sdks): bump sdk versions (#2142)

* fix(webhooks): count test webhooks towards usage limit (#2143)

* fix(bill): add requestId to webhook processing (#2144)

* improvement(subflow): remove all associated edges when moving a block into a subflow (#2145)

* improvement(subflow): remove all associated edges when moving a block into a subflow

* ack PR comments

* fix(polling): mark webhook failed on webhook trigger errors (#2146)

* fix(deps): declare core transient deps explicitly (#2147)

* fix(deps): declare core transient deps explicitly

* ack PR comments

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-01 10:15:36 -08:00
Waleed
1e080e98e8 fix(deps): declare core transient deps explicitly (#2147)
* fix(deps): declare core transient deps explicitly

* ack PR comments
2025-12-01 09:51:00 -08:00
Waleed
b069034d9c fix(polling): mark webhook failed on webhook trigger errors (#2146) 2025-12-01 08:18:41 -08:00
Waleed
3a4f130f69 improvement(subflow): remove all associated edges when moving a block into a subflow (#2145)
* improvement(subflow): remove all associated edges when moving a block into a subflow

* ack PR comments
2025-11-30 23:20:51 -08:00
Waleed
e80feee51f fix(bill): add requestId to webhook processing (#2144) 2025-11-30 21:21:54 -08:00
Waleed
7f62467f84 fix(webhooks): count test webhooks towards usage limit (#2143) 2025-11-30 20:28:36 -08:00
Waleed
7b2792122d fix(sdks): bump sdk versions (#2142) 2025-11-30 19:47:58 -08:00
Waleed
4e9cab39c3 feat(i18n): update translations (#2141) 2025-11-30 14:23:27 -08:00
Waleed
e3a57d30e8 feat(tools): add generic search tool (#2140) 2025-11-30 14:13:46 -08:00
Waleed
f25db707d7 feat(statuspage): added statuspage, updated list of tools in footer, renamed routes (#2139)
* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes

* ack PR comments
2025-11-30 10:46:18 -08:00
Waleed
08d57b4f8b feat(env): added more optional env var examples (#2138) 2025-11-30 09:13:39 -08:00
Waleed
f56d85bda6 feat(i18n): update translations (#2137)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-30 09:07:35 -08:00
Waleed
d7a650a355 feat(tools): added apify block/tools (#2136)
* feat(tools): added apify

* cleanup
2025-11-29 23:42:43 -08:00
Waleed
a8f87f7e3a feat(creators): add verification for creators (#2135) 2025-11-29 20:58:18 -08:00
Waleed
9330940658 feat(i18n): update translations (#2134)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-29 20:30:56 -08:00
Vikhyath Mondreti
fc5f815c7a fix(team-plans): track departed member usage so value not lost (#2118)
* fix(team-plans): track departed member usage so value not lost

* reset usage to 0 when they leave team

* prep merge with stagig

* regen migrations

* fix org invite + ws selection'

---------

Co-authored-by: Waleed <walif6@gmail.com>
2025-11-29 18:27:12 -08:00
Waleed
7bf9251db1 feat(tools): added smtp, sendgrid, mailgun, linkedin, fixed permissions in context menu (#2133)
* feat(tools): added twilio sendgrid integration

* feat(tools): added smtp, sendgrid, mailgun, fixed permissions in context menu

* added top level mocks for sporadically failing tests

* incr type safety
2025-11-29 17:58:42 -08:00
Waleed
1d08796853 v0.5.12: memory optimizations, sentry, incidentio, posthog, zendesk, pylon, intercom, mailchimp, loading optimizations (#2132)
* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures (#2115)

* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures

* ack PR comments

* ack

* improvement(teams-plan): seats increase simplification + not triggering checkout session (#2117)

* improvement(teams-plan): seats increase simplification + not triggering checkout session

* cleanup via helper

* feat(tools): added sentry, incidentio, and posthog tools (#2116)

* feat(tools): added sentry, incidentio, and posthog tools

* update docs

* fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues

* cleanup

* enhance error extractor, fixed posthog tools

* docs enhancements, cleanup

* added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow

* fix type errors

* remove unnecessary comments

* added vllm to docs

* feat(i18n): update translations (#2120)

* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* improvement(workflow-execution): perf improvements to passing workflow state + decrypted env vars (#2119)

* improvement(execution): load workflow state once instead of 2-3 times

* decrypt only in get helper

* remove comments

* remove comments

* feat(models): host google gemini models (#2122)

* feat(models): host google gemini models

* remove unused primary key

* feat(i18n): update translations (#2123)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(tools): added zendesk, pylon, intercom, & mailchimp (#2126)

* feat(tools): added zendesk, pylon, intercom, & mailchimp

* finish zendesk and pylon

* updated docs

* feat(i18n): update translations (#2129)

* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal (#2130)

* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal

* fix failing test

* fix test

* cleanup

* fix(custom-tools): add composite index on custom tool names & workspace id (#2131)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-28 16:08:06 -08:00
Waleed
21a640af50 fix(custom-tools): add composite index on custom tool names & workspace id (#2131) 2025-11-28 15:33:08 -08:00
Waleed
a10e1a63af fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal (#2130)
* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal

* fix failing test

* fix test

* cleanup
2025-11-28 12:24:22 -08:00
Waleed
be91cd3794 feat(i18n): update translations (#2129)
* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-27 18:35:31 -08:00
Waleed
1ee49ae611 feat(tools): added zendesk, pylon, intercom, & mailchimp (#2126)
* feat(tools): added zendesk, pylon, intercom, & mailchimp

* finish zendesk and pylon

* updated docs
2025-11-27 16:33:47 -08:00
Waleed
aab1b3f259 feat(i18n): update translations (#2123)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-26 12:53:17 -08:00
Waleed
8000394e98 feat(models): host google gemini models (#2122)
* feat(models): host google gemini models

* remove unused primary key
2025-11-26 12:30:20 -08:00
Vikhyath Mondreti
0830490d32 improvement(workflow-execution): perf improvements to passing workflow state + decrypted env vars (#2119)
* improvement(execution): load workflow state once instead of 2-3 times

* decrypt only in get helper

* remove comments

* remove comments
2025-11-26 12:02:55 -08:00
Waleed
93e1c513b2 feat(i18n): update translations (#2120)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-25 21:35:15 -08:00
Waleed
ff79b78b5f feat(tools): added sentry, incidentio, and posthog tools (#2116)
* feat(tools): added sentry, incidentio, and posthog tools

* update docs

* fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues

* cleanup

* enhance error extractor, fixed posthog tools

* docs enhancements, cleanup

* added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow

* fix type errors

* remove unnecessary comments

* added vllm to docs
2025-11-25 19:50:23 -08:00
Vikhyath Mondreti
3a3c946607 improvement(teams-plan): seats increase simplification + not triggering checkout session (#2117)
* improvement(teams-plan): seats increase simplification + not triggering checkout session

* cleanup via helper
2025-11-25 19:00:12 -08:00
Waleed
7b7586d093 fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures (#2115)
* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures

* ack PR comments

* ack
2025-11-25 14:15:46 -08:00
Waleed
ebcd243942 v0.5.11: stt, videogen, vllm, billing fixes, new models 2025-11-25 01:14:12 -08:00
Siddharth Ganesan
d413bcdfb0 feat(copilot): add claude opus 4.5 and remove context usage indicator (#2113)
* Add claude opus 4.5 to copilot and remove context usage indicator

* Lint
2025-11-24 16:40:55 -08:00
Siddharth Ganesan
ff768ca410 fix(copilot): fix webhook triggers unsaving in new diff store (#2096)
* Fix copilot trigger unsave

* Fix for schedules

* fix lint

* hide schedule save subblock from preview

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-24 16:06:11 -08:00
Vikhyath Mondreti
bbaf7e90f8 improvement(autolayout): simplify code to use fixed block widths, height + refactor (#2112)
* improvement(autolayout): simplify code to use fixed block widths, height + refactor

* change to aliased imports
2025-11-24 13:13:28 -08:00
Waleed
c80827f21b feat(agent): added workflow, kb, and function as a tool for agent block, fix keyboard nav in tool input (#2107)
* feat(agent): added workflow, kb, and function as a tool for agent block

* fix keyboard nav and keyboard selection in tool-inp

* ack PR comments

* remove custom tool changes

* fixed kb tools for agent

* cleanup
2025-11-24 12:16:02 -08:00
Waleed
a5b7897b34 feat(models): added claude opus 4.5 (#2111)
* feat(models): added claude opus 4.5

* add to copilot dropdown
2025-11-24 12:12:30 -08:00
Vikhyath Mondreti
c6482f2997 fix(billing): only check owners for billed overages (#2085) 2025-11-24 11:30:29 -08:00
Adam Gough
bf1719a294 added new scope (#2110) 2025-11-24 10:34:51 -08:00
Waleed
619cab162d feat(i18n): update translations (#2106)
Co-authored-by: aadamgough <aadamgough@users.noreply.github.com>
2025-11-22 21:25:53 -08:00
Adam Gough
72776f4402 improvement(docs): added docs content (#2105) 2025-11-22 17:52:56 -08:00
Waleed
6114c213d2 feature(models): added vllm provider (#2103)
* Add vLLM self-hosted provider

* updated vllm to have pull parity with openai, dynamically fetch models

---------

Co-authored-by: MagellaX <alphacr792@gmail.com>
2025-11-22 14:50:43 -08:00
Waleed
d1f0d21e7f improvement(logs): surface integration triggers in logs instead of catchall 'webhook' trigger type (#2102)
* improvement(logs): surface integration triggers in logs instead of  catchall

* optimized calculation, added new triggers to search

* cleanup

* fix console log
2025-11-22 14:18:42 -08:00
Waleed
33ac828d3d fix(settings): settings components and behavior consolidation (#2100)
* fix(settings): settings components and behavior consolidation

* ack PR comments
2025-11-21 19:49:32 -08:00
Adam Gough
29156e3b61 added missing mcp images (#2099) 2025-11-21 19:02:04 -08:00
Adam Gough
fa4b34fc46 removed broken scope (#2098) 2025-11-21 18:45:00 -08:00
Waleed
9fad5860bc feat(i18n): update translations (#2097)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-21 18:28:13 -08:00
Waleed
0a4244bcef feat(tools): added more tts providers, added stt and videogen models, fixed search modal keyboard nav (#2094)
* feat(tools): added more tts providers, added stt and videogen models, fixed search modal keyboard nav

* fixed icons

* cleaned up

* added falai

* improvement: icons

* fixed build

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-11-21 16:56:13 -08:00
Waleed
b7e814b721 v0.5.10: copilot upgrade, preprocessor, logs search, UI, code hygiene 2025-11-21 12:04:34 -08:00
Siddharth Ganesan
3be57aff8f improvement(copilot): add gpt5.1 and codex (#2092) 2025-11-21 11:39:27 -08:00
Siddharth Ganesan
ddd3219126 improvement(copilot): v0.2 (#2086)
* Edit workflow returns workflow

* Condense workflkow conosle

* Limit console results to 2

* mark checkoff v1

* Mark and checkoff todo

* Fixes

* Plan mode

* fix agent output

* broken

* Fixes

* Fix diff mode persist

* Fix diff coloring

* Undo/redo

* Checkpoint udno redo

* fix(templates): fix templates details page (#1942)

* Fix template details

* Fix deps

* fix(templates-details): restore approval feature, and keep details UI consistent, smoothen out creation of profile (#1943)

* fix(templates): view current ui

* update UI to be less cluttered

* make state management for creating user profile smoother

* fix autoselect logic

* fix lint

* fix(landing): need to propagate landing page copilot prompt (#1944)

* fix(wand): subblocks should not be overwritten after wand gen (#1946)

* fix(settings): fix broken api keys, help modal, logs, workflow renaming (#1945)

* fix(settings): fix broken api keys, help modal, logs, workflow renaming

* fix build

* cleanup

* use emcn

* fix(files): changed file input value sample from string -> object (#1947)

* improvement: usage-indicator UI (#1948)

* fix(deploy): fix button (#1949)

* fix(executor): consolidate execution hooks (#1950)

* fix(autoconnect): should check if triggermode is set from the toolbar drag event directly (#1951)

* improvement: templates styling (#1952)

* improvement: template use button (#1954)

* feat(newgifs): added new gifs (#1953)

* new gifs

* changed wording

* changed wording

* lowercase

* changed wording

* remove blog stuff

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: waleed <walif6@gmail.com>

* feat(drizzle): added ods for analytics from drizzle (#1956)

* feat(drizzle): added ods for analytics from drizzle

* clean

* fix(sheets): file selector had incorrect provider (#1958)

* feat(docs): added docs analytics drizzle ods (#1957)

* feat(docs): added docs analytics drizzle ods

* fix build

* fix provider for docs selector (#1959)

* fix(custom-tools): updates to legacy + copilot generated custom tools  (#1960)

* fix(custom-tools): updates to existing tools

* don't reorder custom tools in modal based on edit time

* restructure custom tools to persist copilot generated tools

* fix tests

* fix(slack): remove update message incorrect canonical param (#1964)

* fix(slack): send message tool

* add logging

* add more logs

* add more logs

* fix canonical param

* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization (#1962)

* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(onedrive): incorrect canonical param (#1966)

* fix(onedrive): incorrect canonical param

* fix download file

* fix

* fix

* Revert "fix"

This reverts commit f68ccd75fd.

* Revert "fix"

This reverts commit f3d8acee7d.

* fix(executor): streaming after tool calls (#1963)

* Provider changes

* Fix lint

* fix(code): readd wand to code subblock (#1969)

* fix(cmd-k): z-index + reoder tools, triggers (#1970)

* fix(cmd-k): z-index + reoder tools, triggers

* fix more z-index styling

* fix(executor): streaming response format (#1972)

* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary (#1973)

* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary

* cleanup

* improvement(platform): chat, emcn, terminal, usage-limit (#1974)

* improvement(usage-indicator): layout

* improvement: expand default terminal height

* fix: swap workflow block ports

* improvement: chat initial positioning

* improvement(chat): display; improvement(emcn): popover attributes

* fix lint

* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown (#1971)

* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown

* fix delete dialog for copilot keys

* simplify combobox

* fix more z indices

* consolidated duplicate hooks

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(copilot-subflows): copilot-added subflows id mismatch (#1977)

* feat(i18n): update translations (#1978)

* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(logs): show block inputs (#1979)

* Fix executor lgos block inputs

* Fix Comment

* fix(onedrive): parse array values correctly (#1981)

* fix(onedrive): parse array values correctly

* fix onedrive

* fix

* fix onedrive input parsing by reusing code subblock

* fix type

* feat(files): add presigned URL generation support for execution files (#1980)

* fix(popovers): billed account + async example command (#1982)

* fix(settings): update usage data in settings > subs to use reactquery hooks (#1983)

* fix(settings): update usage data in settings > subs to use reactquery hooks

* standardize usage pills calculation

* fix(output-selector): z-index in chat deploy modal (#1984)

* improvement(logs): improved logs search (#1985)

* improvement(logs): improved logs search

* more

* ack PR comments

* feat(slack): added slack full message object in response (#1987)

* feat(slack): add better error messages, reminder to add bot to app (#1990)

* feat(i18n): update translations (#1989)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(landing): hero stripe icon (#1988)

* Temp

* Update

* Update

* Update

* Progress

* Diff store fixes

* simplify sockets ops for diff store

* Search patterns tool

* Better tool calls

* Fix sanitizationg

* Context window display

* fix(variables): fix double stringification (#1991)

* improvement(variables): support dot notation for nested objects (#1992)

* improvement(tanstack): migrate multiple stores (#1994)

* improvement(tanstack): migrate folders, knowledge to tanstack

* fix types

* fix(folders): duplicate (#1996)

* fix(variables): fix variables block json resolution (#1997)

* Improvement(ui/ux): signup, command-list, cursors, search modal, workflow runs, usage indicator (#1998)

* improvement: signup loading, command-list, cursors, search modal ordering

* improvement: workflow runs, search modal

* improvement(usage-indicator): ui/ux

* test(pr): hackathon (#1999)

* test(pr): github trigger (#2000)

* fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)

* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render

* fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002)

* fix(pdfs): use unpdf instead of pdf-parse (#2004)

* fix(modals): fix z-index for various modals and output selector and variables (#2005)

* fix(condition): treat condition input the same as the code subblock (#2006)

* feat(models): added gpt-5.1 (#2007)

* improvement: runpath edges, blocks, active (#2008)

* feat(i18n): update translations (#2009)

* fix(triggers): check triggermode and consolidate block type (#2011)

* fix(triggers): disabled trigger shouldn't be added to dag (#2012)

* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message

* fix(tags): only show start block upstream if is ancestor (#2013)

* fix(variables): Fix resolution on double < (#2016)

* Fix variable <>

* Ling

* Clean

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching

* fix(copilot): run workflow supports input format and fix run id (#2018)

* fix(router): fix error edge in router block + fix source handle problem (#2019)

* Fix router block error port handling

* Remove comment

* Fix edge execution

* improvement: code subblock, action bar, connections (#2024)

* improvement: action bar, connections

* fix: code block draggable resize

* fix(response): fix response block http format (#2027)

* Fix response block

* Lint

* fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029)

* fix(usage-data): refetch on usage limit update in settings (#2032)

* fix(overage): fix pill calculation in the usage indicator to be consistent across views (#2034)

* fix(workflows): fixed workflow loading in without start block, added templates RQ hook, cleaned up unused templates code (#2035)

* fix(triggers): dedup + not surfacing deployment status log (#2033)

* fix(triggers): dedup + not surfacing deployment status log

* fix ms teams

* change to microsoftteams

* Revert "change to microsoftteams"

This reverts commit 217f808641.

* fix

* fix

* fix provider name

* fix oauth for msteams

* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15 (#2036)

* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15

* prevent undo-redo from interfering with subblock browser text undo

* improvement(docs): remove copy page from mobile view on docs (#2037)

* improvement(docs): remove copy page from mobile view on docs

* bring title and pagenav lower on mobile

* added cursor pointer to clickable components in docs

* fix(workflow-block): clearing child workflow input format field must lazy cascade parent workflow state deletion (#2038)

* Error tools

* Ui tools

* Navigate ui tool

* Combine env vars and oauth tools

* Plan mode section

* Plan mode v1

* Plan mode v1

* Plan mode improvements

* Build plan button

* Make workflow plan editable

* Tool improvements

* Fix build plan button

* Lint

* Fix

* Fix lint

* Fix plan

* Remove migrations

* fix undo/redo settling of ops

* Add migratinos back

* Smoothen out diff store

* Hide plan mode

* Fix lint

* Edit run workflow params

* Fix lint

* Fix tests

* Fix typing

* Fix build errors and lint

* Fix build

* Fix tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-21 10:22:08 -08:00
Waleed
67bd5bd8fa fix(integ): remove unused oauth providers from list of supported integrations (#2090) 2025-11-20 20:20:10 -08:00
Waleed
c52501616c feat(i18n): update translations (#2088)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-20 19:37:20 -08:00
Emir Karabeg
3dbf0f5679 feat: keyboard navigation; improvement: SEO/GEO; refactor: file structure, unused fonts; fix: chat streaming, notification stack (#2083)
* improvement: panel tabs handler on click

* fix: output break words

* feat: keyboard navigation; improvement: SEO/GEO; refactor: file structure, unused fonts; fix: chat streaming, notification stack

* feat: unresolved value handling on error; fix: layout refresh; refactor: delete old panel

* refactor: control bar delete; improvement: workflow constants; fix: clear notifications keyboard shortcut

* update developers count

* fixed relative imports

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-20 19:37:09 -08:00
Emir Karabeg
6187561219 improvement(chat): ui (#2089) 2025-11-20 19:16:51 -08:00
Waleed
022b4f64a7 fix(linear): fix remaining ops (#2087) 2025-11-20 19:02:12 -08:00
Waleed
768cdec6ce fix(logs): fixed logs search (#2084) 2025-11-20 17:16:08 -08:00
Waleed
75f55c894a fix(logging): add preprocessing util shared by all execution paths (#2081)
* fix(logging): add preprocessing util shared by all execution paths

* DRY
2025-11-20 14:05:14 -08:00
Waleed
4a0450d1fc fix(embeddings): modified embeddings utils to only index english docs (#2078) 2025-11-20 14:03:49 -08:00
Waleed
00ae718692 improvement(runners): upgrade runners, remove trigger deploy action (#2082) 2025-11-20 13:49:17 -08:00
Vikhyath Mondreti
d7586cdd9f fix(undo-redo): eviction policy to not have unbounded undo-redo stacks (#2079)
* fix(undo-redo): eviction policy to not have unbounded undo-redo stacks

* fix zindex custom tools delete
2025-11-20 12:12:04 -08:00
Waleed
842ef27ed9 v0.5.9: add backwards compatibility for agent messages array 2025-11-20 11:19:42 -08:00
Waleed
f208ff9356 fix(agent): add backwards compat for agent messages array (#2076)
* fix(agent): add backwards compat for agent messages array

* add tests
2025-11-20 11:16:06 -08:00
Vikhyath Mondreti
31c34b2ea3 v0.5.8: notifications, billing, ui changes, store loading state machine 2025-11-20 01:32:32 -08:00
Vikhyath Mondreti
304cafe698 improvement(linear): cleanup linear checks (#2075) 2025-11-20 01:32:01 -08:00
Vikhyath Mondreti
472aff5dd7 fix(resolver): json/array field parsing (#2074)
* fix(resolver): json/array field parsing

* remove comment
2025-11-20 00:27:12 -08:00
Waleed
4d5c574363 fix(stt): add fallback for ffmpeg (#2073) 2025-11-19 21:49:12 -08:00
Waleed
e7d4afa46b feat(i18n): update translations (#2071)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-19 21:21:52 -08:00
Waleed
f570592ad7 fix(linear): update required fields (#2070) 2025-11-19 21:17:37 -08:00
Waleed
e64b1c9fcd feat(tools): added speech to text with openai whisper, elevenlabs, and deepgram (#2068)
* feat(tools): added speech to text with openai whisper, elevenlabs, and deepgram

* added new file icons, implemented ffmpeg

* updated docs

* revert environment
2025-11-19 21:03:54 -08:00
Waleed
7c5d625ca5 fix(blogs): update sitemap and fix loading strat on blogs to prevent mobile crash (#2067)
* fix(blogs): update sitemap and fix loading strat on blogs to prevent mobile crash

* updated sitemap
2025-11-19 19:58:26 -08:00
Vikhyath Mondreti
e5cb6e3d0f improvement(store-hydration): refactor loading state tracking for workflows (#2065)
* improvement(store-hydration): refactor loading state tracking for workflows

* fix type issue

* fix

* fix deploy modal reference

* sidebar

* new panel

* reset stores
2025-11-19 19:10:43 -08:00
Waleed
e4ccedc4ff fix(tools): added stricter aura host db validation check for neo4j tool (#2066) 2025-11-19 18:44:33 -08:00
Emir Karabeg
d9cb63ce5f feat(chat): add 'add inputs' button to chat window (#2057)
* improvement(ui): workflow-block border

* feat(chat): add inputs button

* added socket event, reused existing utils to persist chat inputs

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-19 18:12:03 -08:00
Waleed
3468593f84 feat(i18n): update translations (#2064)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-19 18:01:52 -08:00
Waleed
95d5fd9c35 feat(i18n): update translations (#2062)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-19 17:44:42 -08:00
Waleed
becd19bc50 improvement(ux): added tab key navigation for agent messages, made variables styling match chat, added neo4j and calendly (#2056)
* improvement(ux): added tab key navigation for agent messages, made variables styling match chat

* added neo4j tools, added calendly tools and triggers

* more style improvements

* consolidate wand generation type

* more ui improvements

* fix calendly

* tested all neo4j tools

* added fuzzy search for search modal, tested and fixed calendly

* updated docs

* fix various broken docs links, neo4j param validation

* removed limit from neo4j block
2025-11-19 17:40:20 -08:00
Travis Johnson
c93f6620f6 improvement(tools): add eleven_v3 to elevenlabs block (#2053) 2025-11-19 17:39:17 -08:00
Adam Gough
3647a3e38c improvement(tools): added add worksheet to excel block (#2061)
Co-authored-by: aadamgough <adam@sim.ai>
2025-11-19 17:34:45 -08:00
Vikhyath Mondreti
f609b6ea4a fix(z-index): deployment versions rename + view active popover (#2059) 2025-11-19 16:42:09 -08:00
Vikhyath Mondreti
2be3007d69 fix(mcp-preview): server and tool name fetch to use tanstack (#2058)
* fix(mcp-preview): server and tool name fetch to use tanstack

* remove comments

* fix mcp tool interface

* change incorrect reference

* fix

* remove comments
2025-11-19 16:22:17 -08:00
Waleed
570b8d61f0 improvement(runners): added blacksmith optimizations to workflows and dockerfiles to enhance performance (#2055)
* added blacksmith optimizations to workflows and dockerfiles to enhance performance. please review before pushing to production

* remove cache from and cache to directives from docker based actions, per blacksmith docs

---------

Co-authored-by: Connor Mulholland <connormul@Connors-MacBook-Pro.local>
2025-11-19 13:07:03 -08:00
Waleed
7045c4a47b fix(dialogs): standardized delete modals (#2049)
* standardized delete modals

* fix

* fix(ui): live usage indicator, child trace spans, cancel subscription modal z-index (#2044)

* cleanup

* show trace spans for child blocks that error

* fix z index for cancel subscription popup

* rotating digit live usage indicator

* fix

* remove unused code

* fix type

* fix(billing): fix team upgrade

* fix

* fix tests

---------

Co-authored-by: waleed <walif6@gmail.com>

* remove unused barrel exports

* remove unused components

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-18 21:17:06 -08:00
Vikhyath Mondreti
5e11e5df91 fix(ui): live usage indicator, child trace spans, cancel subscription modal z-index (#2044)
* cleanup

* show trace spans for child blocks that error

* fix z index for cancel subscription popup

* rotating digit live usage indicator

* fix

* remove unused code

* fix type

* fix(billing): fix team upgrade

* fix

* fix tests

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-18 20:21:16 -08:00
Waleed
2608f2f12c fix(copiolot-ui): fix code markdown rendering in copilot & table (#2048) 2025-11-18 18:06:18 -08:00
Waleed
96207d85a7 fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow (#2047)
* fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow

* remove currentIteration in loop
2025-11-18 17:24:30 -08:00
Waleed
a7fe1d3aea fix(models): remove unrelease oai models, fix help modal (#2046) 2025-11-18 17:08:47 -08:00
Waleed
3faab2cb01 improvement(notifications): add option to disable error notifications, remove deprecated autoFillEnvVars field (#2045) 2025-11-18 16:28:59 -08:00
Emir Karabeg
02d9fedf0c feat(agent): messages array, memory (#2023)
* feat(agent): messages array, memory options

* feat(messages-input): re-order messages

* backend for new memory setup, backwards compatibility in loadWorkflowsFromNormalizedTable from old agent block to new format

* added memories all conversation sliding token window, standardized modals

* lint

* fix build

* reorder popover for output selector for chat

* add internal auth, finish memories

* fix rebase

* fix failing test

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-18 15:58:10 -08:00
Waleed
a8a693f1ff fix(deploy): add sockets op for renaming blocks (#2043)
* fix(deploy): add sockets op for renaming blocks

* remove old unused helpers
2025-11-18 15:57:49 -08:00
Emir Karabeg
e0aade85a6 feat: notification store (#2025)
* feat: notification store

* feat: notification stack; improvement: chat output select
2025-11-18 10:43:24 -08:00
Vikhyath Mondreti
8f0ef58056 v0.5.7: combobox selectors, usage indicator, workflow loading race condition, other improvements 2025-11-17 21:25:51 -08:00
Vikhyath Mondreti
33ca1483aa Merge branch 'main' into staging 2025-11-17 21:21:30 -08:00
Vikhyath Mondreti
620ce97056 improvement(selectors): consolidate all integration selectors to use the combobox (#2020)
* improvement(selectors): consolidate all integration selectors to use the combobox

* improved credential selector and file-upload styling to use emcn combobox

* update mcp subblocks to use emcn components, delete unused mcp server modal

* fix filterOptions change

* fix project selector

* attempted jira fix

* fix gdrive inf calls

* rewrite credential selector

* fix docs

* fix onedrive folder

* fix

* fix

* fix excel cred fetch

* fix excel part 2

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-17 21:06:52 -08:00
Vikhyath Mondreti
25ac91779b fix(workflow-block): clearing child workflow input format field must lazy cascade parent workflow state deletion (#2038) 2025-11-17 19:00:50 -08:00
Waleed
d51a756c1b improvement(docs): remove copy page from mobile view on docs (#2037)
* improvement(docs): remove copy page from mobile view on docs

* bring title and pagenav lower on mobile

* added cursor pointer to clickable components in docs
2025-11-17 18:10:52 -08:00
Waleed
3d1feab507 improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15 (#2036)
* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15

* prevent undo-redo from interfering with subblock browser text undo
2025-11-17 18:00:12 -08:00
Vikhyath Mondreti
98908dbfb9 fix(triggers): dedup + not surfacing deployment status log (#2033)
* fix(triggers): dedup + not surfacing deployment status log

* fix ms teams

* change to microsoftteams

* Revert "change to microsoftteams"

This reverts commit 217f808641.

* fix

* fix

* fix provider name

* fix oauth for msteams
2025-11-17 17:48:22 -08:00
Waleed
00d9b45a22 fix(workflows): fixed workflow loading in without start block, added templates RQ hook, cleaned up unused templates code (#2035) 2025-11-17 17:31:01 -08:00
Waleed
b5b2855b40 fix(overage): fix pill calculation in the usage indicator to be consistent across views (#2034) 2025-11-17 16:22:24 -08:00
Waleed
a81f3847df fix(usage-data): refetch on usage limit update in settings (#2032) 2025-11-17 15:07:52 -08:00
Waleed
3058e35edf v0.5.6: executor fixes, UI improvements, run paths (#2028)
* test(pr): hackathon (#1999)

* test(pr): github trigger (#2000)

* fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)

* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render

* fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002)

* fix(pdfs): use unpdf instead of pdf-parse (#2004)

* fix(modals): fix z-index for various modals and output selector and variables (#2005)

* fix(condition): treat condition input the same as the code subblock (#2006)

* feat(models): added gpt-5.1 (#2007)

* improvement: runpath edges, blocks, active (#2008)

* feat(i18n): update translations (#2009)

* fix(triggers): check triggermode and consolidate block type (#2011)

* fix(triggers): disabled trigger shouldn't be added to dag (#2012)

* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message

* fix(tags): only show start block upstream if is ancestor (#2013)

* fix(variables): Fix resolution on double < (#2016)

* Fix variable <>

* Ling

* Clean

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching

* fix(copilot): run workflow supports input format and fix run id (#2018)

* fix(router): fix error edge in router block + fix source handle problem (#2019)

* Fix router block error port handling

* Remove comment

* Fix edge execution

* improvement: code subblock, action bar, connections (#2024)

* improvement: action bar, connections

* fix: code block draggable resize

* fix(response): fix response block http format (#2027)

* Fix response block

* Lint

* fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-17 13:46:03 -08:00
Waleed
6f3dee867c fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029) 2025-11-17 13:37:17 -08:00
Siddharth Ganesan
bfa7c919d8 fix(response): fix response block http format (#2027)
* Fix response block

* Lint
2025-11-17 11:50:33 -08:00
Emir Karabeg
e37b01b92c improvement: code subblock, action bar, connections (#2024)
* improvement: action bar, connections

* fix: code block draggable resize
2025-11-17 11:04:41 -08:00
Siddharth Ganesan
7e3e38a6f2 fix(router): fix error edge in router block + fix source handle problem (#2019)
* Fix router block error port handling

* Remove comment

* Fix edge execution
2025-11-15 18:32:14 -08:00
Siddharth Ganesan
1c85fe9a51 fix(copilot): run workflow supports input format and fix run id (#2018) 2025-11-15 18:11:09 -08:00
Waleed
5f446ad756 feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)
* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching
2025-11-15 16:41:35 -08:00
Waleed
d99d5fe39c feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)
* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments
2025-11-15 16:09:58 -08:00
Siddharth Ganesan
949f9287cf fix(variables): Fix resolution on double < (#2016)
* Fix variable <>

* Ling

* Clean
2025-11-15 15:09:01 -08:00
Siddharth Ganesan
fca92a7499 fix(tags): only show start block upstream if is ancestor (#2013) 2025-11-15 12:27:34 -08:00
Siddharth Ganesan
c25ea5c677 fix(triggers): disabled trigger shouldn't be added to dag (#2012)
* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message
2025-11-15 12:19:37 -08:00
Siddharth Ganesan
dccd9e9ce5 fix(triggers): check triggermode and consolidate block type (#2011) 2025-11-15 12:00:12 -08:00
Waleed
b5d9964c48 feat(i18n): update translations (#2009) 2025-11-14 23:33:13 -08:00
Emir Karabeg
4bd0f31f36 improvement: runpath edges, blocks, active (#2008) 2025-11-14 23:26:41 -08:00
Waleed
f8070f9029 feat(models): added gpt-5.1 (#2007) 2025-11-14 23:23:47 -08:00
Waleed
bc8947caa6 fix(condition): treat condition input the same as the code subblock (#2006) 2025-11-14 23:23:39 -08:00
Waleed
f1111ec16f fix(modals): fix z-index for various modals and output selector and variables (#2005) 2025-11-14 23:13:31 -08:00
Waleed
d0767507b2 fix(pdfs): use unpdf instead of pdf-parse (#2004) 2025-11-14 22:39:28 -08:00
Waleed
8bd75debc1 fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002) 2025-11-14 22:12:01 -08:00
Emir Karabeg
ad2a375358 fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)
* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render
2025-11-14 21:26:40 -08:00
Vikhyath Mondreti
de91dc97a9 test(pr): github trigger (#2000) 2025-11-14 18:08:07 -08:00
Vikhyath Mondreti
31ed712378 test(pr): hackathon (#1999) 2025-11-14 18:02:00 -08:00
Waleed
aca4d2fc15 v0.5.5: slack tool updates, logs search, response block fixes, reactquery migrations 2025-11-14 16:20:10 -08:00
Emir Karabeg
96958104c0 Improvement(ui/ux): signup, command-list, cursors, search modal, workflow runs, usage indicator (#1998)
* improvement: signup loading, command-list, cursors, search modal ordering

* improvement: workflow runs, search modal

* improvement(usage-indicator): ui/ux
2025-11-14 16:13:23 -08:00
Siddharth Ganesan
6f29e2413c fix(variables): fix variables block json resolution (#1997) 2025-11-14 16:07:01 -08:00
Vikhyath Mondreti
c2ccd51b3e fix(folders): duplicate (#1996) 2025-11-14 15:50:00 -08:00
Vikhyath Mondreti
ec430abca2 improvement(tanstack): migrate multiple stores (#1994)
* improvement(tanstack): migrate folders, knowledge to tanstack

* fix types
2025-11-14 15:38:15 -08:00
Siddharth Ganesan
4b4060f63f improvement(variables): support dot notation for nested objects (#1992) 2025-11-14 14:47:16 -08:00
Siddharth Ganesan
72a048f37d fix(variables): fix double stringification (#1991) 2025-11-14 12:00:32 -08:00
Emir Karabeg
fa18bef65b fix(landing): hero stripe icon (#1988) 2025-11-14 02:20:32 -08:00
Waleed
a9eb91aed1 feat(i18n): update translations (#1989)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-14 02:18:32 -08:00
Waleed
16a4f37dac feat(slack): add better error messages, reminder to add bot to app (#1990) 2025-11-14 02:18:19 -08:00
Waleed
6c56d48e73 feat(slack): added slack full message object in response (#1987) 2025-11-14 01:55:01 -08:00
Waleed
1082e55871 improvement(logs): improved logs search (#1985)
* improvement(logs): improved logs search

* more

* ack PR comments
2025-11-14 01:14:20 -08:00
Vikhyath Mondreti
948b6575dc fix(output-selector): z-index in chat deploy modal (#1984) 2025-11-13 20:13:15 -08:00
Waleed
3ba33791f7 fix(settings): update usage data in settings > subs to use reactquery hooks (#1983)
* fix(settings): update usage data in settings > subs to use reactquery hooks

* standardize usage pills calculation
2025-11-13 19:57:48 -08:00
Vikhyath Mondreti
1e915d5427 fix(popovers): billed account + async example command (#1982) 2025-11-13 19:33:15 -08:00
Waleed
d86198ad5d feat(files): add presigned URL generation support for execution files (#1980) 2025-11-13 19:32:23 -08:00
Vikhyath Mondreti
785f847c48 fix(onedrive): parse array values correctly (#1981)
* fix(onedrive): parse array values correctly

* fix onedrive

* fix

* fix onedrive input parsing by reusing code subblock

* fix type
2025-11-13 19:24:33 -08:00
Siddharth Ganesan
dab70a8f1d fix(logs): show block inputs (#1979)
* Fix executor lgos block inputs

* Fix Comment
2025-11-13 19:07:53 -08:00
Waleed
d2c0147822 v0.5.4: streaming fixes, deployment bug fixes, resolve ui bugs, tanstack query for settings, copilot subflow edits fixes 2025-11-13 18:29:20 -08:00
Waleed
67d9343022 feat(i18n): update translations (#1978)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-13 18:07:42 -08:00
Vikhyath Mondreti
b3caef1f31 fix(copilot-subflows): copilot-added subflows id mismatch (#1977) 2025-11-13 17:56:26 -08:00
Waleed
5457d4bc7b feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown (#1971)
* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown

* fix delete dialog for copilot keys

* simplify combobox

* fix more z indices

* consolidated duplicate hooks

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-13 17:33:05 -08:00
Emir Karabeg
32a2e09a14 fix lint 2025-11-13 16:31:30 -08:00
Emir Karabeg
80eaeb00c2 improvement(platform): chat, emcn, terminal, usage-limit (#1974)
* improvement(usage-indicator): layout

* improvement: expand default terminal height

* fix: swap workflow block ports

* improvement: chat initial positioning

* improvement(chat): display; improvement(emcn): popover attributes
2025-11-13 16:02:13 -08:00
Waleed
b67b4ff8fb fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary (#1973)
* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary

* cleanup
2025-11-13 15:40:09 -08:00
Siddharth Ganesan
6f4f8cfad2 fix(executor): streaming response format (#1972) 2025-11-13 15:27:15 -08:00
Vikhyath Mondreti
3a8f01f3e4 fix(cmd-k): z-index + reoder tools, triggers (#1970)
* fix(cmd-k): z-index + reoder tools, triggers

* fix more z-index styling
2025-11-13 13:59:09 -08:00
Vikhyath Mondreti
383b6f05a6 fix(code): readd wand to code subblock (#1969) 2025-11-13 12:31:10 -08:00
Siddharth Ganesan
a70f2a6690 fix(executor): streaming after tool calls (#1963)
* Provider changes

* Fix lint
2025-11-13 12:24:26 -08:00
Vikhyath Mondreti
53150021e0 v0.5.3: docs, sheets, slack, custom tools fixes and templates contexts improvements 2025-11-12 22:17:06 -08:00
Vikhyath Mondreti
4e5b834433 fix(onedrive): incorrect canonical param (#1966)
* fix(onedrive): incorrect canonical param

* fix download file

* fix

* fix

* Revert "fix"

This reverts commit f68ccd75fd.

* Revert "fix"

This reverts commit f3d8acee7d.
2025-11-12 22:16:13 -08:00
Waleed
304fb28baf improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization (#1962)
* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-12 21:46:26 -08:00
Vikhyath Mondreti
07e803cfdd fix(slack): remove update message incorrect canonical param (#1964)
* fix(slack): send message tool

* add logging

* add more logs

* add more logs

* fix canonical param
2025-11-12 21:46:00 -08:00
Vikhyath Mondreti
d50aefcc68 fix(custom-tools): updates to legacy + copilot generated custom tools (#1960)
* fix(custom-tools): updates to existing tools

* don't reorder custom tools in modal based on edit time

* restructure custom tools to persist copilot generated tools

* fix tests
2025-11-12 18:50:58 -08:00
Vikhyath Mondreti
6513cbb7c1 fix provider for docs selector (#1959) 2025-11-12 17:57:04 -08:00
Waleed
f9e822f6c8 feat(docs): added docs analytics drizzle ods (#1957)
* feat(docs): added docs analytics drizzle ods

* fix build
2025-11-12 17:51:58 -08:00
Vikhyath Mondreti
74202ce1fc fix(sheets): file selector had incorrect provider (#1958) 2025-11-12 17:36:28 -08:00
Waleed
66c8fa2a77 v0.5.2: templates, wand, settings, table, copilot-landing, files, deploy, autoconnect 2025-11-12 16:36:18 -08:00
Waleed
766c7fbfbb feat(drizzle): added ods for analytics from drizzle (#1956)
* feat(drizzle): added ods for analytics from drizzle

* clean
2025-11-12 16:35:46 -08:00
Adam Gough
675c42188a feat(newgifs): added new gifs (#1953)
* new gifs

* changed wording

* changed wording

* lowercase

* changed wording

* remove blog stuff

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: waleed <walif6@gmail.com>
2025-11-12 16:21:09 -08:00
Emir Karabeg
f414ae1936 improvement: template use button (#1954) 2025-11-12 16:17:27 -08:00
Emir Karabeg
ead0db9d2a improvement: templates styling (#1952) 2025-11-12 15:58:38 -08:00
Vikhyath Mondreti
10288111a8 fix(autoconnect): should check if triggermode is set from the toolbar drag event directly (#1951) 2025-11-12 15:51:52 -08:00
Siddharth Ganesan
01183f1771 fix(executor): consolidate execution hooks (#1950) 2025-11-12 15:46:29 -08:00
Waleed
ff081714e4 fix(deploy): fix button (#1949) 2025-11-12 14:16:56 -08:00
Emir Karabeg
36bcd75832 improvement: usage-indicator UI (#1948) 2025-11-12 14:09:18 -08:00
Waleed
9db969b1e0 fix(files): changed file input value sample from string -> object (#1947) 2025-11-12 14:06:33 -08:00
Waleed
2fbe0de5d3 fix(settings): fix broken api keys, help modal, logs, workflow renaming (#1945)
* fix(settings): fix broken api keys, help modal, logs, workflow renaming

* fix build

* cleanup

* use emcn
2025-11-12 13:43:48 -08:00
Vikhyath Mondreti
6315cc105b fix(wand): subblocks should not be overwritten after wand gen (#1946) 2025-11-12 13:36:36 -08:00
Vikhyath Mondreti
61404d48a3 fix(landing): need to propagate landing page copilot prompt (#1944) 2025-11-12 12:36:45 -08:00
Vikhyath Mondreti
dbf9097a5b fix(templates-details): restore approval feature, and keep details UI consistent, smoothen out creation of profile (#1943)
* fix(templates): view current ui

* update UI to be less cluttered

* make state management for creating user profile smoother

* fix autoselect logic

* fix lint
2025-11-12 12:22:16 -08:00
Siddharth Ganesan
79b318fd9c fix(templates): fix templates details page (#1942)
* Fix template details

* Fix deps
2025-11-12 11:16:15 -08:00
Siddharth Ganesan
cb39e697e2 fix(templates): fix template details page (#1940)
* Fix v1

* Template details page
2025-11-12 10:45:34 -08:00
Emir Karabeg
e1a46c90c6 fix: table subblock (#1937) 2025-11-12 09:53:38 -08:00
Waleed
c7560be282 fix(presence): fix additional avatars showing for presence (#1938) 2025-11-12 09:33:01 -08:00
Waleed
63f18995da v0.5.1: blogs 2025-11-12 08:30:33 -08:00
Waleed
af501347bb feat(blogs): added blog tags (#1935) 2025-11-12 08:29:03 -08:00
Waleed
6747d89865 v0.5: platform overhaul, 300+ new tools 2025-11-12 08:08:51 -08:00
Waleed
1201327adc fix(comment): fixed comment (#1933) 2025-11-12 08:08:04 -08:00
Emir Karabeg
f4434e302c feat: templates, usage indicator, wand, approval, logs, help, settings, deploy template, error UI (#1931)
* templates, usage indicator, wand, approval, ...

* fix: build error import isTruthy
2025-11-12 07:42:40 -08:00
Emir Karabeg
42e2769526 feat: place all styles in global vars (#1923)
* feat: place all styles in global vars

* feat: prevented on workspace
2025-11-12 04:51:46 -08:00
Waleed
a0c4bce56e feat(studio): added 'studio' blog (#1927)
* feat(blog): fundraise blog

* added scaffolding and authors for everyone's articles

* rename blog to studio

* add blog post for multiplayer

* add profile pic

* Executor blog

* mark emcn blog as draft

* Fix x

* v0.4.26

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>

* fix(conflict): resolve merge conflict

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>

* fix(billing): should allow restoring subscription (#1728) (#1925)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>

* cleanup blog

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-12 04:03:50 -08:00
Waleed
64c5f2c473 feat(i18n): update translations (#1926)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-12 02:49:17 -08:00
Waleed
413c460ae8 fix(billing): should allow restoring subscription (#1728) (#1925)
* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-12 02:35:35 -08:00
Waleed
fa42ea44c1 fix(conflict): resolve merge conflict
* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-12 02:24:57 -08:00
Waleed
1bd18ee85b feat(tag-dropdown): added start block to tag dropdown by default (#1922) 2025-11-12 02:14:31 -08:00
Siddharth Ganesan
e3e951832b v0.4.26
* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-12 02:00:55 -08:00
Siddharth Ganesan
56835b94d8 fix(executor): duplicate error, cmd+enter (#1920)
* Fix executor error

* Fix cmd+enter

* Lint
2025-11-12 01:44:01 -08:00
Waleed
9a6a6fdacb improvement(docs): updated with new ss, docs script updated to copy items from main app into docs for tools (#1918)
* improvement(docs): updated script to copy over icons, cleanup unnecessary pages

* updated script with auto-icon generation

* ignore translations, only icons changed

* updated images

* updated i18n.lock

* updated images
2025-11-12 01:15:23 -08:00
Siddharth Ganesan
41066b84d2 fix(executor): surface pre-execution errors (#1917) 2025-11-12 01:05:48 -08:00
Vikhyath Mondreti
5cea73fe91 fix(copilot): show subblocks in diff mode (#1916) 2025-11-11 21:47:58 -08:00
Vikhyath Mondreti
cbc98ab4f5 fix(variables): display name rendering (#1915)
* fix(variables): display name rendering

* cleanup

* cleanup more code
2025-11-11 21:08:44 -08:00
Waleed
81411c73b7 feat(registry): renaming workspace and folders shortcut (#1912) 2025-11-11 20:18:58 -08:00
Waleed
d11ee04432 fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows (#1911)
* fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows

* fix copilot keyboard nav
2025-11-11 20:12:08 -08:00
Adam Gough
1d58fdf234 fix(invites): remove uuid validation from inv api (#1910) 2025-11-11 18:16:46 -08:00
Waleed
96f134b127 fix(variables): fixed floating variables, added autcomplete off to prevent suggested values (#1908)
* fixed variables

* add autocomplete=off to prevent suggestions for subblock values
2025-11-11 17:52:46 -08:00
Siddharth Ganesan
769555676e Fix start block numbering (#1909) 2025-11-11 17:52:04 -08:00
Vikhyath Mondreti
679c3418d6 fix(selectors-hydration): confluence, jira, teams (#1907)
* fix(jira): issue and project selector

* fix endpoints

* remove # for selector

* fix chat selector

* add preview card for jira

* fix inf calls for teams

* fix inf teams calls

* inf confluence calls

* fix confluence selector

* add small # back for slack channel selector

* fix wealthbox selector
2025-11-11 16:38:21 -08:00
Emir Karabeg
7b48d6ed53 feat(workflow): workflow overhaul (#1906)
* feat: action-bar side-effects; refactor: removed unused styles from globals and tailwind config

* feat(terminal): filters/sorting; fix(workflow): zoom bug

* feat(sidebar): toggle; feat(terminal): show/hide timestamp

* feat(toolbar): triggers ordering

* feat: commands, cursors, room-presence, command-list, rename blocks, workspace controls, invite, search modal

* removed old imports

* ack PR comments

* fix tag dropdown

* feat: variables UI; fix: terminal keys

---------

Co-authored-by: waleed <waleed>
2025-11-11 16:30:30 -08:00
Adam Gough
b093550656 fix(credentials): remove special scopes from additional scopes required hook, remove additionalScopes arg from tool definition (#1905) 2025-11-11 15:54:33 -08:00
Waleed
9b702c4793 improvement(popover): added keyboard nav to tag dropdown popover to iterate over parent & child items (#1903)
* improvement(popover): added keyboard nav to tag dropdown popover to iterate over parent & child items

* code cleanup

* ack PR comments
2025-11-11 15:53:34 -08:00
Siddharth Ganesan
77ba4d106f fix(copilot): fix sent message width (#1904) 2025-11-11 15:34:08 -08:00
Waleed
77d897da85 feat(duplicate): added folder duplication, add duplicate to sidebar context menu (#1902) 2025-11-11 14:05:25 -08:00
Vikhyath Mondreti
f00d5516df fix(google-drive-picker): hydration issues with drive picker + dependsOn for trigger subblocks (#1901)
* fix(google-drive-picker): hydration issues with drive picker

* respect depends on gating

* add depends on for outlook polling

* remove useless file

* fix lint
2025-11-11 13:39:15 -08:00
Adam Gough
831ce91577 fix(trace-spans): fixed small styling bugs (#1900)
* fix trace spands timeline styling and hover tooltip

* fixed invalid dom properties
2025-11-11 13:36:06 -08:00
Siddharth Ganesan
1cce486442 feat(notes): add notes (#1898)
* Notes v1

* v2

* Lint

* Consolidate into hook

* Simplify workflow code

* Fix hitl casing

* Don't allow edges in note block and explicitly exclude from executor

* Add hooks

* Consolidate hook

* Consolidate utils checks

* Consolidate dimensions
2025-11-11 13:31:14 -08:00
Waleed
7c398e64dc feat(i18n): update translations (#1899) 2025-11-11 12:59:37 -08:00
Waleed
a6a9962cb3 feat(registry): support multi-workflow delete (#1897)
* feat(registry): support multi-workflow delete

* added intelligent next index selection if deleting active workflow
2025-11-11 12:55:45 -08:00
Waleed
16bd54c05a feat(i18n): update translations (#1896)
* feat(i18n): update translations

* fix build error
2025-11-11 12:53:36 -08:00
Waleed
1130befb17 fix(local): add missing deps, fix access patterns, update dockerfiles, updated turborepo (#1895)
* fix(local): add missing deps, fix access patterns, update dockerfiles

* upgrade turborepo
2025-11-11 12:01:59 -08:00
Waleed
b6139d6f6e improvement(docs): simplify docs and add examples/pictures of v5 (#1887)
* improvement(docs): added new platform ss

* rename approval to human in the loop

* cleanup

* remove yml

* removed other languages large sections

* fix icons
2025-11-11 11:35:29 -08:00
Siddharth Ganesan
c86f2a0537 fix(copilot): fix execute workflow from diff store (#1894)
* Fix run from diff store

* Fix copilot run workflow
2025-11-11 11:09:17 -08:00
Siddharth Ganesan
41f3d506da fix(deployed-chat): prevent multiple simultaneous messages (#1893) 2025-11-11 10:36:14 -08:00
Siddharth Ganesan
fc162ab236 fix(deployed-chat): fix page crash on chat stream completion (#1892) 2025-11-11 09:49:01 -08:00
Siddharth Ganesan
bc25ea28e0 fix(deployed-chat): fix deployed chat page crash (#1891) 2025-11-11 09:08:23 -08:00
Waleed
68aaedebbf fix(dropdown): add dependsOn to dropdown component to dynamically fetch options predicated on another subblock (#1886) 2025-11-10 23:45:15 -08:00
Vikhyath Mondreti
ec70f6fafe improvement(trigger-subflow): reuse helper code (#1885) 2025-11-10 21:49:03 -08:00
Siddharth Ganesan
37fd21e0aa fix(agent): tool credential dropdown (#1884)
* Checkpoint

* Fix dropdown
2025-11-10 21:40:00 -08:00
Vikhyath Mondreti
82731850b2 improvement(display-names): move display name mapping to central store + access pattern via hook (#1881)
* improvmenet(display-names-store): add displaynames store to map ids to human readable names for creds, etc

* fix workflow in workflow

* dot protection for secrets

* hide from preview certain fields

* fix rest of cases

* fix confluence

* fix type errors

* remove redundant workflow dropdown code

* remove comments

* revert preview card

* fix [object Object] bug

* fix lint
2025-11-10 21:34:37 -08:00
Siddharth Ganesan
991b0e31ad fix(triggers): fix triggers in subflows (#1883) 2025-11-10 20:51:07 -08:00
Siddharth Ganesan
cd48cd4de4 fix(start): fix start drag from toolbar (#1882)
* Fix start block

* Fix webhook

* Remove comments
2025-11-10 20:30:45 -08:00
Waleed
4b37f92f3a improvement(ci): migrate to blacksmith runners (#1879) 2025-11-10 18:53:21 -08:00
Waleed
698717d044 feat(i18n): update translations (#1876) 2025-11-10 18:47:43 -08:00
Emir Karabeg
170eb36ebf feat(subflows): editor, block; fix(copilot): stop, mr (#1877) 2025-11-10 18:38:14 -08:00
Siddharth Ganesan
118c477d97 fix(copilot): fix triggers unsave on edit (#1874)
* Fix copilot trigger unsave

* Fix flushing

* Lint

* Fix test

* Fix some tests

* Fix lint
2025-11-10 18:24:33 -08:00
Adam Gough
2f9224c166 feat(crms): added hubspot, asana, trello, salesforce, pipedrive tools and triggers (#1871)
* trello integration added

* added asana integration

* added pipedrive (need to finish testing)

* finished pipedrive

* finished hubspot, need to test more

* make oauth required modal scrollable

* edited layout and fixed merge conflicts

* salesforce working, need to add more operations

* added all salesforce tools

* hubspot triggers working, plus other fixes

* fixed payload and added hubspot triggers

* fixed test

* build fix

* rebase

* updated docs

* oauth required modal

* fixed icons

* fixed hubspot scopes parsing

* reduce scopes of salesforce oauth

* cleaned up scopes

* lint

* aligned oauth.ts, auth.ts, and block definitions for all 29 providers

* updated icons

* fixed logos and updated docs

* revert changes to unused file

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: waleed <waleed>
Co-authored-by: aadamgough <adam@sim.ai>
2025-11-10 17:46:42 -08:00
Waleed
0ed0a26b3b feat(workflow-block): added redeploy action to workflow header for workflow block (#1875) 2025-11-10 15:59:33 -08:00
Adam Gough
0d4d953169 fixed payload error (#1873) 2025-11-10 12:19:45 -08:00
Waleed
81a12e721e improvement(performance): added revalidation caches on ollama and openrouter models (#1872)
* improvement(performance): added revalidation caches on ollama and openrouter models

* ack PR comments
2025-11-10 12:19:22 -08:00
Waleed
b03f9702d2 feat(permissions): extend hook to detect missing scopes to return those scopes for upgrade, update credential selector subblock (#1869) 2025-11-10 11:40:15 -08:00
Vikhyath Mondreti
997c4639ed fix build 2025-11-10 10:00:51 -08:00
Emir Karabeg
1e8b4769aa feat: toolbar, terminal, tool-input, emcn updates, chat, deploy (#1864)
* feat: toolbar resizing and searching; refactor: copilot folders

* feat(terminal): clear, timestamp, run ID, input, height

* feat: tool inpul, emcn search

* feat: sidebar context menu, delete workflow hook

* feat: chat; improvement: input and dropdown/combobox padding

* feat(panel): deploy logic

* improvement(chat): streaming output
2025-11-10 03:08:13 -08:00
Waleed
28b416078c improvement(subblocks): fixed trigger save, schedule save, time inp, text subblocks and schedule/workflow badges, can now deploy from the badge itself (#1868) 2025-11-10 01:31:37 -08:00
Waleed
d0720b85bc feat(i18n): update translations (#1865) 2025-11-08 20:55:59 -08:00
Vikhyath Mondreti
75ce8882c8 improvement(execution): trigger manual execution using mock payloads (#1863)
* fix(err-message): manual run message

* make external triggers start workflow manually too

* improvement(execution): trigger manual execution using mock payloads

* remove redundant code and update generate mock value func

* cleanup code, add to docs

* fix multi trigger injection

* address greptile comments
2025-11-08 20:34:53 -08:00
Siddharth Ganesan
142d3aadb8 feat(helm): add copilot (#1833)
* Add helm for copilot

* Remove otel and log level

* Change repo name

* improvement(helm): enhance copilot chart with HA support and validation

* refactor(helm): consolidate copilot secrets and fix postgres volume mount
2025-11-08 17:36:48 -08:00
Waleed
7c6e6d1603 improvement(code): add wand config and system prompt for python code generation, strip \n from stdout in JS/Python (#1862) 2025-11-08 16:44:16 -08:00
Waleed
e186ea630a improvement(ux): optimistic updates for envvars, custom tools, folder operations, workflow deletions. shared hook for connection tags & tag dropdown, fix for triggers not re-rendering on trigger selected (#1861) 2025-11-08 15:45:29 -08:00
Waleed
b3490e9127 fix(build): remove mdx from transpilation (#1860) 2025-11-08 14:33:26 -08:00
Emir Karabeg
eed2072723 feat/platform-v3 (#1698)
* feat(fonts): season replacing geist

* feat(emcnn): created emcn

* feat(sidebar): created new sidebar with header and workflow list

* improvement(sidebar): expanded workflow/folder item text sizing and adjusted button padding

* feat(sidebar): added search UI, updated workflows styling

* improvement: globals styling with antialiased in dark mode only

* feat(sidebar): blocks and triggers ui/ux updated

* refactor(sidebar): moved logic into hooks

* feat(sidebar): improved workflow/folder dragging UI/UX; refactored logic into hooks

* improvement(sidebar): adjusted triggers/blocks padding for header

* improvement(sidebar): dragging hover handler; closed folders by default minus active path

* improvement(sidebar): panel resize logic

* improvement(sidebar): blocks and triggers expanded indicator

* feat(tooltips): new emcn component emerged

* feat(sidebar): workflow list handling updated

* refactor: added cursorrules

* feat(panel): new panel layout

* improvement(workspaces): firname's workspace instead of fn ln's workspace

* feat(platform): panel header, new emcn icons, more button variants, refactor sidebar components

* improvement(emcn): added button variants

* feat(panel): tab system

* feat(copilot): refactor, adjusted welcome and user-input UI/UX

* feat(copilot): baseline user-input ui/ux improvement

* feat(emcn): badge outline variant

* fix: build errors

* feat(copilot): base UI copilot

* refactor(workflow-block): added hooks, components

* feat(design): created design panel and removed isWide

* refactor(subblock): edited components, styling

* feat: emcn, editor

* feat(panel): toolbar, editor

* feat(workflow-block): refactor, adjust base styling

* feat(workflow-block): new block, edge

* feat: workflow-block, connections, action-bar, copilot

* feat: panel, workflow, emcn, workflow block, subblocks; clean copilot

* sim-326: remove remote code execution toggle, hide dropdown for language if E2B is not enabled

* feat: sidebar navigation, tag coloring; refactor: rebased to staging

* fix: build errors

* improvement: subblock styles

* feat: workspaces, terminal, emcn, controls

* feat: delete workflow

* fix: rebased

* fix build errors

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-08 10:58:31 -08:00
Waleed
945405c461 feat(blogs): added blogs scaffolding (#1857) 2025-11-08 00:04:20 -08:00
Vikhyath Mondreti
c397f5acee fix(triggers): update filtering logic for edges (#1856) 2025-11-07 19:59:51 -08:00
Siddharth Ganesan
3f435ce55e fix(hitl): rename uiurl to url (#1855) 2025-11-07 19:51:27 -08:00
Vikhyath Mondreti
7a8d47a72e fix(schedules): locking schedules to prevent double runs (#1854)
* fix(schedules): locking schedules to prevent double runs

* add migration file

* fix
2025-11-07 19:45:25 -08:00
Waleed
e91a8af7cd fix(files): fix json uploads, disable storage metering when billing is disabled, exclude kb uploads from storage metering, simplify serve path route (#1850)
* fix(files): fix local kb files storage to have parity with cloud storage providers

* fix(files): fix json uploads, disable storage metering when billing is disabled, exclude kb uploads from storage metering, simplify serve path route

* cleanup
2025-11-07 18:41:44 -08:00
Siddharth Ganesan
d17c627064 fix(deployed-chat): fix duplication and file uploads (#1853) 2025-11-07 18:41:03 -08:00
Vikhyath Mondreti
c8ea08e130 fix(file-upload): workspace/chat context not being passed in some forms (#1852) 2025-11-07 18:23:13 -08:00
Siddharth Ganesan
f62568efc7 fix(variables, webhook): fix variable tag dropdown for escaped < and allow empty webhook payload (#1851)
* Fix << tags

* Allow empty webhook body

* Variable highlighting in loop conditions
2025-11-07 18:03:36 -08:00
Vikhyath Mondreti
a73e2aaa8b improvement(templates): make it top-level route and change management/editing process (#1834)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* make templates root level url and make it part of deployment system

* separate updating template and deployment versions

* add tags

* add credentials extraction logic + use should import with workflow variables

* fix credential extraction

* add trigger mode indicator

* add starred tracking

* last updated field

* progress on creator profiles

* revert creator profile context type

* progress fix image uploads

* render templates details with creator details

* fix collab rules for workflow edit button

* creator profile perm check improvements

* restore accidental changes

* fix accessibility issues for non logged in users

* remove unused code

* fix type errors

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-07 17:57:53 -08:00
Siddharth Ganesan
6cdee5351c feat(scopes): add scopes warning hook (#1842)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Server side logic to check auth scopes

* Fix scopes code

* Remove frontend changes

* Fix tests

* Lint

* Remove log for lint

* Fix scopes check

* Fix conflict

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-07 16:31:25 -08:00
Waleed
d3e81e97d5 fix(deploy-modal): remove deleted blocks from example curl (#1849) 2025-11-07 15:27:04 -08:00
Waleed
bb7016a99f improvement(routes): type all untyped routes (#1848)
* improvement(routes): type all untyped routes

* fix routes, remove unused workspace members route

* fix obfuscation of errors behind zod errors

* remove extraneous comments
2025-11-07 15:24:30 -08:00
Waleed
c4278266ef feat(i18n): update translations (#1844)
* feat(i18n): update translations

* fix(streaming-api): fix streaming api (#1846)

* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Fix streaming api

* Fix uuid stuff

* Lint

* Stripe docs fix

* Fix docs build error

* Fix uuid check

* Fix deployed chat streaming for non agent blocks

* Fix lint
2025-11-07 15:06:25 -08:00
Siddharth Ganesan
b6c2c7456e fix(variables): fix variable resolution error and start block outputs (#1847)
* Fix var resolution if block is not upstream

* Filter convo id from start block outputs if not set

* Lint

* Start block outputs
2025-11-07 15:03:43 -08:00
Siddharth Ganesan
9fd2156e9e fix(streaming-api): fix streaming api (#1846)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Fix streaming api

* Fix uuid stuff

* Lint

* Stripe docs fix

* Fix docs build error

* Fix uuid check

* Fix deployed chat streaming for non agent blocks

* Fix lint

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-07 14:38:15 -08:00
Waleed
c9a8c7e392 feat(tools): added 200+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily (#1824)
* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* replace console.log and console.error with loggers instead

* cleanup

* update message change

* removed layout from all blocks with new operations

* cleanup

* fixed create row

* fixed full text search

* fixed firecrawl, fixed supabase download

* fix subblock name

* teams update

* finish supabase

* tested & updated parallel AI

* removed dates from Exa, fixed research

* fix jina

* more jina updates

* fixed tavily + tool-inp for empty dropdown items

* updated microsoft tools

* edited reddit

* added html/text options for gmail outlook resend tools, added linear and jira triggers

* reddit tool fix

* another reddit fix

* remove unused github utils, fix linear triggers

* added onedrive delete, fixed jira tools

* fixed confluence

* fix some linear operations, fixed jira triggers

* fix some linear tools

* fix build

* fix jira payloads

* fixe jira payload

* fix conflicts

* added sample payload

* fix stripe icon

* run lint
2025-11-07 13:03:57 -08:00
Waleed
eb459d0ab9 feat(i18n): update translations (#1843) 2025-11-07 13:03:05 -08:00
Siddharth Ganesan
a31dc733cf fix(copilot): fix image auth (#1841)
* Fix copilot image auth

* Lint

* Remove extra loggign

* Update apps/sim/app/api/copilot/chat/route.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-11-07 11:40:13 -08:00
Waleed
c3436e998f feat(tools): added 50+ stripe tools and trigger and docs (#1816)
* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* feat(tools): added 40+ stripe tools and trigger

* added stripe tools to registry

* added number validation, tested all stripe tools

* update stripe payload, tested webhooks
2025-11-07 10:59:19 -08:00
Siddharth Ganesan
742d59f54d feat(hitl): add human in the loop block (#1832)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Add pause resume block

* Add db schema

* Initial test passes

* Tests pass

* Execution pauses

* Snapshot serializer

* Ui checkpoint

* Works 1

* Pause resume simple v1

* Hitl block works in parallel branches without timing overlap

* Pending status to logs

* Pause resume ui link

* Big context consolidation

* HITL works in loops

* Fix parallels

* Reference blocks properly

* Fix tag dropdown and start block resolution

* Filter console logs for hitl block

* Fix notifs

* Fix logs page

* Fix logs page again

* Fix

* Checkpoint

* Cleanup v1

* Refactor v2

* Refactor v3

* Refactor v4

* Refactor v5

* Resume page

* Fix variables in loops

* Fix var res bugs

* Ui changes

* Approval block

* Hitl works e2e v1

* Fix tets

* Row level lock

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-06 15:59:28 -08:00
Waleed
f9ce65eddf feat(i18n): update translations (#1831) 2025-11-06 12:23:34 -08:00
Waleed
8c9ed34d99 feat(tools): added 48 new github tools, 12 triggers (#1821)
* feat(tools): added 10 new github triggers

* feat(tools): added 48 new github tools, 12 triggers

* fix(logging): make logging safe start an upsert to prevent insertions of duplicate execution id records, remove layout from github block
2025-11-06 11:11:45 -08:00
Waleed
541bdd3772 feat(i18n): update translations (#1820) 2025-11-05 18:22:50 -08:00
Waleed
60d53ba14a feat(tools): added typeform form submission trigger, added 4 new tools to complete CRUD typeform tools (#1818)
* feat(tools): added typeform form submission trigger, added 4 new tools to complete CRUD typeform tools

* resolve envvars in trigger configuration upon save, tested typeform

* updated docs

* ack PR comments
2025-11-05 17:47:43 -08:00
Vikhyath Mondreti
5c611c6d65 improvement(block-outputs): fix chat fields being hidden even if in inputFormat, cleanup code (#1819)
* improvement(block-outputs): fix chat fields being hidden even if in inputFormat, cleanup code"

* fix type error
2025-11-05 16:05:39 -08:00
Waleed
2b78b5ea73 feat(i18n): update translations (#1817) 2025-11-05 15:26:19 -08:00
Waleed
cf023e4d22 feat(tools): added download file tool for onedrive, google drive, and slack; added move email tool for gmail and outlook (#1785)
* feat(tools): added download file tool for onedrive, google drive, and slack

* added gmail & outlook move tools, added missing credentials descriptions to modal

* added slack delete/update message, add reaction; added gmail read/unread/label/unarchive; added outlook copy/delete/read/unread

* added threads to slack operations

* added timestamp for slack webhook trigger since api uses timestamp for updating/reacting/deleting

* cleanup

* added file info to slack read messages

* updated slack desc

* fixed downloading for onedrive, slack, and drive

* fix type check

* fix build failure

* cleanup files, fix triggers with attachments, fix integration blocks with include attachment to parse to user files, remove unused code

* fix move files tools

* fix tests

* fix build errors

* fix type error

* fix tests

* remove redundant code and filter out unecessary user file fields

* fix lint error

* remove fields from tag dropdown

* fix file upload via API

* fix pdf parse issue

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-05 13:00:34 -08:00
Waleed
21774de275 feat(i18n): update translations (#1815)
* feat(i18n): update translations

* fix translations
2025-11-05 11:40:56 -08:00
Waleed
2056e8ae5f feat(tools): added additional youtube search params, get channel playlists videos and related videos tools (#1814) 2025-11-05 11:26:45 -08:00
Waleed
11fd1544bb feat(i18n): update translations (#1813) 2025-11-05 11:22:42 -08:00
Waleed
0260dbc3f2 feat(tools): added perplexity search endpoint, updated models list for perplexity block (#1812) 2025-11-05 11:15:15 -08:00
Waleed
68056b72c2 feat(i18n): update translations (#1811) 2025-11-05 05:29:23 -08:00
Adam Gough
fa323e2e51 feat(twilio-voice): added twilio voice webhook + tool (#1776)
* first twilio voice push, no testing

* simplified operations, calling and get recording works

* cleaned up operations

* twilio webhook works

* added docs

* updated logic

* minor change

* reverted change

* files fixed for bun run lint

* fix instructions

* removed unused files

* added slack validation and twilio

* changed twiml instruction

* fixed build

* cleanup

* remove extraneous comments

* fixed missing mcosk

* split out client-side utils

* update docs

* fix tests

* had to add some reverts

* custom tool that was fialing bulid

* reveted changes
2025-11-04 23:56:06 -08:00
Adam Gough
b0fa3e8a26 improvement(reply-gmail): added reply to gmail (#1809)
* added reply to thread/message

* cleanup, extract header helper for threaded replies

* more helpers
2025-11-04 20:23:10 -08:00
Waleed
f65d62ea3d improvement(async): improve error capturing for asynchronous workflow executions (#1808)
* improvement(async): improve error capturing for asynchronous workflow executions

* surface more erros

* added more logs

* fix failing tests

* ack DB comments
2025-11-04 18:16:00 -08:00
Waleed
670e63c108 fix(schedules): restore enabling/disabling of schedules, fix premature cron validation (#1807) 2025-11-04 14:05:29 -08:00
Waleed
e62a635757 feat(i18n): update translations (#1806) 2025-11-04 13:39:10 -08:00
Waleed
a29f9fd55f feat(schedules): move schedule configuration out of modals into subblocks (#1805)
* feat(schedules): move schedule configuration out of modals into subblocks

* added more timezones

* added simple in-memory rate limiting to update schedule, validation on numeric values for date and time, fix update schedule behavior

* fix failing tests, ack PR comments

* surface better errors
2025-11-04 13:36:50 -08:00
Waleed
e9ff94f06f chore(deps): upgrade turbopack (#1803) 2025-11-03 22:48:22 -08:00
Waleed
56f645890a fix(i18n): fix translation pipeline (#1804) 2025-11-03 22:47:55 -08:00
Waleed
1ce834f2fe feat(i18n): update translations (#1794)
* feat(i18n): update translations

* remove all outdated triggers, cleanup yml too
2025-11-03 22:30:50 -08:00
Vikhyath Mondreti
0363f8a33d fix(external-triggers): not passing payload through + incorrect server-side resolver logic (#1801)
* fix integration triggers

* ignore text readonly subblocks

* fix

* fix to ignore readOnly vals

* fix var references

* simplify

* cleanup code
2025-11-03 19:54:42 -08:00
Vikhyath Mondreti
d1fcade5ab fix(conn-status): remove unused connection status inside user avatar stack (#1800) 2025-11-03 15:12:56 -08:00
Waleed
3af7d136c6 feat(mcp): surface better errors for MCP connection failures (#1796) 2025-11-03 14:28:25 -08:00
Vikhyath Mondreti
2eea3caccd feat(import-export): improvements to export workspace, maintain file structure, include workflow variables (#1799)
* feat(import-export): improvements to export workspace, maintain file structure

* fix type'

* import/export variables

* fix var ref id bug
2025-11-03 12:13:57 -08:00
Siddharth Ganesan
fb445b166d fix(legacy-start): fix legacy start block execution in new executor 2025-11-03 10:37:59 -08:00
Siddharth Ganesan
3bf00cbd2a improvement(executor): redesign executor + add start block (#1790)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* improvement(start): revert to start block

* make it work with start block

* fix start block persistence

* cleanup triggers

* debounce status checks

* update docs

* improvement(start): revert to start block

* make it work with start block

* fix start block persistence

* cleanup triggers

* debounce status checks

* update docs

* SSE v0.1

* v0.2

* v0.3

* v0.4

* v0.5

* v0.6

* broken checkpoint

* Executor progress - everything preliminarily tested except while loops and triggers

* Executor fixes

* Fix var typing

* Implement while loop execution

* Loop and parallel result agg

* Refactor v1 - loops work

* Fix var resolution in for each loop

* Fix while loop condition and variable resolution

* Fix loop iteration counts

* Fix loop badges

* Clean logs

* Fix variable references from start block

* Fix condition block

* Fix conditional convergence

* Dont execute orphaned nodse

* Code cleanup 1 and error surfacing

* compile time try catch

* Some fixes

* Fix error throwing

* Sentinels v1

* Fix multiple start and end nodes in loop

* Edge restoration

* Fix reachable nodes execution

* Parallel subflows

* Fix loop/parallel sentinel convergence

* Loops and parallels orchestrator

* Split executor

* Variable resolution split

* Dag phase

* Refactor

* Refactor

* Refactor 3

* Lint + refactor

* Lint + cleanup + refactor

* Readability

* Initial logs

* Fix trace spans

* Console pills for iters

* Add input/output pills

* Checkpoint

* remove unused code

* THIS IS THE COMMIT THAT CAN BREAK A LOT OF THINGS

* ANOTHER BIG REFACTOR

* Lint + fix tests

* Fix webhook

* Remove comment

* Merge stash

* Fix triggers?

* Stuff

* Fix error port

* Lint

* Consolidate state

* Clean up some var resolution

* Remove some var resolution logs

* Fix chat

* Fix chat triggers

* Fix chat trigger fully

* Snapshot refactor

* Fix mcp and custom tools

* Lint

* Fix parallel default count and trace span overlay

* Agent purple

* Fix test

* Fix test

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-02 12:21:16 -08:00
Waleed
7d67ae397d fix(evaluator): fix evaluator to handle temperature gracefully like router (#1792)
* fix(evaluator): fix evaluator to handle temperature gracefully like router

* apps/sim

* fix eval-input subblock
2025-11-01 18:52:18 -07:00
Waleed
f9980868a4 improvement(variables): add error context for duplicate variable names, only check for collision when focus is lost (#1791)
* improvement(variables): add error context for duplicate variable names, only check for collision when focus is lost

* disallow empty variable names, performance optimizations

* safety guard against empty variables names
2025-11-01 18:19:34 -07:00
Waleed
e4d21568e3 feat(i18n): update translations (#1788) 2025-11-01 14:44:51 -07:00
Waleed
5479461617 feat(docs): added page nav buttons, static search, TOC footer (#1787)
* feat(docs): added page nav buttons, static search, TOC footer

* back to dynamic search since indexes are too large, added caching hour over hour
2025-11-01 14:38:28 -07:00
Vikhyath Mondreti
86b3570252 fix(trigger-dup): on duplicate trigger should not point at old webhook row (#1784) 2025-10-31 19:39:17 -07:00
Vikhyath Mondreti
44271cd101 fix(triggers-persistence): triggers persistence, deletion, updating configs + state management simplifcation (#1783)
* fix(triggers): configuration persistences issues

* required fields validation staleness issue
2025-10-31 18:06:31 -07:00
Vikhyath Mondreti
f6a5c5c829 improvement(cleanup): remove useWorkflowDiff hook (#1781) 2025-10-31 12:04:25 -07:00
Waleed
e64129c1ad feat(triggers): modify triggers to use existing subblock system, webhook order of operations improvements (#1774)
* feat(triggers): make triggers use existing subblock system, need to still fix webhook URL on multiselect and add script in text subblock for google form

* minimize added subblocks, cleanup code, make triggers first-class subblock users

* remove multi select dropdown and add props to existing dropdown instead

* cleanup dropdown

* add socket op to delete external webhook connections on block delete

* establish external webhook before creating webhook DB record, surface better errors for ones that require external connections

* fix copy button in short-input

* revert environment.ts, cleanup

* add triggers registry, update copilot tool to reflect new trigger setup

* update trigger-save subblock

* clean

* cleanup

* remove unused subblock store op, update search modal to reflect list of triggers

* add init from workflow to subblock store to populate new subblock format from old triggers

* fix mapping of old names to new ones

* added debug logging

* remove all extraneous debug logging and added mapping for triggerConfig field names that were changed

* fix trigger config for triggers w/ multiple triggers

* edge cases for effectiveTriggerId

* cleaned up

* fix dropdown multiselect

* fix multiselect

* updated short-input copy button

* duplicate blocks in trigger mode

* ack PR comments
2025-10-31 11:38:59 -07:00
Waleed
70ff5394a4 improvement(mcp): ditch custom mcp client in favor of mcp sdk (#1780) 2025-10-31 11:21:00 -07:00
Waleed
6cd82f07ed fix(presence): remove presence for a solo user (#1779) 2025-10-30 22:47:37 -07:00
Vikhyath Mondreti
4a3c6d17e3 fix(client-directive): fix build error (#1778) 2025-10-30 20:29:12 -07:00
Vikhyath Mondreti
0b16fa4dd0 fix(triggers): incoming edges should be filtered from execution and UI graph (#1777) 2025-10-30 20:20:32 -07:00
Vikhyath Mondreti
eac358bc7c feat(live-cursor): live cursor during collaboration (#1775)
* feat(live-cursor): collaborative cursor

* fix user avatar url rendering

* simplify presence

* fix env ts

* fix lint

* fix type mismatch
2025-10-30 19:47:11 -07:00
Vikhyath Mondreti
a072e6d1d8 improvement(custom-tools): make them workspace scoped + ux to manage them (#1772)
* improvement(custom-tools): make them workspace scoped

* fix auth check

* remove comments

* add dup check

* fix dup error message display

* fix tests

* fix on app loading of custom tools
2025-10-30 17:40:38 -07:00
Vikhyath Mondreti
3b901b33d1 fix(webhook-notif): modal positioning (#1771) 2025-10-30 16:58:17 -07:00
Vikhyath Mondreti
fe9ebbf81b improvement(api-keys): move to workspace level (#1765)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* improvement(api-keys): move to workspace level

* remove migration to prep merge

* remove two more unused cols

* prep staging  merge

* add migration back

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-10-30 11:42:58 -07:00
Waleed
c99bb0aaa2 feat(cost): added hidden cost breakdown component to settings > subscription, start collecting current period copilot cost and last period copilot cost (#1770)
* feat(cost): added hidden cost breakdown component to settings > subscription, start collecting current period copilot cost and last period copilot cost

* don't rerender envvars when switching between workflows in the same workspace
2025-10-30 11:09:47 -07:00
Waleed
61725c2d15 feat(envvars): use cache for envvar dropdown key names, prevent autofill & suggestions in the settings (#1769)
* feat(envvars): use cache for envvar dropdown key names, prevent autofill & suggestions in the settings

* add the same prevention for autocomplete and suggestions to sso and webhook
2025-10-30 00:23:35 -07:00
Waleed
8b0079b834 feat(i18n): update translations (#1768) 2025-10-30 00:03:16 -07:00
Vikhyath Mondreti
fdefb14e6b improvement(ms-teams): resolve mentions accurately (#1762)
* improvement(ms-teams): resolve mentions accurately

* fix for bots

* add utils file

* add logs

* fix perms issue

* fix scopes

* fetch works for bots

* Revert "fetch works for bots"

This reverts commit 0ac702a8f3.

* update docs
2025-10-29 23:49:05 -07:00
Waleed
47913f87de fix(kb): fix mistral parse and kb uploads, include userId in internal auth (#1767)
* fix(kb): fix mistral parse and kb uploads, include userId in internal auth

* update updated_at for kb when adding a new doc via knowledge block

* update tests
2025-10-29 23:18:39 -07:00
Waleed
48f520b3c7 feat(files): added file manager table, enforce permissions for viewing files (#1766)
* feat(files): added file manager table, enforce permissions for viewing files

* rename types

* cleanup

* cleanup

* confirm local file system works with all contexts

* clean

* remove isAsync

* ignore expiresAt

* add relative imports instead of absolute ones

* absl imports

* remove redundant comments
2025-10-29 22:03:27 -07:00
Vikhyath Mondreti
da30c25efa improvement(chat): increase max files to 15 and resolve workflow variables in webhook execution (#1764)
* improvement(chat): increase max files to 15 and resolve workflow variables in webhook execution

* fix workflow vars

* fix for schedules
2025-10-29 15:34:59 -07:00
Siddharth Ganesan
b95ea9148f fix(copilot): consolidate usage limit validation (#1763)
* Use helper for api key validation

* Lint
2025-10-29 13:14:28 -07:00
Waleed
fcf947df22 fix(variables): added the same input vars mapping from workflow block, added type validation to variables block, updated UI (#1761)
* fix(variables): added the same input vars mapping from workflow block, added type validation to variables block, updated UI

* cleanup

* lint
2025-10-29 01:22:10 -07:00
Waleed
7be9941bc9 feat(chat): support local file downloads/uploads for chat for parity with kb (#1751)
* feat(chat): support local file downloads/uploads for chat for parity with kb

* cleanup imports

* feat(files): add storage service and consolidate file utils

* fix failing tests

* cleanup

* cleaned up

* clean

* add context for file uplaods/fetches

* fixed blob

* rm comments

* fix failing test

* fix profile pics

* add workspace dedupe for duplicated files

* update chat to accept only accepted types

* add loading anim to profilepic update

* optimistically update keys, copilot keys, and file uploads to prevent flash

* add defensive check for deleting files
2025-10-28 20:09:51 -07:00
Siddharth Ganesan
807014a5d2 fix(wait, vars, while): var set (#1759)
* Fix env is hosted

* Lint
2025-10-28 17:19:11 -07:00
Waleed
aef1f18c1e feat(i18n): update translations (#1756) 2025-10-28 12:43:33 -07:00
Adam Gough
368576b082 feat(create-excel): onedrive create excel (#1745)
* added onedrive upload excel

* added

* updated docs

* lint

* cleaned

* use lib

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-10-28 12:26:17 -07:00
Siddharth Ganesan
aace3066aa feat(while, vars, wait): add while subflow, variables block, wait block (#1754)
* Add variables block

* Add wait block

* While loop v1

* While loop v1

* Do while loops

* Copilot user input rerender fix

* Fix while and dowhile

* Vars block dropdown

* While loop docs

* Remove vars block coloring

* Fix lint

* Link docs to wait

* Fix build fail
2025-10-28 11:59:47 -07:00
Waleed
ef5b6999ab fix(migrations): add missing migration for processing columns in documents table (#1749) 2025-10-27 23:23:42 -07:00
Waleed
9df886d1e9 feat(kb): added sort ordering to knowledgebase page, styling update (#1748)
* remove extraneous text from careers app

* feat(kb): added sort order to kb

* updated styles of workspace selector and delete button to match theme of rest of knowledgebase
2025-10-27 21:39:48 -07:00
Waleed
9991796661 fix(docs): added new workflow block image, fixed operator issue on null properties (#1747)
* fix(docs): added new workflow block image, fixed operator issue on null properties

* reverted layout change

* fix navbar color in light mode
2025-10-27 20:56:52 -07:00
Waleed
095a15d7b5 feat(careers): added a careers page (#1746)
* feat(careers): added a careers page

* cleanup

* revert hardcoded environment
2025-10-27 20:25:44 -07:00
Waleed
8620ab255a improvement(docs): added a copy page button to the docs pages (#1743)
* improvement(docs): added a copy page button to the docs pages

* added copy page button & fixed TOC alignment
2025-10-27 15:05:27 -07:00
Waleed
47ddfb639e fix(dropdown): auto-add character to trigger tag dropdown on connection tag drop in agent tools (#1742) 2025-10-27 14:28:29 -07:00
Waleed
5d48c2780c improvement(ui): enhance ring outline for code subblock and mcp tool subblocks in agent (#1741) 2025-10-27 13:59:19 -07:00
Waleed
38614fad79 fix(mcp): resolve variables & block references in mcp subblocks (#1735)
* fix(mcp): resolve variables & block references in mcp subblocks

* cleanup

* ack PR comment

* added variables access to mcp tools when added in agent block

* fix sequential migrations issues
2025-10-27 13:13:11 -07:00
Waleed
6f32aea96b feat(kb): added support for local file storage for knowledgebase (#1738)
* feat(kb): added support for local file storage for knowledgebase

* updated tests

* ack PR comments

* added back env example
2025-10-27 11:28:45 -07:00
Waleed
98e98496e8 Revert "improvement(consts): removed redundant default consts in favor of env…" (#1739)
This reverts commit 659b46fa2f.
2025-10-26 23:06:14 -07:00
Waleed
659b46fa2f improvement(consts): removed redundant default consts in favor of envvar defaults for storage & usage limits (#1737)
* improvement(consts): removed redundant default consts in favor of envvar defaults for storage & usage limits

* remove unnecessary tests
2025-10-26 21:43:00 -07:00
Waleed
fb3d6d4c88 feat(files): added usage indicator for file storage to settings (#1736)
* feat(files): added usage indicator for file storage to settings

* cleanup
2025-10-26 21:36:25 -07:00
Waleed
ec2cc82b72 feat(i18n): update translations (#1734) 2025-10-26 18:35:20 -07:00
Adam Gough
274d5e3afc fix(clay): fixed clay tool (#1725)
* fixed clay tool

* added metadata

* added metadata to types

* fix(clay): remove (optional) from subblock name

* regen docs
2025-10-26 18:30:08 -07:00
Waleed
c552bb9c5f fix(elevenlabs): added internal auth helper for proxy routes (#1732)
* fix(elevenlabs): added internal auth helper for proxy routes

* remove concurrent tests

* build fix
2025-10-25 17:54:27 -07:00
Vikhyath Mondreti
ad7b791242 improvement(deployments): simplify deployments for chat and indicate active version (#1730)
* improvement(deployment-ux): deployment should indicate and make details configurable when activating previous version

* fix activation UI

* remove redundant code

* revert pulsing dot

* fix redeploy bug

* bill workspace owner for deployed chat

* deployed chat

* fix bugs

* fix tests, address greptile

* fix

* ui bug to load api key

* fix qdrant fetch tool
2025-10-25 16:55:34 -07:00
Waleed
ce4893a53c feat(sso-chat-deployment): added sso auth option for chat deployment (#1729)
* feat(sso-chat-deployment): added sso auth option for chat deployment

* ack PR comments
2025-10-25 14:58:25 -07:00
Adam Gough
517f1a91b6 fix(google-scopes): added forms and different drive scope (#1532)
* added google forms scope and google drive scope

* added back file scope

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Mac-530.lan>
2025-10-25 12:08:49 -07:00
Waleed
dba7514350 improvement(schedule): fix UI bug with schedule modal (#1722) 2025-10-23 14:16:59 -07:00
Waleed
e94de1dd26 feat(i18n): update translations (#1721) 2025-10-23 13:15:05 -07:00
Waleed
a4e874b266 feat(tools): added webflow OAuth + tools (#1720)
* feat(tools): added webflow OAuth + tools

* remove itemId from delete item

* remove siteId

* added webhook triggers + oauth scopes + site/collection selector

* update sample payload for webflow triggers

* cleanup

* fix discord color
2025-10-23 13:08:32 -07:00
Waleed
ec034f3fc7 fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data (#1719)
* fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data

* apps/sim

* renaming

* remove relative import
2025-10-22 14:07:52 -07:00
Waleed
e425d064c0 improvement(condition): added variable and envvar highlighting for condition input (#1718) 2025-10-22 13:12:09 -07:00
Waleed
bcd1a2faf6 feat(i18n): update translations (#1709) 2025-10-22 12:55:36 -07:00
Vikhyath Mondreti
989a77261c fix(debug-mode): remove duplicate debug mode flag (#1714) 2025-10-22 00:49:18 -10:00
Vikhyath Mondreti
5ab482127d fix(remove-exec-context): tools handle workflow id check themselves 2025-10-21 16:34:08 -10:00
Vikhyath Mondreti
b8bc632baa fix(workflow-auth): adding workflowId param to only internal urls (#1710) 2025-10-21 16:30:22 -10:00
Waleed
4d7ebd8bcb feat(supabase): added vector search tool and updated docs (#1707)
* feat(supabase): added vector search tool and updated docs

* exclude generic webhook from docs gen

* change items to pages in meta.json for tools directory in the docs
2025-10-21 18:48:18 -07:00
Vikhyath Mondreti
ca1156a6c2 fix(base-url): use getBaseUrl helper in copilot revert state endpoint (#1706)
* revert base url

* fix tests"
;
2025-10-21 15:44:05 -10:00
Vikhyath Mondreti
89eb1849d0 fix(external-route): handleInternalRequest should still check if request internal 2025-10-21 15:00:33 -10:00
Vikhyath Mondreti
1d4833f485 fix case sensitive header (#1705) 2025-10-21 14:51:13 -10:00
Waleed
d5902e91da fix(kb): added internal auth for mistral OCR tool via KB (#1704) 2025-10-21 16:56:53 -07:00
Vikhyath Mondreti
e6ba323de4 Merge pull request #1700 from simstudioai/fix/internal-req
fix(internal-req): add internal token to server side
2025-10-21 12:07:54 -07:00
Waleed
859711991f fix(docs): made sidebar directories scrollable, stylistic changes (#1702) 2025-10-21 12:04:19 -07:00
Waleed
c178a90f02 improvement(helm): added additional envvars to helm charts (#1695)
* improvement(helm): added additional envvars to helm charts

* updated docs
2025-10-21 12:02:51 -07:00
Waleed
eb8995ee7c fix(kb): add base URL for kb fetches (#1701) 2025-10-21 12:02:18 -07:00
Vikhyath Mondreti
b269447539 fix(internal-req): add internal token to server side 2025-10-21 08:36:15 -10:00
Vikhyath Mondreti
ce660e2df9 fix(plan-config): align buttons above divider (#1696)
* fix alignment of buttons on landing page

* revert environment.ts

* revert other change
2025-10-19 16:00:43 -07:00
Vikhyath Mondreti
063bd610b1 fix(jira): issue selector inf render (#1693)
* improvement(copilot): version update, edit previous messages, revert logic, model selector, observability, add haiku 4.5 (#1688)

* Add exa to search online tool

* Larger font size

* Copilot UI improvements

* Fix models options

* Add haiku 4.5 to copilot

* Model ui for haiku

* Fix lint

* Revert

* Only allow one revert to message

* Clear diff on revert

* Fix welcome screen flash

* Add focus onto the user input box when clicked

* Fix grayout of new stream on old edit message

* Lint

* Make edit message submit smoother

* Allow message sent while streaming

* Revert popup improvements: gray out stuff below, show cursor on revert

* Fix lint

* Improve chat history dropdown

* Improve get block metadata tool

* Update update cost route

* Fix env

* Context usage endpoint

* Make chat history scrollable

* Fix lint

* Copilot revert popup updates

* Fix lint

* Fix tests and lint

* Add summary tool

* fix(jira): issue selector inf render

* fix

* fixed

* fix endpoints

* fix

* more detailed error

* fix endpoint

* revert environment.ts file

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-10-19 15:20:08 -07:00
Waleed
9132cd224d fix(mcp): add workflow id to agent-handler for mcp tools (#1694) 2025-10-19 10:40:58 -07:00
Waleed
c70c32a3bd fix(settings-ui): fix settings ui, add upload status (#1691) 2025-10-18 15:37:12 -07:00
Siddharth Ganesan
cc0ace7de6 improvement(copilot): version update (#1689)
* Add exa to search online tool

* Larger font size

* Copilot UI improvements

* Fix models options

* Add haiku 4.5 to copilot

* Model ui for haiku

* Fix lint

* Revert

* Only allow one revert to message

* Clear diff on revert

* Fix welcome screen flash

* Add focus onto the user input box when clicked

* Fix grayout of new stream on old edit message

* Lint

* Make edit message submit smoother

* Allow message sent while streaming

* Revert popup improvements: gray out stuff below, show cursor on revert

* Fix lint

* Improve chat history dropdown

* Improve get block metadata tool

* Update update cost route

* Fix env

* Context usage endpoint

* Make chat history scrollable

* Fix lint

* Copilot revert popup updates

* Fix lint

* Fix tests and lint

* Add summary tool

* Fix env.ts
2025-10-18 12:59:48 -07:00
Vikhyath Mondreti
de1ac9a704 improvement(models): system to blacklist models (#1687)
* improvment(models): system to blacklist models

* move base models endpoint to right place

* remove tngtech models too
2025-10-18 12:09:18 -07:00
Vikhyath Mondreti
728a4c82c6 add inline defaults for storage limits by plan (#1685) 2025-10-18 10:51:18 -07:00
Waleed
37f293a761 feat(i18n): update translations (#1683) 2025-10-18 09:58:18 -07:00
Waleed
d1c08daaf4 improvement(docs): overhaul docs (#1680)
* improvement(docs): overhaul docs

* lint

* light mode

* more light mode

* added llms.txt and llms-full.txt and sitemap

* fixed mobile styling and position for zoom in out

* finished styling

* improvement(docs): overhaul docs

* lint

* remove dups

* renaming components

* cleanup
2025-10-17 22:29:55 -07:00
Waleed
90c34b2c46 fix(airtable): fix airtable oauth connection (#1682) 2025-10-17 22:15:35 -07:00
Waleed
3a0019bd13 fix(docker): remove prebuild lint check from docker (#1681) 2025-10-17 22:10:25 -07:00
Waleed
a6122f2bbc feat(i18n): update translations (#1673) 2025-10-17 21:59:07 -07:00
Adam Gough
9bf5f6e1fc removed raw paylod for gmail and outlook (#1679)
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-10-17 18:56:48 -07:00
Vikhyath Mondreti
22b3dde155 fix(env-vars): promotion should never leave a copy in personal vars (#1678)
* fix(env-vars): promotion should never leave a copy in personal vars

* fix lint
2025-10-17 18:34:38 -07:00
Vikhyath Mondreti
c1725c1c4b improvement(error-messages): make error extraction generalized abstraction (#1676)
* make error extraction generalized abstraction

* remove comments

* remove console logs
2025-10-17 17:30:12 -07:00
Vikhyath Mondreti
64eee587cd improvement(gdrive): remove mime type subblock from upload file tool (#1674)
* remove mime type subblock from upload file tool for gdrive

* add UI message to limit every x minutes to <60
2025-10-17 14:58:23 -07:00
Vikhyath Mondreti
35c551984f feat(files): gmail upload attachment, workspace files, file storage limits (#1666)
* feat(gmail): add attachment uploads

* add workspace files

* update landing page

* fix lint

* fix test

* fixed UI

* added additional S3 tools to upload files

* added search filters for gmail trigger

* added files to every block

* works

* fix

* register sharepoint tool

---------

Co-authored-by: waleed <waleed>
2025-10-17 14:44:22 -07:00
Vikhyath Mondreti
d92d9a02cd fix(permissions): cannot create workflow with read perms (#1671) 2025-10-17 13:44:44 -07:00
Adam Gough
64ede7f038 added legit urls to the metadata (#1665)
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-10-17 13:11:02 -07:00
Vikhyath Mondreti
0fbbbe02c7 fix(execution-counts): execution counts by trigger type recorded accurately (#1670) 2025-10-17 12:18:11 -07:00
Waleed
29c7827d6f fix(deployed-chat): include workspace id in deployed chat request (#1664) 2025-10-16 16:23:28 -07:00
Waleed
22f9d6e2df improvement(dashboard): improve dashboard performance, enrich charts, consolidate routes (#1662)
* improvement(dashboard): improve dashboard performance, enrich charts, consolidate routes

* cleanup
2025-10-16 15:53:06 -07:00
Waleed
0cb615428d feat(powershell): add gitattributes to prevent lint issues for powershell users (#1661) 2025-10-16 15:50:26 -07:00
Waleed
74576ec921 feat(i18n): update translations (#1660) 2025-10-16 15:31:10 -07:00
Waleed
67e681dd7c feat(webhooks): added optioanl input format to webhooks, added support for file uploads (#1654)
* feat(webhooks): added  optioanl input format to webhooks, added support for file uploads

* feat(webhooks): added input format component to generic webhook trigger, added file support

* consolidated execution files utils, extended presigned URL duration for async tasks
2025-10-16 12:16:12 -07:00
Waleed
4b05da31e0 feat(i18n): update translations (#1659) 2025-10-16 11:49:51 -07:00
Vikhyath Mondreti
82fa4e8bbb fix(input-format): allow value field to be cleared (#1658)
* fix(input-format): allow value field to be cleared

* don't let value field be detected as deployment change

* fix zep icon in docs

* exclude collapsed state
2025-10-16 11:11:27 -07:00
Waleed
4cd790b200 feat(i18n): update translations (#1653) 2025-10-15 23:21:26 -07:00
Waleed
b7e0b42d48 improvement(dashboard): cleanup execution dashboard UI, fix logs trace, and improve performance (#1651)
* improvement(dashboard): cleanup execution dashboard UI, fix logs trace, and improve perforamnce

* cleanup

* cleaned up

* ack PR comments
2025-10-15 23:00:07 -07:00
Waleed
c6ef5785c8 fix(i18n): fix SDK and guardrails translation corruption, restore i18n gh action for docs (#1652)
* fix(i18n): fix SDK and guardrails translation corruption

* re-enable i18n gh action
2025-10-15 22:52:48 -07:00
Waleed
48eab7e744 feat(dashboard): update UI for execution dashboard, fix next-runtime-env issues for SSO (#1649) 2025-10-15 19:29:10 -07:00
Vikhyath Mondreti
701bf2b510 improvement(response-copilot): prefer builder mode + fix builder/editor mode conversions (#1648)
* improvement(response-copilot): make it use builder mode over editor mode to prevent json formatting issues

* change placeholder text

* fix conversion between builder and editor mode
2025-10-15 19:14:56 -07:00
Vikhyath Mondreti
ba8acbba07 fix(connection-tags): drag and drop didn't render tag dropdown with input format fields (#1647) 2025-10-15 16:31:30 -07:00
Vikhyath Mondreti
56d04a9558 feat(zep): add tools from Zep (#1646)
* feat(zep): add tools from Zep

* correct icon

* address greptile comments
2025-10-15 15:49:18 -07:00
Waleed
2ca9044bc6 fix(layout): layout canvas onInit after node sizes are calculated, remove legacy history code and legacy marking of dirty workflows (#1645) 2025-10-15 15:35:32 -07:00
Vikhyath Mondreti
b2009fe467 fix build issue (#1644) 2025-10-15 14:26:06 -07:00
Vikhyath Mondreti
eb4821ff30 fix(chat-subs): always use getBaseUrl helper to fetch base url (#1643)
* fix(chat-subs): always use next public app url env

* use getBaseUrl everywhere

* move remaining uses

* fix test

* change auth.ts and make getBaseUrl() call not top level for emails

* change remaining uses

* revert csp

* cleanup

* fix
2025-10-15 14:13:23 -07:00
Waleed
4cceb22f21 fix(slack): update slack config to support refresh token rotation (#1642) 2025-10-15 11:54:33 -07:00
Vikhyath Mondreti
fd67fd220c improvement(functions): increase function block timeout to 3 min (#1641)
* improvement(functions): increase function block timeout to 3 min

* fix tests

* use shared constant

* remove comment
2025-10-15 11:52:02 -07:00
Vikhyath Mondreti
061c1dff4e fix(schedules): offload next run calculation to croner (#1640)
* fix(schedules): offload next run calculation to croner

* fix localstorage dependent tests

* address greptile comment
2025-10-15 11:37:42 -07:00
Siddharth Ganesan
1a05ef97d6 feat(test-framework): add executions logs for test framework (#1639)
* Starting logs page

* Execution history v0

* Execution dashboard

* Fix scroll

* Add open workflow button

* Lint

* Fix fetchExecutions in dependency array

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-10-15 10:36:02 -07:00
Waleed
7595e54dfb fix(chat): allow file-only messages with no text to be sent in chat panel and deployed chat (#1635) 2025-10-14 20:27:52 -07:00
Adam Gough
6c9fce5da4 Feat(microsoftteams-file): new trigger + file upload (#1590)
* adding file logic and chat trigger

* working trig

* teams specific logic

* greptile comments

* lint

* cleaned up

* save modal changes

* created a interface for subscriptions

* removed trigger task

* reduce comments

* removed trig task

* removed comment

* simplified

* added tele logic back

* addressed some more comments

* simplified db call

* cleaned up utils

* helper telegram

* removed fallback

* removed scope

* simplify to use helpers

* fix credential resolution

* add logs

* fix

* fix attachment case

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-10-14 19:58:47 -07:00
Vikhyath Mondreti
b296323716 feat(attachments): use filesystem for gmail, outlook triggers to save attachments (#1631)
* feat(outlook): add include attachment feature to outlook

* add include attachments to gmail trigger

* add gmail trigger, outlook block include attachments

* fix rendering issue

* remove comment

* fix architecture

* fix redeploy

* pass files to logging session to surface in logs

* fix gmail block parsing attachments

* fix reads
2025-10-14 19:10:58 -07:00
Waleed
d325fdde6c fix(i18n): exclude SDK files from automatic translation to prevent corruption (#1634)
* fix(i18n): exclude SDK files from automatic translation to prevent corruption

* fix(i18n): temporarily disable auto-translate action while fixing translation corruption

* disable i18n action
2025-10-14 19:09:19 -07:00
Waleed
36f2a62f3f fix(i18n): add additional youtube tools, sync i18n pipeline, remove dated docs (#1632) 2025-10-14 18:34:38 -07:00
Waleed
e83d3a6b9f fix(tool-calls): remove redundant input/output fields in favor of arguments/response, exclude isExpanded for tools in agents in workflow change detection (#1630) 2025-10-14 17:21:17 -07:00
Waleed
6723adf3c1 fix(kb-sanitization): add sanitization for kb tags when exporting workflow (#1628) 2025-10-14 16:56:04 -07:00
Waleed
9efc08a832 fix(telemetry): updated telemetry, added nested sanitization, added granular trace spans for logs and updated UI (#1627)
* feat(logs): updated telemetry, added nested sanitization, added granular trace spans for logs and updated UI

* refactor trace spans into separate components

* remove any's from tool defs

* updated UI and overlayed spans

* cleanup

* ack PR comments

* stricter type safety

* clean
2025-10-14 16:41:12 -07:00
Waleed
f345c4d1d8 fix(docker): updated docker to use non-root user for k8s/helm deployments (#1626)
* fix(docker): updated docker to use non-root user for k8s/helm deployments

* ack PR comments
2025-10-14 15:54:51 -07:00
Waleed
f147eaee1c feat(telegram): added additional telegram tools & docs (#1625)
* feat(telegram): added delete message,send photo-video-audio-animation tools

* fix: updated Telegram tool types and removed debug logs

* reverted telegram message tool to older name

* added docs for telegram

* updated telegram docs

---------

Co-authored-by: SimplyRohit <rohitjaatjaat073@gmail.com>
2025-10-14 15:34:41 -07:00
Siddharth Ganesan
6f3df271fd feat(copilot+canvas rendering): add context window tracking to copilot and selectively render canvas components (#1622)
* Copilot context window

* Fix pill

* Speed up canvas

* Fix react hook bug

* Context pill div
2025-10-13 19:56:02 -07:00
Vikhyath Mondreti
3dd36a8a35 fix(schedules): migrate to trigger dev (#1618)
* fix(schedules): add cron job auth like other cron routes

* migrate schedules to trigger dev

* remove executions check

* fix tests
2025-10-13 13:12:55 -07:00
Waleed
09cccd5487 feat(helm): added cert-postgresql template to helm (#1620)
* feat(helm): added cert-postgresql template to helm

* use js-tiktoken (pure js) in favor of tiktoken (wasm)
2025-10-13 12:41:43 -07:00
Waleed
1773530325 fix(sdk): fixed ts sdk publishing job to use later node version (#1619) 2025-10-13 12:13:50 -07:00
Waleed
2da7a6755c feat(helm): added pdb to helm (#1617)
* feat(helm): added pdb to helm

* add additional config
2025-10-13 12:06:30 -07:00
Waleed
1e81cd6850 fix(kb): added tiktoken for embedding token estimation (#1616)
* fix(kb): added tiktoken for embedding token estimation

* added missing mock
2025-10-13 11:53:50 -07:00
Vikhyath Mondreti
ec73e2e9ce fix(posthog): prevent redirects by whitelisting ingest route (#1615) 2025-10-13 11:08:48 -07:00
Waleed
4937d72d70 fix(devcontainer): fixed devcontainers (#1614) 2025-10-12 18:01:37 -07:00
Waleed
8f06aec68b fix(vulns): fix various vulnerabilities and enhanced code security (#1611)
* fix(vulns): fix SSRF vulnerabilities

* cleanup

* cleanup

* regen docs

* remove unused deps

* fix failing tests

* cleanup

* update deps

* regen bun lock
2025-10-11 22:14:31 -07:00
Waleed
1de6f09069 feat(versions): added the ability to rename deployment versions (#1610) 2025-10-11 21:18:36 -07:00
Waleed
b10b2461a5 feat(mistal): added mistral as a provider, updated model prices (#1607)
* feat(mistal): added mistral as a provider, updated model prices

* remove the ability for a block to reference its own outluts

* fixed order of responses for guardrails block
2025-10-11 20:37:35 -07:00
Waleed
34fc8f84f5 fix(inference-billing): fix inference billing when stream is true via API, add drag-and-drop functionality to deployed chat (#1606)
* fix(inference): fix inference billing when stream is true via API

* add drag-and-drop to deployed chat
2025-10-11 20:37:35 -07:00
Waleed
ee77dea2d6 feat(guardrails): added guardrails block/tools and docs (#1605)
* Adding guardrails block

* ack PR comments

* cleanup checkbox in dark mode

* cleanup

* fix supabase tools
2025-10-11 20:37:35 -07:00
Adam Gough
bba407b507 improvement(privacy-policy): updated privacy policy for google (#1602)
* updated privacy policy for google

* update terms, privacy, and emails to incl address and update verbiage
2025-10-11 20:37:35 -07:00
Waleed
ab63978ce8 fix(blog): rename building to blogs with redirect (#1604) 2025-10-11 20:37:35 -07:00
Waleed
e697e50d4e improvement(performance): remove unused source/target indices, add index on snapshot id (#1603) 2025-10-11 20:37:35 -07:00
Waleed
41ec229431 feat(sessions): remove redis as priority option for session data (#1600) 2025-10-10 18:04:03 -07:00
Waleed
c0f5ba75f1 v0.4.11: webhook, knowledgebase, billing fixes & redis for sessions 2025-10-10 17:46:01 -07:00
Waleed
5a943bca32 fix(ci): pin all workflows and Dockerfiles to Bun v1.2.22 (#1598) 2025-10-10 17:36:06 -07:00
Waleed
923595f57e fix(webhooks): use next public app url instead of request origin for webhook registration (#1596)
* fix(webhooks): use next public app url instead of request origin for webhook registration

* ack PR comments

* ci: pin Bun to v1.2.22 to avoid Bun 1.3 breaking changes
2025-10-10 17:19:51 -07:00
Waleed
241d9fd12d improvement(kb): encode non-ASCII headers for kb uploads (#1595)
* improvement(kb): encode non-ASCII headers for kb uploads

* cleanup

* increase timeouts to match trigger
2025-10-10 17:19:51 -07:00
Vikhyath Mondreti
97a8778449 fix test webhook url (#1594) 2025-10-10 17:19:51 -07:00
Waleed
833e700b58 feat(sessions): add redis as priority option for session data (#1592)
* feat(sessions): add redis as priority option for session data

* update chat client otp
2025-10-10 17:19:51 -07:00
Waleed
2d49892aaa feat(deployed-chat): added file upload to workflow execute API, added to deployed chat, updated chat panel (#1588)
* feat(deployed-chat): updated chat panel UI, deployed chat and API can now accept files

* added nested tag dropdown for files

* added duplicate file validation to chat panel

* update docs & SDKs

* fixed build

* rm extraneous comments

* ack PR comments, cut multiple DB roundtrips for permissions & api key checks in api/workflows

* allow read-only users to access deployment info, but not take actions

* add downloadable file to logs for files passed in via API

* protect files/serve route that is only used client-side

---------

Co-authored-by: waleed <waleed>
2025-10-10 17:19:51 -07:00
Vikhyath Mondreti
8ce5a1b7c0 feat(billing): bill by threshold to prevent cancellation edge case (#1583)
* feat(billing): bill by threshold to prevent cancellation edge case

* fix org billing

* fix idempotency key issue

* small optimization for team checks

* remove console log

* remove unused type

* fix error handling
2025-10-10 17:19:51 -07:00
Waleed
88d2e7b97b fix(env-vars): remove regex parsing from table subblock, add formatDisplayText to various subblocks that didn't have it (#1582) 2025-10-10 17:19:51 -07:00
Waleed
c04eb01aed fix(db): revert to dedicated sockets db connection establishment (#1581) 2025-10-08 08:37:58 -07:00
Waleed
5d887fdca7 v0.4.10: ts-sdk updates, db updates 2025-10-08 00:56:04 -07:00
Waleed
1a0fdb32fe chore(docs): update docs (#1578) 2025-10-08 00:55:18 -07:00
Waleed
9d45b8df1e fix(ts-sdk): fix job to publish ts sdk (#1576) 2025-10-08 00:46:30 -07:00
Waleed
ae3a7f0865 fix(db): reduce overall number of db max conncetions to incr performance (#1575) 2025-10-08 00:30:44 -07:00
Vikhyath Mondreti
25f5e31378 v0.4.9: chat streaming API, DB config changes, sockets improvement, var highlighting, bug fixes 2025-10-07 19:24:37 -07:00
Waleed
7bdf0e94d7 fix(curl-example): fixed curl example in deploy modal to reflect selected option (#1573) 2025-10-07 18:46:12 -07:00
Vikhyath Mondreti
8e43774b5e improvement(sockets): position persistence on drag end, perms call only on joining room (#1571) 2025-10-07 17:31:02 -07:00
Waleed
715f42c1a6 feat(highlighting): added resolved vars highlighting to code subblock, to be consistent with other subblocks (#1570) 2025-10-07 17:17:39 -07:00
Waleed
8200e9a88f feat(i18n): update translations (#1569)
* feat(i18n): update translations

* remove duplicate sections

* fix typos
2025-10-07 16:50:14 -07:00
Waleed
c6f6c9e2a5 fix(streaming-response): add in handling for the response block when streaming (#1568) 2025-10-07 16:21:10 -07:00
Vikhyath Mondreti
2d7ba91c0e fix(workspace-selector-kb): fix selector for assigning workspaces for kbs (#1567) 2025-10-07 15:31:04 -07:00
Waleed
872e034312 feat(chat-streaming): added a stream option to workflow execute route, updated SDKs, updated docs (#1565)
* feat(chat-stream): updated workflow id execute route to support streaming via API

* enable streaming via api

* added only text stream option

* cleanup deployed preview componnet

* updated selectedOutputIds to selectedOutput

* updated TS and Python SDKs with async, rate limits, usage, and streaming API routes

* stream non-streaming blocks when streaming is specified

* fix(chat-panel): add onBlockComplete handler to chat panel to stream back blocks as they complete

* update docs

* cleanup

* ack PR comments

* updated next config

* removed getAssetUrl in favor of local assets

* resolve merge conflicts

* remove extra logic to create sensitive result

* simplify internal auth

* remove vercel blob from CSP + next config
2025-10-07 15:10:37 -07:00
Vikhyath Mondreti
a63a7b0262 fix(undo-redo): preserve trigger/advanced mode (#1566)
* fix(undo-redo): preserve trigger/advanced mode

* remove comments
2025-10-07 14:27:46 -07:00
Vikhyath Mondreti
991a020917 feat(nested-workflow-spans): nested child workflow spans in logs sidepanel (#1561)
* feat(nested-workflow-logs): nested workflow logs display

* logs UX consistency between success and error cases

* fix chat execution

* fix schedules trigger

* update all deployment versions dependent exections to use api key owner instead of workflow owner

* fix tests

* simplify tests
2025-10-07 12:32:04 -07:00
Waleed
f03f395225 fix(db): enable database connection pooling in production (#1564)
* fix: enable database connection pooling in production

* debug: add diagnostic endpoints to test NODE_ENV and database pooling

* test: add connection testing endpoint to diagnose production delay

* redeuce num of concurrent connections
2025-10-07 10:27:33 -07:00
Waleed
174f6a48a6 v0.4.8: more blog 2025-10-06 13:22:22 -07:00
Waleed
c2f0a95802 fix(blog): center footer, fix dark mode, fix avatar (#1559) 2025-10-06 13:20:12 -07:00
5344 changed files with 1018063 additions and 226780 deletions

View File

@@ -0,0 +1,35 @@
---
description: EMCN component library patterns
globs: ["apps/sim/components/emcn/**"]
---
# EMCN Components
Import from `@/components/emcn`, never from subpaths (except CSS files).
## CVA vs Direct Styles
**Use CVA when:** 2+ variants (primary/secondary, sm/md/lg)
```tsx
const buttonVariants = cva('base-classes', {
variants: { variant: { default: '...', primary: '...' } }
})
export { Button, buttonVariants }
```
**Use direct className when:** Single consistent style, no variations
```tsx
function Label({ className, ...props }) {
return <Primitive className={cn('style-classes', className)} {...props} />
}
```
## Rules
- Use Radix UI primitives for accessibility
- Export component and variants (if using CVA)
- TSDoc with usage examples
- Consistent tokens: `font-medium`, `text-[12px]`, `rounded-[4px]`
- `transition-colors` for hover states

20
.cursor/rules/global.mdc Normal file
View File

@@ -0,0 +1,20 @@
---
description: Global coding standards that apply to all files
alwaysApply: true
---
# Global Standards
You are a professional software engineer. All code must follow best practices: accurate, readable, clean, and efficient.
## Logging
Import `createLogger` from `sim/logger`. Use `logger.info`, `logger.warn`, `logger.error` instead of `console.log`.
## Comments
Use TSDoc for documentation. No `====` separators. No non-TSDoc comments.
## Styling
Never update global styles. Keep all styling local to components.
## Package Manager
Use `bun` and `bunx`, not `npm` and `npx`.

View File

@@ -0,0 +1,56 @@
---
description: Core architecture principles for the Sim app
globs: ["apps/sim/**"]
---
# Sim App Architecture
## Core Principles
1. **Single Responsibility**: Each component, hook, store has one clear purpose
2. **Composition Over Complexity**: Break down complex logic into smaller pieces
3. **Type Safety First**: TypeScript interfaces for all props, state, return types
4. **Predictable State**: Zustand for global state, useState for UI-only concerns
## Root-Level Structure
```
apps/sim/
├── app/ # Next.js app router (pages, API routes)
├── blocks/ # Block definitions and registry
├── components/ # Shared UI (emcn/, ui/)
├── executor/ # Workflow execution engine
├── hooks/ # Shared hooks (queries/, selectors/)
├── lib/ # App-wide utilities
├── providers/ # LLM provider integrations
├── stores/ # Zustand stores
├── tools/ # Tool definitions
└── triggers/ # Trigger definitions
```
## Feature Organization
Features live under `app/workspace/[workspaceId]/`:
```
feature/
├── components/ # Feature components
├── hooks/ # Feature-scoped hooks
├── utils/ # Feature-scoped utilities (2+ consumers)
├── feature.tsx # Main component
└── page.tsx # Next.js page entry
```
## Naming Conventions
- **Components**: PascalCase (`WorkflowList`)
- **Hooks**: `use` prefix (`useWorkflowOperations`)
- **Files**: kebab-case (`workflow-list.tsx`)
- **Stores**: `stores/feature/store.ts`
- **Constants**: SCREAMING_SNAKE_CASE
- **Interfaces**: PascalCase with suffix (`WorkflowListProps`)
## Utils Rules
- **Never create `utils.ts` for single consumer** - inline it
- **Create `utils.ts` when** 2+ files need the same helper
- **Check existing sources** before duplicating (`lib/` has many utilities)
- **Location**: `lib/` (app-wide) → `feature/utils/` (feature-scoped) → inline (single-use)

View File

@@ -0,0 +1,48 @@
---
description: Component patterns and structure for React components
globs: ["apps/sim/**/*.tsx"]
---
# Component Patterns
## Structure Order
```typescript
'use client' // Only if using hooks
// Imports (external → internal)
// Constants at module level
const CONFIG = { SPACING: 8 } as const
// Props interface
interface ComponentProps {
requiredProp: string
optionalProp?: boolean
}
export function Component({ requiredProp, optionalProp = false }: ComponentProps) {
// a. Refs
// b. External hooks (useParams, useRouter)
// c. Store hooks
// d. Custom hooks
// e. Local state
// f. useMemo
// g. useCallback
// h. useEffect
// i. Return JSX
}
```
## Rules
1. `'use client'` only when using React hooks
2. Always define props interface
3. Extract constants with `as const`
4. Semantic HTML (`aside`, `nav`, `article`)
5. Optional chain callbacks: `onAction?.(id)`
## Component Extraction
**Extract when:** 50+ lines, used in 2+ files, or has own state/logic
**Keep inline when:** < 10 lines, single use, purely presentational

View File

@@ -0,0 +1,54 @@
---
description: Custom hook patterns and best practices
globs: ["apps/sim/**/use-*.ts", "apps/sim/**/hooks/**/*.ts"]
---
# Hook Patterns
## Structure
```typescript
interface UseFeatureProps {
id: string
onSuccess?: (result: Result) => void
}
export function useFeature({ id, onSuccess }: UseFeatureProps) {
// 1. Refs for stable dependencies
const idRef = useRef(id)
const onSuccessRef = useRef(onSuccess)
// 2. State
const [data, setData] = useState<Data | null>(null)
const [isLoading, setIsLoading] = useState(false)
// 3. Sync refs
useEffect(() => {
idRef.current = id
onSuccessRef.current = onSuccess
}, [id, onSuccess])
// 4. Operations (useCallback with empty deps when using refs)
const fetchData = useCallback(async () => {
setIsLoading(true)
try {
const result = await fetch(`/api/${idRef.current}`).then(r => r.json())
setData(result)
onSuccessRef.current?.(result)
} finally {
setIsLoading(false)
}
}, [])
return { data, isLoading, fetchData }
}
```
## Rules
1. Single responsibility per hook
2. Props interface required
3. Refs for stable callback dependencies
4. Wrap returned functions in useCallback
5. Always try/catch async operations
6. Track loading/error states

View File

@@ -0,0 +1,49 @@
---
description: Import patterns for the Sim application
globs: ["apps/sim/**/*.ts", "apps/sim/**/*.tsx"]
---
# Import Patterns
## Absolute Imports
**Always use absolute imports.** Never use relative imports.
```typescript
// ✓ Good
import { useWorkflowStore } from '@/stores/workflows/store'
import { Button } from '@/components/ui/button'
// ✗ Bad
import { useWorkflowStore } from '../../../stores/workflows/store'
```
## Barrel Exports
Use barrel exports (`index.ts`) when a folder has 3+ exports. Import from barrel, not individual files.
```typescript
// ✓ Good
import { Dashboard, Sidebar } from '@/app/workspace/[workspaceId]/logs/components'
// ✗ Bad
import { Dashboard } from '@/app/workspace/[workspaceId]/logs/components/dashboard/dashboard'
```
## Import Order
1. React/core libraries
2. External libraries
3. UI components (`@/components/emcn`, `@/components/ui`)
4. Utilities (`@/lib/...`)
5. Stores (`@/stores/...`)
6. Feature imports
7. CSS imports
## Type Imports
Use `type` keyword for type-only imports:
```typescript
import type { WorkflowLog } from '@/stores/logs/types'
```

View File

@@ -0,0 +1,207 @@
---
description: Adding new integrations (tools, blocks, triggers)
globs: ["apps/sim/tools/**", "apps/sim/blocks/**", "apps/sim/triggers/**"]
---
# Adding Integrations
## Overview
Adding a new integration typically requires:
1. **Tools** - API operations (`tools/{service}/`)
2. **Block** - UI component (`blocks/blocks/{service}.ts`)
3. **Icon** - SVG icon (`components/icons.tsx`)
4. **Trigger** (optional) - Webhooks/polling (`triggers/{service}/`)
Always look up the service's API docs first.
## 1. Tools (`tools/{service}/`)
```
tools/{service}/
├── index.ts # Export all tools
├── types.ts # Params/response types
├── {action}.ts # Individual tool (e.g., send_message.ts)
└── ...
```
**Tool file structure:**
```typescript
// tools/{service}/{action}.ts
import type { {Service}Params, {Service}Response } from '@/tools/{service}/types'
import type { ToolConfig } from '@/tools/types'
export const {service}{Action}Tool: ToolConfig<{Service}Params, {Service}Response> = {
id: '{service}_{action}',
name: '{Service} {Action}',
description: 'What this tool does',
version: '1.0.0',
oauth: { required: true, provider: '{service}' }, // if OAuth
params: { /* param definitions */ },
request: {
url: '/api/tools/{service}/{action}',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({ ...params }),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) throw new Error(data.error)
return { success: true, output: data.output }
},
outputs: { /* output definitions */ },
}
```
**Register in `tools/registry.ts`:**
```typescript
import { {service}{Action}Tool } from '@/tools/{service}'
// Add to registry object
{service}_{action}: {service}{Action}Tool,
```
## 2. Block (`blocks/blocks/{service}.ts`)
```typescript
import { {Service}Icon } from '@/components/icons'
import type { BlockConfig } from '@/blocks/types'
import type { {Service}Response } from '@/tools/{service}/types'
export const {Service}Block: BlockConfig<{Service}Response> = {
type: '{service}',
name: '{Service}',
description: 'Short description',
longDescription: 'Detailed description',
category: 'tools',
bgColor: '#hexcolor',
icon: {Service}Icon,
subBlocks: [ /* see SubBlock Properties below */ ],
tools: {
access: ['{service}_{action}', ...],
config: {
tool: (params) => `{service}_${params.operation}`,
params: (params) => ({ ...params }),
},
},
inputs: { /* input definitions */ },
outputs: { /* output definitions */ },
}
```
### SubBlock Properties
```typescript
{
id: 'fieldName', // Unique identifier
title: 'Field Label', // UI label
type: 'short-input', // See SubBlock Types below
placeholder: 'Hint text',
required: true, // See Required below
condition: { ... }, // See Condition below
dependsOn: ['otherField'], // See DependsOn below
mode: 'basic', // 'basic' | 'advanced' | 'both' | 'trigger'
}
```
**SubBlock Types:** `short-input`, `long-input`, `dropdown`, `code`, `switch`, `slider`, `oauth-input`, `channel-selector`, `user-selector`, `file-upload`, etc.
### `condition` - Show/hide based on another field
```typescript
// Show when operation === 'send'
condition: { field: 'operation', value: 'send' }
// Show when operation is 'send' OR 'read'
condition: { field: 'operation', value: ['send', 'read'] }
// Show when operation !== 'send'
condition: { field: 'operation', value: 'send', not: true }
// Complex: NOT in list AND another condition
condition: {
field: 'operation',
value: ['list_channels', 'list_users'],
not: true,
and: { field: 'destinationType', value: 'dm', not: true }
}
```
### `required` - Field validation
```typescript
// Always required
required: true
// Conditionally required (same syntax as condition)
required: { field: 'operation', value: 'send' }
```
### `dependsOn` - Clear field when dependencies change
```typescript
// Clear when credential changes
dependsOn: ['credential']
// Clear when authMethod changes AND (credential OR botToken) changes
dependsOn: { all: ['authMethod'], any: ['credential', 'botToken'] }
```
### `mode` - When to show field
- `'basic'` - Only in basic mode (default UI)
- `'advanced'` - Only in advanced mode (manual input)
- `'both'` - Show in both modes (default)
- `'trigger'` - Only when block is used as trigger
**Register in `blocks/registry.ts`:**
```typescript
import { {Service}Block } from '@/blocks/blocks/{service}'
// Add to registry object (alphabetically)
{service}: {Service}Block,
```
## 3. Icon (`components/icons.tsx`)
```typescript
export function {Service}Icon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
{/* SVG path from service's brand assets */}
</svg>
)
}
```
## 4. Trigger (`triggers/{service}/`) - Optional
```
triggers/{service}/
├── index.ts # Export all triggers
├── webhook.ts # Webhook handler
├── utils.ts # Shared utilities
└── {event}.ts # Specific event handlers
```
**Register in `triggers/registry.ts`:**
```typescript
import { {service}WebhookTrigger } from '@/triggers/{service}'
// Add to TRIGGER_REGISTRY
{service}_webhook: {service}WebhookTrigger,
```
## Checklist
- [ ] Look up API docs for the service
- [ ] Create `tools/{service}/types.ts` with proper types
- [ ] Create tool files for each operation
- [ ] Create `tools/{service}/index.ts` barrel export
- [ ] Register tools in `tools/registry.ts`
- [ ] Add icon to `components/icons.tsx`
- [ ] Create block in `blocks/blocks/{service}.ts`
- [ ] Register block in `blocks/registry.ts`
- [ ] (Optional) Create triggers in `triggers/{service}/`
- [ ] (Optional) Register triggers in `triggers/registry.ts`

View File

@@ -0,0 +1,66 @@
---
description: React Query patterns for the Sim application
globs: ["apps/sim/hooks/queries/**/*.ts"]
---
# React Query Patterns
All React Query hooks live in `hooks/queries/`.
## Query Key Factory
Every query file defines a keys factory:
```typescript
export const entityKeys = {
all: ['entity'] as const,
list: (workspaceId?: string) => [...entityKeys.all, 'list', workspaceId ?? ''] as const,
detail: (id?: string) => [...entityKeys.all, 'detail', id ?? ''] as const,
}
```
## File Structure
```typescript
// 1. Query keys factory
// 2. Types (if needed)
// 3. Private fetch functions
// 4. Exported hooks
```
## Query Hook
```typescript
export function useEntityList(workspaceId?: string, options?: { enabled?: boolean }) {
return useQuery({
queryKey: entityKeys.list(workspaceId),
queryFn: () => fetchEntities(workspaceId as string),
enabled: Boolean(workspaceId) && (options?.enabled ?? true),
staleTime: 60 * 1000,
placeholderData: keepPreviousData,
})
}
```
## Mutation Hook
```typescript
export function useCreateEntity() {
const queryClient = useQueryClient()
return useMutation({
mutationFn: async (variables) => { /* fetch POST */ },
onSuccess: () => queryClient.invalidateQueries({ queryKey: entityKeys.all }),
})
}
```
## Optimistic Updates
For optimistic mutations syncing with Zustand, use `createOptimisticMutationHandlers` from `@/hooks/queries/utils/optimistic-mutation`.
## Naming
- **Keys**: `entityKeys`
- **Query hooks**: `useEntity`, `useEntityList`
- **Mutation hooks**: `useCreateEntity`, `useUpdateEntity`
- **Fetch functions**: `fetchEntity` (private)

View File

@@ -0,0 +1,70 @@
---
description: Zustand store patterns
globs: ["apps/sim/**/store.ts", "apps/sim/**/stores/**/*.ts"]
---
# Zustand Store Patterns
Stores live in `stores/`. Complex stores split into `store.ts` + `types.ts`.
## Basic Store
```typescript
import { create } from 'zustand'
import { devtools } from 'zustand/middleware'
import type { FeatureState } from '@/stores/feature/types'
const initialState = { items: [] as Item[], activeId: null as string | null }
export const useFeatureStore = create<FeatureState>()(
devtools(
(set, get) => ({
...initialState,
setItems: (items) => set({ items }),
addItem: (item) => set((state) => ({ items: [...state.items, item] })),
reset: () => set(initialState),
}),
{ name: 'feature-store' }
)
)
```
## Persisted Store
```typescript
import { create } from 'zustand'
import { persist } from 'zustand/middleware'
export const useFeatureStore = create<FeatureState>()(
persist(
(set) => ({
width: 300,
setWidth: (width) => set({ width }),
_hasHydrated: false,
setHasHydrated: (v) => set({ _hasHydrated: v }),
}),
{
name: 'feature-state',
partialize: (state) => ({ width: state.width }),
onRehydrateStorage: () => (state) => state?.setHasHydrated(true),
}
)
)
```
## Rules
1. Use `devtools` middleware (named stores)
2. Use `persist` only when data should survive reload
3. `partialize` to persist only necessary state
4. `_hasHydrated` pattern for persisted stores needing hydration tracking
5. Immutable updates only
6. `set((state) => ...)` when depending on previous state
7. Provide `reset()` action
## Outside React
```typescript
const items = useFeatureStore.getState().items
useFeatureStore.setState({ items: newItems })
```

View File

@@ -0,0 +1,40 @@
---
description: Tailwind CSS and styling conventions
globs: ["apps/sim/**/*.tsx", "apps/sim/**/*.css"]
---
# Styling Rules
## Tailwind
1. **No inline styles** - Use Tailwind classes
2. **No duplicate dark classes** - Skip `dark:` when value matches light mode
3. **Exact values** - `text-[14px]`, `h-[25px]`
4. **Transitions** - `transition-colors` for interactive states
## Conditional Classes
```typescript
import { cn } from '@/lib/utils'
<div className={cn(
'base-classes',
isActive && 'active-classes',
disabled ? 'opacity-60' : 'hover:bg-accent'
)} />
```
## CSS Variables
For dynamic values (widths, heights) synced with stores:
```typescript
// In store
setWidth: (width) => {
set({ width })
document.documentElement.style.setProperty('--sidebar-width', `${width}px`)
}
// In component
<aside style={{ width: 'var(--sidebar-width)' }} />
```

View File

@@ -0,0 +1,60 @@
---
description: Testing patterns with Vitest
globs: ["apps/sim/**/*.test.ts", "apps/sim/**/*.test.tsx"]
---
# Testing Patterns
Use Vitest. Test files live next to source: `feature.ts` → `feature.test.ts`
## Structure
```typescript
/**
* Tests for [feature name]
*
* @vitest-environment node
*/
// 1. Mocks BEFORE imports
vi.mock('@sim/db', () => ({ db: { select: vi.fn() } }))
vi.mock('@sim/logger', () => loggerMock)
// 2. Imports AFTER mocks
import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest'
import { createSession, loggerMock } from '@sim/testing'
import { myFunction } from '@/lib/feature'
describe('myFunction', () => {
beforeEach(() => vi.clearAllMocks())
it('should do something', () => {
expect(myFunction()).toBe(expected)
})
it.concurrent('runs in parallel', () => { ... })
})
```
## @sim/testing Package
```typescript
// Factories - create test data
import { createBlock, createWorkflow, createSession } from '@sim/testing'
// Mocks - pre-configured mocks
import { loggerMock, databaseMock, fetchMock } from '@sim/testing'
// Builders - fluent API for complex objects
import { ExecutionBuilder, WorkflowBuilder } from '@sim/testing'
```
## Rules
1. `@vitest-environment node` directive at file top
2. **Mocks before imports** - `vi.mock()` calls must come first
3. Use `@sim/testing` factories over manual test data
4. `it.concurrent` for independent tests (faster)
5. `beforeEach(() => vi.clearAllMocks())` to reset state
6. Group related tests with nested `describe` blocks
7. Test file naming: `*.test.ts` (not `*.spec.ts`)

View File

@@ -0,0 +1,20 @@
---
description: TypeScript conventions and type safety
globs: ["apps/sim/**/*.ts", "apps/sim/**/*.tsx"]
---
# TypeScript Rules
1. **No `any`** - Use proper types or `unknown` with type guards
2. **Props interface** - Always define for components
3. **Const assertions** - `as const` for constant objects/arrays
4. **Ref types** - Explicit: `useRef<HTMLDivElement>(null)`
5. **Type imports** - `import type { X }` for type-only imports
```typescript
// ✗ Bad
const handleClick = (e: any) => {}
// ✓ Good
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {}
```

View File

@@ -1,69 +0,0 @@
# Sim Development Environment Bashrc
# This gets sourced by post-create.sh
# Enhanced prompt with git branch info
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[01;32m\]\u@simstudio\[\033[00m\]:\[\033[01;34m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]\$ "
# Helpful aliases
alias ll="ls -la"
alias ..="cd .."
alias ...="cd ../.."
# Database aliases
alias pgc="PGPASSWORD=postgres psql -h db -U postgres -d simstudio"
alias check-db="PGPASSWORD=postgres psql -h db -U postgres -c '\l'"
# Sim specific aliases
alias logs="cd /workspace/apps/sim && tail -f logs/*.log 2>/dev/null || echo 'No log files found'"
alias sim-start="cd /workspace && bun run dev"
alias sim-migrate="cd /workspace/apps/sim && bunx drizzle-kit push"
alias sim-generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias sim-rebuild="cd /workspace && bun run build && bun run start"
alias docs-dev="cd /workspace/apps/docs && bun run dev"
# Turbo related commands
alias turbo-build="cd /workspace && bunx turbo run build"
alias turbo-dev="cd /workspace && bunx turbo run dev"
alias turbo-test="cd /workspace && bunx turbo run test"
# Bun specific commands
alias bun-update="cd /workspace && bun update"
alias bun-add="cd /workspace && bun add"
alias bun-pm="cd /workspace && bun pm"
alias bun-canary="bun upgrade --canary"
# Default to workspace directory
cd /workspace 2>/dev/null || true
# Welcome message - only show once per session
if [ -z "$SIM_WELCOME_SHOWN" ]; then
export SIM_WELCOME_SHOWN=1
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Welcome to Sim development environment!"
echo ""
echo "Available commands:"
echo " sim-start - Start all apps in development mode"
echo " sim-migrate - Push schema changes to the database for sim app"
echo " sim-generate - Generate new migrations for sim app"
echo " sim-rebuild - Build and start all apps"
echo " docs-dev - Start only the docs app in development mode"
echo ""
echo "Turbo commands:"
echo " turbo-build - Build all apps using Turborepo"
echo " turbo-dev - Start development mode for all apps"
echo " turbo-test - Run tests for all packages"
echo ""
echo "Bun commands:"
echo " bun-update - Update dependencies"
echo " bun-add - Add a new dependency"
echo " bun-pm - Manage dependencies"
echo " bun-canary - Upgrade to the latest canary version of Bun"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
fi

View File

@@ -1,38 +1,43 @@
# Use the latest Bun canary image for development
FROM oven/bun:canary
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
FROM oven/bun:1.3.3-alpine
# Install necessary packages for development
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
git curl wget jq sudo postgresql-client vim nano \
bash-completion ca-certificates lsb-release gnupg \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache \
git \
curl \
wget \
jq \
sudo \
postgresql-client \
vim \
nano \
bash \
bash-completion \
zsh \
zsh-vcs \
ca-certificates \
shadow
# Create a non-root user
# Create a non-root user with matching UID/GID
ARG USERNAME=bun
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create user group if it doesn't exist
RUN if ! getent group $USER_GID >/dev/null; then \
addgroup -g $USER_GID $USERNAME; \
fi
# Create user if it doesn't exist
RUN if ! getent passwd $USER_UID >/dev/null; then \
adduser -D -u $USER_UID -G $(getent group $USER_GID | cut -d: -f1) $USERNAME; \
fi
# Add sudo support
RUN echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
# Install global packages for development
RUN bun install -g turbo drizzle-kit typescript @types/node
# Install bun completions
RUN bun completions > /etc/bash_completion.d/bun
# Set up shell environment
RUN echo "export PATH=$PATH:/home/$USERNAME/.bun/bin" >> /etc/profile
RUN echo "source /etc/profile" >> /etc/bash.bashrc
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
RUN echo "export PATH=\$PATH:/home/$USERNAME/.bun/bin" >> /etc/profile
WORKDIR /workspace

View File

@@ -1,78 +1,75 @@
# Sim Development Container
This directory contains configuration files for Visual Studio Code Dev Containers / GitHub Codespaces. Dev containers provide a consistent, isolated development environment for this project.
Development container configuration for VS Code Dev Containers and GitHub Codespaces.
## Contents
- `devcontainer.json` - The main configuration file that defines the development container settings
- `Dockerfile` - Defines the container image and development environment
- `docker-compose.yml` - Sets up the application and database containers
- `post-create.sh` - Script that runs when the container is created
- `.bashrc` - Custom shell configuration with helpful aliases
## Usage
### Prerequisites
## Prerequisites
- Visual Studio Code
- Docker installation:
- Docker Desktop (Windows/macOS)
- Docker Engine (Linux)
- VS Code Remote - Containers extension
- Docker Desktop or Podman Desktop
- VS Code Dev Containers extension
### Getting Started
## Getting Started
1. Open this project in Visual Studio Code
2. When prompted, click "Reopen in Container"
- Alternatively, press `F1` and select "Remote-Containers: Reopen in Container"
1. Open this project in VS Code
2. Click "Reopen in Container" when prompted (or press `F1` → "Dev Containers: Reopen in Container")
3. Wait for the container to build and initialize
4. The post-creation script will automatically:
4. Start developing with `sim-start`
- Install dependencies
- Set up environment variables
- Run database migrations
- Configure helpful aliases
The setup script will automatically install dependencies and run migrations.
5. Start the application with `sim-start` (alias for `bun run dev`)
## Development Commands
### Development Commands
### Running Services
The development environment includes these helpful aliases:
You have two options for running the development environment:
**Option 1: Run everything together (recommended for most development)**
```bash
sim-start # Runs both app and socket server using concurrently
```
**Option 2: Run services separately (useful for debugging individual services)**
- In the **app** container terminal: `sim-app` (starts Next.js app on port 3000)
- In the **realtime** container terminal: `sim-sockets` (starts socket server on port 3002)
### Other Commands
- `sim-start` - Start the development server
- `sim-migrate` - Push schema changes to the database
- `sim-generate` - Generate new migrations
- `sim-rebuild` - Build and start the production version
- `pgc` - Connect to the PostgreSQL database
- `check-db` - List all databases
### Using GitHub Codespaces
This project is also configured for GitHub Codespaces. To use it:
1. Go to the GitHub repository
2. Click the "Code" button
3. Select the "Codespaces" tab
4. Click "Create codespace on main"
This will start a new Codespace with the development environment already set up.
## Customization
You can customize the development environment by:
- Modifying `devcontainer.json` to add VS Code extensions or settings
- Updating the `Dockerfile` to install additional packages
- Editing `docker-compose.yml` to add services or change configuration
- Modifying `.bashrc` to add custom aliases or configurations
- `build` - Build the application
- `pgc` - Connect to PostgreSQL database
## Troubleshooting
If you encounter issues:
**Build errors**: Rebuild the container with `F1` → "Dev Containers: Rebuild Container"
1. Rebuild the container: `F1` → "Remote-Containers: Rebuild Container"
2. Check Docker logs for build errors
3. Verify Docker Desktop is running
4. Ensure all prerequisites are installed
**Port conflicts**: Ensure ports 3000, 3002, and 5432 are available
For more information, see the [VS Code Remote Development documentation](https://code.visualstudio.com/docs/remote/containers).
**Container runtime issues**: Verify Docker Desktop or Podman Desktop is running
## Technical Details
Services:
- **App container** (8GB memory limit) - Main Next.js application
- **Realtime container** (4GB memory limit) - Socket.io server for real-time features
- **Database** - PostgreSQL with pgvector extension
- **Migrations** - Runs automatically on container creation
You can develop with services running together or independently.
### Personalization
**Project commands** (`sim-start`, `sim-app`, etc.) are automatically available via `/workspace/.devcontainer/sim-commands.sh`.
**Personal shell customization** (aliases, prompts, etc.) should use VS Code's dotfiles feature:
1. Create a dotfiles repository (e.g., `github.com/youruser/dotfiles`)
2. Add your `.bashrc`, `.zshrc`, or other configs
3. Configure in VS Code Settings:
```json
{
"dotfiles.repository": "youruser/dotfiles",
"dotfiles.installCommand": "install.sh"
}
```
This separates project-specific commands from personal preferences, following VS Code best practices.

View File

@@ -13,13 +13,6 @@
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"args": ["--login"]
}
},
"terminal.integrated.shellIntegration.enabled": true
},
"extensions": [
@@ -36,18 +29,9 @@
}
},
"forwardPorts": [3000, 5432],
"forwardPorts": [3000, 3002, 5432],
"postCreateCommand": "bash -c 'bash .devcontainer/post-create.sh || true'",
"postStartCommand": "bash -c 'if [ ! -f ~/.bashrc ] || ! grep -q \"sim-start\" ~/.bashrc; then cp .devcontainer/.bashrc ~/.bashrc; fi'",
"remoteUser": "bun",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/prulloac/devcontainer-features/bun:1": {
"version": "latest"
}
}
"remoteUser": "bun"
}

View File

@@ -7,52 +7,56 @@ services:
- ..:/workspace:cached
- bun-cache:/home/bun/.bun/cache:delegated
command: sleep infinity
deploy:
resources:
limits:
memory: 8G
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
- BETTER_AUTH_URL=http://localhost:3000
- NEXT_PUBLIC_APP_URL=http://localhost:3000
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-your_encryption_key_here}
- COPILOT_API_KEY=${COPILOT_API_KEY}
- SIM_AGENT_API_URL=${SIM_AGENT_API_URL}
- OLLAMA_URL=${OLLAMA_URL:-http://localhost:11434}
- NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL:-http://localhost:3002}
- BUN_INSTALL_CACHE_DIR=/home/bun/.bun/cache
depends_on:
db:
condition: service_healthy
realtime:
condition: service_healthy
migrations:
condition: service_completed_successfully
ports:
- "3000:3000"
- "3001:3001"
working_dir: /workspace
healthcheck:
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3000']
interval: 90s
timeout: 5s
retries: 3
start_period: 10s
realtime:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
- bun-cache:/home/bun/.bun/cache:delegated
command: sleep infinity
deploy:
resources:
limits:
memory: 4G
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
- BETTER_AUTH_URL=http://localhost:3000
- NEXT_PUBLIC_APP_URL=http://localhost:3000
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
depends_on:
db:
condition: service_healthy
ports:
- "3002:3002"
working_dir: /workspace
healthcheck:
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002']
interval: 90s
timeout: 5s
retries: 3
start_period: 10s
migrations:
build:

View File

@@ -8,11 +8,43 @@ echo "🔧 Setting up Sim development environment..."
# Change to the workspace root directory
cd /workspace
# Setup .bashrc
echo "📄 Setting up .bashrc with aliases..."
cp /workspace/.devcontainer/.bashrc ~/.bashrc
# Add to .profile to ensure .bashrc is sourced in non-interactive shells
echo 'if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' >> ~/.profile
# Install global packages for development (done at runtime, not build time)
echo "📦 Installing global development tools..."
bun install -g turbo drizzle-kit typescript @types/node 2>/dev/null || {
echo "⚠️ Some global packages may already be installed, continuing..."
}
# Set up bun completions (with proper shell detection)
echo "🔧 Setting up shell completions..."
if [ -n "$SHELL" ] && [ -f "$SHELL" ]; then
SHELL=/bin/bash bun completions 2>/dev/null | sudo tee /etc/bash_completion.d/bun > /dev/null || {
echo "⚠️ Could not install bun completions, but continuing..."
}
fi
# Add project commands to shell profile
echo "📄 Setting up project commands..."
# Add sourcing of sim-commands.sh to user's shell config files if they exist
for rcfile in ~/.bashrc ~/.zshrc; do
if [ -f "$rcfile" ]; then
# Check if already added
if ! grep -q "sim-commands.sh" "$rcfile"; then
echo "" >> "$rcfile"
echo "# Sim project commands" >> "$rcfile"
echo "if [ -f /workspace/.devcontainer/sim-commands.sh ]; then" >> "$rcfile"
echo " source /workspace/.devcontainer/sim-commands.sh" >> "$rcfile"
echo "fi" >> "$rcfile"
fi
fi
done
# If no rc files exist yet, create a minimal one
if [ ! -f ~/.bashrc ] && [ ! -f ~/.zshrc ]; then
echo "# Source Sim project commands" > ~/.bashrc
echo "if [ -f /workspace/.devcontainer/sim-commands.sh ]; then" >> ~/.bashrc
echo " source /workspace/.devcontainer/sim-commands.sh" >> ~/.bashrc
echo "fi" >> ~/.bashrc
fi
# Clean and reinstall dependencies to ensure platform compatibility
echo "📦 Cleaning and reinstalling dependencies..."
@@ -29,18 +61,12 @@ chmod 700 ~/.bun ~/.bun/cache
# Install dependencies with platform-specific binaries
echo "Installing dependencies with Bun..."
bun install || {
echo "⚠️ bun install had issues but continuing setup..."
}
bun install
# Check for native dependencies
echo "Checking for native dependencies compatibility..."
NATIVE_DEPS=$(grep '"trustedDependencies"' apps/sim/package.json || echo "")
if [ ! -z "$NATIVE_DEPS" ]; then
echo "⚠️ Native dependencies detected. Ensuring compatibility with Bun..."
for pkg in $(echo $NATIVE_DEPS | grep -oP '"[^"]*"' | tr -d '"' | grep -v "trustedDependencies"); do
echo "Checking compatibility for $pkg..."
done
if grep -q '"trustedDependencies"' apps/sim/package.json 2>/dev/null; then
echo "⚠️ Native dependencies detected. Bun will handle compatibility during install."
fi
# Set up environment variables if .env doesn't exist for the sim app
@@ -82,23 +108,6 @@ echo "Waiting for database to be ready..."
fi
) || echo "⚠️ Database setup had issues but continuing..."
# Add additional helpful aliases to .bashrc
cat << EOF >> ~/.bashrc
# Additional Sim Development Aliases
alias migrate="cd /workspace/apps/sim && DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio bunx drizzle-kit push"
alias generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias dev="cd /workspace && bun run dev"
alias build="cd /workspace && bun run build"
alias start="cd /workspace && bun run dev"
alias lint="cd /workspace/apps/sim && bun run lint"
alias test="cd /workspace && bun run test"
alias bun-update="cd /workspace && bun update"
EOF
# Source the .bashrc to make aliases available immediately
. ~/.bashrc
# Clear the welcome message flag to ensure it shows after setup
unset SIM_WELCOME_SHOWN

42
.devcontainer/sim-commands.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
# Sim Project Commands
# Source this file to add project-specific commands to your shell
# Add to your ~/.bashrc or ~/.zshrc: source /workspace/.devcontainer/sim-commands.sh
# Project-specific aliases for Sim development
alias sim-start="cd /workspace && bun run dev:full"
alias sim-app="cd /workspace && bun run dev"
alias sim-sockets="cd /workspace && bun run dev:sockets"
alias sim-migrate="cd /workspace/apps/sim && bunx drizzle-kit push"
alias sim-generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias sim-rebuild="cd /workspace && bun run build && bun run start"
alias docs-dev="cd /workspace/apps/docs && bun run dev"
# Database connection helpers
alias pgc="PGPASSWORD=postgres psql -h db -U postgres -d simstudio"
alias check-db="PGPASSWORD=postgres psql -h db -U postgres -c '\l'"
# Default to workspace directory
cd /workspace 2>/dev/null || true
# Welcome message - show once per session
if [ -z "$SIM_WELCOME_SHOWN" ]; then
export SIM_WELCOME_SHOWN=1
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Sim Development Environment"
echo ""
echo "Project commands:"
echo " sim-start - Start app + socket server"
echo " sim-app - Start only main app"
echo " sim-sockets - Start only socket server"
echo " sim-migrate - Push schema changes"
echo " sim-generate - Generate migrations"
echo ""
echo "Database:"
echo " pgc - Connect to PostgreSQL"
echo " check-db - List databases"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
fi

View File

@@ -1,11 +1,67 @@
# Git
.git
.gitignore
# Documentation
LICENSE
NOTICE
README.md
*.md
docs/
# IDE and editor
.vscode
.idea
*.swp
*.swo
# Environment and config
.env*
!.env.example
.prettierrc
.prettierignore
README.md
.gitignore
.husky
.eslintrc*
.eslintignore
# CI/CD and DevOps
.github
.devcontainer
.env.example
node_modules
.husky
docker-compose*.yml
Dockerfile*
# Build artifacts and caches
.next
.turbo
.cache
dist
build
out
coverage
*.log
# Dependencies (will be installed fresh in container)
node_modules
.bun
# Test files
**/*.test.ts
**/*.test.tsx
**/*.spec.ts
**/*.spec.tsx
__tests__
__mocks__
jest.config.*
vitest.config.*
# TypeScript build info
*.tsbuildinfo
# OS files
.DS_Store
Thumbs.db
# Temporary files
tmp
temp
*.tmp

34
.gitattributes vendored Normal file
View File

@@ -0,0 +1,34 @@
# Set default behavior to automatically normalize line endings
* text=auto eol=lf
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.toml text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.sh text eol=lf
*.bash text eol=lf
Dockerfile* text eol=lf
.dockerignore text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf
# Denote all files that are truly binary and should not be modified
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.pdf binary

View File

@@ -321,8 +321,7 @@ In addition, you will need to update the registries:
{
id: 'operation',
title: 'Operation',
type: 'dropdown',
layout: 'full',
type: 'dropdown'
required: true,
options: [
{ label: 'Generate Embeddings', id: 'generate' },
@@ -333,8 +332,7 @@ In addition, you will need to update the registries:
{
id: 'apiKey',
title: 'API Key',
type: 'short-input',
layout: 'full',
type: 'short-input'
placeholder: 'Your Pinecone API key',
password: true,
required: true,
@@ -376,7 +374,7 @@ In addition, you will need to update the registries:
Add your block to the blocks registry (`/apps/sim/blocks/registry.ts`):
```typescript:/apps/sim/blocks/registry.ts
import { PineconeBlock } from './blocks/pinecone'
import { PineconeBlock } from '@/blocks/blocks/pinecone'
// Registry of all available blocks
export const registry: Record<string, BlockConfig> = {

View File

@@ -16,12 +16,37 @@ jobs:
uses: ./.github/workflows/test-build.yml
secrets: inherit
# Detect if this is a version release commit (e.g., "v0.5.24: ...")
detect-version:
name: Detect Version
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
outputs:
version: ${{ steps.extract.outputs.version }}
is_release: ${{ steps.extract.outputs.is_release }}
steps:
- name: Extract version from commit message
id: extract
run: |
COMMIT_MSG="${{ github.event.head_commit.message }}"
# Only tag versions on main branch
if [ "${{ github.ref }}" = "refs/heads/main" ] && [[ "$COMMIT_MSG" =~ ^(v[0-9]+\.[0-9]+\.[0-9]+): ]]; then
VERSION="${BASH_REMATCH[1]}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
echo "✅ Detected release commit: ${VERSION}"
else
echo "version=" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
echo " Not a release commit"
fi
# Build AMD64 images and push to ECR immediately (+ GHCR for main)
build-amd64:
name: Build AMD64
needs: test-build
needs: [test-build, detect-version]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: blacksmith-8vcpu-ubuntu-2404
permissions:
contents: read
packages: write
@@ -93,6 +118,14 @@ jobs:
GHCR_AMD64="${GHCR_IMAGE}:latest-amd64"
GHCR_SHA="${GHCR_IMAGE}:${{ github.sha }}-amd64"
TAGS="${TAGS},$GHCR_AMD64,$GHCR_SHA"
# Add version tag if this is a release commit
if [ "${{ needs.detect-version.outputs.is_release }}" = "true" ]; then
VERSION="${{ needs.detect-version.outputs.version }}"
GHCR_VERSION="${GHCR_IMAGE}:${VERSION}-amd64"
TAGS="${TAGS},$GHCR_VERSION"
echo "📦 Adding version tag: ${VERSION}-amd64"
fi
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
@@ -111,8 +144,8 @@ jobs:
# Build ARM64 images for GHCR (main branch only, runs in parallel)
build-ghcr-arm64:
name: Build ARM64 (GHCR Only)
needs: test-build
runs-on: linux-arm64-8-core
needs: [test-build, detect-version]
runs-on: blacksmith-8vcpu-ubuntu-2404-arm
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
@@ -146,7 +179,16 @@ jobs:
id: meta
run: |
IMAGE="${{ matrix.image }}"
echo "tags=${IMAGE}:latest-arm64,${IMAGE}:${{ github.sha }}-arm64" >> $GITHUB_OUTPUT
TAGS="${IMAGE}:latest-arm64,${IMAGE}:${{ github.sha }}-arm64"
# Add version tag if this is a release commit
if [ "${{ needs.detect-version.outputs.is_release }}" = "true" ]; then
VERSION="${{ needs.detect-version.outputs.version }}"
TAGS="${TAGS},${IMAGE}:${VERSION}-arm64"
echo "📦 Adding version tag: ${VERSION}-arm64"
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push ARM64 to GHCR
uses: useblacksmith/build-push-action@v2
@@ -162,8 +204,8 @@ jobs:
# Create GHCR multi-arch manifests (only for main, after both builds)
create-ghcr-manifests:
name: Create GHCR Manifests
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: [build-amd64, build-ghcr-arm64]
runs-on: blacksmith-2vcpu-ubuntu-2404
needs: [build-amd64, build-ghcr-arm64, detect-version]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
packages: write
@@ -198,18 +240,40 @@ jobs:
"${IMAGE_BASE}:${{ github.sha }}-arm64"
docker manifest push "${IMAGE_BASE}:${{ github.sha }}"
# Deploy Trigger.dev (after ECR images are pushed, runs in parallel with process-docs)
trigger-deploy:
name: Deploy Trigger.dev
needs: build-amd64
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
uses: ./.github/workflows/trigger-deploy.yml
secrets: inherit
# Create version manifest if this is a release commit
if [ "${{ needs.detect-version.outputs.is_release }}" = "true" ]; then
VERSION="${{ needs.detect-version.outputs.version }}"
echo "📦 Creating version manifest: ${VERSION}"
docker manifest create "${IMAGE_BASE}:${VERSION}" \
"${IMAGE_BASE}:${VERSION}-amd64" \
"${IMAGE_BASE}:${VERSION}-arm64"
docker manifest push "${IMAGE_BASE}:${VERSION}"
fi
# Process docs embeddings (after ECR images are pushed, runs in parallel with trigger-deploy)
# Check if docs changed
check-docs-changes:
name: Check Docs Changes
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
outputs:
docs_changed: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # Need at least 2 commits to detect changes
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'apps/docs/content/docs/en/**'
- 'apps/sim/scripts/process-docs.ts'
- 'apps/sim/lib/chunkers/**'
# Process docs embeddings (only when docs change, after ECR images are pushed)
process-docs:
name: Process Docs
needs: build-amd64
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
needs: [build-amd64, check-docs-changes]
if: needs.check-docs-changes.outputs.docs_changed == 'true'
uses: ./.github/workflows/docs-embeddings.yml
secrets: inherit

View File

@@ -7,8 +7,8 @@ on:
jobs:
process-docs-embeddings:
name: Process Documentation Embeddings
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging'
runs-on: blacksmith-8vcpu-ubuntu-2404
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
@@ -17,19 +17,30 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile
- name: Process docs embeddings
working-directory: ./apps/sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: bun run scripts/process-docs.ts --clear

View File

@@ -3,10 +3,9 @@ name: 'Auto-translate Documentation'
on:
push:
branches: [ staging ]
paths:
paths:
- 'apps/docs/content/docs/en/**'
- 'apps/docs/i18n.json'
workflow_dispatch: # Allow manual triggers
permissions:
contents: write
@@ -27,7 +26,18 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Run Lingo.dev translations
env:
@@ -116,12 +126,23 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: |
cd apps/docs
bun install
bun install --frozen-lockfile
- name: Build documentation to verify translations
run: |

View File

@@ -12,7 +12,7 @@ permissions:
jobs:
build-amd64:
name: Build AMD64
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: blacksmith-8vcpu-ubuntu-2404
strategy:
fail-fast: false
matrix:
@@ -100,7 +100,7 @@ jobs:
build-ghcr-arm64:
name: Build ARM64 (GHCR Only)
runs-on: linux-arm64-8-core
runs-on: blacksmith-8vcpu-ubuntu-2404-arm
if: github.ref == 'refs/heads/main'
strategy:
fail-fast: false
@@ -146,7 +146,7 @@ jobs:
create-ghcr-manifests:
name: Create GHCR Manifests
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: blacksmith-8vcpu-ubuntu-2404
needs: [build-amd64, build-ghcr-arm64]
if: github.ref == 'refs/heads/main'
strategy:

View File

@@ -16,10 +16,21 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile
- name: Apply migrations
working-directory: ./packages/db

View File

@@ -16,7 +16,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Setup Node.js for npm publishing
uses: actions/setup-node@v4
@@ -24,9 +24,20 @@ jobs:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
working-directory: packages/cli
run: bun install
run: bun install --frozen-lockfile
- name: Build package
working-directory: packages/cli

View File

@@ -84,6 +84,6 @@ jobs:
```
### Documentation
See the [README](https://github.com/simstudio/sim/tree/main/packages/python-sdk) for usage instructions.
See the [README](https://github.com/simstudioai/sim/tree/main/packages/python-sdk) or the [docs](https://docs.sim.ai/sdks/python) for more information.
draft: false
prerelease: false

View File

@@ -16,17 +16,27 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Setup Node.js for npm publishing
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '22'
registry-url: 'https://registry.npmjs.org/'
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
working-directory: packages/ts-sdk
run: bun install
run: bun install --frozen-lockfile
- name: Run tests
working-directory: packages/ts-sdk
@@ -80,6 +90,6 @@ jobs:
```
### Documentation
See the [README](https://github.com/simstudio/sim/tree/main/packages/ts-sdk) for usage instructions.
See the [README](https://github.com/simstudioai/sim/tree/main/packages/ts-sdk) or the [docs](https://docs.sim.ai/sdks/typescript) for more information.
draft: false
prerelease: false

View File

@@ -16,16 +16,31 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Mount Bun cache (Sticky Disk)
uses: useblacksmith/stickydisk@v1
with:
key: ${{ github.repository }}-bun-cache
path: ~/.bun/install/cache
- name: Mount node_modules (Sticky Disk)
uses: useblacksmith/stickydisk@v1
with:
key: ${{ github.repository }}-node-modules
path: ./node_modules
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint code
run: bun run lint:check
- name: Run tests with coverage
env:
NODE_OPTIONS: '--no-warnings'
@@ -34,6 +49,19 @@ jobs:
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run test
- name: Check schema and migrations are in sync
working-directory: packages/db
run: |
bunx drizzle-kit generate --config=./drizzle.config.ts
if [ -n "$(git status --porcelain ./migrations)" ]; then
echo "❌ Schema and migrations are out of sync!"
echo "Run 'cd packages/db && bunx drizzle-kit generate' and commit the new migrations."
git status --porcelain ./migrations
git diff ./migrations
exit 1
fi
echo "✅ Schema and migrations are in sync"
- name: Build application
env:
NODE_OPTIONS: '--no-warnings'

View File

@@ -1,44 +0,0 @@
name: Trigger.dev Deploy
on:
workflow_call:
workflow_dispatch:
jobs:
deploy:
name: Deploy to Trigger.dev
runs-on: blacksmith-4vcpu-ubuntu-2404
concurrency:
group: trigger-deploy-${{ github.ref }}
cancel-in-progress: false
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
TRIGGER_PROJECT_ID: ${{ secrets.TRIGGER_PROJECT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Deploy to Trigger.dev (Staging)
if: github.ref == 'refs/heads/staging'
working-directory: ./apps/sim
run: npx --yes trigger.dev@4.0.4 deploy -e staging
- name: Deploy to Trigger.dev (Production)
if: github.ref == 'refs/heads/main'
working-directory: ./apps/sim
run: npx --yes trigger.dev@4.0.4 deploy

5
.gitignore vendored
View File

@@ -46,7 +46,7 @@ sim-standalone.tar.gz
next-env.d.ts
# cursorrules
.cursorrules
# .cursorrules
# docs
/apps/docs/.source
@@ -67,6 +67,9 @@ start-collector.sh
# VSCode
.vscode
# IntelliJ
.idea
## Helm Chart Tests
helm/sim/test
i18n.cache

295
CLAUDE.md Normal file
View File

@@ -0,0 +1,295 @@
# Sim Studio Development Guidelines
You are a professional software engineer. All code must follow best practices: accurate, readable, clean, and efficient.
## Global Standards
- **Logging**: Import `createLogger` from `@sim/logger`. Use `logger.info`, `logger.warn`, `logger.error` instead of `console.log`
- **Comments**: Use TSDoc for documentation. No `====` separators. No non-TSDoc comments
- **Styling**: Never update global styles. Keep all styling local to components
- **Package Manager**: Use `bun` and `bunx`, not `npm` and `npx`
## Architecture
### Core Principles
1. Single Responsibility: Each component, hook, store has one clear purpose
2. Composition Over Complexity: Break down complex logic into smaller pieces
3. Type Safety First: TypeScript interfaces for all props, state, return types
4. Predictable State: Zustand for global state, useState for UI-only concerns
### Root Structure
```
apps/sim/
├── app/ # Next.js app router (pages, API routes)
├── blocks/ # Block definitions and registry
├── components/ # Shared UI (emcn/, ui/)
├── executor/ # Workflow execution engine
├── hooks/ # Shared hooks (queries/, selectors/)
├── lib/ # App-wide utilities
├── providers/ # LLM provider integrations
├── stores/ # Zustand stores
├── tools/ # Tool definitions
└── triggers/ # Trigger definitions
```
### Naming Conventions
- Components: PascalCase (`WorkflowList`)
- Hooks: `use` prefix (`useWorkflowOperations`)
- Files: kebab-case (`workflow-list.tsx`)
- Stores: `stores/feature/store.ts`
- Constants: SCREAMING_SNAKE_CASE
- Interfaces: PascalCase with suffix (`WorkflowListProps`)
## Imports
**Always use absolute imports.** Never use relative imports.
```typescript
// ✓ Good
import { useWorkflowStore } from '@/stores/workflows/store'
// ✗ Bad
import { useWorkflowStore } from '../../../stores/workflows/store'
```
Use barrel exports (`index.ts`) when a folder has 3+ exports.
### Import Order
1. React/core libraries
2. External libraries
3. UI components (`@/components/emcn`, `@/components/ui`)
4. Utilities (`@/lib/...`)
5. Stores (`@/stores/...`)
6. Feature imports
7. CSS imports
Use `import type { X }` for type-only imports.
## TypeScript
1. No `any` - Use proper types or `unknown` with type guards
2. Always define props interface for components
3. `as const` for constant objects/arrays
4. Explicit ref types: `useRef<HTMLDivElement>(null)`
## Components
```typescript
'use client' // Only if using hooks
const CONFIG = { SPACING: 8 } as const
interface ComponentProps {
requiredProp: string
optionalProp?: boolean
}
export function Component({ requiredProp, optionalProp = false }: ComponentProps) {
// Order: refs → external hooks → store hooks → custom hooks → state → useMemo → useCallback → useEffect → return
}
```
Extract when: 50+ lines, used in 2+ files, or has own state/logic. Keep inline when: < 10 lines, single use, purely presentational.
## Hooks
```typescript
interface UseFeatureProps { id: string }
export function useFeature({ id }: UseFeatureProps) {
const idRef = useRef(id)
const [data, setData] = useState<Data | null>(null)
useEffect(() => { idRef.current = id }, [id])
const fetchData = useCallback(async () => { ... }, []) // Empty deps when using refs
return { data, fetchData }
}
```
## Zustand Stores
Stores live in `stores/`. Complex stores split into `store.ts` + `types.ts`.
```typescript
import { create } from 'zustand'
import { devtools } from 'zustand/middleware'
const initialState = { items: [] as Item[] }
export const useFeatureStore = create<FeatureState>()(
devtools(
(set, get) => ({
...initialState,
setItems: (items) => set({ items }),
reset: () => set(initialState),
}),
{ name: 'feature-store' }
)
)
```
Use `devtools` middleware. Use `persist` only when data should survive reload with `partialize` to persist only necessary state.
## React Query
All React Query hooks live in `hooks/queries/`.
```typescript
export const entityKeys = {
all: ['entity'] as const,
list: (workspaceId?: string) => [...entityKeys.all, 'list', workspaceId ?? ''] as const,
}
export function useEntityList(workspaceId?: string) {
return useQuery({
queryKey: entityKeys.list(workspaceId),
queryFn: () => fetchEntities(workspaceId as string),
enabled: Boolean(workspaceId),
staleTime: 60 * 1000,
placeholderData: keepPreviousData,
})
}
```
## Styling
Use Tailwind only, no inline styles. Use `cn()` from `@/lib/utils` for conditional classes.
```typescript
<div className={cn('base-classes', isActive && 'active-classes')} />
```
## EMCN Components
Import from `@/components/emcn`, never from subpaths (except CSS files). Use CVA when 2+ variants exist.
## Testing
Use Vitest. Test files: `feature.ts``feature.test.ts`
```typescript
/**
* @vitest-environment node
*/
// Mocks BEFORE imports
vi.mock('@sim/db', () => ({ db: { select: vi.fn() } }))
// Imports AFTER mocks
import { describe, expect, it, vi } from 'vitest'
import { createSession, loggerMock } from '@sim/testing'
describe('feature', () => {
beforeEach(() => vi.clearAllMocks())
it.concurrent('runs in parallel', () => { ... })
})
```
Use `@sim/testing` factories over manual test data.
## Utils Rules
- Never create `utils.ts` for single consumer - inline it
- Create `utils.ts` when 2+ files need the same helper
- Check existing sources in `lib/` before duplicating
## Adding Integrations
New integrations require: **Tools****Block****Icon** → (optional) **Trigger**
Always look up the service's API docs first.
### 1. Tools (`tools/{service}/`)
```
tools/{service}/
├── index.ts # Barrel export
├── types.ts # Params/response types
└── {action}.ts # Tool implementation
```
**Tool structure:**
```typescript
export const serviceTool: ToolConfig<Params, Response> = {
id: 'service_action',
name: 'Service Action',
description: '...',
version: '1.0.0',
oauth: { required: true, provider: 'service' },
params: { /* ... */ },
request: { url: '/api/tools/service/action', method: 'POST', ... },
transformResponse: async (response) => { /* ... */ },
outputs: { /* ... */ },
}
```
Register in `tools/registry.ts`.
### 2. Block (`blocks/blocks/{service}.ts`)
```typescript
export const ServiceBlock: BlockConfig = {
type: 'service',
name: 'Service',
description: '...',
category: 'tools',
bgColor: '#hexcolor',
icon: ServiceIcon,
subBlocks: [ /* see SubBlock Properties */ ],
tools: { access: ['service_action'], config: { tool: (p) => `service_${p.operation}` } },
inputs: { /* ... */ },
outputs: { /* ... */ },
}
```
Register in `blocks/registry.ts` (alphabetically).
**SubBlock Properties:**
```typescript
{
id: 'field', title: 'Label', type: 'short-input', placeholder: '...',
required: true, // or condition object
condition: { field: 'op', value: 'send' }, // show/hide
dependsOn: ['credential'], // clear when dep changes
mode: 'basic', // 'basic' | 'advanced' | 'both' | 'trigger'
}
```
**condition examples:**
- `{ field: 'op', value: 'send' }` - show when op === 'send'
- `{ field: 'op', value: ['a','b'] }` - show when op is 'a' OR 'b'
- `{ field: 'op', value: 'x', not: true }` - show when op !== 'x'
- `{ field: 'op', value: 'x', not: true, and: { field: 'type', value: 'dm', not: true } }` - complex
**dependsOn:** `['field']` or `{ all: ['a'], any: ['b', 'c'] }`
### 3. Icon (`components/icons.tsx`)
```typescript
export function ServiceIcon(props: SVGProps<SVGSVGElement>) {
return <svg {...props}>/* SVG from brand assets */</svg>
}
```
### 4. Trigger (`triggers/{service}/`) - Optional
```
triggers/{service}/
├── index.ts # Barrel export
├── webhook.ts # Webhook handler
└── {event}.ts # Event-specific handlers
```
Register in `triggers/registry.ts`.
### Integration Checklist
- [ ] Look up API docs
- [ ] Create `tools/{service}/` with types and tools
- [ ] Register tools in `tools/registry.ts`
- [ ] Add icon to `components/icons.tsx`
- [ ] Create block in `blocks/blocks/{service}.ts`
- [ ] Register block in `blocks/registry.ts`
- [ ] (Optional) Create and register triggers

View File

@@ -13,8 +13,25 @@
<a href="https://docs.sim.ai" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Docs-6F3DFA.svg" alt="Documentation"></a>
</p>
### Build Workflows with Ease
Design agent workflows visually on a canvas—connect agents, tools, and blocks, then run them instantly.
<p align="center">
<img src="apps/sim/public/static/demo.gif" alt="Sim Demo" width="800"/>
<img src="apps/sim/public/static/workflow.gif" alt="Workflow Builder Demo" width="800"/>
</p>
### Supercharge with Copilot
Leverage Copilot to generate nodes, fix errors, and iterate on flows directly from natural language.
<p align="center">
<img src="apps/sim/public/static/copilot.gif" alt="Copilot Demo" width="800"/>
</p>
### Integrate Vector Databases
Upload documents to a vector store and let agents answer questions grounded in your specific content.
<p align="center">
<img src="apps/sim/public/static/knowledge.gif" alt="Knowledge Uploads and Retrieval Demo" width="800"/>
</p>
## Quickstart
@@ -72,6 +89,36 @@ Wait for the model to download, then visit [http://localhost:3000](http://localh
docker compose -f docker-compose.ollama.yml exec ollama ollama pull llama3.1:8b
```
#### Using an External Ollama Instance
If you already have Ollama running on your host machine (outside Docker), you need to configure the `OLLAMA_URL` to use `host.docker.internal` instead of `localhost`:
```bash
# Docker Desktop (macOS/Windows)
OLLAMA_URL=http://host.docker.internal:11434 docker compose -f docker-compose.prod.yml up -d
# Linux (add extra_hosts or use host IP)
docker compose -f docker-compose.prod.yml up -d # Then set OLLAMA_URL to your host's IP
```
**Why?** When running inside Docker, `localhost` refers to the container itself, not your host machine. `host.docker.internal` is a special DNS name that resolves to the host.
For Linux users, you can either:
- Use your host machine's actual IP address (e.g., `http://192.168.1.100:11434`)
- Add `extra_hosts: ["host.docker.internal:host-gateway"]` to the simstudio service in your compose file
#### Using vLLM
Sim also supports [vLLM](https://docs.vllm.ai/) for self-hosted models with OpenAI-compatible API:
```bash
# Set these environment variables
VLLM_BASE_URL=http://your-vllm-server:8000
VLLM_API_KEY=your_optional_api_key # Only if your vLLM instance requires auth
```
When running with Docker, use `host.docker.internal` if vLLM is on your host machine (same as Ollama above).
### Self-hosted: Dev Containers
1. Open VS Code with the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
@@ -83,6 +130,7 @@ docker compose -f docker-compose.ollama.yml exec ollama ollama pull llama3.1:8b
**Requirements:**
- [Bun](https://bun.sh/) runtime
- [Node.js](https://nodejs.org/) v20+ (required for sandboxed code execution)
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
**Note:** Sim uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
@@ -140,6 +188,7 @@ DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
Then run the migrations:
```bash
cd packages/db # Required so drizzle picks correct .env file
bunx drizzle-kit migrate --config=./drizzle.config.ts
```
@@ -173,6 +222,46 @@ Copilot is a Sim-managed service. To use Copilot on a self-hosted instance:
- Go to https://sim.ai → Settings → Copilot and generate a Copilot API key
- Set `COPILOT_API_KEY` environment variable in your self-hosted apps/sim/.env file to that value
## Environment Variables
Key environment variables for self-hosted deployments (see `apps/sim/.env.example` for full list):
| Variable | Required | Description |
|----------|----------|-------------|
| `DATABASE_URL` | Yes | PostgreSQL connection string with pgvector |
| `BETTER_AUTH_SECRET` | Yes | Auth secret (`openssl rand -hex 32`) |
| `BETTER_AUTH_URL` | Yes | Your app URL (e.g., `http://localhost:3000`) |
| `NEXT_PUBLIC_APP_URL` | Yes | Public app URL (same as above) |
| `ENCRYPTION_KEY` | Yes | Encryption key (`openssl rand -hex 32`) |
| `OLLAMA_URL` | No | Ollama server URL (default: `http://localhost:11434`) |
| `VLLM_BASE_URL` | No | vLLM server URL for self-hosted models |
| `COPILOT_API_KEY` | No | API key from sim.ai for Copilot features |
## Troubleshooting
### Ollama models not showing in dropdown (Docker)
If you're running Ollama on your host machine and Sim in Docker, change `OLLAMA_URL` from `localhost` to `host.docker.internal`:
```bash
OLLAMA_URL=http://host.docker.internal:11434 docker compose -f docker-compose.prod.yml up -d
```
See [Using an External Ollama Instance](#using-an-external-ollama-instance) for details.
### Database connection issues
Ensure PostgreSQL has the pgvector extension installed. When using Docker, wait for the database to be healthy before running migrations.
### Port conflicts
If ports 3000, 3002, or 5432 are in use, configure alternatives:
```bash
# Custom ports
NEXT_PUBLIC_APP_URL=http://localhost:3100 POSTGRES_PORT=5433 docker compose up -d
```
## Tech Stack
- **Framework**: [Next.js](https://nextjs.org/) (App Router)

View File

@@ -1,20 +1,25 @@
import { findNeighbour } from 'fumadocs-core/server'
import type React from 'react'
import { findNeighbour } from 'fumadocs-core/page-tree'
import defaultMdxComponents from 'fumadocs-ui/mdx'
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
import { ChevronLeft, ChevronRight } from 'lucide-react'
import Link from 'next/link'
import { notFound } from 'next/navigation'
import { PageNavigationArrows } from '@/components/docs-layout/page-navigation-arrows'
import { TOCFooter } from '@/components/docs-layout/toc-footer'
import { LLMCopyButton } from '@/components/page-actions'
import { StructuredData } from '@/components/structured-data'
import { source } from '@/lib/source'
export const dynamic = 'force-dynamic'
import { CodeBlock } from '@/components/ui/code-block'
import { Heading } from '@/components/ui/heading'
import { type PageData, source } from '@/lib/source'
export default async function Page(props: { params: Promise<{ slug?: string[]; lang: string }> }) {
const params = await props.params
const page = source.getPage(params.slug, params.lang)
if (!page) notFound()
const MDX = page.data.body
const data = page.data as PageData
const MDX = data.body
const baseUrl = 'https://docs.sim.ai'
const pageTreeRecord = source.pageTree as Record<string, any>
@@ -22,54 +27,172 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
pageTreeRecord[params.lang] ?? pageTreeRecord.en ?? Object.values(pageTreeRecord)[0]
const neighbours = pageTree ? findNeighbour(pageTree, page.url) : null
const CustomFooter = () => (
<div className='mt-12 flex items-center justify-between border-border border-t py-8'>
{neighbours?.previous ? (
<Link
href={neighbours.previous.url}
className='group flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground'
>
<ChevronLeft className='group-hover:-translate-x-1 h-4 w-4 transition-transform' />
<span className='font-medium'>{neighbours.previous.name}</span>
</Link>
) : (
<div />
)}
const generateBreadcrumbs = () => {
const breadcrumbs: Array<{ name: string; url: string }> = [
{
name: 'Home',
url: baseUrl,
},
]
{neighbours?.next ? (
const urlParts = page.url.split('/').filter(Boolean)
let currentPath = ''
urlParts.forEach((part, index) => {
if (index === 0 && ['en', 'es', 'fr', 'de', 'ja', 'zh'].includes(part)) {
currentPath = `/${part}`
return
}
currentPath += `/${part}`
const name = part
.split('-')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ')
if (index === urlParts.length - 1) {
breadcrumbs.push({
name: data.title,
url: `${baseUrl}${page.url}`,
})
} else {
breadcrumbs.push({
name: name,
url: `${baseUrl}${currentPath}`,
})
}
})
return breadcrumbs
}
const breadcrumbs = generateBreadcrumbs()
const CustomFooter = () => (
<div className='mt-12'>
{/* Navigation links */}
<div className='flex items-center justify-between py-8'>
{neighbours?.previous ? (
<Link
href={neighbours.previous.url}
className='group flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground'
>
<ChevronLeft className='group-hover:-translate-x-1 h-4 w-4 transition-transform' />
<span className='font-medium'>{neighbours.previous.name}</span>
</Link>
) : (
<div />
)}
{neighbours?.next ? (
<Link
href={neighbours.next.url}
className='group flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground'
>
<span className='font-medium'>{neighbours.next.name}</span>
<ChevronRight className='h-4 w-4 transition-transform group-hover:translate-x-1' />
</Link>
) : (
<div />
)}
</div>
{/* Divider line */}
<div className='border-border border-t' />
{/* Social icons */}
<div className='flex items-center gap-4 py-6'>
<Link
href={neighbours.next.url}
className='group flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground'
href='https://x.com/simdotai'
target='_blank'
rel='noopener noreferrer'
aria-label='X (Twitter)'
>
<span className='font-medium'>{neighbours.next.name}</span>
<ChevronRight className='h-4 w-4 transition-transform group-hover:translate-x-1' />
<div
className='h-5 w-5 bg-gray-400 transition-colors hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400'
style={{
maskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z%22/%3E%3C/svg%3E')",
maskRepeat: 'no-repeat',
maskPosition: 'center center',
WebkitMaskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z%22/%3E%3C/svg%3E')",
WebkitMaskRepeat: 'no-repeat',
WebkitMaskPosition: 'center center',
}}
/>
</Link>
) : (
<div />
)}
<Link
href='https://github.com/simstudioai/sim'
target='_blank'
rel='noopener noreferrer'
aria-label='GitHub'
>
<div
className='h-5 w-5 bg-gray-400 transition-colors hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400'
style={{
maskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z%22/%3E%3C/svg%3E')",
maskRepeat: 'no-repeat',
maskPosition: 'center center',
WebkitMaskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z%22/%3E%3C/svg%3E')",
WebkitMaskRepeat: 'no-repeat',
WebkitMaskPosition: 'center center',
}}
/>
</Link>
<Link
href='https://discord.gg/Hr4UWYEcTT'
target='_blank'
rel='noopener noreferrer'
aria-label='Discord'
>
<div
className='h-5 w-5 bg-gray-400 transition-colors hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400'
style={{
maskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z%22/%3E%3C/svg%3E')",
maskRepeat: 'no-repeat',
maskPosition: 'center center',
WebkitMaskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z%22/%3E%3C/svg%3E')",
WebkitMaskRepeat: 'no-repeat',
WebkitMaskPosition: 'center center',
}}
/>
</Link>
</div>
</div>
)
return (
<>
<StructuredData
title={page.data.title}
description={page.data.description || ''}
title={data.title}
description={data.description || ''}
url={`${baseUrl}${page.url}`}
lang={params.lang}
breadcrumb={breadcrumbs}
/>
<DocsPage
toc={page.data.toc}
full={page.data.full}
toc={data.toc}
full={data.full}
breadcrumb={{
enabled: false,
}}
tableOfContent={{
style: 'clerk',
enabled: true,
header: <div className='mb-2 font-medium text-sm'>On this page</div>,
header: (
<div key='toc-header' className='mb-2 font-medium text-sm'>
On this page
</div>
),
footer: <TOCFooter />,
single: false,
}}
article={{
className: 'scroll-smooth max-sm:pb-16',
}}
tableOfContentPopover={{
style: 'clerk',
enabled: true,
@@ -79,10 +202,41 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
component: <CustomFooter />,
}}
>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<div className='relative mt-6 sm:mt-0'>
<div className='absolute top-1 right-0 flex items-center gap-2'>
<div className='hidden sm:flex'>
<LLMCopyButton markdownUrl={`${page.url}.mdx`} />
</div>
<PageNavigationArrows previous={neighbours?.previous} next={neighbours?.next} />
</div>
<DocsTitle>{data.title}</DocsTitle>
<DocsDescription>{data.description}</DocsDescription>
</div>
<DocsBody>
<MDX components={defaultMdxComponents} />
<MDX
components={{
...defaultMdxComponents,
CodeBlock,
h1: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h1' {...props} />
),
h2: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h2' {...props} />
),
h3: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h3' {...props} />
),
h4: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h4' {...props} />
),
h5: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h5' {...props} />
),
h6: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h6' {...props} />
),
}}
/>
</DocsBody>
</DocsPage>
</>
@@ -100,13 +254,16 @@ export async function generateMetadata(props: {
const page = source.getPage(params.slug, params.lang)
if (!page) notFound()
const data = page.data as PageData
const baseUrl = 'https://docs.sim.ai'
const fullUrl = `${baseUrl}${page.url}`
const ogImageUrl = `${baseUrl}/api/og?title=${encodeURIComponent(data.title)}`
return {
title: page.data.title,
title: data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
data.description || 'Sim visual workflow builder for AI applications documentation',
keywords: [
'AI workflow builder',
'visual workflow editor',
@@ -115,27 +272,40 @@ export async function generateMetadata(props: {
'AI agents',
'no-code AI',
'drag and drop workflows',
page.data.title?.toLowerCase().split(' '),
data.title?.toLowerCase().split(' '),
]
.flat()
.filter(Boolean),
authors: [{ name: 'Sim Team' }],
category: 'Developer Tools',
openGraph: {
title: page.data.title,
title: data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
data.description || 'Sim visual workflow builder for AI applications documentation',
url: fullUrl,
siteName: 'Sim Documentation',
type: 'article',
locale: params.lang,
alternateLocale: ['en', 'fr', 'zh'].filter((lang) => lang !== params.lang),
locale: params.lang === 'en' ? 'en_US' : `${params.lang}_${params.lang.toUpperCase()}`,
alternateLocale: ['en', 'es', 'fr', 'de', 'ja', 'zh']
.filter((lang) => lang !== params.lang)
.map((lang) => (lang === 'en' ? 'en_US' : `${lang}_${lang.toUpperCase()}`)),
images: [
{
url: ogImageUrl,
width: 1200,
height: 630,
alt: data.title,
},
],
},
twitter: {
card: 'summary',
title: page.data.title,
card: 'summary_large_image',
title: data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
data.description || 'Sim visual workflow builder for AI applications documentation',
images: [ogImageUrl],
creator: '@simdotai',
site: '@simdotai',
},
robots: {
index: true,
@@ -152,8 +322,12 @@ export async function generateMetadata(props: {
alternates: {
canonical: fullUrl,
languages: {
en: `${baseUrl}/en${page.url.replace(`/${params.lang}`, '')}`,
'x-default': `${baseUrl}${page.url.replace(`/${params.lang}`, '')}`,
en: `${baseUrl}${page.url.replace(`/${params.lang}`, '')}`,
es: `${baseUrl}/es${page.url.replace(`/${params.lang}`, '')}`,
fr: `${baseUrl}/fr${page.url.replace(`/${params.lang}`, '')}`,
de: `${baseUrl}/de${page.url.replace(`/${params.lang}`, '')}`,
ja: `${baseUrl}/ja${page.url.replace(`/${params.lang}`, '')}`,
zh: `${baseUrl}/zh${page.url.replace(`/${params.lang}`, '')}`,
},
},

View File

@@ -2,18 +2,26 @@ import type { ReactNode } from 'react'
import { defineI18nUI } from 'fumadocs-ui/i18n'
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
import { RootProvider } from 'fumadocs-ui/provider/next'
import { ExternalLink, GithubIcon } from 'lucide-react'
import { Inter } from 'next/font/google'
import { Geist_Mono, Inter } from 'next/font/google'
import Image from 'next/image'
import Link from 'next/link'
import { LanguageDropdown } from '@/components/ui/language-dropdown'
import {
SidebarFolder,
SidebarItem,
SidebarSeparator,
} from '@/components/docs-layout/sidebar-components'
import { Navbar } from '@/components/navbar/navbar'
import { i18n } from '@/lib/i18n'
import { source } from '@/lib/source'
import '../global.css'
import { Analytics } from '@vercel/analytics/next'
const inter = Inter({
subsets: ['latin'],
variable: '--font-geist-sans',
})
const geistMono = Geist_Mono({
subsets: ['latin'],
variable: '--font-geist-mono',
})
const { provider } = defineI18nUI(i18n, {
@@ -27,25 +35,18 @@ const { provider } = defineI18nUI(i18n, {
fr: {
displayName: 'Français',
},
de: {
displayName: 'Deutsch',
},
ja: {
displayName: '日本語',
},
zh: {
displayName: '简体中文',
},
},
})
const GitHubLink = () => (
<div className='fixed right-4 bottom-4 z-50'>
<Link
href='https://github.com/simstudioai/sim'
target='_blank'
rel='noopener noreferrer'
className='flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background transition-colors hover:bg-muted'
>
<GithubIcon className='h-4 w-4' />
</Link>
</div>
)
type LayoutProps = {
children: ReactNode
params: Promise<{ lang: string }>
@@ -54,44 +55,81 @@ type LayoutProps = {
export default async function Layout({ children, params }: LayoutProps) {
const { lang } = await params
const structuredData = {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'Sim Documentation',
description:
'Comprehensive documentation for Sim - the visual workflow builder for AI Agent Workflows.',
url: 'https://docs.sim.ai',
publisher: {
'@type': 'Organization',
name: 'Sim',
url: 'https://sim.ai',
logo: {
'@type': 'ImageObject',
url: 'https://docs.sim.ai/static/logo.png',
},
},
inLanguage: lang,
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: 'https://docs.sim.ai/api/search?q={search_term_string}',
},
'query-input': 'required name=search_term_string',
},
}
return (
<html lang={lang} className={inter.className} suppressHydrationWarning>
<body className='flex min-h-screen flex-col'>
<html
lang={lang}
className={`${inter.variable} ${geistMono.variable}`}
suppressHydrationWarning
>
<head>
<script
type='application/ld+json'
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
/>
{/* OneDollarStats Analytics - CDN script handles everything automatically */}
<script defer src='https://assets.onedollarstats.com/stonks.js' />
</head>
<body className='flex min-h-screen flex-col font-sans'>
<RootProvider i18n={provider(lang)}>
<Navbar />
<DocsLayout
tree={source.pageTree[lang]}
nav={{
title: (
<div className='flex items-center gap-3'>
<Image
src='/static/logo.png'
alt='Sim'
width={60}
height={24}
className='h-6 w-auto'
/>
<LanguageDropdown />
</div>
<Image
src='/static/logo.png'
alt='Sim'
width={72}
height={28}
className='h-7 w-auto'
priority
/>
),
}}
links={[
{
text: 'Visit Sim',
url: 'https://sim.ai',
icon: <ExternalLink className='h-4 w-4' />,
},
]}
sidebar={{
defaultOpenLevel: 0,
collapsible: true,
collapsible: false,
footer: null,
banner: null,
components: {
Item: SidebarItem,
Folder: SidebarFolder,
Separator: SidebarSeparator,
},
}}
containerProps={{
className: '!pt-0',
}}
>
{children}
</DocsLayout>
<GitHubLink />
<Analytics />
</RootProvider>
</body>
</html>

View File

@@ -0,0 +1,23 @@
import { DocsBody, DocsPage } from 'fumadocs-ui/page'
export const metadata = {
title: 'Page Not Found',
}
export default function NotFound() {
return (
<DocsPage>
<DocsBody>
<div className='flex min-h-[60vh] flex-col items-center justify-center text-center'>
<h1 className='mb-4 bg-gradient-to-b from-[#8357FF] to-[#6F3DFA] bg-clip-text font-bold text-8xl text-transparent'>
404
</h1>
<h2 className='mb-2 font-semibold text-2xl text-foreground'>Page Not Found</h2>
<p className='text-muted-foreground'>
The page you're looking for doesn't exist or has been moved.
</p>
</div>
</DocsBody>
</DocsPage>
)
}

View File

@@ -0,0 +1,152 @@
import { ImageResponse } from 'next/og'
import type { NextRequest } from 'next/server'
export const runtime = 'edge'
const TITLE_FONT_SIZE = {
large: 64,
medium: 56,
small: 48,
} as const
function getTitleFontSize(title: string): number {
if (title.length > 45) return TITLE_FONT_SIZE.small
if (title.length > 30) return TITLE_FONT_SIZE.medium
return TITLE_FONT_SIZE.large
}
/**
* Loads a Google Font dynamically by fetching the CSS and extracting the font URL.
*/
async function loadGoogleFont(font: string, weights: string, text: string): Promise<ArrayBuffer> {
const url = `https://fonts.googleapis.com/css2?family=${font}:wght@${weights}&text=${encodeURIComponent(text)}`
const css = await (await fetch(url)).text()
const resource = css.match(/src: url\((.+)\) format\('(opentype|truetype)'\)/)
if (resource) {
const response = await fetch(resource[1])
if (response.status === 200) {
return await response.arrayBuffer()
}
}
throw new Error('Failed to load font data')
}
/**
* Generates dynamic Open Graph images for documentation pages.
*/
export async function GET(request: NextRequest) {
const { searchParams } = new URL(request.url)
const title = searchParams.get('title') || 'Documentation'
const baseUrl = new URL(request.url).origin
const allText = `${title}docs.sim.ai`
const fontData = await loadGoogleFont('Geist', '400;500;600', allText)
return new ImageResponse(
<div
style={{
height: '100%',
width: '100%',
display: 'flex',
flexDirection: 'column',
background: '#0c0c0c',
position: 'relative',
fontFamily: 'Geist',
}}
>
{/* Base gradient layer - subtle purple tint across the entire image */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'radial-gradient(ellipse 150% 100% at 50% 100%, rgba(88, 28, 135, 0.15) 0%, rgba(88, 28, 135, 0.08) 25%, rgba(88, 28, 135, 0.03) 50%, transparent 80%)',
display: 'flex',
}}
/>
{/* Secondary glow - adds depth without harsh edges */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'radial-gradient(ellipse 100% 80% at 80% 90%, rgba(112, 31, 252, 0.12) 0%, rgba(112, 31, 252, 0.04) 40%, transparent 70%)',
display: 'flex',
}}
/>
{/* Top darkening - creates natural vignette */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 40%, transparent 100%)',
display: 'flex',
}}
/>
{/* Content */}
<div
style={{
display: 'flex',
flexDirection: 'column',
padding: '56px 72px',
height: '100%',
justifyContent: 'space-between',
}}
>
{/* Logo */}
<img src={`${baseUrl}/static/logo.png`} alt='sim' height={32} />
{/* Title */}
<span
style={{
fontSize: getTitleFontSize(title),
fontWeight: 600,
color: '#ffffff',
lineHeight: 1.1,
letterSpacing: '-0.02em',
}}
>
{title}
</span>
{/* Footer */}
<span
style={{
fontSize: 20,
fontWeight: 500,
color: '#71717a',
}}
>
docs.sim.ai
</span>
</div>
</div>,
{
width: 1200,
height: 630,
fonts: [
{
name: 'Geist',
data: fontData,
style: 'normal',
},
],
}
)
}

View File

@@ -1,4 +1,126 @@
import { createFromSource } from 'fumadocs-core/search/server'
import { source } from '@/lib/source'
import { sql } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { db, docsEmbeddings } from '@/lib/db'
import { generateSearchEmbedding } from '@/lib/embeddings'
export const { GET } = createFromSource(source)
export const runtime = 'nodejs'
export const revalidate = 0
/**
* Hybrid search API endpoint
* - English: Vector embeddings + keyword search
* - Other languages: Keyword search only
*/
export async function GET(request: NextRequest) {
try {
const searchParams = request.nextUrl.searchParams
const query = searchParams.get('query') || searchParams.get('q') || ''
const locale = searchParams.get('locale') || 'en'
const limit = Number.parseInt(searchParams.get('limit') || '10', 10)
if (!query || query.trim().length === 0) {
return NextResponse.json([])
}
const candidateLimit = limit * 3
const similarityThreshold = 0.6
const localeMap: Record<string, string> = {
en: 'english',
es: 'spanish',
fr: 'french',
de: 'german',
ja: 'simple', // PostgreSQL doesn't have Japanese support, use simple
zh: 'simple', // PostgreSQL doesn't have Chinese support, use simple
}
const tsConfig = localeMap[locale] || 'simple'
const useVectorSearch = locale === 'en'
let vectorResults: Array<{
chunkId: string
chunkText: string
sourceDocument: string
sourceLink: string
headerText: string
headerLevel: number
similarity: number
searchType: string
}> = []
if (useVectorSearch) {
const queryEmbedding = await generateSearchEmbedding(query)
vectorResults = await db
.select({
chunkId: docsEmbeddings.chunkId,
chunkText: docsEmbeddings.chunkText,
sourceDocument: docsEmbeddings.sourceDocument,
sourceLink: docsEmbeddings.sourceLink,
headerText: docsEmbeddings.headerText,
headerLevel: docsEmbeddings.headerLevel,
similarity: sql<number>`1 - (${docsEmbeddings.embedding} <=> ${JSON.stringify(queryEmbedding)}::vector)`,
searchType: sql<string>`'vector'`,
})
.from(docsEmbeddings)
.where(
sql`1 - (${docsEmbeddings.embedding} <=> ${JSON.stringify(queryEmbedding)}::vector) >= ${similarityThreshold}`
)
.orderBy(sql`${docsEmbeddings.embedding} <=> ${JSON.stringify(queryEmbedding)}::vector`)
.limit(candidateLimit)
}
const keywordResults = await db
.select({
chunkId: docsEmbeddings.chunkId,
chunkText: docsEmbeddings.chunkText,
sourceDocument: docsEmbeddings.sourceDocument,
sourceLink: docsEmbeddings.sourceLink,
headerText: docsEmbeddings.headerText,
headerLevel: docsEmbeddings.headerLevel,
similarity: sql<number>`ts_rank(${docsEmbeddings.chunkTextTsv}, plainto_tsquery(${tsConfig}, ${query}))`,
searchType: sql<string>`'keyword'`,
})
.from(docsEmbeddings)
.where(sql`${docsEmbeddings.chunkTextTsv} @@ plainto_tsquery(${tsConfig}, ${query})`)
.orderBy(
sql`ts_rank(${docsEmbeddings.chunkTextTsv}, plainto_tsquery(${tsConfig}, ${query})) DESC`
)
.limit(candidateLimit)
const seenIds = new Set<string>()
const mergedResults = []
for (let i = 0; i < Math.max(vectorResults.length, keywordResults.length); i++) {
if (i < vectorResults.length && !seenIds.has(vectorResults[i].chunkId)) {
mergedResults.push(vectorResults[i])
seenIds.add(vectorResults[i].chunkId)
}
if (i < keywordResults.length && !seenIds.has(keywordResults[i].chunkId)) {
mergedResults.push(keywordResults[i])
seenIds.add(keywordResults[i].chunkId)
}
}
const filteredResults = mergedResults.slice(0, limit)
const searchResults = filteredResults.map((result) => {
const title = result.headerText || result.sourceDocument.replace('.mdx', '')
const pathParts = result.sourceDocument
.replace('.mdx', '')
.split('/')
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
return {
id: result.chunkId,
type: 'page' as const,
url: result.sourceLink,
content: title,
breadcrumbs: pathParts,
}
})
return NextResponse.json(searchResults)
} catch (error) {
console.error('Semantic search error:', error)
return NextResponse.json([])
}
}

View File

@@ -2,8 +2,27 @@
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
/* Prevent overscroll bounce effect on the page */
html,
body {
overscroll-behavior: none;
}
@theme {
--color-fd-primary: #802fff; /* Purple from control-bar component */
--font-geist-sans: var(--font-geist-sans);
--font-geist-mono: var(--font-geist-mono);
}
/* Font family utilities */
.font-sans {
font-family: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.font-mono {
font-family: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
}
/* Target any potential border classes */
@@ -15,139 +34,462 @@
:root {
--fd-border: transparent !important;
--fd-border-sidebar: transparent !important;
--fd-nav-height: 64px; /* Custom navbar height (h-16 = 4rem = 64px) */
/* Content container width used to center main content */
--spacing-fd-container: 1400px;
/* Edge gutter = leftover space on each side of centered container */
--edge-gutter: max(1rem, calc((100vw - var(--spacing-fd-container)) / 2));
/* Shift the sidebar slightly left from the content edge for extra breathing room */
--sidebar-shift: 90px;
--sidebar-offset: max(0px, calc(var(--edge-gutter) - var(--sidebar-shift)));
/* Shift TOC slightly right to match sidebar spacing for symmetry */
--toc-shift: 90px;
--toc-offset: max(0px, calc(var(--edge-gutter) - var(--toc-shift)));
/* Sidebar and TOC have 20px internal padding - navbar accounts for this directly */
/* Extra gap between sidebar/TOC and the main text content */
--content-gap: 1.75rem;
}
/* Sidebar improvements for cleaner design */
[data-sidebar] {
--fd-sidebar-width: 280px;
background-color: rgb(255 255 255);
padding-top: 16px;
/* Remove custom layout variable overrides to fallback to fumadocs defaults */
/* ============================================
Navbar Light Mode Styling
============================================ */
/* Light mode navbar and search styling */
:root:not(.dark) nav {
background-color: hsla(0, 0%, 96%, 0.85) !important;
}
/* Clean sidebar container */
[data-sidebar] > div {
padding: 0 16px;
:root:not(.dark) nav button[type="button"] {
background-color: hsla(0, 0%, 93%, 0.85) !important;
backdrop-filter: blur(33px) saturate(180%) !important;
-webkit-backdrop-filter: blur(33px) saturate(180%) !important;
color: rgba(0, 0, 0, 0.6) !important;
}
/* Section headers/separators styling */
[data-sidebar] .text-sm.font-medium.text-muted-foreground,
[data-sidebar] [data-separator] {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 20px;
margin-bottom: 6px;
padding-left: 12px;
padding-right: 12px;
color: rgb(115 115 115);
border: none;
background: none;
:root:not(.dark) nav button[type="button"] kbd {
color: rgba(0, 0, 0, 0.6) !important;
}
/* First separator should have less top margin */
[data-sidebar] [data-separator]:first-of-type {
margin-top: 12px;
/* Dark mode navbar and search styling */
:root.dark nav {
background-color: hsla(0, 0%, 7.04%, 0.92) !important;
backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
-webkit-backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
}
/* Clean sidebar item styling */
[data-sidebar] a {
padding: 8px 12px;
margin: 1px 0;
border-radius: 6px;
font-size: 14px;
font-weight: 400;
line-height: 1.4;
transition: all 0.15s ease;
/* ============================================
Custom Sidebar Styling (Turborepo-inspired)
============================================ */
/* Floating sidebar appearance - remove background */
[data-sidebar-container],
#nd-sidebar {
background: transparent !important;
background-color: transparent !important;
border: none !important;
--color-fd-muted: transparent !important;
--color-fd-card: transparent !important;
--color-fd-secondary: transparent !important;
}
aside[data-sidebar],
aside#nd-sidebar {
background: transparent !important;
background-color: transparent !important;
border: none !important;
border-right: none !important;
}
/* Fumadocs v16: Add sidebar placeholder styling for grid area */
[data-sidebar-placeholder] {
background: transparent !important;
}
/* Fumadocs v16: Hide sidebar panel (floating collapse button) */
[data-sidebar-panel] {
display: none !important;
}
/* Mobile only: Reduce gap between navbar and content */
@media (max-width: 1023px) {
#nd-docs-layout {
margin-top: -25px;
}
}
/* Desktop only: Apply custom navbar offset, sidebar width and margin offsets */
/* On mobile, let fumadocs handle the layout natively */
@media (min-width: 1024px) {
:root {
--fd-banner-height: 64px !important;
}
#nd-docs-layout {
--fd-docs-height: calc(100dvh - 64px) !important;
--fd-sidebar-width: 300px !important;
margin-left: var(--sidebar-offset) !important;
margin-right: var(--toc-offset) !important;
}
/* Hide fumadocs nav on desktop - we use custom navbar there */
#nd-docs-layout > header {
display: none !important;
}
}
/* Sidebar spacing - compact like turborepo */
/* Fumadocs v16: [data-sidebar-viewport] doesn't exist, target #nd-sidebar > div instead */
[data-sidebar-viewport],
#nd-sidebar > div {
padding: 0.5rem 12px 12px;
background: transparent !important;
background-color: transparent !important;
}
/* Override sidebar item styling to match Raindrop */
/* Target Link and button elements in sidebar - override Fumadocs itemVariants */
/* Exclude the small chevron-only toggle buttons */
/* Using html prefix for higher specificity over Tailwind v4 utilities */
html #nd-sidebar a,
html #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*="xpand"]) {
font-size: 0.9375rem !important; /* 15px to match Raindrop */
line-height: 1.4 !important;
padding: 0.5rem 0.75rem !important; /* More compact like Raindrop */
font-weight: 400 !important;
border-radius: 0.75rem !important; /* More rounded like Raindrop */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
sans-serif !important;
}
/* Dark mode sidebar text */
html.dark #nd-sidebar a,
html.dark #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*="xpand"]) {
color: rgba(255, 255, 255, 0.6) !important;
}
/* Light mode sidebar text */
html:not(.dark) #nd-sidebar a,
html:not(.dark) #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*="xpand"]) {
color: rgba(0, 0, 0, 0.6) !important;
}
/* Make sure chevron icons are visible and properly styled */
#nd-sidebar svg {
display: inline-block !important;
opacity: 0.6 !important;
flex-shrink: 0 !important;
width: 0.75rem !important;
height: 0.75rem !important;
}
/* Ensure the small chevron toggle buttons are visible */
#nd-sidebar button[aria-label*="ollapse"],
#nd-sidebar button[aria-label*="xpand"] {
display: flex !important;
opacity: 1 !important;
padding: 0.25rem !important;
}
/* Root-level spacing now handled by [data-sidebar-viewport] > * rule below */
/* Add tiny gap between nested items */
#nd-sidebar ul li {
margin-bottom: 0.0625rem !important;
}
#nd-sidebar ul li:last-child {
margin-bottom: 0 !important;
}
/* Section headers should be slightly larger */
/* Fumadocs v16: Also target #nd-sidebar for compatibility */
[data-sidebar-viewport] [data-separator],
#nd-sidebar [data-separator],
#nd-sidebar p {
font-size: 0.75rem !important;
font-weight: 600 !important;
text-transform: uppercase !important;
letter-spacing: 0.05em !important;
}
/* Override active state (NO PURPLE) */
#nd-sidebar a[data-active="true"],
#nd-sidebar button[data-active="true"],
#nd-sidebar a.bg-fd-primary\/10,
#nd-sidebar a.text-fd-primary,
#nd-sidebar a[class*="bg-fd-primary"],
#nd-sidebar a[class*="text-fd-primary"],
/* Override custom sidebar purple classes */
#nd-sidebar
a.bg-purple-50\/80,
#nd-sidebar a.text-purple-600,
#nd-sidebar a[class*="bg-purple"],
#nd-sidebar a[class*="text-purple"] {
background-image: none !important;
}
/* Dark mode active state */
html.dark #nd-sidebar a[data-active="true"],
html.dark #nd-sidebar button[data-active="true"],
html.dark #nd-sidebar a.bg-fd-primary\/10,
html.dark #nd-sidebar a.text-fd-primary,
html.dark #nd-sidebar a[class*="bg-fd-primary"],
html.dark #nd-sidebar a[class*="text-fd-primary"],
html.dark #nd-sidebar a.bg-purple-50\/80,
html.dark #nd-sidebar a.text-purple-600,
html.dark #nd-sidebar a[class*="bg-purple"],
html.dark #nd-sidebar a[class*="text-purple"] {
background-color: rgba(255, 255, 255, 0.15) !important;
color: rgba(255, 255, 255, 1) !important;
}
/* Light mode active state */
html:not(.dark) #nd-sidebar a[data-active="true"],
html:not(.dark) #nd-sidebar button[data-active="true"],
html:not(.dark) #nd-sidebar a.bg-fd-primary\/10,
html:not(.dark) #nd-sidebar a.text-fd-primary,
html:not(.dark) #nd-sidebar a[class*="bg-fd-primary"],
html:not(.dark) #nd-sidebar a[class*="text-fd-primary"],
html:not(.dark) #nd-sidebar a.bg-purple-50\/80,
html:not(.dark) #nd-sidebar a.text-purple-600,
html:not(.dark) #nd-sidebar a[class*="bg-purple"],
html:not(.dark) #nd-sidebar a[class*="text-purple"] {
background-color: rgba(0, 0, 0, 0.07) !important;
color: rgba(0, 0, 0, 0.9) !important;
}
/* Dark mode hover state */
html.dark #nd-sidebar a:hover:not([data-active="true"]),
html.dark #nd-sidebar button:hover:not([data-active="true"]) {
background-color: rgba(255, 255, 255, 0.08) !important;
}
/* Light mode hover state */
html:not(.dark) #nd-sidebar a:hover:not([data-active="true"]),
html:not(.dark) #nd-sidebar button:hover:not([data-active="true"]) {
background-color: rgba(0, 0, 0, 0.03) !important;
}
/* Dark mode - ensure active/selected items don't change on hover */
html.dark #nd-sidebar a.bg-purple-50\/80:hover,
html.dark #nd-sidebar a[class*="bg-purple"]:hover,
html.dark #nd-sidebar a[data-active="true"]:hover,
html.dark #nd-sidebar button[data-active="true"]:hover {
background-color: rgba(255, 255, 255, 0.15) !important;
color: rgba(255, 255, 255, 1) !important;
}
/* Light mode - ensure active/selected items don't change on hover */
html:not(.dark) #nd-sidebar a.bg-purple-50\/80:hover,
html:not(.dark) #nd-sidebar a[class*="bg-purple"]:hover,
html:not(.dark) #nd-sidebar a[data-active="true"]:hover,
html:not(.dark) #nd-sidebar button[data-active="true"]:hover {
background-color: rgba(0, 0, 0, 0.07) !important;
color: rgba(0, 0, 0, 0.9) !important;
}
/* Hide search, platform, and collapse button from sidebar completely */
[data-sidebar] [data-search],
[data-sidebar] .search-toggle,
#nd-sidebar [data-search],
#nd-sidebar .search-toggle,
[data-sidebar-viewport] [data-search],
[data-sidebar-viewport] button[data-search],
aside[data-sidebar] [role="button"]:has([data-search]),
aside[data-sidebar] > div > button:first-child,
#nd-sidebar > div > button:first-child,
[data-sidebar] a[href*="sim.ai"],
#nd-sidebar a[href*="sim.ai"],
[data-sidebar-viewport] a[href*="sim.ai"],
/* Hide search buttons (but NOT folder chevron buttons) */
aside[data-sidebar] > div:first-child
> button:not([aria-label="Collapse"]):not([aria-label="Expand"]),
#nd-sidebar > div:first-child > button:not([aria-label="Collapse"]):not([aria-label="Expand"]),
/* Hide sidebar collapse button (panel icon) - direct children only */
aside[data-sidebar] > button:first-of-type:not([aria-label="Collapse"]):not([aria-label="Expand"]),
[data-sidebar]
> button[type="button"]:first-of-type:not([aria-label="Collapse"]):not([aria-label="Expand"]),
button[data-collapse]:not([aria-label="Collapse"]):not([aria-label="Expand"]),
[data-sidebar-header] button,
/* Hide theme toggle from sidebar footer */
aside[data-sidebar] [data-theme-toggle],
[data-sidebar-footer],
[data-sidebar] footer,
footer button[aria-label*="heme"],
aside[data-sidebar] > div:last-child:has(button[aria-label*="heme"]),
aside[data-sidebar] button[aria-label*="heme"],
[data-sidebar] button[aria-label*="Theme"],
/* Additional theme toggle selectors */
aside[data-sidebar] > *:last-child
button,
[data-sidebar-viewport] ~ *,
aside[data-sidebar] > div:not([data-sidebar-viewport]),
/* Aggressive theme toggle hiding */
aside[data-sidebar] svg[class*="sun"],
aside[data-sidebar] svg[class*="moon"],
aside[data-sidebar] button[type="button"]:last-child,
aside button:has(svg:only-child),
[data-sidebar] div:has(> button[type="button"]:only-child:last-child),
/* Hide theme toggle and other non-content elements */
aside[data-sidebar] > *:not([data-sidebar-viewport]) {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
height: 0 !important;
max-height: 0 !important;
overflow: hidden !important;
pointer-events: none !important;
position: absolute !important;
left: -9999px !important;
}
/* Desktop only: Hide sidebar toggle buttons and nav title/logo (keep visible on mobile) */
@media (min-width: 1025px) {
[data-sidebar-container] > button,
[data-sidebar-container] [data-toggle],
aside[data-sidebar] [data-sidebar-toggle],
button[data-sidebar-toggle],
nav button[data-sidebar-toggle],
button[aria-label="Toggle Sidebar"],
button[aria-label="Collapse Sidebar"],
/* Hide nav title/logo in sidebar on desktop - target all possible locations */
aside[data-sidebar] a[href="/"],
aside[data-sidebar] a[href="/"] img,
aside[data-sidebar] > a:first-child,
aside[data-sidebar] > div > a:first-child,
aside[data-sidebar] img[alt="Sim"],
[data-sidebar-header],
[data-sidebar] [data-title],
#nd-sidebar > a:first-child,
#nd-sidebar > div:first-child > a:first-child,
#nd-sidebar img[alt="Sim"],
/* Hide theme toggle at bottom of sidebar on desktop */
#nd-sidebar
> footer,
#nd-sidebar footer,
aside#nd-sidebar > *:last-child:not(div),
#nd-sidebar > button:last-child,
#nd-sidebar button[aria-label*="theme" i],
#nd-sidebar button[aria-label*="Theme"],
#nd-sidebar > div:last-child > button {
display: none !important;
visibility: hidden !important;
height: 0 !important;
max-height: 0 !important;
overflow: hidden !important;
}
}
/* Extra aggressive - hide everything after the viewport */
aside[data-sidebar] [data-sidebar-viewport] ~ * {
display: none !important;
}
/* Tighter spacing for sidebar content */
[data-sidebar-viewport] > * {
margin-bottom: 0.0625rem;
}
[data-sidebar-viewport] > *:last-child {
margin-bottom: 0;
}
[data-sidebar-viewport] ul {
margin: 0;
padding: 0;
}
/* Ensure sidebar starts with content immediately */
aside[data-sidebar] > div:first-child {
padding-top: 0;
}
/* Remove all sidebar borders and backgrounds */
[data-sidebar-container],
aside[data-sidebar],
[data-sidebar],
[data-sidebar] *,
#nd-sidebar,
#nd-sidebar * {
border: none !important;
border-right: none !important;
border-left: none !important;
border-top: none !important;
border-bottom: none !important;
}
/* Override fumadocs background colors for sidebar */
.dark #nd-sidebar,
.dark [data-sidebar-container],
.dark aside[data-sidebar] {
--color-fd-muted: transparent !important;
--color-fd-secondary: transparent !important;
background: transparent !important;
background-color: transparent !important;
}
/* Force normal text flow in sidebar */
[data-sidebar],
[data-sidebar] *,
[data-sidebar-viewport],
[data-sidebar-viewport] * {
writing-mode: horizontal-tb !important;
}
/* ============================================
Code Block Styling (Improved)
============================================ */
/* Apply Geist Mono to code elements */
code,
pre,
pre code {
font-family: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
}
/* Inline code */
:not(pre) > code {
padding: 0.2em 0.4em;
border-radius: 0.25rem;
font-size: 0.875em;
font-weight: 500;
}
/* Light mode inline code */
:root:not(.dark) :not(pre) > code {
background-color: rgb(243 244 246);
color: rgb(220 38 38);
border: 1px solid rgb(229 231 235);
}
/* Dark mode inline code */
.dark :not(pre) > code {
background-color: rgb(31 41 55);
color: rgb(248 113 113);
border: 1px solid rgb(55 65 81);
}
/* Code block container improvements */
pre {
font-size: 0.875rem;
line-height: 1.7;
tab-size: 2;
-webkit-overflow-scrolling: touch;
}
pre code {
display: block;
color: rgb(71 85 105);
text-decoration: none;
width: fit-content;
min-width: 100%;
}
[data-sidebar] a[data-active="true"] {
background-color: rgba(128, 47, 255, 0.08);
color: var(--color-fd-primary);
font-weight: 500;
}
[data-sidebar] a:hover:not([data-active="true"]) {
background-color: rgb(248 250 252);
color: rgb(51 65 85);
}
/* Improve spacing between sidebar items */
[data-sidebar] nav > * + * {
margin-top: 2px;
}
/* Section group styling */
[data-sidebar] [data-folder] {
margin-bottom: 4px;
}
[data-sidebar] [data-folder] > div:first-child {
font-weight: 500;
font-size: 13px;
color: rgb(15 23 42);
padding: 6px 12px;
margin-bottom: 4px;
}
/* Clean up folder toggle buttons */
[data-sidebar] button[data-folder-toggle] {
padding: 4px 8px 4px 12px;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
color: rgb(51 65 85);
}
[data-sidebar] button[data-folder-toggle]:hover {
background-color: rgb(248 250 252);
}
/* Nested item indentation */
[data-sidebar] [data-folder] a {
padding-left: 24px;
font-size: 14px;
}
/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
[data-sidebar] {
background-color: rgb(2 8 23);
}
[data-sidebar] a {
color: rgb(148 163 184);
}
[data-sidebar] a:hover:not([data-active="true"]) {
background-color: rgb(30 41 59);
color: rgb(226 232 240);
}
[data-sidebar] a[data-active="true"] {
background-color: rgba(128, 47, 255, 0.15);
color: var(--color-fd-primary);
}
[data-sidebar] .text-sm.font-medium.text-muted-foreground,
[data-sidebar] [data-separator] {
color: rgb(148 163 184);
}
[data-sidebar] [data-folder] > div:first-child {
color: rgb(226 232 240);
}
[data-sidebar] button[data-folder-toggle] {
color: rgb(148 163 184);
}
[data-sidebar] button[data-folder-toggle]:hover {
background-color: rgb(30 41 59);
}
/* Syntax highlighting adjustments for better readability */
pre code .line {
padding-left: 0;
padding-right: 0;
}
/* Custom text highlighting styles */
@@ -162,15 +504,55 @@
/* Add bottom spacing to prevent abrupt page endings */
[data-content] {
padding-top: 1.5rem !important;
padding-bottom: 4rem;
}
/* Alternative fallback for different Fumadocs versions */
main article,
.docs-page main {
padding-top: 1.5rem !important;
padding-bottom: 4rem;
}
/* ============================================
Center and Constrain Main Content Width
============================================ */
/* Main content area - center and constrain like turborepo/raindrop */
/* Note: --sidebar-offset and --toc-offset are now applied at #nd-docs-layout level */
main[data-main] {
max-width: var(--spacing-fd-container, 1400px);
margin-left: auto;
margin-right: auto;
padding-top: 1rem;
padding-left: var(--content-gap);
padding-right: var(--content-gap);
order: 1 !important;
}
/* Adjust for smaller screens */
@media (max-width: 768px) {
main[data-main] {
padding-left: 1rem;
padding-right: 1rem;
}
}
/* Ensure docs page content is properly constrained */
[data-docs-page] {
max-width: 1400px;
margin-left: auto;
margin-right: auto;
padding-top: 1.5rem !important;
}
/* Override Fumadocs default content padding */
article[data-content],
div[data-content] {
padding-top: 1.5rem !important;
}
/* Remove any unwanted borders/outlines from video elements */
video {
outline: none !important;

View File

@@ -22,9 +22,15 @@ export const metadata = {
'drag and drop workflows',
'AI integrations',
'workflow canvas',
'AI development platform',
'AI Agent Workflow Builder',
'workflow orchestration',
'agent builder',
'AI workflow automation',
'visual programming',
],
authors: [{ name: 'Sim Team', url: 'https://sim.ai' }],
creator: 'Sim',
publisher: 'Sim',
category: 'Developer Tools',
classification: 'Developer Documentation',
manifest: '/favicon/site.webmanifest',
@@ -44,19 +50,29 @@ export const metadata = {
openGraph: {
type: 'website',
locale: 'en_US',
alternateLocale: ['fr_FR', 'zh_CN'],
alternateLocale: ['es_ES', 'fr_FR', 'de_DE', 'ja_JP', 'zh_CN'],
url: 'https://docs.sim.ai',
siteName: 'Sim Documentation',
title: 'Sim Documentation - Visual Workflow Builder for AI Applications',
description:
'Comprehensive documentation for Sim - the visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines.',
images: [
{
url: 'https://docs.sim.ai/api/og?title=Sim%20Documentation',
width: 1200,
height: 630,
alt: 'Sim Documentation',
},
],
},
twitter: {
card: 'summary',
card: 'summary_large_image',
title: 'Sim Documentation - Visual Workflow Builder for AI Applications',
description:
'Comprehensive documentation for Sim - the visual workflow builder for AI applications.',
creator: '@sim_ai',
creator: '@simdotai',
site: '@simdotai',
images: ['https://docs.sim.ai/api/og?title=Sim%20Documentation'],
},
robots: {
index: true,
@@ -72,9 +88,13 @@ export const metadata = {
alternates: {
canonical: 'https://docs.sim.ai',
languages: {
en: '/en',
fr: '/fr',
zh: '/zh',
'x-default': 'https://docs.sim.ai',
en: 'https://docs.sim.ai',
es: 'https://docs.sim.ai/es',
fr: 'https://docs.sim.ai/fr',
de: 'https://docs.sim.ai/de',
ja: 'https://docs.sim.ai/ja',
zh: 'https://docs.sim.ai/zh',
},
},
}

View File

@@ -0,0 +1,31 @@
import { getLLMText } from '@/lib/llms'
import { source } from '@/lib/source'
export const revalidate = false
export async function GET() {
try {
const pages = source.getPages().filter((page) => {
if (!page || !page.data || !page.url) return false
const pathParts = page.url.split('/').filter(Boolean)
const hasLangPrefix = pathParts[0] && ['es', 'fr', 'de', 'ja', 'zh'].includes(pathParts[0])
return !hasLangPrefix
})
const scan = pages.map((page) => getLLMText(page))
const scanned = await Promise.all(scan)
const filtered = scanned.filter((text) => text && text.length > 0)
return new Response(filtered.join('\n\n---\n\n'), {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
},
})
} catch (error) {
console.error('Error generating LLM full text:', error)
return new Response('Error generating full documentation text', { status: 500 })
}
}

View File

@@ -1,16 +1,33 @@
import { notFound } from 'next/navigation'
import { type NextRequest, NextResponse } from 'next/server'
import { i18n } from '@/lib/i18n'
import { getLLMText } from '@/lib/llms'
import { source } from '@/lib/source'
export const revalidate = false
export async function GET(_req: NextRequest, { params }: { params: Promise<{ slug?: string[] }> }) {
export async function GET(
_request: NextRequest,
{ params }: { params: Promise<{ slug?: string[] }> }
) {
const { slug } = await params
const page = source.getPage(slug)
let lang: (typeof i18n.languages)[number] = i18n.defaultLanguage
let pageSlug = slug
if (slug && slug.length > 0 && i18n.languages.includes(slug[0] as typeof lang)) {
lang = slug[0] as typeof lang
pageSlug = slug.slice(1)
}
const page = source.getPage(pageSlug, lang)
if (!page) notFound()
return new NextResponse(await getLLMText(page))
return new NextResponse(await getLLMText(page), {
headers: {
'Content-Type': 'text/markdown',
},
})
}
export function generateStaticParams() {

View File

@@ -1,11 +1,87 @@
import { getLLMText } from '@/lib/llms'
import { source } from '@/lib/source'
export const revalidate = false
export async function GET() {
const scan = source.getPages().map(getLLMText)
const scanned = await Promise.all(scan)
const baseUrl = 'https://docs.sim.ai'
return new Response(scanned.join('\n\n'))
try {
const pages = source.getPages().filter((page) => {
if (!page || !page.data || !page.url) return false
const pathParts = page.url.split('/').filter(Boolean)
const hasLangPrefix = pathParts[0] && ['es', 'fr', 'de', 'ja', 'zh'].includes(pathParts[0])
return !hasLangPrefix
})
const sections: Record<string, Array<{ title: string; url: string; description?: string }>> = {}
pages.forEach((page) => {
const pathParts = page.url.split('/').filter(Boolean)
const section =
pathParts[0] && ['en', 'es', 'fr', 'de', 'ja', 'zh'].includes(pathParts[0])
? pathParts[1] || 'root'
: pathParts[0] || 'root'
if (!sections[section]) {
sections[section] = []
}
sections[section].push({
title: page.data.title || 'Untitled',
url: `${baseUrl}${page.url}`,
description: page.data.description,
})
})
const manifest = `# Sim Documentation
> Visual Workflow Builder for AI Applications
Sim is a visual workflow builder for AI applications that lets you build AI agent workflows visually. Create powerful AI agents, automation workflows, and data processing pipelines by connecting blocks on a canvas—no coding required.
## Documentation Overview
This file provides an overview of our documentation. For full content of all pages, see ${baseUrl}/llms-full.txt
## Main Sections
${Object.entries(sections)
.map(([section, items]) => {
const sectionTitle = section
.split('-')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ')
return `### ${sectionTitle}\n\n${items.map((item) => `- ${item.title}: ${item.url}${item.description ? `\n ${item.description}` : ''}`).join('\n')}`
})
.join('\n\n')}
## Additional Resources
- Full documentation content: ${baseUrl}/llms-full.txt
- Individual page content: ${baseUrl}/llms.mdx/[page-path]
- API documentation: ${baseUrl}/sdks/
- Tool integrations: ${baseUrl}/tools/
## Statistics
- Total pages: ${pages.length} (English only)
- Other languages available at: ${baseUrl}/[lang]/ (es, fr, de, ja, zh)
---
Generated: ${new Date().toISOString()}
Format: llms.txt v0.1.0
See: https://llmstxt.org for specification`
return new Response(manifest, {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
},
})
} catch (error) {
console.error('Error generating LLM manifest:', error)
return new Response('Error generating documentation manifest', { status: 500 })
}
}

View File

@@ -9,14 +9,26 @@ export async function GET() {
User-agent: *
Allow: /
# Allow all well-behaved crawlers
# Search engine crawlers
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
# AI and LLM crawlers
User-agent: Slurp
Allow: /
User-agent: DuckDuckBot
Allow: /
User-agent: Baiduspider
Allow: /
User-agent: YandexBot
Allow: /
# AI and LLM crawlers - explicitly allowed for documentation indexing
User-agent: GPTBot
Allow: /
@@ -32,6 +44,21 @@ Allow: /
User-agent: Claude-Web
Allow: /
User-agent: Applebot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Diffbot
Allow: /
User-agent: FacebookBot
Allow: /
User-agent: cohere-ai
Allow: /
# Disallow admin and internal paths (if any exist)
Disallow: /.next/
Disallow: /api/internal/
@@ -41,14 +68,29 @@ Disallow: /admin/
# Allow but don't prioritize these
Allow: /api/search
Allow: /llms.txt
Allow: /llms-full.txt
Allow: /llms.mdx/
# Sitemaps
Sitemap: ${baseUrl}/sitemap.xml
# Crawl delay for aggressive bots (optional)
# Crawl-delay: 1
# Additional resources for AI indexing
# See https://github.com/AnswerDotAI/llms-txt for more info
# LLM-friendly content available at: ${baseUrl}/llms.txt`
# LLM-friendly content:
# Manifest: ${baseUrl}/llms.txt
# Full content: ${baseUrl}/llms-full.txt
# Individual pages: ${baseUrl}/llms.mdx/[page-path]
# Multi-language documentation available at:
# ${baseUrl}/en - English
# ${baseUrl}/es - Español
# ${baseUrl}/fr - Français
# ${baseUrl}/de - Deutsch
# ${baseUrl}/ja - 日本語
# ${baseUrl}/zh - 简体中文`
return new Response(robotsTxt, {
headers: {

View File

@@ -8,6 +8,14 @@ export async function GET() {
const allPages = source.getPages()
const getPriority = (url: string): string => {
if (url === '/introduction' || url === '/') return '1.0'
if (url === '/getting-started') return '0.9'
if (url.match(/^\/[^/]+$/)) return '0.8'
if (url.includes('/sdks/') || url.includes('/tools/')) return '0.7'
return '0.6'
}
const urls = allPages
.flatMap((page) => {
const urlWithoutLang = page.url.replace(/^\/[a-z]{2}\//, '/')
@@ -22,7 +30,7 @@ export async function GET() {
<loc>${url}</loc>
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
<changefreq>weekly</changefreq>
<priority>${urlWithoutLang === '/introduction' ? '1.0' : '0.8'}</priority>
<priority>${getPriority(urlWithoutLang)}</priority>
${i18n.languages.length > 1 ? generateAlternateLinks(baseUrl, urlWithoutLang) : ''}
</url>`
})
@@ -37,6 +45,7 @@ ${urls}
return new Response(sitemap, {
headers: {
'Content-Type': 'application/xml',
'Cache-Control': 'public, max-age=3600, s-maxage=3600',
},
})
}

11
apps/docs/cli.json Normal file
View File

@@ -0,0 +1,11 @@
{
"aliases": {
"uiDir": "./components/ui",
"componentsDir": "./components",
"blockDir": "./components",
"cssDir": "./styles",
"libDir": "./lib"
},
"baseDir": "",
"commands": {}
}

View File

@@ -0,0 +1,42 @@
'use client'
import { ChevronLeft, ChevronRight } from 'lucide-react'
import Link from 'next/link'
interface PageNavigationArrowsProps {
previous?: {
url: string
}
next?: {
url: string
}
}
export function PageNavigationArrows({ previous, next }: PageNavigationArrowsProps) {
if (!previous && !next) return null
return (
<div className='flex items-center gap-2'>
{previous && (
<Link
href={previous.url}
className='inline-flex items-center justify-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-1.5 text-muted-foreground/60 text-sm transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
aria-label='Previous page'
title='Previous page'
>
<ChevronLeft className='h-4 w-4' />
</Link>
)}
{next && (
<Link
href={next.url}
className='inline-flex items-center justify-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-1.5 text-muted-foreground/60 text-sm transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
aria-label='Next page'
title='Next page'
>
<ChevronRight className='h-4 w-4' />
</Link>
)}
</div>
)
}

View File

@@ -0,0 +1,206 @@
'use client'
import { type ReactNode, useEffect, useState } from 'react'
import type { Folder, Item, Separator } from 'fumadocs-core/page-tree'
import { ChevronRight } from 'lucide-react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { cn } from '@/lib/utils'
const LANG_PREFIXES = ['/en', '/es', '/fr', '/de', '/ja', '/zh']
function stripLangPrefix(path: string): string {
for (const prefix of LANG_PREFIXES) {
if (path === prefix) return '/'
if (path.startsWith(`${prefix}/`)) return path.slice(prefix.length)
}
return path
}
function isActive(url: string, pathname: string, nested = true): boolean {
const normalizedPathname = stripLangPrefix(pathname)
const normalizedUrl = stripLangPrefix(url)
return (
normalizedUrl === normalizedPathname ||
(nested && normalizedPathname.startsWith(`${normalizedUrl}/`))
)
}
export function SidebarItem({ item }: { item: Item }) {
const pathname = usePathname()
const active = isActive(item.url, pathname, false)
return (
<Link
href={item.url}
data-active={active}
className={cn(
// Mobile styles (default)
'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50 hover:text-fd-accent-foreground',
active && 'bg-fd-primary/10 font-medium text-fd-primary',
// Desktop styles (lg+)
'lg:mb-[0.0625rem] lg:block lg:rounded-md lg:px-2.5 lg:py-1.5 lg:font-normal lg:text-[13px] lg:leading-tight',
'lg:text-gray-600 lg:dark:text-gray-400',
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
active &&
'lg:bg-purple-50/80 lg:font-normal lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
)}
>
{item.name}
</Link>
)
}
export function SidebarFolder({ item, children }: { item: Folder; children: ReactNode }) {
const pathname = usePathname()
const hasActiveChild = checkHasActiveChild(item, pathname)
const hasChildren = item.children.length > 0
const [open, setOpen] = useState(hasActiveChild)
useEffect(() => {
setOpen(hasActiveChild)
}, [hasActiveChild])
const active = item.index ? isActive(item.index.url, pathname, false) : false
if (item.index && !hasChildren) {
return (
<Link
href={item.index.url}
data-active={active}
className={cn(
// Mobile styles (default)
'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50 hover:text-fd-accent-foreground',
active && 'bg-fd-primary/10 font-medium text-fd-primary',
// Desktop styles (lg+)
'lg:mb-[0.0625rem] lg:block lg:rounded-md lg:px-2.5 lg:py-1.5 lg:font-normal lg:text-[13px] lg:leading-tight',
'lg:text-gray-600 lg:dark:text-gray-400',
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
active &&
'lg:bg-purple-50/80 lg:font-normal lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
)}
>
{item.name}
</Link>
)
}
return (
<div className='flex flex-col lg:mb-[0.0625rem]'>
<div className='flex w-full items-center lg:gap-0.5'>
{item.index ? (
<Link
href={item.index.url}
data-active={active}
className={cn(
// Mobile styles (default)
'flex flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50 hover:text-fd-accent-foreground',
active && 'bg-fd-primary/10 font-medium text-fd-primary',
// Desktop styles (lg+)
'lg:block lg:flex-1 lg:rounded-md lg:px-2.5 lg:py-1.5 lg:font-medium lg:text-[13px] lg:leading-tight',
'lg:text-gray-800 lg:dark:text-gray-200',
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
active &&
'lg:bg-purple-50/80 lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
)}
>
{item.name}
</Link>
) : (
<button
onClick={() => setOpen(!open)}
className={cn(
// Mobile styles (default)
'flex flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50',
// Desktop styles (lg+)
'lg:flex lg:w-full lg:cursor-pointer lg:items-center lg:justify-between lg:rounded-md lg:px-2.5 lg:py-1.5 lg:text-left lg:font-medium lg:text-[13px] lg:leading-tight',
'lg:text-gray-800 lg:hover:bg-gray-100/60 lg:dark:text-gray-200 lg:dark:hover:bg-gray-800/40'
)}
>
<span>{item.name}</span>
{/* Desktop-only chevron for non-index folders */}
<ChevronRight
className={cn(
'ml-auto hidden h-3 w-3 flex-shrink-0 text-gray-400 transition-transform duration-200 ease-in-out lg:block dark:text-gray-500',
open && 'rotate-90'
)}
/>
</button>
)}
{hasChildren && (
<button
onClick={() => setOpen(!open)}
className={cn(
// Mobile styles
'rounded p-1 hover:bg-fd-accent/50',
// Desktop styles
'lg:cursor-pointer lg:rounded lg:p-1 lg:transition-colors lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40'
)}
aria-label={open ? 'Collapse' : 'Expand'}
>
<ChevronRight
className={cn(
// Mobile styles
'h-4 w-4 transition-transform',
// Desktop styles
'lg:h-3 lg:w-3 lg:text-gray-400 lg:duration-200 lg:ease-in-out lg:dark:text-gray-500',
open && 'rotate-90'
)}
/>
</button>
)}
</div>
{hasChildren && (
<div
className={cn(
'overflow-hidden transition-all duration-200 ease-in-out',
open ? 'max-h-[10000px] opacity-100' : 'max-h-0 opacity-0'
)}
>
{/* Mobile: simple indent */}
<div className='ml-4 flex flex-col gap-0.5 lg:hidden'>{children}</div>
{/* Desktop: styled with border */}
<ul className='mt-0.5 ml-2 hidden space-y-[0.0625rem] border-gray-200/60 border-l pl-2.5 lg:block dark:border-gray-700/60'>
{children}
</ul>
</div>
)}
</div>
)
}
export function SidebarSeparator({ item }: { item: Separator }) {
return (
<p
className={cn(
// Mobile styles
'mt-4 mb-2 px-2 font-medium text-fd-muted-foreground text-xs',
// Desktop styles
'lg:mt-4 lg:mb-1.5 lg:px-2.5 lg:font-semibold lg:text-[10px] lg:text-gray-500/80 lg:uppercase lg:tracking-wide lg:dark:text-gray-500'
)}
>
{item.name}
</p>
)
}
function checkHasActiveChild(node: Folder, pathname: string): boolean {
if (node.index && isActive(node.index.url, pathname)) {
return true
}
for (const child of node.children) {
if (child.type === 'page' && isActive(child.url, pathname)) {
return true
}
if (child.type === 'folder' && checkHasActiveChild(child, pathname)) {
return true
}
}
return false
}

View File

@@ -0,0 +1,41 @@
'use client'
import { useState } from 'react'
import { ArrowRight, ChevronRight } from 'lucide-react'
import Link from 'next/link'
export function TOCFooter() {
const [isHovered, setIsHovered] = useState(false)
return (
<div className='sticky bottom-0 mt-6'>
<div className='flex flex-col gap-2 rounded-lg border border-border bg-secondary p-6 text-sm'>
<div className='text-balance font-semibold text-base leading-tight'>
Start building today
</div>
<div className='text-muted-foreground'>Trusted by over 60,000 builders.</div>
<div className='text-muted-foreground'>
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
</div>
<Link
href='https://sim.ai/signup'
target='_blank'
rel='noopener noreferrer'
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
className='group mt-2 inline-flex h-8 w-fit items-center justify-center gap-1 whitespace-nowrap rounded-[10px] border border-[#6F3DFA] bg-gradient-to-b from-[#8357FF] to-[#6F3DFA] px-3 pr-[10px] pl-[12px] font-medium text-sm text-white shadow-[inset_0_2px_4px_0_#9B77FF] outline-none transition-all hover:shadow-lg focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50'
aria-label='Get started with Sim - Sign up for free'
>
<span>Get started</span>
<span className='inline-flex transition-transform duration-200 group-hover:translate-x-0.5'>
{isHovered ? (
<ArrowRight className='h-4 w-4' aria-hidden='true' />
) : (
<ChevronRight className='h-4 w-4' aria-hidden='true' />
)}
</span>
</Link>
</div>
</div>
)
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,66 @@
'use client'
import Image from 'next/image'
import Link from 'next/link'
import { LanguageDropdown } from '@/components/ui/language-dropdown'
import { SearchTrigger } from '@/components/ui/search-trigger'
import { ThemeToggle } from '@/components/ui/theme-toggle'
export function Navbar() {
return (
<nav
className='sticky top-0 z-50 border-border/50 border-b'
style={{
backdropFilter: 'blur(25px) saturate(180%)',
WebkitBackdropFilter: 'blur(25px) saturate(180%)',
}}
>
{/* Desktop: Single row layout */}
<div className='hidden h-16 w-full items-center lg:flex'>
<div
className='relative flex w-full items-center justify-between'
style={{
paddingLeft: 'calc(var(--sidebar-offset) + 32px)',
paddingRight: 'calc(var(--toc-offset) + 60px)',
}}
>
{/* Left cluster: logo */}
<div className='flex items-center'>
<Link href='/' className='flex min-w-[100px] items-center'>
<Image
src='/static/logo.png'
alt='Sim'
width={72}
height={28}
className='h-7 w-auto'
/>
</Link>
</div>
{/* Center cluster: search - absolutely positioned to center */}
<div className='-translate-x-1/2 absolute left-1/2 flex items-center justify-center'>
<SearchTrigger />
</div>
{/* Right cluster aligns with TOC edge */}
<div className='flex items-center gap-4'>
<Link
href='https://sim.ai'
target='_blank'
rel='noopener noreferrer'
className='rounded-xl px-3 py-2 font-normal text-[0.9375rem] text-foreground/60 leading-[1.4] transition-colors hover:bg-foreground/8 hover:text-foreground'
style={{
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
}}
>
Platform
</Link>
<LanguageDropdown />
<ThemeToggle />
</div>
</div>
</div>
</nav>
)
}

View File

@@ -0,0 +1,60 @@
'use client'
import { useState } from 'react'
import { useCopyButton } from 'fumadocs-ui/utils/use-copy-button'
import { Check, Copy } from 'lucide-react'
const cache = new Map<string, string>()
export function LLMCopyButton({
markdownUrl,
}: {
/**
* A URL to fetch the raw Markdown/MDX content of page
*/
markdownUrl: string
}) {
const [isLoading, setLoading] = useState(false)
const [checked, onClick] = useCopyButton(async () => {
const cached = cache.get(markdownUrl)
if (cached) return navigator.clipboard.writeText(cached)
setLoading(true)
try {
await navigator.clipboard.write([
new ClipboardItem({
'text/plain': fetch(markdownUrl).then(async (res) => {
const content = await res.text()
cache.set(markdownUrl, content)
return content
}),
}),
])
} finally {
setLoading(false)
}
})
return (
<button
disabled={isLoading}
onClick={onClick}
className='flex cursor-pointer items-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-2 text-muted-foreground/60 text-sm leading-none transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
aria-label={checked ? 'Copied to clipboard' : 'Copy page content'}
>
{checked ? (
<>
<Check className='h-3.5 w-3.5' />
<span>Copied</span>
</>
) : (
<>
<Copy className='h-3.5 w-3.5' />
<span>Copy page</span>
</>
)}
</button>
)
}

View File

@@ -88,7 +88,7 @@ export function StructuredData({
},
'query-input': 'required name=search_term_string',
},
inLanguage: ['en', 'fr', 'zh'],
inLanguage: ['en', 'es', 'fr', 'de', 'ja', 'zh'],
}
const faqStructuredData = title.toLowerCase().includes('faq') && {

View File

@@ -1,44 +1,40 @@
'use client'
import type * as React from 'react'
import { blockTypeToIconMap } from '@/components/ui/icon-mapping'
interface BlockInfoCardProps {
type: string
color: string
icon?: boolean
iconSvg?: string
icon?: React.ComponentType<{ className?: string }>
iconSvg?: string // Deprecated: Use automatic icon resolution instead
}
export function BlockInfoCard({
type,
color,
icon = false,
icon: IconComponent,
iconSvg,
}: BlockInfoCardProps): React.ReactNode {
// Auto-resolve icon component from block type if not explicitly provided
const ResolvedIcon = IconComponent || blockTypeToIconMap[type] || null
return (
<div className='mb-6 overflow-hidden rounded-lg border border-border'>
<div className='flex items-center justify-center p-6'>
<div
className='flex h-20 w-20 items-center justify-center rounded-lg'
style={{ backgroundColor: color }}
style={{ background: color }}
>
{iconSvg ? (
{ResolvedIcon ? (
<ResolvedIcon className='h-10 w-10 text-white' />
) : iconSvg ? (
<div className='h-10 w-10 text-white' dangerouslySetInnerHTML={{ __html: iconSvg }} />
) : (
<div className='font-mono text-xl opacity-70'>{type.substring(0, 2)}</div>
)}
</div>
</div>
{icon && (
<style jsx global>{`
.block-icon {
width: 80px;
height: 80px;
margin: 1rem auto;
display: block;
}
`}</style>
)}
</div>
)
}

View File

@@ -0,0 +1,27 @@
import { cva, type VariantProps } from 'class-variance-authority'
const variants = {
primary: 'bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80',
outline: 'border hover:bg-fd-accent hover:text-fd-accent-foreground',
ghost: 'hover:bg-fd-accent hover:text-fd-accent-foreground',
secondary:
'border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground',
} as const
export const buttonVariants = cva(
'inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring',
{
variants: {
variant: variants,
color: variants,
size: {
sm: 'gap-1 px-2 py-1.5 text-xs',
icon: 'p-1.5 [&_svg]:size-5',
'icon-sm': 'p-1.5 [&_svg]:size-4.5',
'icon-xs': 'p-1 [&_svg]:size-4',
},
},
}
)
export type ButtonProps = VariantProps<typeof buttonVariants>

View File

@@ -0,0 +1,50 @@
'use client'
import { useState } from 'react'
import { CodeBlock as FumadocsCodeBlock } from 'fumadocs-ui/components/codeblock'
import { Check, Copy } from 'lucide-react'
import { cn } from '@/lib/utils'
export function CodeBlock(props: React.ComponentProps<typeof FumadocsCodeBlock>) {
const [copied, setCopied] = useState(false)
const handleCopy = async (text: string) => {
await navigator.clipboard.writeText(text)
setCopied(true)
setTimeout(() => setCopied(false), 2000)
}
return (
<FumadocsCodeBlock
{...props}
Actions={({ children, className }) => (
<div className={cn('empty:hidden', className)}>
{/* Custom copy button */}
<button
type='button'
aria-label={copied ? 'Copied Text' : 'Copy Text'}
onClick={(e) => {
const pre = (e.currentTarget as HTMLElement)
.closest('.nd-codeblock')
?.querySelector('pre')
if (pre) handleCopy(pre.textContent || '')
}}
className={cn(
'cursor-pointer rounded-md p-2 transition-all',
'border border-border bg-background/80 hover:bg-muted',
'backdrop-blur-sm'
)}
>
<span className='flex items-center justify-center'>
{copied ? (
<Check size={16} className='text-green-600 dark:text-green-400' />
) : (
<Copy size={16} className='text-muted-foreground' />
)}
</span>
</button>
</div>
)}
/>
)
}

View File

@@ -0,0 +1,58 @@
'use client'
import { type ComponentPropsWithoutRef, useState } from 'react'
import { Check, Link } from 'lucide-react'
import { cn } from '@/lib/utils'
type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
interface HeadingProps extends ComponentPropsWithoutRef<'h1'> {
as?: HeadingTag
}
export function Heading({ as, className, ...props }: HeadingProps) {
const [copied, setCopied] = useState(false)
const As = as ?? 'h1'
if (!props.id) {
return <As className={className} {...props} />
}
const handleClick = async (e: React.MouseEvent) => {
e.preventDefault()
const url = `${window.location.origin}${window.location.pathname}#${props.id}`
try {
await navigator.clipboard.writeText(url)
setCopied(true)
// Update URL hash without scrolling
window.history.pushState(null, '', `#${props.id}`)
setTimeout(() => setCopied(false), 2000)
} catch {
// Fallback: just navigate to the anchor
window.location.hash = props.id as string
}
}
return (
<As className={cn('group flex scroll-m-28 flex-row items-center gap-2', className)} {...props}>
<a data-card='' href={`#${props.id}`} className='peer' onClick={handleClick}>
{props.children}
</a>
{copied ? (
<Check
aria-hidden
className='size-3.5 shrink-0 text-green-500 opacity-100 transition-opacity'
/>
) : (
<Link
aria-hidden
className='size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 peer-hover:opacity-100'
/>
)}
</As>
)
}

View File

@@ -0,0 +1,244 @@
// Auto-generated file - do not edit manually
// Generated by scripts/generate-docs.ts
// Maps block types to their icon component references
import type { ComponentType, SVGProps } from 'react'
import {
AhrefsIcon,
AirtableIcon,
ApifyIcon,
ApolloIcon,
ArxivIcon,
AsanaIcon,
BrainIcon,
BrowserUseIcon,
CalendlyIcon,
CirclebackIcon,
ClayIcon,
ConfluenceIcon,
CursorIcon,
DatadogIcon,
DiscordIcon,
DocumentIcon,
DropboxIcon,
DuckDuckGoIcon,
DynamoDBIcon,
ElasticsearchIcon,
ElevenLabsIcon,
ExaAIIcon,
EyeIcon,
FirecrawlIcon,
GithubIcon,
GitLabIcon,
GmailIcon,
GoogleCalendarIcon,
GoogleDocsIcon,
GoogleDriveIcon,
GoogleFormsIcon,
GoogleGroupsIcon,
GoogleIcon,
GoogleSheetsIcon,
GoogleSlidesIcon,
GoogleVaultIcon,
GrafanaIcon,
GrainIcon,
GreptileIcon,
HubspotIcon,
HuggingFaceIcon,
HunterIOIcon,
ImageIcon,
IncidentioIcon,
IntercomIcon,
JinaAIIcon,
JiraIcon,
JiraServiceManagementIcon,
KalshiIcon,
LinearIcon,
LinkedInIcon,
LinkupIcon,
MailchimpIcon,
MailgunIcon,
Mem0Icon,
MicrosoftExcelIcon,
MicrosoftOneDriveIcon,
MicrosoftPlannerIcon,
MicrosoftSharepointIcon,
MicrosoftTeamsIcon,
MistralIcon,
MongoDBIcon,
MySQLIcon,
Neo4jIcon,
NotionIcon,
OpenAIIcon,
OutlookIcon,
PackageSearchIcon,
ParallelIcon,
PerplexityIcon,
PineconeIcon,
PipedriveIcon,
PolymarketIcon,
PostgresIcon,
PosthogIcon,
QdrantIcon,
RDSIcon,
RedditIcon,
ResendIcon,
S3Icon,
SalesforceIcon,
SearchIcon,
SendgridIcon,
SentryIcon,
SerperIcon,
ServiceNowIcon,
SftpIcon,
ShopifyIcon,
SlackIcon,
SmtpIcon,
SpotifyIcon,
SQSIcon,
SshIcon,
STTIcon,
StagehandIcon,
StripeIcon,
SupabaseIcon,
TavilyIcon,
TelegramIcon,
TranslateIcon,
TrelloIcon,
TTSIcon,
TwilioIcon,
TypeformIcon,
VideoIcon,
WealthboxIcon,
WebflowIcon,
WhatsAppIcon,
WikipediaIcon,
WordpressIcon,
xIcon,
YouTubeIcon,
ZendeskIcon,
ZepIcon,
ZoomIcon,
} from '@/components/icons'
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
export const blockTypeToIconMap: Record<string, IconComponent> = {
ahrefs: AhrefsIcon,
airtable: AirtableIcon,
apify: ApifyIcon,
apollo: ApolloIcon,
arxiv: ArxivIcon,
asana: AsanaIcon,
browser_use: BrowserUseIcon,
calendly: CalendlyIcon,
circleback: CirclebackIcon,
clay: ClayIcon,
confluence: ConfluenceIcon,
cursor: CursorIcon,
datadog: DatadogIcon,
discord: DiscordIcon,
dropbox: DropboxIcon,
duckduckgo: DuckDuckGoIcon,
dynamodb: DynamoDBIcon,
elasticsearch: ElasticsearchIcon,
elevenlabs: ElevenLabsIcon,
exa: ExaAIIcon,
file: DocumentIcon,
firecrawl: FirecrawlIcon,
github: GithubIcon,
gitlab: GitLabIcon,
gmail: GmailIcon,
google_calendar: GoogleCalendarIcon,
google_docs: GoogleDocsIcon,
google_drive: GoogleDriveIcon,
google_forms: GoogleFormsIcon,
google_groups: GoogleGroupsIcon,
google_search: GoogleIcon,
google_sheets: GoogleSheetsIcon,
google_slides: GoogleSlidesIcon,
google_vault: GoogleVaultIcon,
grafana: GrafanaIcon,
grain: GrainIcon,
greptile: GreptileIcon,
hubspot: HubspotIcon,
huggingface: HuggingFaceIcon,
hunter: HunterIOIcon,
image_generator: ImageIcon,
incidentio: IncidentioIcon,
intercom: IntercomIcon,
jina: JinaAIIcon,
jira: JiraIcon,
jira_service_management: JiraServiceManagementIcon,
kalshi: KalshiIcon,
knowledge: PackageSearchIcon,
linear: LinearIcon,
linkedin: LinkedInIcon,
linkup: LinkupIcon,
mailchimp: MailchimpIcon,
mailgun: MailgunIcon,
mem0: Mem0Icon,
memory: BrainIcon,
microsoft_excel: MicrosoftExcelIcon,
microsoft_planner: MicrosoftPlannerIcon,
microsoft_teams: MicrosoftTeamsIcon,
mistral_parse: MistralIcon,
mongodb: MongoDBIcon,
mysql: MySQLIcon,
neo4j: Neo4jIcon,
notion: NotionIcon,
onedrive: MicrosoftOneDriveIcon,
openai: OpenAIIcon,
outlook: OutlookIcon,
parallel_ai: ParallelIcon,
perplexity: PerplexityIcon,
pinecone: PineconeIcon,
pipedrive: PipedriveIcon,
polymarket: PolymarketIcon,
postgresql: PostgresIcon,
posthog: PosthogIcon,
qdrant: QdrantIcon,
rds: RDSIcon,
reddit: RedditIcon,
resend: ResendIcon,
s3: S3Icon,
salesforce: SalesforceIcon,
search: SearchIcon,
sendgrid: SendgridIcon,
sentry: SentryIcon,
serper: SerperIcon,
servicenow: ServiceNowIcon,
sftp: SftpIcon,
sharepoint: MicrosoftSharepointIcon,
shopify: ShopifyIcon,
slack: SlackIcon,
smtp: SmtpIcon,
spotify: SpotifyIcon,
sqs: SQSIcon,
ssh: SshIcon,
stagehand: StagehandIcon,
stripe: StripeIcon,
stt: STTIcon,
supabase: SupabaseIcon,
tavily: TavilyIcon,
telegram: TelegramIcon,
thinking: BrainIcon,
translate: TranslateIcon,
trello: TrelloIcon,
tts: TTSIcon,
twilio_sms: TwilioIcon,
twilio_voice: TwilioIcon,
typeform: TypeformIcon,
video_generator: VideoIcon,
vision: EyeIcon,
wealthbox: WealthboxIcon,
webflow: WebflowIcon,
whatsapp: WhatsAppIcon,
wikipedia: WikipediaIcon,
wordpress: WordpressIcon,
x: xIcon,
youtube: YouTubeIcon,
zendesk: ZendeskIcon,
zep: ZepIcon,
zoom: ZoomIcon,
}

View File

@@ -2,8 +2,8 @@
import { useState } from 'react'
import NextImage, { type ImageProps as NextImageProps } from 'next/image'
import { Lightbox } from '@/components/ui/lightbox'
import { cn } from '@/lib/utils'
import { Lightbox } from './lightbox'
interface ImageProps extends Omit<NextImageProps, 'className'> {
className?: string

View File

@@ -1,7 +1,7 @@
'use client'
import { useEffect, useState } from 'react'
import { Check, ChevronDown } from 'lucide-react'
import { Check, ChevronRight } from 'lucide-react'
import { useParams, usePathname, useRouter } from 'next/navigation'
const languages = {
@@ -82,15 +82,14 @@ export function LanguageDropdown() {
aria-haspopup='listbox'
aria-expanded={isOpen}
aria-controls='language-menu'
className='flex items-center gap-1.5 rounded-lg border border-border/30 bg-muted/40 px-2.5 py-1.5 text-sm shadow-sm backdrop-blur-sm transition-colors hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring'
className='flex cursor-pointer items-center gap-1.5 rounded-xl px-3 py-2 font-normal text-[0.9375rem] text-foreground/60 leading-[1.4] transition-colors hover:bg-foreground/8 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring'
style={{
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
}}
>
<span className='text-sm'>{languages[currentLang as keyof typeof languages]?.flag}</span>
<span className='font-medium text-foreground'>
{languages[currentLang as keyof typeof languages]?.name}
</span>
<ChevronDown
className={`h-3 w-3 text-muted-foreground transition-transform ${isOpen ? 'rotate-180' : ''}`}
/>
<span>{languages[currentLang as keyof typeof languages]?.name}</span>
<ChevronRight className='h-3.5 w-3.5' />
</button>
{isOpen && (
@@ -99,7 +98,7 @@ export function LanguageDropdown() {
<div
id='language-menu'
role='listbox'
className='absolute top-full left-0 z-[1001] mt-1 max-h-[75vh] w-56 overflow-auto rounded-xl border border-border/50 bg-white shadow-2xl md:w-44 md:bg-background/95 md:backdrop-blur-md dark:bg-neutral-950 md:dark:bg-background/95'
className='absolute top-full right-0 z-[1001] mt-1 max-h-[75vh] w-56 overflow-auto rounded-xl border border-border/50 bg-white shadow-2xl md:w-44 md:bg-background/95 md:backdrop-blur-md dark:bg-neutral-950 md:dark:bg-background/95'
>
{Object.entries(languages).map(([code, lang]) => (
<button
@@ -111,7 +110,7 @@ export function LanguageDropdown() {
}}
role='option'
aria-selected={currentLang === code}
className={`flex w-full items-center gap-3 px-3 py-3 text-base transition-colors first:rounded-t-xl last:rounded-b-xl hover:bg-muted/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring md:gap-2 md:px-2.5 md:py-2 md:text-sm ${
className={`flex w-full cursor-pointer items-center gap-3 px-3 py-3 text-base transition-colors first:rounded-t-xl last:rounded-b-xl hover:bg-muted/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring md:gap-2 md:px-2.5 md:py-2 md:text-sm ${
currentLang === code ? 'bg-muted/60 font-medium text-primary' : 'text-foreground'
}`}
>

View File

@@ -1,7 +1,7 @@
'use client'
import { useEffect, useRef } from 'react'
import { getVideoUrl } from '@/lib/utils'
import { getAssetUrl } from '@/lib/utils'
interface LightboxProps {
isOpen: boolean
@@ -60,7 +60,7 @@ export function Lightbox({ isOpen, onClose, src, alt, type }: LightboxProps) {
/>
) : (
<video
src={getVideoUrl(src)}
src={getAssetUrl(src)}
autoPlay
loop
muted

View File

@@ -0,0 +1,38 @@
'use client'
import { Search } from 'lucide-react'
export function SearchTrigger() {
const handleClick = () => {
const event = new KeyboardEvent('keydown', {
key: 'k',
metaKey: true,
bubbles: true,
})
document.dispatchEvent(event)
}
return (
<button
type='button'
className='flex h-10 w-[460px] cursor-pointer items-center gap-2 rounded-xl border border-border/50 px-3 py-2 text-sm backdrop-blur-xl transition-colors hover:border-border'
style={{
backgroundColor: 'hsla(0, 0%, 5%, 0.85)',
backdropFilter: 'blur(33px) saturate(180%)',
WebkitBackdropFilter: 'blur(33px) saturate(180%)',
color: 'rgba(255, 255, 255, 0.6)',
}}
onClick={handleClick}
>
<Search className='h-4 w-4' />
<span>Search...</span>
<kbd
className='ml-auto flex items-center gap-0.5 font-medium'
style={{ color: 'rgba(255, 255, 255, 0.6)' }}
>
<span style={{ fontSize: '15px', lineHeight: '1' }}></span>
<span style={{ fontSize: '13px', lineHeight: '1' }}>K</span>
</kbd>
</button>
)
}

View File

@@ -0,0 +1,32 @@
'use client'
import { useEffect, useState } from 'react'
import { Moon, Sun } from 'lucide-react'
import { useTheme } from 'next-themes'
export function ThemeToggle() {
const { theme, setTheme } = useTheme()
const [mounted, setMounted] = useState(false)
useEffect(() => {
setMounted(true)
}, [])
if (!mounted) {
return (
<button className='flex cursor-pointer items-center justify-center rounded-md p-1 text-muted-foreground'>
<Moon className='h-4 w-4' />
</button>
)
}
return (
<button
onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
className='flex cursor-pointer items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:text-foreground'
aria-label='Toggle theme'
>
{theme === 'dark' ? <Moon className='h-4 w-4' /> : <Sun className='h-4 w-4' />}
</button>
)
}

View File

@@ -1,7 +1,7 @@
'use client'
import { useState } from 'react'
import { getVideoUrl } from '@/lib/utils'
import { getAssetUrl } from '@/lib/utils'
import { Lightbox } from './lightbox'
interface VideoProps {
@@ -39,7 +39,7 @@ export function Video({
muted={muted}
playsInline={playsInline}
className={`${className} ${enableLightbox ? 'cursor-pointer transition-opacity hover:opacity-90' : ''}`}
src={getVideoUrl(src)}
src={getAssetUrl(src)}
onClick={handleVideoClick}
/>

View File

@@ -3,12 +3,10 @@ title: Agent
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Der Agent-Block dient als Schnittstelle zwischen Ihrem Workflow und Large Language Models (LLMs). Er führt Inferenzanfragen an verschiedene KI-Anbieter aus, verarbeitet natürlichsprachliche Eingaben gemäß definierten Anweisungen und erzeugt strukturierte oder unstrukturierte Ausgaben für die nachgelagerte Verarbeitung.
Der Agent-Block verbindet deinen Workflow mit Large Language Models (LLMs). Er verarbeitet natürlichsprachliche Eingaben, ruft externe Tools auf und generiert strukturierte oder unstrukturierte Ausgaben.
<div className="flex justify-center">
<Image
@@ -18,26 +16,7 @@ Der Agent-Block dient als Schnittstelle zwischen Ihrem Workflow und Large Langua
height={400}
className="my-6"
/>
</div>
## Überblick
Der Agent-Block ermöglicht Ihnen:
<Steps>
<Step>
<strong>Natürliche Sprache verarbeiten</strong>: Benutzereingaben analysieren und kontextbezogene Antworten generieren
</Step>
<Step>
<strong>KI-gestützte Aufgaben ausführen</strong>: Inhaltsanalyse, -erstellung und Entscheidungsfindung durchführen
</Step>
<Step>
<strong>Externe Tools aufrufen</strong>: Während der Verarbeitung auf APIs, Datenbanken und Dienste zugreifen
</Step>
<Step>
<strong>Strukturierte Ausgabe erzeugen</strong>: JSON-Daten zurückgeben, die Ihren Schema-Anforderungen entsprechen
</Step>
</Steps>
</div>
## Konfigurationsoptionen
@@ -57,44 +36,25 @@ Der Benutzer-Prompt stellt die primären Eingabedaten für die Inferenzverarbeit
- **Statische Konfiguration**: Direkte Texteingabe, die in der Block-Konfiguration angegeben ist
- **Dynamische Eingabe**: Daten, die von vorgelagerten Blöcken über Verbindungsschnittstellen übergeben werden
- **Laufzeitgenerierung**: Programmatisch erzeugte Inhalte während der Workflow-Ausführung
- **Laufzeitgenerierung**: Programmatisch generierte Inhalte während der Workflow-Ausführung
### Modellauswahl
Der Agent-Block unterstützt mehrere LLM-Anbieter über eine einheitliche Inferenzschnittstelle. Verfügbare Modelle umfassen:
**OpenAI-Modelle**: GPT-5, GPT-4o, o1, o3, o4-mini, gpt-4.1 (API-basierte Inferenz)
**Anthropic-Modelle**: Claude 3.7 Sonnet (API-basierte Inferenz)
**Google-Modelle**: Gemini 2.5 Pro, Gemini 2.0 Flash (API-basierte Inferenz)
**Alternative Anbieter**: Groq, Cerebras, xAI, DeepSeek (API-basierte Inferenz)
**Lokale Bereitstellung**: Ollama-kompatible Modelle (selbst gehostete Inferenz)
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="models.mp4" width={500} height={350} />
</div>
- **OpenAI**: GPT-5.1, GPT-5, GPT-4o, o1, o3, o4-mini, gpt-4.1
- **Anthropic**: Claude 4.5 Sonnet, Claude Opus 4.1
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, Azure OpenAI, OpenRouter
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle
### Temperatur
Steuern Sie die Kreativität und Zufälligkeit der Antworten:
Steuert die Zufälligkeit und Kreativität der Antworten:
<Tabs items={['Niedrig (0-0,3)', 'Mittel (0,3-0,7)', 'Hoch (0,7-2,0)']}>
<Tab>
Deterministische, fokussierte Antworten. Am besten für faktische Aufgaben, Kundensupport und
Situationen, in denen Genauigkeit entscheidend ist.
</Tab>
<Tab>
Ausgewogene Kreativität und Fokus. Geeignet für allgemeine Anwendungen, die sowohl
Genauigkeit als auch etwas Kreativität erfordern.
</Tab>
<Tab>
Kreativere, abwechslungsreichere Antworten. Ideal für kreatives Schreiben, Brainstorming und das Generieren
vielfältiger Ideen.
</Tab>
</Tabs>
<div className="mt-4 text-sm text-gray-600 dark:text-gray-400">
Der Temperaturbereich (0-1 oder 0-2) variiert je nach ausgewähltem Modell.
</div>
- **Niedrig (0-0,3)**: Deterministisch und fokussiert. Am besten für faktische Aufgaben und Genauigkeit.
- **Mittel (0,3-0,7)**: Ausgewogene Kreativität und Fokus. Gut für allgemeine Verwendung.
- **Hoch (0,7-2,0)**: Kreativ und abwechslungsreich. Ideal für Brainstorming und Content-Generierung.
### API-Schlüssel
@@ -102,179 +62,93 @@ Ihr API-Schlüssel für den ausgewählten LLM-Anbieter. Dieser wird sicher gespe
### Tools
Tools erweitern die Fähigkeiten des Agenten durch externe API-Integrationen und Service-Verbindungen. Das Tool-System ermöglicht Funktionsaufrufe, sodass der Agent Operationen über die Texterstellung hinaus ausführen kann.
Erweitern Sie die Fähigkeiten des Agenten mit externen Integrationen. Wählen Sie aus über 60 vorgefertigten Tools oder definieren Sie benutzerdefinierte Funktionen.
**Tool-Integrationsprozess**:
1. Zugriff auf den Tools-Konfigurationsbereich innerhalb des Agent-Blocks
2. Auswahl aus über 60 vorgefertigten Integrationen oder Definition benutzerdefinierter Funktionen
3. Konfiguration von Authentifizierungsparametern und Betriebseinschränkungen
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="tools.mp4" width={500} height={350} />
</div>
**Verfügbare Tool-Kategorien**:
**Verfügbare Kategorien:**
- **Kommunikation**: Gmail, Slack, Telegram, WhatsApp, Microsoft Teams
- **Datenquellen**: Notion, Google Sheets, Airtable, Supabase, Pinecone
- **Webdienste**: Firecrawl, Google Search, Exa AI, Browser-Automatisierung
- **Entwicklung**: GitHub, Jira, Linear Repository- und Issue-Management
- **Entwicklung**: GitHub, Jira, Linear
- **KI-Dienste**: OpenAI, Perplexity, Hugging Face, ElevenLabs
**Steuerung der Tool-Ausführung**:
- **Auto**: Modell bestimmt Tool-Aufruf basierend auf Kontext und Notwendigkeit
- **Required**: Tool muss bei jeder Inferenzanfrage aufgerufen werden
- **None**: Tool-Definition verfügbar, aber vom Modellkontext ausgeschlossen
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="granular-tool-control.mp4" width={500} height={350} />
</div>
**Ausführungsmodi:**
- **Auto**: Modell entscheidet kontextbasiert, wann Tools verwendet werden
- **Erforderlich**: Tool muss bei jeder Anfrage aufgerufen werden
- **Keine**: Tool verfügbar, aber dem Modell nicht vorgeschlagen
### Antwortformat
Der Parameter für das Antwortformat erzwingt eine strukturierte Ausgabegenerierung durch JSON-Schema-Validierung. Dies gewährleistet konsistente, maschinenlesbare Antworten, die vordefinierten Datenstrukturen entsprechen:
Der Parameter für das Antwortformat erzwingt die Generierung strukturierter Ausgaben durch JSON-Schema-Validierung. Dies gewährleistet konsistente, maschinenlesbare Antworten, die vordefinierten Datenstrukturen entsprechen:
```json
{
"name": "user_analysis",
"schema": {
"type": "object",
"properties": {
"sentiment": {
"type": "string",
"enum": ["positive", "negative", "neutral"]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
"type": "object",
"properties": {
"sentiment": {
"type": "string",
"enum": ["positive", "neutral", "negative"]
},
"required": ["sentiment", "confidence"]
}
"summary": {
"type": "string",
"description": "Brief summary of the content"
}
},
"required": ["sentiment", "summary"]
}
```
Diese Konfiguration beschränkt die Ausgabe des Modells auf die Einhaltung des angegebenen Schemas, verhindert Freitext-Antworten und stellt eine strukturierte Datengenerierung sicher.
Diese Konfiguration beschränkt die Ausgabe des Modells auf die Einhaltung des angegebenen Schemas, verhindert Freitextantworten und stellt die Generierung strukturierter Daten sicher.
### Zugriff auf Ergebnisse
Nach Abschluss eines Agenten können Sie auf seine Ausgaben zugreifen:
- **`<agent.content>`**: Der Antworttext oder die strukturierten Daten des Agenten
- **`<agent.tokens>`**: Token-Nutzungsstatistiken (Prompt, Completion, Gesamt)
- **`<agent.tool_calls>`**: Details zu allen Tools, die der Agent während der Ausführung verwendet hat
- **`<agent.cost>`**: Geschätzte Kosten des API-Aufrufs (falls verfügbar)
- **response**: Der Antworttext oder die strukturierten Daten des Agenten
- **usage**: Token-Nutzungsstatistiken (Prompt, Completion, Gesamt)
- **toolExecutions**: Details zu allen Tools, die der Agent während der Ausführung verwendet hat
- **estimatedCost**: Geschätzte Kosten des API-Aufrufs (falls verfügbar)
## Erweiterte Funktionen
### Memory + Agent: Gesprächsverlauf
Verwenden Sie einen `Memory`Block mit einer konsistenten `id` (zum Beispiel `chat`), um Nachrichten zwischen Durchläufen zu speichern und diesen Verlauf in den Prompt des Agenten einzubeziehen.
Verwenden Sie einen memory Block mit einer konsistenten memoryId (zum Beispiel, conversationHistory), um Nachrichten zwischen Durchläufen zu speichern und diesen Verlauf in den Prompt des Agenten einzubeziehen.
- Fügen Sie die Nachricht des Benutzers vor dem Agenten hinzu
- Lesen Sie den Gesprächsverlauf für den Kontext
- Hängen Sie die Antwort des Agenten nach dessen Ausführung an
Siehe die [`Memory`](/tools/memory) Blockreferenz für Details.
Siehe den [`Memory`](/tools/memory) Blockverweis für Details.
## Eingaben und Ausgaben
## Ausgaben
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>System-Prompt</strong>: Anweisungen, die das Verhalten und die Rolle des Agenten definieren
</li>
<li>
<strong>Benutzer-Prompt</strong>: Eingabetext oder zu verarbeitende Daten
</li>
<li>
<strong>Modell</strong>: KI-Modellauswahl (OpenAI, Anthropic, Google, usw.)
</li>
<li>
<strong>Temperatur</strong>: Steuerung der Zufälligkeit der Antwort (0-2)
</li>
<li>
<strong>Tools</strong>: Array verfügbarer Tools für Funktionsaufrufe
</li>
<li>
<strong>Antwortformat</strong>: JSON-Schema für strukturierte Ausgabe
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>agent.content</strong>: Antworttext oder strukturierte Daten des Agenten
</li>
<li>
<strong>agent.tokens</strong>: Token-Nutzungsstatistik-Objekt
</li>
<li>
<strong>agent.tool_calls</strong>: Array mit Details zur Tool-Ausführung
</li>
<li>
<strong>agent.cost</strong>: Geschätzte API-Aufrufkosten (falls verfügbar)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Content</strong>: Primäre Antwortausgabe vom Agenten
</li>
<li>
<strong>Metadata</strong>: Nutzungsstatistiken und Ausführungsdetails
</li>
<li>
<strong>Access</strong>: Verfügbar in Blöcken nach dem Agenten
</li>
</ul>
</Tab>
</Tabs>
- **`<agent.content>`**: Antworttext des Agenten
- **`<agent.tokens>`**: Token-Nutzungsstatistiken
- **`<agent.tool_calls>`**: Details zur Tool-Ausführung
- **`<agent.cost>`**: Geschätzte Kosten des API-Aufrufs
## Beispielanwendungsfälle
### Automatisierung des Kundenservice
**Automatisierung des Kundenservice** - Bearbeitung von Anfragen mit Datenbank- und Tool-Zugriff
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Bearbeitung von Kundenanfragen mit Datenbankzugriff</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Benutzer reicht ein Support-Ticket über den API-Block ein</li>
<li>Agent prüft Bestellungen/Abonnements in Postgres und durchsucht die Wissensdatenbank nach Anleitungen</li>
<li>Falls eine Eskalation erforderlich ist, erstellt der Agent ein Linear-Ticket mit relevantem Kontext</li>
<li>Agent erstellt eine klare E-Mail-Antwort</li>
<li>Gmail sendet die Antwort an den Kunden</li>
<li>Konversation wird im Memory gespeichert, um den Verlauf für zukünftige Nachrichten beizubehalten</li>
</ol>
</div>
```
API (Ticket) → Agent (Postgres, KB, Linear) → Gmail (Reply) → Memory (Save)
```
### Multi-Modell-Inhaltsanalyse
**Multi-Modell-Inhaltsanalyse** - Analyse von Inhalten mit verschiedenen KI-Modellen
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Analyse von Inhalten mit verschiedenen KI-Modellen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Funktionsblock verarbeitet hochgeladenes Dokument</li>
<li>Agent mit GPT-4o führt technische Analyse durch</li>
<li>Agent mit Claude analysiert Stimmung und Tonfall</li>
<li>Funktionsblock kombiniert Ergebnisse für den Abschlussbericht</li>
</ol>
</div>
```
Function (Process) → Agent (GPT-4o Technical) → Agent (Claude Sentiment) → Function (Report)
```
### Werkzeuggestützter Forschungsassistent
**Tool-gestützter Rechercheassistent** - Recherche mit Websuche und Dokumentenzugriff
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Forschungsassistent mit Websuche und Dokumentenzugriff</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Benutzeranfrage über Eingabe erhalten</li>
<li>Agent durchsucht das Web mit dem Google-Suchwerkzeug</li>
<li>Agent greift auf Notion-Datenbank für interne Dokumente zu</li>
<li>Agent erstellt umfassenden Forschungsbericht</li>
</ol>
</div>
```
Input → Agent (Google Search, Notion) → Function (Compile Report)
```
## Bewährte Praktiken
- **Sei spezifisch in System-Prompts**: Definiere die Rolle, den Ton und die Einschränkungen des Agenten klar. Je spezifischer deine Anweisungen sind, desto besser kann der Agent seinen vorgesehenen Zweck erfüllen.
- **Wähle die richtige Temperatureinstellung**: Verwende niedrigere Temperatureinstellungen (0-0,3), wenn Genauigkeit wichtig ist, oder erhöhe die Temperatur (0,7-2,0) für kreativere oder abwechslungsreichere Antworten
- **Nutze Werkzeuge effektiv**: Integriere Werkzeuge, die den Zweck des Agenten ergänzen und seine Fähigkeiten verbessern. Sei selektiv bei der Auswahl der Werkzeuge, um den Agenten nicht zu überfordern. Für Aufgaben mit wenig Überschneidung verwende einen anderen Agent-Block für die besten Ergebnisse.
- **Wähle die richtige Temperatureinstellung**: Verwende niedrigere Temperatureinstellungen (0-0,3), wenn Genauigkeit wichtig ist, oder erhöhe die Temperatur (0,7-2,0) für kreativere oder vielfältigere Antworten
- **Nutze Tools effektiv**: Integriere Tools, die den Zweck des Agenten ergänzen und seine Fähigkeiten erweitern. Sei selektiv bei der Auswahl der Tools, um den Agenten nicht zu überfordern. Für Aufgaben mit wenig Überschneidung verwende einen anderen Agent-Block für die besten Ergebnisse.

View File

@@ -3,11 +3,10 @@ title: API
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der API-Block ermöglicht es Ihnen, Ihren Workflow über API-Endpunkte mit externen Diensten zu verbinden, indem HTTP-Anfragen verwendet werden. Er unterstützt verschiedene Methoden wie GET, POST, PUT, DELETE und PATCH, wodurch Sie mit praktisch jedem API-Endpunkt interagieren können.
Der API-Block verbindet Ihren Workflow mit externen Diensten durch HTTP-Anfragen. Unterstützt GET, POST, PUT, DELETE und PATCH Methoden für die Interaktion mit REST-APIs.
<div className="flex justify-center">
<Image
@@ -19,39 +18,11 @@ Der API-Block ermöglicht es Ihnen, Ihren Workflow über API-Endpunkte mit exter
/>
</div>
## Überblick
Der API-Block ermöglicht Ihnen:
<Steps>
<Step>
<strong>Verbindung zu externen Diensten</strong>: HTTP-Anfragen an REST-APIs und Webdienste stellen
</Step>
<Step>
<strong>Daten senden und empfangen</strong>: Antworten verarbeiten und Daten aus externen Quellen transformieren
</Step>
<Step>
<strong>Integration von Drittanbieter-Plattformen</strong>: Verbindung mit Diensten wie Stripe, Slack oder benutzerdefinierten APIs
</Step>
<Step>
<strong>Authentifizierung verwalten</strong>: Unterstützung verschiedener Authentifizierungsmethoden einschließlich Bearer-Tokens und API-Schlüssel
</Step>
</Steps>
## Funktionsweise
Der API-Block verarbeitet HTTP-Anfragen durch einen strukturierten Ansatz:
1. **Anfrage konfigurieren** - URL, Methode, Header und Body-Parameter festlegen
2. **Anfrage ausführen** - HTTP-Anfrage an den angegebenen Endpunkt senden
3. **Antwort verarbeiten** - Antwortdaten, Statuscodes und Header verarbeiten
4. **Fehlerbehandlung** - Timeouts, Wiederholungsversuche und Fehlerbedingungen verwalten
## Konfigurationsoptionen
### URL
Die Endpunkt-URL für die API-Anfrage. Dies kann sein:
Die Endpunkt-URL für die API-Anfrage. Diese kann sein:
- Eine statische URL, die direkt im Block eingegeben wird
- Eine dynamische URL, die mit der Ausgabe eines anderen Blocks verbunden ist
@@ -79,7 +50,7 @@ Key: limit
Value: 10
```
Diese würden der URL als `?apiKey=your_api_key_here&limit=10` hinzugefügt werden.
Diese würden der URL als `?apiKey=your_api_key_here&limit=10` hinzugefügt.
### Header
@@ -93,13 +64,13 @@ Key: Authorization
Value: Bearer your_token_here
```
### Anfrage-Body
### Anfragekörper
Für Methoden, die einen Anfrage-Body unterstützen (POST, PUT, PATCH), können Sie die zu sendenden Daten definieren. Der Body kann sein:
Für Methoden, die einen Anfragekörper unterstützen (POST, PUT, PATCH), können Sie die zu sendenden Daten definieren. Der Körper kann sein:
- JSON-Daten, die direkt im Block eingegeben werden
- Daten, die mit der Ausgabe eines anderen Blocks verbunden sind
- Dynamisch während der Workflow-Ausführung generierte Daten
- Dynamisch während der Workflow-Ausführung generiert
### Zugriff auf Ergebnisse
@@ -114,7 +85,7 @@ Nach Abschluss einer API-Anfrage können Sie auf folgende Ausgaben zugreifen:
### Dynamische URL-Konstruktion
Bauen Sie URLs dynamisch mit Variablen aus vorherigen Blöcken:
Erstellen Sie URLs dynamisch mit Variablen aus vorherigen Blöcken:
```javascript
// In a Function block before the API
@@ -124,9 +95,9 @@ const apiUrl = `https://api.example.com/users/${userId}/profile`;
### Anfrage-Wiederholungen
Der API-Block behandelt automatisch:
Der API-Block verarbeitet automatisch:
- Netzwerk-Timeouts mit exponentiellem Backoff
- Rate-Limit-Antworten (429-Statuscodes)
- Antworten bei Ratenbegrenzung (429-Statuscodes)
- Serverfehler (5xx-Statuscodes) mit Wiederholungslogik
- Verbindungsfehler mit Wiederverbindungsversuchen
@@ -145,88 +116,30 @@ if (<api.status> === 200) {
}
```
## Eingaben und Ausgaben
## Ausgaben
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>URL</strong>: Der Endpunkt, an den die Anfrage gesendet werden soll
</li>
<li>
<strong>Method</strong>: HTTP-Methode (GET, POST, PUT, DELETE, PATCH)
</li>
<li>
<strong>Query Parameters</strong>: Schlüssel-Wert-Paare für URL-Parameter
</li>
<li>
<strong>Headers</strong>: HTTP-Header für Authentifizierung und Inhaltstyp
</li>
<li>
<strong>Body</strong>: Anfrage-Payload für POST/PUT/PATCH-Methoden
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>api.data</strong>: Antwortdaten vom API-Aufruf
</li>
<li>
<strong>api.status</strong>: Vom Server zurückgegebener HTTP-Statuscode
</li>
<li>
<strong>api.headers</strong>: Antwort-Header vom Server
</li>
<li>
<strong>api.error</strong>: Fehlerdetails, falls die Anfrage fehlgeschlagen ist
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Response Data</strong>: Primärer API-Antwortinhalt
</li>
<li>
<strong>Status Information</strong>: HTTP-Status und Fehlerdetails
</li>
<li>
<strong>Access</strong>: Verfügbar in Blöcken nach dem API-Aufruf
</li>
</ul>
</Tab>
</Tabs>
- **`<api.data>`**: Antwortdaten vom API
- **`<api.status>`**: HTTP-Statuscode
- **`<api.headers>`**: Antwort-Header
- **`<api.error>`**: Fehlerdetails bei fehlgeschlagener Anfrage
## Beispielanwendungsfälle
## Anwendungsbeispiele
### Benutzerprofildaten abrufen
**Benutzerprofildaten abrufen** - Benutzerinformationen von externem Dienst abrufen
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Benutzerinformationen von externem Dienst abrufen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Funktionsblock erstellt Benutzer-ID aus Eingabe</li>
<li>API-Block ruft GET /users/&#123;id&#125; Endpunkt auf</li>
<li>Funktionsblock verarbeitet und formatiert Benutzerdaten</li>
<li>Antwortblock gibt formatiertes Profil zurück</li>
</ol>
</div>
```
Function (Build ID) → API (GET /users/{id}) → Function (Format) → Response
```
### Zahlungsabwicklung
**Zahlungsabwicklung** - Zahlung über die Stripe-API verarbeiten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Zahlung über Stripe API verarbeiten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Funktionsblock validiert Zahlungsdaten</li>
<li>API-Block erstellt Zahlungsabsicht über Stripe</li>
<li>Bedingungsblock behandelt Zahlungserfolg/-fehler</li>
<li>Supabase-Block aktualisiert Bestellstatus in der Datenbank</li>
</ol>
</div>
```
Function (Validate) → API (Stripe) → Condition (Success) → Supabase (Update)
```
## Best Practices
## Bewährte Praktiken
- **Umgebungsvariablen für sensible Daten verwenden**: Keine API-Schlüssel oder Anmeldedaten im Code hinterlegen
- **Umgebungsvariablen für sensible Daten verwenden**: Keine API-Schlüssel oder Anmeldedaten im Code festlegen
- **Fehler elegant behandeln**: Fehlerbehandlungslogik für fehlgeschlagene Anfragen einbinden
- **Antworten validieren**: Statuscodes und Antwortformate vor der Datenverarbeitung prüfen
- **Ratenbegrenzungen beachten**: Auf API-Ratenbegrenzungen achten und angemessene Drosselung implementieren
- **Antworten validieren**: Statuscode und Antwortformate vor der Datenverarbeitung prüfen
- **Ratenbegrenzungen respektieren**: Achten Sie auf API-Ratenbegrenzungen und implementieren Sie angemessene Drosselung

View File

@@ -3,64 +3,29 @@ title: Bedingung
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { Image } from '@/components/ui/image'
Der Bedingungsblock ermöglicht es Ihnen, den Ausführungspfad Ihres Workflows basierend auf booleschen Ausdrücken zu verzweigen und so dynamische, reaktionsfähige Workflows mit unterschiedlichen Ausführungspfaden zu erstellen. Er wertet Bedingungen aus und leitet den Workflow entsprechend weiter, sodass Sie den Ausführungsfluss basierend auf Daten oder Logik steuern können, ohne ein LLM zu benötigen.
Der Bedingungsblock verzweigt die Workflow-Ausführung basierend auf booleschen Ausdrücken. Bewerten Sie Bedingungen anhand vorheriger Block-Ausgaben und leiten Sie zu verschiedenen Pfaden weiter, ohne dass ein LLM erforderlich ist.
<div className="flex justify-center">
<Image
src="/static/blocks/condition.png"
alt="Bedingungsblock"
width={500}
height={350}
height={400}
className="my-6"
/>
</div>
<Callout>
Bedingungsblöcke ermöglichen deterministische Entscheidungsfindung ohne ein LLM zu benötigen, was sie ideal
für unkomplizierte Verzweigungslogik macht.
</Callout>
## Überblick
Der Bedingungsblock ermöglicht Ihnen:
<Steps>
<Step>
<strong>Verzweigungslogik erstellen</strong>: Workflows basierend auf booleschen Ausdrücken leiten
</Step>
<Step>
<strong>Datengesteuerte Entscheidungen treffen</strong>: Bedingungen anhand von Ausgaben vorheriger Blöcke auswerten
</Step>
<Step>
<strong>Mehrere Szenarien behandeln</strong>: Mehrere Bedingungen mit unterschiedlichen Pfaden definieren
</Step>
<Step>
<strong>Deterministische Weiterleitung bieten</strong>: Entscheidungen ohne ein LLM treffen
</Step>
</Steps>
## Funktionsweise
Der Bedingungsblock arbeitet durch einen sequentiellen Auswertungsprozess:
1. **Ausdruck auswerten** - Verarbeitet den JavaScript/TypeScript-booleschen Ausdruck mit aktuellen Workflow-Daten
2. **Ergebnis bestimmen** - Gibt basierend auf der Ausdrucksauswertung true oder false zurück
3. **Workflow weiterleiten** - Leitet die Ausführung basierend auf dem Ergebnis an den entsprechenden Zielblock weiter
4. **Kontext bereitstellen** - Generiert Metadaten über die Entscheidung für Debugging und Überwachung
## Konfigurationsoptionen
### Bedingungen
Definieren Sie eine oder mehrere Bedingungen, die ausgewertet werden. Jede Bedingung umfasst:
- **Ausdruck**: Ein JavaScript/TypeScript-Ausdruck, der zu true oder false ausgewertet wird
- **Pfad**: Der Zielblock, zu dem weitergeleitet werden soll, wenn die Bedingung true ist
- **Ausdruck**: Ein JavaScript/TypeScript-Ausdruck, der zu wahr oder falsch ausgewertet wird
- **Pfad**: Der Zielblock, zu dem weitergeleitet werden soll, wenn die Bedingung wahr ist
- **Beschreibung**: Optionale Erklärung, was die Bedingung prüft
Sie können mehrere Bedingungen erstellen, die der Reihe nach ausgewertet werden, wobei die erste übereinstimmende Bedingung den Ausführungspfad bestimmt.
@@ -100,10 +65,10 @@ Bedingungen verwenden JavaScript-Syntax und können auf Eingabewerte aus vorheri
Nach der Auswertung einer Bedingung können Sie auf folgende Ausgaben zugreifen:
- **`<condition.result>`**: Boolesches Ergebnis der Bedingungsauswertung
- **`<condition.matched_condition>`**: ID der übereinstimmenden Bedingung
- **`<condition.content>`**: Beschreibung des Auswertungsergebnisses
- **`<condition.path>`**: Details zum gewählten Routing-Ziel
- **condition.result**: Boolesches Ergebnis der Bedingungsauswertung
- **condition.matched_condition**: ID der übereinstimmenden Bedingung
- **condition.content**: Beschreibung des Auswertungsergebnisses
- **condition.path**: Details zum gewählten Routing-Ziel
## Erweiterte Funktionen
@@ -148,95 +113,37 @@ Bedingungen behandeln automatisch:
- Ungültige Ausdrücke mit Fehlerprotokollierung
- Fehlende Variablen mit Standardwerten
## Eingaben und Ausgaben
## Ausgaben
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Bedingungen</strong>: Array von booleschen Ausdrücken zur Auswertung
</li>
<li>
<strong>Ausdrücke</strong>: JavaScript/TypeScript-Bedingungen mit Block-Ausgaben
</li>
<li>
<strong>Routing-Pfade</strong>: Zielblöcke für jedes Bedingungsergebnis
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>condition.result</strong>: Boolesches Ergebnis der Bedingungsauswertung
</li>
<li>
<strong>condition.matched_condition</strong>: ID der übereinstimmenden Bedingung
</li>
<li>
<strong>condition.content</strong>: Beschreibung des Auswertungsergebnisses
</li>
<li>
<strong>condition.path</strong>: Details zum gewählten Routing-Ziel
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Boolesches Ergebnis</strong>: Primäres Ergebnis der Bedingungsauswertung
</li>
<li>
<strong>Routing-Informationen</strong>: Pfadauswahl und Bedingungsdetails
</li>
<li>
<strong>Zugriff</strong>: Verfügbar in Blöcken nach der Bedingung
</li>
</ul>
</Tab>
</Tabs>
- **`<condition.result>`**: Boolesches Ergebnis der Auswertung
- **`<condition.matched_condition>`**: ID der übereinstimmenden Bedingung
- **`<condition.content>`**: Beschreibung des Auswertungsergebnisses
- **`<condition.path>`**: Details zum gewählten Routing-Ziel
## Beispielanwendungsfälle
### Routing im Kundenservice
**Kundenservice-Routing** - Tickets basierend auf Priorität weiterleiten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Support-Tickets nach Priorität weiterleiten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API-Block ruft Support-Ticket-Daten ab</li>
<li>Bedingung prüft, ob `<api.priority>` gleich 'high' ist</li>
<li>Tickets mit hoher Priorität → Mitarbeiter mit Eskalationswerkzeugen</li>
<li>Tickets mit normaler Priorität → Standard-Support-Mitarbeiter</li>
</ol>
</div>
```
API (Ticket) → Condition (priority === 'high') → Agent (Escalation) or Agent (Standard)
```
### Inhaltsmoderation
**Inhaltsmoderation** - Inhalte basierend auf Analysen filtern
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Inhalte basierend auf Analyseergebnissen filtern</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent analysiert nutzergenerierte Inhalte</li>
<li>Bedingung prüft, ob `<agent.toxicity_score>` > 0.7</li>
<li>Toxische Inhalte → Moderationsworkflow</li>
<li>Unbedenkliche Inhalte → Veröffentlichungsworkflow</li>
</ol>
</div>
```
Agent (Analyze) → Condition (toxicity > 0.7) → Moderation or Publish
```
### Benutzer-Onboarding-Prozess
**Benutzer-Onboarding-Ablauf** - Onboarding basierend auf Benutzertyp personalisieren
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Onboarding basierend auf Benutzertyp personalisieren</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Funktionsblock verarbeitet Benutzerregistrierungsdaten</li>
<li>Bedingung prüft, ob `<user.account_type>` === 'enterprise'</li>
<li>Unternehmensbenutzer → Erweiterter Einrichtungsworkflow</li>
<li>Einzelbenutzer → Einfacher Onboarding-Workflow</li>
</ol>
</div>
```
Function (Process) → Condition (account_type === 'enterprise') → Advanced or Simple
```
## Best Practices
## Bewährte Praktiken
- **Bedingungen richtig anordnen**: Platzieren Sie spezifischere Bedingungen vor allgemeinen, damit spezifische Logik Vorrang vor Fallbacks hat
- **Standardbedingung einfügen**: Fügen Sie eine Auffangbedingung (`true`) als letzte Bedingung hinzu, um nicht übereinstimmende Fälle zu behandeln und zu verhindern, dass die Workflow-Ausführung stecken bleibt
- **Ausdrücke einfach halten**: Verwenden Sie klare, unkomplizierte boolesche Ausdrücke für bessere Lesbarkeit und einfachere Fehlersuche
- **Bedingungen korrekt anordnen**: Platzieren Sie spezifischere Bedingungen vor allgemeinen, um sicherzustellen, dass spezifische Logik Vorrang vor Fallbacks hat
- **Verwenden Sie den Else-Zweig bei Bedarf**: Wenn keine Bedingungen übereinstimmen und der Else-Zweig nicht verbunden ist, endet der Workflow-Zweig ordnungsgemäß. Verbinden Sie den Else-Zweig, wenn Sie einen Fallback-Pfad für nicht übereinstimmende Fälle benötigen
- **Halten Sie Ausdrücke einfach**: Verwenden Sie klare, unkomplizierte boolesche Ausdrücke für bessere Lesbarkeit und einfachere Fehlersuche
- **Dokumentieren Sie Ihre Bedingungen**: Fügen Sie Beschreibungen hinzu, um den Zweck jeder Bedingung für bessere Teamzusammenarbeit und Wartung zu erklären
- **Testen Sie Grenzfälle**: Überprüfen Sie, ob Bedingungen Grenzwerte korrekt behandeln, indem Sie mit Werten an den Grenzen Ihrer Bedingungsbereiche testen

View File

@@ -3,12 +3,10 @@ title: Evaluator
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Der Evaluator-Block nutzt KI, um die Inhaltsqualität anhand anpassbarer Bewertungsmetriken zu bewerten, die du selbst definierst. Perfekt für Qualitätskontrolle, A/B-Tests und um sicherzustellen, dass deine KI-Ausgaben bestimmte Standards erfüllen.
Der Evaluator-Block nutzt KI, um die Inhaltsqualität anhand benutzerdefinierter Metriken zu bewerten. Perfekt für Qualitätskontrolle, A/B-Tests und um sicherzustellen, dass KI-Ausgaben bestimmte Standards erfüllen.
<div className="flex justify-center">
<Image
@@ -20,42 +18,14 @@ Der Evaluator-Block nutzt KI, um die Inhaltsqualität anhand anpassbarer Bewertu
/>
</div>
## Überblick
Mit dem Evaluator-Block kannst du:
<Steps>
<Step>
<strong>Inhaltsqualität bewerten</strong>: Nutze KI, um Inhalte anhand benutzerdefinierter Metriken mit numerischen Werten zu bewerten
</Step>
<Step>
<strong>Benutzerdefinierte Metriken erstellen</strong>: Erstelle spezifische Bewertungskriterien, die auf deinen Anwendungsfall zugeschnitten sind
</Step>
<Step>
<strong>Qualitätskontrolle automatisieren</strong>: Erstelle Workflows, die Inhalte automatisch bewerten und filtern
</Step>
<Step>
<strong>Leistung verfolgen</strong>: Überwache Verbesserungen und Konsistenz im Laufe der Zeit mit objektiver Bewertung
</Step>
</Steps>
## Funktionsweise
Der Evaluator-Block verarbeitet Inhalte durch KI-gestützte Bewertung:
1. **Inhalte empfangen** - Nimmt Eingabeinhalte von vorherigen Blöcken in deinem Workflow entgegen
2. **Metriken anwenden** - Bewertet Inhalte anhand deiner definierten benutzerdefinierten Metriken
3. **Bewertungen generieren** - KI-Modell weist numerische Werte für jede Metrik zu
4. **Zusammenfassung bereitstellen** - Liefert detaillierte Auswertung mit Bewertungen und Erklärungen
## Konfigurationsoptionen
### Bewertungsmetriken
Definiere benutzerdefinierte Metriken, anhand derer Inhalte bewertet werden. Jede Metrik umfasst:
Definieren Sie benutzerdefinierte Metriken, anhand derer Inhalte bewertet werden. Jede Metrik umfasst:
- **Name**: Eine kurze Bezeichnung für die Metrik
- **Beschreibung**: Eine detaillierte Erklärung dessen, was die Metrik misst
- **Beschreibung**: Eine detaillierte Erklärung, was die Metrik misst
- **Bereich**: Der numerische Bereich für die Bewertung (z.B. 1-5, 0-10)
Beispielmetriken:
@@ -78,122 +48,49 @@ Der zu bewertende Inhalt. Dies kann sein:
Wählen Sie ein KI-Modell für die Durchführung der Bewertung:
**OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1
**Anthropic**: Claude 3.7 Sonnet
**Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
**Andere Anbieter**: Groq, Cerebras, xAI, DeepSeek
**Lokale Modelle**: Jedes Modell, das auf Ollama läuft
- **OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1
- **Anthropic**: Claude 3.7 Sonnet
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, DeepSeek
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="models.mp4" width={500} height={350} />
</div>
**Empfehlung**: Verwenden Sie Modelle mit starken Argumentationsfähigkeiten wie GPT-4o oder Claude 3.7 Sonnet für genauere Bewertungen.
Verwenden Sie Modelle mit starken Argumentationsfähigkeiten wie GPT-4o oder Claude 3.7 Sonnet für beste Ergebnisse.
### API-Schlüssel
Ihr API-Schlüssel für den ausgewählten LLM-Anbieter. Dieser wird sicher gespeichert und für die Authentifizierung verwendet.
## Funktionsweise
1. Der Evaluator-Block nimmt den bereitgestellten Inhalt und Ihre benutzerdefinierten Metriken
2. Er generiert einen spezialisierten Prompt, der das LLM anweist, den Inhalt zu bewerten
3. Der Prompt enthält klare Richtlinien zur Bewertung jeder Metrik
4. Das LLM bewertet den Inhalt und gibt numerische Werte für jede Metrik zurück
5. Der Evaluator-Block formatiert diese Werte als strukturierte Ausgabe zur Verwendung in Ihrem Workflow
## Beispielanwendungsfälle
### Bewertung der Inhaltsqualität
**Bewertung der Inhaltsqualität** - Inhalte vor der Veröffentlichung bewerten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Bewertung der Blogpost-Qualität vor der Veröffentlichung</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent-Block generiert Blogpost-Inhalte</li>
<li>Evaluator bewertet Genauigkeit, Lesbarkeit und Engagement</li>
<li>Bedingungsblock prüft, ob die Werte Mindestschwellen erreichen</li>
<li>Hohe Werte → Veröffentlichen, Niedrige Werte → Überarbeiten und erneut versuchen</li>
</ol>
</div>
```
Agent (Generate) → Evaluator (Score) → Condition (Check threshold) → Publish or Revise
```
### A/B-Testing von Inhalten
**A/B-Tests von Inhalten** - Vergleich mehrerer KI-generierter Antworten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Vergleich mehrerer KI-generierter Antworten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Parallelblock generiert mehrere Antwortvarianten</li>
<li>Evaluator bewertet jede Variante nach Klarheit und Relevanz</li>
<li>Funktionsblock wählt die Antwort mit der höchsten Bewertung aus</li>
<li>Antwortblock gibt das beste Ergebnis zurück</li>
</ol>
</div>
```
Parallel (Variations) → Evaluator (Score Each) → Function (Select Best) → Response
```
### Qualitätskontrolle im Kundensupport
**Qualitätskontrolle im Kundenservice** - Sicherstellen, dass Antworten Qualitätsstandards erfüllen
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Sicherstellen, dass Support-Antworten den Qualitätsstandards entsprechen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Support-Mitarbeiter generiert Antwort auf Kundenanfrage</li>
<li>Evaluator bewertet Hilfsbereitschaft, Einfühlungsvermögen und Genauigkeit</li>
<li>Bewertungen werden für Training und Leistungsüberwachung protokolliert</li>
<li>Niedrige Bewertungen lösen einen manuellen Überprüfungsprozess aus</li>
</ol>
</div>
```
Agent (Support Response) → Evaluator (Score) → Function (Log) → Condition (Review if Low)
```
## Eingaben und Ausgaben
## Ausgaben
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Inhalt</strong>: Der zu bewertende Text oder strukturierte Daten
</li>
<li>
<strong>Bewertungsmetriken</strong>: Benutzerdefinierte Kriterien mit Bewertungsbereichen
</li>
<li>
<strong>Modell</strong>: KI-Modell für die Bewertungsanalyse
</li>
<li>
<strong>API-Schlüssel</strong>: Authentifizierung für den ausgewählten LLM-Anbieter
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>evaluator.content</strong>: Zusammenfassung der Bewertung
</li>
<li>
<strong>evaluator.model</strong>: Für die Bewertung verwendetes Modell
</li>
<li>
<strong>evaluator.tokens</strong>: Token-Nutzungsstatistiken
</li>
<li>
<strong>evaluator.cost</strong>: Kostenübersicht für den Bewertungsaufruf
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Metrik-Bewertungen</strong>: Numerische Bewertungen für jede definierte Metrik
</li>
<li>
<strong>Bewertungszusammenfassung</strong>: Detaillierte Beurteilung mit Erläuterungen
</li>
<li>
<strong>Zugriff</strong>: Verfügbar in Blöcken nach dem Evaluator
</li>
</ul>
</Tab>
</Tabs>
- **`<evaluator.content>`**: Zusammenfassung der Bewertung mit Punktzahlen
- **`<evaluator.model>`**: Für die Bewertung verwendetes Modell
- **`<evaluator.tokens>`**: Statistik zur Token-Nutzung
- **`<evaluator.cost>`**: Geschätzte Bewertungskosten
## Best Practices
- **Verwenden Sie spezifische Metrikbeschreibungen**: Definieren Sie klar, was jede Metrik misst, um genauere Bewertungen zu erhalten
- **Wählen Sie geeignete Bereiche**: Wählen Sie Bewertungsbereiche, die ausreichend Granularität bieten, ohne übermäßig komplex zu sein
- **Wählen Sie geeignete Bereiche**: Wählen Sie Bewertungsbereiche, die ausreichend Granularität bieten, ohne zu komplex zu sein
- **Verbinden Sie mit Agent-Blöcken**: Verwenden Sie Evaluator-Blöcke, um die Ausgaben von Agent-Blöcken zu bewerten und Feedback-Schleifen zu erstellen
- **Verwenden Sie konsistente Metriken**: Für vergleichende Analysen sollten Sie konsistente Metriken über ähnliche Bewertungen hinweg beibehalten
- **Kombinieren Sie mehrere Metriken**: Verwenden Sie mehrere Metriken, um eine umfassende Bewertung zu erhalten
- **Kombinieren Sie mehrere Metriken**: Verwenden Sie verschiedene Metriken, um eine umfassende Bewertung zu erhalten

View File

@@ -2,124 +2,44 @@
title: Funktion
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Funktionsblock ermöglicht die Ausführung von benutzerdefiniertem JavaScript- oder TypeScript-Code in Ihren Workflows. Verwenden Sie ihn, um Daten zu transformieren, Berechnungen durchzuführen oder benutzerdefinierte Logik zu implementieren, die in anderen Blöcken nicht verfügbar ist.
Der Funktionsblock führt benutzerdefinierten JavaScript- oder TypeScript-Code in Ihren Workflows aus. Transformieren Sie Daten, führen Sie Berechnungen durch oder implementieren Sie benutzerdefinierte Logik.
<div className="flex justify-center">
<Image
src="/static/blocks/function.png"
alt="Funktionsblock mit Code-Editor"
width={500}
height={350}
height={400}
className="my-6"
/>
</div>
## Überblick
## Ausgaben
Der Funktionsblock ermöglicht Ihnen:
<Steps>
<Step>
<strong>Daten transformieren</strong>: Formate konvertieren, Text analysieren, Arrays und Objekte manipulieren
</Step>
<Step>
<strong>Berechnungen durchführen</strong>: Mathematische Operationen, Statistiken, Finanzberechnungen
</Step>
<Step>
<strong>Benutzerdefinierte Logik implementieren</strong>: Komplexe Bedingungen, Schleifen und Algorithmen
</Step>
<Step>
<strong>Externe Daten verarbeiten</strong>: Antworten parsen, Anfragen formatieren, Authentifizierung verwalten
</Step>
</Steps>
## Funktionsweise
Der Funktionsblock führt Ihren Code in einer sicheren, isolierten Umgebung aus:
1. **Eingabe empfangen**: Zugriff auf Daten aus vorherigen Blöcken über das `input` Objekt
2. **Code ausführen**: Führen Sie Ihren JavaScript/Python-Code aus
3. **Ergebnisse zurückgeben**: Verwenden Sie `return`, um Daten an den nächsten Block zu übergeben
4. **Fehler behandeln**: Integrierte Fehlerbehandlung und Protokollierung
## Remote-Ausführung (E2B)
- **Sprachen**: JavaScript und Python in einer isolierten E2B-Sandbox ausführen.
- **Aktivierung**: Schalten Sie “Remote Code Execution” im Funktionsblock ein.
- **Einsatzbereich**: Schwerere Logik, externe Bibliotheken oder Python-spezifischer Code.
- **Leistung**: Langsamer als lokales JS aufgrund von Sandbox-Start und Netzwerk-Overhead.
- **Hinweise**: Erfordert `E2B_API_KEY` bei lokaler Ausführung. Für niedrigste Latenz verwenden Sie nativ lokales JS (Fast Mode).
## Eingaben und Ausgaben
<Tabs items={['Configuration', 'Variables']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Code</strong>: Ihr JavaScript/Python-Code zur Ausführung
</li>
<li>
<strong>Timeout</strong>: Maximale Ausführungszeit (standardmäßig 30 Sekunden)
</li>
<li>
<strong>Eingabedaten</strong>: Alle verbundenen Block-Ausgaben sind über Variablen verfügbar
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>function.result</strong>: Der von Ihrer Funktion zurückgegebene Wert
</li>
<li>
<strong>function.stdout</strong>: Console.log()-Ausgabe aus Ihrem Code
</li>
</ul>
</Tab>
</Tabs>
- **`<function.result>`**: Der von Ihrer Funktion zurückgegebene Wert
- **`<function.stdout>`**: Console.log()-Ausgabe Ihres Codes
## Beispielanwendungsfälle
### Datenverarbeitungspipeline
**Datenverarbeitungspipeline** - Transformation von API-Antworten in strukturierte Daten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: API-Antwort in strukturierte Daten umwandeln</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API-Block ruft Rohdaten der Kunden ab</li>
<li>Funktionsblock verarbeitet und validiert Daten</li>
<li>Funktionsblock berechnet abgeleitete Metriken</li>
<li>Antwortblock gibt formatierte Ergebnisse zurück</li>
</ol>
</div>
```
API (Fetch) → Function (Process & Validate) → Function (Calculate Metrics) → Response
```
### Implementierung von Geschäftslogik
**Implementierung von Geschäftslogik** - Berechnung von Treuepunkten und Stufen
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Berechnung von Treuepunkten und Stufen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent ruft Kaufhistorie des Kunden ab</li>
<li>Funktionsblock berechnet Treuemetriken</li>
<li>Funktionsblock bestimmt Kundenstufe</li>
<li>Bedingungsblock leitet basierend auf der Stufenhöhe weiter</li>
</ol>
</div>
```
Agent (Get History) → Function (Calculate Score) → Function (Determine Tier) → Condition (Route)
```
### Datenvalidierung und -bereinigung
**Datenvalidierung und -bereinigung** - Validierung und Bereinigung von Benutzereingaben
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Benutzereingaben validieren und bereinigen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Benutzereingabe aus Formularübermittlung erhalten</li>
<li>Funktionsblock validiert E-Mail-Format und Telefonnummern</li>
<li>Funktionsblock bereinigt und normalisiert Daten</li>
<li>API-Block speichert validierte Daten in der Datenbank</li>
</ol>
</div>
```
Input → Function (Validate & Sanitize) → API (Save to Database)
```
### Beispiel: Treuepunkte-Rechner
@@ -152,5 +72,5 @@ return {
- **Funktionen fokussiert halten**: Schreiben Sie Funktionen, die eine Sache gut erledigen, um die Wartbarkeit und Fehlersuche zu verbessern
- **Fehler elegant behandeln**: Verwenden Sie try/catch-Blöcke, um potenzielle Fehler zu behandeln und aussagekräftige Fehlermeldungen bereitzustellen
- **Grenzfälle testen**: Stellen Sie sicher, dass Ihr Code ungewöhnliche Eingaben, Null-Werte und Grenzbedingungen korrekt behandelt
- **Auf Leistung optimieren**: Achten Sie bei großen Datensätzen auf die Berechnungskomplexität und den Speicherverbrauch
- **console.log() zum Debuggen verwenden**: Nutzen Sie die Stdout-Ausgabe zum Debuggen und Überwachen der Funktionsausführung
- **Für Leistung optimieren**: Achten Sie bei großen Datensätzen auf die Berechnungskomplexität und den Speicherverbrauch
- **Console.log() zum Debuggen verwenden**: Nutzen Sie die Stdout-Ausgabe zum Debuggen und Überwachen der Funktionsausführung

View File

@@ -0,0 +1,207 @@
---
title: Guardrails
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Der Guardrails-Block validiert und schützt Ihre KI-Workflows, indem er Inhalte anhand mehrerer Validierungstypen überprüft. Stellen Sie die Datenqualität sicher, verhindern Sie Halluzinationen, erkennen Sie personenbezogene Daten und erzwingen Sie Formatanforderungen, bevor Inhalte durch Ihren Workflow fließen.
<div className="flex justify-center">
<Image
src="/static/blocks/guardrails.png"
alt="Guardrails-Block"
width={500}
height={400}
className="my-6"
/>
</div>
## Validierungstypen
### JSON-Validierung
Überprüft, ob der Inhalt korrekt formatiertes JSON ist. Perfekt, um sicherzustellen, dass strukturierte LLM-Ausgaben sicher geparst werden können.
**Anwendungsfälle:**
- Validierung von JSON-Antworten aus Agent-Blöcken vor dem Parsen
- Sicherstellen, dass API-Payloads korrekt formatiert sind
- Überprüfung der Integrität strukturierter Daten
**Ausgabe:**
- `passed`: `true` bei gültigem JSON, sonst `false`
- `error`: Fehlermeldung bei fehlgeschlagener Validierung (z.B. "Ungültiges JSON: Unerwartetes Token...")
### Regex-Validierung
Prüft, ob der Inhalt einem bestimmten regulären Ausdrucksmuster entspricht.
**Anwendungsfälle:**
- Validierung von E-Mail-Adressen
- Überprüfung von Telefonnummernformaten
- Verifizierung von URLs oder benutzerdefinierten Kennungen
- Durchsetzung spezifischer Textmuster
**Konfiguration:**
- **Regex-Muster**: Der reguläre Ausdruck, gegen den geprüft wird (z.B. `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` für E-Mails)
**Ausgabe:**
- `passed`: `true` wenn der Inhalt dem Muster entspricht, sonst `false`
- `error`: Fehlermeldung bei fehlgeschlagener Validierung
### Halluzinationserkennung
Verwendet Retrieval-Augmented Generation (RAG) mit LLM-Bewertung, um zu erkennen, wann KI-generierte Inhalte im Widerspruch zu Ihrer Wissensdatenbank stehen oder nicht darin begründet sind.
**Funktionsweise:**
1. Abfrage Ihrer Wissensdatenbank nach relevantem Kontext
2. Übermittlung sowohl der KI-Ausgabe als auch des abgerufenen Kontexts an ein LLM
3. LLM weist einen Konfidenzwert zu (Skala 0-10)
- **0** = Vollständige Halluzination (völlig unbegründet)
- **10** = Vollständig begründet (komplett durch die Wissensdatenbank gestützt)
4. Validierung besteht, wenn der Wert ≥ Schwellenwert ist (Standard: 3)
**Konfiguration:**
- **Wissensdatenbank**: Wählen Sie aus Ihren vorhandenen Wissensdatenbanken
- **Modell**: Wählen Sie LLM für die Bewertung (erfordert starkes Denkvermögen - GPT-4o, Claude 3.7 Sonnet empfohlen)
- **API-Schlüssel**: Authentifizierung für den ausgewählten LLM-Anbieter (automatisch ausgeblendet für gehostete/Ollama oder VLLM-kompatible Modelle)
- **Vertrauensschwelle**: Mindestpunktzahl zum Bestehen (0-10, Standard: 3)
- **Top K** (Erweitert): Anzahl der abzurufenden Wissensdatenbank-Chunks (Standard: 10)
**Ausgabe:**
- `passed`: `true` wenn Konfidenzwert ≥ Schwellenwert
- `score`: Konfidenzwert (0-10)
- `reasoning`: Erklärung des LLM für den Wert
- `error`: Fehlermeldung bei fehlgeschlagener Validierung
**Anwendungsfälle:**
- Validierung von Agent-Antworten anhand der Dokumentation
- Sicherstellung der faktischen Richtigkeit von Kundendienstantworten
- Überprüfung, ob generierte Inhalte mit dem Quellmaterial übereinstimmen
- Qualitätskontrolle für RAG-Anwendungen
### PII-Erkennung
Erkennt personenbezogene Daten mithilfe von Microsoft Presidio. Unterstützt über 40 Entitätstypen in mehreren Ländern und Sprachen.
<div className="flex justify-center">
<Image
src="/static/blocks/guardrails-2.png"
alt="PII-Erkennungskonfiguration"
width={700}
height={450}
className="my-6"
/>
</div>
**Funktionsweise:**
1. Übergabe des zu validierenden Inhalts (z.B. `<agent1.content>`)
2. Auswahl der zu erkennenden PII-Typen über den Modal-Selektor
3. Auswahl des Erkennungsmodus (Erkennen oder Maskieren)
4. Inhalt wird auf übereinstimmende PII-Entitäten gescannt
5. Gibt Erkennungsergebnisse und optional maskierten Text zurück
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="guardrails.mp4" width={500} height={350} />
</div>
**Konfiguration:**
- **Zu erkennende PII-Typen**: Auswahl aus gruppierten Kategorien über Modal-Selektor
- **Allgemein**: Personenname, E-Mail, Telefon, Kreditkarte, IP-Adresse usw.
- **USA**: Sozialversicherungsnummer, Führerschein, Reisepass usw.
- **UK**: NHS-Nummer, Sozialversicherungsnummer
- **Spanien**: NIF, NIE, CIF
- **Italien**: Steuernummer, Führerschein, Umsatzsteuer-ID
- **Polen**: PESEL, NIP, REGON
- **Singapur**: NRIC/FIN, UEN
- **Australien**: ABN, ACN, TFN, Medicare
- **Indien**: Aadhaar, PAN, Reisepass, Wählernummer
- **Modus**:
- **Erkennen**: Nur PII identifizieren (Standard)
- **Maskieren**: Erkannte PII durch maskierte Werte ersetzen
- **Sprache**: Erkennungssprache (Standard: Englisch)
**Ausgabe:**
- `passed`: `false` wenn ausgewählte PII-Typen erkannt werden
- `detectedEntities`: Array erkannter PII mit Typ, Position und Konfidenz
- `maskedText`: Inhalt mit maskierter PII (nur wenn Modus = "Mask")
- `error`: Fehlermeldung bei fehlgeschlagener Validierung
**Anwendungsfälle:**
- Blockieren von Inhalten mit sensiblen persönlichen Informationen
- Maskieren von personenbezogenen Daten vor der Protokollierung oder Speicherung
- Einhaltung der DSGVO, HIPAA und anderer Datenschutzbestimmungen
- Bereinigung von Benutzereingaben vor der Verarbeitung
## Konfiguration
### Zu validierende Inhalte
Der zu validierende Eingabeinhalt. Dieser stammt typischerweise aus:
- Ausgaben von Agent-Blöcken: `<agent.content>`
- Ergebnisse von Funktionsblöcken: `<function.output>`
- API-Antworten: `<api.output>`
- Jede andere Blockausgabe
### Validierungstyp
Wählen Sie aus vier Validierungstypen:
- **Gültiges JSON**: Prüfen, ob der Inhalt korrekt formatiertes JSON ist
- **Regex-Übereinstimmung**: Überprüfen, ob der Inhalt einem Regex-Muster entspricht
- **Halluzinationsprüfung**: Validierung gegen Wissensdatenbank mit LLM-Bewertung
- **PII-Erkennung**: Erkennung und optional Maskierung personenbezogener Daten
## Ausgaben
Alle Validierungstypen geben zurück:
- **`<guardrails.passed>`**: Boolescher Wert, der angibt, ob die Validierung bestanden wurde
- **`<guardrails.validationType>`**: Der durchgeführte Validierungstyp
- **`<guardrails.input>`**: Die ursprüngliche Eingabe, die validiert wurde
- **`<guardrails.error>`**: Fehlermeldung, wenn die Validierung fehlgeschlagen ist (optional)
Zusätzliche Ausgaben nach Typ:
**Halluzinationsprüfung:**
- **`<guardrails.score>`**: Konfidenzwert (0-10)
- **`<guardrails.reasoning>`**: Erklärung des LLM
**PII-Erkennung:**
- **`<guardrails.detectedEntities>`**: Array erkannter PII-Entitäten
- **`<guardrails.maskedText>`**: Inhalt mit maskierten PII (wenn Modus = "Mask")
## Beispielanwendungsfälle
**JSON vor dem Parsen validieren** - Stellen Sie sicher, dass die Agent-Ausgabe gültiges JSON ist
```
Agent (Generate) → Guardrails (Validate) → Condition (Check passed) → Function (Parse)
```
**Halluzinationen verhindern** - Validieren Sie Kundendienstantworten anhand der Wissensdatenbank
```
Agent (Response) → Guardrails (Check KB) → Condition (Score ≥ 3) → Send or Flag
```
**PII in Benutzereingaben blockieren** - Bereinigen Sie von Benutzern übermittelte Inhalte
```
Input → Guardrails (Detect PII) → Condition (No PII) → Process or Reject
```
## Bewährte Praktiken
- **Verkettung mit Bedingungsblöcken**: Verwenden Sie `<guardrails.passed>`, um die Workflow-Logik basierend auf Validierungsergebnissen zu verzweigen
- **JSON-Validierung vor dem Parsen verwenden**: Validieren Sie immer die JSON-Struktur, bevor Sie versuchen, LLM-Ausgaben zu parsen
- **Geeignete PII-Typen auswählen**: Wählen Sie nur die für Ihren Anwendungsfall relevanten PII-Entitätstypen für bessere Leistung
- **Angemessene Konfidenzgrenzwerte festlegen**: Passen Sie für die Halluzinationserkennung den Grenzwert an Ihre Genauigkeitsanforderungen an (höher = strenger)
- **Starke Modelle für die Halluzinationserkennung verwenden**: GPT-4o oder Claude 3.7 Sonnet bieten genauere Konfidenzwerte
- **PII für die Protokollierung maskieren**: Verwenden Sie den Modus "Mask", wenn Sie Inhalte protokollieren oder speichern müssen, die PII enthalten könnten
- **Regex-Muster testen**: Validieren Sie Ihre Regex-Muster gründlich, bevor Sie sie in der Produktion einsetzen
- **Validierungsfehler überwachen**: Verfolgen Sie `<guardrails.error>`Nachrichten, um häufige Validierungsprobleme zu identifizieren
<Callout type="info">
Die Validierung von Guardrails erfolgt synchron in Ihrem Workflow. Für die Erkennung von Halluzinationen sollten Sie schnellere Modelle (wie GPT-4o-mini) wählen, wenn die Latenz kritisch ist.
</Callout>

View File

@@ -0,0 +1,188 @@
---
title: Human in the Loop
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Der Human in the Loop Block pausiert die Workflow-Ausführung und wartet auf menschliches Eingreifen, bevor er fortfährt. Verwenden Sie ihn, um Genehmigungspunkte hinzuzufügen, Feedback zu sammeln oder zusätzliche Eingaben an kritischen Entscheidungspunkten einzuholen.
<div className="flex justify-center">
<Image
src="/static/blocks/hitl-1.png"
alt="Human in the Loop Block Konfiguration"
width={500}
height={400}
className="my-6"
/>
</div>
Wenn die Ausführung diesen Block erreicht, pausiert der Workflow auf unbestimmte Zeit, bis ein Mensch über das Genehmigungsportal, die API oder den Webhook eine Eingabe macht.
<div className="flex justify-center">
<Image
src="/static/blocks/hitl-2.png"
alt="Human in the Loop Genehmigungsportal"
width={700}
height={500}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### Pausierte Ausgabe
Definiert, welche Daten dem Genehmigenden angezeigt werden. Dies ist der Kontext, der im Genehmigungsportal angezeigt wird, um eine fundierte Entscheidung zu ermöglichen.
Verwenden Sie den visuellen Builder oder den JSON-Editor, um die Daten zu strukturieren. Referenzieren Sie Workflow-Variablen mit der `<blockName.output>` Syntax.
```json
{
"customerName": "<agent1.content.name>",
"proposedAction": "<router1.selectedPath>",
"confidenceScore": "<evaluator1.score>",
"generatedEmail": "<agent2.content>"
}
```
### Benachrichtigung
Konfiguriert, wie Genehmigende benachrichtigt werden, wenn eine Genehmigung erforderlich ist. Unterstützte Kanäle sind:
- **Slack** - Nachrichten an Kanäle oder DMs
- **Gmail** - E-Mail mit Genehmigungslink
- **Microsoft Teams** - Team-Kanal-Benachrichtigungen
- **SMS** - Textwarnungen über Twilio
- **Webhooks** - Benutzerdefinierte Benachrichtigungssysteme
Fügen Sie die Genehmigungs-URL (`<blockId.url>`) in Ihre Benachrichtigungsnachrichten ein, damit Genehmigende auf das Portal zugreifen können.
### Fortsetzungseingabe
Definiert die Felder, die Genehmigende bei der Antwort ausfüllen. Diese Daten werden nach der Fortsetzung des Workflows für nachfolgende Blöcke verfügbar.
```json
{
"approved": {
"type": "boolean",
"description": "Approve or reject this request"
},
"comments": {
"type": "string",
"description": "Optional feedback or explanation"
}
}
```
Greifen Sie in nachgelagerten Blöcken auf Wiederaufnahmedaten mit `<blockId.resumeInput.fieldName>` zu.
## Genehmigungsmethoden
<Tabs items={['Genehmigungsportal', 'API', 'Webhook']}>
<Tab>
### Genehmigungsportal
Jeder Block generiert eine eindeutige Portal-URL (`<blockId.url>`) mit einer visuellen Oberfläche, die alle pausierten Ausgabedaten und Formularfelder für die Fortsetzungseingabe anzeigt. Mobilgerätekompatibel und sicher.
Teilen Sie diese URL in Benachrichtigungen, damit Genehmiger die Anfragen prüfen und beantworten können.
</Tab>
<Tab>
### REST API
Workflows programmatisch fortsetzen:
```bash
POST /api/workflows/{workflowId}/executions/{executionId}/resume/{blockId}
{
"approved": true,
"comments": "Looks good to proceed"
}
```
Erstellen Sie benutzerdefinierte Genehmigungs-UIs oder integrieren Sie bestehende Systeme.
</Tab>
<Tab>
### Webhook
Fügen Sie ein Webhook-Tool im Benachrichtigungsbereich hinzu, um Genehmigungsanfragen an externe Systeme zu senden. Integration mit Ticketing-Systemen wie Jira oder ServiceNow.
</Tab>
</Tabs>
## Häufige Anwendungsfälle
**Inhaltsgenehmigung** - Überprüfung von KI-generierten Inhalten vor der Veröffentlichung
```
Agent → Human in the Loop → API (Publish)
```
**Mehrstufige Genehmigungen** - Verkettung mehrerer Genehmigungsschritte für wichtige Entscheidungen
```
Agent → Human in the Loop (Manager) → Human in the Loop (Director) → Execute
```
**Datenvalidierung** - Überprüfung extrahierter Daten vor der Verarbeitung
```
Agent (Extract) → Human in the Loop (Validate) → Function (Process)
```
**Qualitätskontrolle** - Überprüfung von KI-Ausgaben vor dem Versand an Kunden
```
Agent (Generate) → Human in the Loop (QA) → Gmail (Send)
```
## Block-Ausgaben
**`url`** - Eindeutige URL für das Genehmigungsportal
**`resumeInput.*`** - Alle in der Fortsetzungseingabe definierten Felder werden verfügbar, nachdem der Workflow fortgesetzt wird
Zugriff über `<blockId.resumeInput.fieldName>`.
## Beispiel
**Pausierte Ausgabe:**
```json
{
"title": "<agent1.content.title>",
"body": "<agent1.content.body>",
"qualityScore": "<evaluator1.score>"
}
```
**Fortsetzungseingabe:**
```json
{
"approved": { "type": "boolean" },
"feedback": { "type": "string" }
}
```
**Nachgelagerte Verwendung:**
```javascript
// Condition block
<approval1.resumeInput.approved> === true
```
Das Beispiel unten zeigt ein Genehmigungsportal, wie es von einem Genehmiger gesehen wird, nachdem der Workflow angehalten wurde. Genehmiger können die Daten überprüfen und Eingaben als Teil der Workflow-Wiederaufnahme bereitstellen. Auf das Genehmigungsportal kann direkt über die eindeutige URL, `<blockId.url>`, zugegriffen werden.
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
<Video src="hitl-resume.mp4" width={700} height={450} />
</div>
## Verwandte Blöcke
- **[Bedingung](/blocks/condition)** - Verzweigung basierend auf Genehmigungsentscheidungen
- **[Variablen](/blocks/variables)** - Speichern von Genehmigungsverlauf und Metadaten
- **[Antwort](/blocks/response)** - Rückgabe von Workflow-Ergebnissen an API-Aufrufer

View File

@@ -1,5 +1,5 @@
---
title: Blöcke
title: Übersicht
description: Die Bausteine deiner KI-Workflows
---
@@ -16,7 +16,7 @@ Blöcke sind die Bausteine, die du miteinander verbindest, um KI-Workflows zu er
## Grundlegende Blocktypen
Sim bietet sieben grundlegende Blocktypen, die die wesentlichen Funktionen von KI-Workflows abdecken:
Sim bietet wesentliche Blocktypen, die die Kernfunktionen von KI-Workflows abdecken:
### Verarbeitungsblöcke
- **[Agent](/blocks/agent)** - Chatte mit KI-Modellen (OpenAI, Anthropic, Google, lokale Modelle)
@@ -28,16 +28,21 @@ Sim bietet sieben grundlegende Blocktypen, die die wesentlichen Funktionen von K
- **[Router](/blocks/router)** - Nutze KI, um Anfragen intelligent auf verschiedene Pfade zu leiten
- **[Evaluator](/blocks/evaluator)** - Bewerte und beurteile die Inhaltsqualität mit KI
### Ablaufsteuerungsblöcke
- **[Variablen](/blocks/variables)** - Workflow-bezogene Variablen setzen und verwalten
- **[Warten](/blocks/wait)** - Workflow-Ausführung für eine bestimmte Zeitverzögerung pausieren
- **[Mensch in der Schleife](/blocks/human-in-the-loop)** - Pausieren für menschliche Genehmigung und Feedback vor dem Fortfahren
### Ausgabeblöcke
- **[Response](/blocks/response)** - Formatiere und gib endgültige Ergebnisse aus deinem Workflow zurück
- **[Antwort](/blocks/response)** - Formatieren und Zurückgeben der endgültigen Ergebnisse aus Ihrem Workflow
## Wie Blöcke funktionieren
Jeder Block hat drei Hauptkomponenten:
**Eingaben**: Daten, die in den Block von anderen Blöcken oder Benutzereingaben kommen
**Konfiguration**: Einstellungen, die das Verhalten des Blocks steuern
**Ausgaben**: Daten, die der Block für andere Blöcke produziert
**Konfiguration**: Einstellungen, die steuern, wie der Block sich verhält
**Ausgaben**: Daten, die der Block für andere Blöcke zur Verwendung erzeugt
<Steps>
<Step>
@@ -56,7 +61,7 @@ Jeder Block hat drei Hauptkomponenten:
Sie erstellen Workflows, indem Sie Blöcke miteinander verbinden. Die Ausgabe eines Blocks wird zur Eingabe eines anderen:
- **Ziehen zum Verbinden**: Ziehen Sie von einem Ausgabeport zu einem Eingabeport
- **Mehrfachverbindungen**: Eine Ausgabe kann mit mehreren Eingängen verbunden werden
- **Mehrfachverbindungen**: Eine Ausgabe kann mit mehreren Eingaben verbunden werden
- **Verzweigende Pfade**: Einige Blöcke können basierend auf Bedingungen zu verschiedenen Pfaden weiterleiten
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
@@ -73,7 +78,7 @@ User Input → Agent → Function → Response
```
### Bedingte Verzweigung
Verwenden Sie Bedingungsblöcke oder Router-Blöcke, um verschiedene Pfade zu erstellen:
Verwenden Sie Bedingung- oder Router-Blöcke, um verschiedene Pfade zu erstellen:
```
User Input → Router → Agent A (for questions)
@@ -93,37 +98,46 @@ Agent → Evaluator → Condition → Response (if good)
Jeder Blocktyp hat spezifische Konfigurationsoptionen:
**Alle Blöcke**:
- Ein-/Ausgabeverbindungen
- Eingabe-/Ausgabeverbindungen
- Fehlerbehandlungsverhalten
- Zeitüberschreitungseinstellungen für die Ausführung
- Einstellungen für Ausführungs-Timeout
**KI-Blöcke** (Agent, Router, Evaluator):
- Modellauswahl (OpenAI, Anthropic, Google, lokal)
- API-Schlüssel und Authentifizierung
- Temperature und andere Modellparameter
- Temperatur und andere Modellparameter
- Systemaufforderungen und Anweisungen
**Logikblöcke** (Bedingung, Funktion):
**Logik-Blöcke** (Bedingung, Funktion):
- Benutzerdefinierte Ausdrücke oder Code
- Variablenreferenzen
- Einstellungen für die Ausführungsumgebung
- Einstellungen für Ausführungsumgebung
**Integrationsblöcke** (API, Antwort):
**Integrations-Blöcke** (API, Response):
- Endpunktkonfiguration
- Header und Authentifizierung
- Anfrage-/Antwortformatierung
<Cards>
<Card title="Agent Block" href="/blocks/agent">
Verbindung zu KI-Modellen herstellen und intelligente Antworten erzeugen
<Card title="Agent-Block" href="/blocks/agent">
Verbindung zu KI-Modellen herstellen und intelligente Antworten erstellen
</Card>
<Card title="Function Block" href="/blocks/function">
<Card title="Funktionsblock" href="/blocks/function">
Benutzerdefinierten Code ausführen, um Daten zu verarbeiten und zu transformieren
</Card>
<Card title="API Block" href="/blocks/api">
<Card title="API-Block" href="/blocks/api">
Integration mit externen Diensten und APIs
</Card>
<Card title="Condition Block" href="/blocks/condition">
<Card title="Bedingungsblock" href="/blocks/condition">
Verzweigende Logik basierend auf Datenbewertung erstellen
</Card>
<Card title="Mensch-in-der-Schleife-Block" href="/blocks/human-in-the-loop">
Pausieren für menschliche Genehmigung und Feedback vor dem Fortfahren
</Card>
<Card title="Variablenblock" href="/blocks/variables">
Workflow-bezogene Variablen setzen und verwalten
</Card>
<Card title="Warteblock" href="/blocks/wait">
Workflow-Ausführung für bestimmte Zeitverzögerungen pausieren
</Card>
</Cards>

View File

@@ -3,67 +3,36 @@ title: Loop
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Loop-Block ist ein Container-Block in Sim, der es ermöglicht, iterative Workflows zu erstellen, indem eine Gruppe von Blöcken wiederholt ausgeführt wird. Loops ermöglichen iterative Verarbeitung in deinen Workflows.
Der Loop-Block unterstützt zwei Arten der Iteration:
Der Schleifenblock ist ein Container, der Blöcke wiederholt ausführt. Iteriere über Sammlungen, wiederhole Operationen eine festgelegte Anzahl von Malen oder fahre fort, solange eine Bedingung erfüllt ist.
<Callout type="info">
Loop-Blöcke sind Container-Knoten, die andere Blöcke enthalten können. Die Blöcke innerhalb einer Schleife werden basierend auf deiner Konfiguration mehrfach ausgeführt.
Schleifenblöcke sind Container-Knoten, die andere Blöcke in sich enthalten. Die enthaltenen Blöcke werden mehrfach ausgeführt, basierend auf deiner Konfiguration.
</Callout>
## Überblick
Der Loop-Block ermöglicht dir:
<Steps>
<Step>
<strong>Über Sammlungen iterieren</strong>: Arrays oder Objekte Element für Element verarbeiten
</Step>
<Step>
<strong>Operationen wiederholen</strong>: Blöcke eine festgelegte Anzahl von Malen ausführen
</Step>
<Step>
<strong>Sequentielle Verarbeitung</strong>: Datentransformation in geordneten Iterationen durchführen
</Step>
<Step>
<strong>Ergebnisse aggregieren</strong>: Ausgaben aus allen Schleifeniterationen sammeln
</Step>
</Steps>
## Funktionsweise
Der Loop-Block führt enthaltene Blöcke durch sequentielle Iteration aus:
1. **Schleife initialisieren** - Iterationsparameter festlegen (Anzahl oder Sammlung)
2. **Iteration ausführen** - Enthaltene Blöcke für aktuelle Iteration ausführen
3. **Ergebnisse sammeln** - Ausgabe jeder Iteration speichern
4. **Fortfahren oder abschließen** - Zur nächsten Iteration übergehen oder Schleife beenden
## Konfigurationsoptionen
### Schleifentyp
Wähle zwischen zwei Arten von Schleifen:
Wähle zwischen vier Arten von Schleifen:
<Tabs items={['For Loop', 'ForEach Loop']}>
<Tabs items={['For-Schleife', 'ForEach-Schleife', 'While-Schleife', 'Do-While-Schleife']}>
<Tab>
**For Loop (Iterationen)** - Eine numerische Schleife, die eine feste Anzahl von Malen ausgeführt wird:
**For-Schleife (Iterationen)** - Eine numerische Schleife, die eine festgelegte Anzahl von Malen ausgeführt wird:
<div className="flex justify-center">
<Image
src="/static/blocks/loop-1.png"
alt="For Loop mit Iterationen"
alt="For-Schleife mit Iterationen"
width={500}
height={400}
className="my-6"
/>
</div>
Verwende diese Option, wenn du eine Operation eine bestimmte Anzahl von Malen wiederholen musst.
Verwende diese, wenn du eine Operation eine bestimmte Anzahl von Malen wiederholen musst.
```
@@ -100,6 +69,56 @@ Wähle zwischen zwei Arten von Schleifen:
```
</Tab>
<Tab>
**While-Schleife (Bedingungsbasiert)** - Wird ausgeführt, solange eine Bedingung als wahr ausgewertet wird:
<div className="flex justify-center">
<Image
src="/static/blocks/loop-3.png"
alt="While-Schleife mit Bedingung"
width={500}
height={400}
className="my-6"
/>
</div>
Verwende diese, wenn du eine Schleife benötigst, die läuft, bis eine bestimmte Bedingung erfüllt ist. Die Bedingung wird **vor** jeder Iteration überprüft.
```
Example: While {"<variable.i>"} < 10
- Check condition → Execute if true
- Inside loop: Increment {"<variable.i>"}
- Inside loop: Variables assigns i = {"<variable.i>"} + 1
- Check condition → Execute if true
- Check condition → Exit if false
```
</Tab>
<Tab>
**Do-While-Schleife (Bedingungsbasiert)** - Wird mindestens einmal ausgeführt und dann fortgesetzt, solange eine Bedingung wahr ist:
<div className="flex justify-center">
<Image
src="/static/blocks/loop-4.png"
alt="Do-While-Schleife mit Bedingung"
width={500}
height={400}
className="my-6"
/>
</div>
Verwende diese, wenn du eine Operation mindestens einmal ausführen musst und dann die Schleife fortsetzen willst, bis eine Bedingung erfüllt ist. Die Bedingung wird **nach** jeder Iteration überprüft.
```
Example: Do-while {"<variable.i>"} < 10
- Execute blocks
- Inside loop: Increment {"<variable.i>"}
- Inside loop: Variables assigns i = {"<variable.i>"} + 1
- Check condition → Continue if true
- Check condition → Exit if false
```
</Tab>
</Tabs>
## Wie man Schleifen verwendet
@@ -115,33 +134,57 @@ Wähle zwischen zwei Arten von Schleifen:
Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
- **`<loop.results>`**: Array von Ergebnissen aus allen Schleifendurchläufen
- **loop.results**: Array mit Ergebnissen aller Schleifendurchläufe
## Beispielanwendungsfälle
### Verarbeitung von API-Ergebnissen
**Verarbeitung von API-Ergebnissen** - ForEach-Schleife verarbeitet Kundendatensätze aus einer API
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Mehrere Kundendatensätze verarbeiten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API-Block ruft Kundenliste ab</li>
<li>ForEach-Schleife iteriert über jeden Kunden</li>
<li>Innerhalb der Schleife: Agent analysiert Kundendaten</li>
<li>Innerhalb der Schleife: Funktion speichert Analyseergebnisse</li>
</ol>
</div>
```javascript
// Beispiel: ForEach-Schleife für API-Ergebnisse
const customers = await api.getCustomers();
### Iterative Inhaltserstellung
loop.forEach(customers, (customer) => {
// Verarbeite jeden Kunden
if (customer.status === 'active') {
sendEmail(customer.email, 'Sonderangebot');
}
});
```
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Mehrere Variationen generieren</h4>
<ol className="list-decimal pl-5 text-sm">
<li>For-Schleife auf 5 Iterationen einstellen</li>
<li>Innerhalb der Schleife: Agent generiert Inhaltsvariante</li>
<li>Innerhalb der Schleife: Evaluator bewertet den Inhalt</li>
<li>Nach der Schleife: Funktion wählt die beste Variante aus</li>
</ol>
</div>
**Iterative Inhaltsgenerierung** - For-Schleife generiert mehrere Inhaltsvariationen
```javascript
// Beispiel: For-Schleife für Inhaltsgenerierung
const variations = [];
loop.for(5, (i) => {
// Generiere 5 verschiedene Variationen
const content = ai.generateContent({
prompt: `Variation ${i+1} für Produktbeschreibung`,
temperature: 0.7 + (i * 0.1)
});
variations.push(content);
});
```
**Zähler mit While-Schleife** - While-Schleife verarbeitet Elemente mit Zähler
```javascript
// Beispiel: While-Schleife mit Zähler
let counter = 0;
let processedItems = 0;
loop.while(() => counter < items.length, () => {
if (items[counter].isValid) {
processItem(items[counter]);
processedItems++;
}
counter++;
});
console.log(`${processedItems} gültige Elemente verarbeitet`);
```
## Erweiterte Funktionen
@@ -150,23 +193,23 @@ Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
<Callout type="warning">
Container-Blöcke (Schleifen und Parallele) können nicht ineinander verschachtelt werden. Das bedeutet:
- Du kannst keinen Schleifenblock in einen anderen Schleifenblock platzieren
- Du kannst keinen Parallelblock in einen Schleifenblock platzieren
- Du kannst keinen Parallel-Block in einen Schleifenblock platzieren
- Du kannst keinen Container-Block in einen anderen Container-Block platzieren
Wenn du mehrdimensionale Iterationen benötigst, erwäge eine Umstrukturierung deines Workflows, um sequentielle Schleifen zu verwenden oder Daten in Stufen zu verarbeiten.
</Callout>
<Callout type="info">
Schleifen werden sequentiell ausgeführt, nicht parallel. Wenn Sie eine gleichzeitige Ausführung benötigen, verwenden Sie stattdessen den Parallel-Block.
Schleifen werden sequentiell ausgeführt, nicht parallel. Wenn du eine gleichzeitige Ausführung benötigst, verwende stattdessen den Parallel-Block.
</Callout>
## Eingaben und Ausgaben
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Schleifentyp</strong>: Wählen Sie zwischen 'for' oder 'forEach'
<strong>Schleifentyp</strong>: Wähle zwischen 'for', 'forEach', 'while' oder 'doWhile'
</li>
<li>
<strong>Iterationen</strong>: Anzahl der Ausführungen (für for-Schleifen)
@@ -174,6 +217,9 @@ Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
<li>
<strong>Sammlung</strong>: Array oder Objekt zum Durchlaufen (für forEach-Schleifen)
</li>
<li>
<strong>Bedingung</strong>: Boolescher Ausdruck zur Auswertung (für while/do-while-Schleifen)
</li>
</ul>
</Tab>
<Tab>
@@ -185,7 +231,7 @@ Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
<strong>loop.index</strong>: Aktuelle Iterationsnummer (0-basiert)
</li>
<li>
<strong>loop.items</strong>: Vollständige Sammlung (forEach-Schleifen)
<strong>loop.items</strong>: Vollständige Sammlung (für forEach-Schleifen)
</li>
</ul>
</Tab>
@@ -204,8 +250,8 @@ Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
</Tab>
</Tabs>
## Best Practices
## Bewährte Praktiken
- **Setzen Sie vernünftige Grenzen**: Halten Sie die Anzahl der Iterationen in einem vernünftigen Rahmen, um lange Ausführungszeiten zu vermeiden
- **Verwenden Sie ForEach für Sammlungen**: Verwenden Sie ForEach statt For-Schleifen, wenn Sie Arrays oder Objekte verarbeiten
- **Behandeln Sie Fehler angemessen**: Erwägen Sie, Fehlerbehandlung innerhalb von Schleifen einzubauen, um robuste Workflows zu gewährleisten
- **Verwenden Sie ForEach für Sammlungen**: Verwenden Sie beim Verarbeiten von Arrays oder Objekten ForEach anstelle von For-Schleifen
- **Behandeln Sie Fehler elegant**: Erwägen Sie, Fehlerbehandlung innerhalb von Schleifen hinzuzufügen, um robuste Workflows zu gewährleisten

View File

@@ -3,46 +3,24 @@ title: Parallel
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Parallel-Block ist ein Container-Block in Sim, der es ermöglicht, mehrere Instanzen von Blöcken gleichzeitig auszuführen, um Workflows schneller zu verarbeiten.
Der Parallel-Block unterstützt zwei Arten der gleichzeitigen Ausführung:
Der Parallel-Block ist ein Container, der mehrere Instanzen gleichzeitig ausführt, um Workflows schneller zu verarbeiten. Verarbeiten Sie Elemente simultan statt sequentiell.
<Callout type="info">
Parallel-Blöcke sind Container-Knoten, die ihre Inhalte mehrfach gleichzeitig ausführen, im Gegensatz zu Schleifen, die sequentiell ausgeführt werden.
</Callout>
## Überblick
Der Parallel-Block ermöglicht es dir:
<Steps>
<Step>
<strong>Arbeit zu verteilen</strong>: Mehrere Elemente gleichzeitig zu verarbeiten
</Step>
<Step>
<strong>Ausführung zu beschleunigen</strong>: Unabhängige Operationen gleichzeitig auszuführen
</Step>
<Step>
<strong>Massenoperationen zu bewältigen</strong>: Große Datensätze effizient zu verarbeiten
</Step>
<Step>
<strong>Ergebnisse zu aggregieren</strong>: Ausgaben aus allen parallelen Ausführungen zu sammeln
</Step>
</Steps>
## Konfigurationsoptionen
### Parallel-Typ
Wähle zwischen zwei Arten der parallelen Ausführung:
Wählen Sie zwischen zwei Arten der parallelen Ausführung:
<Tabs items={['Count-based', 'Collection-based']}>
<Tab>
**Anzahlbasierte Parallelität** - Führe eine feste Anzahl paralleler Instanzen aus:
**Anzahlbasierte Parallelisierung** - Führen Sie eine feste Anzahl paralleler Instanzen aus:
<div className="flex justify-center">
<Image
@@ -54,21 +32,24 @@ Wähle zwischen zwei Arten der parallelen Ausführung:
/>
</div>
Verwende dies, wenn du dieselbe Operation mehrmals gleichzeitig ausführen musst.
Verwenden Sie diese Option, wenn Sie dieselbe Operation mehrmals gleichzeitig ausführen müssen.
```
Example: Run 5 parallel instances
- Instance 1 ┐
- Instance 2 ├─ All execute simultaneously
- Instance 3 │
- Instance 4 │
- Instance 5 ┘
```
```javascript
// Beispiel: 3 parallele Instanzen ausführen
const results = await blocks.parallel({
type: 'count',
count: 3,
async process(index) {
// Jede Instanz erhält einen eindeutigen Index (0, 1, 2)
return `Ergebnis von Instanz ${index}`;
}
});
```
</Tab>
<Tab>
**Sammlungsbasierte Parallelität** - Verteile eine Sammlung auf parallele Instanzen:
**Sammlungsbasierte Parallelisierung** - Verteilen Sie eine Sammlung auf parallele Instanzen:
<div className="flex justify-center">
<Image
@@ -83,45 +64,57 @@ Wähle zwischen zwei Arten der parallelen Ausführung:
Jede Instanz verarbeitet gleichzeitig ein Element aus der Sammlung.
```
Example: Process ["task1", "task2", "task3"] in parallel
- Instance 1: Process "task1" ┐
- Instance 2: Process "task2" ├─ All execute simultaneously
- Instance 3: Process "task3" ┘
```
```javascript
// Beispiel: Eine Liste von URLs parallel verarbeiten
const urls = [
'https://example.com/api/1',
'https://example.com/api/2',
'https://example.com/api/3'
];
const results = await blocks.parallel({
type: 'collection',
items: urls,
async process(url, index) {
// Jede Instanz verarbeitet eine URL
const response = await fetch(url);
return response.json();
}
});
```
</Tab>
</Tabs>
## Wie man Parallel-Blöcke verwendet
## Verwendung von Parallel-Blöcken
### Einen Parallel-Block erstellen
### Erstellen eines Parallel-Blocks
1. Ziehe einen Parallel-Block aus der Werkzeugleiste auf deine Leinwand
2. Konfiguriere den Parallel-Typ und die Parameter
3. Ziehe einen einzelnen Block in den Parallel-Container
4. Verbinde den Block nach Bedarf
1. Ziehen Sie einen Parallel-Block aus der Symbolleiste auf Ihre Leinwand
2. Konfigurieren Sie den Parallel-Typ und die Parameter
3. Ziehen Sie einen einzelnen Block in den Parallel-Container
4. Verbinden Sie den Block nach Bedarf
### Auf Ergebnisse zugreifen
### Zugriff auf Ergebnisse
Nach Abschluss eines parallelen Blocks können Sie auf aggregierte Ergebnisse zugreifen:
Nach Abschluss eines Parallel-Blocks können Sie auf aggregierte Ergebnisse zugreifen:
- **`<parallel.results>`**: Array mit Ergebnissen aus allen parallelen Instanzen
- **`results`**: Array von Ergebnissen aus allen parallelen Instanzen
## Beispielanwendungsfälle
### Batch-API-Verarbeitung
**Batch-API-Verarbeitung** - Verarbeiten Sie mehrere API-Aufrufe gleichzeitig
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Mehrere API-Aufrufe gleichzeitig verarbeiten</h4>
<h4 className="font-medium">Szenario: Mehrere API-Endpunkte abfragen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Paralleler Block mit einer Sammlung von API-Endpunkten</li>
<li>Innerhalb des parallelen Blocks: API-Block ruft jeden Endpunkt auf</li>
<li>Nach dem parallelen Block: Alle Antworten gemeinsam verarbeiten</li>
<li>Sammlungsbasierte Parallelisierung über eine Liste von API-Endpunkten</li>
<li>Jede Instanz führt einen API-Aufruf durch und verarbeitet die Antwort</li>
<li>Ergebnisse werden in einem Array gesammelt und können weiterverarbeitet werden</li>
</ol>
</div>
### Multi-Modell-KI-Verarbeitung
**Multi-Modell-KI-Verarbeitung** - Erhalten Sie Antworten von mehreren KI-Modellen gleichzeitig
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Antworten von mehreren KI-Modellen erhalten</h4>
@@ -138,11 +131,7 @@ Nach Abschluss eines parallelen Blocks können Sie auf aggregierte Ergebnisse zu
Ergebnisse aus allen parallelen Instanzen werden automatisch gesammelt:
```javascript
// In a Function block after the parallel
const allResults = input.parallel.results;
// Returns: [result1, result2, result3, ...]
```
### Anwendungsbeispiele
### Instanzisolierung
@@ -155,27 +144,23 @@ Jede parallele Instanz läuft unabhängig:
<Callout type="warning">
Container-Blöcke (Schleifen und Parallele) können nicht ineinander verschachtelt werden. Das bedeutet:
- Sie können keinen Schleifenblock in einen parallelen Block platzieren
- Sie können keinen weiteren parallelen Block in einen parallelen Block platzieren
- Sie können keinen Schleifenblock in einen Parallelblock platzieren
- Sie können keinen weiteren Parallelblock in einen Parallelblock platzieren
- Sie können keinen Container-Block in einen anderen Container-Block platzieren
</Callout>
<Callout type="warning">
Parallele Blöcke können nur einen einzigen Block enthalten. Sie können nicht mehrere Blöcke haben, die innerhalb eines parallelen Blocks miteinander verbunden sind - in diesem Fall würde nur der erste Block ausgeführt werden.
</Callout>
<Callout type="info">
Obwohl die parallele Ausführung schneller ist, sollten Sie Folgendes beachten:
Während die parallele Ausführung schneller ist, beachten Sie bitte:
- API-Ratenbegrenzungen bei gleichzeitigen Anfragen
- Speichernutzung bei großen Datensätzen
- Speicherverbrauch bei großen Datensätzen
- Maximum von 20 gleichzeitigen Instanzen, um Ressourcenerschöpfung zu vermeiden
</Callout>
## Parallel vs. Loop
## Parallel vs. Schleife
Verstehen, wann was zu verwenden ist:
Wann Sie welche Methode verwenden sollten:
| Funktion | Parallel | Loop |
| Funktion | Parallel | Schleife |
|---------|----------|------|
| Ausführung | Gleichzeitig | Sequentiell |
| Geschwindigkeit | Schneller für unabhängige Operationen | Langsamer, aber geordnet |
@@ -185,17 +170,17 @@ Verstehen, wann was zu verwenden ist:
## Eingaben und Ausgaben
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Parallel-Typ</strong>: Wählen Sie zwischen 'count' oder 'collection'
</li>
<li>
<strong>Count</strong>: Anzahl der auszuführenden Instanzen (anzahlbasiert)
<strong>Anzahl</strong>: Anzahl der auszuführenden Instanzen (anzahlbasiert)
</li>
<li>
<strong>Collection</strong>: Array oder Objekt zur Verteilung (sammlungsbasiert)
<strong>Sammlung</strong>: Array oder Objekt zur Verteilung (sammlungsbasiert)
</li>
</ul>
</Tab>
@@ -218,7 +203,7 @@ Verstehen, wann was zu verwenden ist:
<strong>parallel.results</strong>: Array aller Instanzergebnisse
</li>
<li>
<strong>Access</strong>: Verfügbar in Blöcken nach dem Parallel
<strong>Zugriff</strong>: Verfügbar in Blöcken nach der Parallelausführung
</li>
</ul>
</Tab>
@@ -227,5 +212,5 @@ Verstehen, wann was zu verwenden ist:
## Best Practices
- **Nur unabhängige Operationen**: Stellen Sie sicher, dass Operationen nicht voneinander abhängen
- **Rate-Limits berücksichtigen**: Fügen Sie Verzögerungen oder Drosselungen für API-intensive Workflows hinzu
- **Ratenbegrenzungen berücksichtigen**: Fügen Sie Verzögerungen oder Drosselungen für API-intensive Workflows hinzu
- **Fehlerbehandlung**: Jede Instanz sollte ihre eigenen Fehler angemessen behandeln

View File

@@ -3,11 +3,10 @@ title: Antwort
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Antwort-Block ist der letzte Schritt in deinem Workflow, der eine strukturierte Antwort formatiert und an API-Aufrufe zurücksendet. Er funktioniert wie eine "return"-Anweisung für deinen gesamten Workflow er verpackt Ergebnisse und sendet sie zurück.
Der Response-Block formatiert und sendet strukturierte HTTP-Antworten zurück an API-Aufrufer. Verwenden Sie ihn, um Workflow-Ergebnisse mit korrekten Statuscodes und Headern zurückzugeben.
<div className="flex justify-center">
<Image
@@ -20,57 +19,9 @@ Der Antwort-Block ist der letzte Schritt in deinem Workflow, der eine strukturie
</div>
<Callout type="info">
Antwort-Blöcke sind terminale Blöcke - sie beenden die Workflow-Ausführung und können nicht mit anderen Blöcken verbunden werden.
Response-Blöcke sind terminale Blöcke - sie beenden die Workflow-Ausführung und können nicht mit anderen Blöcken verbunden werden.
</Callout>
## Überblick
Der Antwort-Block ermöglicht dir:
<Steps>
<Step>
<strong>API-Antworten formatieren</strong>: Strukturierung von Workflow-Ergebnissen in korrekte HTTP-Antworten
</Step>
<Step>
<strong>Statuscodes festlegen</strong>: Konfiguration passender HTTP-Statuscodes basierend auf Workflow-Ergebnissen
</Step>
<Step>
<strong>Header kontrollieren</strong>: Hinzufügen benutzerdefinierter Header für API-Antworten und Webhooks
</Step>
<Step>
<strong>Daten transformieren</strong>: Umwandlung von Workflow-Variablen in client-freundliche Antwortformate
</Step>
</Steps>
## Wie es funktioniert
Der Antwort-Block schließt die Workflow-Ausführung ab:
1. **Daten sammeln** - Sammelt Variablen und Ausgaben von vorherigen Blöcken
2. **Antwort formatieren** - Strukturiert Daten gemäß deiner Konfiguration
3. **HTTP-Details festlegen** - Wendet Statuscodes und Header an
4. **Antwort senden** - Gibt die formatierte Antwort an den API-Aufrufer zurück
## Wann du Antwort-Blöcke benötigst
- **API-Endpunkte**: Wenn dein Workflow über eine API aufgerufen wird, formatieren Antwort-Blöcke die Rückgabedaten
- **Webhooks**: Rückgabe von Bestätigungen oder Daten an das aufrufende System
- **Testen**: Anzeige formatierter Ergebnisse beim Testen deines Workflows
## Zwei Möglichkeiten zum Erstellen von Antworten
### Builder-Modus (Empfohlen)
Visuelle Oberfläche zum Erstellen der Antwortstruktur:
- Felder per Drag-and-Drop einfügen
- Einfache Referenzierung von Workflow-Variablen
- Visuelle Vorschau der Antwortstruktur
### Editor-Modus (Fortgeschritten)
JSON direkt schreiben:
- Volle Kontrolle über das Antwortformat
- Unterstützung für komplexe verschachtelte Strukturen
- Verwendung der `<variable.name>`Syntax für dynamische Werte
## Konfigurationsoptionen
### Antwortdaten
@@ -78,42 +29,29 @@ JSON direkt schreiben:
Die Antwortdaten sind der Hauptinhalt, der an den API-Aufrufer zurückgesendet wird. Diese sollten als JSON formatiert sein und können Folgendes enthalten:
- Statische Werte
- Dynamische Verweise auf Workflow-Variablen mit der `<variable.name>`Syntax
- Dynamische Verweise auf Workflow-Variablen mit der `<variable.name>` Syntax
- Verschachtelte Objekte und Arrays
- Jede gültige JSON-Struktur
### Statuscode
Legen Sie den HTTP-Statuscode für die Antwort fest. Häufige Statuscodes sind:
Legen Sie den HTTP-Statuscode für die Antwort fest (standardmäßig 200):
<Tabs items={['Erfolg (2xx)', 'Client-Fehler (4xx)', 'Server-Fehler (5xx)']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>200</strong>: OK - Standard-Erfolgsantwort</li>
<li><strong>201</strong>: Erstellt - Ressource erfolgreich erstellt</li>
<li><strong>204</strong>: Kein Inhalt - Erfolg ohne Antworttext</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>400</strong>: Ungültige Anfrage - Ungültige Anfrageparameter</li>
<li><strong>401</strong>: Nicht autorisiert - Authentifizierung erforderlich</li>
<li><strong>404</strong>: Nicht gefunden - Ressource existiert nicht</li>
<li><strong>422</strong>: Nicht verarbeitbare Entität - Validierungsfehler</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>500</strong>: Interner Serverfehler - Serverseitiger Fehler</li>
<li><strong>502</strong>: Bad Gateway - Fehler eines externen Dienstes</li>
<li><strong>503</strong>: Dienst nicht verfügbar - Dienst vorübergehend nicht erreichbar</li>
</ul>
</Tab>
</Tabs>
**Erfolg (2xx):**
- **200**: OK - Standard-Erfolgsantwort
- **201**: Erstellt - Ressource erfolgreich erstellt
- **204**: Kein Inhalt - Erfolg ohne Antworttext
<div className="mt-4 text-sm text-gray-600 dark:text-gray-400">
Der Standard-Statuscode ist 200, wenn nicht anders angegeben.
</div>
**Client-Fehler (4xx):**
- **400**: Ungültige Anfrage - Ungültige Anfrageparameter
- **401**: Nicht autorisiert - Authentifizierung erforderlich
- **404**: Nicht gefunden - Ressource existiert nicht
- **422**: Nicht verarbeitbare Entität - Validierungsfehler
**Server-Fehler (5xx):**
- **500**: Interner Serverfehler - Serverseitiger Fehler
- **502**: Bad Gateway - Fehler eines externen Dienstes
- **503**: Dienst nicht verfügbar - Dienst vorübergehend nicht erreichbar
### Antwort-Header
@@ -129,91 +67,27 @@ Header werden als Schlüssel-Wert-Paare konfiguriert:
## Beispielanwendungsfälle
### API-Endpunkt-Antwort
**API-Endpunkt-Antwort** - Strukturierte Daten von einer Such-API zurückgeben
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Strukturierte Daten von einer Such-API zurückgeben</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Workflow verarbeitet Suchanfrage und ruft Ergebnisse ab</li>
<li>Funktionsblock formatiert und paginiert Ergebnisse</li>
<li>Antwortblock gibt JSON mit Daten, Paginierung und Metadaten zurück</li>
<li>Client erhält strukturierte Antwort mit Status 200</li>
</ol>
</div>
```
Agent (Search) → Function (Format & Paginate) → Response (200, JSON)
```
### Webhook-Bestätigung
**Webhook-Bestätigung** - Bestätigung des Webhook-Empfangs und der Verarbeitung
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Bestätigung des Webhook-Empfangs und der Verarbeitung</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Webhook-Trigger empfängt Daten vom externen System</li>
<li>Workflow verarbeitet die eingehenden Daten</li>
<li>Antwortblock gibt Bestätigung mit Verarbeitungsstatus zurück</li>
<li>Externes System erhält Bestätigung</li>
</ol>
</div>
```
Webhook Trigger → Function (Process) → Response (200, Confirmation)
```
### Fehlerantwort-Behandlung
**Fehlerantwort-Behandlung** - Angemessene Fehlerantworten zurückgeben
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Angemessene Fehlerantworten zurückgeben</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Bedingungsblock erkennt Validierungsfehler oder Systemfehler</li>
<li>Router leitet zum Fehlerbehandlungspfad weiter</li>
<li>Antwortblock gibt Status 400/500 mit Fehlerdetails zurück</li>
<li>Client erhält strukturierte Fehlerinformationen</li>
</ol>
</div>
```
Condition (Error Detected) → Router → Response (400/500, Error Details)
```
## Eingaben und Ausgaben
## Ausgaben
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Antwortdaten</strong>: JSON-Struktur für den Antworttext
</li>
<li>
<strong>Statuscode</strong>: HTTP-Statuscode (Standard: 200)
</li>
<li>
<strong>Header</strong>: Benutzerdefinierte HTTP-Header als Schlüssel-Wert-Paare
</li>
<li>
<strong>Modus</strong>: Builder- oder Editor-Modus für die Antworterstellung
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>response.data</strong>: Der strukturierte Antworttext
</li>
<li>
<strong>response.status</strong>: Gesendeter HTTP-Statuscode
</li>
<li>
<strong>response.headers</strong>: In der Antwort enthaltene Header
</li>
<li>
<strong>response.success</strong>: Boolescher Wert, der erfolgreichen Abschluss anzeigt
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>HTTP-Antwort</strong>: Vollständige Antwort an den API-Aufrufer
</li>
<li>
<strong>Workflow-Beendigung</strong>: Beendet die Workflow-Ausführung
</li>
<li>
<strong>Zugriff</strong>: Antwortblöcke sind terminal - keine nachfolgenden Blöcke
</li>
</ul>
</Tab>
</Tabs>
Antwortblöcke sind endgültig - sie beenden die Workflow-Ausführung und senden die HTTP-Antwort an den API-Aufrufer. Es stehen keine Ausgaben für nachgelagerte Blöcke zur Verfügung.
## Variablenreferenzen
@@ -240,7 +114,7 @@ Verwenden Sie die `<variable.name>` Syntax, um Workflow-Variablen dynamisch in I
## Best Practices
- **Verwenden Sie aussagekräftige Statuscodes**: Wählen Sie passende HTTP-Statuscodes, die das Ergebnis des Workflows genau widerspiegeln
- **Strukturieren Sie Ihre Antworten einheitlich**: Behalten Sie eine konsistente JSON-Struktur über alle API-Endpunkte hinweg für eine bessere Entwicklererfahrung bei
- **Fügen Sie relevante Metadaten hinzu**: Ergänzen Sie Zeitstempel und Versionsinformationen, um bei der Fehlersuche und Überwachung zu helfen
- **Strukturieren Sie Ihre Antworten einheitlich**: Behalten Sie eine konsistente JSON-Struktur über alle Ihre API-Endpunkte bei, um eine bessere Entwicklererfahrung zu gewährleisten
- **Fügen Sie relevante Metadaten hinzu**: Fügen Sie Zeitstempel und Versionsinformationen hinzu, um bei der Fehlerbehebung und Überwachung zu helfen
- **Behandeln Sie Fehler elegant**: Verwenden Sie bedingte Logik in Ihrem Workflow, um angemessene Fehlerantworten mit aussagekräftigen Meldungen zu setzen
- **Validieren Sie Variablenreferenzen**: Stellen Sie sicher, dass alle referenzierten Variablen existieren und die erwarteten Datentypen enthalten, bevor der Response-Block ausgeführt wird
- **Validieren Sie Variablenreferenzen**: Stellen Sie sicher, dass alle referenzierten Variablen existieren und die erwarteten Datentypen enthalten, bevor der Antwortblock ausgeführt wird

View File

@@ -3,13 +3,10 @@ title: Router
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Der Router-Block nutzt KI, um intelligent zu entscheiden, welchen Pfad Ihr Workflow als nächstes nehmen sollte, indem er die Workflow-Ausführung basierend auf spezifischen Bedingungen oder Logik leitet. Im Gegensatz zu Bedingungsblöcken, die einfache Regeln verwenden, können Router-Blöcke den Kontext verstehen und intelligente Routing-Entscheidungen auf Basis von Inhaltsanalysen treffen.
Der Router-Block verwendet KI, um Workflows basierend auf Inhaltsanalysen intelligent zu leiten. Im Gegensatz zu Bedingungsblöcken, die einfache Regeln verwenden, verstehen Router Kontext und Absicht.
<div className="flex justify-center">
<Image
@@ -21,203 +18,83 @@ Der Router-Block nutzt KI, um intelligent zu entscheiden, welchen Pfad Ihr Workf
/>
</div>
## Überblick
## Router vs. Bedingung
Der Router-Block ermöglicht Ihnen:
**Verwende Router, wenn:**
- KI-gestützte Inhaltsanalyse benötigt wird
- Mit unstrukturierten oder variierenden Inhalten gearbeitet wird
- Absichtsbasierte Weiterleitung erforderlich ist (z.B. "Support-Tickets an Abteilungen weiterleiten")
<Steps>
<Step>
<strong>Intelligentes Content-Routing</strong>: Nutzung von KI zum Verständnis von Absicht und Kontext
</Step>
<Step>
<strong>Dynamische Pfadauswahl</strong>: Routing von Workflows basierend auf unstrukturierter Inhaltsanalyse
</Step>
<Step>
<strong>Kontextbewusste Entscheidungen</strong>: Treffen intelligenter Routing-Entscheidungen über einfache Regeln hinaus
</Step>
<Step>
<strong>Multi-Pfad-Management</strong>: Verwaltung komplexer Workflows mit mehreren potenziellen Zielen
</Step>
</Steps>
## Router vs. Bedingungsblöcke
<Accordions>
<Accordion title="Wann Router verwenden">
- KI-gestützte Inhaltsanalyse erforderlich
- Unstrukturierte oder variierende Inhaltstypen
- Absichtsbasiertes Routing (z.B. "Support-Tickets an Abteilungen weiterleiten")
- Kontextbewusste Entscheidungsfindung erforderlich
</Accordion>
<Accordion title="Wann Bedingung verwenden">
- Einfache, regelbasierte Entscheidungen
- Strukturierte Daten oder numerische Vergleiche
- Schnelles, deterministisches Routing erforderlich
- Boolesche Logik ausreichend
</Accordion>
</Accordions>
## Funktionsweise
Der Router-Block:
<Steps>
<Step>
<strong>Analysiert Inhalte</strong>: Verwendet ein LLM, um Eingabeinhalte und Kontext zu verstehen
</Step>
<Step>
<strong>Bewertet Ziele</strong>: Vergleicht Inhalte mit verfügbaren Zielblöcken
</Step>
<Step>
<strong>Wählt Ziel aus</strong>: Identifiziert den am besten geeigneten Pfad basierend auf der Absicht
</Step>
<Step>
<strong>Leitet Ausführung</strong>: Dirigiert den Workflow zum ausgewählten Block
</Step>
</Steps>
**Verwende Bedingung, wenn:**
- Einfache regelbasierte Entscheidungen ausreichen
- Mit strukturierten Daten oder numerischen Vergleichen gearbeitet wird
- Schnelle, deterministische Weiterleitung benötigt wird
## Konfigurationsoptionen
### Inhalt/Prompt
Der Inhalt oder Prompt, den der Router analysiert, um Routing-Entscheidungen zu treffen. Dies kann sein:
Der Inhalt oder Prompt, den der Router analysieren wird, um Weiterleitungsentscheidungen zu treffen. Dies kann sein:
- Eine direkte Benutzeranfrage oder -eingabe
- Ausgabe aus einem vorherigen Block
- Eine vom System generierte Nachricht
- Ausgabe eines vorherigen Blocks
- Eine systemgenerierte Nachricht
### Zielblöcke
Die möglichen Zielblöcke, aus denen der Router auswählen kann. Der Router erkennt automatisch verbundene Blöcke, aber Sie können auch:
Die möglichen Zielblöcke, aus denen der Router auswählen kann. Der Router erkennt automatisch verbundene Blöcke, aber du kannst auch:
- Die Beschreibungen der Zielblöcke anpassen, um die Routing-Genauigkeit zu verbessern
- Routing-Kriterien für jeden Zielblock festlegen
- Bestimmte Blöcke von der Berücksichtigung als Routing-Ziele ausschließen
- Die Beschreibungen von Zielblöcken anpassen, um die Weiterleitungsgenauigkeit zu verbessern
- Weiterleitungskriterien für jeden Zielblock festlegen
- Bestimmte Blöcke von der Berücksichtigung als Weiterleitungsziele ausschließen
### Modellauswahl
Wählen Sie ein KI-Modell für die Routing-Entscheidung:
Wähle ein KI-Modell für die Weiterleitungsentscheidung:
**OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1 \
**Anthropic**: Claude 3.7 Sonnet \
**Google**: Gemini 2.5 Pro, Gemini 2.0 Flash \
**Andere Anbieter**: Groq, Cerebras, xAI, DeepSeek \
**Lokale Modelle**: Jedes Modell, das auf Ollama läuft
- **OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1
- **Anthropic**: Claude 3.7 Sonnet
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, DeepSeek
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="router-model-dropdown.mp4" width={500} height={350} />
</div>
**Empfehlung**: Verwenden Sie Modelle mit starken Reasoning-Fähigkeiten wie GPT-4o oder Claude 3.7 Sonnet für genauere Routing-Entscheidungen.
Verwende Modelle mit starken Argumentationsfähigkeiten wie GPT-4o oder Claude 3.7 Sonnet für beste Ergebnisse.
### API-Schlüssel
Ihr API-Schlüssel für den ausgewählten LLM-Anbieter. Dieser wird sicher gespeichert und für die Authentifizierung verwendet.
### Zugriff auf Ergebnisse
## Ausgaben
Nachdem ein Router eine Entscheidung getroffen hat, können Sie auf seine Ausgaben zugreifen:
- **`<router.prompt>`**: Zusammenfassung des verwendeten Routing-Prompts
- **`<router.selected_path>`**: Details zum ausgewählten Zielblock
- **`<router.tokens>`**: Token-Nutzungsstatistiken vom LLM
- **`<router.cost>`**: Kostenübersicht für den Routing-Aufruf (Eingabe, Ausgabe, Gesamt)
- **`<router.model>`**: Das für die Entscheidungsfindung verwendete Modell
## Erweiterte Funktionen
### Benutzerdefinierte Routing-Kriterien
Definieren Sie spezifische Kriterien für jeden Zielblock:
```javascript
// Example routing descriptions
Target Block 1: "Technical support issues, API problems, integration questions"
Target Block 2: "Billing inquiries, subscription changes, payment issues"
Target Block 3: "General questions, feedback, feature requests"
```
## Eingaben und Ausgaben
<Tabs items={['Konfiguration', 'Variablen']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Inhalt/Prompt</strong>: Zu analysierender Text für Routing-Entscheidungen
</li>
<li>
<strong>Zielblöcke</strong>: Verbundene Blöcke als potenzielle Ziele
</li>
<li>
<strong>Modell</strong>: KI-Modell für Routing-Analyse
</li>
<li>
<strong>API-Schlüssel</strong>: Authentifizierung für ausgewählten LLM-Anbieter
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>router.prompt</strong>: Zusammenfassung des verwendeten Routing-Prompts
</li>
<li>
<strong>router.selected_path</strong>: Details zum gewählten Ziel
</li>
<li>
<strong>router.tokens</strong>: Token-Nutzungsstatistiken
</li>
<li>
<strong>router.cost</strong>: Kostenübersicht für den Routing-Aufruf (Eingabe, Ausgabe, Gesamt)
</li>
<li>
<strong>router.model</strong>: Für die Entscheidungsfindung verwendetes Modell
</li>
</ul>
</Tab>
</Tabs>
- **`<router.prompt>`**: Zusammenfassung des Routing-Prompts
- **`<router.selected_path>`**: Ausgewählter Zielblock
- **`<router.tokens>`**: Token-Nutzungsstatistiken
- **`<router.cost>`**: Geschätzte Routing-Kosten
- **`<router.model>`**: Für die Entscheidungsfindung verwendetes Modell
## Beispielanwendungsfälle
### Kundensupport-Triage
**Kundensupport-Triage** - Tickets an spezialisierte Abteilungen weiterleiten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Support-Tickets an spezialisierte Abteilungen weiterleiten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Benutzer reicht Supportanfrage über Formular ein</li>
<li>Router analysiert Ticket-Inhalt und Kontext</li>
<li>Technische Probleme → Engineering-Support-Mitarbeiter</li>
<li>Abrechnungsfragen → Finanz-Support-Mitarbeiter</li>
</ol>
</div>
```
Input (Ticket) → Router → Agent (Engineering) or Agent (Finance)
```
### Inhaltsklassifizierung
**Inhaltsklassifizierung** - Nutzergenerierte Inhalte klassifizieren und weiterleiten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Benutzergenerierte Inhalte klassifizieren und weiterleiten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Benutzer reicht Inhalt oder Feedback ein</li>
<li>Router analysiert Inhaltstyp und Stimmung</li>
<li>Feature-Anfragen → Produkt-Team-Workflow</li>
<li>Fehlerberichte → Technischer Support-Workflow</li>
</ol>
</div>
```
Input (Feedback) → Router → Workflow (Product) or Workflow (Technical)
```
### Lead-Qualifizierung
**Lead-Qualifizierung** - Leads basierend auf Qualifizierungskriterien weiterleiten
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Leads basierend auf Qualifizierungskriterien weiterleiten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Lead-Informationen aus Formular erfasst</li>
<li>Router analysiert Unternehmensgröße, Branche und Bedürfnisse</li>
<li>Enterprise-Leads → Vertriebsteam mit individueller Preisgestaltung</li>
<li>KMU-Leads → Self-Service-Onboarding-Prozess</li>
</ol>
</div>
```
Input (Lead) → Router → Agent (Enterprise Sales) or Workflow (Self-serve)
```
## Best Practices
- **Klare Zielbeschreibungen bereitstellen**: Helfen Sie dem Router zu verstehen, wann jedes Ziel mit spezifischen, detaillierten Beschreibungen ausgewählt werden soll
- **Klare Zielbeschreibungen bereitstellen**: Helfen Sie dem Router zu verstehen, wann jedes Ziel ausgewählt werden soll, mit spezifischen, detaillierten Beschreibungen
- **Spezifische Routing-Kriterien verwenden**: Definieren Sie klare Bedingungen und Beispiele für jeden Pfad, um die Genauigkeit zu verbessern
- **Fallback-Pfade implementieren**: Verbinden Sie ein Standardziel für Fälle, in denen kein spezifischer Pfad geeignet ist
- **Mit verschiedenen Eingaben testen**: Stellen Sie sicher, dass der Router verschiedene Eingabetypen, Grenzfälle und unerwartete Inhalte verarbeiten kann

View File

@@ -0,0 +1,86 @@
---
title: Variablen
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Image } from '@/components/ui/image'
Der Variablen-Block aktualisiert Workflow-Variablen während der Ausführung. Variablen müssen zuerst im Variablen-Bereich deines Workflows initialisiert werden, dann kannst du diesen Block verwenden, um ihre Werte während der Ausführung deines Workflows zu aktualisieren.
<div className="flex justify-center">
<Image
src="/static/blocks/variables.png"
alt="Variablen-Block"
width={500}
height={400}
className="my-6"
/>
</div>
<Callout>
Greife überall in deinem Workflow auf Variablen zu, indem du die `<variable.variableName>` Syntax verwendest.
</Callout>
## Wie man Variablen verwendet
### 1. Initialisierung in Workflow-Variablen
Erstellen Sie zunächst Ihre Variablen im Variablenbereich des Workflows (zugänglich über die Workflow-Einstellungen):
```
customerEmail = ""
retryCount = 0
currentStatus = "pending"
```
### 2. Aktualisierung mit dem Variablen-Block
Verwenden Sie den Variablen-Block, um diese Werte während der Ausführung zu aktualisieren:
```
customerEmail = <api.email>
retryCount = <variable.retryCount> + 1
currentStatus = "processing"
```
### 3. Überall zugreifen
Referenzieren Sie Variablen in jedem Block:
```
Agent prompt: "Send email to <variable.customerEmail>"
Condition: <variable.retryCount> < 5
API body: {"status": "<variable.currentStatus>"}
```
## Beispielanwendungsfälle
**Schleifenzähler und Status** - Fortschritt durch Iterationen verfolgen
```
Loop → Agent (Process) → Variables (itemsProcessed + 1) → Variables (Store lastResult)
```
**Wiederholungslogik** - API-Wiederholungsversuche verfolgen
```
API (Try) → Variables (retryCount + 1) → Condition (retryCount < 3)
```
**Dynamische Konfiguration** - Benutzerkontext für Workflow speichern
```
API (Fetch Profile) → Variables (userId, userTier) → Agent (Personalize)
```
## Ausgaben
- **`<variables.assignments>`**: JSON-Objekt mit allen Variablenzuweisungen aus diesem Block
## Bewährte Praktiken
- **In Workflow-Einstellungen initialisieren**: Erstellen Sie Variablen immer im Variablenbereich des Workflows, bevor Sie sie verwenden
- **Dynamisch aktualisieren**: Verwenden Sie Variablen-Blöcke, um Werte basierend auf Block-Ausgaben oder Berechnungen zu aktualisieren
- **In Schleifen verwenden**: Perfekt für die Verfolgung des Status über Iterationen hinweg
- **Beschreibend benennen**: Verwenden Sie klare Namen wie `currentIndex`, `totalProcessed` oder `lastError`

View File

@@ -0,0 +1,67 @@
---
title: Warten
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Image } from '@/components/ui/image'
Der Warten-Block pausiert deinen Workflow für eine bestimmte Zeit, bevor er mit dem nächsten Block fortfährt. Verwende ihn, um Verzögerungen zwischen Aktionen einzufügen, API-Ratenbegrenzungen einzuhalten oder Operationen zeitlich zu verteilen.
<div className="flex justify-center">
<Image
src="/static/blocks/wait.png"
alt="Warte-Block"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfiguration
### Wartezeit
Geben Sie die Dauer für die Ausführungspause ein:
- **Eingabe**: Positive Zahl
- **Maximum**: 600 Sekunden (10 Minuten) oder 10 Minuten
### Einheit
Wählen Sie die Zeiteinheit:
- **Sekunden**: Für kurze, präzise Verzögerungen
- **Minuten**: Für längere Pausen
<Callout type="info">
Warteblöcke können durch Stoppen des Workflows abgebrochen werden. Die maximale Wartezeit beträgt 10 Minuten.
</Callout>
## Ausgaben
- **`<wait.waitDuration>`**: Die Wartezeit in Millisekunden
- **`<wait.status>`**: Status der Wartezeit ('waiting', 'completed' oder 'cancelled')
## Beispielanwendungsfälle
**API-Ratenbegrenzung** - Bleiben Sie zwischen Anfragen innerhalb der API-Ratenlimits
```
API (Request 1) → Wait (2s) → API (Request 2)
```
**Zeitgesteuerte Benachrichtigungen** - Senden Sie Folgenachrichten nach einer Verzögerung
```
Function (Send Email) → Wait (5min) → Function (Follow-up)
```
**Verarbeitungsverzögerungen** - Warten Sie, bis das externe System die Verarbeitung abgeschlossen hat
```
API (Trigger Job) → Wait (30s) → API (Check Status)
```
## Bewährte Praktiken
- **Halten Sie Wartezeiten angemessen**: Verwenden Sie Wait für Verzögerungen bis zu 10 Minuten. Für längere Verzögerungen sollten Sie geplante Workflows in Betracht ziehen
- **Überwachen Sie die Ausführungszeit**: Denken Sie daran, dass Wartezeiten die Gesamtdauer des Workflows verlängern

View File

@@ -12,8 +12,8 @@ import { Image } from '@/components/ui/image'
<Image
src='/static/blocks/workflow.png'
alt='Workflow-Block-Konfiguration'
width={400}
height={280}
width={500}
height={400}
className='rounded-xl border border-border shadow-sm'
/>
</div>
@@ -24,15 +24,38 @@ Füge einen Workflow-Block hinzu, wenn du einen untergeordneten Workflow als Tei
1. **Wähle einen Workflow** aus dem Dropdown-Menü (Selbstreferenzen sind blockiert, um Schleifen zu verhindern).
2. **Eingaben zuordnen**: Wenn der untergeordnete Workflow einen Eingabeformular-Trigger hat, siehst du jedes Feld und kannst übergeordnete Variablen verbinden. Die zugeordneten Werte sind das, was der untergeordnete Workflow erhält.
3. **Ausgaben**: Nach Abschluss des untergeordneten Workflows stellt der Block folgendes bereit:
<div className='flex justify-center my-6'>
<Image
src='/static/blocks/workflow-2.png'
alt='Workflow-Block mit Beispiel für Eingabezuordnung'
width={700}
height={400}
className='rounded-xl border border-border shadow-sm'
/>
</div>
3. **Ausgaben**: Nachdem der untergeordnete Workflow abgeschlossen ist, stellt der Block folgendes bereit:
- `result` die endgültige Antwort des untergeordneten Workflows
- `success` ob er ohne Fehler ausgeführt wurde
- `error` Nachricht, wenn die Ausführung fehlschlägt
## Ausführungshinweise
## Bereitstellungsstatus-Badge
Der Workflow-Block zeigt ein Bereitstellungsstatus-Badge an, das dir hilft zu verfolgen, ob der untergeordnete Workflow ausführungsbereit ist:
- **Bereitgestellt** Der untergeordnete Workflow wurde bereitgestellt und ist einsatzbereit. Der Block führt die aktuell bereitgestellte Version aus.
- **Nicht bereitgestellt** Der untergeordnete Workflow wurde noch nie bereitgestellt. Du musst ihn bereitstellen, bevor der Workflow-Block ihn ausführen kann.
- **Erneut bereitstellen** Seit der letzten Bereitstellung wurden Änderungen im untergeordneten Workflow erkannt. Klicke auf das Badge, um den untergeordneten Workflow mit den neuesten Änderungen erneut bereitzustellen.
<Callout type="warn">
Der Workflow-Block führt immer die zuletzt bereitgestellte Version des untergeordneten Workflows aus, nicht die Editor-Version. Stelle sicher, dass du nach Änderungen eine erneute Bereitstellung durchführst, damit der Block die neueste Logik verwendet.
</Callout>
## Hinweise zur Ausführung
- Untergeordnete Workflows laufen im gleichen Workspace-Kontext, sodass Umgebungsvariablen und Tools übernommen werden.
- Der Block verwendet Deployment-Versionierung: Jede API-, Zeitplan-, Webhook-, manuelle oder Chat-Ausführung ruft den bereitgestellten Snapshot auf. Stelle den untergeordneten Workflow neu bereit, wenn du ihn änderst.
- Der Block verwendet Bereitstellungsversionierung: Jede API-, Zeitplan-, Webhook-, manuelle oder Chat-Ausführung ruft den bereitgestellten Snapshot auf. Stelle den untergeordneten Workflow nach Änderungen erneut bereit.
- Wenn der untergeordnete Workflow fehlschlägt, löst der Block einen Fehler aus, es sei denn, du behandelst ihn nachgelagert.
<Callout>

View File

@@ -1,9 +1,10 @@
---
title: Verbindungsgrundlagen
title: Grundlagen
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Video } from '@/components/ui/video'
## Wie Verbindungen funktionieren
@@ -28,7 +29,11 @@ Verbindungen sind die Pfade, die den Datenfluss zwischen Blöcken in Ihrem Workf
</Step>
</Steps>
### Verbindungsfluss
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
<Video src="connections-build.mp4" width={700} height={450} />
</div>
### Verbindungsablauf
Der Datenfluss durch Verbindungen folgt diesen Prinzipien:

View File

@@ -1,5 +1,5 @@
---
title: Verbindungsdatenstruktur
title: Datenstruktur
---
import { Callout } from 'fumadocs-ui/components/callout'
@@ -111,26 +111,24 @@ Verschiedene Blocktypen erzeugen unterschiedliche Ausgabestrukturen. Hier ist, w
```json
{
"content": "Original content passed through",
"conditionResult": true,
"selectedPath": {
"blockId": "2acd9007-27e8-4510-a487-73d3b825e7c1",
"blockType": "agent",
"blockTitle": "Follow-up Agent"
},
"selectedConditionId": "condition-1"
"selectedOption": "condition-1"
}
```
### Ausgabefelder des Condition-Blocks
- **content**: Der ursprüngliche, durchgeleitete Inhalt
- **conditionResult**: Boolesches Ergebnis der Bedingungsauswertung
- **selectedPath**: Informationen über den ausgewählten Pfad
- **blockId**: ID des nächsten Blocks im ausgewählten Pfad
- **blockType**: Typ des nächsten Blocks
- **blockTitle**: Titel des nächsten Blocks
- **selectedConditionId**: ID der ausgewählten Bedingung
- **selectedOption**: ID der ausgewählten Bedingung
</Tab>
<Tab>

View File

@@ -1,5 +1,5 @@
---
title: Verbindungen
title: Übersicht
description: Verbinde deine Blöcke miteinander.
---

View File

@@ -1,5 +1,5 @@
---
title: Verbindungs-Tags
title: Tags
---
import { Callout } from 'fumadocs-ui/components/callout'

View File

@@ -71,6 +71,16 @@ Diese kontextbezogenen Informationen helfen Copilot, genauere und relevantere Un
</Card>
</Cards>
<div className="flex justify-center">
<Image
src="/static/copilot/copilot-mode.png"
alt="Copilot-Modusauswahl-Oberfläche"
width={600}
height={400}
className="my-6"
/>
</div>
## Tiefenebenen
<Cards>
@@ -82,7 +92,7 @@ Diese kontextbezogenen Informationen helfen Copilot, genauere und relevantere Un
</span>
}
>
<div className="m-0 text-sm">Am schnellsten und günstigsten. Ideal für kleine Änderungen, einfache Workflows und geringfügige Anpassungen.</div>
<div className="m-0 text-sm">Am schnellsten und günstigsten. Ideal für kleine Änderungen, einfache Arbeitsabläufe und geringfügige Anpassungen.</div>
</Card>
<Card
title={
@@ -102,7 +112,7 @@ Diese kontextbezogenen Informationen helfen Copilot, genauere und relevantere Un
</span>
}
>
<div className="m-0 text-sm">Mehr Denkleistung für umfangreichere Workflows und komplexe Änderungen bei gleichzeitiger Leistungsfähigkeit.</div>
<div className="m-0 text-sm">Mehr Denkleistung für umfangreichere Arbeitsabläufe und komplexe Änderungen bei gleichzeitiger Leistungsfähigkeit.</div>
</Card>
<Card
title={
@@ -118,7 +128,7 @@ Diese kontextbezogenen Informationen helfen Copilot, genauere und relevantere Un
### Modusauswahl-Oberfläche
Du kannst einfach zwischen verschiedenen Denkmodi über den Modusauswähler in der Copilot-Oberfläche wechseln:
Du kannst einfach zwischen verschiedenen Denkmodi über die Modusauswahl in der Copilot-Oberfläche wechseln:
<Image
src="/static/copilot/copilot-models.png"
@@ -140,8 +150,8 @@ Wähle deinen Modus basierend auf der Komplexität deiner Aufgabe - verwende Sch
Die Copilot-Nutzung wird pro Token vom zugrundeliegenden LLM abgerechnet:
- **Eingabe-Tokens**: werden zum Basistarif des Anbieters berechnet (**zum Selbstkostenpreis**)
- **Ausgabe-Tokens**: werden mit dem **1,5-fachen** des Basisausgabepreises des Anbieters berechnet
- **Eingabe-Tokens**: werden zum Basispreis des Anbieters berechnet (**zum Selbstkostenpreis**)
- **Ausgabe-Tokens**: werden mit dem **1,5-fachen** des Basis-Ausgabepreises des Anbieters berechnet
```javascript
copilotCost = (inputTokens × inputPrice + outputTokens × (outputPrice × 1.5)) / 1,000,000
@@ -149,13 +159,13 @@ copilotCost = (inputTokens × inputPrice + outputTokens × (outputPrice × 1.5))
| Komponente | Angewendeter Tarif |
|------------|------------------------|
| Input | inputPrice |
| Output | outputPrice × 1,5 |
| Eingabe | inputPrice |
| Ausgabe | outputPrice × 1,5 |
<Callout type="warning">
Die angezeigten Preise spiegeln die Tarife vom 4. September 2025 wider. Überprüfen Sie die Anbieterdokumentation für aktuelle Preise.
Die angezeigten Preise spiegeln die Tarife vom 4. September 2025 wider. Überprüfen Sie die Anbieter-Dokumentation für aktuelle Preise.
</Callout>
<Callout type="info">
Modellpreise werden pro Million Token berechnet. Die Berechnung teilt durch 1.000.000, um die tatsächlichen Kosten zu ermitteln. Siehe <a href="/execution/costs">die Seite zur Kostenberechnung</a> für Hintergründe und Beispiele.
Modellpreise werden pro Million Tokens angegeben. Die Berechnung teilt durch 1.000.000, um die tatsächlichen Kosten zu ermitteln. Siehe <a href="/execution/costs">die Seite zur Kostenberechnung</a> für Hintergründe und Beispiele.
</Callout>

View File

@@ -2,10 +2,8 @@
title: Externe API
---
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { CodeBlock } from 'fumadocs-ui/components/codeblock'
import { Video } from '@/components/ui/video'
Sim bietet eine umfassende externe API zum Abfragen von Workflow-Ausführungsprotokollen und zum Einrichten von Webhooks für Echtzeit-Benachrichtigungen, wenn Workflows abgeschlossen werden.
@@ -29,14 +27,16 @@ Alle API-Antworten enthalten Informationen über Ihre Workflow-Ausführungslimit
"limits": {
"workflowExecutionRateLimit": {
"sync": {
"limit": 60, // Max sync workflow executions per minute
"remaining": 58, // Remaining sync workflow executions
"resetAt": "..." // When the window resets
"requestsPerMinute": 60, // Sustained rate limit per minute
"maxBurst": 120, // Maximum burst capacity
"remaining": 118, // Current tokens available (up to maxBurst)
"resetAt": "..." // When tokens next refill
},
"async": {
"limit": 60, // Max async workflow executions per minute
"remaining": 59, // Remaining async workflow executions
"resetAt": "..." // When the window resets
"requestsPerMinute": 200, // Sustained rate limit per minute
"maxBurst": 400, // Maximum burst capacity
"remaining": 398, // Current tokens available
"resetAt": "..." // When tokens next refill
}
},
"usage": {
@@ -48,7 +48,7 @@ Alle API-Antworten enthalten Informationen über Ihre Workflow-Ausführungslimit
}
```
**Hinweis:** Die Ratenbegrenzungen in der Antwort beziehen sich auf Workflow-Ausführungen. Die Ratenbegrenzungen für den Aufruf dieses API-Endpunkts befinden sich in den Antwort-Headern (`X-RateLimit-*`).
**Hinweis:** Ratenbegrenzungen verwenden einen Token-Bucket-Algorithmus. `remaining` kann `requestsPerMinute` bis zu `maxBurst` überschreiten, wenn du dein volles Kontingent in letzter Zeit nicht genutzt hast, was Burst-Traffic ermöglicht. Die Ratenbegrenzungen im Antworttext gelten für Workflow-Ausführungen. Die Ratenbegrenzungen für den Aufruf dieses API-Endpunkts befinden sich in den Antwort-Headern (`X-RateLimit-*`).
### Logs abfragen
@@ -112,13 +112,15 @@ Fragen Sie Workflow-Ausführungsprotokolle mit umfangreichen Filteroptionen ab.
"limits": {
"workflowExecutionRateLimit": {
"sync": {
"limit": 60,
"remaining": 58,
"requestsPerMinute": 60,
"maxBurst": 120,
"remaining": 118,
"resetAt": "2025-01-01T12:35:56.789Z"
},
"async": {
"limit": 60,
"remaining": 59,
"requestsPerMinute": 200,
"maxBurst": 400,
"remaining": 398,
"resetAt": "2025-01-01T12:35:56.789Z"
}
},
@@ -192,13 +194,15 @@ Rufen Sie detaillierte Informationen zu einem bestimmten Logeintrag ab.
"limits": {
"workflowExecutionRateLimit": {
"sync": {
"limit": 60,
"remaining": 58,
"requestsPerMinute": 60,
"maxBurst": 120,
"remaining": 118,
"resetAt": "2025-01-01T12:35:56.789Z"
},
"async": {
"limit": 60,
"remaining": 59,
"requestsPerMinute": 200,
"maxBurst": 400,
"remaining": 398,
"resetAt": "2025-01-01T12:35:56.789Z"
}
},
@@ -253,32 +257,78 @@ Rufen Sie Ausführungsdetails einschließlich des Workflow-Zustandsschnappschuss
</Tab>
</Tabs>
## Webhook-Abonnements
## Benachrichtigungen
Erhalten Sie Echtzeitbenachrichtigungen, wenn Workflow-Ausführungen abgeschlossen werden. Webhooks werden über die Sim-Benutzeroberfläche im Workflow-Editor konfiguriert.
Erhalten Sie Echtzeit-Benachrichtigungen, wenn Workflow-Ausführungen abgeschlossen sind, per Webhook, E-Mail oder Slack. Benachrichtigungen werden auf Workspace-Ebene von der Protokollseite aus konfiguriert.
### Konfiguration
Webhooks können für jeden Workflow über die Benutzeroberfläche des Workflow-Editors konfiguriert werden. Klicken Sie auf das Webhook-Symbol in der Kontrollleiste, um Ihre Webhook-Abonnements einzurichten.
Konfigurieren Sie Benachrichtigungen von der Protokollseite aus, indem Sie auf die Menütaste klicken und "Benachrichtigungen konfigurieren" auswählen.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="configure-webhook.mp4" width={700} height={450} />
</div>
**Benachrichtigungskanäle:**
- **Webhook**: Senden Sie HTTP POST-Anfragen an Ihren Endpunkt
- **E-Mail**: Erhalten Sie E-Mail-Benachrichtigungen mit Ausführungsdetails
- **Slack**: Posten Sie Nachrichten in einen Slack-Kanal
**Verfügbare Konfigurationsoptionen:**
**Workflow-Auswahl:**
- Wählen Sie bestimmte Workflows zur Überwachung aus
- Oder wählen Sie "Alle Workflows", um aktuelle und zukünftige Workflows einzubeziehen
**Filteroptionen:**
- `levelFilter`: Zu empfangende Protokollebenen (`info`, `error`)
- `triggerFilter`: Zu empfangende Auslösertypen (`api`, `webhook`, `schedule`, `manual`, `chat`)
**Optionale Daten:**
- `includeFinalOutput`: Schließt die endgültige Ausgabe des Workflows ein
- `includeTraceSpans`: Schließt detaillierte Ausführungs-Trace-Spans ein
- `includeRateLimits`: Schließt Informationen zum Ratenlimit ein (Sync/Async-Limits und verbleibende)
- `includeUsageData`: Schließt Abrechnungszeitraum-Nutzung und -Limits ein
### Alarmregeln
Anstatt Benachrichtigungen für jede Ausführung zu erhalten, konfigurieren Sie Alarmregeln, um nur bei erkannten Problemen benachrichtigt zu werden:
**Aufeinanderfolgende Fehler**
- Alarm nach X aufeinanderfolgenden fehlgeschlagenen Ausführungen (z.B. 3 Fehler in Folge)
- Wird zurückgesetzt, wenn eine Ausführung erfolgreich ist
**Fehlerrate**
- Alarm, wenn die Fehlerrate X% in den letzten Y Stunden überschreitet
- Erfordert mindestens 5 Ausführungen im Zeitfenster
- Wird erst nach Ablauf des vollständigen Zeitfensters ausgelöst
**Latenz-Schwellenwert**
- Alarm, wenn eine Ausführung länger als X Sekunden dauert
- Nützlich zum Erkennen langsamer oder hängender Workflows
**Latenz-Spitze**
- Alarm, wenn die Ausführung X% langsamer als der Durchschnitt ist
- Vergleicht mit der durchschnittlichen Dauer über das konfigurierte Zeitfenster
- Erfordert mindestens 5 Ausführungen, um eine Baseline zu etablieren
**Kostenschwelle**
- Alarmierung, wenn eine einzelne Ausführung mehr als $X kostet
- Nützlich, um teure LLM-Aufrufe zu erkennen
**Keine Aktivität**
- Alarmierung, wenn innerhalb von X Stunden keine Ausführungen stattfinden
- Nützlich zur Überwachung geplanter Workflows, die regelmäßig ausgeführt werden sollten
**Fehlerzählung**
- Alarmierung, wenn die Fehleranzahl X innerhalb eines Zeitfensters überschreitet
- Erfasst die Gesamtfehler, nicht aufeinanderfolgende
Alle Alarmtypen beinhalten eine Abklingzeit von 1 Stunde, um Benachrichtigungsspam zu vermeiden.
### Webhook-Konfiguration
Für Webhooks stehen zusätzliche Optionen zur Verfügung:
- `url`: Ihre Webhook-Endpunkt-URL
- `secret`: Optionales Geheimnis für die HMAC-Signaturverifizierung
- `includeFinalOutput`: Die endgültige Ausgabe des Workflows in die Nutzlast einschließen
- `includeTraceSpans`: Detaillierte Ausführungs-Trace-Spans einschließen
- `includeRateLimits`: Informationen zum Ratelimit des Workflow-Besitzers einschließen
- `includeUsageData`: Nutzungs- und Abrechnungsdaten des Workflow-Besitzers einschließen
- `levelFilter`: Array von Log-Ebenen, die empfangen werden sollen (`info`, `error`)
- `triggerFilter`: Array von Auslösertypen, die empfangen werden sollen (`api`, `webhook`, `schedule`, `manual`, `chat`)
- `active`: Webhook-Abonnement aktivieren/deaktivieren
- `secret`: Optionales Geheimnis für HMAC-Signaturverifizierung
### Webhook-Nutzlast
### Payload-Struktur
Wenn eine Workflow-Ausführung abgeschlossen ist, sendet Sim eine POST-Anfrage an Ihre Webhook-URL:
Wenn eine Workflow-Ausführung abgeschlossen ist, sendet Sim die folgende Payload (über Webhook POST, E-Mail oder Slack):
```json
{
@@ -329,17 +379,17 @@ Wenn eine Workflow-Ausführung abgeschlossen ist, sendet Sim eine POST-Anfrage a
### Webhook-Header
Jede Webhook-Anfrage enthält diese Header:
Jede Webhook-Anfrage enthält diese Header (nur Webhook-Kanal):
- `sim-event`: Ereignistyp (immer `workflow.execution.completed`)
- `sim-timestamp`: Unix-Zeitstempel in Millisekunden
- `sim-delivery-id`: Eindeutige Lieferungs-ID für Idempotenz
- `sim-signature`: HMAC-SHA256-Signatur zur Verifizierung (falls Secret konfiguriert)
- `Idempotency-Key`: Identisch mit der Lieferungs-ID zur Erkennung von Duplikaten
- `sim-delivery-id`: Eindeutige Zustell-ID für Idempotenz
- `sim-signature`: HMAC-SHA256-Signatur zur Verifizierung (falls Geheimnis konfiguriert)
- `Idempotency-Key`: Gleich wie Zustell-ID zur Erkennung von Duplikaten
### Signaturverifizierung
Wenn Sie ein Webhook-Secret konfigurieren, überprüfen Sie die Signatur, um sicherzustellen, dass der Webhook von Sim stammt:
Wenn Sie ein Webhook-Geheimnis konfigurieren, überprüfen Sie die Signatur, um sicherzustellen, dass der Webhook von Sim stammt:
<Tabs items={['Node.js', 'Python']}>
<Tab value="Node.js">
@@ -416,7 +466,7 @@ Fehlgeschlagene Webhook-Zustellungen werden mit exponentiellem Backoff und Jitte
- Maximale Versuche: 5
- Wiederholungsverzögerungen: 5 Sekunden, 15 Sekunden, 1 Minute, 3 Minuten, 10 Minuten
- Jitter: Bis zu 10% zusätzliche Verzögerung, um Überlastungen zu vermeiden
- Jitter: Bis zu 10% zusätzliche Verzögerung, um Überlastung zu vermeiden
- Nur HTTP 5xx und 429 Antworten lösen Wiederholungen aus
- Zustellungen haben ein Timeout nach 30 Sekunden
@@ -426,31 +476,39 @@ Fehlgeschlagene Webhook-Zustellungen werden mit exponentiellem Backoff und Jitte
## Best Practices
1. **Polling-Strategie**: Verwenden Sie beim Abfragen von Logs die cursorbasierte Paginierung mit `order=asc` und `startDate`, um neue Logs effizient abzurufen.
1. **Polling-Strategie**: Verwende bei der Abfrage von Logs eine cursor-basierte Paginierung mit `order=asc` und `startDate`, um neue Logs effizient abzurufen.
2. **Webhook-Sicherheit**: Konfigurieren Sie immer ein Webhook-Secret und überprüfen Sie Signaturen, um sicherzustellen, dass Anfragen von Sim stammen.
2. **Webhook-Sicherheit**: Konfiguriere immer ein Webhook-Secret und überprüfe Signaturen, um sicherzustellen, dass Anfragen von Sim stammen.
3. **Idempotenz**: Verwenden Sie den `Idempotency-Key`Header, um doppelte Webhook-Zustellungen zu erkennen und zu behandeln.
3. **Idempotenz**: Verwende den `Idempotency-Key`Header, um doppelte Webhook-Zustellungen zu erkennen und zu behandeln.
4. **Datenschutz**: Standardmäßig werden `finalOutput` und `traceSpans` von den Antworten ausgeschlossen. Aktivieren Sie diese nur, wenn Sie die Daten benötigen und die Datenschutzauswirkungen verstehen.
4. **Datenschutz**: Standardmäßig werden `finalOutput` und `traceSpans` aus den Antworten ausgeschlossen. Aktiviere diese nur, wenn du die Daten benötigst und die Datenschutzauswirkungen verstehst.
5. **Rate-Limiting**: Implementieren Sie exponentielles Backoff, wenn Sie 429-Antworten erhalten. Überprüfen Sie den `Retry-After`Header für die empfohlene Wartezeit.
5. **Rate-Limiting**: Implementiere exponentielles Backoff, wenn du 429-Antworten erhältst. Überprüfe den `Retry-After`Header für die empfohlene Wartezeit.
## Rate-Limiting
Die API implementiert Rate-Limiting, um eine faire Nutzung zu gewährleisten:
Die API verwendet einen **Token-Bucket-Algorithmus** für die Ratenbegrenzung, der eine faire Nutzung ermöglicht und gleichzeitig Burst-Traffic zulässt:
- **Kostenloser Plan**: 10 Anfragen pro Minute
- **Pro-Plan**: 30 Anfragen pro Minute
- **Team-Plan**: 60 Anfragen pro Minute
- **Enterprise-Plan**: Individuelle Limits
| Plan | Anfragen/Minute | Burst-Kapazität |
|------|-----------------|----------------|
| Free | 10 | 20 |
| Pro | 30 | 60 |
| Team | 60 | 120 |
| Enterprise | 120 | 240 |
Informationen zum Rate-Limit sind in den Antwort-Headern enthalten:
- `X-RateLimit-Limit`: Maximale Anfragen pro Zeitfenster
- `X-RateLimit-Remaining`: Verbleibende Anfragen im aktuellen Zeitfenster
- `X-RateLimit-Reset`: ISO-Zeitstempel, wann das Zeitfenster zurückgesetzt wird
**Wie es funktioniert:**
- Tokens werden mit der Rate `requestsPerMinute` aufgefüllt
- Du kannst im Leerlauf bis zu `maxBurst` Tokens ansammeln
- Jede Anfrage verbraucht 1 Token
- Die Burst-Kapazität ermöglicht die Bewältigung von Verkehrsspitzen
## Beispiel: Abfragen neuer Logs
Informationen zur Ratenbegrenzung sind in den Antwort-Headern enthalten:
- `X-RateLimit-Limit`: Anfragen pro Minute (Auffüllrate)
- `X-RateLimit-Remaining`: Aktuell verfügbare Tokens
- `X-RateLimit-Reset`: ISO-Zeitstempel, wann Tokens als nächstes aufgefüllt werden
## Beispiel: Abfragen nach neuen Logs
```javascript
let cursor = null;
@@ -535,7 +593,7 @@ app.post('/sim-webhook', (req, res) => {
// Handle error...
} else {
console.log(`Workflow ${workflowId} completed: ${executionId}`);
console.log(`Cost: ${cost.total}`);
console.log(`Cost: $${cost.total}`);
// Process successful execution...
}
break;

View File

@@ -1,12 +1,10 @@
---
title: Ausführungsgrundlagen
title: Grundlagen
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Das Verständnis der Workflow-Ausführung in Sim ist entscheidend für die Erstellung effizienter und zuverlässiger Automatisierungen. Die Ausführungs-Engine verwaltet automatisch Abhängigkeiten, Parallelität und Datenfluss, um sicherzustellen, dass Ihre Workflows reibungslos und vorhersehbar ablaufen.
@@ -77,29 +75,6 @@ Sim bietet verschiedene Arten von Blöcken, die spezifische Zwecke in Ihren Work
Alle Blöcke werden automatisch basierend auf ihren Abhängigkeiten ausgeführt - Sie müssen die Ausführungsreihenfolge oder das Timing nicht manuell verwalten.
## Ausführungsauslöser
Workflows können auf verschiedene Weise ausgelöst werden, abhängig von Ihrem Anwendungsfall:
### Manuelles Testen
Klicken Sie im Workflow-Editor auf "Ausführen", um Ihren Workflow während der Entwicklung zu testen. Perfekt für Debugging und Validierung.
### Geplante Ausführung
Richten Sie wiederkehrende Ausführungen mit Cron-Ausdrücken ein. Ideal für regelmäßige Datenverarbeitung, Berichte oder Wartungsaufgaben.
### API-Bereitstellung
Stellen Sie Workflows als HTTP-Endpunkte bereit, die programmatisch von Ihren Anwendungen aufgerufen werden können.
### Webhook-Integration
Reagieren Sie in Echtzeit auf Ereignisse von externen Diensten wie GitHub, Stripe oder benutzerdefinierten Systemen.
### Chat-Schnittstelle
Erstellen Sie Konversationsschnittstellen, die auf benutzerdefinierten Subdomains für benutzerorientierte KI-Anwendungen gehostet werden.
<Callout type="info">
Erfahren Sie mehr über jeden Auslösertyp im [Abschnitt Auslöser](/triggers) der Dokumentation.
</Callout>
## Ausführungsüberwachung
Wenn Workflows ausgeführt werden, bietet Sim Echtzeit-Einblick in den Ausführungsprozess:
@@ -118,7 +93,7 @@ Wenn Workflows ausgeführt werden, bietet Sim Echtzeit-Einblick in den Ausführu
Das Verständnis dieser Grundprinzipien wird Ihnen helfen, bessere Workflows zu erstellen:
1. **Abhängigkeitsbasierte Ausführung**: Blöcke werden nur ausgeführt, wenn alle ihre Abhängigkeiten abgeschlossen sind
2. **Automatische Parallelisierung**: Unabhängige Blöcke laufen gleichzeitig ohne Konfiguration
2. **Automatische Parallelisierung**: Unabhängige Blöcke laufen ohne Konfiguration gleichzeitig
3. **Intelligenter Datenfluss**: Ausgaben fließen automatisch zu verbundenen Blöcken
4. **Fehlerbehandlung**: Fehlgeschlagene Blöcke stoppen ihren Ausführungspfad, beeinflussen aber keine unabhängigen Pfade
5. **Zustandspersistenz**: Alle Blockausgaben und Ausführungsdetails werden für die Fehlerbehebung gespeichert
@@ -129,4 +104,4 @@ Nachdem Sie die Grundlagen der Ausführung verstanden haben, erkunden Sie:
- **[Blocktypen](/blocks)** - Erfahren Sie mehr über spezifische Block-Funktionen
- **[Protokollierung](/execution/logging)** - Überwachen Sie Workflow-Ausführungen und beheben Sie Probleme
- **[Kostenberechnung](/execution/costs)** - Verstehen und optimieren Sie Workflow-Kosten
- **[Auslöser](/triggers)** - Richten Sie verschiedene Möglichkeiten ein, Ihre Workflows auszuführen
- **[Trigger](/triggers)** - Richten Sie verschiedene Möglichkeiten ein, Ihre Workflows auszuführen

View File

@@ -2,7 +2,6 @@
title: Kostenberechnung
---
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
@@ -48,80 +47,90 @@ Die Modellaufschlüsselung zeigt:
## Preisoptionen
<Tabs items={['Gehostete Modelle', 'Eigener API-Schlüssel']}>
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
<Tab>
**Gehostete Modelle** - Sim stellt API-Schlüssel mit einem 2,5-fachen Preismultiplikator bereit:
**Gehostete Modelle** - Sim stellt API-Schlüssel mit einem 2-fachen Preismultiplikator bereit:
**OpenAI**
| Modell | Basispreis (Eingabe/Ausgabe) | Gehosteter Preis (Eingabe/Ausgabe) |
|-------|---------------------------|----------------------------|
| GPT-4o | 2,50 $ / 10,00 $ | 6,25 $ / 25,00 $ |
| GPT-4.1 | 2,00 $ / 8,00 $ | 5,00 $ / 20,00 $ |
| o1 | 15,00 $ / 60,00 $ | 37,50 $ / 150,00 $ |
| o3 | 2,00 $ / 8,00 $ | 5,00 $ / 20,00 $ |
| Claude 3.5 Sonnet | 3,00 $ / 15,00 $ | 7,50 $ / 37,50 $ |
| Claude Opus 4.0 | 15,00 $ / 75,00 $ | 37,50 $ / 187,50 $ |
*Der 2,5-fache Multiplikator deckt Infrastruktur- und API-Verwaltungskosten ab.*
| GPT-5.1 | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| GPT-5 | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| GPT-5 Mini | 0,25 $ / 2,00 $ | 0,50 $ / 4,00 $ |
| GPT-5 Nano | 0,05 $ / 0,40 $ | 0,10 $ / 0,80 $ |
| GPT-4o | 2,50 $ / 10,00 $ | 5,00 $ / 20,00 $ |
| GPT-4.1 | 2,00 $ / 8,00 $ | 4,00 $ / 16,00 $ |
| GPT-4.1 Mini | 0,40 $ / 1,60 $ | 0,80 $ / 3,20 $ |
| GPT-4.1 Nano | 0,10 $ / 0,40 $ | 0,20 $ / 0,80 $ |
| o1 | 15,00 $ / 60,00 $ | 30,00 $ / 120,00 $ |
| o3 | 2,00 $ / 8,00 $ | 4,00 $ / 16,00 $ |
| o4 Mini | 1,10 $ / 4,40 $ | 2,20 $ / 8,80 $ |
**Anthropic**
| Modell | Basispreis (Eingabe/Ausgabe) | Gehosteter Preis (Eingabe/Ausgabe) |
|-------|---------------------------|----------------------------|
| Claude Opus 4.5 | 5,00 $ / 25,00 $ | 10,00 $ / 50,00 $ |
| Claude Opus 4.1 | 15,00 $ / 75,00 $ | 30,00 $ / 150,00 $ |
| Claude Sonnet 4.5 | 3,00 $ / 15,00 $ | 6,00 $ / 30,00 $ |
| Claude Sonnet 4.0 | 3,00 $ / 15,00 $ | 6,00 $ / 30,00 $ |
| Claude Haiku 4.5 | 1,00 $ / 5,00 $ | 2,00 $ / 10,00 $ |
**Google**
| Modell | Basispreis (Eingabe/Ausgabe) | Gehosteter Preis (Eingabe/Ausgabe) |
|-------|---------------------------|----------------------------|
| Gemini 3 Pro Preview | 2,00 $ / 12,00 $ | 4,00 $ / 24,00 $ |
| Gemini 2.5 Pro | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| Gemini 2.5 Flash | 0,30 $ / 2,50 $ | 0,60 $ / 5,00 $ |
*Der 2x-Multiplikator deckt Infrastruktur- und API-Verwaltungskosten ab.*
</Tab>
<Tab>
**Ihre eigenen API-Schlüssel** - Nutzen Sie jedes Modell zum Basispreis:
| Anbieter | Modelle | Eingabe / Ausgabe |
|----------|---------|----------------|
| Google | Gemini 2.5 | 0,15 $ / 0,60 $ |
| Deepseek | V3, R1 | 0,75 $ / 1,00 $ |
| xAI | Grok 4, Grok 3 | 5,00 $ / 25,00 $ |
| Groq | Llama 4 Scout | 0,40 $ / 0,60 $ |
| Cerebras | Llama 3.3 70B | 0,94 $ / 0,94 $ |
**Eigene API-Schlüssel** - Nutzen Sie jedes Modell zum Basispreis:
| Anbieter | Beispielmodelle | Input / Output |
|----------|----------------|----------------|
| Deepseek | V3, R1 | $0,75 / $1,00 |
| xAI | Grok 4 Latest, Grok 3 | $3,00 / $15,00 |
| Groq | Llama 4 Scout, Llama 3.3 70B | $0,11 / $0,34 |
| Cerebras | Llama 4 Scout, Llama 3.3 70B | $0,11 / $0,34 |
| Ollama | Lokale Modelle | Kostenlos |
| VLLM | Lokale Modelle | Kostenlos |
*Bezahlen Sie Anbieter direkt ohne Aufschlag*
</Tab>
</Tabs>
<Callout type="warning">
Die angezeigten Preise spiegeln die Tarife vom 10. September 2025 wider. Überprüfen Sie die Anbieterdokumentation für aktuelle Preise.
Die angezeigten Preise entsprechen den Tarifen vom 10. September 2025. Überprüfen Sie die Dokumentation der Anbieter für aktuelle Preise.
</Callout>
## Kostenoptimierungsstrategien
## Bring Your Own Key (BYOK)
<Accordions>
<Accordion title="Modellauswahl">
Wählen Sie Modelle basierend auf der Komplexität der Aufgabe. Einfache Aufgaben können GPT-4.1-nano ($0,10/$0,40) verwenden, während komplexes Denken möglicherweise o1 oder Claude Opus erfordert.
</Accordion>
<Accordion title="Prompt-Engineering">
Gut strukturierte, präzise Prompts reduzieren den Token-Verbrauch ohne Qualitätseinbußen.
</Accordion>
<Accordion title="Lokale Modelle">
Verwenden Sie Ollama für unkritische Aufgaben, um API-Kosten vollständig zu eliminieren.
</Accordion>
<Accordion title="Caching und Wiederverwendung">
Speichern Sie häufig verwendete Ergebnisse in Variablen oder Dateien, um wiederholte KI-Modellaufrufe zu vermeiden.
</Accordion>
<Accordion title="Batch-Verarbeitung">
Verarbeiten Sie mehrere Elemente in einer einzigen KI-Anfrage anstatt einzelne Aufrufe zu tätigen.
</Accordion>
</Accordions>
Sie können Ihre eigenen API-Schlüssel für gehostete Modelle (OpenAI, Anthropic, Google, Mistral) unter **Einstellungen → BYOK** verwenden, um Basispreise zu zahlen. Schlüssel werden verschlüsselt und gelten arbeitsbereichsweit.
## Strategien zur Kostenoptimierung
- **Modellauswahl**: Wählen Sie Modelle basierend auf der Aufgabenkomplexität. Einfache Aufgaben können GPT-4.1-nano verwenden, während komplexes Reasoning o1 oder Claude Opus erfordern könnte.
- **Prompt Engineering**: Gut strukturierte, prägnante Prompts reduzieren den Token-Verbrauch ohne Qualitätsverlust.
- **Lokale Modelle**: Verwenden Sie Ollama oder VLLM für unkritische Aufgaben, um API-Kosten vollständig zu eliminieren.
- **Caching und Wiederverwendung**: Speichern Sie häufig verwendete Ergebnisse in Variablen oder Dateien, um wiederholte AI-Modellaufrufe zu vermeiden.
- **Batch-Verarbeitung**: Verarbeiten Sie mehrere Elemente in einer einzigen AI-Anfrage, anstatt einzelne Aufrufe zu tätigen.
## Nutzungsüberwachung
Überwachen Sie Ihre Nutzung und Abrechnung unter Einstellungen → Abonnement:
- **Aktuelle Nutzung**: Echtzeit-Nutzung und Kosten für den aktuellen Zeitraum
- **Nutzungslimits**: Plangrenzen mit visuellen Fortschrittsanzeigen
- **Nutzungslimits**: Plan-Limits mit visuellen Fortschrittsindikatoren
- **Abrechnungsdetails**: Prognostizierte Gebühren und Mindestverpflichtungen
- **Planverwaltung**: Upgrade-Optionen und Abrechnungsverlauf
- **Plan-Verwaltung**: Upgrade-Optionen und Abrechnungsverlauf
### Programmatische Nutzungsverfolgung
### Programmatisches Nutzungs-Tracking
Sie können Ihre aktuelle Nutzung und Limits programmatisch über die API abfragen:
**Endpunkt:**
**Endpoint:**
```text
GET /api/users/me/usage-limits
@@ -142,8 +151,20 @@ curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" htt
{
"success": true,
"rateLimit": {
"sync": { "isLimited": false, "limit": 10, "remaining": 10, "resetAt": "2025-09-08T22:51:55.999Z" },
"async": { "isLimited": false, "limit": 50, "remaining": 50, "resetAt": "2025-09-08T22:51:56.155Z" },
"sync": {
"isLimited": false,
"requestsPerMinute": 25,
"maxBurst": 50,
"remaining": 50,
"resetAt": "2025-09-08T22:51:55.999Z"
},
"async": {
"isLimited": false,
"requestsPerMinute": 200,
"maxBurst": 400,
"remaining": 400,
"resetAt": "2025-09-08T22:51:56.155Z"
},
"authType": "api"
},
"usage": {
@@ -154,33 +175,70 @@ curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" htt
}
```
**Rate-Limit-Felder:**
- `requestsPerMinute`: Dauerhaftes Rate-Limit (Tokens werden mit dieser Rate aufgefüllt)
- `maxBurst`: Maximale Tokens, die Sie akkumulieren können (Burst-Kapazität)
- `remaining`: Aktuell verfügbare Tokens (kann bis zu `maxBurst` betragen)
**Antwortfelder:**
- `currentPeriodCost` spiegelt die Nutzung im aktuellen Abrechnungszeitraum wider
- `limit` wird aus individuellen Limits (Free/Pro) oder gepoolten Organisationslimits (Team/Enterprise) abgeleitet
- `plan` ist der aktive Plan mit der höchsten Priorität, der mit Ihrem Benutzer verknüpft ist
- `plan` ist der Plan mit der höchsten Priorität, der Ihrem Benutzer zugeordnet ist
## Planlimits
## Plan-Limits
Verschiedene Abonnementpläne haben unterschiedliche Nutzungslimits:
Verschiedene Abonnement-Pläne haben unterschiedliche Nutzungslimits:
| Plan | Monatliches Nutzungslimit | Ratengrenze (pro Minute) |
| Plan | Monatliches Nutzungslimit | Ratenlimits (pro Minute) |
|------|-------------------|-------------------------|
| **Free** | $10 | 5 sync, 10 async |
| **Pro** | $100 | 10 sync, 50 async |
| **Team** | $500 (gepoolt) | 50 sync, 100 async |
| **Free** | 20 $ | 5 sync, 10 async |
| **Pro** | 100 $ | 10 sync, 50 async |
| **Team** | 500 $ (gemeinsam) | 50 sync, 100 async |
| **Enterprise** | Individuell | Individuell |
## Abrechnungsmodell
Sim verwendet ein **Basis-Abonnement + Mehrverbrauch**-Abrechnungsmodell:
### So funktioniert es
**Pro-Plan (20 $/Monat):**
- Monatsabonnement beinhaltet 20 $ Nutzung
- Nutzung unter 20 $ → Keine zusätzlichen Gebühren
- Nutzung über 20 $ → Mehrverbrauch am Monatsende zahlen
- Beispiel: 35 $ Nutzung = 20 $ (Abonnement) + 15 $ (Mehrverbrauch)
**Team-Plan (40 $/Platz/Monat):**
- Gemeinsame Nutzung über alle Teammitglieder
- Mehrverbrauch wird aus der gesamten Team-Nutzung berechnet
- Organisationsinhaber erhält eine Rechnung
**Enterprise-Pläne:**
- Fester Monatspreis, kein Mehrverbrauch
- Individuelle Nutzungslimits gemäß Vereinbarung
### Schwellenwert-Abrechnung
Wenn der nicht abgerechnete Mehrverbrauch 50 $ erreicht, rechnet Sim automatisch den gesamten nicht abgerechneten Betrag ab.
**Beispiel:**
- Tag 10: 70 $ Mehrverbrauch → 70 $ sofort abrechnen
- Tag 15: Zusätzliche 35 $ Nutzung (105 $ gesamt) → Bereits abgerechnet, keine Aktion
- Tag 20: Weitere 50 $ Nutzung (155 $ gesamt, 85 $ nicht abgerechnet) → 85 $ sofort abrechnen
Dies verteilt große Mehrverbrauchsgebühren über den Monat, anstatt einer großen Rechnung am Periodenende.
## Best Practices für Kostenmanagement
1. **Regelmäßig überwachen**: Prüfen Sie Ihr Nutzungs-Dashboard häufig, um Überraschungen zu vermeiden
2. **Budgets festlegen**: Nutzen Sie Planlimits als Leitplanken für Ihre Ausgaben
1. **Regelmäßig überwachen**: Überprüfen Sie Ihr Nutzungs-Dashboard häufig, um Überraschungen zu vermeiden
2. **Budgets festlegen**: Nutzen Sie Plan-Limits als Leitplanken für Ihre Ausgaben
3. **Workflows optimieren**: Überprüfen Sie kostenintensive Ausführungen und optimieren Sie Prompts oder Modellauswahl
4. **Passende Modelle verwenden**: Stimmen Sie die Modellkomplexität auf die Aufgabenanforderungen ab
5. **Ähnliche Aufgaben bündeln**: Kombinieren Sie wenn möglich mehrere Anfragen, um den Overhead zu reduzieren
4. **Passende Modelle verwenden**: Passen Sie die Modellkomplexität an die Aufgabenanforderungen an
5. **Ähnliche Aufgaben bündeln**: Kombinieren Sie mehrere Anfragen, wenn möglich, um Overhead zu reduzieren
## Nächste Schritte
- Überprüfen Sie Ihre aktuelle Nutzung unter [Einstellungen → Abonnement](https://sim.ai/settings/subscription)
- Erfahren Sie mehr über [Logging](/execution/logging), um Ausführungsdetails zu verfolgen
- Erkunden Sie die [Externe API](/execution/api) für programmatische Kostenüberwachung
- Erfahren Sie mehr über [Protokollierung](/execution/logging), um Ausführungsdetails zu verfolgen
- Entdecken Sie die [externe API](/execution/api) für programmatische Kostenüberwachung
- Sehen Sie sich [Workflow-Optimierungstechniken](/blocks) an, um Kosten zu reduzieren

View File

@@ -1,5 +1,5 @@
---
title: Ausführung
title: Übersicht
---
import { Callout } from 'fumadocs-ui/components/callout'
@@ -52,51 +52,13 @@ Jeder Workflow behält während der Ausführung einen umfangreichen Kontext bei,
- Umgebungsvariablen
- Routing-Entscheidungen
## Ausführungsauslöser
Workflows können über mehrere Kanäle ausgeführt werden:
- **Manuell**: Testen und debuggen direkt im Editor
- **Als API bereitstellen**: Einen HTTP-Endpunkt erstellen, der mit API-Schlüsseln gesichert ist
- **Als Chat bereitstellen**: Eine Konversationsschnittstelle auf einer benutzerdefinierten Subdomain erstellen
- **Webhooks**: Auf externe Ereignisse von Drittanbieterdiensten reagieren
- **Geplant**: Nach einem wiederkehrenden Zeitplan mit Cron-Ausdrücken ausführen
### Als API bereitstellen
Wenn Sie einen Workflow als API bereitstellen, macht Sim Folgendes:
- Erstellt einen eindeutigen HTTP-Endpunkt: `https://sim.ai/api/workflows/{workflowId}/execute`
- Generiert einen API-Schlüssel zur Authentifizierung
- Akzeptiert POST-Anfragen mit JSON-Payloads
- Gibt Workflow-Ausführungsergebnisse als JSON zurück
Beispiel für einen API-Aufruf:
```bash
curl -X POST https://sim.ai/api/workflows/your-workflow-id/execute \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"input": "your data here"}'
```
### Als Chat bereitstellen
Die Chat-Bereitstellung erstellt eine Konversationsschnittstelle für Ihren Workflow:
- Gehostet auf einer benutzerdefinierten Subdomain: `https://your-name.sim.ai`
- Optionale Authentifizierung (öffentlich, passwortgeschützt oder E-Mail-basiert)
- Anpassbare Benutzeroberfläche mit Ihrem Branding
- Streaming-Antworten für Echtzeit-Interaktion
- Perfekt für KI-Assistenten, Support-Bots oder interaktive Tools
Jede Bereitstellungsmethode übergibt Daten an den Starter-Block Ihres Workflows und beginnt so den Ausführungsfluss.
## Deployment-Snapshots
Alle öffentlichen EinstiegspunkteAPI, Chat, Zeitplan, Webhook und manuelle Ausführungenführen den aktiven Deployment-Snapshot des Workflows aus. Veröffentliche ein neues Deployment, wann immer du die Arbeitsfläche änderst, damit jeder Trigger die aktualisierte Version verwendet.
Alle öffentlichen Einstiegspunkte API, Chat, Zeitplan, Webhook und manuelle Ausführungen führen den aktiven Deployment-Snapshot des Workflows aus. Veröffentliche ein neues Deployment, wann immer du die Arbeitsfläche änderst, damit jeder Auslöser die aktualisierte Version verwendet.
<div className='flex justify-center my-6'>
<Image
src='/static/execution/deployment-versions-light.png'
src='/static/execution/deployment-versions.png'
alt='Tabelle mit Deployment-Versionen'
width={500}
height={280}
@@ -104,11 +66,11 @@ Alle öffentlichen Einstiegspunkte—API, Chat, Zeitplan, Webhook und manuelle A
/>
</div>
Das Deploy-Modal behält eine vollständige Versionshistorie bei—inspiziere jeden Snapshot, vergleiche ihn mit deinem Entwurf und führe Upgrades oder Rollbacks mit einem Klick durch, wenn du eine frühere Version wiederherstellen musst.
Das Deploy-Modal behält eine vollständige Versionshistorie bei untersuche jeden Snapshot, vergleiche ihn mit deinem Entwurf und führe Upgrades oder Rollbacks mit einem Klick durch, wenn du eine frühere Version wiederherstellen musst.
## Programmatische Ausführung
Führe Workflows aus deinen Anwendungen mit unseren offiziellen SDKs aus:
Führe Workflows aus deinen Anwendungen heraus mit unseren offiziellen SDKs aus:
```bash
# TypeScript/JavaScript
@@ -138,12 +100,12 @@ const result = await client.executeWorkflow('workflow-id', {
- Verwende Umgebungsvariablen für sensible Daten
- Füge Logging zu Funktionsblöcken für Debugging hinzu
### Leistung optimieren
### Optimiere Performance
- Minimiere externe API-Aufrufe wo möglich
- Nutze parallele Ausführung für unabhängige Operationen
- Cache Ergebnisse mit Memory-Blöcken, wenn angemessen
- Cache Ergebnisse mit Memory-Blöcken wenn angemessen
### Ausführungen überwachen
### Überwache Ausführungen
- Überprüfe Logs regelmäßig, um Leistungsmuster zu verstehen
- Verfolge Kosten für KI-Modellnutzung
- Verwende Workflow-Snapshots zur Fehlerbehebung

View File

@@ -147,4 +147,4 @@ Der Snapshot bietet:
- Erfahren Sie mehr über die [Kostenberechnung](/execution/costs), um die Preisgestaltung von Workflows zu verstehen
- Erkunden Sie die [externe API](/execution/api) für programmatischen Zugriff auf Protokolle
- Richten Sie [Webhook-Benachrichtigungen](/execution/api#webhook-subscriptions) für Echtzeit-Warnungen ein
- Richten Sie [Benachrichtigungen](/execution/api#notifications) für Echtzeit-Warnungen per Webhook, E-Mail oder Slack ein

View File

@@ -24,20 +24,19 @@ import {
import { Video } from '@/components/ui/video'
import { Image } from '@/components/ui/image'
Dieses Tutorial führt dich durch den Aufbau deines ersten KI-Workflows in Sim. Wir erstellen einen Personen-Recherche-Agenten, der Informationen über Personen mithilfe modernster LLM-Suchwerkzeuge finden kann.
Erstelle deinen ersten KI-Workflow in 10 Minuten. In diesem Tutorial wirst du einen Personenrecherche-Agenten erstellen, der fortschrittliche LLM-gestützte Suchwerkzeuge nutzt, um Informationen über Personen zu extrahieren und zu strukturieren.
<Callout type="info">
Dieses Tutorial dauert etwa 10 Minuten und behandelt die wesentlichen Konzepte zum Erstellen von Workflows in Sim.
Dieses Tutorial behandelt die wesentlichen Konzepte zum Erstellen von Workflows in Sim. Geschätzte Bearbeitungszeit: 10 Minuten.
</Callout>
## Was wir erstellen
## Was du erstellen wirst
Einen Personen-Recherche-Agenten, der:
1. Den Namen einer Person über eine Chat-Schnittstelle empfängt
2. Einen KI-Agenten mit erweiterten Suchfähigkeiten nutzt
3. Das Web mithilfe modernster LLM-Suchwerkzeuge (Exa und Linkup) durchsucht
4. Strukturierte Informationen mithilfe eines Antwortformats extrahiert
5. Umfassende Daten über die Person zurückgibt
Einen Personenrecherche-Agenten, der:
1. Benutzereingaben über eine Chat-Schnittstelle akzeptiert
2. Das Web mit KI-gestützten Tools durchsucht (Exa und Linkup)
3. Informationen über Personen extrahiert und strukturiert
4. Formatierte JSON-Daten mit Standort, Beruf und Ausbildung zurückgibt
<Image
src="/static/getting-started/started-1.png"
@@ -49,74 +48,71 @@ Einen Personen-Recherche-Agenten, der:
## Schritt-für-Schritt-Anleitung
<Steps>
<Step title="Workflow erstellen und KI-Agenten hinzufügen">
Öffne Sim und klicke im Dashboard auf "Neuer Workflow". Benenne ihn "Erste Schritte".
<Step title="Workflow erstellen und einen KI-Agenten hinzufügen">
Klicke im Dashboard auf **Neuer Workflow** und benenne ihn "Getting Started".
Wenn du einen neuen Workflow erstellst, enthält er automatisch einen **Start-Block** - dies ist der Einstiegspunkt, der Eingaben von Benutzern empfängt. Für dieses Beispiel werden wir den Workflow über den Chat auslösen, daher müssen wir am Start-Block nichts konfigurieren.
Jeder neue Workflow enthält standardmäßig einen **Start-Block** dies ist der Eingangspunkt, der Benutzereingaben empfängt. Da wir diesen Workflow über Chat auslösen werden, ist keine Konfiguration für den Start-Block erforderlich.
Ziehe nun einen **Agenten-Block** aus dem Blockbereich auf der linken Seite auf die Arbeitsfläche.
Konfiguriere den Agenten-Block:
Ziehe einen **Agenten-Block** aus dem linken Bereich auf die Arbeitsfläche und konfiguriere ihn:
- **Modell**: Wähle "OpenAI GPT-4o"
- **System-Prompt**: "Du bist ein Personen-Recherche-Agent. Wenn dir ein Personenname gegeben wird, nutze deine verfügbaren Suchwerkzeuge, um umfassende Informationen über diese Person zu finden, einschließlich ihres Standorts, Berufs, Bildungshintergrunds und anderer relevanter Details."
- **Benutzer-Prompt**: Ziehe die Verbindung vom Ausgabefeld des Start-Blocks in dieses Feld (dies verbindet `<start.input>` mit dem Benutzer-Prompt)
- **System-Prompt**: "Du bist ein Personenrecherche-Agent. Wenn dir ein Name einer Person gegeben wird, nutze deine verfügbaren Suchwerkzeuge, um umfassende Informationen über sie zu finden, einschließlich ihres Standorts, Berufs, Bildungshintergrunds und anderer relevanter Details."
- **Benutzer-Prompt**: Ziehe die Verbindung vom Ausgabefeld des Start-Blocks in dieses Feld, um `<start.input>` mit dem Benutzer-Prompt zu verbinden
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="getting-started/started-2.mp4" width={700} height={450} />
</div>
</Step>
<Step title="Werkzeuge zum Agenten hinzufügen">
Verbessern wir unseren Agenten mit Werkzeugen für bessere Fähigkeiten. Klicke auf den Agenten-Block, um ihn auszuwählen.
<Step title="Suchwerkzeuge zum Agenten hinzufügen">
Erweitere deinen Agenten mit Websuche-Funktionen. Klicke auf den Agenten-Block, um ihn auszuwählen.
Im Bereich **Werkzeuge**:
- Klicke auf **Werkzeug hinzufügen**
- Wähle **Exa** aus den verfügbaren Werkzeugen
- Wähle **Linkup** aus den verfügbaren Werkzeugen
- Füge deine API-Schlüssel für beide Werkzeuge hinzu (dies ermöglicht dem Agenten, das Web zu durchsuchen und auf zusätzliche Informationen zuzugreifen)
Im Bereich **Tools**:
- Klicke auf **Tool hinzufügen**
- Wähle **Exa** und **Linkup** aus den verfügbaren Tools
- Gib deine API-Schlüssel für beide Tools ein, um Websuche und Datenzugriff zu ermöglichen
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="getting-started/started-3.mp4" width={700} height={450} />
</div>
</Step>
<Step title="Den grundlegenden Workflow testen">
Jetzt testen wir unseren Workflow. Gehe zum **Chat-Panel** auf der rechten Seite des Bildschirms.
<Step title="Workflow testen">
Teste deinen Workflow mit dem **Chat-Panel** auf der rechten Seite des Bildschirms.
Im Chat-Panel:
- Klicke auf das Dropdown-Menü und wähle `agent1.content` (dies zeigt uns die Ausgabe unseres Agenten)
- Gib eine Testnachricht ein, wie: "John ist ein Softwareentwickler aus San Francisco, der Informatik an der Stanford University studiert hat."
- Klicke auf "Senden", um den Workflow auszuführen
- Klicke auf das Dropdown-Menü und wähle `agent1.content`, um die Ausgabe des Agenten anzuzeigen
- Gib eine Testnachricht ein: "John ist ein Softwareentwickler aus San Francisco, der Informatik an der Stanford University studiert hat."
- Klicke auf **Senden**, um den Workflow auszuführen
Du solltest die Antwort des Agenten sehen, der die in deinem Text beschriebene Person analysiert.
Der Agent wird die Person analysieren und strukturierte Informationen zurückgeben.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="getting-started/started-4.mp4" width={700} height={450} />
</div>
</Step>
<Step title="Strukturierte Ausgabe hinzufügen">
Jetzt lassen wir unseren Agenten strukturierte Daten zurückgeben. Klicke auf den Agenten-Block, um ihn auszuwählen.
<Step title="Strukturierte Ausgabe konfigurieren">
Konfiguriere deinen Agenten, um strukturierte JSON-Daten zurückzugeben. Klicke auf den Agenten-Block, um ihn auszuwählen.
Im Bereich **Antwortformat**:
- Klicke auf das **Zauberstab-Symbol** (✨) neben dem Schema-Feld
- Gib in der erscheinenden Aufforderung ein: "Erstelle ein Schema namens Person, das Standort, Beruf und Bildung enthält"
- Die KI generiert automatisch ein JSON-Schema für dich
- Gib den Prompt ein: "Erstelle ein Schema namens person, das Standort, Beruf und Ausbildung enthält"
- Die KI wird automatisch das JSON-Schema generieren
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="getting-started/started-5.mp4" width={700} height={450} />
</div>
</Step>
<Step title="Die strukturierte Ausgabe testen">
Gehe zurück zum **Chat-Panel**.
<Step title="Mit strukturierter Ausgabe testen">
Kehre zum **Chat-Panel** zurück, um das strukturierte Antwortformat zu testen.
Da wir ein Antwortformat hinzugefügt haben, sind jetzt neue Ausgabeoptionen verfügbar:
- Klicke auf das Dropdown-Menü und wähle die neue Option für strukturierte Ausgabe (das Schema, das wir gerade erstellt haben)
- Gib eine neue Testnachricht ein, wie: "Sarah ist eine Marketing-Managerin aus New York, die einen MBA von der Harvard Business School hat."
- Klicke auf "Senden", um den Workflow erneut auszuführen
Mit dem konfigurierten Antwortformat sind jetzt neue Ausgabeoptionen verfügbar:
- Klicke auf das Dropdown-Menü und wähle die Option für strukturierte Ausgabe (das Schema, das du gerade erstellt hast)
- Gib eine Testnachricht ein: "Sarah ist eine Marketing-Managerin aus New York mit einem MBA von der Harvard Business School."
- Klicke auf **Senden**, um den Workflow auszuführen
Du solltest jetzt eine strukturierte JSON-Ausgabe sehen, bei der die Informationen der Person in die Felder Standort, Beruf und Bildung gegliedert sind.
Der Agent wird nun strukturierte JSON-Ausgabe zurückgeben, wobei die Informationen der Person in die Felder Standort, Beruf und Ausbildung organisiert sind.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="getting-started/started-6.mp4" width={700} height={450} />
@@ -124,15 +120,15 @@ Einen Personen-Recherche-Agenten, der:
</Step>
</Steps>
## Was du gerade erstellt hast
## Was du erstellt hast
Herzlichen Glückwunsch! Du hast deinen ersten KI-Workflow erstellt, der:
- ✅ Texteingaben über eine Chat-Schnittstelle empfängt
- ✅ KI nutzt, um Informationen aus unstrukturiertem Text zu extrahieren
- ✅ Externe Tools (Exa und Linkup) für erweiterte Funktionen integriert
Du hast erfolgreich einen KI-Workflow erstellt, der:
- ✅ Benutzereingaben über eine Chat-Schnittstelle akzeptiert
- ✅ Unstrukturierten Text mit KI verarbeitet
- ✅ Externe Suchwerkzeuge integriert (Exa und Linkup)
- ✅ Strukturierte JSON-Daten mit KI-generierten Schemas zurückgibt
- ✅ Workflow-Tests und Iterationen demonstriert
- ✅ Die Leistungsfähigkeit des visuellen Workflow-Aufbaus zeigt
- ✅ Echtzeit-Tests und Iteration demonstriert
- ✅ Die Leistungsfähigkeit der visuellen, codefreien Entwicklung zeigt
## Wichtige Konzepte, die du gelernt hast
@@ -153,41 +149,48 @@ Herzlichen Glückwunsch! Du hast deinen ersten KI-Workflow erstellt, der:
### Grundlegende Workflow-Konzepte
**Datenfluss**: Variablen fließen zwischen Blöcken durch das Ziehen von Verbindungen
**Datenfluss**
Verbinde Blöcke durch Ziehen von Verbindungen, um Daten zwischen Workflow-Schritten zu übertragen
**Chat-Schnittstelle**: Teste Workflows in Echtzeit mit dem Chat-Panel mit verschiedenen Ausgabeoptionen
**Chat-Schnittstelle**
Teste Workflows in Echtzeit mit dem Chat-Panel und wähle verschiedene Ausgabeoptionen
**Tool-Integration**: Erweitere die Fähigkeiten des Agenten durch Hinzufügen externer Tools wie Exa und Linkup
**Tool-Integration**
Erweitere die Fähigkeiten des Agenten durch Integration externer Dienste wie Exa und Linkup
**Variablenreferenzen**: Greife auf Block-Ausgaben mit der `<blockName.output>` Syntax zu
**Variablenreferenzen**
Greife auf Block-Ausgaben mit der `<blockName.output>` Syntax zu
**Strukturierte Ausgabe**: Verwende JSON-Schemas, um konsistente, strukturierte Daten von der KI zu erhalten
**Strukturierte Ausgabe**
Definiere JSON-Schemas, um konsistente, formatierte Antworten von der KI zu gewährleisten
**KI-generierte Schemas**: Nutze den Zauberstab (✨), um Schemas mit natürlicher Sprache zu generieren
**KI-generierte Schemas**
Verwende den Zauberstab (✨), um Schemas aus natürlichsprachigen Eingabeaufforderungen zu generieren
**Iterative Entwicklung**: Teste, modifiziere und teste Workflows einfach erneut
**Iterative Entwicklung**
Erstelle, teste und verfeinere Workflows schnell mit sofortigem Feedback
## Nächste Schritte
<Cards>
<Card title="Weitere Blöcke hinzufügen" href="/blocks">
Erfahre mehr über API-, Funktions- und Bedingungsblöcke
<Card title="Workflow-Blöcke erkunden" href="/blocks">
Entdecke API-, Funktions-, Bedingungs- und andere Workflow-Blöcke
</Card>
<Card title="Tools verwenden" href="/tools">
Integration mit externen Diensten wie Gmail, Slack und Notion
<Card title="Integrationen durchsuchen" href="/tools">
Verbinde über 80 Dienste einschließlich Gmail, Slack, Notion und mehr
</Card>
<Card title="Benutzerdefinierte Logik hinzufügen" href="/blocks/function">
Verwende Funktionsblöcke für benutzerdefinierte Datenverarbeitung
Schreibe benutzerdefinierte Funktionen für fortgeschrittene Datenverarbeitung
</Card>
<Card title="Deinen Workflow bereitstellen" href="/execution">
Mache deinen Workflow über REST API zugänglich
Mache deinen Workflow über REST API oder Webhooks zugänglich
</Card>
</Cards>
## Brauchst du Hilfe?
## Ressourcen
**Bei einem Schritt hängengeblieben?** Schau in unserer [Blocks-Dokumentation](/blocks) nach detaillierten Erklärungen zu jeder Komponente.
**Brauchst du detaillierte Erklärungen?** Besuche die [Blocks-Dokumentation](/blocks) für umfassende Anleitungen zu jeder Komponente.
**Möchten Sie mehr Beispiele sehen?** Durchsuchen Sie unsere [Tools-Dokumentation](/tools), um zu sehen, welche Integrationen verfügbar sind.
**Suchst du nach Integrationen?** Erkunde die [Tools-Dokumentation](/tools), um alle 80+ verfügbaren Integrationen zu sehen.
**Bereit für die Bereitstellung?** Erfahren Sie mehr über [Ausführung und Bereitstellung](/execution), um Ihre Workflows zu aktivieren.
**Bereit für den Livebetrieb?** Erfahre mehr über [Ausführung und Bereitstellung](/execution), um deine Workflows produktionsreif zu machen.

View File

@@ -46,15 +46,12 @@ Willkommen bei Sim, einem visuellen Workflow-Builder für KI-Anwendungen. Erstel
<Cards>
<Card title="Team-Management" href="/permissions/roles-and-permissions">
Richten Sie Workspace-Rollen und Berechtigungen ein
</Card>
<Card title="YAML-Konfiguration" href="/yaml">
Definieren Sie Workflows als Code
Workspace-Rollen und Berechtigungen einrichten
</Card>
<Card title="MCP-Integration" href="/mcp">
Verbinden Sie externe Dienste mit dem Model Context Protocol
Externe Dienste mit dem Model Context Protocol verbinden
</Card>
<Card title="SDKs" href="/sdks">
Integrieren Sie Sim in Ihre Anwendungen
Sim in Ihre Anwendungen integrieren
</Card>
</Cards>

View File

@@ -5,8 +5,9 @@ title: Einführung
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Callout } from 'fumadocs-ui/components/callout'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Sim ist ein visueller Workflow-Builder für KI-Anwendungen, mit dem Sie KI-Agenten-Workflows visuell erstellen können. Erstellen Sie leistungsstarke KI-Agenten, Automatisierungs-Workflows und Datenverarbeitungs-Pipelines, indem Sie Blöcke auf einer Leinwand verbinden ganz ohne Programmierung.
Sim ist ein Open-Source-Tool zur visuellen Workflow-Erstellung für die Entwicklung und Bereitstellung von KI-Agenten-Workflows. Entwerfen Sie intelligente Automatisierungssysteme mit einer No-Code-Oberfläche verbinden Sie KI-Modelle, Datenbanken, APIs und Business-Tools über eine intuitive Drag-and-Drop-Oberfläche. Ob Sie Chatbots entwickeln, Geschäftsprozesse automatisieren oder komplexe Datenpipelines orchestrieren Sim bietet die Werkzeuge, um Ihre KI-Workflows zum Leben zu erwecken.
<div className="flex justify-center">
<Image
@@ -20,50 +21,81 @@ Sim ist ein visueller Workflow-Builder für KI-Anwendungen, mit dem Sie KI-Agent
## Was Sie erstellen können
**KI-Assistenten & Chatbots**
Erstellen Sie intelligente Agenten, die im Web suchen, auf Ihren Kalender zugreifen, E-Mails senden und mit Ihren Geschäftstools interagieren können.
**KI-Assistenten & Chatbots**
Entwickeln Sie intelligente Konversationsagenten, die sich in Ihre Tools und Daten integrieren lassen. Ermöglichen Sie Funktionen wie Websuche, Kalenderverwaltung, E-Mail-Automatisierung und nahtlose Interaktion mit Geschäftssystemen.
**Geschäftsprozessautomatisierung**
Automatisieren Sie wiederkehrende Aufgaben wie Dateneingabe, Berichtserstellung, Kundenservice-Antworten und Content-Erstellung.
**Automatisierung von Geschäftsprozessen**
Beseitigen Sie manuelle Aufgaben in Ihrer gesamten Organisation. Automatisieren Sie Dateneingaben, erstellen Sie Berichte, beantworten Sie Kundenanfragen und optimieren Sie Workflows zur Inhaltserstellung.
**Datenverarbeitung & -analyse**
Gewinnen Sie Erkenntnisse aus Dokumenten, analysieren Sie Datensätze, erstellen Sie Berichte und synchronisieren Sie Daten zwischen Systemen.
**Datenverarbeitung & -analyse**
Verwandeln Sie Rohdaten in umsetzbare Erkenntnisse. Extrahieren Sie Informationen aus Dokumenten, führen Sie Datensatzanalysen durch, erstellen Sie automatisierte Berichte und synchronisieren Sie Daten über verschiedene Plattformen hinweg.
**API-Integrations-Workflows**
Verbinden Sie mehrere Dienste zu einheitlichen Endpunkten, orchestrieren Sie komplexe Geschäftslogik und verwalten Sie ereignisgesteuerte Automatisierung.
**API-Integrations-Workflows**
Orchestieren Sie komplexe Interaktionen zwischen mehreren Diensten. Erstellen Sie einheitliche API-Endpunkte, implementieren Sie anspruchsvolle Geschäftslogik und bauen Sie ereignisgesteuerte Automatisierungssysteme.
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
<Video src="introduction/chat-workflow.mp4" width={700} height={450} />
</div>
## Wie es funktioniert
**Visuelle Leinwand**
Ziehen Sie Blöcke per Drag-and-drop, um Workflows zu erstellen. Verbinden Sie KI-Modelle, Datenbanken, APIs und Geschäftstools mit einfachen Point-and-Click-Verbindungen.
**Visueller Workflow-Editor**
Entwerfen Sie Workflows mit einer intuitiven Drag-and-Drop-Oberfläche. Verbinden Sie KI-Modelle, Datenbanken, APIs und Dienste von Drittanbietern über eine visuelle No-Code-Schnittstelle, die komplexe Automatisierungslogik leicht verständlich und wartbar macht.
**Intelligente Blöcke**
Wählen Sie aus Verarbeitungsblöcken (KI-Agenten, APIs, Funktionen), Logikblöcken (Bedingungen, Schleifen, Router) und Ausgabeblöcken (Antworten, Evaluatoren).
**Modulares Blocksystem**
Bauen Sie mit spezialisierten Komponenten: Verarbeitungsblöcke (KI-Agenten, API-Aufrufe, benutzerdefinierte Funktionen), Logikblöcke (bedingte Verzweigungen, Schleifen, Router) und Ausgabeblöcke (Antworten, Evaluatoren). Jeder Block übernimmt eine bestimmte Aufgabe in Ihrem Workflow.
**Mehrere Auslöser**
Starten Sie Workflows über Chat-Schnittstelle, REST API, Webhooks, geplante Jobs oder externe Ereignisse von Diensten wie Slack und GitHub.
**Flexible Ausführungsauslöser**
Starten Sie Workflows über mehrere Kanäle, einschließlich Chat-Schnittstellen, REST-APIs, Webhooks, geplante Cron-Jobs oder externe Ereignisse von Plattformen wie Slack und GitHub.
**Team-Zusammenarbeit**
Arbeiten Sie gleichzeitig mit Teammitgliedern am selben Workflow mit Echtzeit-Bearbeitung und Berechtigungsverwaltung.
**Echtzeit-Zusammenarbeit**
Ermöglichen Sie Ihrem Team, gemeinsam zu arbeiten. Mehrere Benutzer können Workflows gleichzeitig bearbeiten, mit Live-Updates und detaillierten Berechtigungskontrollen.
## Integrierte Anbindungen
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
<Video src="introduction/build-workflow.mp4" width={700} height={450} />
</div>
Sim verbindet sich von Haus aus mit über 80 Diensten:
## Integrationen
- **KI-Modelle**: OpenAI, Anthropic, Google, Groq, Cerebras, lokale Ollama-Modelle
- **Kommunikation**: Gmail, Slack, Teams, Telegram, WhatsApp
- **Produktivität**: Notion, Google Sheets, Airtable, Monday.com
- **Entwicklung**: GitHub, Jira, Linear, Browser-Automatisierung
- **Suche & Web**: Google Search, Perplexity, Firecrawl, Exa AI
Sim bietet native Integrationen mit über 80 Diensten in verschiedenen Kategorien:
- **KI-Modelle**: OpenAI, Anthropic, Google Gemini, Groq, Cerebras, lokale Modelle über Ollama oder VLLM
- **Kommunikation**: Gmail, Slack, Microsoft Teams, Telegram, WhatsApp
- **Produktivität**: Notion, Google Workspace, Airtable, Monday.com
- **Entwicklung**: GitHub, Jira, Linear, automatisierte Browser-Tests
- **Suche & Daten**: Google Search, Perplexity, Firecrawl, Exa AI
- **Datenbanken**: PostgreSQL, MySQL, Supabase, Pinecone, Qdrant
Benötigen Sie etwas Maßgeschneidertes? Nutzen Sie unsere [MCP-Integration](/mcp), um jeden externen Dienst anzubinden.
Für benutzerdefinierte Integrationen nutzen Sie unsere [MCP (Model Context Protocol)-Unterstützung](/mcp), um beliebige externe Dienste oder Tools anzubinden.
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
<Video src="introduction/integrations-sidebar.mp4" width={700} height={450} />
</div>
## Copilot
**Fragen stellen & Anleitung erhalten**
Der Copilot beantwortet Fragen zu Sim, erklärt Ihre Workflows und gibt Verbesserungsvorschläge. Verwenden Sie das `@` Symbol, um auf Workflows, Blöcke, Dokumentation, Wissen und Protokolle für kontextbezogene Unterstützung zu verweisen.
**Workflows erstellen & bearbeiten**
Wechseln Sie in den Agent-Modus, damit der Copilot Änderungen direkt auf Ihrer Arbeitsfläche vorschlagen und anwenden kann. Fügen Sie Blöcke hinzu, konfigurieren Sie Einstellungen, verbinden Sie Variablen und strukturieren Sie Workflows mit natürlichsprachlichen Befehlen um.
**Adaptive Reasoning-Stufen**
Wählen Sie zwischen den Modi Schnell, Auto, Erweitert oder Behemoth, je nach Komplexität der Aufgabe. Beginnen Sie mit Schnell für einfache Fragen und steigern Sie sich bis zu Behemoth für komplexe architektonische Änderungen und tiefgehendes Debugging.
Erfahren Sie mehr über [Copilot-Funktionen](/copilot) und wie Sie die Produktivität mit KI-Unterstützung maximieren können.
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
<Video src="introduction/copilot-workflow.mp4" width={700} height={450} />
</div>
## Bereitstellungsoptionen
**Cloud-gehostet**: Starten Sie sofort bei [sim.ai](https://sim.ai) mit verwalteter Infrastruktur, automatischer Skalierung und integriertem Monitoring.
**Cloud-Hosting**
Starten Sie sofort bei [sim.ai](https://sim.ai) mit vollständig verwalteter Infrastruktur, automatischer Skalierung und integrierter Beobachtbarkeit. Konzentrieren Sie sich auf den Aufbau von Workflows, während wir den Betrieb übernehmen.
**Selbst-gehostet**: Stellen Sie die Anwendung auf Ihrer eigenen Infrastruktur mit Docker bereit, mit Unterstützung für lokale KI-Modelle über Ollama für vollständige Datenprivatsphäre.
**Self-Hosting**
Stellen Sie die Lösung auf Ihrer eigenen Infrastruktur mit Docker Compose oder Kubernetes bereit. Behalten Sie die vollständige Kontrolle über Ihre Daten mit Unterstützung für lokale KI-Modelle durch Ollama-Integration.
## Nächste Schritte
@@ -73,11 +105,11 @@ Bereit, Ihren ersten KI-Workflow zu erstellen?
<Card title="Erste Schritte" href="/getting-started">
Erstellen Sie Ihren ersten Workflow in 10 Minuten
</Card>
<Card title="Workflow-Bausteine" href="/blocks">
<Card title="Workflow-Blöcke" href="/blocks">
Erfahren Sie mehr über die Bausteine
</Card>
<Card title="Tools & Integrationen" href="/tools">
Entdecken Sie über 60 integrierte Schnittstellen
Entdecken Sie über 80 integrierte Integrationen
</Card>
<Card title="Team-Berechtigungen" href="/permissions/roles-and-permissions">
Richten Sie Workspace-Rollen und Berechtigungen ein

View File

@@ -0,0 +1,63 @@
---
title: Tastaturkürzel
description: Meistern Sie die Workflow-Arbeitsfläche mit Tastaturkürzeln und Maussteuerung
---
import { Callout } from 'fumadocs-ui/components/callout'
Beschleunigen Sie die Erstellung Ihrer Workflows mit diesen Tastaturkürzeln und Maussteuerungen. Alle Tastenkombinationen funktionieren, wenn die Arbeitsfläche fokussiert ist (nicht beim Tippen in einem Eingabefeld).
<Callout type="info">
**Mod** bezieht sich auf `Cmd` unter macOS und `Ctrl` unter Windows/Linux.
</Callout>
## Arbeitsflächen-Steuerung
### Maussteuerung
| Aktion | Steuerung |
|--------|---------|
| Arbeitsfläche verschieben | Linksziehen auf leerer Fläche |
| Arbeitsfläche verschieben | Scrollen oder Trackpad |
| Mehrere Blöcke auswählen | Rechtsziehen zum Aufziehen eines Auswahlrahmens |
| Block ziehen | Linksziehen auf Block-Kopfzeile |
| Zur Auswahl hinzufügen | `Mod` + Klick auf Blöcke |
### Workflow-Aktionen
| Tastenkombination | Aktion |
|----------|--------|
| `Mod` + `Enter` | Workflow ausführen (oder abbrechen, falls aktiv) |
| `Mod` + `Z` | Rückgängig |
| `Mod` + `Shift` + `Z` | Wiederholen |
| `Mod` + `C` | Ausgewählte Blöcke kopieren |
| `Mod` + `V` | Blöcke einfügen |
| `Delete` oder `Backspace` | Ausgewählte Blöcke oder Verbindungen löschen |
| `Shift` + `L` | Arbeitsfläche automatisch anordnen |
## Panel-Navigation
Diese Tastenkombinationen wechseln zwischen den Panel-Tabs auf der rechten Seite der Arbeitsfläche.
| Tastenkombination | Aktion |
|----------|--------|
| `C` | Copilot-Tab fokussieren |
| `T` | Toolbar-Tab fokussieren |
| `E` | Editor-Tab fokussieren |
| `Mod` + `F` | Toolbar-Suche fokussieren |
## Globale Navigation
| Tastenkombination | Aktion |
|----------|--------|
| `Mod` + `K` | Suche öffnen |
| `Mod` + `Shift` + `A` | Neuen Agenten-Workflow hinzufügen |
| `Mod` + `Y` | Zu Vorlagen gehen |
| `Mod` + `L` | Zu Logs gehen |
## Dienstprogramm
| Tastenkombination | Aktion |
|----------|--------|
| `Mod` + `D` | Terminal-Konsole leeren |
| `Mod` + `E` | Benachrichtigungen löschen |

View File

@@ -1,5 +1,7 @@
---
title: Wissensdatenbank
title: Übersicht
description: Laden Sie Ihre Dokumente hoch, verarbeiten und durchsuchen Sie sie
mit intelligenter Vektorsuche und Chunking
---
import { Video } from '@/components/ui/video'
@@ -33,81 +35,87 @@ Sobald Ihre Dokumente verarbeitet sind, können Sie die einzelnen Chunks anzeige
<Image src="/static/knowledgebase/knowledgebase.png" alt="Dokumentchunk-Ansicht mit verarbeiteten Inhalten" width={800} height={500} />
### Chunk-Konfiguration
- **Standardgröße der Chunks**: 1.024 Zeichen
- **Konfigurierbarer Bereich**: 100-4.000 Zeichen pro Chunk
- **Intelligente Überlappung**: Standardmäßig 200 Zeichen zur Kontexterhaltung
- **Hierarchische Aufteilung**: Respektiert Dokumentstruktur (Abschnitte, Absätze, Sätze)
### Bearbeitungsfunktionen
Beim Erstellen einer Wissensdatenbank können Sie konfigurieren, wie Dokumente in Chunks aufgeteilt werden:
| Einstellung | Einheit | Standard | Bereich | Beschreibung |
|---------|------|---------|-------|-------------|
| **Maximale Chunk-Größe** | Tokens | 1.024 | 100-4.000 | Maximale Größe jedes Chunks (1 Token ≈ 4 Zeichen) |
| **Minimale Chunk-Größe** | Zeichen | 1 | 1-2.000 | Minimale Chunk-Größe, um winzige Fragmente zu vermeiden |
| **Überlappung** | Zeichen | 200 | 0-500 | Kontextüberlappung zwischen aufeinanderfolgenden Chunks |
- **Hierarchische Aufteilung**: Berücksichtigt die Dokumentstruktur (Abschnitte, Absätze, Sätze)
### Bearbeitungsmöglichkeiten
- **Chunk-Inhalt bearbeiten**: Textinhalt einzelner Chunks ändern
- **Chunk-Grenzen anpassen**: Chunks bei Bedarf zusammenführen oder teilen
- **Chunk-Grenzen anpassen**: Chunks nach Bedarf zusammenführen oder aufteilen
- **Metadaten hinzufügen**: Chunks mit zusätzlichem Kontext anreichern
- **Massenoperationen**: Effiziente Verwaltung mehrerer Chunks
- **Massenoperationen**: Mehrere Chunks effizient verwalten
## Erweiterte PDF-Verarbeitung
Für PDF-Dokumente bietet Sim erweiterte Verarbeitungsfunktionen:
### OCR-Unterstützung
Bei Konfiguration mit Azure oder [Mistral OCR](https://docs.mistral.ai/ocr/):
Wenn mit Azure oder [Mistral OCR](https://docs.mistral.ai/ocr/) konfiguriert:
- **Verarbeitung gescannter Dokumente**: Text aus bildbasierten PDFs extrahieren
- **Umgang mit gemischten Inhalten**: Verarbeitung von PDFs mit Text und Bildern
- **Verarbeitung gemischter Inhalte**: PDFs mit Text und Bildern verarbeiten
- **Hohe Genauigkeit**: Fortschrittliche KI-Modelle gewährleisten präzise Textextraktion
## Verwendung des Wissensblocks in Workflows
## Verwendung des Knowledge-Blocks in Workflows
Sobald Ihre Dokumente verarbeitet sind, können Sie sie in Ihren KI-Workflows über den Wissensblock nutzen. Dies ermöglicht Retrieval-Augmented Generation (RAG), wodurch Ihre KI-Agenten auf Ihre Dokumentinhalte zugreifen und darüber nachdenken können, um genauere, kontextbezogene Antworten zu liefern.
Sobald Ihre Dokumente verarbeitet sind, können Sie sie in Ihren KI-Workflows über den Knowledge-Block verwenden. Dies ermöglicht Retrieval-Augmented Generation (RAG), wodurch Ihre KI-Agenten auf Ihre Dokumentinhalte zugreifen und darüber nachdenken können, um genauere, kontextbezogene Antworten zu liefern.
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="Verwendung des Wissensblocks in Workflows" width={800} height={500} />
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="Verwendung des Knowledge-Blocks in Workflows" width={800} height={500} />
### Funktionen des Wissensblocks
- **Semantische Suche**: Relevante Inhalte mit natürlichsprachlichen Abfragen finden
- **Kontextintegration**: Automatisches Einbinden relevanter Chunks in Agenten-Prompts
- **Dynamischer Abruf**: Suche erfolgt in Echtzeit während der Workflow-Ausführung
- **Relevanzbewertung**: Ergebnisse nach semantischer Ähnlichkeit geordnet
### Knowledge-Block-Funktionen
- **Semantische Suche**: Relevante Inhalte mithilfe natürlichsprachlicher Abfragen finden
- **Kontextintegration**: Relevante Chunks automatisch in Agenten-Prompts einbinden
- **Dynamisches Abrufen**: Suche erfolgt in Echtzeit während der Workflow-Ausführung
- **Relevanz-Bewertung**: Ergebnisse nach semantischer Ähnlichkeit sortiert
### Integrationsoptionen
- **System-Prompts**: Kontext für Ihre KI-Agenten bereitstellen
- **Dynamischer Kontext**: Suche und Einbindung relevanter Informationen während Gesprächen
- **Dokumentübergreifende Suche**: Abfrage über Ihre gesamte Wissensdatenbank
- **Gefilterte Suche**: Kombination mit Tags für präzisen Inhaltsabruf
- **System-Prompts**: Stellen Sie Ihren KI-Agenten Kontext bereit
- **Dynamischer Kontext**: Suchen und fügen Sie relevante Informationen während Konversationen hinzu
- **Multi-Dokument-Suche**: Durchsuchen Sie Ihre gesamte Wissensdatenbank
- **Gefilterte Suche**: Kombinieren Sie mit Tags für präzises Abrufen von Inhalten
## Vektorsuchtechnologie
## Vektor-Suchtechnologie
Sim verwendet Vektorsuche, die von [pgvector](https://github.com/pgvector/pgvector) unterstützt wird, um die Bedeutung und den Kontext Ihrer Inhalte zu verstehen:
### Semantisches Verständnis
- **Kontextuelle Suche**: Findet relevante Inhalte, auch wenn exakte Schlüsselwörter nicht übereinstimmen
- **Konzeptbasierte Abfrage**: Versteht Beziehungen zwischen Ideen
- **Konzeptbasiertes Abrufen**: Versteht Beziehungen zwischen Ideen
- **Mehrsprachige Unterstützung**: Funktioniert über verschiedene Sprachen hinweg
- **Synonymerkennung**: Findet verwandte Begriffe und Konzepte
### Suchfunktionen
- **Natürlichsprachige Abfragen**: Stellen Sie Fragen in natürlicher Sprache
- **Natürlichsprachige Abfragen**: Stellen Sie Fragen in einfachem Deutsch
- **Ähnlichkeitssuche**: Finden Sie konzeptionell ähnliche Inhalte
- **Hybridsuche**: Kombiniert Vektor- und traditionelle Schlüsselwortsuche
- **Konfigurierbare Ergebnisse**: Steuern Sie die Anzahl und den Relevanz-Schwellenwert der Ergebnisse
- **Hybride Suche**: Kombiniert Vektor- und traditionelle Schlüsselwortsuche
- **Konfigurierbare Ergebnisse**: Steuern Sie die Anzahl und Relevanzschwelle der Ergebnisse
## Dokumentenverwaltung
### Organisationsfunktionen
- **Massenupload**: Laden Sie mehrere Dateien gleichzeitig über die asynchrone API hoch
- **Verarbeitungsstatus**: Echtzeit-Updates zum Dokumentenverarbeitungsprozess
- **Suchen und Filtern**: Finden Sie Dokumente schnell in großen Sammlungen
- **Massen-Upload**: Laden Sie mehrere Dateien gleichzeitig über die asynchrone API hoch
- **Verarbeitungsstatus**: Echtzeit-Updates zur Dokumentenverarbeitung
- **Suchen und filtern**: Finden Sie Dokumente schnell in großen Sammlungen
- **Metadaten-Tracking**: Automatische Erfassung von Dateiinformationen und Verarbeitungsdetails
### Sicherheit und Datenschutz
- **Sichere Speicherung**: Dokumente werden mit Sicherheit auf Unternehmensniveau gespeichert
- **Zugriffskontrolle**: Workspace-basierte Berechtigungen
- **Verarbeitungsisolierung**: Jeder Workspace hat eine isolierte Dokumentenverarbeitung
- **Verarbeitungsisolierung**: Jeder Workspace hat isolierte Dokumentenverarbeitung
- **Datenaufbewahrung**: Konfigurieren Sie Richtlinien zur Dokumentenaufbewahrung
## Erste Schritte
1. **Navigieren Sie zu Ihrer Wissensdatenbank**: Zugriff über Ihre Workspace-Seitenleiste
2. **Dokumente hochladen**: Drag & Drop oder wählen Sie Dateien zum Hochladen aus
3. **Verarbeitung überwachen**: Beobachten Sie, wie Dokumente verarbeitet und in Chunks aufgeteilt werden
4. **Chunks erkunden**: Sehen und bearbeiten Sie die verarbeiteten Inhalte
5. **Zu Workflows hinzufügen**: Verwenden Sie den Wissensblock, um ihn in Ihre KI-Agenten zu integrieren
2. **Dokumente hochladen**: Ziehen und ablegen oder Dateien zum Hochladen auswählen
3. **Verarbeitung überwachen**: Beobachten Sie, wie Dokumente verarbeitet und in Abschnitte unterteilt werden
4. **Abschnitte erkunden**: Zeigen Sie die verarbeiteten Inhalte an und bearbeiten Sie sie
5. **Zu Workflows hinzufügen**: Verwenden Sie den Knowledge-Block, um mit Ihren KI-Agenten zu integrieren
Die Wissensdatenbank verwandelt Ihre statischen Dokumente in eine intelligente, durchsuchbare Ressource, die Ihre KI-Workflows für fundiertere und kontextbezogenere Antworten nutzen können.
Die Wissensdatenbank verwandelt Ihre statischen Dokumente in eine intelligente, durchsuchbare Ressource, die Ihre KI-Workflows für fundiertere und kontextbezogene Antworten nutzen können.

View File

@@ -0,0 +1,108 @@
---
title: Workflows als MCP bereitstellen
description: Stellen Sie Ihre Workflows als MCP-Tools für externe KI-Assistenten
und Anwendungen bereit
---
import { Video } from '@/components/ui/video'
import { Callout } from 'fumadocs-ui/components/callout'
Stellen Sie Ihre Workflows als MCP-Tools bereit, um sie für externe KI-Assistenten wie Claude Desktop, Cursor und andere MCP-kompatible Clients zugänglich zu machen. Dies verwandelt Ihre Workflows in aufrufbare Tools, die von überall aus aufgerufen werden können.
## MCP-Server erstellen und verwalten
MCP-Server gruppieren Ihre Workflow-Tools zusammen. Erstellen und verwalten Sie sie in den Workspace-Einstellungen:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="mcp/mcp-server.mp4" width={700} height={450} />
</div>
1. Navigieren Sie zu **Einstellungen → MCP-Server**
2. Klicken Sie auf **Server erstellen**
3. Geben Sie einen Namen und eine optionale Beschreibung ein
4. Kopieren Sie die Server-URL zur Verwendung in Ihren MCP-Clients
5. Zeigen Sie alle zum Server hinzugefügten Tools an und verwalten Sie diese
## Einen Workflow als Tool hinzufügen
Sobald Ihr Workflow bereitgestellt ist, können Sie ihn als MCP-Tool verfügbar machen:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="mcp/mcp-deploy-tool.mp4" width={700} height={450} />
</div>
1. Öffnen Sie Ihren bereitgestellten Workflow
2. Klicken Sie auf **Bereitstellen** und wechseln Sie zum Tab **MCP**
3. Konfigurieren Sie den Tool-Namen und die Beschreibung
4. Fügen Sie Beschreibungen für jeden Parameter hinzu (hilft der KI, Eingaben zu verstehen)
5. Wählen Sie aus, zu welchen MCP-Servern es hinzugefügt werden soll
<Callout type="info">
Der Workflow muss bereitgestellt sein, bevor er als MCP-Tool hinzugefügt werden kann.
</Callout>
## Tool-Konfiguration
### Tool-Name
Verwenden Sie Kleinbuchstaben, Zahlen und Unterstriche. Der Name sollte beschreibend sein und den MCP-Namenskonventionen folgen (z. B. `search_documents`, `send_email`).
### Beschreibung
Schreiben Sie eine klare Beschreibung dessen, was das Tool tut. Dies hilft KI-Assistenten zu verstehen, wann das Tool verwendet werden soll.
### Parameter
Die Eingabeformatfelder deines Workflows werden zu Tool-Parametern. Füge jedem Parameter Beschreibungen hinzu, um KI-Assistenten zu helfen, korrekte Werte bereitzustellen.
## MCP-Clients verbinden
Verwende die Server-URL aus den Einstellungen, um externe Anwendungen zu verbinden:
### Claude Desktop
Füge dies zu deiner Claude Desktop-Konfiguration hinzu (`~/Library/Application Support/Claude/claude_desktop_config.json`):
```json
{
"mcpServers": {
"my-sim-workflows": {
"command": "npx",
"args": ["-y", "mcp-remote", "YOUR_SERVER_URL"]
}
}
}
```
### Cursor
Füge die Server-URL in den MCP-Einstellungen von Cursor mit demselben mcp-remote-Muster hinzu.
<Callout type="warn">
Füge deinen API-Key-Header (`X-API-Key`) für authentifizierten Zugriff hinzu, wenn du mcp-remote oder andere HTTP-basierte MCP-Transporte verwendest.
</Callout>
## Server-Verwaltung
In der Server-Detailansicht unter **Einstellungen → MCP-Server** kannst du:
- **Tools anzeigen**: Alle Workflows sehen, die einem Server hinzugefügt wurden
- **URL kopieren**: Die Server-URL für MCP-Clients abrufen
- **Workflows hinzufügen**: Weitere bereitgestellte Workflows als Tools hinzufügen
- **Tools entfernen**: Workflows vom Server entfernen
- **Server löschen**: Den gesamten Server und alle seine Tools entfernen
## So funktioniert es
Wenn ein MCP-Client dein Tool aufruft:
1. Die Anfrage wird an deiner MCP-Server-URL empfangen
2. Sim validiert die Anfrage und ordnet Parameter den Workflow-Eingaben zu
3. Der bereitgestellte Workflow wird mit den angegebenen Eingaben ausgeführt
4. Die Ergebnisse werden an den MCP-Client zurückgegeben
Workflows werden mit derselben Bereitstellungsversion wie API-Aufrufe ausgeführt, was konsistentes Verhalten gewährleistet.
## Berechtigungsanforderungen
| Aktion | Erforderliche Berechtigung |
|--------|-------------------|
| MCP-Server erstellen | **Admin** |
| Workflows zu Servern hinzufügen | **Write** oder **Admin** |
| MCP-Server anzeigen | **Read**, **Write** oder **Admin** |
| MCP-Server löschen | **Admin** |

View File

@@ -1,7 +1,9 @@
---
title: MCP (Model Context Protocol)
title: MCP-Tools verwenden
description: Externe Tools und Dienste über das Model Context Protocol verbinden
---
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
import { Callout } from 'fumadocs-ui/components/callout'
@@ -16,16 +18,12 @@ MCP ist ein offener Standard, der es KI-Assistenten ermöglicht, sich sicher mit
- Benutzerdefinierte Tools und Skripte auszuführen
- Sicheren, kontrollierten Zugriff auf externe Ressourcen zu gewährleisten
## Hinzufügen von MCP-Servern
## Konfiguration von MCP-Servern
MCP-Server stellen Sammlungen von Tools bereit, die Ihre Agenten nutzen können. Sie können MCP-Server auf zwei Arten hinzufügen:
### Über die Workspace-Einstellungen
Konfigurieren Sie MCP-Server auf Workspace-Ebene, damit alle Teammitglieder sie nutzen können:
MCP-Server stellen Sammlungen von Tools bereit, die Ihre Agenten nutzen können. Konfigurieren Sie diese in den Workspace-Einstellungen:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="mcp-1.mp4" width={700} height={450} />
<Video src="mcp/settings-mcp-tools.mp4" width={700} height={450} />
</div>
1. Navigieren Sie zu Ihren Workspace-Einstellungen
@@ -35,41 +33,47 @@ Konfigurieren Sie MCP-Server auf Workspace-Ebene, damit alle Teammitglieder sie
5. Speichern Sie die Konfiguration
<Callout type="info">
MCP-Server, die in den Workspace-Einstellungen konfiguriert sind, stehen allen Workspace-Mitgliedern entsprechend ihrer Berechtigungsstufen zur Verfügung.
Sie können MCP-Server auch direkt über die Symbolleiste in einem Agent-Block für eine schnelle Einrichtung konfigurieren.
</Callout>
### Über die Agenten-Konfiguration
### Tools aktualisieren
Sie können MCP-Server auch direkt innerhalb eines Agenten-Blocks hinzufügen und konfigurieren:
Klicken Sie bei einem Server auf **Aktualisieren**, um die neuesten Tool-Schemas abzurufen und alle Agent-Blöcke, die diese Tools verwenden, automatisch mit den neuen Parameterdefinitionen zu aktualisieren.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="mcp-2.mp4" width={700} height={450} />
## MCP-Tools in Agents verwenden
Sobald MCP-Server konfiguriert sind, werden ihre Tools in Ihren Agent-Blöcken verfügbar:
<div className="flex justify-center">
<Image
src="/static/blocks/mcp-2.png"
alt="Using MCP Tool in Agent Block"
width={700}
height={450}
className="my-6"
/>
</div>
Dies ist nützlich, wenn Sie schnell eine bestimmte Integration für einen speziellen Workflow einrichten müssen.
## Verwendung von MCP-Tools in Agenten
Sobald MCP-Server konfiguriert sind, werden ihre Tools innerhalb Ihrer Agentenblöcke verfügbar:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="mcp-3.mp4" width={700} height={450} />
</div>
1. Öffnen Sie einen **Agenten**-Block
2. Im Abschnitt **Tools** sehen Sie verfügbare MCP-Tools
1. Öffnen Sie einen **Agent**-Block
2. Im Bereich **Tools** sehen Sie die verfügbaren MCP-Tools
3. Wählen Sie die Tools aus, die der Agent verwenden soll
4. Der Agent kann nun während der Ausführung auf diese Tools zugreifen
## Eigenständiger MCP-Tool-Block
Für eine genauere Kontrolle können Sie den dedizierten MCP-Tool-Block verwenden, um bestimmte MCP-Tools auszuführen:
Für eine präzisere Steuerung können Sie den dedizierten MCP-Tool-Block verwenden, um bestimmte MCP-Tools auszuführen:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="mcp-4.mp4" width={700} height={450} />
<div className="flex justify-center">
<Image
src="/static/blocks/mcp-3.png"
alt="Standalone MCP Tool Block"
width={700}
height={450}
className="my-6"
/>
</div>
Der MCP-Tool-Block ermöglicht es Ihnen:
Der MCP-Tool-Block ermöglicht Ihnen:
- Jedes konfigurierte MCP-Tool direkt auszuführen
- Spezifische Parameter an das Tool zu übergeben
- Die Ausgabe des Tools in nachfolgenden Workflow-Schritten zu verwenden
@@ -77,9 +81,9 @@ Der MCP-Tool-Block ermöglicht es Ihnen:
### Wann MCP-Tool vs. Agent verwenden
**Verwenden Sie einen Agenten mit MCP-Tools, wenn:**
- Sie möchten, dass die KI entscheidet, welche Tools zu verwenden sind
- Sie komplexe Überlegungen benötigen, wann und wie Tools eingesetzt werden sollen
**Verwenden Sie Agent mit MCP-Tools, wenn:**
- Sie möchten, dass die KI entscheidet, welche Tools verwendet werden
- Sie komplexes Reasoning darüber benötigen, wann und wie Tools verwendet werden
- Sie eine natürlichsprachliche Interaktion mit den Tools wünschen
**Verwenden Sie den MCP-Tool-Block, wenn:**
@@ -89,19 +93,19 @@ Der MCP-Tool-Block ermöglicht es Ihnen:
## Berechtigungsanforderungen
MCP-Funktionalität erfordert spezifische Workspace-Berechtigungen:
Die MCP-Funktionalität erfordert spezifische Workspace-Berechtigungen:
| Aktion | Erforderliche Berechtigung |
|--------|-------------------|
| MCP-Server in den Einstellungen konfigurieren | **Admin** |
| MCP-Tools in Agenten verwenden | **Schreiben** oder **Admin** |
| Verfügbare MCP-Tools anzeigen | **Lesen**, **Schreiben** oder **Admin** |
| MCP-Tool-Blöcke ausführen | **Schreiben** oder **Admin** |
| MCP-Tools in Agenten verwenden | **Write** oder **Admin** |
| Verfügbare MCP-Tools anzeigen | **Read**, **Write** oder **Admin** |
| MCP-Tool-Blöcke ausführen | **Write** oder **Admin** |
## Häufige Anwendungsfälle
### Datenbankintegration
Verbinden Sie sich mit Datenbanken, um Daten innerhalb Ihrer Workflows abzufragen, einzufügen oder zu aktualisieren.
Verbinden Sie sich mit Datenbanken, um Daten in Ihren Workflows abzufragen, einzufügen oder zu aktualisieren.
### API-Integrationen
Greifen Sie auf externe APIs und Webdienste zu, die keine integrierten Sim-Integrationen haben.
@@ -109,27 +113,27 @@ Greifen Sie auf externe APIs und Webdienste zu, die keine integrierten Sim-Integ
### Dateisystemzugriff
Lesen, schreiben und bearbeiten Sie Dateien auf lokalen oder entfernten Dateisystemen.
### Benutzerdefinierte Geschäftslogik
Führen Sie benutzerdefinierte Skripte oder Tools aus, die auf die Bedürfnisse Ihrer Organisation zugeschnitten sind.
### Individuelle Geschäftslogik
Führen Sie benutzerdefinierte Skripte oder Tools aus, die spezifisch für die Anforderungen Ihrer Organisation sind.
### Echtzeit-Datenzugriff
Rufen Sie während der Workflow-Ausführung Live-Daten von externen Systemen ab.
Rufen Sie Live-Daten von externen Systemen während der Workflow-Ausführung ab.
## Sicherheitsüberlegungen
- MCP-Server laufen mit den Berechtigungen des Benutzers, der sie konfiguriert hat
- Überprüfen Sie immer die Quellen von MCP-Servern vor der Installation
- Überprüfen Sie immer die MCP-Server-Quellen vor der Installation
- Verwenden Sie Umgebungsvariablen für sensible Konfigurationsdaten
- Überprüfen Sie die Fähigkeiten des MCP-Servers, bevor Sie Agenten Zugriff gewähren
- Überprüfen Sie die MCP-Server-Funktionen, bevor Sie Agenten Zugriff gewähren
## Fehlerbehebung
### MCP-Server erscheint nicht
### MCP-Server wird nicht angezeigt
- Überprüfen Sie, ob die Serverkonfiguration korrekt ist
- Prüfen Sie, ob Sie die erforderlichen Berechtigungen haben
- Stellen Sie sicher, dass der MCP-Server läuft und zugänglich ist
- Prüfen Sie, ob Sie über die erforderlichen Berechtigungen verfügen
- Stellen Sie sicher, dass der MCP-Server läuft und erreichbar ist
### Fehler bei der Tool-Ausführung
### Tool-Ausführungsfehler
- Überprüfen Sie, ob die Tool-Parameter korrekt formatiert sind
- Prüfen Sie die MCP-Server-Logs auf Fehlermeldungen
- Stellen Sie sicher, dass die erforderliche Authentifizierung konfiguriert ist
@@ -137,4 +141,4 @@ Rufen Sie während der Workflow-Ausführung Live-Daten von externen Systemen ab.
### Berechtigungsfehler
- Bestätigen Sie Ihre Workspace-Berechtigungsstufe
- Prüfen Sie, ob der MCP-Server zusätzliche Authentifizierung erfordert
- Überprüfen Sie, ob der Server für Ihren Workspace richtig konfiguriert ist
- Überprüfen Sie, ob der Server ordnungsgemäß für Ihren Workspace konfiguriert ist

View File

@@ -1,5 +1,5 @@
---
title: Python SDK
title: Python
---
import { Callout } from 'fumadocs-ui/components/callout'
@@ -10,7 +10,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
Das offizielle Python SDK für Sim ermöglicht es Ihnen, Workflows programmatisch aus Ihren Python-Anwendungen mithilfe des offiziellen Python SDKs auszuführen.
<Callout type="info">
Das Python SDK unterstützt Python 3.8+ und bietet synchrone Workflow-Ausführung. Alle Workflow-Ausführungen sind derzeit synchron.
Das Python SDK unterstützt Python 3.8+ mit asynchroner Ausführungsunterstützung, automatischer Ratenbegrenzung mit exponentiellem Backoff und Nutzungsverfolgung.
</Callout>
## Installation
@@ -74,12 +74,17 @@ result = client.execute_workflow(
- `workflow_id` (str): Die ID des auszuführenden Workflows
- `input_data` (dict, optional): Eingabedaten, die an den Workflow übergeben werden
- `timeout` (float, optional): Timeout in Sekunden (Standard: 30.0)
- `stream` (bool, optional): Streaming-Antworten aktivieren (Standard: False)
- `selected_outputs` (list[str], optional): Block-Ausgaben, die im `blockName.attribute`Format gestreamt werden sollen (z.B. `["agent1.content"]`)
- `async_execution` (bool, optional): Asynchron ausführen (Standard: False)
**Rückgabewert:** `WorkflowExecutionResult`
**Rückgabe:** `WorkflowExecutionResult | AsyncExecutionResult`
Wenn `async_execution=True`, wird sofort mit einer Task-ID zum Abfragen zurückgegeben. Andernfalls wird auf den Abschluss gewartet.
##### get_workflow_status()
Ruft den Status eines Workflows ab (Deployment-Status usw.).
Den Status eines Workflows abrufen (Bereitstellungsstatus usw.).
```python
status = client.get_workflow_status("workflow-id")
@@ -93,7 +98,7 @@ print("Is deployed:", status.is_deployed)
##### validate_workflow()
Überprüft, ob ein Workflow für die Ausführung bereit ist.
Überprüfen, ob ein Workflow für die Ausführung bereit ist.
```python
is_ready = client.validate_workflow("workflow-id")
@@ -107,28 +112,118 @@ if is_ready:
**Rückgabe:** `bool`
##### execute_workflow_sync()
##### get_job_status()
<Callout type="info">
Derzeit ist diese Methode identisch mit `execute_workflow()`, da alle Ausführungen synchron sind. Diese Methode wird für zukünftige Kompatibilität bereitgestellt, wenn asynchrone Ausführung hinzugefügt wird.
</Callout>
Führt einen Workflow aus (derzeit synchron, identisch mit `execute_workflow()`).
Den Status einer asynchronen Job-Ausführung abrufen.
```python
result = client.execute_workflow_sync(
status = client.get_job_status("task-id-from-async-execution")
print("Status:", status["status"]) # 'queued', 'processing', 'completed', 'failed'
if status["status"] == "completed":
print("Output:", status["output"])
```
**Parameter:**
- `task_id` (str): Die Task-ID, die von der asynchronen Ausführung zurückgegeben wurde
**Rückgabe:** `Dict[str, Any]`
**Antwortfelder:**
- `success` (bool): Ob die Anfrage erfolgreich war
- `taskId` (str): Die Task-ID
- `status` (str): Einer der Werte `'queued'`, `'processing'`, `'completed'`, `'failed'`, `'cancelled'`
- `metadata` (dict): Enthält `startedAt`, `completedAt` und `duration`
- `output` (any, optional): Die Workflow-Ausgabe (wenn abgeschlossen)
- `error` (any, optional): Fehlerdetails (wenn fehlgeschlagen)
- `estimatedDuration` (int, optional): Geschätzte Dauer in Millisekunden (wenn in Bearbeitung/in Warteschlange)
##### execute_with_retry()
Einen Workflow mit automatischer Wiederholung bei Ratenbegrenzungsfehlern unter Verwendung von exponentiellem Backoff ausführen.
```python
result = client.execute_with_retry(
"workflow-id",
input_data={"data": "some input"},
timeout=60.0
input_data={"message": "Hello"},
timeout=30.0,
max_retries=3, # Maximum number of retries
initial_delay=1.0, # Initial delay in seconds
max_delay=30.0, # Maximum delay in seconds
backoff_multiplier=2.0 # Exponential backoff multiplier
)
```
**Parameter:**
- `workflow_id` (str): Die ID des auszuführenden Workflows
- `input_data` (dict, optional): Eingabedaten, die an den Workflow übergeben werden
- `timeout` (float): Timeout für die initiale Anfrage in Sekunden
- `timeout` (float, optional): Timeout in Sekunden
- `stream` (bool, optional): Streaming-Antworten aktivieren
- `selected_outputs` (list, optional): Block-Ausgaben zum Streamen
- `async_execution` (bool, optional): Asynchron ausführen
- `max_retries` (int, optional): Maximale Anzahl von Wiederholungen (Standard: 3)
- `initial_delay` (float, optional): Anfängliche Verzögerung in Sekunden (Standard: 1.0)
- `max_delay` (float, optional): Maximale Verzögerung in Sekunden (Standard: 30.0)
- `backoff_multiplier` (float, optional): Backoff-Multiplikator (Standard: 2.0)
**Rückgabe:** `WorkflowExecutionResult`
**Rückgabewert:** `WorkflowExecutionResult | AsyncExecutionResult`
Die Wiederholungslogik verwendet exponentielles Backoff (1s → 2s → 4s → 8s...) mit ±25% Jitter, um den Thundering-Herd-Effekt zu vermeiden. Wenn die API einen `retry-after` Header bereitstellt, wird dieser stattdessen verwendet.
##### get_rate_limit_info()
Ruft die aktuellen Rate-Limit-Informationen aus der letzten API-Antwort ab.
```python
rate_limit_info = client.get_rate_limit_info()
if rate_limit_info:
print("Limit:", rate_limit_info.limit)
print("Remaining:", rate_limit_info.remaining)
print("Reset:", datetime.fromtimestamp(rate_limit_info.reset))
```
**Rückgabewert:** `RateLimitInfo | None`
##### get_usage_limits()
Ruft aktuelle Nutzungslimits und Kontingentinformationen für dein Konto ab.
```python
limits = client.get_usage_limits()
print("Sync requests remaining:", limits.rate_limit["sync"]["remaining"])
print("Async requests remaining:", limits.rate_limit["async"]["remaining"])
print("Current period cost:", limits.usage["currentPeriodCost"])
print("Plan:", limits.usage["plan"])
```
**Rückgabewert:** `UsageLimits`
**Antwortstruktur:**
```python
{
"success": bool,
"rateLimit": {
"sync": {
"isLimited": bool,
"limit": int,
"remaining": int,
"resetAt": str
},
"async": {
"isLimited": bool,
"limit": int,
"remaining": int,
"resetAt": str
},
"authType": str # 'api' or 'manual'
},
"usage": {
"currentPeriodCost": float,
"limit": float,
"plan": str # e.g., 'free', 'pro'
}
}
```
##### set_api_key()
@@ -170,6 +265,18 @@ class WorkflowExecutionResult:
total_duration: Optional[float] = None
```
### AsyncExecutionResult
```python
@dataclass
class AsyncExecutionResult:
success: bool
task_id: str
status: str # 'queued'
created_at: str
links: Dict[str, str] # e.g., {"status": "/api/jobs/{taskId}"}
```
### WorkflowStatus
```python
@@ -177,10 +284,30 @@ class WorkflowExecutionResult:
class WorkflowStatus:
is_deployed: bool
deployed_at: Optional[str] = None
is_published: bool = False
needs_redeployment: bool = False
```
### RateLimitInfo
```python
@dataclass
class RateLimitInfo:
limit: int
remaining: int
reset: int
retry_after: Optional[int] = None
```
### UsageLimits
```python
@dataclass
class UsageLimits:
success: bool
rate_limit: Dict[str, Any]
usage: Dict[str, Any]
```
### SimStudioError
```python
@@ -191,6 +318,13 @@ class SimStudioError(Exception):
self.status = status
```
**Häufige Fehlercodes:**
- `UNAUTHORIZED`: Ungültiger API-Schlüssel
- `TIMEOUT`: Zeitüberschreitung bei der Anfrage
- `RATE_LIMIT_EXCEEDED`: Ratengrenze überschritten
- `USAGE_LIMIT_EXCEEDED`: Nutzungsgrenze überschritten
- `EXECUTION_ERROR`: Workflow-Ausführung fehlgeschlagen
## Beispiele
### Grundlegende Workflow-Ausführung
@@ -214,7 +348,7 @@ class SimStudioError(Exception):
import os
from simstudio import SimStudioClient
client = SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY"))
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
def run_workflow():
try:
@@ -252,7 +386,7 @@ Behandeln Sie verschiedene Fehlertypen, die während der Workflow-Ausführung au
from simstudio import SimStudioClient, SimStudioError
import os
client = SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY"))
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
def execute_with_error_handling():
try:
@@ -279,16 +413,7 @@ def execute_with_error_handling():
Verwenden Sie den Client als Kontextmanager, um die Ressourcenbereinigung automatisch zu handhaben:
```python
from simstudio import SimStudioClient
import os
# Using context manager to automatically close the session
with SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY")) as client:
result = client.execute_workflow("workflow-id")
print("Result:", result)
# Session is automatically closed here
```
---CODE-PLACEHOLDER-ef99d3dd509e04865d5b6b0e0e03d3f8---
### Batch-Workflow-Ausführung
@@ -298,7 +423,7 @@ Führen Sie mehrere Workflows effizient aus:
from simstudio import SimStudioClient
import os
client = SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY"))
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
def execute_workflows_batch(workflow_data_pairs):
"""Execute multiple workflows with different input data."""
@@ -339,9 +464,233 @@ for result in results:
print(f"Workflow {result['workflow_id']}: {'Success' if result['success'] else 'Failed'}")
```
### Asynchrone Workflow-Ausführung
Führen Sie Workflows asynchron für lang laufende Aufgaben aus:
```python
import os
import time
from simstudio import SimStudioClient
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
def execute_async():
try:
# Start async execution
result = client.execute_workflow(
"workflow-id",
input_data={"data": "large dataset"},
async_execution=True # Execute asynchronously
)
# Check if result is an async execution
if hasattr(result, 'task_id'):
print(f"Task ID: {result.task_id}")
print(f"Status endpoint: {result.links['status']}")
# Poll for completion
status = client.get_job_status(result.task_id)
while status["status"] in ["queued", "processing"]:
print(f"Current status: {status['status']}")
time.sleep(2) # Wait 2 seconds
status = client.get_job_status(result.task_id)
if status["status"] == "completed":
print("Workflow completed!")
print(f"Output: {status['output']}")
print(f"Duration: {status['metadata']['duration']}")
else:
print(f"Workflow failed: {status['error']}")
except Exception as error:
print(f"Error: {error}")
execute_async()
```
### Rate-Limiting und Wiederholungsversuche
Behandle Rate-Limits automatisch mit exponentiellem Backoff:
```python
import os
from simstudio import SimStudioClient, SimStudioError
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
def execute_with_retry_handling():
try:
# Automatically retries on rate limit
result = client.execute_with_retry(
"workflow-id",
input_data={"message": "Process this"},
max_retries=5,
initial_delay=1.0,
max_delay=60.0,
backoff_multiplier=2.0
)
print(f"Success: {result}")
except SimStudioError as error:
if error.code == "RATE_LIMIT_EXCEEDED":
print("Rate limit exceeded after all retries")
# Check rate limit info
rate_limit_info = client.get_rate_limit_info()
if rate_limit_info:
from datetime import datetime
reset_time = datetime.fromtimestamp(rate_limit_info.reset)
print(f"Rate limit resets at: {reset_time}")
execute_with_retry_handling()
```
### Nutzungsüberwachung
Überwache deine Kontonutzung und -limits:
```python
import os
from simstudio import SimStudioClient
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
def check_usage():
try:
limits = client.get_usage_limits()
print("=== Rate Limits ===")
print("Sync requests:")
print(f" Limit: {limits.rate_limit['sync']['limit']}")
print(f" Remaining: {limits.rate_limit['sync']['remaining']}")
print(f" Resets at: {limits.rate_limit['sync']['resetAt']}")
print(f" Is limited: {limits.rate_limit['sync']['isLimited']}")
print("\nAsync requests:")
print(f" Limit: {limits.rate_limit['async']['limit']}")
print(f" Remaining: {limits.rate_limit['async']['remaining']}")
print(f" Resets at: {limits.rate_limit['async']['resetAt']}")
print(f" Is limited: {limits.rate_limit['async']['isLimited']}")
print("\n=== Usage ===")
print(f"Current period cost: ${limits.usage['currentPeriodCost']:.2f}")
print(f"Limit: ${limits.usage['limit']:.2f}")
print(f"Plan: {limits.usage['plan']}")
percent_used = (limits.usage['currentPeriodCost'] / limits.usage['limit']) * 100
print(f"Usage: {percent_used:.1f}%")
if percent_used > 80:
print("⚠️ Warning: You are approaching your usage limit!")
except Exception as error:
print(f"Error checking usage: {error}")
check_usage()
```
### Streaming-Workflow-Ausführung
Führe Workflows mit Echtzeit-Streaming-Antworten aus:
```python
from simstudio import SimStudioClient
import os
client = SimStudioClient(api_key=os.getenv("SIM_API_KEY"))
def execute_with_streaming():
"""Execute workflow with streaming enabled."""
try:
# Enable streaming for specific block outputs
result = client.execute_workflow(
"workflow-id",
input_data={"message": "Count to five"},
stream=True,
selected_outputs=["agent1.content"] # Use blockName.attribute format
)
print("Workflow result:", result)
except Exception as error:
print("Error:", error)
execute_with_streaming()
```
Die Streaming-Antwort folgt dem Server-Sent Events (SSE) Format:
```
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":"One"}
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", two"}
data: {"event":"done","success":true,"output":{},"metadata":{"duration":610}}
data: [DONE]
```
**Flask-Streaming-Beispiel:**
```python
from flask import Flask, Response, stream_with_context
import requests
import json
import os
app = Flask(__name__)
@app.route('/stream-workflow')
def stream_workflow():
"""Stream workflow execution to the client."""
def generate():
response = requests.post(
'https://sim.ai/api/workflows/WORKFLOW_ID/execute',
headers={
'Content-Type': 'application/json',
'X-API-Key': os.getenv('SIM_API_KEY')
},
json={
'message': 'Generate a story',
'stream': True,
'selectedOutputs': ['agent1.content']
},
stream=True
)
for line in response.iter_lines():
if line:
decoded_line = line.decode('utf-8')
if decoded_line.startswith('data: '):
data = decoded_line[6:] # Remove 'data: ' prefix
if data == '[DONE]':
break
try:
parsed = json.loads(data)
if 'chunk' in parsed:
yield f"data: {json.dumps(parsed)}\n\n"
elif parsed.get('event') == 'done':
yield f"data: {json.dumps(parsed)}\n\n"
print("Execution complete:", parsed.get('metadata'))
except json.JSONDecodeError:
pass
return Response(
stream_with_context(generate()),
mimetype='text/event-stream'
)
if __name__ == '__main__':
app.run(debug=True)
```
### Umgebungskonfiguration
Konfigurieren Sie den Client mit Umgebungsvariablen:
Konfiguriere den Client mit Umgebungsvariablen:
<Tabs items={['Development', 'Production']}>
<Tab value="Development">
@@ -352,8 +701,8 @@ Konfigurieren Sie den Client mit Umgebungsvariablen:
# Development configuration
client = SimStudioClient(
api_key=os.getenv("SIMSTUDIO_API_KEY"),
base_url=os.getenv("SIMSTUDIO_BASE_URL", "https://sim.ai")
api_key=os.getenv("SIM_API_KEY")
base_url=os.getenv("SIM_BASE_URL", "https://sim.ai")
)
```
@@ -365,13 +714,13 @@ Konfigurieren Sie den Client mit Umgebungsvariablen:
from simstudio import SimStudioClient
# Production configuration with error handling
api_key = os.getenv("SIMSTUDIO_API_KEY")
api_key = os.getenv("SIM_API_KEY")
if not api_key:
raise ValueError("SIMSTUDIO_API_KEY environment variable is required")
raise ValueError("SIM_API_KEY environment variable is required")
client = SimStudioClient(
api_key=api_key,
base_url=os.getenv("SIMSTUDIO_BASE_URL", "https://sim.ai")
base_url=os.getenv("SIM_BASE_URL", "https://sim.ai")
)
```
@@ -382,26 +731,22 @@ Konfigurieren Sie den Client mit Umgebungsvariablen:
<Steps>
<Step title="Bei Sim anmelden">
Navigieren Sie zu [Sim](https://sim.ai) und melden Sie sich bei Ihrem Konto an.
Navigiere zu [Sim](https://sim.ai) und melde dich bei deinem Konto an.
</Step>
<Step title="Ihren Workflow öffnen">
Navigieren Sie zu dem Workflow, den Sie programmatisch ausführen möchten.
<Step title="Öffne deinen Workflow">
Navigiere zu dem Workflow, den du programmatisch ausführen möchtest.
</Step>
<Step title="Ihren Workflow bereitstellen">
Klicken Sie auf "Deploy", um Ihren Workflow bereitzustellen, falls dies noch nicht geschehen ist.
<Step title="Deploye deinen Workflow">
Klicke auf "Deploy", um deinen Workflow zu deployen, falls dies noch nicht geschehen ist.
</Step>
<Step title="API-Schlüssel erstellen oder auswählen">
Wählen Sie während des Bereitstellungsprozesses einen API-Schlüssel aus oder erstellen Sie einen neuen.
<Step title="Erstelle oder wähle einen API-Schlüssel">
Wähle während des Deployment-Prozesses einen API-Schlüssel aus oder erstelle einen neuen.
</Step>
<Step title="API-Schlüssel kopieren">
Kopieren Sie den API-Schlüssel zur Verwendung in Ihrer Python-Anwendung.
<Step title="Kopiere den API-Schlüssel">
Kopiere den API-Schlüssel zur Verwendung in deiner Python-Anwendung.
</Step>
</Steps>
<Callout type="warning">
Halte deinen API-Schlüssel sicher und committe ihn niemals in die Versionskontrolle. Verwende Umgebungsvariablen oder sicheres Konfigurationsmanagement.
</Callout>
## Anforderungen
- Python 3.8+

View File

@@ -1,5 +1,5 @@
---
title: TypeScript/JavaScript SDK
title: TypeScript
---
import { Callout } from 'fumadocs-ui/components/callout'
@@ -7,10 +7,10 @@ import { Card, Cards } from 'fumadocs-ui/components/card'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
Das offizielle TypeScript/JavaScript SDK für Sim bietet vollständige Typsicherheit und unterstützt sowohl Node.js- als auch Browser-Umgebungen, sodass Sie Workflows programmatisch aus Ihren Node.js-Anwendungen, Webanwendungen und anderen JavaScript-Umgebungen ausführen können. Alle Workflow-Ausführungen sind derzeit synchron.
Das offizielle TypeScript/JavaScript SDK für Sim bietet vollständige Typsicherheit und unterstützt sowohl Node.js- als auch Browser-Umgebungen, sodass Sie Workflows programmatisch aus Ihren Node.js-Anwendungen, Webanwendungen und anderen JavaScript-Umgebungen ausführen können.
<Callout type="info">
Das TypeScript SDK bietet vollständige Typsicherheit und unterstützt sowohl Node.js- als auch Browser-Umgebungen. Alle Workflow-Ausführungen sind derzeit synchron.
Das TypeScript SDK bietet vollständige Typsicherheit, Unterstützung für asynchrone Ausführung, automatische Ratenbegrenzung mit exponentiellem Backoff und Nutzungsverfolgung.
</Callout>
## Installation
@@ -81,7 +81,7 @@ new SimStudioClient(config: SimStudioConfig)
##### executeWorkflow()
Führen Sie einen Workflow mit optionalen Eingabedaten aus.
Führt einen Workflow mit optionalen Eingabedaten aus.
```typescript
const result = await client.executeWorkflow('workflow-id', {
@@ -95,8 +95,13 @@ const result = await client.executeWorkflow('workflow-id', {
- `options` (ExecutionOptions, optional):
- `input` (any): Eingabedaten, die an den Workflow übergeben werden
- `timeout` (number): Timeout in Millisekunden (Standard: 30000)
- `stream` (boolean): Streaming-Antworten aktivieren (Standard: false)
- `selectedOutputs` (string[]): Block-Ausgaben, die im `blockName.attribute`Format gestreamt werden sollen (z.B. `["agent1.content"]`)
- `async` (boolean): Asynchron ausführen (Standard: false)
**Rückgabewert:** `Promise<WorkflowExecutionResult>`
**Rückgabewert:** `Promise<WorkflowExecutionResult | AsyncExecutionResult>`
Wenn `async: true`, wird sofort mit einer Task-ID zum Abfragen zurückgegeben. Andernfalls wird auf den Abschluss gewartet.
##### getWorkflowStatus()
@@ -128,32 +133,121 @@ if (isReady) {
**Rückgabewert:** `Promise<boolean>`
##### executeWorkflowSync()
##### getJobStatus()
<Callout type="info">
Derzeit ist diese Methode identisch mit `executeWorkflow()`, da alle Ausführungen synchron sind. Diese Methode wird für zukünftige Kompatibilität bereitgestellt, wenn asynchrone Ausführung hinzugefügt wird.
</Callout>
Einen Workflow ausführen (derzeit synchron, identisch mit `executeWorkflow()`).
Den Status einer asynchronen Job-Ausführung abrufen.
```typescript
const result = await client.executeWorkflowSync('workflow-id', {
input: { data: 'some input' },
timeout: 60000
const status = await client.getJobStatus('task-id-from-async-execution');
console.log('Status:', status.status); // 'queued', 'processing', 'completed', 'failed'
if (status.status === 'completed') {
console.log('Output:', status.output);
}
```
**Parameter:**
- `taskId` (string): Die Task-ID, die von der asynchronen Ausführung zurückgegeben wurde
**Rückgabewert:** `Promise<JobStatus>`
**Antwortfelder:**
- `success` (boolean): Ob die Anfrage erfolgreich war
- `taskId` (string): Die Task-ID
- `status` (string): Einer der Werte `'queued'`, `'processing'`, `'completed'`, `'failed'`, `'cancelled'`
- `metadata` (object): Enthält `startedAt`, `completedAt` und `duration`
- `output` (any, optional): Die Workflow-Ausgabe (wenn abgeschlossen)
- `error` (any, optional): Fehlerdetails (wenn fehlgeschlagen)
- `estimatedDuration` (number, optional): Geschätzte Dauer in Millisekunden (wenn in Bearbeitung/in der Warteschlange)
##### executeWithRetry()
Einen Workflow mit automatischer Wiederholung bei Rate-Limit-Fehlern unter Verwendung von exponentiellem Backoff ausführen.
```typescript
const result = await client.executeWithRetry('workflow-id', {
input: { message: 'Hello' },
timeout: 30000
}, {
maxRetries: 3, // Maximum number of retries
initialDelay: 1000, // Initial delay in ms (1 second)
maxDelay: 30000, // Maximum delay in ms (30 seconds)
backoffMultiplier: 2 // Exponential backoff multiplier
});
```
**Parameter:**
- `workflowId` (string): Die ID des auszuführenden Workflows
- `options` (ExecutionOptions, optional):
- `input` (any): Eingabedaten, die an den Workflow übergeben werden
- `timeout` (number): Timeout für die initiale Anfrage in Millisekunden
- `options` (ExecutionOptions, optional): Gleich wie `executeWorkflow()`
- `retryOptions` (RetryOptions, optional):
- `maxRetries` (number): Maximale Anzahl von Wiederholungen (Standard: 3)
- `initialDelay` (number): Anfängliche Verzögerung in ms (Standard: 1000)
- `maxDelay` (number): Maximale Verzögerung in ms (Standard: 30000)
- `backoffMultiplier` (number): Backoff-Multiplikator (Standard: 2)
**Rückgabewert:** `Promise<WorkflowExecutionResult>`
**Rückgabe:** `Promise<WorkflowExecutionResult | AsyncExecutionResult>`
Die Wiederholungslogik verwendet exponentielles Backoff (1s → 2s → 4s → 8s...) mit ±25% Jitter, um den Thundering-Herd-Effekt zu vermeiden. Wenn die API einen `retry-after` Header bereitstellt, wird dieser stattdessen verwendet.
##### getRateLimitInfo()
Ruft die aktuellen Rate-Limit-Informationen aus der letzten API-Antwort ab.
```typescript
const rateLimitInfo = client.getRateLimitInfo();
if (rateLimitInfo) {
console.log('Limit:', rateLimitInfo.limit);
console.log('Remaining:', rateLimitInfo.remaining);
console.log('Reset:', new Date(rateLimitInfo.reset * 1000));
}
```
**Rückgabe:** `RateLimitInfo | null`
##### getUsageLimits()
Ruft aktuelle Nutzungslimits und Kontingentinformationen für Ihr Konto ab.
```typescript
const limits = await client.getUsageLimits();
console.log('Sync requests remaining:', limits.rateLimit.sync.remaining);
console.log('Async requests remaining:', limits.rateLimit.async.remaining);
console.log('Current period cost:', limits.usage.currentPeriodCost);
console.log('Plan:', limits.usage.plan);
```
**Rückgabe:** `Promise<UsageLimits>`
**Antwortstruktur:**
```typescript
{
success: boolean
rateLimit: {
sync: {
isLimited: boolean
limit: number
remaining: number
resetAt: string
}
async: {
isLimited: boolean
limit: number
remaining: number
resetAt: string
}
authType: string // 'api' or 'manual'
}
usage: {
currentPeriodCost: number
limit: number
plan: string // e.g., 'free', 'pro'
}
}
```
##### setApiKey()
Den API-Schlüssel aktualisieren.
Aktualisiert den API-Schlüssel.
```typescript
client.setApiKey('new-api-key');
@@ -161,7 +255,7 @@ client.setApiKey('new-api-key');
##### setBaseUrl()
Die Basis-URL aktualisieren.
Aktualisiert die Basis-URL.
```typescript
client.setBaseUrl('https://my-custom-domain.com');
@@ -187,17 +281,69 @@ interface WorkflowExecutionResult {
}
```
### AsyncExecutionResult
```typescript
interface AsyncExecutionResult {
success: boolean;
taskId: string;
status: 'queued';
createdAt: string;
links: {
status: string; // e.g., "/api/jobs/{taskId}"
};
}
```
### WorkflowStatus
```typescript
interface WorkflowStatus {
isDeployed: boolean;
deployedAt?: string;
isPublished: boolean;
needsRedeployment: boolean;
}
```
### RateLimitInfo
```typescript
interface RateLimitInfo {
limit: number;
remaining: number;
reset: number;
retryAfter?: number;
}
```
### UsageLimits
```typescript
interface UsageLimits {
success: boolean;
rateLimit: {
sync: {
isLimited: boolean;
limit: number;
remaining: number;
resetAt: string;
};
async: {
isLimited: boolean;
limit: number;
remaining: number;
resetAt: string;
};
authType: string;
};
usage: {
currentPeriodCost: number;
limit: number;
plan: string;
};
}
```
### SimStudioError
```typescript
@@ -207,6 +353,13 @@ class SimStudioError extends Error {
}
```
**Häufige Fehlercodes:**
- `UNAUTHORIZED`: Ungültiger API-Schlüssel
- `TIMEOUT`: Zeitüberschreitung der Anfrage
- `RATE_LIMIT_EXCEEDED`: Rate-Limit überschritten
- `USAGE_LIMIT_EXCEEDED`: Nutzungslimit überschritten
- `EXECUTION_ERROR`: Workflow-Ausführung fehlgeschlagen
## Beispiele
### Grundlegende Workflow-Ausführung
@@ -230,7 +383,7 @@ class SimStudioError extends Error {
import { SimStudioClient } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.SIMSTUDIO_API_KEY!
apiKey: process.env.SIM_API_KEY!
});
async function runWorkflow() {
@@ -271,7 +424,7 @@ Behandeln Sie verschiedene Fehlertypen, die während der Workflow-Ausführung au
import { SimStudioClient, SimStudioError } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.SIMSTUDIO_API_KEY!
apiKey: process.env.SIM_API_KEY!
});
async function executeWithErrorHandling() {
@@ -315,14 +468,14 @@ Konfigurieren Sie den Client mit Umgebungsvariablen:
import { SimStudioClient } from 'simstudio-ts-sdk';
// Development configuration
const apiKey = process.env.SIMSTUDIO_API_KEY;
const apiKey = process.env.SIM_API_KEY;
if (!apiKey) {
throw new Error('SIMSTUDIO_API_KEY environment variable is required');
throw new Error('SIM_API_KEY environment variable is required');
}
const client = new SimStudioClient({
apiKey,
baseUrl: process.env.SIMSTUDIO_BASE_URL // optional
baseUrl: process.env.SIM_BASE_URL // optional
});
```
@@ -333,14 +486,14 @@ Konfigurieren Sie den Client mit Umgebungsvariablen:
import { SimStudioClient } from 'simstudio-ts-sdk';
// Production configuration with validation
const apiKey = process.env.SIMSTUDIO_API_KEY;
const apiKey = process.env.SIM_API_KEY;
if (!apiKey) {
throw new Error('SIMSTUDIO_API_KEY environment variable is required');
throw new Error('SIM_API_KEY environment variable is required');
}
const client = new SimStudioClient({
apiKey,
baseUrl: process.env.SIMSTUDIO_BASE_URL || 'https://sim.ai'
baseUrl: process.env.SIM_BASE_URL || 'https://sim.ai'
});
```
@@ -357,7 +510,7 @@ import { SimStudioClient } from 'simstudio-ts-sdk';
const app = express();
const client = new SimStudioClient({
apiKey: process.env.SIMSTUDIO_API_KEY!
apiKey: process.env.SIM_API_KEY!
});
app.use(express.json());
@@ -399,7 +552,7 @@ import { NextApiRequest, NextApiResponse } from 'next';
import { SimStudioClient } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.SIMSTUDIO_API_KEY!
apiKey: process.env.SIM_API_KEY!
});
export default async function handler(
@@ -450,33 +603,112 @@ async function executeClientSideWorkflow() {
});
console.log('Workflow result:', result);
// Update UI with result
document.getElementById('result')!.textContent =
document.getElementById('result')!.textContent =
JSON.stringify(result.output, null, 2);
} catch (error) {
console.error('Error:', error);
}
}
// Attach to button click
document.getElementById('executeBtn')?.addEventListener('click', executeClientSideWorkflow);
```
### Datei-Upload
Datei-Objekte werden automatisch erkannt und in das Base64-Format konvertiert. Fügen Sie sie in Ihrem Input unter dem Feldnamen ein, der dem API-Trigger-Inputformat Ihres Workflows entspricht.
Das SDK konvertiert Datei-Objekte in dieses Format:
```typescript
{
type: 'file',
data: 'data:mime/type;base64,base64data',
name: 'filename',
mime: 'mime/type'
}
```
Alternativ können Sie Dateien manuell im URL-Format bereitstellen:
```typescript
{
type: 'url',
data: 'https://example.com/file.pdf',
name: 'file.pdf',
mime: 'application/pdf'
}
```
<Tabs items={['Browser', 'Node.js']}>
<Tab value="Browser">
```typescript
import { SimStudioClient } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.NEXT_PUBLIC_SIM_API_KEY!
});
// From file input
async function handleFileUpload(event: Event) {
const input = event.target as HTMLInputElement;
const files = Array.from(input.files || []);
// Include files under the field name from your API trigger's input format
const result = await client.executeWorkflow('workflow-id', {
input: {
documents: files, // Must match your workflow's "files" field name
instructions: 'Analyze these documents'
}
});
console.log('Result:', result);
}
```
</Tab>
<Tab value="Node.js">
```typescript
import { SimStudioClient } from 'simstudio-ts-sdk';
import fs from 'fs';
const client = new SimStudioClient({
apiKey: process.env.SIM_API_KEY!
});
// Read file and create File object
const fileBuffer = fs.readFileSync('./document.pdf');
const file = new File([fileBuffer], 'document.pdf', {
type: 'application/pdf'
});
// Include files under the field name from your API trigger's input format
const result = await client.executeWorkflow('workflow-id', {
input: {
documents: [file], // Must match your workflow's "files" field name
query: 'Summarize this document'
}
});
```
</Tab>
</Tabs>
<Callout type="warning">
Bei der Verwendung des SDK im Browser sollten Sie darauf achten, keine sensiblen API-Schlüssel offenzulegen. Erwägen Sie die Verwendung eines Backend-Proxys oder öffentlicher API-Schlüssel mit eingeschränkten Berechtigungen.
</Callout>
### React Hook Beispiel
Erstellen Sie einen benutzerdefinierten React Hook für die Workflow-Ausführung:
Erstellen Sie einen benutzerdefinierten React-Hook für die Workflow-Ausführung:
```typescript
import { useState, useCallback } from 'react';
import { SimStudioClient, WorkflowExecutionResult } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.NEXT_PUBLIC_SIMSTUDIO_API_KEY!
apiKey: process.env.SIM_API_KEY!
});
interface UseWorkflowResult {
@@ -532,7 +764,7 @@ function WorkflowComponent() {
<button onClick={handleExecute} disabled={loading}>
{loading ? 'Executing...' : 'Execute Workflow'}
</button>
{error && <div>Error: {error.message}</div>}
{result && (
<div>
@@ -545,7 +777,252 @@ function WorkflowComponent() {
}
```
## Ihren API-Schlüssel erhalten
### Asynchrone Workflow-Ausführung
Führen Sie Workflows asynchron für lang laufende Aufgaben aus:
```typescript
import { SimStudioClient, AsyncExecutionResult } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.SIM_API_KEY!
});
async function executeAsync() {
try {
// Start async execution
const result = await client.executeWorkflow('workflow-id', {
input: { data: 'large dataset' },
async: true // Execute asynchronously
});
// Check if result is an async execution
if ('taskId' in result) {
console.log('Task ID:', result.taskId);
console.log('Status endpoint:', result.links.status);
// Poll for completion
let status = await client.getJobStatus(result.taskId);
while (status.status === 'queued' || status.status === 'processing') {
console.log('Current status:', status.status);
await new Promise(resolve => setTimeout(resolve, 2000)); // Wait 2 seconds
status = await client.getJobStatus(result.taskId);
}
if (status.status === 'completed') {
console.log('Workflow completed!');
console.log('Output:', status.output);
console.log('Duration:', status.metadata.duration);
} else {
console.error('Workflow failed:', status.error);
}
}
} catch (error) {
console.error('Error:', error);
}
}
executeAsync();
```
### Rate-Limiting und Wiederholungsversuche
Automatische Behandlung von Rate-Limits mit exponentiellem Backoff:
```typescript
import { SimStudioClient, SimStudioError } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.SIM_API_KEY!
});
async function executeWithRetryHandling() {
try {
// Automatically retries on rate limit
const result = await client.executeWithRetry('workflow-id', {
input: { message: 'Process this' }
}, {
maxRetries: 5,
initialDelay: 1000,
maxDelay: 60000,
backoffMultiplier: 2
});
console.log('Success:', result);
} catch (error) {
if (error instanceof SimStudioError && error.code === 'RATE_LIMIT_EXCEEDED') {
console.error('Rate limit exceeded after all retries');
// Check rate limit info
const rateLimitInfo = client.getRateLimitInfo();
if (rateLimitInfo) {
console.log('Rate limit resets at:', new Date(rateLimitInfo.reset * 1000));
}
}
}
}
```
### Nutzungsüberwachung
Überwachen Sie Ihre Kontonutzung und -limits:
```typescript
import { SimStudioClient } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.SIM_API_KEY!
});
async function checkUsage() {
try {
const limits = await client.getUsageLimits();
console.log('=== Rate Limits ===');
console.log('Sync requests:');
console.log(' Limit:', limits.rateLimit.sync.limit);
console.log(' Remaining:', limits.rateLimit.sync.remaining);
console.log(' Resets at:', limits.rateLimit.sync.resetAt);
console.log(' Is limited:', limits.rateLimit.sync.isLimited);
console.log('\nAsync requests:');
console.log(' Limit:', limits.rateLimit.async.limit);
console.log(' Remaining:', limits.rateLimit.async.remaining);
console.log(' Resets at:', limits.rateLimit.async.resetAt);
console.log(' Is limited:', limits.rateLimit.async.isLimited);
console.log('\n=== Usage ===');
console.log('Current period cost: $' + limits.usage.currentPeriodCost.toFixed(2));
console.log('Limit: $' + limits.usage.limit.toFixed(2));
console.log('Plan:', limits.usage.plan);
const percentUsed = (limits.usage.currentPeriodCost / limits.usage.limit) * 100;
console.log('Usage: ' + percentUsed.toFixed(1) + '%');
if (percentUsed > 80) {
console.warn('⚠️ Warning: You are approaching your usage limit!');
}
} catch (error) {
console.error('Error checking usage:', error);
}
}
checkUsage();
```
### Streaming-Workflow-Ausführung
Führen Sie Workflows mit Echtzeit-Streaming-Antworten aus:
```typescript
import { SimStudioClient } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: process.env.SIM_API_KEY!
});
async function executeWithStreaming() {
try {
// Enable streaming for specific block outputs
const result = await client.executeWorkflow('workflow-id', {
input: { message: 'Count to five' },
stream: true,
selectedOutputs: ['agent1.content'] // Use blockName.attribute format
});
console.log('Workflow result:', result);
} catch (error) {
console.error('Error:', error);
}
}
```
Die Streaming-Antwort folgt dem Server-Sent Events (SSE) Format:
```
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":"One"}
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", two"}
data: {"event":"done","success":true,"output":{},"metadata":{"duration":610}}
data: [DONE]
```
**React Streaming Beispiel:**
```typescript
import { useState, useEffect } from 'react';
function StreamingWorkflow() {
const [output, setOutput] = useState('');
const [loading, setLoading] = useState(false);
const executeStreaming = async () => {
setLoading(true);
setOutput('');
// IMPORTANT: Make this API call from your backend server, not the browser
// Never expose your API key in client-side code
const response = await fetch('https://sim.ai/api/workflows/WORKFLOW_ID/execute', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.SIM_API_KEY! // Server-side environment variable only
},
body: JSON.stringify({
message: 'Generate a story',
stream: true,
selectedOutputs: ['agent1.content']
})
});
const reader = response.body?.getReader();
const decoder = new TextDecoder();
while (reader) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value);
const lines = chunk.split('\n\n');
for (const line of lines) {
if (line.startsWith('data: ')) {
const data = line.slice(6);
if (data === '[DONE]') {
setLoading(false);
break;
}
try {
const parsed = JSON.parse(data);
if (parsed.chunk) {
setOutput(prev => prev + parsed.chunk);
} else if (parsed.event === 'done') {
console.log('Execution complete:', parsed.metadata);
}
} catch (e) {
// Skip invalid JSON
}
}
}
}
};
return (
<div>
<button onClick={executeStreaming} disabled={loading}>
{loading ? 'Generating...' : 'Start Streaming'}
</button>
<div style={{ whiteSpace: 'pre-wrap' }}>{output}</div>
</div>
);
}
```
## API-Schlüssel erhalten
<Steps>
<Step title="Bei Sim anmelden">
@@ -557,51 +1034,19 @@ function WorkflowComponent() {
<Step title="Deployen Sie Ihren Workflow">
Klicken Sie auf "Deploy", um Ihren Workflow zu deployen, falls dies noch nicht geschehen ist.
</Step>
<Step title="Erstellen oder wählen Sie einen API-Schlüssel">
<Step title="API-Schlüssel erstellen oder auswählen">
Wählen Sie während des Deployment-Prozesses einen API-Schlüssel aus oder erstellen Sie einen neuen.
</Step>
<Step title="Kopieren Sie den API-Schlüssel">
<Step title="API-Schlüssel kopieren">
Kopieren Sie den API-Schlüssel zur Verwendung in Ihrer TypeScript/JavaScript-Anwendung.
</Step>
</Steps>
<Callout type="warning">
Halten Sie Ihren API-Schlüssel sicher und committen Sie ihn niemals in die Versionskontrolle. Verwenden Sie Umgebungsvariablen oder sicheres Konfigurationsmanagement.
</Callout>
## Anforderungen
- Node.js 16+
- TypeScript 5.0+ (für TypeScript-Projekte)
## TypeScript-Unterstützung
Das SDK ist in TypeScript geschrieben und bietet vollständige Typsicherheit:
```typescript
import {
SimStudioClient,
WorkflowExecutionResult,
WorkflowStatus,
SimStudioError
} from 'simstudio-ts-sdk';
// Type-safe client initialization
const client: SimStudioClient = new SimStudioClient({
apiKey: process.env.SIMSTUDIO_API_KEY!
});
// Type-safe workflow execution
const result: WorkflowExecutionResult = await client.executeWorkflow('workflow-id', {
input: {
message: 'Hello, TypeScript!'
}
});
// Type-safe status checking
const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
```
## Lizenz
Apache-2.0

Some files were not shown because too many files have changed in this diff Show More