Compare commits

...

1108 Commits

Author SHA1 Message Date
Siddharth Ganesan
6d46b44e51 Stash 2025-11-10 19:46:27 -08:00
Siddharth Ganesan
ff99d75055 Run from block v1 2025-11-10 19:09:43 -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
Waleed
4dc4073452 v0.4.7: blog 2025-10-06 12:35:29 -07:00
Emir Karabeg
d9b70087c4 feat(blog): created first page (#1550)
* feat(blog): created first page

* feat(building): first draft blog complete
2025-10-06 12:25:07 -07:00
Waleed
07fd9c3a4a feat(posthog): added posthog provider instead of using nextjs instrumentation (#1555)
* fix(posthog): make instrumentation client not use next-runtime-env

* feat(posthog): added posthog provider
2025-10-06 10:59:46 -07:00
Waleed
377b84e18c v0.4.6: kb improvements, posthog fixes 2025-10-05 21:48:32 -07:00
Waleed
223ecda80e fix(posthog): add rewrites for posthog reverse proxy routes unconditionally, remove unused POSTHOG_ENABLED envvar (#1548) 2025-10-05 21:27:03 -07:00
Waleed
7dde01e74b fix(kb): force kb uploads to use serve route (#1547) 2025-10-05 17:50:21 -07:00
Vikhyath Mondreti
b768ca845e v0.4.5: copilot updates, kb improvements, payment failure fix 2025-10-04 16:37:41 -07:00
Waleed
86ed32ea10 feat(kb): added json/yaml parser+chunker, added dedicated csv chunker (#1539)
* feat(kb): added json/yaml parser+chunker, added dedicated csv chunker

* ack PR comments

* improved kb upload
2025-10-04 14:59:21 -07:00
Vikhyath Mondreti
0e838940f1 fix(copilot): targeted auto-layout for copilot edits + custom tool persistence (#1546)
* fix autolayout and custom tools persistence

* fix

* fix preserving positions within subflow

* more fixes

* fix resizing

* consolidate constants
2025-10-04 14:52:37 -07:00
Siddharth Ganesan
7cc9a23f99 fix(copilot): tool renaming 2025-10-04 11:52:20 -07:00
Vikhyath Mondreti
c42d2a32f3 feat(copilot): fix context / json parsing edge cases (#1542)
* Add get ops examples

* input format incorrectly created by copilot should not crash workflow

* fix tool edits triggering overall delta

* fix(db): add more options for SSL connection, add envvar for base64 db cert (#1533)

* fix trigger additions

* fix nested outputs for triggers

* add condition subblock sanitization

* fix custom tools json

* Model selector

* fix response format sanitization

* remove dead code

* fix export sanitization

* Update migration

* fix import race cond

* Copilot settings

* fix response format

* stop loops/parallels copilot generation from breaking diff view

* fix lint

* Apply suggestion from @greptile-apps[bot]

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

* fix tests

* fix lint

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-10-03 19:08:57 -07:00
Vikhyath Mondreti
4da355d269 fix(billing-blocked): block platform usage if payment fails for regular subs as well (#1541) 2025-10-03 12:17:53 -07:00
Waleed
2175fd1106 v0.4.4: database config updates 2025-10-02 20:08:09 -07:00
Waleed
10692b5e5a fix(db): remove overly complex db connection logic (#1538) 2025-10-02 19:54:32 -07:00
Waleed
62298bf094 fix(db): added database config to drizzle.config in app container (#1536) 2025-10-02 18:09:27 -07:00
Waleed
5f1518ffd9 fix(db): added SSL config to migrations container (#1535) 2025-10-02 18:04:31 -07:00
Waleed
cae0e85826 v0.4.3: posthog, docs updates, search modal improvements 2025-10-02 17:02:48 -07:00
Waleed
fa9c97816b fix(db): add more options for SSL connection, add envvar for base64 db cert (#1533) 2025-10-02 15:53:45 -07:00
Vikhyath Mondreti
4bc37db547 feat(copilot): JSON sanitization logic + operations sequence diff correctness (#1521)
* add state sending capability

* progress

* add ability to add title and description to workflow state

* progress in language

* fix

* cleanup code

* fix type issue

* fix subflow deletion case

* Workflow console tool

* fix lint

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
2025-10-02 15:11:03 -07:00
Waleed
15138629cb improvement(performance): remove writes to workflow updated_at on position updates for blocks, edges, & subflows (#1531)
* improvement(performance): remove writes to workflow updated_at on position updates for blocks, edges, & subflows

* update query pattern for logs routes
2025-10-02 11:53:50 -07:00
Waleed
ace83ebcae feat(cmdk): added knowledgebases to the cmdk modal (#1530) 2025-10-01 21:21:42 -07:00
Waleed
b33ae5bff9 fix(fumadocs): fixed client-side export on fumadocs (#1529) 2025-10-01 20:52:20 -07:00
Waleed
dc6052578d fix(kb): removed filename constraint from knowledgebase doc names (#1527) 2025-10-01 20:39:56 -07:00
Waleed
4adbae03e7 chore(deps): update fumadocs (#1525) 2025-10-01 20:28:12 -07:00
Vikhyath Mondreti
3509ce8ce4 fix(autolayout): type issue if workflow deployed + remove dead state code (#1524)
* fix(autolayout): type issue if workflow deployed

* remove dead code hasActiveWebhook field
2025-10-01 20:18:29 -07:00
Waleed
7aae108b87 feat(posthog): added posthog for analytics (#1523)
* feat(posthog): added posthog for analytics

* added envvars to env.ts
2025-10-01 20:12:26 -07:00
Waleed
980a6d8347 improvement(db): enforce SSL everywhere where a DB connection is established (#1522)
* improvement(db): enforce SSL everywhere where a DB connection is established

* remove extraneous comment
2025-10-01 19:09:08 -07:00
Vikhyath Mondreti
745eaff622 v0.4.2: autolayout improvements, variable resolution, CI/CD, deployed chat, router block fixes 2025-10-01 17:27:35 -07:00
Vikhyath Mondreti
35d857ef2e fix(trigger): inject project id env var in correctly (#1520) 2025-10-01 17:16:28 -07:00
Waleed
6e63eafb79 improvement(db): remove vercel, remove railway, remove crons, improve DB connection config (#1519)
* improvement(db): remove vercel, remove railway, remove crons, improve DB connection config

* remove NEXT_PUBLIC_VERCEL_URL

* remove db url fallbacks

* remove railway & more vercel stuff

---------

Co-authored-by: waleed <waleed>
2025-10-01 16:37:13 -07:00
Waleed
896f7bb0a0 fix(ci): update trigger.dev ci to only push to staging on merge to staging & for prod as well (#1518) 2025-10-01 13:22:04 -07:00
Waleed
97f69a24e1 fix(redirects): update middleware to allow access to /chat regardless of auth status (#1516) 2025-10-01 10:46:18 -07:00
Waleed
1a2c4040aa improvement(trigger): increase maxDuration for background tasks to 10 min to match sync API executions (#1504)
* improvement(trigger): increase maxDuration for background tasks to 10 min to match sync API executions

* add trigger proj id
2025-10-01 10:40:18 -07:00
Vikhyath Mondreti
4ad9be0836 fix(router): use getBaseUrl() helper (#1515)
* fix(router): use getBaseUrl() helper

* add existence check
2025-10-01 10:39:57 -07:00
Vikhyath Mondreti
0bf2bce368 improvement(var-resolution): resolve variables with block name check and consolidate code (#1469)
* improvement(var-resolution): resolve variables with block name check and consolidate code

* fix tests

* fix type error

* fix var highlighting in kb tags

* fix kb tags
2025-09-30 19:20:35 -07:00
Vikhyath Mondreti
0d881ecc00 fix(deployed-version-check): check deployed version existence pre-queuing (#1508)
* fix(deployed-version-check): check deployed version existence pre-queuing

* fix tests

* fix edge case
2025-09-30 19:20:21 -07:00
Siddharth Ganesan
7e6a5dc7e2 Fix/remove trigger promotion (#1513)
* Revert trigger promotion

* Move trigger

* Fix ci
2025-09-30 18:29:28 -07:00
Siddharth Ganesan
c1a3500bde fix(ci): capture correct deployment version output (#1512)
* Capture correct deployment version output

* Add trigger access token to each step

* Use correct arn
2025-09-30 16:36:19 -07:00
Siddharth Ganesan
561b6f2778 fix(ci): fix trigger version capture 2025-09-30 16:20:25 -07:00
Siddharth Ganesan
cdfee16b8a Fix trigger ci creds (#1510) 2025-09-30 14:03:38 -07:00
Siddharth Ganesan
9f6cb1becf fix(ci): trigger permissions 2025-09-30 13:53:02 -07:00
Siddharth Ganesan
dca8745c44 fix(ci): add skip promotion to trigger ci 2025-09-30 13:37:07 -07:00
Vikhyath Mondreti
c35c8d1f31 improvement(autolayout): use live block heights / widths for autolayout to prevent overlaps (#1505)
* improvement(autolayout): use live block heights / widths for autolayout to prevent overlaps

* improve layering algo for multiple trigger setting

* remove console logs

* add type annotation
2025-09-30 13:24:19 -07:00
Siddharth Ganesan
87c00cec6d improvement(ci): trigger.dev pushes (#1506)
* Fix trigger workflow ci

* Update trigger location
2025-09-30 13:22:24 -07:00
Vikhyath Mondreti
17edf0405b improvement(triggers): uuid, autolayout, copilot context (#1503)
* make trigger select uuid consistent with sidebar selection

* add trigger allowed flag for core triggers

* fix autolayout with new triggers
2025-09-30 11:31:54 -07:00
Siddharth Ganesan
79461840c3 fix(migrations): make sso migration idempotent 2025-09-30 11:04:44 -07:00
Siddharth Ganesan
e76fc8c2da Remove migrations ci (#1501) 2025-09-30 10:43:41 -07:00
Waleed
e9150a53e3 feat(i18n): update translations (#1496) 2025-09-30 09:44:50 -07:00
Waleed
f9f84111cb v0.4.1: docker fixes, deployed state improvements 2025-09-30 01:16:28 -07:00
Waleed
01ffee8e7c fix(deployed): support internal JWT for deployed child workflow executions (#1498) 2025-09-30 01:14:32 -07:00
Siddharth Ganesan
367189fe15 fix(ci): fix docker manifest build (#1495) 2025-09-29 20:57:00 -07:00
Siddharth Ganesan
7de9e5fb19 fix(ci): fix docker manifest build 2025-09-29 20:55:52 -07:00
Siddharth Ganesan
10652eb9b8 v0.4.0: copilot v1, triggers, sso/saml support, version control 2025-09-29 20:27:23 -07:00
Waleed
010753d170 chore(docs): remove remaining yml references from docs (#1492) 2025-09-29 20:13:44 -07:00
Waleed
bf1c178282 feat(sso): add support for login with SAML/SSO (#1489)
* feat(sso): added login with SAML/SSO

* restore env

* fixed login styling

* upgrade deps, update UI

* more styling improvements

* reran migrations, tested with script

* improvement(auth): created SSO page

* improvement(auth): remove email option for SSO if not enabled

* cleanup

* cleaned up, added documentation for SSO/SAML config + tested registering either one with script and UI form

* cleanup

* ack PR comments

* move sso known providers to consts

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-09-29 20:05:26 -07:00
Siddharth Ganesan
6a664663cf fix(copilot): deprecate yaml, json import/export, deprecate build_workflow tool, convert copilot to json-based (#1488)
* Temp commit

* Edit workflow self contained

* Remove build_workflow

* Base bad version

* fix lint

* Sanitize workflows for copilot

* Fixes

* Fix import/export buttons

* fix autolayout

* fix lint

* fix training logic to work with json

* Add claude sonnet 4.5 to copilot

* Lint

* Update copilot url

* Update default model and fix build errors

* Fix tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-29 19:12:08 -07:00
Siddharth Ganesan
333442909b Fix copilot diff (#1485) 2025-09-29 13:12:10 -07:00
Waleed
67c993d743 fix(ci): remove atomic updates for trigger (#1478) 2025-09-27 22:37:28 -07:00
Waleed
38dd2d0f23 improvement(ci): ensure atomicity in trigger deploys, improve overall ci organization (#1477)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* improvement(ci): ensure atomicity in trigger deploys, improve overall ci organization

* Revert "improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]"

This reverts commit c68c052601.

---------

Co-authored-by: waleed <waleed>
2025-09-27 22:11:06 -07:00
Adam Gough
5ee6345120 Fix(google drive): google sheets creating a file (#1476)
* fixed upload to google drive with sheets

* cleanup, remove unneeded scope
2025-09-27 20:48:01 -07:00
Waleed
dd1985c99c improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier] (#1474)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* ui fix

* added back validate route, remove backwards compatibility for subdomain redirects

* cleanup

* cleanup

* add chat page to conditional theme layout, and remove custom chat css

* consolidate theme providers

* ack pr commnets

---------

Co-authored-by: waleed <waleed>
2025-09-27 17:32:10 -07:00
Waleed
39356f3d74 fix(ui): standardized 404, chat, and invite pages (#1472)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* fix(ui): standardized 404, chat, and invite pages

* Revert "improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]"

* fixed ui for 404 page
2025-09-27 14:03:24 -07:00
Waleed
1ec5b1bdad improvement(deps): remove vercel speed insights (#1470)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* improvement(deps): remove vercel speed insights

* Revert "improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]"

This reverts commit c68c052601.

---------

Co-authored-by: waleed <waleed>
2025-09-27 11:52:19 -07:00
Waleed
bcc75376e5 feat(permissions): allow users to deploy workflows in all workspaces they are an admin in (#1463)
* feat(permissions): allow admin workspace users to deploy workflows in workspaces they don't own

* fixed failing test

* added additional routes

* remove overly complex, unecessary test and fixed docs formatting

* follow DRY
2025-09-26 19:58:11 -07:00
Adam Gough
448e9ea835 fix(tools): fixed supabase order by (#1467)
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-26 19:26:50 -07:00
Waleed
a63f3a3d8d improvement(copilot): added session context checks in copilot tool calls (#1466)
* improvement(copilot): added session context checks in copilot tool calls

* remove extraneous comments, remove the ability to view copilot API keys after creation

* updated skeleton

---------

Co-authored-by: waleed <waleed>
2025-09-26 19:04:49 -07:00
Waleed
3ff6509028 feat(i18n): update translations (#1465)
* feat(i18n): update translations

* fixed french i18n error

---------
2025-09-26 19:01:22 -07:00
Vikhyath Mondreti
2ae30f1399 add google vault to landing page footer (#1464) 2025-09-26 16:38:24 -07:00
Vikhyath Mondreti
0e65a8a31d feat(trigger-docs): new trigger docs, function block rce imports fix (#1462)
* fix(sidebar): draggable cursor on sidebar when switching workflows (#1276)

* remove inline css for edge labels

* fix remote code execution imports for javascript

* add docs for new triggers

* fix

* fix draggable link

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-09-26 16:23:52 -07:00
Waleed
d1f5c69e6b fix(envvars): use getEnv for isHosted check since it is client-side (#1461) 2025-09-26 12:50:51 -07:00
Waleed
c468ecbc72 feat(i18n): update translations (#1460) 2025-09-26 12:21:28 -07:00
Adam Gough
97257ca49f Feat(google vault): added google vault tool (#1459)
* first push pre testing

* toosl working

* progress

* bun run lint

* added doc

* changed google client ID and secret back

* cleaned up oauth

* removed comment

* removed any and added manual content

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-26 11:13:58 -07:00
Waleed
6daeb77740 feat(turbo): added turborepo, tailwind v3 (#1458) 2025-09-25 21:18:51 -07:00
Waleed
f79e87e4c2 improvement(parallel): update parallel subflow to support conditional routing (#1444)
* improvement(parallel): update parallel subblock to support conditional routing

* ignore disconnected blocks in parallel/loop

* added utils

* fix z-index issues with edges in subflow

* fixed aggregation of results from loop & parallel blocks

* feat(manual-trigger): add manual trigger (#1452)

* feat(manual-trigger): add manual trigger

* consolidate input format extraction

* exclude triggers from console logs + deployed chat error surfacing

* works

* centralize error messages + logging for deployed chat

* fix(css-config): use correct version (#1453)

* fix(css-config): use correct version

* fix lint

* improvement(parallel): update parallel subblock to support conditional routing

* ignore disconnected blocks in parallel/loop

* added utils

* fix z-index issues with edges in subflow

* fixed aggregation of results from loop & parallel blocks

* change z index within component and remvoe global css

* fix cascade deletion subflows sockets case

* improve results array for subflows

* fix onedgeclick inside subflows

* fix test

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-09-25 18:31:34 -07:00
Waleed
18599ac3c3 fix(tailwind): revert tailwind back to v3 for main app (#1456)
* fix(css): fix css build issue

* fix(postcss): revert back to tailwind v3

* bun.lock update
2025-09-25 18:04:40 -07:00
Waleed
e49cde7766 fix(ci): modify docs embeddings ci to only run on english documentation (#1455) 2025-09-25 17:52:00 -07:00
Waleed
7146ce512d feat(ci): use blacksmith for ci (#1454)
* feat(ci): use blacksmith for ci

* consolidate ecr + ghcr builds for linux/amd64
2025-09-25 17:37:12 -07:00
Vikhyath Mondreti
1b7e883b10 fix(css-config): use correct version (#1453)
* fix(css-config): use correct version

* fix lint
2025-09-25 16:42:31 -07:00
Vikhyath Mondreti
e03c036a10 feat(manual-trigger): add manual trigger (#1452)
* feat(manual-trigger): add manual trigger

* consolidate input format extraction

* exclude triggers from console logs + deployed chat error surfacing

* works

* centralize error messages + logging for deployed chat
2025-09-25 16:29:50 -07:00
Siddharth Ganesan
7e8ac5c27f fix(ci): docker (#1451)
* Docker ci 2

* Bun issues

* bun lock
2025-09-25 13:23:06 -07:00
Siddharth Ganesan
c12b3d2550 Remove double calling of ci (#1450) 2025-09-25 12:39:39 -07:00
Siddharth Ganesan
d381a69c9f feat(ci): consolidate ci, make db migrations dependent on ecr success, remove turbopack for staging/prod builds (#1449)
* Remove turbopack

* Fix ci errors

* Sim agent import fix

* Lint

* Ci orchestration

* Lint

* Ci updates

* Tdz fix for generate

* Remove logger

* Fix imports

* Lint
2025-09-25 12:26:25 -07:00
Vikhyath Mondreti
928581f387 feat(deployments): make deployed state source of truth for non-manual executions + versioning (#1242)
* feat(deployments): make deployed state source of truth for non-manual executions + versioning

* fix lint

* fix test

* add script to migrate to deployed vesions

* fix deployed chat

* address greptile commands

* Remove 84th migration files to prepare for regeneration

* fix script + update migration

* fix script

* cleanup typing

* use shared helper

* fix tests

* fix duplicate route

* revert migrations prep

* add migration back

* add workflow in workflow block func

* fix UI

* fix lint

* make migration idempotent

* remove migrations

* add migrations back'

* adjust script to reuse helper

* add test webhook URL functionality

* consolidate test URL + prod URL code for webhooks

* fixes

* update trigger config save with correct dependencies

* make frozen canvas respect trigger mode

* chore(db): remove latest migration 0088, snapshot, journal entry; delete migrate-deployment-versions script

* separate parent id cleanup migration

* chore(db): remove 0089 migration, snapshot, and prune journal entry

* chore(db): generate 0090 migration after removing 0089 and merging staging

* fix

* chore(db): remove 0090 migration, snapshot, and prune journal entry

* chore(db): generate 0091 migration after merging staging and restoring idempotency flow

* fix some imports

* remove dead code

* fix tests

* remove comment

* working test url functionality restored

* works

* some styling changes

* make deploy text accurate

* chore(db): remove latest migration 0091 and snapshot; update journal before merging staging

* db(migrations): generate 0093_medical_sentinel and snapshots after merging staging

* reconcile with other merge

* fix trigger test

* remove extra use effect

* fix test url"

* don't swallow serializer errors

* fix lint

* fix tests

* fix tests

* expose root for generic webhook

* root access for webhook

* add is workflow ready check correctly
2025-09-24 20:28:09 -07:00
Siddharth Ganesan
2c7c8d582e Add dh login (#1448) 2025-09-24 18:20:45 -07:00
Siddharth Ganesan
426873245f feat(infra): add ci for aws image push (#1447)
* Stash

* Ci for aws v1

* Fix ecr
2025-09-24 17:45:26 -07:00
Siddharth Ganesan
ca6ff7edb6 feat(infra): add staging docker image 2025-09-24 15:18:40 -07:00
Vikhyath Mondreti
094dae3d3f feat(copilot): add training interface (#1445)
* progress

* cleanup UI

* progress

* fix trigger mode in yaml + copilot side

* persist user settings

* wrap operations correctly

* add trigger mode to add op

* remove misplaced comment

* add sent notification

* remove unused tab:
2025-09-24 14:19:11 -07:00
Emir Karabeg
2ee27f972e improvement: remove sentry dependency (#1435)
* improvement: remove Sentry

* update bun.lock
2025-09-24 10:46:59 -07:00
Waleed
0b2ef5e3a6 chore(deps): added entities dependency (#1441) 2025-09-24 10:43:41 -07:00
Waleed
67ac3ff84b chore(deps): upgrade turborepo (#1439) 2025-09-23 21:36:10 -07:00
Waleed
8ed2c5ec53 feat(i18n): update translations (#1437) 2025-09-23 18:56:42 -07:00
Vikhyath Mondreti
2ace06f239 fix build error 2025-09-23 18:31:25 -07:00
Waleed
20a272c8c3 chore(deps): remove unused deps, reduce overall dependencies & size (#1436)
Co-authored-by: waleed <waleed>
2025-09-23 17:39:38 -07:00
Waleed
0d86eaa3a1 fix(usage): persist cost multiplier at provider level instead of also at the logger level (#1433)
* feat(changelog): added changelog

* fix(usage): persist cost multiplier at provider level

* Revert "feat(changelog): added changelog"

This reverts commit 885d10c4d9.

---------

Co-authored-by: waleed <waleed>
2025-09-23 17:11:29 -07:00
Vikhyath Mondreti
aa0a33e60f Revert "feat(traceroot): add traceroot logger" (#1434)
This reverts commit 6d1b172a3e.
2025-09-23 16:59:49 -07:00
Vikhyath Mondreti
603b5471a3 fix(copilot): null check simplified (#1431) 2025-09-23 16:03:32 -07:00
Vikhyath Mondreti
ab8d822edf fix(copilot): restore subblock options (#1430) 2025-09-23 15:56:56 -07:00
Waleed
5bb9b46554 improvement(subflows): support multiple blocks in parallel subflow, enhance logs to group by iteration for parallels/loop (#1429)
* feat(changelog): added changelog

* move avatar icons in changelog

* improvement(parallels): support multiple blocks in parallel subflow, enhance logs to group by iteration for parallels/loops

* restore env

* added tests

* lint

* update drizzle

---------

Co-authored-by: waleed <waleed>
2025-09-23 15:25:05 -07:00
Waleed
994eb8db2a feat(i18n): added japanese and german translations (#1428)
* feat(changelog): added changelog

* feat(i18n): added japanese and german translations

* reordered

---------

Co-authored-by: waleed <waleed>
2025-09-23 15:13:31 -07:00
Vikhyath Mondreti
fbb164db98 improvement(copilot): add best practices for core blocks (#1427)
* improvement(copilot): add best practices for blocks

* fix kb, api

* Update apps/sim/blocks/blocks/memory.ts

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

* address comments

* remove non deterministic test

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-09-23 13:11:41 -07:00
Vikhyath Mondreti
dd8f633f9f fix(instrumentation): open telemetry init (#1426) 2025-09-23 11:06:40 -07:00
Vikhyath Mondreti
6d1b172a3e feat(traceroot): add traceroot logger 2025-09-23 10:39:52 -07:00
Vikhyath Mondreti
b7876ca466 improvement(copilot): structured metadata context + start block deprecation (#1362)
* progress

* progress

* deploy command update

* add trigger mode modal

* fix trigger icons'

* fix corners for add trigger card

* update serialization error visual in console

* works

* improvement(copilot-context): structured context for copilot

* forgot long description

* Update metadata params

* progress

* add better workflow ux

* progress

* highlighting works

* trigger card

* default agent workflow change

* fix build error

* remove any casts

* address greptile comments

* Diff input format

* address greptile comments

* improvement: ui/ux

* improvement: changed to vertical scrolling

* fix(workflow): ensure new blocks from sidebar click/drag use getUniqueBlockName (with semantic trigger base when applicable)

* Validation + build/edit mark complete

* fix trigger dropdown

* Copilot stuff (lots of it)

* Temp update prod dns

* fix trigger check

* fix

* fix trigger mode check

* Fix yaml imports

* Fix autolayout error

* fix deployed chat

* Fix copilot input text overflow

* fix trigger mode persistence in addBlock with enableTriggerMode flag passed in

* Lint

* Fix failing tests

* Reset ishosted

* Lint

* input format for legacy starter

* Fix executor

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-09-22 23:24:50 -07:00
Waleed
68df95906f feat(changelog): added changelog and gh action to auto-release (#1423)
* feat(changelog): added changelog

* finished changelog

* updated metadata

* reverted env

* cleanup

---------

Co-authored-by: waleed <waleed>
2025-09-22 21:35:21 -07:00
Waleed
760219dcce feat(i18n): update translations (#1421) 2025-09-22 19:52:51 -07:00
Waleed
f1b83c1988 feat(tools): added resend email sender (#1420) 2025-09-22 19:16:42 -07:00
Vikhyath Mondreti
2f97782df0 feat(undo-redo): undo/redo for canvas editing (#1392)
* feat(undo-redo): support undo-redo on canvas

* fix zoom live subscribe

* progress

* fix subflows

* progress

* fix subflow logic

* pruning stacks

* centralize unique naming logic

* fix type issues

* address greptile comments

* remove timeouts
2025-09-22 16:38:13 -07:00
Waleed
7cb303e713 fix(redirects): move redirects for terms/privacy to client-side redirects (#1418) 2025-09-22 15:10:29 -07:00
Waleed
8eaa83fe21 fix(billing): reset usage on transition from free -> paid plan (#1397)
* fix(billing): reset usage on transition from free -> paid plan

* fixes: pro->team upgrade logic, single org server side check on invite routes

* ui improvements

* cleanup team-members code

* minor renaming

* progress

* fix pro->team upgrade to prevent double billing

* add subscription delete case handler

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-22 13:58:29 -07:00
Waleed
5c92d5d456 v0.3.58: trigger.dev updates 2025-09-22 12:58:15 -07:00
Waleed
aa01e7e58a fix(actions): update trigger.dev github action (#1417) 2025-09-22 12:38:31 -07:00
Waleed
a3c76da636 chore(deps): update trigger.dev sdk (#1416) 2025-09-22 12:30:28 -07:00
Waleed
cf19c895bb chore(deps): upgdate trigger.dev cli (#1414) 2025-09-22 12:24:45 -07:00
Waleed
c017027000 v0.3.57: docs updates, generic webhook variables deconstruction, ollama & docker fixes 2025-09-22 12:17:02 -07:00
Waleed
73d779ad79 fix(csp): added terms, privacy, & logo URLs to CSP (#1413) 2025-09-22 12:04:48 -07:00
Emir Karabeg
25781279e2 feat: added favicon (#1410) 2025-09-22 11:14:06 -07:00
Waleed
6fada45cd8 improvement(readme): update readme.md (#1412) 2025-09-22 11:12:25 -07:00
Waleed
e640102797 feat(otp): added environemnt variable to control enforcement of verified accounts (#1411)
* feat(otp): added environemnt variable to control enforcement of verified accounts

* added to helm
2025-09-22 11:04:47 -07:00
Vikhyath Mondreti
16f5819941 fix(missing-user-stats): missing user stats rows covered via migration' (#1409) 2025-09-22 10:50:04 -07:00
Waleed
d83865c635 fix(tools): fixed arxiv tools (#1403) 2025-09-21 12:05:41 -07:00
Waleed
6b4ebbac6e feat(404): added 404 page (#1401)
* feat(404): added 404 page

* use provided brand support email over default sim one
2025-09-20 14:35:44 -07:00
Waleed
708321d0bf fix(tools): added transform response to handle non-json responses for internal tools (#1400) 2025-09-20 14:17:47 -07:00
Waleed
e4d35afe1f improvement(usage): bar execution if limits cannot be determined, init user stats record on user creation instead of in stripe plugin (#1399)
* improvement(usage): bar execution if limits cannot be determined, init user stats record on user creation instead of in stripe plugin

* upsert user stats record in execution logger
2025-09-20 14:08:51 -07:00
Waleed
1d74ccfeda fix(ollama): fix ollama container for CPU vs GPU mode (#1396) 2025-09-20 12:08:44 -07:00
Waleed
545e590ce5 fix(emails): updated path for email assets to absolute rather than relative paths (#1398) 2025-09-20 12:08:34 -07:00
Waleed
93f9293f2c fix(verification): add OTP dev skip (#1395) 2025-09-20 11:31:41 -07:00
Vikhyath Mondreti
b5570c1c0e fix(cursor): misaligned in long inputs (#1388) 2025-09-19 11:49:36 -07:00
Waleed
225571c49a improvement(search): improved filters UI and search suggestions (#1387)
* improvement(search): improved filters UI and search suggestions

* update tool input UI
2025-09-19 11:22:47 -07:00
Waleed
a1c518e4e1 feat(file): add more upload types to the file block (#1386) 2025-09-19 10:07:52 -07:00
Vikhyath Mondreti
04922fe5c9 fix(generic-webhooks): idempotency simplification, generic webhook vars changes (#1384)
* fix(idempotency): simplify for deterministic provider based checks

* remove generic webhook outputs and allow body to be referenced via vars
2025-09-19 10:03:45 -07:00
Waleed
8e70a61ba9 fix(docker): added copilot-related keys to docker container definitions (#1382) 2025-09-18 21:08:25 -07:00
Waleed
abae6b96b5 feat(i18n): update translations (#1381)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-09-18 18:18:17 -07:00
Vikhyath Mondreti
bff1852a85 v0.3.56: i18n, sharepoint operations & logs search improvements 2025-09-18 14:21:14 -07:00
Adam Gough
7327b448e5 Improvement(sharepoint): added ability to create list items, different from create list (#1379)
* added add list items

(cherry picked from commit df6ea35d5bb975c03c7ec0c787bd915f34890ac0)

* bun run lint

* minor changes

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-09-18 14:18:58 -07:00
Waleed
eb1e90bb7f improvement(search): added more granular logs search, added logs export, improved overall search experience (#1378)
* improvement(search): added more granular logs search, added logs export, improved overall search experience

* updated tests
2025-09-18 13:58:44 -07:00
Vikhyath Mondreti
3905d1cb81 fix(selectors): gdrive and slack selectors inf loops (#1376)
* fix(selectors): gdrive and slack selectors inf loops

* remove comment
2025-09-18 11:40:36 -07:00
Waleed
cd084e8236 fix(actions): updated i18n gh action to use PAT instead of default token (#1377) 2025-09-18 11:29:02 -07:00
Waleed
5d96484501 fix(variables): remove quote stripping from short & long inputs (#1375)
* fix(variables): remove quote stripping from short & long inputs

* restore env

* remove quote stripping everywhere

* remove unused file
2025-09-18 11:04:22 -07:00
Waleed
6747a497fc fix(migrations): upgrade drizzle-kit in migrations container (#1374)
* fix(migrations): upgrade drizzle-kit in migrations container

* fix comments

* rm unused file
2025-09-18 11:04:06 -07:00
Waleed
2df65527d3 v0.3.55: landing page / OTP improvements, DB package separation, Webhooks fixes, Sharepoint Improvement 2025-09-17 23:48:35 -07:00
Adam Gough
d0b69455e2 Improvement(sharepoint): added more operations in sharepoint (#1369)
* added list tools

* not working yet

* improved read and create

* added scopes

* updated sharepoint tools

* added greptile comments

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-17 19:16:12 -07:00
Vikhyath Mondreti
6028b1f5c0 fix(dockerfile): needs dummy db url (#1368) 2025-09-17 18:56:54 -07:00
Waleed
658cf11299 improvement(idempotency): added atomic claims to prevent duplicate processing for long-running workflows (#1366)
* improvement(idempotency): added atomic claims to prevent duplicate processing for long-running workflows

* ack PR comments
2025-09-17 17:17:55 -07:00
Waleed
6312df3a07 feat(signup): added back to login functionality to OTP page (#1365)
* update infra and remove railway

* feat(signup): added back to login functionalityfrom OTP page

* remove placeholders from docker commands, simplified login flow

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-17 17:17:37 -07:00
Vikhyath Mondreti
9de7a00373 improvement(code-structure): move db into separate package (#1364)
* improvement(code-structure): move db into separate package

* make db separate package

* remake bun lock

* update imports to not maintain two separate ones

* fix CI for tests by adding dummy url

* vercel build fix attempt

* update bun lock

* regenerate bun lock

* fix mocks

* remove db commands from apps/sim package json
2025-09-17 15:41:13 -07:00
Waleed
325a666a8b improvement(landing): insert prompt into copilot panel from landing, open panel on entry (#1363)
* update infra and remove railway

* improvement(landing): insert prompt into copilot panel from landing, open panel on entry

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* fixes

* remove debug logs

* go back to old env
2025-09-17 12:28:22 -07:00
Vikhyath Mondreti
2149f5e36d v0.3.54: google forms block, new landing page, generic mail tool, billing fixes 2025-09-16 22:13:12 -07:00
Emir Karabeg
009e1da5f1 improvement(platform): ui/ux (#1357)
* improvement: branding; auth; chat-deploy

* improvement: docs favicon

* fix: rolled back verification logic
2025-09-16 21:51:23 -07:00
Vikhyath Mondreti
6101493f12 fix(next-js): pin version (#1358)
* fix(next-js): pin version

* fix
2025-09-16 21:50:52 -07:00
Adam Gough
4b5c2b43e9 feat(google-forms): added google forms block (#1343)
* fix(sidebar): draggable cursor on sidebar when switching workflows (#1276)

* added google form tool to read forms

* added trigger mode and block docs

* updated docs

* removed file

* reverted diff

* greptile comments

* Reverted bun file

* remove outdated code for old webhook modal

* restore ui changes to webhooks

* removed provider specific logic

* fix lint

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-09-16 21:20:59 -07:00
Vikhyath Mondreti
bd402cdda5 fix(layout): fix layout semantics on invite page (#1356) 2025-09-16 21:17:51 -07:00
Emir Karabeg
0c30646a2d improvement: branding; auth; chat-deploy (#1351)
* improvement: branding; auth; chat-deploy

* improvement: docs favicon
2025-09-16 21:16:55 -07:00
Vikhyath Mondreti
53792b9a1d fix bun lock (#1354) 2025-09-16 21:02:11 -07:00
Vikhyath Mondreti
48f86e66f4 fix(better-auth): revert back to version 1.2.9 (#1352) 2025-09-16 20:53:01 -07:00
Waleed
fd422b5d0d feat(sms): add generic sms sending block/tool (#1349)
* update infra and remove railway

* feat(sms): add generic sms sending block/tool

* added docs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* updated colors

* remove fallbacks, stronger typing
2025-09-16 17:47:15 -07:00
Waleed
17cf72834d improvement(gh): fix i18n github action to run on merge to staging (#1350)
* update infra and remove railway

* improvement(ci): fix i18n github action

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-16 17:34:53 -07:00
Waleed
3122b506fd feat(tools): add generic mail sending block/tools, updated docs script (#1348)
* update infra and remove railway

* feat(tools): add generic mail sending block/tools, updated docs script

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* remove message id

* updated type
2025-09-16 16:06:31 -07:00
Waleed
a31305b7ee fix(bun): pin bun version for db migrations (#1347)
* fix(migrations): downgrade nextjs

* fix(bun): pin bun version in db migrations

* Revert "fix(migrations): downgrade nextjs"

This reverts commit 27b544f22d.
2025-09-16 14:31:37 -07:00
Emir Karabeg
4f26a7aa73 feat(landing): new landing page (#1219)
* update infra and remove railway

* feat(landing): background; font; metadata; nav

* finished navbar ui

* completed hero UI

* hero heading UI/UX

* updated icon descriptions

* canvas improvements

* canvas improvements

* updated canvas; adjusted background

* removed gsap; adjusted canvas height

* added templates outline

* feat(landing, landing-2): Update background, hero components, nav, integrations, pricing, templates, testimonials, tailwind config

* feat(landing, landing-2): Update background, footer, hero, index components, integrations, landing-pricing, landing templates, footer in sections, icons, middleware

* improvement(landing): optimized html

* feat(landing): update background, footer, hero, integrations, landing-enterprise, landing-pricing, landing-templates, nav, add github-stars route

* feat(landing): added onclicks

* feat(landing): commented out templates

* fix: reset environment

* fixed build

* feat(landing): updated background, footer, index, integrations, landing-pricing, nav, testimonials, landing page, fonts, environment

* feat(landing): swapped integrations and pricing

* navigation for new landing

* login/signup/terms/privacy preliminary changes, as well as navigation setup

* feat(landing,nav,hero,integrations,footer,testimonials,background,structured-data): updates and additions across components

* feat(landing): updated terms and privacy

* feat(auth): adjusted background

* feat(auth): signup and login complete

* feat(auth): completed all flows ui/ux

* fix: testing and build

* feat(landing, auth): update nav and login tests

* fix(ui): update auth navigation component (149 chars)

* restore scripts dir

* revert back to old globals.css brand primary color, updated invite page

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* remove logos

* add gh stars action for reuse on landing + cht

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-09-15 21:40:35 -07:00
Waleed
a06ae0d2e7 v0.3.53: logs search, idempotency for webhooks, billing fixes for overage, i18n for docs 2025-09-15 19:53:14 -07:00
Waleed
ab97ac5a77 fix(build): upgrade fumadocs to latest (#1341)
* update infra and remove railway

* fix(builds): upgraded fumadocs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-15 19:28:07 -07:00
Waleed
ac8bf96eee fix(build): upgrade fumadocs (#1340)
* update infra and remove railway

* fix(build): fixed the build

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-15 17:47:34 -07:00
Waleed
d4165f5be6 feat(docs): added footer for page navigation, i18n for docs (#1339)
* update infra and remove railway

* feat(docs): added footer for page navigation, i18n for docs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* added SEO-related stuff

* fix image sizes

* add missing pages

* remove extraneous comments
2025-09-15 17:31:35 -07:00
Vikhyath Mondreti
994c35f62c fix(stripe): revert to stable versioning for better auth plugin (#1337) 2025-09-15 16:04:28 -07:00
Vikhyath Mondreti
4ce6bc94c3 fix(stripe): use latest version to fix event mismatch issues (#1336)
* fix(stripe): use latest version to fix event mismatch issues

* fix enterprise handling

* cleanup

* update better auth version

* fix overage order of ops

* upgrade better auth version

* fix image typing

* change image type to string | undefined
2025-09-15 15:54:41 -07:00
Adam Gough
ba21d274ec improvement(array-index): resolved variables for 2d arrays (#1328)
* resolved variables for 2d arrays

* added tests

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-09-15 15:43:20 -07:00
Waleed
d73a97ffa2 feat(idempotency): added generalized idempotency service for all triggers/webhooks (#1330)
* update infra and remove railway

* feat(webhooks): add idempotency service for all triggers/webhooks

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* cleanup

* ack PR comments
2025-09-15 14:50:18 -07:00
Waleed
f2ec43e4f9 feat(logs): added intelligent search with suggestions to logs (#1329)
* update infra and remove railway

* feat(logs): added intelligent search to logs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* cleanup

* cleanup
2025-09-13 17:32:41 -07:00
Adam Gough
3e5d3735dc changed search for folders and workflows in logs (#1327)
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-13 12:38:50 -07:00
Waleed
172d51e061 fix(security): fix ssrf vuln and path validation for files route (#1325)
* update infra and remove railway

* fix(security): fix ssrf vuln

* fix path validation for file serve

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* lint

* ack PR comments
2025-09-13 11:32:10 -07:00
Vikhyath Mondreti
1ad31c92ac v0.3.52: docs updates, deployment version tables, workspace-level api keys, knowledgebase improvements 2025-09-12 12:14:11 -07:00
Waleed
065fc5b87b feat(api-keys): add workspace level api keys to share with other workspace members, add encryption for api keys (#1323)
* update infra and remove railway

* feat(api-keys): add workspace-level api keys

* encrypt api keys

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.

* reran migrations

* tested workspace keys

* consolidated code

* more consolidation

* cleanup

* consolidate, remove unused code

* add dummy key for ci

* continue with regular path for self-hosted folks that don't have key set

* fix tests

* fix test

* remove tests

* removed ci additions
2025-09-12 11:46:47 -07:00
Adam Gough
3798c56e8c improvement(long-description): modified long description for every block (#1322)
modified long description
2025-09-11 19:26:32 -07:00
Waleed
c591433248 fix(file-upload): fix nextjs file upload issue with pdf-parse (#1321)
* update infra and remove railway

* fix(file-upload): fix nextjs file upload issue with pdf-parse

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.
2025-09-11 14:13:51 -07:00
Vikhyath Mondreti
f0186593a1 chore(deployment-versioning): add migration script into repo (#1318)
* chore(deployment-versioning): add migration script into repo

* add migration

* remove parent id changes
2025-09-11 12:45:31 -07:00
Waleed
6cf02b9b5a fix(kb): exclude deleted docs from embeddings/vector search (#1319)
* update infra and remove railway

* fix(kb): exclude deleted docs from queries

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.
2025-09-11 12:09:03 -07:00
Waleed
2dc75b1ac1 feat(docs): overhaul docs (#1317)
* update infra and remove railway

* overhaul docs

* added a lot more videos/examples to docs

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.

* remove unused lines

* update start block docs

* update agent docs

* update API block docs

* update function block docs

* update response block docs

* update parallel and router docs

* update workflow docs

* update connections docs

* fix(sheets): fixed google sheets update (#1311)

Google sheets append was sending an invalid shape to the google sheets api. This PR fixes this by having similar logic to what is in append.ts

* fix(serializer): Required-field validation now respects sub-block visibility (#1313)

* audit content

* audit content

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-09-11 11:53:56 -07:00
Vikhyath Mondreti
d3f7ef4ac4 fix(serializer): Required-field validation now respects sub-block visibility (#1313) 2025-09-10 19:47:20 -07:00
Adam Gough
9a6cc78332 fix(sheets): fixed google sheets update (#1311)
Google sheets append was sending an invalid shape to the google sheets api. This PR fixes this by having similar logic to what is in append.ts
2025-09-10 17:55:35 -07:00
Waleed
ea8762e99b v0.3.51: mcp support, copilot improvements, polling for live execution data, bug fixes 2025-09-10 14:35:53 -07:00
Waleed
cff0a8718e fix(webhooks): made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block (#1309)
* update infra and remove railway

* fix(webooks-ui): made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block

* Revert "update infra and remove railway"

This reverts commit 5a8876209d.

* remove extraneous comments

* ack PR comments
2025-09-10 14:25:17 -07:00
Vikhyath Mondreti
abca73106d improvement(readme): add e2b reference to readme (#1307) 2025-09-10 10:53:47 -07:00
Waleed
afb99fbaf1 fix(webhook-ui): fixed webhook ui (#1301)
* update infra and remove railway

* fix(webhook-ui): fixed webhook ui

* Revert "update infra and remove railway"

This reverts commit 88669ad0b7.

* feat(control-bar): updated export controls and webhook settings

* additional styling improvements to chat deploy & templates modals

* fix test event

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-10 09:35:28 -07:00
Adam Gough
4d973ffb01 Fix(yaml env var): added env var fallback (#1300)
* added env var to route

* lint

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-09 18:11:53 -07:00
Vikhyath Mondreti
8841e9bd6b fix(subflow-validation): validate subflow fields correctly + surface serialization errors in the logs correctly (#1299)
* fix(subflow-validation): validate subflow fields correctly + surface serialiazation errors in the logs correctly

* remove comments
2025-09-09 18:02:30 -07:00
Waleed
3d4b9f0665 feat(mcp): added support for mcp servers (#1296)
* update infra and remove railway

* feat(mcp): add mcp support

* consolidate mcp utils

* UI improvements, more MCP stuff

* cleanup placeholders

* reran migrations

* general improvements

* fix server side mcp exec

* more improvements, fixed search in environment settings tab

* persist subblock values for mcp block

* style fixes

* udpdate all text-primary to text-muted-foreground for visibility in dark mode

* Revert "update infra and remove railway"

This reverts commit dbf2b153b8f96808e7bb7e5f86f7e8624e3c12dd.

* make MCP servers workspace-scoped

* cleanup & remove unused dep

* consolidated utils, DRY

* added tests

* better error messages, confirmed that permissions works correctly

* additional improvements

* remove extraneous comments

* reran migrations

* lint

* style changes

* fix: prevent config mutation in MCP client URL retry logic

Fixed an issue where the MCP client was mutating the shared configuration
object's URL during retry attempts. This could cause configuration corruption
if the same config object was reused elsewhere.

* resolve PR comments

* ack PR comments
2025-09-09 17:18:08 -07:00
Vikhyath Mondreti
c48039f97f improvement(subblock-defaults): custom defaults for subblocks if needed (#1298) 2025-09-09 17:12:10 -07:00
Waleed
8f7b11f089 feat(account): added user profile pictures in settings (#1297)
* update infra and remove railway

* feat(account): add profile pictures

* Revert "update infra and remove railway"

This reverts commit e3f0c49456.

* ack PR comments, use brandConfig logo URL as default
2025-09-09 16:09:31 -07:00
Waleed
ae670a7819 fix(start-input): restore tag dropdown in input-format component (#1294)
* update infra and remove railway

* fix(input-format): restore tag dropdown in input-format component

* Revert "update infra and remove railway"

This reverts commit 7ade5fb2ef.

* style improvements
2025-09-09 12:58:21 -07:00
Vikhyath Mondreti
a5c224e4b0 fix(workflow-block): remove process specific circular dependency check (#1293)
* fix(workflow-block): remove process specific circular dep check

* remove comments
2025-09-09 12:50:25 -07:00
Vikhyath Mondreti
0785f6e920 feat(logs-api): expose logs as api + can subscribe to workflow execution using webhook url (#1287)
* feat(logs-api): expose logs as api + can subscribe to workflow exection using webhook url

* fix scroll

* Update apps/docs/content/docs/execution/api.mdx

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

* fix rate limits

* address greptile comments

* remove unused file

* address more greptile comments

* minor UI changes

* fix atomicity to prevent races

* make search param sensible

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-09-09 11:34:18 -07:00
Siddharth Ganesan
cf4a935575 Merge pull request #1286 from simstudioai/fix/copilot-custom-tools
fix(copilot): custom tools
2025-09-08 17:23:58 -07:00
Siddharth Ganesan
521316bb8c Lint 2025-09-08 16:39:57 -07:00
Vikhyath Mondreti
d357280003 feat(usage-api): make external endpoint to query usage (#1285)
* feat(usage-api): make external endpoint to query usage

* add docs

* consolidate endpoints with rate-limits one

* update docs

* consolidate code

* remove unused route
2025-09-08 16:35:58 -07:00
Siddharth Ganesan
adf8c2244c Fix custom tool save 2025-09-08 15:46:59 -07:00
Siddharth Ganesan
ebfdb9ce3b V1 2025-09-08 15:23:15 -07:00
Vikhyath Mondreti
784992f347 v0.3.50: debounce moved server side, hasWorkflowChanged fixes, advanced mode/serializer fix, jira fix, billing notifs 2025-09-08 11:53:44 -07:00
Waleed
5218dd41b9 fix(notifications): increase precision on billing calculations (#1283)
* update infra and remove railway

* fix(notifications): increase precision on billing calculations

* Revert "update infra and remove railway"

This reverts commit d17603e844.

* cleanup
2025-09-08 10:46:23 -07:00
Waleed
07e70409c7 feat(notifications): added notifications for usage thresholds, overages, and welcome emails (#1266)
* feat(notifications): added notifications for usage thresholds, overages, and welcome emails

* cleanup

* updated logo, ack PR comments

* ran migrations
2025-09-08 09:47:16 -07:00
Adam Gough
07ba17422b Fix(jira): reading multiple issues and write
fixed the read and write tools in jira
2025-09-06 20:48:49 -07:00
Waleed
d45324bb83 fix(sidebar): draggable cursor on sidebar when switching workflows (#1276) 2025-09-06 19:52:23 -07:00
Vikhyath Mondreti
ced64129da fix(subblock-param-mapping): consolidate resolution of advanced / basic mode params using canonicalParamId (#1274)
* fix(serializer): block's params mapper not running first

* fix

* fix

* revert

* add canonicalParamId

* fix

* fix tests

* fix discord

* fix condition checking

* edit condition check

* fix

* fix subblock config check

* fix

* add logging

* add more logs

* fix

* fix

* attempt

* fix discord

* remove unused discord code

* mark as required correctly
2025-09-06 17:33:49 -07:00
Vikhyath Mondreti
1e14743391 fix(sockets): move debounce to server side (#1265)
* fix(sockets): move debounce to server side

* remove comments / unused onBlur
2025-09-06 12:49:35 -07:00
Waleed
a0bb754c8c 0.3.49: readme updates, router block and variables improvements 2025-09-05 14:58:39 -07:00
Waleed
851031239d fix(variables): add back ability to reference root block like <start> (#1262) 2025-09-05 14:45:26 -07:00
Waleed
3811b509ef fix(router): change router block content to prompt (#1261)
* fix(router): remove prompt from router content

* fixed router
2025-09-05 13:39:04 -07:00
Vikhyath Mondreti
abb835d22d fix(schedule-self-host): remove incorrect migration (#1260)
* fix(schedule-self-host): remove incorrect migration

* delete unintentional file
2025-09-05 11:52:39 -07:00
Vikhyath Mondreti
f2a046ff24 improvement(docs): readme.md to mention .env setup for copilot setup 2025-09-05 11:01:54 -07:00
Vikhyath Mondreti
bd6d4a91a3 0.3.48: revert trigger dev bypass for enterprise users 2025-09-04 23:57:22 -07:00
Vikhyath Mondreti
21beca8fd5 fix(cleanup): cleanup unused vars + webhook typo (#1259) 2025-09-04 23:52:31 -07:00
Vikhyath Mondreti
0a86eda853 Revert "feat(enterprise-plan-webhooks): skip webhook queue for enterprise plan users (#1250)" (#1257)
This reverts commit 37dcde2afc.
2025-09-04 23:37:19 -07:00
Waleed
60a061e38a v0.3.47: race condition fixes, store rehydration consolidation, other bugs 2025-09-04 22:36:42 -07:00
Waleed
ab71fcfc49 feat(invitations): add ability to resend invitations with cooldown, fixed UI in dark mode issues (#1256) 2025-09-04 22:15:27 -07:00
Vikhyath Mondreti
864622c1dc fix(ratelimits): enterprise and team checks should be pooled limit (#1255)
* fix(ratelimits): enterprise and team checks should be pooled limit"

* fix

* fix dynamic imports

* fix tests"
;
2025-09-04 21:44:56 -07:00
Waleed
8668622d66 feat(duplicate): duplicate variables when duplicating a workflow (#1254)
* feat(duplicate): duplicate variables when duplicating a workflow

* better typing
2025-09-04 21:20:30 -07:00
Waleed
53dd277cfe fix(cost): restored cost reporting for agent block in console entry (#1253) 2025-09-04 21:12:15 -07:00
Vikhyath Mondreti
0e8e8c7a47 fix(sidebar): order by created at (#1251) 2025-09-04 20:23:00 -07:00
Vikhyath Mondreti
47da5eb6e8 fix(rehydration): consolidate store rehydration code (#1249)
* fix(rehydration): consolidate store rehydration code

* fix stale closure
2025-09-04 20:00:51 -07:00
Vikhyath Mondreti
37dcde2afc feat(enterprise-plan-webhooks): skip webhook queue for enterprise plan users (#1250)
* feat(enterprise-plan-webhooks): skip webhook queue for enterprise plan users

* reuse subscription record instead of making extra db call
2025-09-04 20:00:24 -07:00
Vikhyath Mondreti
e31627c7c2 fix(sidebar): re-ordering based on last edit is confusing (#1248) 2025-09-04 18:30:59 -07:00
Vikhyath Mondreti
57c98d86ba fix(race-condition-workflow-switching): another race condition between registry and workflow stores (#1247)
* fix(race-condition-workflow-switching): another race condition between regitry and workflow stores"

* fix initial load race cond + cleanup

* fix initial load issue + simplify
2025-09-04 18:02:00 -07:00
Vikhyath Mondreti
0f7dfe084a fix(hydration): duplicate overlay after idle + subblocks race condition (#1246)
* fix(hydration): duplicate overlay after idle + subblocks race condition

* remove random timeout

* re-use correct helper

* remove redundant check

* add check

* remove third init func
2025-09-04 16:18:35 -07:00
Siddharth Ganesan
afc1632830 Merge pull request #1245 from simstudioai/fix/copilot-billing
improvement(copilot): billing multiplier adjustments
2025-09-04 12:05:17 -07:00
Siddharth Ganesan
56eee2c2d2 Waring 2025-09-04 11:37:06 -07:00
Siddharth Ganesan
fc558a8eef Lint + tests 2025-09-04 11:35:03 -07:00
Siddharth Ganesan
c68cadfb84 Docs 2025-09-04 11:27:54 -07:00
Siddharth Ganesan
95d93a2532 change 2025-09-04 11:23:36 -07:00
Siddharth Ganesan
59b2023124 Lint 2025-09-04 11:19:41 -07:00
Siddharth Ganesan
a672f17136 Add input/output multipliers 2025-09-04 11:19:00 -07:00
Waleed
1de59668e4 fix(whitelabel): move redirects (build-time) for whitelabeling to middlware (runtime) (#1236) 2025-09-03 16:36:47 -07:00
Waleed
26243b99e8 fix(code-subblock): added validation to not parse non-variables as variables in the code subblock (#1240)
* fix(code-subblock): added validation to not parse non-variables as variables in the code subblock

* fix wand prompt bar styling

* fix error message for available connected blocks to only show connected available blocks, not block ID's

* ui
2025-09-03 16:09:02 -07:00
Siddharth Ganesan
fce1423d05 v0.3.46: fix copilot stats updates
v0.3.46: fix copilot stats updates
2025-09-03 13:26:00 -07:00
Siddharth Ganesan
3656d3d7ad Updates (#1237) 2025-09-03 13:19:34 -07:00
Waleed
581929bc01 v0.3.45: fixes for organization invites, custom tool execution 2025-09-03 08:31:56 -07:00
Waleed
11d8188415 fix(rce): always use VM over RCE for custom tools (#1233) 2025-09-03 08:16:50 -07:00
Waleed
36c98d18e9 fix(team): fix organization invitation URL for teams (#1232) 2025-09-03 08:05:38 -07:00
Waleed
0cf87e650d v0.3.44: removing unused routes, whitelabeling terms & policy URLs, e2b remote code execution, copilot improvements 2025-09-02 21:29:55 -07:00
Waleed
baef8d77f9 fix(styling): fix styling inconsistencies in dark mode, fix invites fetching to show active members (#1229)
* fix(styling): fix unreadble text in dark mode

* fix styling inconsistencies in kb

* refetch permissions on invite modal open

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-02 21:17:15 -07:00
Vikhyath Mondreti
b74ab46820 fix(e2b-env-var): use isTruthy and getEnv (#1228) 2025-09-02 20:03:43 -07:00
Waleed
533b4c53e0 feat(tools): add MongoDB (#1225)
* added mongo, haven't tested

* fixed bugs, refined prompts, added billing for wand if billing enabled

* add docs

* ack PR comments
2025-09-02 18:55:45 -07:00
Siddharth Ganesan
c2d668c3eb feat(copilot): stats tracking (#1227)
* Add copilot stats table schema

* Move db to agent

* Lint

* Fix tests
2025-09-02 18:17:50 -07:00
Vikhyath Mondreti
1a5d5ddffa feat(e2b-execution): add remote code execution to support Python + Imports (#1226)
* feat(e2b-execution): add remote code execution via e2b

* ux improvements

* fix streaming

* progress

* fix tooltip text

* make supported languages an enum

* fix error handling

* fix tests
2025-09-02 18:15:29 -07:00
Waleed
9de0d91f9a feat(llms): added additional params to llm-based blocks for alternative models (#1223)
* feat(llms): added additional params to llm-based blocks for alternative models

* add hidden temp param to other LLM-based blocks
2025-09-02 13:29:03 -07:00
Waleed
3db73ff721 fix(whitelabel): make terms and privacy URL envvars available at build time (#1222) 2025-09-02 12:54:30 -07:00
Vikhyath Mondreti
9ffb48ee02 make 79th migration idempotent 2025-09-02 10:48:22 -07:00
Vikhyath Mondreti
1f2a317ac2 fix if not exists check 2025-09-02 10:39:53 -07:00
Vikhyath Mondreti
a618d289d8 add if not exists check 2025-09-02 10:38:33 -07:00
Vikhyath Mondreti
461d7b2342 Merge branch 'staging' of github.com:simstudioai/sim into staging 2025-09-02 10:27:08 -07:00
Vikhyath Mondreti
4273161c0f fix 80th migration 2025-09-02 10:26:57 -07:00
Waleed
54d42b33eb fix(wand): remove duplicate transfer encoding header meant to be set by nginx proxy (#1221) 2025-09-02 09:15:25 -07:00
Waleed
2c2c32c64b improvement(hygiene): refactored routes to be more restful, reduced code surface area and removed redundant code (#1217)
* improvement(invitations): consolidate invite-error and invite pages, made API endpoints more restful and reduced code surface area for invitations by 50%

* refactored logs API routes

* refactor rate limit api route, consolidate usage check api endpoint

* refactored chat page and invitations page

* consolidate ollama and openrouter stores to just providers store

* removed unused route

* removed legacy envvar methods

* remove dead, legacy routes for invitations PUT and workflow SYNC

* improvement(copilot): improve context inputs and fix some bugs (#1216)

* Add logs v1

* Update

* Updates

* Updates

* Fixes

* Fix current workflow in context

* Fix mentions

* Error handling

* Fix chat loading

* Hide current workflow from context

* Run workflow fix

* Lint

* updated invitation log

* styling for invitation pages

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-09-01 21:22:23 -07:00
Waleed
65e861822c fix(ui): dark mode styling for switch, trigger modal UI, signup/login improvements with auto-submit for OTP (#1214)
* fix(ui): fix dark mode styling for switch, fix trigger modal UI

* auto-submit OTP when characters are entered

* trim leading and trailing whitespace from name on signup, throw more informative error messages on reset pass
2025-09-01 21:19:12 -07:00
Siddharth Ganesan
12135d2aa8 improvement(copilot): improve context inputs and fix some bugs (#1216)
* Add logs v1

* Update

* Updates

* Updates

* Fixes

* Fix current workflow in context

* Fix mentions

* Error handling

* Fix chat loading

* Hide current workflow from context

* Run workflow fix

* Lint
2025-09-01 16:51:58 -07:00
Waleed
f75c807580 improvement(performance): added new indexes for improved session performance (#1215) 2025-09-01 16:00:15 -07:00
Vikhyath Mondreti
9ea7ea79e9 feat(workspace-vars): add workspace scoped environment + fix cancellation of assoc. workspace invites if org invite cancelled (#1208)
* feat(env-vars): workspace scoped environment variables

* fix cascade delete or workspace invite if org invite with attached workspace invites are created

* remove redundant refetch

* feat(env-vars): workspace scoped environment variables

* fix redirect for invitation error, remove check for validated emails on workspace invitation accept

* styling improvements

* remove random migration code

* stronger typing, added helpers, parallelized envvar encryption

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-09-01 15:56:58 -07:00
Waleed
5bbb349d8a fix(build): add missing pdf-parse dep, add docker build in staging (#1213)
* fix(build): add missing pdf-parse dep

* add docker build (no push) in staging
2025-09-01 13:04:16 -07:00
Waleed
ea09fcecb7 fix(build): consolidate pdf parsing dependencies, remove extraneous html deps (#1212)
* fix(build): consolidate pdf parsing dependencies, remove extraneous html deps

* add types
2025-09-01 10:19:24 -07:00
Waleed
9ccb7600f9 fix(organizations): remove org calls when billing is disabled (#1211) 2025-09-01 09:48:58 -07:00
Waleed
ee17cf461a v0.3.43: added additional parsers, mysql block improvements, billing fixes, permission fixes 2025-08-31 01:01:24 -07:00
Waleed
43cb124d97 fix(parsers): fix md, pptx, html kb uploads (#1209)
* fix md, pptx, html

* consolidate consts
2025-08-31 00:52:42 -07:00
Waleed
76889fde26 fix(permissions): remove permissions granted by org membership (#1206)
* fix(permissions): remove cross-functional permissions granted by org membership

* code hygiene
2025-08-30 18:14:01 -07:00
Vikhyath Mondreti
7780d9b32b fix(enterprise-billing): simplification to be fixed-cost (#1196)
* fix(enterprise-billing): simplify

* conceptual improvement

* add seats to enterprise sub meta

* correct type

* fix UI

* send emails to new enterprise users

* fix fallback

* fix merge conflict issue

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-30 17:26:17 -07:00
Waleed
4a703a02cb improvement(tools): update mysql to respect ssl pref (#1205) 2025-08-30 13:48:39 -07:00
Waleed
a969d09782 feat(parsers): added pptx, md, & html parsers (#1202)
* feat(parsers): added pptx, md, & html parsers

* ack PR comments

* file renaming, reorganization
2025-08-30 02:11:01 -07:00
Waleed
0bc778130f v0.3.42: kb config defaults, downgrade nextjs 2025-08-29 21:51:00 -07:00
Waleed
df3d532495 fix(deps): downgrade nextjs (#1200) 2025-08-29 21:44:51 -07:00
Waleed
f4f8fc051e improvement(kb): add fallbacks for kb configs (#1199) 2025-08-29 21:09:09 -07:00
Waleed
76fac13f3d v0.3.41: wand with azure openai, generic mysql and postgres blocks 2025-08-29 19:19:29 -07:00
Waleed
a3838302e0 feat(kb): add adjustable concurrency and batching to uploads and embeddings (#1198) 2025-08-29 18:37:23 -07:00
Waleed
4310dd6c15 imporvement(pg): added wand config for writing sql queries for generic db blocks & supabase postgrest syntax (#1197)
* add parallel ai, postgres, mysql, slight modifications to dark mode styling

* bun install frozen lockfile

* new deps

* improve security, add wand to short input and update wand config
2025-08-29 18:32:07 -07:00
Waleed
813a0fb741 feat(tools): add parallel ai, postgres, mysql, slight modifications to dark mode styling (#1192)
* add parallel ai, postgres, mysql, slight modifications to dark mode styling

* bun install frozen lockfile

* new deps
2025-08-29 17:25:02 -07:00
Waleed
7e23e942d7 fix(billing-ui): open settings when enterprise sub folks press usage indicator (#1194) 2025-08-29 16:11:32 -07:00
Siddharth Ganesan
7fcbafab97 Use direct fetch (#1193) 2025-08-29 16:10:36 -07:00
Siddharth Ganesan
056dc2879c Fix/wand (#1191)
* Switch to node

* Refactor
2025-08-29 15:50:26 -07:00
Siddharth Ganesan
1aec32b7e2 Switch to node (#1190) 2025-08-29 15:18:07 -07:00
Vikhyath Mondreti
316c9704af Merge pull request #1189 from simstudioai/staging
fix(deps): revert dependencies to before pg block was added
2025-08-29 14:28:31 -07:00
Vikhyath Mondreti
4e3a3bd1b1 run bun install 2025-08-29 14:23:31 -07:00
Vikhyath Mondreti
36773e8cdb Revert "feat(integrations): added parallel AI, mySQL, and postgres block/tools (#1126)"
This reverts commit 766279bb8b.
2025-08-29 14:14:45 -07:00
Vikhyath Mondreti
7ac89e35a1 revert(dep-changes): revert drizzle-orm version and change CI yaml script 2025-08-29 13:51:36 -07:00
Vikhyath Mondreti
faa094195a change bun install to be based on frozen-lockfile flag"
"
2025-08-29 13:42:20 -07:00
Vikhyath Mondreti
69319d21cd revert drizzle-orm version 2025-08-29 13:36:57 -07:00
Vikhyath Mondreti
8362fd7a83 remove bun lock 2025-08-29 13:34:46 -07:00
Vikhyath Mondreti
39ad793a9a revert package.json 2025-08-29 13:34:19 -07:00
Waleed
921c755711 v0.3.40: drizzle fixes, custom postgres port support 2025-08-29 10:24:40 -07:00
Waleed
41ec75fcad fix(pg): fix POSTGRES_PORT envvar to map external port to 5432 internally (#1187) 2025-08-29 10:11:37 -07:00
Waleed
f2502f5e48 fix(database): revert changes related to db URL (#1185)
* fix(database): revert changes related to db URL

* cleanup
2025-08-29 09:33:40 -07:00
Vikhyath Mondreti
f3c4f7e20a fix 2025-08-29 00:35:15 -07:00
Vikhyath Mondreti
f578f43c9a graceful exit for drizzle migration 2025-08-29 00:25:47 -07:00
Vikhyath Mondreti
5c73038023 fix(db): attempt parsing cert and db url separately (#1183) 2025-08-29 00:17:05 -07:00
Waleed
92132024ca fix(db): accept self-signed certs (#1181) 2025-08-28 23:19:43 -07:00
Waleed
ed11456de3 fix(db): accept self-signed certs (#1181) 2025-08-28 23:19:02 -07:00
Waleed
8739a3d378 fix(ssl): add envvar for optional ssl cert (#1179) 2025-08-28 23:11:21 -07:00
Waleed
ca015deea9 fix(ssl): add envvar for optional ssl cert (#1179) 2025-08-28 23:00:43 -07:00
Waleed
fd6d927228 v0.3.40: copilot improvements, knowledgebase improvements, security improvements, billing fixes 2025-08-28 22:00:58 -07:00
Adam Gough
6ac59a3264 Revert "fix(cursor-and-input): fixes cursor and input canvas error (#1168)" (#1178)
This reverts commit aa84c75360.
2025-08-28 21:06:30 -07:00
Adam Gough
aa84c75360 fix(cursor-and-input): fixes cursor and input canvas error (#1168)
* fixed long input

* lint

* fix gray canvas

* fixed auto-pan

* remove duplicate useEffect

* fix auto-pan for wide mode

* removed any

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-28 20:17:10 -07:00
Vikhyath Mondreti
ebb8cf8bf9 fix(slack): set depends on for slack channel channel subblock (#1177)
* fix(slack): set depends on for slack channel

* use foreign credential check

* fix

* fix clearing of block
2025-08-28 20:11:30 -07:00
Siddharth Ganesan
cadfcdbfbd Fix (#1176) 2025-08-28 19:21:29 -07:00
Vikhyath Mondreti
7d62c200fa feat(openrouter): add open router to model block (#1172)
* feat(openrouter): add open router to model block

* improvement(openrouter): streaming fix, temperature fix

* pr comments

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-28 18:47:36 -07:00
Siddharth Ganesan
df646256b3 Revert "feat(debug): create debugger (#1174)" (#1175)
This reverts commit 7c73f5ffe0.
2025-08-28 18:46:40 -07:00
Siddharth Ganesan
7c73f5ffe0 feat(debug): create debugger (#1174)
* Updates

* Updates

* Updates

* Checkpoint

* Checkpoint

* Checkpoitn

* Var improvements

* Fixes

* Execution status

* UI improvements

* Ui updates

* Fix

* Fix scoping

* Fix workflow vars

* Fix env vars

* Remove number styling

* Variable highlighting

* Updates

* Update

* Fix resume

* Stuff

* Breakpoint ui

* Ui

* Ui updates

* Loops and parallels

* HIde env vars

* Checkpoint

* Stuff

* Panel toggle

* Lint
2025-08-28 18:19:20 -07:00
Waleed
bb5f40a027 feat(pg): added ability to customize postgres port when running containerized app (#1173) 2025-08-28 17:16:24 -07:00
Waleed
5ae5429296 chore(deps): upgrade trigger.dev in gh action (#1171) 2025-08-28 17:08:59 -07:00
Waleed
fcf128f6db improvement(knowledge): remove innerJoin and add id identifiers to results, updated docs (#1170)
* improvement(knowledge): remove innerJoin and add id identifiers to results, updated docs

* cleanup

* add documentName to upload chunk op as well
2025-08-28 17:04:31 -07:00
Vikhyath Mondreti
56543dafb4 fix(billing): usage tracking cleanup, shared pool of limits for team/enterprise (#1131)
* fix(billing): team usage tracking cleanup, shared pool of limits for team

* address greptile commments

* fix lint

* remove usage of deprecated cols"

* update periodStart and periodEnd correctly

* fix lint

* fix type issue

* fix(billing): cleaned up billing, still more work to do on UI and population of data and consolidation

* fix upgrade

* cleanup

* progress

* works

* Remove 78th migration to prepare for merge with staging

* fix migration conflict

* remove useless test file

* fix

* Fix undefined seat pricing display and handle cancelled subscription seat updates

* cleanup code

* cleanup to use helpers for pulling pricing limits

* cleanup more things

* cleanup

* restore environment ts file

* remove unused files

* fix(team-management): fix team management UI, consolidate components

* use session data instead of subscription data in settings navigation

* remove unused code

* fix UI for enterprise plans

* added enterprise plan support

* progress

* billing state machine

* split overage and base into separate invoices

* fix badge logic

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-28 17:00:48 -07:00
Emir Karabeg
7cc4574913 improvement(knowledge): search returns document name (#1167) 2025-08-28 16:07:22 -07:00
Waleed
3f900947ce improvement(kb): use trigger.dev for kb tasks (#1166) 2025-08-28 12:14:31 -07:00
Waleed
bda8ee772a fix(security): strengthen email invite validation logic, fix invite page UI (#1162)
* fix(security): strengthen email ivnite validation logic, fix invite page UI

* ui
2025-08-28 00:03:03 -07:00
Siddharth Ganesan
104d34cc9e fix(copilot): context filtering (#1160)
* Add filter

* Scope kb and chats

* Lint

* Remove comments

* Lint
2025-08-27 22:57:28 -07:00
Siddharth Ganesan
06e9a6b302 feat(copilot): context (#1157)
* Copilot updates

* Set/get vars

* Credentials opener v1

* Progress

* Checkpoint?

* Context v1

* Workflow references

* Add knowledge base context

* Blocks

* Templates

* Much better pills

* workflow updates

* Major ui

* Workflow box colors

* Much i mproved ui

* Improvements

* Much better

* Add @ icon

* Welcome page

* Update tool names

* Matches

* UPdate ordering

* Good sort

* Good @ handling

* Update placeholder

* Updates

* Lint

* Almost there

* Wrapped up?

* Lint

* Builid error fix

* Build fix?

* Lint

* Fix load vars
2025-08-27 21:07:51 -07:00
Waleed
fed4e507cc fix(signup): refetch session data on signup (#1155) 2025-08-27 20:01:04 -07:00
Waleed
389456e0f3 fix(envvars): fix split for pasting envvars with query params (#1156) 2025-08-27 19:55:54 -07:00
Vikhyath Mondreti
c720f23d9b fix(sockets): useCollabWorkflow cleanup, variables store logic simplification (#1154)
* fix(sockets): useCollabWorkflow cleanup, variables store logic simplification

* remove unecessary check
2025-08-27 17:11:39 -07:00
Vikhyath Mondreti
89f7d2b943 improvement(sockets): cleanup debounce logic + add flush mechanism to… (#1152)
* improvement(sockets): cleanup debounce logic + add flush mechanism to not lose ops

* fix optimistic update overwritten race condition

* fix

* fix forever stuck in processing
2025-08-27 11:35:20 -07:00
Emir Karabeg
923c05239c fix(auto-layout): revert (#1148) 2025-08-26 23:24:09 -07:00
Waleed
3424a338b7 fix(security): fixed SSRF vulnerability (#1149) 2025-08-26 23:11:08 -07:00
Waleed
51b1e97fa2 fix(kb-uploads): created knowledge, chunks, tags services and use redis for queueing docs in kb (#1143)
* improvement(kb): created knowledge, chunks, tags services and use redis for queueing docs in kb

* moved directories around

* cleanup

* bulk create docuemnt records after upload is completed

* fix(copilot): send api key to sim agent (#1142)

* Fix api key auth

* Lint

* ack PR comments

* added sort by functionality for headers in kb table

* updated

* test fallback from redis, fix styling

* cleanup copilot, fixed tooltips

* feat: local auto layout (#1144)

* feat: added llms.txt and robots.txt (#1145)

* fix(condition-block): edges not following blocks, duplicate issues (#1146)

* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

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>

* fix dependency array

* fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation

* improvement(forwarding+excel): added forwarding and improve excel read (#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>

* revert agent const

* update docs

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-26 22:55:18 -07:00
Adam Gough
ab74b13802 improvement(forwarding+excel): added forwarding and improve excel read (#1136)
* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-26 21:18:09 -07:00
Vikhyath Mondreti
861ab1446a Merge branch 'staging' of github.com:simstudioai/sim into staging 2025-08-26 20:09:13 -07:00
Vikhyath Mondreti
e6f519a5a6 fix dependency array 2025-08-26 20:08:37 -07:00
Waleed
8226e7b40a fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (#1147)
* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation
2025-08-26 20:06:43 -07:00
Vikhyath Mondreti
b177b291cf fix(condition-block): edges not following blocks, duplicate issues (#1146)
* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

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-08-26 19:51:55 -07:00
Emir Karabeg
9c3b43325b feat: added llms.txt and robots.txt (#1145) 2025-08-26 19:04:27 -07:00
Emir Karabeg
973a5c6497 feat: local auto layout (#1144) 2025-08-26 19:03:09 -07:00
Siddharth Ganesan
78437c688e fix(copilot): send api key to sim agent (#1142)
* Fix api key auth

* Lint
2025-08-26 16:01:42 -07:00
Vikhyath Mondreti
3b74250335 fix(subblock-race-condition): check loading state correctly (#1141)
* fix(subblock-race-condition): check loading state correctly"
;

* clean up

* remove useless comments

* fix date fallback
2025-08-26 12:14:58 -07:00
Waleed
c68800c772 feat(login): add terms and privacy to signup and login pages (#1139) 2025-08-26 11:19:17 -07:00
Siddharth Ganesan
5403665fa9 Docs update (#1140) 2025-08-26 11:16:07 -07:00
Siddharth Ganesan
3d3443f68e fix(copilot): enterprise api keys (#1138)
* Copilot enterprise

* Fix validation and enterprise azure keys

* Lint

* update tests

* Update

* Lint

* Remove hardcoded ishosted

* Lint

* Updatse

* Add tests
2025-08-26 10:55:08 -07:00
Emir Karabeg
e5c0b14367 improvement(help-modal): ui/ux (#1135) 2025-08-25 19:36:38 -07:00
Siddharth Ganesan
a495516901 feat(copilot): enable azure openai and move key validation (#1134)
* Copilot enterprise

* Fix validation and enterprise azure keys

* Lint

* update tests

* Update

* Lint

* Remove hardcoded ishosted

* Lint
2025-08-25 18:03:08 -07:00
Waleed
1f9b4a8ef0 fix(wand): remove unstable__noStore and remove, add additional logs for wand generation (#1133)
* feat(wand): added additional logs for wand generation

* remove unstable__noStore
2025-08-25 16:20:41 -07:00
Waleed
3372829c30 fix(wand): remove edge runtime for wand (#1132) 2025-08-25 14:21:27 -07:00
Waleed
45372aece5 fix(files): fix vulnerabilities in file uploads/deletes (#1130)
* fix(vulnerability): fix arbitrary file deletion vuln

* fix(uploads): fix vuln during upload

* cleanup
2025-08-25 11:26:42 -07:00
Waleed Latif
ed9b9ad83f v0.3.39: billing fixes, custom tools fixes, copilot client-side migration, new tools 2025-08-24 00:18:25 -07:00
Waleed Latif
766279bb8b feat(integrations): added parallel AI, mySQL, and postgres block/tools (#1126)
* feat(integrations): added parallel ai block/tool and corresponding docs

* add postgres block

* added mysql block

* enrich docs for Postgres and MySQL

* make password fields user only for mysql and postgres

* fixed build

* ack greptile comments

* fix PR comments

* remove search_id from parallel ai

* fix parallel ai params
2025-08-23 21:43:55 -07:00
Adam Gough
1038e148c3 fix autoconnect (#1127) 2025-08-23 20:46:03 -07:00
Adam Gough
8b78200991 fix(onedrive): fixed advanced mode (#1122)
* fixed onedrive advanced mode

* removed logger

* removed loger

* added a slack instruction

* remove folderId

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-23 19:49:13 -07:00
Siddharth Ganesan
c8f4791582 Feat/copilot client clean (#1118)
* SSE tool call v1 - not tested yet

* Handle tool call generation sse

* Add mark complete api

* copilot new progress

* Migrate get user workflow

* Run workflow migrated

* Migrate run workflow and remove some dead code

* Migrate gdrive request access

* Add server side execution logic

* Get block metadata migrated

* Build workflow progress

* Somewhat working condition, build still broken

* Stuff

* Get workflow console

* search online tool

* Set/get env vars

* oauth, gdrive list, gdrive read

* Search docs

* Build workflow update

* Edit workflow

* Migrate plan tool

* Checkoff

* Refactor

* Improvement

* checkpoint

* New store basics

* Generating adds to map

* Update

* Display v1

* Update

* Stuff

* Stuff

* Stuff

* Edit works

* Interrupt tool fixes

* Interrupt tool fixes

* Good progress

* new copilot to copilot

* Fix chat laoding

* Skip rendering of non registered tools

* Small fix

* Updates

* Updates

* Updates

* Update

* Some fixes

* Revert fixes

* run workflow

* Move to background button shows up

* User input scroll bar

* Lint

* Build errors

* Diff controls

* Restore ui

* Ui fixes

* Max mode ui

* Thinking text collapse

* Tool ui updates

* Mode selector UI

* Lint

* Ui

* Update icon

* Dummy test

* Lint
2025-08-23 18:11:10 -07:00
Vikhyath Mondreti
6c9e0ec88b improvement(logging): capture pre-execution validation errors in logging session (#1124)
* improvement(pre-exec-errors): capture pre-execution validation errors in logging session

* fix param shape for schedules

* fix naming
2025-08-23 18:08:57 -07:00
Adam Gough
bbbf1c2941 fix(teams-wh): fixed teams wh payload (#1119)
* first push

* fixed variable res

* lint

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-23 17:59:00 -07:00
Vikhyath Mondreti
efc487a845 improvement(chat-file-upload): add visual indication of file upload exceeding limit (#1123)
* improvement(chat-file-upload): add visual indication of file upload exceeding limit

* fix duplicate error + lint

* fix lint

* fix lint
2025-08-23 17:08:41 -07:00
Vikhyath Mondreti
5786909c5e fix(tag-dropdown): arrow navigation for submenu affecting text input cursor (#1121) 2025-08-23 16:19:45 -07:00
Vikhyath Mondreti
833c5fefd5 fix(logs): fix to remove retrieval of execution of data for basic version of call (#1120) 2025-08-23 15:51:08 -07:00
Adam Gough
79dd1ccb9f fix(ux): minor ux changes (#1109)
* minor UX fixes

* changed variable collapse

* lint

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-23 15:50:40 -07:00
Waleed Latif
730164abee fix(custom-tool): fix textarea, param dropdown for available params, validation for invalid schemas, variable resolution in custom tools and subflow tags (#1117)
* fix(custom-tools): fix text area for custom tools

* added param dropdown in agent custom tool

* add syntax highlighting for params, fix dropdown styling

* ux

* add tooltip to prevent indicate invalid json schema on schema and code tabs

* feat(custom-tool): added stricter JSON schema validation and error when saving json schema for custom tools

* fix(custom-tool): allow variable resolution in custom tools

* fix variable resolution in subflow tags

* refactored function execution to use helpers

* cleanup

* fix block variable resolution to inject at runtime

* fix highlighting code

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-08-23 13:15:12 -07:00
Vikhyath Mondreti
25b2c45ec0 fix(billing): change reset user stats func to invoice payment succeeded (#1116)
* fix(billing): change reset user stats func to invoice payment succeeded

* remove nonexistent billing reason
2025-08-23 10:50:23 -07:00
Vikhyath Mondreti
780870c48e fix(billing): make subscription table source of truth for period start and period end (#1114)
* fix(billing): vercel cron not processing billing periods

* fix(billing): cleanup unused POST and fix bug with billing timing check

* make subscriptions table source of truth for dates

* update org routes

* make everything dependent on stripe webhook

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-23 10:25:41 -07:00
Vikhyath Mondreti
fdfa935a09 v0.3.38: billing cron job fix 2025-08-22 17:03:36 -07:00
Vikhyath Mondreti
917552f041 fix(billing): vercel cron not processing billing periods (#1112) 2025-08-22 16:52:31 -07:00
Waleed Latif
4846f6c60d v0.3.37: azure OCR api key, wand SSE, CRON helm 2025-08-22 14:54:36 -07:00
Vikhyath Mondreti
be810013c7 feat(native-bg-tasks): support webhooks and async workflow executions without trigger.dev (#1106)
* feat(native-bg-tasks): support webhooks and async workflow executions without trigger"

* fix tests

* fix env var defaults and revert async workflow execution to always use trigger

* fix UI for hiding async

* hide entire toggle
2025-08-22 14:43:21 -07:00
Waleed Latif
1ee4263e60 feat(helm): added CRON jobs to helm charts (#1107) 2025-08-22 14:29:44 -07:00
Waleed Latif
60c4668682 fix(naming): prevent identical normalized block names (#1105) 2025-08-22 13:20:45 -07:00
Emir Karabeg
a268fb7c04 fix(chat-deploy): dark mode ui (#1101) 2025-08-22 12:23:11 -07:00
Waleed Latif
6c606750f5 improvement(signup): modify signup and login pages to not show social sign in when not configured, increase logo size (#1103) 2025-08-22 12:15:59 -07:00
Waleed Latif
e13adab14f improvement(wand): upgrade wand to use SSE (#1100)
* improvement(wand): upgrade wand to use SSE

* fix(ocr-azure): added OCR_AZURE_API_KEY envvar (#1102)

* make wand identical to chat panel
2025-08-22 12:01:16 -07:00
Waleed Latif
44bc12b474 fix(ocr-azure): added OCR_AZURE_API_KEY envvar (#1102) 2025-08-22 11:49:56 -07:00
Waleed Latif
991f0442e9 v0.3.36: workflow block logs, whitelabeling configurability, session provider 2025-08-21 21:44:28 -07:00
Waleed Latif
2ebfb576ae fix(day-picker): remove unused react-day-picker (#1094) 2025-08-21 21:29:20 -07:00
Vikhyath Mondreti
11a7be54f2 fix circular dependsOn for Jira manualIssueKey 2025-08-21 21:21:19 -07:00
Vikhyath Mondreti
f5219d03c3 fix(ms-oauth): oauth edge cases (#1093) 2025-08-21 21:19:11 -07:00
Waleed Latif
f0643e01b4 fix(logs): make child workflow span errors the same as root level workflow errors (#1092) 2025-08-21 21:17:09 -07:00
Adam Gough
77b0c5b9ed Fix(excel-range): fixed excel range (#1088)
* added auto range

* lint

* removed any

* utils file

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-21 20:04:20 -07:00
Adam Gough
9dbd44e555 fix(webhook-payloads): fixed the variable resolution in webhooks (#1019)
* telegram webhook fix

* changed payloads

* test

* test

* test

* test

* fix github dropdown

* test

* reverted github changes

* fixed github var

* test

* bun run lint

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test push

* test

* bun run lint

* edited airtable payload and webhook deletion

* Revert bun.lock and package.json to upstream/staging

* cleaned up

* test

* test

* resolving more cmments

* resolved comments, updated trigger

* cleaned up, resolved comments

* test

* test

* lint

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-21 20:03:04 -07:00
Waleed Latif
9ea9f2d52e improvement(log-level): make log level configurable via envvar (#1091) 2025-08-21 19:40:47 -07:00
Waleed Latif
4cd707fadb improvement(emails): fixed email subjects to use provided brand name (#1090)
* improvement(emails): fixed email subjects to use provided brand name

* update manifest to use dynamic background & theme color
2025-08-21 19:34:05 -07:00
Waleed Latif
f0b07428bc feat(theme): added custom envvars for themes (#1089)
* feat(theme): added custom envvars for themes

* add regec
2025-08-21 19:27:56 -07:00
Vikhyath Mondreti
8c9e182e10 fix(infinite-get-session): pass session once per tree using session provider + multiple fixes (#1085)
* fix(infinite-get-session): pass session using session provider

* prevent auto refetch

* fix typing:

* fix types

* fix

* fix oauth token for microsoft file selector

* fix start block required error
2025-08-21 18:45:15 -07:00
Waleed Latif
33dd59f7a7 fix(db-consts): make the migrations image fully standalone by adding db consts (#1087) 2025-08-21 17:25:35 -07:00
Waleed Latif
53ee9f99db fix(templates): added option to delete/keep templates when deleting workspace, updated template modal, sidebar code cleanup (#1086)
* feat(templates): added in the ability to keep/remove templates when deleting workspace

* code cleanup in sidebar

* add the ability to edit existing templates

* updated template modal

* fix build

* revert bun.lock

* add template logic to workflow deletion as well

* add ability to delete templates

* add owner/admin enforcemnet to modify or delete templates
2025-08-21 17:11:22 -07:00
Vikhyath Mondreti
0f2a125eae improvement(block-error-logs): workflow in workflow (#1084)
* improvement(add-block-logs): workflow in workflow

* fix lint
2025-08-21 15:01:30 -07:00
Waleed Latif
e107363ea7 v0.3.35: migrations, custom email address support 2025-08-21 12:36:51 -07:00
Waleed Latif
7e364a7977 fix(emails): remove unused useCustomFromFormat param (#1082)
* fix(mailer): remove unused useCustomFormat

* bun.lock changes
2025-08-21 12:09:03 -07:00
Waleed Latif
35a37d8b45 fix(acs): added FROM_EMAIL_ADDRESS envvar for ACS (#1081)
* fix: clear Docker build cache to use correct Next.js version

* fix(mailer): add FROM_EMAIL_ADDRESS envvar for ACS

* bun.lock

* added tests
2025-08-21 11:57:44 -07:00
Vikhyath Mondreti
2b52d88cee fix(migrations): add missing migration for document table (#1080)
* fix(migrations): add missing migration for document table

* add newline at end of file
2025-08-21 11:48:54 -07:00
Waleed Latif
abad3620a3 fix(build): clear docker build cache to use correct Next.js version 2025-08-21 01:43:45 -07:00
Waleed Latif
a37c6bc812 fix(build): clear docker build cache to use correct Next.js version (#1075)
* fix: clear Docker build cache to use correct Next.js version

- Changed GitHub Actions cache scope from build-v2 to build-v3
- This should force a fresh build without cached Next.js 15.5.0 layers
- Reverted to ^15.3.2 version format that worked on main branch

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* run install

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-21 01:38:47 -07:00
Waleed Latif
cd1bd95952 fix(nextjs): downgrade nextjs due to known issue with bun commonjs module bundling (#1073) 2025-08-21 01:24:06 -07:00
Waleed Latif
4c9fdbe7fb fix(nextjs): downgrade nextjs due to known issue with bun commonjs module bundling (#1073) 2025-08-21 01:23:10 -07:00
Waleed Latif
2c47cf4161 v0.3.34: azure-openai options, billing fixes, mistral OCR via Azure, start block input format changes 2025-08-20 21:05:48 -07:00
Waleed Latif
db1cf8a6db fix(placeholder): fix starter block placeholder (#1071) 2025-08-20 21:01:37 -07:00
Vikhyath Mondreti
c6912095f7 fix placeholder text 2025-08-20 20:38:15 -07:00
Waleed Latif
154d9eef6a fix(gpt-5): fix chat-completions api (#1070) 2025-08-20 20:36:12 -07:00
Emir Karabeg
c2ded1f3e1 fix(theme-provider): preventing flash on page load (#1067)
* fix(theme-provider): preventing flash on page load

* consolidated themes to use NextJS theme logic

* improvement: optimized latency
2025-08-20 20:20:23 -07:00
Waleed Latif
ff43528d35 fix(gpt-5): fixed verbosity and reasoning params (#1069)
* fix(gpt-5): fixed verbosity and reasoning parsm

* fixed dropdown

* default values for verbosity and reasoning effort

* cleanup

* use default value in dropdown
2025-08-20 20:18:02 -07:00
Vikhyath Mondreti
692ba69864 fix type 2025-08-20 20:00:41 -07:00
Adam Gough
cb7ce8659b fix(msverify): changed consent for microsoft (#1057)
* changed consent

* changed excel error message and default sheets

* changed variable res for excel

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-20 19:54:51 -07:00
Vikhyath Mondreti
5caef3a37d fix(input-format): first time execution bug (#1068) 2025-08-20 19:52:04 -07:00
Waleed Latif
a6888da124 fix(semantics): fix incorrect imports (#1066)
* fix(semantics): fix incorrect import

* fixed all incorrecr imports
2025-08-20 19:02:52 -07:00
Vikhyath Mondreti
07b0597f4f improvement(trigger): upgrade import path for trigger (#1065) 2025-08-20 18:41:13 -07:00
Vikhyath Mondreti
71e2994f9d improvement(trigger): upgrade trigger (#1063) 2025-08-20 18:33:01 -07:00
Vikhyath Mondreti
9973b2c165 Merge branch 'staging' of github.com:simstudioai/sim into staging 2025-08-20 18:26:08 -07:00
Vikhyath Mondreti
d9e5777538 use personal access token 2025-08-20 18:24:17 -07:00
Waleed Latif
dd74267313 feat(nextjs): upgrade nextjs to 15.5 (#1062) 2025-08-20 18:22:35 -07:00
Vikhyath Mondreti
1db72dc823 pin version 2025-08-20 18:13:15 -07:00
Vikhyath Mondreti
da707fa491 improvement(gh-action): add gh action to deploy to correct environment for trigger.dev (#1060)
* improvement(gh-action): add gh action to deploy to correct environment for trigger.dev

* add dep installation

* change away from pull request target
2025-08-20 18:10:43 -07:00
Vikhyath Mondreti
9ffaf305bd feat(input-format): add value field to test input formats (#1059)
* feat(input-format): add value field to test input formats

* fix lint

* fix typing issue

* change to dropdown for boolean
2025-08-20 18:03:47 -07:00
Waleed Latif
26e6286fda fix(billing): fix team plan upgrade (#1053) 2025-08-20 17:05:35 -07:00
Waleed Latif
c795fc83aa feat(azure-openai): allow usage of azure-openai for knowledgebase uploads and wand generation (#1056)
* feat(azure-openai): allow usage of azure-openai for knowledgebase uploads

* feat(azure-openai): added azure-openai for kb and wand

* added embeddings utils, added the ability to use mistral through Azure

* fix(oauth): gdrive picker race condition, token route cleanup

* fix test

* feat(mailer): consolidated all emailing to mailer service, added support for Azure ACS (#1054)

* feat(mailer): consolidated all emailing to mailer service, added support for Azure ACS

* fix batch invitation email template

* cleanup

* improvement(emails): add help template instead of doing it inline

* remove fallback version

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-08-20 17:04:52 -07:00
Waleed Latif
cea42f5135 improvement(gpt-5): added reasoning level and verbosity to gpt-5 models (#1058) 2025-08-20 17:04:39 -07:00
Waleed Latif
6fd6f921dc feat(mailer): consolidated all emailing to mailer service, added support for Azure ACS (#1054)
* feat(mailer): consolidated all emailing to mailer service, added support for Azure ACS

* fix batch invitation email template

* cleanup

* improvement(emails): add help template instead of doing it inline
2025-08-20 16:02:49 -07:00
Vikhyath Mondreti
7530fb9a4e Merge pull request #1055 from simstudioai/fix/picker-race-cond
fix(oauth): gdrive picker race condition, token route cleanup
2025-08-20 15:03:57 -07:00
Vikhyath Mondreti
9a5b035822 fix test 2025-08-20 13:55:54 -07:00
Vikhyath Mondreti
0c0b6bf967 fix(oauth): gdrive picker race condition, token route cleanup 2025-08-20 12:33:46 -07:00
Vikhyath Mondreti
5d74db53ff v0.3.33: update copilot docs 2025-08-20 09:56:09 -07:00
Siddharth Ganesan
b39bdfd55e feat(copilot-docs): update readme and docs with local hosting instructions (#1043)
* Docs

* Lint
2025-08-20 09:47:50 -07:00
Waleed Latif
6b185be9a4 v0.3.32: loop block max increase, url-encoded API calls, subflow logs, new supabase tools 2025-08-20 00:36:46 -07:00
Waleed Latif
214a0358b6 fix(billing): fix upgrade to team plan (#1045) 2025-08-20 00:28:07 -07:00
Waleed Latif
bbb5e53e43 improvement(supabase): add supabase upsert tool, insert/replace on PK conflict (#1038) 2025-08-19 21:21:09 -07:00
Waleed Latif
79e932fed9 feat(logs): added sub-workflow logs, updated trace spans UI, fix scroll behavior in workflow registry sidebar (#1037)
* added sub-workflow logs

* indent input/output in trace spans display

* better color scheme for workflow logs

* scroll behavior in sidebar updated

* cleanup

* fixed failing tests
2025-08-19 21:21:09 -07:00
Vikhyath Mondreti
9ad36c0e34 fix(oauth-block): race condition for rendering credential selectors and other subblocks + gdrive fixes (#1029)
* fix(oauth-block): race condition for rendering credential selectors and other subblocks

* fix import

* add dependsOn field to track cros-subblock deps

* remove redundant check

* remove redundant checks

* remove misleading comment

* fix

* fix jira

* fix

* fix

* confluence

* fix triggers

* fix

* fix

* make trigger creds collab supported

* fix for backwards compat

* fix trigger modal
2025-08-19 21:21:09 -07:00
Waleed Latif
2771c688ff improvement(supabase): added more verbose error logging for supabase operations (#1035)
* improvement(supabase): added more verbose error logging for supabase operations

* updated docs
2025-08-19 21:21:09 -07:00
Waleed Latif
d58ceb4bce improvement(api): add native support for form-urlencoded inputs into API block (#1033) 2025-08-19 21:21:09 -07:00
Waleed Latif
69773c3174 improvement(console): increase console max entries for larger workflows (#1032)
* improvement(console): increase console max entries for larger workflows

* increase safety limit for infinite loops
2025-08-19 21:21:09 -07:00
Waleed Latif
1619d63f2a v0.3.31: webhook fixes, advanced mode parameter filtering, credentials fixes, UI/UX improvements 2025-08-19 01:01:45 -07:00
Waleed Latif
9aa1fe8037 fix(logger): fixed logger to show prod server-side logs (#1027) 2025-08-19 00:44:24 -07:00
Emir Karabeg
1b7c111c46 Update README.md (#1026)
* Update README.md

* Update README.md
2025-08-18 23:10:18 -07:00
Siddharth Ganesan
bdfb56b262 fix(copilot): streaming (#1023)
* Fix 1

* Fix

* Bugfix

* Make thinking streaming smoother

* Better autoscroll, still not great

* Updates

* Updates

* Updates

* Restore checkpoitn logic

* Fix aborts

* Checkpoitn ui

* Lint

* Fix empty file
2025-08-18 22:48:56 -07:00
Emir Karabeg
4a7de31eee uploaded brandbook (#1024) 2025-08-18 22:04:55 -07:00
Waleed Latif
adfe56c720 improvement(logger): restore server-side logs in prod (#1022) 2025-08-18 21:01:38 -07:00
Emir Karabeg
72e3efa875 improvement(settings): ui/ux (#1021)
* completed general

* completed environment

* completed account; updated general and environment

* fixed skeleton

* finished credentials

* finished privacy; adjusted all colors and styling

* added reset password

* refactor: team and subscription

* finalized subscription settings

* fixed copilot key UI
2025-08-18 20:57:29 -07:00
Vikhyath Mondreti
b40fa3aa6e fix(picker-ui): picker UI confusing when credential not set + Microsoft OAuth Fixes (#1016)
* fix(picker-ui): picker UI confusing when credential not set

* remove comments

* remove chevron down

* fix collaboration oauth

* fix jira"

* fix

* fix ms excel selector

* fix selectors for MS blocks

* fix ms selectors

* fix

* fix ms onedrive and sharepoint

* fix to grey out dropdowns

* fix background fetches

* fix planner

* fix confluence

* fix

* fix confluence realtime sharing

* fix outlook folder selector

* check outlook folder

* make shared hook

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-18 20:21:23 -07:00
Waleed Latif
f924edde3a improvement(console): redact api keys from console store (#1020) 2025-08-18 16:36:33 -07:00
Waleed Latif
073030bfaa improvement(serializer): filter out advanced mode fields when executing in basic mode, persist the values but don't include them in serialized block for execution (#1018)
* improvement(serializer): filter out advanced mode fields when executing in basic mode, persist the values but don't include them in serialized block for execution

* fix serializer exclusion logic
2025-08-18 16:34:53 -07:00
Siddharth Ganesan
871f4e8e18 fix(copilot): env key validation (#1017)
* Fix v1

* Use env var

* Lint

* Fix env key validation

* Remove logger

* Fix agent url

* Fix tests
2025-08-18 16:00:56 -07:00
Siddharth Ganesan
091343a132 fix(copilot): fix origin (#1015)
* Fix v1

* Use env var

* Lint
2025-08-18 13:57:31 -07:00
Waleed Latif
63c66bfc31 fix(webhook): pin webhook URL when creating/saving generic webhook trigger (#1014)
* fix(webhook): pin webhook URL when creating a new generic webhook trigger

* change instructions copy

* remove unrelated scripts

* added optional API key for webhooks, validation tests

* remove extraneous logs
2025-08-18 13:39:49 -07:00
Waleed Latif
445ca78395 fix(export): swap upload & download icons (#1013) 2025-08-18 10:22:55 -07:00
Waleed Latif
d75cc1ed84 v0.3.30: duplication, control bar fixes 2025-08-18 08:57:26 -07:00
Waleed Latif
5a8a703ecb fix(duplicate): fixed detached state on duplication (#1011) 2025-08-18 08:51:18 -07:00
Waleed Latif
6f64188b8d fix(control-bar): fix icons styling in disabled state (#1010) 2025-08-18 08:22:06 -07:00
Vikhyath Mondreti
60a9a25553 Merge pull request #1009 from simstudioai/staging
update migration file for notekeeping purpose
2025-08-18 01:59:02 -07:00
Vikhyath Mondreti
52fa388f81 update migration file for notekeeping purpose 2025-08-18 01:56:34 -07:00
Vikhyath Mondreti
5c56cbd558 Merge pull request #1008 from simstudioai/staging
reduce batch size to prevent timeouts
2025-08-18 01:11:49 -07:00
Vikhyath Mondreti
dc19525a6f reduce batch size to prevent timeouts 2025-08-18 01:10:47 -07:00
Vikhyath Mondreti
3873f44875 Merge pull request #1007 from simstudioai/staging
syntax issue in migration
2025-08-18 00:59:53 -07:00
Vikhyath Mondreti
09b95f41ea syntax issue in migration 2025-08-18 00:58:09 -07:00
Vikhyath Mondreti
af60ccd188 fix: migration mem issues bypass
fix: migration mem issues bypass
2025-08-18 00:50:20 -07:00
Vikhyath Mondreti
eb75afd115 make logs migration batched to prevent mem issues (#1005) 2025-08-18 00:42:38 -07:00
Waleed Latif
fdb8256468 fix(subflow): remove all edges when removing a block from a subflow (#1003) 2025-08-18 00:21:26 -07:00
Vikhyath Mondreti
570c07bf2a Merge pull request #1004 from simstudioai/staging
v0.3.29: copilot fixes, remove block from subflow, code cleanups
2025-08-18 00:18:44 -07:00
Adam Gough
5c16e7d390 fix(subflow): add ability to remove block from subflow and refactor to consolidate subflow code (#983)
* added logic to remove blocks from subflows

* refactored logic into just subflow-node

* bun run lint

* added subflow test

* added a safety check for data.parentId

* added state update logic

* bun run lint

* removed old logic

* removed any

* added tests

* added type safety

* removed test script

* type safety

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-17 22:25:31 -07:00
Waleed Latif
bd38062705 fix(workflow-error): allow users to delete workflows with invalid configs/state (#1000)
* fix(workflow-error): allow users to delete workflows with invalid configs/state

* cleanup
2025-08-17 22:23:41 -07:00
Siddharth Ganesan
d7fd4a9618 feat(copilot): diff improvements (#1002)
* Fix abort

* Cred updates

* Updates

* Fix sheet id showing up in diff view

* Update diff view

* Text overflow

* Optimistic accept

* Serialization catching

* Depth 0 fix

* Fix icons

* Updates

* Lint
2025-08-16 15:09:48 -07:00
Vikhyath Mondreti
d972bab206 fix(logs-sidebar): remove message and fix race condition for quickly switching b/w logs (#1001) 2025-08-16 15:05:39 -07:00
Vikhyath Mondreti
f254d70624 improvement(logs): cleanup code (#999) 2025-08-16 13:44:00 -07:00
Waleed Latif
8748e1d5f9 improvement(db): remove deprecated 'state' column from workflow table (#994)
* improvement(db): remove deprecated  column from workflow table

* removed extraneous logs

* update sockets envvar
2025-08-16 13:04:49 -07:00
Siddharth Ganesan
133a32e6d3 Fix abort (#998) 2025-08-16 11:10:09 -07:00
Waleed Latif
97b6bcc43d v0.3.28: autolayout, export, copilot, kb ui improvements 2025-08-16 09:12:17 -07:00
Waleed Latif
42917ce641 fix(agent): stringify input into user prompt for agent (#984) 2025-08-15 19:36:49 -07:00
Waleed Latif
5f6d219223 fix(kb-ui): fixed upload files modal ui, processing ui to match the rest of the kb (#991)
* fix(kb-ui): fixed upload files modal, processing ui to match the rest of the kb

* more ui fixes

* ack PR comments

* fix help modal
2025-08-15 19:35:50 -07:00
Siddharth Ganesan
bab74307f4 fix(ishosted): make ishosted true on staging (#993)
* Add staging to ishosted

* www
2025-08-15 18:36:32 -07:00
Siddharth Ganesan
16aaa37dad improvement(agent): enable autolayout, export, copilot (#992)
* Enable autolayout, export, and copilot in dev

* Updates
2025-08-15 18:29:34 -07:00
Siddharth Ganesan
c6166a9483 feat(copilot): generate agent api key (#989)
* Add skeleton copilot to settings modal and add migration for copilot api keys

* Add hash index on encrypted key

* Security 1

* Remove sim agent api key

* Fix api key stuff

* Auth

* Status code handling

* Update env key

* Copilot api key ui

* Update copilot costs

* Add copilot stats

* Lint

* Remove logs

* Remove migrations

* Remove another migration

* Updates

* Hide if hosted

* Fix test

* Lint

* Lint

* Fixes

* Lint

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-15 18:05:54 -07:00
Waleed Latif
0258a1b4ce fix(loading): fix workflow detached on first load (#987) 2025-08-15 17:26:47 -07:00
Vikhyath Mondreti
4d4aefa346 fix(envvar): clear separation between server-side and client-side billing envvar (#988) 2025-08-15 16:41:02 -07:00
Vikhyath Mondreti
a0cf003abf Merge pull request #986 from simstudioai/staging
attempt to fix build issues (#985)
2025-08-15 15:22:26 -07:00
Vikhyath Mondreti
2e027dd77d attempt to fix build issues (#985) 2025-08-15 15:21:34 -07:00
Vikhyath Mondreti
6133db53d0 v0.3.27: oauth/webhook fixes, whitelabel fixes, code cleanups
v0.3.27: oauth/webhook fixes, whitelabel fixes, code cleanups
2025-08-15 13:33:55 -07:00
Waleed Latif
03bb437e09 fix(chat-deploy): fixed chat-deploy (#981) 2025-08-15 13:07:54 -07:00
Vikhyath Mondreti
9f02f88bf5 fix(oauth): webhook + oauthblocks in workflow (#979)
* fix(oauth): webhook + oauthblocks in workflow

* propagate workflow id

* requireWorkflowId for internal can be false
2025-08-15 13:07:46 -07:00
Waleed Latif
7a1711282e improvement/function: remove unused function execution logic in favor of vm, update turborepo (#980)
* improvement(function): remove freestyle in favor of vm exec

* update imports

* remove unused test suite

* update turborepo
2025-08-15 12:51:27 -07:00
Waleed Latif
58613888b0 improvement(redirects): move redirects to middleware, push to login if no session and workspace if session exists, remove telemetry consent dialog (#976)
* improvement(redirects): move redirects to middleware, push to login if no session and workspace if session exists

* remove telemetry consent dialog

* remove migrations

* rerun migrations
2025-08-15 12:36:34 -07:00
Waleed Latif
f1fe2f52cc improvement(billing): add billing enforcement for webhook executions, consolidate helpers (#975)
* fix(billing): clinet-side envvar for billing

* remove unrelated files

* fix(billing): add billing enforcement for webhook executions, consolidate implementation

* cleanup

* add back server envvar
2025-08-15 12:28:34 -07:00
Waleed Latif
7d05999a70 fix(force-dynamic): revert force-dynamic for the 38 routes that we previously added it to (#971) 2025-08-15 12:05:51 -07:00
Siddharth Ganesan
bf07240cfa Fix user message color (#978) 2025-08-15 11:59:28 -07:00
Siddharth Ganesan
0c7a8efc8d feat(copilot): add depths (#974)
* Checkpont

* can edit names and types

* Add reasoning and thinking

* Update agent max

* Max mode v1

* Add best practices

* Todo list shows up

* Todolist works

* Updates to todo

* Updates

* Updates

* Checkpoitn

* Yaml export updates

* Updates

* Checkpoint fr

* Fix diff veiw on new workflow

* Subflow autolayout fix v1

* Autolayout fixes 2

* Gdrive list files

* Get oauth credential (email)

* Gdrive file picker

* Gdrive file access prompt

* Api request

* Copilot ui for some tool calls

* Updates

* Fix overflow

* Openai

* Streaming

* Checkpoint

* Update

* Openai responses api

* Depth skeleton

* Depth tooltips

* Mode selector tool tips

* Update ui

* Update ordering

* Lint

* Remove migrations

* Add migrations back

* Lint

* Fix isdev

* Fix tests

* Comments

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-15 11:37:58 -07:00
Vikhyath Mondreti
f081f5a73c Revert 1a7de84 except tag dropdown changes (keep apps/sim/components/ui/tag-dropdown.tsx) (#972) 2025-08-15 00:37:16 -07:00
Waleed Latif
72c07e8ad2 fix(whitelabel): fix privacy policy & terms, remove unused/unnecessary envvars for whitelabeling (#969)
* fix(whitelabel): fix privacy policy & terms for whitelabeling

* remove unused hide branding url

* removed support email envvar, remove landing page except for hosted version

* remove unnecessary comments

* removed primary, secondary, accent color envvars and standardized usage of brand colors in css file

* fix primaryColor refernce

* fix invalid css
2025-08-14 20:03:01 -07:00
Vikhyath Mondreti
e1f04f42f8 v0.3.26: fix billing, bubble up workflow block errors, credentials security improvements
v0.3.26: fix billing, bubble up workflow block errors, credentials security improvements
2025-08-14 14:17:25 -05:00
Vikhyath Mondreti
fd9e61f85a improvement(credentials-security): use clear credentials sharing helper, fix google sheets block url split bug (#968)
* improvement(credentials-sharing-security): cleanup and reuse helper to determine credential access

* few more routes

* fix google sheets block

* fix test mocks

* fix calendar route
2025-08-14 14:13:18 -05:00
Waleed Latif
f1934fe76b fix(billing): separate client side and server side envvars for billing (#966) 2025-08-14 11:29:02 -07:00
Vikhyath Mondreti
ac41bf8c17 Revert "fix(workflow-block): revert change bubbling up error for workflow block" (#965)
* Revert "fix(workflow-block): revert change bubbling up error for workflow blo…"

This reverts commit 9f0993ed57.

* revert test changes
2025-08-14 12:18:47 -05:00
Vikhyath Mondreti
56ffb538a0 Merge pull request #964 from simstudioai/staging
v0.3.25: oauth credentials sharing mechanism, workflow block error handling changes
2025-08-14 02:36:19 -05:00
Vikhyath Mondreti
2e8f051e58 fix workflow block test 2025-08-14 02:28:17 -05:00
Vikhyath Mondreti
9f0993ed57 fix(workflow-block): revert change bubbling up error for workflow block (#963) 2025-08-14 02:18:18 -05:00
Waleed Latif
472a22cc94 improvement(helm): added template for external db secret (#957) 2025-08-13 21:21:46 -07:00
Waleed Latif
da04ea0e9f fix(subflows): added change detection for parallels, updated deploy and status schemas to match parallel/loop (#956) 2025-08-13 21:18:07 -07:00
Waleed Latif
d4f412af92 fix(api): fix api post and get without stringifying (#955) 2025-08-13 18:49:22 -05:00
Siddharth Ganesan
70fa628a2a improvement(uploads): add multipart upload + batching + retries (#938)
* File upload retries + multipart uploads

* Lint

* FIle uploads

* File uploads 2

* Lint

* Fix file uploads

* Add auth to file upload routes

* Lint
2025-08-13 15:18:14 -07:00
Vikhyath Mondreti
b159d63fbb improvement(oauth): credentials sharing for workflows (#939)
* improvement(oauth): credential UX while sharing workflows

* fix tests

* address greptile comments

* fix linear, jira, folder selectors

* fix routes

* fix linear

* jira fix attempt

* jira fix attempt

* jira fixes

* fix

* fix

* fix jira

* fix selector disable behaviour

* minor fixes

* clear selectors correctly

* fix project selector jira

* fix gdrive

* fix labels dropdown

* fix webhook realtime collab

* fix

* fix webhooks persistence

* fix folders route

* fix lint

* test webhook intermittent error

* fix

* fix display
2025-08-13 16:51:46 -05:00
Adam Gough
5dfe9330bb added file for microsoft verification (#946)
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-08-13 12:18:31 -05:00
Waleed Latif
4107948554 Merge pull request #954 from simstudioai/staging
fix
2025-08-12 21:12:18 -07:00
Vikhyath Mondreti
7ebc87564d fix(double-read): API Block (#950)
* fix(double-read-http): double reading body json

* fix

* fix tests
2025-08-12 23:08:31 -05:00
Vikhyath Mondreti
8aa0ed19f1 Revert "fix(api): fix api block (#951)" (#953)
This reverts commit 8016af60f4.
2025-08-12 23:05:08 -05:00
Waleed Latif
f7573fadb1 v0.3.24: api block fixes 2025-08-12 20:35:07 -07:00
Waleed Latif
8016af60f4 fix(api): fix api block (#951) 2025-08-12 20:31:41 -07:00
Vikhyath Mondreti
8fccd5c20d Merge pull request #948 from simstudioai/staging
v0.3.24: revert redis session management change
2025-08-12 17:56:16 -05:00
Vikhyath Mondreti
8de06b63d1 Revert "improvement(performance): use redis for session data (#934)" (#947)
This reverts commit 3c7b3e1a4b.
2025-08-12 17:30:21 -05:00
Vikhyath Mondreti
1c818b2e3e v0.3.23: multiplayer variables, api key fixes, kb improvements, triggers fixes
v0.3.23: multiplayer variables, api key fixes, kb improvements, triggers fixes
2025-08-12 15:23:09 -05:00
Vikhyath Mondreti
1a7de84c7a fix(tag-dropdown): last char dropped bug (#945) 2025-08-12 11:48:34 -05:00
Waleed Latif
a2dea384a4 fix(kb): kb-level deletion should reflect in doc level kb tags sidebar registry (#944) 2025-08-12 09:26:28 -07:00
Waleed Latif
1c3e923f1b fix(kb-ui): fixed tags hover effect (#942) 2025-08-12 08:49:19 -07:00
Waleed Latif
e1d5e38528 fix(chunks): instantaneous search + server side searching instead of client-side (#940)
* fix(chunks): instantaneous search + server side searching instead of client-side

* add knowledge tags component to sidebar, replace old knowledge tags UI

* add types, remove extraneous comments

* added knowledge-base level tag definitions viewer, ability to create/delete slots in sidebar and respective routes

* ui

* fix stale tag issue

* use logger
2025-08-12 01:53:47 -07:00
Waleed Latif
3c7b3e1a4b improvement(performance): use redis for session data (#934) 2025-08-11 22:42:22 -05:00
Waleed Latif
bc455d5bf4 feat(variables): multiplayer variables through sockets, persist server side (#933)
* feat(variables): multiplayer variables through sockets, persist server side

* remove extraneous comments

* breakout variables handler in sockets
2025-08-11 18:32:21 -05:00
Waleed Latif
2a333c7cf7 fix(kb): added proper pagination for documents in kb (#937) 2025-08-11 14:16:15 -07:00
Adam Gough
41cc0cdadc fix(webhooks): fixed all webhook structures (#935)
* fix for variable format + trig

* fixed slack variable

* microsoft teams working

* fixed outlook, plus added other minor documentation changes and fixed subblock

* removed discord webhook logic

* added airtable logic

* bun run lint

* test

* test again

* test again 2

* test again 3

* test again 4

* test again 4

* test again 4

* bun run lint

* test 5

* test 6

* test 7

* test 7

* test 7

* test 7

* test 7

* test 7

* test 8

* test 9

* test 9

* test 9

* test 10

* test 10

* bun run lint, plus github fixed

* removed some debug statements #935

* testing resolver removing

* testing trig

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-11 12:50:55 -07:00
Waleed Latif
70aeb0c298 fix(sidebar-ui): fix small ui bug to close gap when creating new workflow (#932) 2025-08-10 18:33:01 -07:00
Emir Karabeg
83f113984d feat(usage-indicator): added ability to see current usage (#925)
* feat(usage-indicator): added ability to see current usage

* feat(billing): added billing ennabled flag for usage indicator, enforcement of billing usage

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-10 17:20:53 -07:00
Waleed Latif
56ede1c980 improvement(tools): removed transformError, isInternalRoute, directExecution (#928)
* standardized response format for transformError

* removed trasnformError, moved error handling to executeTool for all different error formats

* remove isInternalRoute, make it implicit in executeTool

* removed directExecution, everything on the server nothing on the client

* fix supabase

* fix(tag-dropdown): fix values for parallel & loop blocks (#929)

* fix(search-modal): add parallel and loop blocks to search modal

* reordered tool params

* update docs
2025-08-10 17:19:46 -07:00
Waleed Latif
df16382a19 improvement(subflow): consolidated parallel/loop tags and collaborativeUpdate (#931)
* fix(console): fix typo

* improvement(subflows): consolidated subflows tags
2025-08-10 17:19:21 -07:00
Waleed Latif
e271ed86b6 improvement(console): added iteration info to console entry for parallel/loop (#930) 2025-08-10 16:27:39 -07:00
Waleed Latif
785b86a32e fix(tag-dropdown): fix values for parallel & loop blocks (#929) 2025-08-10 11:55:56 -07:00
Waleed Latif
e5e8082de4 fix(workflow-block): improvements to pulsing effect, active execution state, and running workflow blocks in parallel (#927)
* fix: same child workflow executing in parallel with workflow block

* fixed run button prematurely showing completion before child workflows completed

* prevent child worklfows from touching the activeBlocks & layer logic in the parent executor

* surface child workflow errors to main workfow

* ack PR comments
2025-08-09 16:57:56 -07:00
Waleed Latif
8a08afd733 improvement(control-bar): standardize styling across all control bar buttons (#926) 2025-08-09 12:32:37 -07:00
Vikhyath Mondreti
ebb25469ab fix(apikeys): pinned api key to track API key a workflow is deployed with (#924)
* fix(apikeys): pinned api key to track API key a workflow is deployed with

* remove deprecated behaviour tests
2025-08-09 01:37:27 -05:00
Waleed Latif
a2040322e7 fix(chat): fix chat attachments style in dark mode (#923) 2025-08-08 20:12:30 -07:00
Waleed Latif
a8be7e9fb3 fix(help): fix email for help route (#922) 2025-08-08 20:06:19 -07:00
Waleed Latif
aedf5e70b0 v0.3.22: handle files, trigger mode, email validation, tag dropdown types (#919)
* feat(execution-filesystem): system to pass files between blocks  (#866)

* feat(files): pass files between blocks

* presigned URL for downloads

* Remove latest migration before merge

* starter block file upload wasn't getting logged

* checkpoint in human readable form

* checkpoint files / file type outputs

* file downloads working for block outputs

* checkpoint file download

* fix type issues

* remove filereference interface with simpler user file interface

* show files in the tag dropdown for start block

* more migration to simple url object, reduce presigned time to 5 min

* Remove migration 0065_parallel_nightmare and related files

- Deleted apps/sim/db/migrations/0065_parallel_nightmare.sql
- Deleted apps/sim/db/migrations/meta/0065_snapshot.json
- Removed 0065 entry from apps/sim/db/migrations/meta/_journal.json

Preparing for merge with origin/staging and migration regeneration

* add migration files

* fix tests

* Update apps/sim/lib/uploads/setup.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* cleanup types

* fix lint

* fix logs typing for file refs

* open download in new tab

* fixed

* Update apps/sim/tools/index.ts

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

* fix file block

* cleanup unused code

* fix bugs

* remove hacky file id logic

* fix drag and drop

* fix tests

---------

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

* feat(trigger-mode): added trigger-mode to workflow_blocks table (#902)

* fix(schedules-perms): use regular perm system to view/edit schedule info (#901)

* fix(schedules-perms): use regular perm system to view schedule info

* fix perms

* improve logging

* feat(webhooks): deprecate singular webhook block + add trigger mode to blocks (#903)

* feat(triggers): added new trigger mode for blocks, added socket event, ran migrations

* Rename old trigger/ directory to background/

* cleaned up, ensured that we display active webhook at the block-level

* fix submenu in tag dropdown

* keyboard nav on tag dropdown submenu

* feat(triggers): add outlook to new triggers system

* cleanup

* add types to tag dropdown, type all outputs for tools and use that over block outputs

* update doc generator to truly reflect outputs

* fix docs

* add trigger handler

* fix active webhook tag

* tag dropdown fix for triggers

* remove trigger mode schema change

* feat(execution-filesystem): system to pass files between blocks  (#866)

* feat(files): pass files between blocks

* presigned URL for downloads

* Remove latest migration before merge

* starter block file upload wasn't getting logged

* checkpoint in human readable form

* checkpoint files / file type outputs

* file downloads working for block outputs

* checkpoint file download

* fix type issues

* remove filereference interface with simpler user file interface

* show files in the tag dropdown for start block

* more migration to simple url object, reduce presigned time to 5 min

* Remove migration 0065_parallel_nightmare and related files

- Deleted apps/sim/db/migrations/0065_parallel_nightmare.sql
- Deleted apps/sim/db/migrations/meta/0065_snapshot.json
- Removed 0065 entry from apps/sim/db/migrations/meta/_journal.json

Preparing for merge with origin/staging and migration regeneration

* add migration files

* fix tests

* Update apps/sim/lib/uploads/setup.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* cleanup types

* fix lint

* fix logs typing for file refs

* open download in new tab

* fixed

* Update apps/sim/tools/index.ts

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

* fix file block

* cleanup unused code

* fix bugs

* remove hacky file id logic

* fix drag and drop

* fix tests

---------

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

* feat(trigger-mode): added trigger-mode to workflow_blocks table (#902)

* fix(schedules-perms): use regular perm system to view/edit schedule info (#901)

* fix(schedules-perms): use regular perm system to view schedule info

* fix perms

* improve logging

* cleanup

* prevent tooltip showing up on modal open

* updated trigger config

* fix type issues

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(helm): fix helm charts migrations using wrong image (#907)

* fix(helm): fix helm charts migrations using wrong image

* fixed migrations

* feat(whitelist): add email & domain-based whitelisting for signups (#908)

* improvement(helm): fix duplicate SOCKET_SERVER_URL and add additional envvars to template (#909)

* improvement(helm): fix duplicate SOCKET_SERVER_URL and add additional envvars to template

* rm serper & freestyle

* improvement(tag-dropdown): typed tag dropdown values (#910)

* fix(min-chunk): remove minsize for chunk (#911)

* fix(min-chunk): remove minsize for chunk

* fix tests

* improvement(chunk-config): migrate unused default for consistency (#913)

* fix(mailer): update mailer to use the EMAIL_DOMAIN (#914)

* fix(mailer): update mailer to use the EMAIL_DOMAIn

* add more

* Improvement(cc): added cc to gmail and outlook (#900)

* changed just gmail

* bun run lint

* fixed bcc

* updated docs

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: waleedlatif1 <walif6@gmail.com>

* fix(email-validation): add email validation to prevent bouncing, fixed OTP validation (#916)

* feat(email-validation): add email validation to prevent bouncing

* removed suspicious patterns

* fix(verification): fixed OTP verification

* fix failing tests, cleanup

* fix(otp): fix email not sending (#917)

* fix(email): manual OTP instead of better-auth (#921)

* fix(email): manual OTP instead of better-auth

* lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-08 19:08:30 -07:00
Waleed Latif
503268ebcd fix(email): manual OTP instead of better-auth (#921)
* fix(email): manual OTP instead of better-auth

* lint
2025-08-08 18:49:54 -07:00
Waleed Latif
9a4de1f0c6 fix(otp): fix email not sending (#917) 2025-08-08 17:25:44 -07:00
Waleed Latif
43a3416347 fix(email-validation): add email validation to prevent bouncing, fixed OTP validation (#916)
* feat(email-validation): add email validation to prevent bouncing

* removed suspicious patterns

* fix(verification): fixed OTP verification

* fix failing tests, cleanup
2025-08-08 17:01:41 -07:00
Adam Gough
7f39cd0f23 Improvement(cc): added cc to gmail and outlook (#900)
* changed just gmail

* bun run lint

* fixed bcc

* updated docs

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-08 14:20:16 -07:00
Waleed Latif
658942deb3 fix(mailer): update mailer to use the EMAIL_DOMAIN (#914)
* fix(mailer): update mailer to use the EMAIL_DOMAIn

* add more
2025-08-08 13:13:52 -07:00
Vikhyath Mondreti
061bd6d5a8 improvement(chunk-config): migrate unused default for consistency (#913) 2025-08-08 12:46:30 -07:00
Vikhyath Mondreti
0ec91f9010 fix(min-chunk): remove minsize for chunk (#911)
* fix(min-chunk): remove minsize for chunk

* fix tests
2025-08-08 12:37:41 -07:00
Waleed Latif
db581dc727 improvement(tag-dropdown): typed tag dropdown values (#910) 2025-08-08 11:34:40 -07:00
Waleed Latif
87e0586d0a improvement(helm): fix duplicate SOCKET_SERVER_URL and add additional envvars to template (#909)
* improvement(helm): fix duplicate SOCKET_SERVER_URL and add additional envvars to template

* rm serper & freestyle
2025-08-08 10:59:34 -07:00
Waleed Latif
9a7c58c8a2 feat(whitelist): add email & domain-based whitelisting for signups (#908) 2025-08-07 23:38:04 -07:00
Waleed Latif
004cd3339d fix(helm): fix helm charts migrations using wrong image (#907)
* fix(helm): fix helm charts migrations using wrong image

* fixed migrations
2025-08-07 23:11:17 -07:00
Waleed Latif
9bd3491eac feat(webhooks): deprecate singular webhook block + add trigger mode to blocks (#903)
* feat(triggers): added new trigger mode for blocks, added socket event, ran migrations

* Rename old trigger/ directory to background/

* cleaned up, ensured that we display active webhook at the block-level

* fix submenu in tag dropdown

* keyboard nav on tag dropdown submenu

* feat(triggers): add outlook to new triggers system

* cleanup

* add types to tag dropdown, type all outputs for tools and use that over block outputs

* update doc generator to truly reflect outputs

* fix docs

* add trigger handler

* fix active webhook tag

* tag dropdown fix for triggers

* remove trigger mode schema change

* feat(execution-filesystem): system to pass files between blocks  (#866)

* feat(files): pass files between blocks

* presigned URL for downloads

* Remove latest migration before merge

* starter block file upload wasn't getting logged

* checkpoint in human readable form

* checkpoint files / file type outputs

* file downloads working for block outputs

* checkpoint file download

* fix type issues

* remove filereference interface with simpler user file interface

* show files in the tag dropdown for start block

* more migration to simple url object, reduce presigned time to 5 min

* Remove migration 0065_parallel_nightmare and related files

- Deleted apps/sim/db/migrations/0065_parallel_nightmare.sql
- Deleted apps/sim/db/migrations/meta/0065_snapshot.json
- Removed 0065 entry from apps/sim/db/migrations/meta/_journal.json

Preparing for merge with origin/staging and migration regeneration

* add migration files

* fix tests

* Update apps/sim/lib/uploads/setup.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* cleanup types

* fix lint

* fix logs typing for file refs

* open download in new tab

* fixed

* Update apps/sim/tools/index.ts

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

* fix file block

* cleanup unused code

* fix bugs

* remove hacky file id logic

* fix drag and drop

* fix tests

---------

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

* feat(trigger-mode): added trigger-mode to workflow_blocks table (#902)

* fix(schedules-perms): use regular perm system to view/edit schedule info (#901)

* fix(schedules-perms): use regular perm system to view schedule info

* fix perms

* improve logging

* cleanup

* prevent tooltip showing up on modal open

* updated trigger config

* fix type issues

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-08-07 20:27:54 -07:00
Vikhyath Mondreti
fd3ca87c38 fix(schedules-perms): use regular perm system to view/edit schedule info (#901)
* fix(schedules-perms): use regular perm system to view schedule info

* fix perms

* improve logging
2025-08-07 15:38:09 -07:00
Waleed Latif
d264a6ade8 feat(trigger-mode): added trigger-mode to workflow_blocks table (#902) 2025-08-07 14:59:25 -07:00
Vikhyath Mondreti
de93e167af feat(execution-filesystem): system to pass files between blocks (#866)
* feat(files): pass files between blocks

* presigned URL for downloads

* Remove latest migration before merge

* starter block file upload wasn't getting logged

* checkpoint in human readable form

* checkpoint files / file type outputs

* file downloads working for block outputs

* checkpoint file download

* fix type issues

* remove filereference interface with simpler user file interface

* show files in the tag dropdown for start block

* more migration to simple url object, reduce presigned time to 5 min

* Remove migration 0065_parallel_nightmare and related files

- Deleted apps/sim/db/migrations/0065_parallel_nightmare.sql
- Deleted apps/sim/db/migrations/meta/0065_snapshot.json
- Removed 0065 entry from apps/sim/db/migrations/meta/_journal.json

Preparing for merge with origin/staging and migration regeneration

* add migration files

* fix tests

* Update apps/sim/lib/uploads/setup.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* Update apps/sim/lib/workflows/execution-file-storage.ts

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

* cleanup types

* fix lint

* fix logs typing for file refs

* open download in new tab

* fixed

* Update apps/sim/tools/index.ts

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

* fix file block

* cleanup unused code

* fix bugs

* remove hacky file id logic

* fix drag and drop

* fix tests

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-08-07 12:51:30 -07:00
Waleed Latif
85cdca28f1 v0.3.21: gpt-5, copilot files, configurable rate limits, fix deployed state 2025-08-07 11:32:25 -07:00
Waleed Latif
75963eb851 fix(gpt-5): remove temp, decr socket debounce to 25ms (#898)
* fix(gpt-5): remove temp

* decr debounce for sockets
2025-08-07 11:24:10 -07:00
Waleed Latif
ed7d7a7101 fix(gpt-5): updated pricing (#897) 2025-08-07 10:39:55 -07:00
Waleed Latif
d5c13b72e9 feat(gpt-5): added gpt-5 models (#896)
* feat(gpt-5): added gpt-5

* restore grok-3-fast

* added azure gpt-5
2025-08-07 10:25:49 -07:00
Waleed Latif
e164e32c5b fix(build): fixed build (#893) 2025-08-06 21:48:11 -07:00
Waleed Latif
7461ddf8f7 feat(rate-limits): make rate limits configurable via environment variables (#892)
* feat(rate-limits): make rate limits configurable via environment variables

* add defaults for CI
2025-08-06 20:56:23 -07:00
Siddharth Ganesan
f94258ef83 improvement(copilot): incremental edits (#891)
* v1

* Incremental edits

* Lint

* Remove dev env

* Fix tests

* Lint
2025-08-06 17:14:47 -07:00
Siddharth Ganesan
05e689bc60 fix(agent): export waits for complete workflow state (#889)
* Fix yaml export race condition

* Fix env.ts dev
2025-08-06 11:28:34 -07:00
Adam Gough
a3a5bf1d76 feat(microsoft-tools): added planner, onedrive, and sharepoint (#840)
* first push

* feat: finished onedrive tool

* added refresh

* added sharepoint with create page

* finished sharepoint and onedrive

* planner working

* fixed create task tool

* made read task better

* cleaned up read task

* bun run lint

* cleaned up #840

* greptile changes and clean up

* bun run lint

* fix #840

* added docs #840

* bun run lint #840

* removed unnecessary logic #840

* removed page token #840

* fixed docs and descriptions, added advanced mode #840

* remove unused types, cleaned up a lot, fixed docs

* readded file upload and changed docs

* bun run lint

* added folder name

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-06 10:27:21 -07:00
Waleed Latif
e43e78fb48 feat(whitelabel): add in the ability to whitelabel via envvars (#887)
* feat(whitelabel): add in the ability to whitelabel via envvars

* restore site.webmanifest

* fix(dynamic): remove force-dynamic from routes that don't need it (#888)

* Reinstall dependencies

* Update docs
2025-08-05 19:01:12 -07:00
Waleed Latif
1b0d304a87 fix(dynamic): remove force-dynamic from routes that don't need it (#888) 2025-08-05 18:44:02 -07:00
Siddharth Ganesan
94368eb1c2 Feat/copilot files (#886)
* Connects to s3

* Checkpoint

* File shows in message

* Make files clickable

* User input image

* Persist thumbnails

* Drag and drop files

* Lint

* Fix isdev

* Dont re-download files on rerender
2025-08-05 17:01:53 -07:00
Vikhyath Mondreti
062e2a2c40 fix(deployed-state): use deployed state for API sync and async execs, deployed state modal visual for enabled/disabled (#885)
* fix(deployments): use deployed state for API sync and async execs

* fix deployed workflow modal visualization for enabled

* fix tests
2025-08-05 15:26:57 -07:00
Waleed Latif
746b87743a feat(ollama): added streaming & tool call support for ollama, updated docs (#884) 2025-08-05 15:04:50 -07:00
Vikhyath Mondreti
9f2ff7e9cd Merge pull request #883 from simstudioai/staging
v0.3.20: KB Tag fixes
2025-08-05 14:07:58 -07:00
Vikhyath Mondreti
be65bf795f fix(kb-tag-slots): finding next slot, create versus edit differentiation (#882)
* fix(kb-tag-slots): finding next slot, create versus edit differentiation

* remove unused test file

* fix lint
2025-08-05 13:58:48 -07:00
Waleed Latif
aeef2b7e2b v0.3.19: openai oss models, invite & search modal fixes 2025-08-05 12:29:06 -07:00
Waleed Latif
6ec5cf46e2 fix(invite): fixed invite modal, fix search modal keyboard nav (#879)
* fix(invite): fixed invite modal

* fix(search-modal): fix search modal keyboard nav
2025-08-05 12:19:11 -07:00
Waleed Latif
4880d34786 feat(models): add openai oss models (#880)
* feat(models): add openai oss models

* fix tool usage control for groq
2025-08-05 12:16:32 -07:00
Waleed Latif
2bba20129f fix(file-upload): fixed file upload URL required (#875)
* fix(file-upload): fixed file upload URL required

* cleanup
2025-08-04 21:40:18 -07:00
Vikhyath Mondreti
64cd60d63a feat(outlook): add outlook webhook provider (#874)
* feat(outlook): add outlook webhook provider

* remove useless files

* cron to one minute

* Update apps/sim/lib/webhooks/utils.ts

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

* Update apps/sim/lib/webhooks/outlook-polling-service.ts

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

* Update apps/sim/lib/webhooks/outlook-polling-service.ts

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

* fix lint

* fix type error:

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-08-04 21:32:00 -07:00
Emir Karabeg
696ef12c80 fix(yaml): modules that require agent repo (#873)
* fix: import yaml store

* fix: removed local dev modules
2025-08-04 21:07:17 -07:00
Emir Karabeg
063734f02c improvement(ui/ux) (#831)
* complete: workspace header, workspace selector

* finished search modal

* completed workflow selector

* finished invite modal

* finished help modal
2025-08-04 20:32:01 -07:00
Waleed Latif
41b1357afb fix(copilot): added user scrolling, fixed code block, fixed code copying and styling (#872)
* fix(copilot-ui): added user scrolling, fixed code block, fixed code copying and styling

* use console logger instead of console

* fix(copilot): make chat history non-interfering (#869)

* Add basic personalizatoin

* Make chat history non-interfering

* Always personalize

* improvement(copilot): add subblock enums to block metadata (#870)

* Add subblock enums to metadata

* Update apps/sim/lib/copilot/tools/server-tools/blocks/get-blocks-metadata.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>

* fix(copilot): fix state message sent on move to background (#871)

* Initial fix

* Add execution start time to message

* Lint

* autofocus on new tab open

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-08-04 19:49:53 -07:00
Siddharth Ganesan
221a473ccc fix(copilot): fix state message sent on move to background (#871)
* Initial fix

* Add execution start time to message

* Lint
2025-08-04 19:23:44 -07:00
Siddharth Ganesan
48b32a346c improvement(copilot): add subblock enums to block metadata (#870)
* Add subblock enums to metadata

* Update apps/sim/lib/copilot/tools/server-tools/blocks/get-blocks-metadata.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-08-04 19:02:16 -07:00
Siddharth Ganesan
6ab9fa76a1 fix(copilot): make chat history non-interfering (#869)
* Add basic personalizatoin

* Make chat history non-interfering

* Always personalize
2025-08-04 18:25:43 -07:00
Siddharth Ganesan
b613010a26 Add basic personalizatoin (#868) 2025-08-04 17:35:28 -07:00
Siddharth Ganesan
1035aca71e feat(copilot): add user feedback options (#867)
* Feedback v1

* Add yaml previews

* Remove logs

* Lint

* Add user id and chat id to feedback

* Lint
2025-08-04 17:15:28 -07:00
Siddharth Ganesan
eb51d6d3f5 improvement(copilot): tool dependency errors show as skipped (#864)
* Dependency errors show as skipped instead of errored

* Update apps/sim/lib/copilot/tools/client-tools/run-workflow.ts

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

* Lint

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-08-04 15:19:53 -07:00
Vikhyath Mondreti
f3880ad8ed fix(gmail-webhook): gmail webhook credential injection issue with webhook block (#865) 2025-08-04 15:13:29 -07:00
Siddharth Ganesan
936705f04c Doc test update 2025-08-04 14:03:53 -07:00
Siddharth Ganesan
4819b88ac1 feat(docs): reindex docs on change (#863)
* Add github action to index docs

* Add new line

* Update .github/workflows/docs-embeddings.yml

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

* Updates

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-08-04 13:26:44 -07:00
Siddharth Ganesan
e71a736400 fix(billing): increase free tier credits (#862)
* Update free tier to 10

* Lint
2025-08-04 12:34:21 -07:00
Siddharth Ganesan
58e764c1dd fix(copilot): fix code block overflow (#861)
* Fix codeblock overflow

* Increase max panel width

* Lint
2025-08-04 11:21:04 -07:00
Waleed Latif
dc5cccdee3 improvement(copilot): code hygiene + tests (#856)
* improvement(copilot): code hygiene + tests

* add remaining copilot tests

* fix typ
2025-08-03 22:09:11 -07:00
Waleed Latif
cb48174f96 fix(docs): add hunter (#857) 2025-08-02 21:11:37 -07:00
Siddharth Ganesan
f9312c5855 Quiet logger 2025-08-02 18:32:08 -07:00
Siddharth Ganesan
6c12104a2e feat(copilot): add billing endpoint (#855)
* Add copilot billing

* Lint

* Update logic

* Dont count as api callg
2025-08-02 17:55:43 -07:00
Siddharth Ganesan
9f0673b285 Remove process.env (#854) 2025-08-02 16:43:07 -07:00
Siddharth Ganesan
18332b9dc4 Lint 2025-08-02 16:19:37 -07:00
Siddharth Ganesan
f1d6b9ca1b Use process.env instead of .env 2025-08-02 16:19:16 -07:00
Siddharth Ganesan
1e0df7466d Lint 2025-08-02 16:10:54 -07:00
Siddharth Ganesan
e8b05ae420 Temp logs (#853) 2025-08-02 16:09:44 -07:00
Waleed Latif
38e1747130 fix(wand): add shimmer to long-input while isStreaming, better prompt for system prompt generation (#852) 2025-08-02 15:38:42 -07:00
Siddharth Ganesan
ab85c1a215 feat(copilot): implement copilot (#850)
* Fix autolayout v1

* Nuke tool call history

* Modal v1

* Preview v2

* more updates

* Checkpoint

* Checkpoint

* Better preview

* Big stuff

* Chat ui

* Ui

* Update

* Changes

* Increase token limit for copilot

* Preview layout fixes

* Checkpoint

* sse checkpoint

* Checkpoint

* Continuation logic

* Checkpoint

* Updates

* UPdates

* Updateds

* Cleanup

* Update

* Diff checker

* test

* Checkpoint

* Checkpoint

* Checkpoint again

* checkpoint again

* Chat box output format

* Auto open diff canvas

* Checkpoint

* Checkpoit

* Cleaning?

* Diff checkpoint

* Checkpoint

* Persist changes

* Autolayout fixces

* Color diff fixes

* Opusss

* Works??

* getting there

* Fixes?

* Fixes?

* Chat fixes

* Autolayout fixes

* Subblock update diffs

* Handle delete diffs

* Edge diffs v1

* Deletion edge diff

* It works, kinda

* Fixes

* Update

* Docs changes

* Prompt fixes and new tool

* Persist color changes

* Add serper to copilot tools

* Get env vars copilot tool

* Set env vars copilot tool

* Copilot console tool

* Promtps

* Targeted v1

* Targeted v2

* Targeted updates better

* Target fixes

* diff works??

* Diff goes away when switching workflows

* Fixes

* Edge fixes

* Remove brief error

* Lint

* Minor fix

* Add abort controller

* Prompting

* Lint

* Fix test

* Fix lint

* Update csp

* Add route to send info to sim agent

* Consolidated copilot

* First refactor complete

* Get user workflow now returns yaml

* Checkpoint

* Checkpoitn

* Works

* It works

* Hi

* Cumulative target edit

* Checkpont

* Checkpoint

* Store updates

* Checkpoitn

* Smart title generation

* Handle copilot aborts

* Clean up old copilot code

* Refactor tool names

* Checkpoint

* Remove old route

* Fix chat loading

* Scope copilot chat to workflow id

* New chat fixes

* Fix chat loading

* Update get all blocks and tools

* Make metadata better

* Update docs

* Conditional update

* Yaml refactor

* Set up yaml service client

* Yaml service migration

* Migrate diff engine to sim agent

* Refactor diff engine

* Fix autolayout problems and clean up code some more

* improvement: copilot panel ui/ux

* Lint

* Cleaning

* Fix autolayout

* Fix chat output selector

* Updated copilot

* Small update

* Checkpoint system v1

* Checkpoint ui

* Copilot ui

* Copilot ui

* Checkpoint

* Accept/reject state

* Proper tool call display name updates

* Fix tool call display updates

* Streaming quality updates?

* Abort on refresh/chat switch/workflow switch

* Abort v2g

* Perf updates

* Ui updates

* Smoother streaming

* Handle edge diffs from sim agent properly

* Enable text box while streaming, but keep send disabled

* Fix set env var route

* Add interrupt param

* Add interrupt handler

* Interrupt v1

* Interrupt ui update

* Update icons

* Ui fixes?

* Simplify get user workflow tool

* Run workflow v1

* Fix edit workflow

* Run workflow e2e v1

* Run workflow v2

* Run workflow v3

* v1 of v3, bad code, needs refactro

* Lint

* Cleaning v1?

* Checkpoitn

* Fix backend processing of status

* State updates

* Closer

* Icon update

* More updates

* Checkpoitn

* Updates

* Chat stays when tabbign

* Fix get console logss

* Markdown copilot

* Fix tool naming for build workflow

* Streaming improvements

* Use logs for copilot run workflow

* Progress

* it works?

* Fix chat loading

* Getting there

* Autoscroll to bottom of chat

* Fix icons

* Lint

* Confirm route polling

* Cleaning

* Lint

* Remove migrations

* Remove journal entry 64

* Resolve merge conflicts

* Db migration

* Fix test and lint

* Fix tsvector lint error

* Fixes

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-08-02 15:30:33 -07:00
Adam Gough
9c3bcbabf9 fix(google-scopes): removed unnecessary google scopes (#849)
* removed unnecessary google scopes

* bun run lint #849

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-02 14:59:46 -07:00
Waleed Latif
6161bb8dbc improvement(helm): add additional instructions for AWS deployments (#851) 2025-08-02 14:57:08 -07:00
Waleed Latif
eb79986b69 fix(kb-search): made query optional, so either query or tags or both can be provided (#848)
* fix(kb-search): made query optional, so either query or tags or both can be provided

* cleanup

* added handlers, ensured that tag search done before vector search

* remove duplicate function
2025-08-02 12:30:14 -07:00
Waleed Latif
9f810e8c29 fix(duplicate): added isWide and advacnedMode to optimistic duplicate, persist collapsed subblock state (#847)
* fix(duplicate): added isWide and advacnedMode to optimistic duplicate, ensured it persists on client & server

* use collaborative set subblock value instead of doing it locally for collapsed subblocks

* cleamup
2025-08-01 17:42:31 -07:00
Vikhyath Mondreti
63b4a81acc fix(logs): forgot dependency for logs breaking pagination' (#846) 2025-08-01 16:43:18 -07:00
Vikhyath Mondreti
545ec791df fix(logs-page): optimize logs retrieval queries, consolidate useEffects to prevent dup calls (#845)
* fix(logs-page): optimize loading times by improving query, removing unused index, adding new index

* add migration files

* remove fake min loading time
2025-08-01 16:26:13 -07:00
Vikhyath Mondreti
3bd7a6c402 fix(sockets): add sockets event for tag / env var dropdown selections (#844)
* fix(sockets): add sockets event for tag / env var dropdown selections to be unit op

* do not bypass op queue for tag selections

* Update apps/sim/socket-server/handlers/subblocks.ts

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

* prevent race cond between subblock update event and tag selection

* refactor

* reduce debounce time to 50ms

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-08-01 15:22:56 -07:00
Waleed Latif
2e2be9bf38 Merge branch 'main' into staging 2025-08-01 13:15:02 -07:00
Waleed Latif
7d45306999 fix(deploy-modal): break down deploy modal into separate components (#837)
Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-08-01 12:51:57 -07:00
waleedlatif
63f3871f60 feat(deploy-chat): added a logo upload for the chat, incr font size 2025-08-01 12:48:47 -07:00
Waleed Latif
9a565f48b1 fix(chat-deploy): added new image upload component, fixed some state issues with success view (#842)
* fix(chat-deploy): added new image upload component, fixed some state issues with success view

* cleanup

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-08-01 12:43:40 -07:00
Vikhyath Mondreti
f327d0479a fix(kb-tags): ui fixes, delete persistence for doc page header (#841)
* fix deletion of tags + refactor next slot calc

* fix kb tag filters count ui
2025-08-01 12:16:08 -07:00
Waleed Latif
fae123754d fix(chat-deploy): fixed form submission access patterns, fixed kb block filters (#839)
* fix(chat-deploy): fixed form submission access patterns

* fix(kb-block): fix tag filters component, removed unused component

* fixed kb block subcomponents

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-08-01 10:29:52 -07:00
waleedlatif
bab4b9f041 feat(deploy-chat): added a logo upload for the chat, incr font size 2025-07-31 23:52:08 -07:00
Vikhyath Mondreti
608964a8b3 fix(kb-tags): docs page kb tags ui (#838)
* fix(kb-tags): docs page kb tags ui

* remove console logs

* remove console error
2025-07-31 21:24:16 -07:00
Waleed Latif
5b53cc2be6 fix(deploy-modal): break down deploy modal into separate components (#837)
Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-31 19:51:25 -07:00
Vikhyath Mondreti
914f1cdd47 improvement(sockets): duplicate op should let addBlock take subblock values instead of separate looped op (#836)
* improvement(sockets): addBlock can accept subblock values

* cleanup unused code
2025-07-31 19:36:32 -07:00
Vikhyath Mondreti
fb6f5553bb improvement(sockets): add batch subblock updates for duplicate to clear queue faster (#835) 2025-07-31 19:04:53 -07:00
Vikhyath Mondreti
84f095d40d fix(sockets): duplicate block op should go through debounced path (#834) 2025-07-31 15:47:32 -07:00
Waleed Latif
bc1c1d1751 fix(deployed-chat): allow non-streaming responses in deployed chat, allow partial failure responses in deployed chat (#833)
* fix(deployed-chat): allow non-streaming responses in deployed chat, allow partial failure responses in deployed chat

* fix(csp): runtime variable resolution for CSP

* cleanup

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-31 13:29:40 -07:00
Vikhyath Mondreti
1c68523aa7 fix(deployed-chat): trigger blocks should not interfere with deployed chat exec (#832) 2025-07-31 12:05:36 -07:00
Waleed Latif
b253454723 feat(tools): added hunter.io tools/block, added default values of first option in dropdowns to avoid operation selector issue, added descriptions & param validation & updated docs (#825)
* feat(tools): added hunter.io tools/block, added default values of first option in dropdowns to avoid operation selector issue

* fix

* added description for all outputs, fixed param validation for tools

* cleanup

* add dual validation, once during serialization and once during execution

* improvement(docs): add base exec charge info to docs (#826)

* improvement(doc-tags-subblock): use table for doc tags subblock in create_document tool for KB (#827)

* improvement(doc-tags-subblock): use table for doc tags create doc tool in KB block

* enforce max tags

* remove red warning text

* fix(bugs): fixed rb2b csp, fixed overly-verbose logs, fixed x URLs (#828)

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>

* fixed serialization errors to appear like execution errors, also fixed contrast on cmdk modal

* fixed required for tools, added tag dropdown for kb tags

* fix remaining tools with required fields

* update utils

* update docs

* fix kb tags

* fix types for exa

* lint

* updated contributing guide + pr template

* Test pre-commit hook with linting

* Test pre-commit hook again

* remove test files

* fixed wealthbox tool

* update telemetry endpoints

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-07-30 23:36:44 -07:00
Vikhyath Mondreti
03607bbc8b feat(wand): subblock level wand configuration + migrate old wand usage to this (#829)
* feat(wand): subblock level wand configuration + migrate old wand usage to this

* fix build issue

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/wand-prompt-bar/wand-prompt-bar.tsx

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

* remove optional param

* remove unused test file

* address greptile comments

* change to enum for gen type

* fix caching issue

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-30 17:42:29 -07:00
Waleed Latif
12bb0b4589 fix(bugs): fixed rb2b csp, fixed overly-verbose logs, fixed x URLs (#828)
Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-30 16:45:53 -07:00
Vikhyath Mondreti
1b929c72a5 improvement(doc-tags-subblock): use table for doc tags subblock in create_document tool for KB (#827)
* improvement(doc-tags-subblock): use table for doc tags create doc tool in KB block

* enforce max tags

* remove red warning text
2025-07-30 12:59:47 -07:00
Vikhyath Mondreti
27e49217cc improvement(docs): add base exec charge info to docs (#826) 2025-07-30 11:07:33 -07:00
Waleed Latif
b4faf08c20 fix(search-modal): fixed search modal keyboard nav (#823)
* fixed search modal keyboard nav

* break down file

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-29 23:51:59 -07:00
Waleed Latif
578129c6e6 fix(domain): fix telemetry endpoint, only add redirects for hosted version (#822)
* fix(otel): change back telemetry endpoint

* only add redirects for hosted version

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-29 17:10:06 -07:00
Waleed Latif
c2593900d4 v0.3.17: domain fix 2025-07-29 13:59:38 -07:00
Waleed Latif
8d7f3a50d1 fix(domain): add redirects to maintain API routes with old host (#820)
* fix(domain): add redirects to maintain API routes with old host

* fix RB2B

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-29 13:57:41 -07:00
Waleed Latif
b8ad42f511 v0.3.16: domain flip 2025-07-29 13:03:34 -07:00
Waleed Latif
ae43381d84 feat(domain): drop the 'studio' (#818)
* feat(domain): drop the

* change all references for Sim Studio to Sim

* change back license and notice

* lint

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-29 12:51:43 -07:00
Vikhyath Mondreti
13608a8bbc feat(execution): base execution charge of 0.001/execution (#817) 2025-07-29 11:25:50 -07:00
Waleed Latif
95a8d6410c v0.3.15: helm charts, evaluator block fixes, ArXiv and Wikipedia tools 2025-07-29 10:22:34 -07:00
Waleed Latif
08720d926c feat(landing): add rb2b (#815)
Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-28 20:16:44 -07:00
Waleed Latif
308f39e8b9 feat(tools): added arXiv and wikipedia tools/blocks & docs (#814)
* feat(tools): added arxiv tools

* feat(tools): added wikipedia tool

* updated docs & remove empty interface

* remove empty interface

* fixed docs generator

* fixed wikipedia

* removed hasExpandableContent from tool-input for consistency across all tools, irregardless of their parsm

* lint

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-28 19:39:26 -07:00
Vikhyath Mondreti
5b1f948686 feat(kb-tags): natural language pre-filter tag system for knowledge base searches (#800)
* fix lint

* checkpoint

* works

* simplify

* checkpoint

* works

* fix lint

* checkpoint - create doc ui

* working block

* fix import conflicts

* fix tests

* add blockers to going past max tag slots

* remove console logs

* forgot a few

* Update apps/sim/tools/knowledge/search.ts

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

* remove console.warn

* Update apps/sim/hooks/use-tag-definitions.ts

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

* use tag slots consts in more places

* remove duplicate title

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-28 18:43:52 -07:00
Waleed Latif
cb17691c01 feat(helm): added helm charts for self-hosting (#813)
* feat(helm): added helm charts for self-hosting

* ack PR comments, use sim instead of simstudio

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-28 18:03:47 -07:00
Vikhyath Mondreti
c00b18594e fix(webhook-modal): on copy do not change webhook url, fix auth to use regular perms system (#812)
* fix(webhook-modal): don't regenerate webhook url on copy

* fix authentication checks for webhook saves
2025-07-28 16:17:34 -07:00
Vikhyath Mondreti
95efae9035 improvement(webhooks): move webhook exeucution to trigger.dev (#810)
* improvement(webhooks): move webhook exeucution to trigger dev

* remove old tests
2025-07-28 13:04:25 -07:00
Waleed Latif
b12e415fea fix(assets): update README.md (#811)
Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-28 12:25:39 -07:00
Waleed Latif
510ce4b7da improvement(cdn): add cdn for large video assets with fallback to static assets (#809)
* added CDN for large assets with fallback to static assets

* remove video assets from docs

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-28 12:15:41 -07:00
Waleed Latif
abed816afd fix(standalone): selectively enable vercel speed insights, add annotations for envvars (#808)
* add annotations for environment variables

* selectively enable vercel speed insights

* use DOCKER_BUILD flag to selectively disable vercel speed insights and analytics

* lint

* additional info

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-28 11:10:20 -07:00
Waleed Latif
6f390c0d1d fix(evaluator): fix tag dropdown for evaluator block (#807)
* fix(evaluator): fix tag dropdown for evaluator block

* lint

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-28 11:03:39 -07:00
Waleed Latif
9c12ddf491 v0.3.14: aliased imports, logger naming changes, teams webhook synchronization 2025-07-28 10:05:07 -07:00
Vikhyath Mondreti
27ef45f717 no immediate acks for ms teams webhook (#805) 2025-07-28 09:21:59 -07:00
Waleed Latif
0414aa5f6d refactor(imports): added aliased imports everywhere (#799)
* refactor(imports): added aliased imports everywhere

* more aliased imports

* add barrel exports

* add more barrel exports

* cleanup

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-26 16:10:32 -07:00
Waleed Latif
93f68a9092 refactor(logger): code cleanup for new execution logger (#798)
* refactor(logger): code hygiene with new logger

* modify remaining files

* simplify code structure

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-26 15:05:33 -07:00
Waleed Latif
727e5e8763 feat(workflow): added cancellation after launching manual execution (#796)
* feat(worfklow): added cancellation after launching manual execution

* fix build error

* ack PR comments

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-26 12:54:08 -07:00
Waleed Latif
4964495abb fix(picker): fix docs.google.com refused to connect issue (#797)
Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
2025-07-26 12:45:44 -07:00
Vikhyath Mondreti
40d3ce5e10 v0.3.13: fix create-manifest job 2025-07-25 16:22:48 -07:00
Vikhyath Mondreti
a251122601 fix(create-manifest): manifest not using right tags by arch (#793)
* fix create manifest to pick out right tags

* fix
2025-07-25 16:20:53 -07:00
Vikhyath Mondreti
9e8d2f7c7d Merge pull request #792 from simstudioai/staging
v0.3.11: arm64 runner, CDN video support
2025-07-25 16:02:59 -07:00
Vikhyath Mondreti
eeb1a340b2 feat: implement native ARM64 Docker builds with CDN support (#791)
* feat: implement native ARM64 Docker builds with CDN support

- Replace QEMU emulation with native ARM64/AMD64 runners (linux-arm64-8-core, linux-x64-8-core)
- Fix manifest creation with proper error handling and image existence checks
- Add CDN video support with getVideoUrl function and Video component
- Update all docs MDX files to use Video component instead of raw video tags
- Update GitHub Actions workflow to use architecture-specific builds
- Remove QEMU setup to eliminate emulation timeout issues
- Maintain multi-arch Docker image support through manifests

* Update .github/workflows/build.yml

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-07-25 15:57:16 -07:00
Vikhyath Mondreti
c91c132e88 Merge pull request #789 from simstudioai/staging
v0.3.11: fix force-dynamic routes, webhooks, kb search perms
2025-07-25 12:44:19 -07:00
Vikhyath Mondreti
5028930b9f fix(webhooks): immediate acks only for teams (#788) 2025-07-25 11:05:14 -07:00
Vikhyath Mondreti
b565babe1f fix(nextjs): add force dynamic to 38 routes (#787) 2025-07-25 10:29:47 -07:00
Vikhyath Mondreti
2f57d8a884 fix(kb-perms): search tool perms to use new system (#786)
* fix(kb): search tool perms

* fix tests
2025-07-24 20:44:26 -07:00
Waleed Latif
a173f6a7ab v0.3.10: docs, logs improvements, kb permissions 2025-07-24 19:20:41 -07:00
Emir Karabeg
af1c7dc39d improvement(ui/ux): logs (#762)
* improvement: filters ui/ux and logic complete

* improvement(ui/ux): logs control bar

* improvement(ui): log table

* improvement: logs sidebar

* ran lint
2025-07-24 18:48:10 -07:00
Waleed Latif
17e493b3b5 fix(nextjs): add force dynamic exports for new copilot routes (#784)
* feat: use 8-core self-hosted runner for faster Docker builds

* fix: lazy load large YAML prompt to prevent build memory exhaustion

- Convert YAML_WORKFLOW_PROMPT from static export to lazy function
- Prevents 281-line string literal from being loaded during static generation
- Fixes exit code 137 memory exhaustion during Docker builds

* fix(nextjs): add force dynamic for copilot routes to resolve OOM issue
2025-07-24 18:46:33 -07:00
Vikhyath Mondreti
a84c55772d fix(workflow-in-workflow): variables not accessible in child workflow (#783)
* fix(workflow-in-workflow): child workflow must be able to access vars

* simplify
2025-07-24 16:17:38 -07:00
Vikhyath Mondreti
5ddfe1b709 fix(sockets): permissions to align with normal perms system" (#782) 2025-07-24 15:41:08 -07:00
Vikhyath Mondreti
022a61b77a improvement(cleanup): remove old logging code (#779) 2025-07-24 12:51:24 -07:00
Vikhyath Mondreti
386644e9f9 improvement(cleanup): remove workflow_execution_blocks table (#778)
* improvement(cleanup): remove workflow_execution_blocks table

* remove reference
2025-07-24 11:29:49 -07:00
Vikhyath Mondreti
14e1c179dc improvement(kb): workspace permissions system reused here (#761)
* improvement(kb-perms): use workspace perms system for kbs

* readd test file

* fixed test

* address greptile comments

* fix button disabling logic

* update filter condition for legacy kbs

* fix kb selector to respect the workspace scoping

* remove testing code

* make workspace selection and prevent cascade deletion

* make workspace selector pass lint

* lint fixed

* fix type error
2025-07-23 20:14:44 -07:00
Waleed Latif
67b0b1258c fix(drizzle): use migrate instead of push for ci (#774) 2025-07-23 16:46:52 -07:00
Waleed Latif
258419ddc4 fix(logs): added indexes to speed up logs loading time, modified to only display logs for current workspace (#773)
* added indexes to speed up logs loading time, modified to only display logs for current workspace

* remove user check, rely on source-of-truth permissions to display logs
2025-07-23 16:19:58 -07:00
Waleed Latif
dc69ea522b fix(condition): fixed condition block else routing bug (#772) 2025-07-23 15:05:53 -07:00
Waleed Latif
8b35cf5558 improvement(docs): updated docs with new videos, new tools (#770)
* improvement(docs): updated docs with new videos, new tools (#744)

* updated docs with new videos, new tools

* update typeform icon

* add qdrant docs
2025-07-23 11:13:29 -07:00
Vikhyath Mondreti
4197e50d78 fix(webhooks): readd immediate acks (#771) 2025-07-23 11:05:22 -07:00
Waleed Latif
0dd7735251 v0.3.9: chat deploy 2025-07-23 02:20:55 -07:00
Waleed Latif
8ddc1d8eda fix(chat-deploy-url): update tests for getEmailDomain (#769)
* fix chat deploy URL in prod

* update tests
2025-07-23 02:18:56 -07:00
Waleed Latif
e90138a651 fix(chat-deploy): fix chat deploy URL in prod (#767) 2025-07-23 02:12:21 -07:00
Waleed Latif
d783ba6fb7 v0.3.8: docker fix, docs updates, permissions for logs/chat deploy 2025-07-23 01:43:25 -07:00
Waleed Latif
a599d3ae0a fix(lint): ran lint (#766) 2025-07-23 01:38:09 -07:00
Waleed Latif
ca468dcbcd Merge branch 'main' into staging 2025-07-23 01:34:13 -07:00
Waleed Latif
fe82166ebc fix(condition): fix bug where user can't edit if container when else if is added (#760) 2025-07-22 21:22:47 -07:00
Vikhyath Mondreti
4433100a47 improvement(logs): make perms workspace scoped (#759) 2025-07-22 21:06:36 -07:00
Waleed Latif
92a998df0e improvement(chat-panel): added the ability to reuse queries, focus cursor for continuous conversation (#756)
* improvement(chat-panel): added the ability to reuse queries, focus cursor for continuous conversation

* fix build
2025-07-22 20:01:02 -07:00
Waleed Latif
a7c8f5dfe9 fix(chat-deploy): fixed permissions to match the workspace permissions, admins can deploy & edit & delete (#753)
* fix(chat-deploy): fixed permissions to match the workspace permissions, admins can deploy & edit & delete

* fixed hanging chat deploy modal

* remove unnecessary fallback
2025-07-22 18:21:33 -07:00
Waleed Latif
e392ca43aa fix(csp): created csp utils file that holds the csp for organization (#752) 2025-07-22 16:47:45 -07:00
Waleed Latif
a217daca3c fix(envvars): use getEnv on the client-side when we need to inject vars for docker runtime, fix folder container & removed folder/subfolder creation modals (#751)
* use getEnv on the client-side when we need to inject vars for docker runtime, fix folder container & removed folder/subfolder creation modals

* consolidated naming utils

* additional type safety
2025-07-22 16:08:04 -07:00
Waleed Latif
21ffa5048b Revert "v0.3.7: docker fix, docs "
Revert "v0.3.7: docker fix, docs "
2025-07-22 13:34:30 -07:00
Waleed Latif
78f45a587a Revert "v0.3.7: docker fix, docs " 2025-07-22 13:34:14 -07:00
Vikhyath Mondreti
d8a7aaaf88 fix(qdrant): kebab case to camel case for icon properties (#748) 2025-07-22 13:11:53 -07:00
Siddharth Ganesan
5158a00b54 feat(copilot-v1): Copilot v1 (#662)
* Fix docs agent

* Doc agent fixes

* Refactor copilot

* Lint

* Update yaml editor

* Lint

* Fix block tool

* Lint

* Get block metadata tool

* Lint

* Yaml changes

* Lint

* Fixes?

* Lint

* Better yaml language

* Lint

* UPdate

* Lint

* Fix condition blocks

* lint

* Fix start block

* Fix starter block stuff

* Lint

* Fix yaml ui

* Lint

* get yaml tool

* Lint

* hi

* Lint

* Agnet

* Copilot UI

* Lint

* Better workflow builder

* Lint

* REHYDRATION

* Lint

* Auto layout

* Lint

* Fixes

* Lint

* Chatbar sizing

* Lint

* Initial chat fixes

* Lint

* Dropdown overflow

* Lint

* UI text

* Lint

* Sample question pills

* Lint

* Ui button

* Fix dropdown appearance

* Lint

* Modal fixes

* UI Updates

* Lint

* Initial ask vs agent mode

* Lint

* Ask vs agent

* Lint

* Ask udpate

* Ui fixes

* Lint

* User message width

* Chat leak fix

* Lint

* Agent ui

* Checkpointing

* Lint

* Checkpoints

* Lint

* Tweaks

* Sample questions

* Lint

* Modal full screen mode

* Lint

* Prompt updates

* Cleaning

* Lint

* Prompt update

* Streaming v1

* Lint

* Tool call inline

* Lint

* Checkpoint

* Lint

* Fix lint

* Sizing

* Lint

* Copilot ui tool call fixes

* Remove output from tool call ui

* Updates

* Lint

* Checkpoitn

* Loading icon

* Lint

* Pulse

* Lint

* Modal fixes

* Sidebar padding

* Checkpoint

* checkpoint

* feat(platform): new UI and templates (#639) (#693)

* improvement: control bar

* improvement: debug flow

* improvement: control bar hovers and skeleton loading

* improvement: completed control bar

* improvement: panel tab selector complete

* refactor: deleted notifications and history dropdown

* improvement: chat UI complete

* fix: tab change on control bar run

* improvement: finshed console (audio display not working)

* fix: text wrapping in console content

* improvement: audio UI

* improvement: image display

* feat: add input to console

* improvement: code input and showing input on errors

* feat: download chat and console

* improvement: expandable panel and console visibility

* improvement: empty state UI

* improvement: finished variables

* fix: image in console entry

* improvement: sidebar and templates ui

* feat: uploading and fetching templates

* improvement: sidebar and control bar

* improvement: templates

* feat: templates done

* fix(sockets): remove package-lock

* fix: sidebar scroll going over sidebar height (#709)

* Checkpoint

* Fix build error

* Checkpoitn

* Docs updates

* Checkpoint

* Streaming vs non streaming

* Clean up yaml save

* Fix revert checkpoitn yaml

* Doc fixes

* Small docs fix

* Clean up old yaml docs

* Doc updates

* Hide copilot

* Revert width

* Db migration fixes

* Add snapshot

* Remove space from mdx

* Add spaces

* Lint

* Address greptile comments

* lint fix

* Hide copilot

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Siddharth Sim <sidstudio@SiddharthsMBP2.attlocal.net>
2025-07-22 13:02:24 -07:00
Anush
31d909bb82 feat(tools): New Qdrant Tool (#644)
* feat: Qdrant tool

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* docs: Updates

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* Apply suggestions from code review

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* chore: Updated placeholder text

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* chore: Post merge updates

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* chore:  visibility to 'user-only'

Signed-off-by: Anush008 <anushshetty90@gmail.com>

---------

Signed-off-by: Anush008 <anushshetty90@gmail.com>
2025-07-22 12:48:30 -07:00
Waleed Latif
8417a98be0 v0.3.7: docker fix, docs 2025-07-22 12:41:41 -07:00
Waleed Latif
f5a64f400e fix(docker): use next-runtime instead of accessing next_public vars directly (#746) 2025-07-22 12:33:48 -07:00
Vikhyath Mondreti
2ae9cbc17f fix(webhook): immediate acks from webhooks (#745)
* fix(webhook): immediate acks from webhooks for teams

* change default message
2025-07-21 20:33:15 -07:00
Waleed Latif
919cf0b58e improvement(docs): updated docs with new videos, new tools (#744)
* updated docs with new videos, new tools

* update typeform icon
2025-07-21 20:17:00 -07:00
Waleed Latif
560d184c31 v0.3.7: ms teams webhook, docker fixes, condition block dropdown, fixed routing with workflow block 2025-07-21 17:20:31 -07:00
Vikhyath Mondreti
e4fbb67833 fix(teams-webhook): response json needs type (#741) 2025-07-21 12:26:47 -07:00
Waleed Latif
7f0f902204 fix(router): fixed routing issue with workflow block, added tests (#739)
* fixed routing issue with workflow block, added tests

* add new dmeo

* change console to logger

* new demo

* changed all console to logger
2025-07-21 12:12:53 -07:00
Vikhyath Mondreti
7739917941 working impl fo ms teams outgoing webhook (#740) 2025-07-21 12:07:49 -07:00
Waleed Latif
d94bfd9a91 fix(condition): fixed condition block dropdown (#738) 2025-07-21 11:18:32 -07:00
Waleed Latif
d919073bea fix(config): add t3 to list of transpiled packages to ensure that envvars are picked up correctly (#737) 2025-07-21 10:16:41 -07:00
Waleed Latif
80076012c6 fix(docker): fixed docker container healthchecks, added instructions to README for pgvector (#735)
* fixed docker container healthchecks

* add additional instructions for pgvector extension to README
2025-07-20 21:27:02 -07:00
Waleed Latif
f2b1c7332d v0.3.6: advanced mode for blocks, async api + bg tasks, trigger blocks 2025-07-19 21:50:58 -07:00
Waleed Latif
b923c247ca fix(lint): fixed lint (#732) 2025-07-19 21:33:55 -07:00
Waleed Latif
cdfb2fcd4c feat(integrations): added deeper integrations for slack, supabase, firecrawl, exa, notion (#728)
* added deeper exa integrations

* added firecrawl crawl tool

* include (optional) indicator for fields that are not explicitly required to be filled in by the user

* use aliased imports, stronger typing, added additional notion tools

* added additional notion tools, tested

* added additional supabase tools, updated CSP

* added remaining supabase tools

* finished supabase tools

* fixed persistence of selector inputs on refresh, added supabase tools and slack tools

* fixed failing test

* remove unrelated file
2025-07-19 21:29:14 -07:00
Vikhyath Mondreti
5ee66252ed feat(webhook-triggers): multiple webhook trigger blocks (#725)
* checkpoint

* correctly clear status

* works

* improvements

* fix build issue

* add docs

* remove comments, logs

* fix migration to have foreign ref key

* change filename to snake case

* modified dropdown to match combobox styling

* added block type for triggers, split out schedule block into a separate trigger

* added chat trigger to start block, removed startAt from schedule modal, added chat fields into tag dropdown for start block

* removed startedAt for schedules, separated schedules into a separate block, removed unique constraint on scheule workflows and added combo constraint on workflowid/blockid and schedule

* icons fix

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
2025-07-19 21:22:51 -07:00
Vikhyath Mondreti
7b73dfb462 fix(autofill-env-vars): simplify/remove logic to not cause useEffect overwrites (#726)
* fix(autofill-env-vars): simplify logic to not cause useEffect overwrites

* remove useless comments
2025-07-19 19:00:34 -07:00
Emir Karabeg
d7a2c0747c fix: shortcuts (#730) 2025-07-19 18:08:21 -07:00
Emir Karabeg
24c22537bb improvement(ui/ux): workflow, search modal (#729)
* improvement: workflow colors

* fix: workflow rename styling

* improvement: no API call on no name change workspace after edit

* improvement: added workflow and workspace to search

* improvement: folder path opened for current workflow on load

* improvement: ui/ux workspace selector

* improvement: search modal keyboard use
2025-07-19 17:08:26 -07:00
Vikhyath Mondreti
ddefbaab38 fix(triggers): remove gitkeep (#724) 2025-07-18 12:54:03 -07:00
Vikhyath Mondreti
b05a9b1493 feat(execution-queuing): async api mode + ratelimiting by subscription tier (#702)
* v1 queuing system

* working async queue

* working impl of sync + async request formats

* fix tests

* fix rate limit calc

* fix rate limiting issues

* regen migration

* fix test

* fix instrumentation script issues

* remove use workflow queue env var

* make modal have async examples

* Remove conflicting 54th migration before merging staging

* new migration files

* remove console log

* update modal correctly

* working sync executor

* works for sync

* remove useless stats endpoint

* fix tests

* add sync exec timeout

* working impl with cron job

* migrate to trigger.dev

* remove migration

* remove unused code

* update readme

* restructure jobs API response

* add logging for async execs

* improvement: example ui/ux

* use getBaseUrl() func

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-07-18 12:41:51 -07:00
Waleed Latif
11264edc2c fix(docker): fix runtime vars for docker deployments (#723) 2025-07-18 11:05:53 -07:00
Waleed Latif
fb5d5d9e64 improvement(kb): add loading logic for document selector for kb block (#722) 2025-07-18 10:48:56 -07:00
Waleed Latif
732df0494e improvement(oauth): added advanced mode for all tools with oauth and selectors (#721)
* fixed SVG error, added tool-level awareness for param validation

* added advanced mode for oauth block

* added wealthbox advanced mode

* fixed wealthbox

* moved types to types file

* ack pr comments
2025-07-18 10:39:56 -07:00
Waleed Latif
06b1d82781 v0.3.5: fix
v0.3.5: fix
2025-07-17 19:52:31 -07:00
Waleed Latif
3d5d7474ed fix(condition): fixed condition block to resolve envvars and vars (#718)
* fix(condition): fixed condition block to resolve envvars and vars

* upgrade turbo

* fixed starter block input not resolving as string
2025-07-17 17:57:23 -07:00
Waleed Latif
27794e59b3 v0.3.4: fix + feat + improvement
v0.3.4: fix + feat + improvement
2025-07-17 13:37:23 -07:00
Waleed Latif
88668fed84 improvement(starter): added tag dropdown for input fields, fixed response block, remove logs and workflowConnections from api response(#716)
* added start block input fields to tag dropdown

* remove logs and workflowConnections from metadata for API triggered executions

* added field name validation for start block input to prevent JSON/API errors and user error

* fix response stringifcation, reuse input format from starter block for response format, add tag dropdown & connection block handling for response format

* hepler func for filteredResult

* fix response format w builder

* fix stringification of response handler

* expand fields by default

* cleanup
2025-07-17 12:59:32 -07:00
Emir Karabeg
fe5402a6d7 fix: truncate workspace selector (#715) 2025-07-16 20:54:53 -07:00
Emir Karabeg
c436c2e378 feat(settings): collapse by default (#714)
* feat: collapse settings added for console

* ran migrations

* fix: added back debug to store
2025-07-16 20:52:16 -07:00
Waleed Latif
60e905c520 feat(workspace): add ability to leave joined workspaces (#713)
* feat(workspace): add ability to leave joined workspaces

* renamed workspaces/members/[id] to workspaces/members/[userId]

* revert name change for route
2025-07-16 17:39:39 -07:00
Waleed Latif
1e55a0e044 v0.3.3: fix + improvement
v0.3.3: fix + improvement
2025-07-16 16:34:08 -07:00
Waleed Latif
e142753d64 improvement(permissions): remove the unused workspace_member table in favor of permissions (#710) 2025-07-16 16:28:20 -07:00
Waleed Latif
61deb02959 fix(subflows): fixed subflows not executing (#711) 2025-07-16 16:27:43 -07:00
Emir Karabeg
e52862166d fix: sidebar scroll going over sidebar height (#709) 2025-07-16 16:16:09 -07:00
Waleed Latif
8f71684dcb v0.3.2: improvement + fix + feat
v0.3.2: improvement + fix + feat
2025-07-16 15:07:42 -07:00
Waleed Latif
92fe353f44 fix(subflow): fixed subflow execution regardless of path decision (#707)
* fix typo in docs file

* fix(subflows): fixed subflows executing irrespective of active path

* added routing strategy

* reorganized executor

* brought folder renaming inline

* cleanup
2025-07-16 14:21:32 -07:00
Emir Karabeg
4c6c7272c5 fix: permissions check for duplicating workflow (#706) 2025-07-16 14:07:31 -07:00
Vikhyath Mondreti
55a9adfdda improvement(voice): interrupt UI + mute mic while agent is talking (#705)
* improvement(voice): interrupt UI + live transcription

* cleanup logs

* remove cross
2025-07-16 13:38:51 -07:00
Waleed Latif
bdfe7e9b99 fix(invitation): allow admins to remove members from workspace (#701)
* fix(invitation): added ability for admins to remove members of their workspace

* lint

* remove references to workspace_member db table

* remove deprecated @next/font

* only allow admin to rename workspace

* bring workflow name change inline, remove dialog
2025-07-15 22:35:35 -07:00
Vikhyath Mondreti
27c248a70c fix(sockets): delete block case (#703) 2025-07-15 21:21:59 -07:00
Adam Gough
19ca9c78b4 fix(schedule): fix for custom cron (#699)
* fix: added cronExpression field and fixed formatting

* fix: modified the test.ts file #699

* added additional validation

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Waleed Latif <walif6@gmail.com>
2025-07-15 20:42:34 -07:00
Emir Karabeg
b13f339327 feat(sidebar): sidebar toggle and search (#700)
* fix: sidebar toggle

* feat: search complete
2025-07-15 20:41:20 -07:00
Waleed Latif
aade4bf3ae fix(sockets): remove package-lock 2025-07-15 13:43:40 -07:00
Waleed Latif
b7185c9ee8 v0.3.1: improvement + fix
v0.3.1: improvement + fix
2025-07-15 13:07:31 -07:00
Waleed Latif
ca4b483ce3 fix(docs): minor docs typo fix (#698) 2025-07-15 13:06:58 -07:00
Waleed Latif
adead6336b improvement(docs): added new docs content, cleanup old content (#690)
* added new docs content, cleanup old content

* improve execution basics section

* improve docs for executions

* update execution index docs

* improvement(docs): added introduction example, cleanup

* ran docs script

* fix typo

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-07-15 12:59:22 -07:00
Vikhyath Mondreti
2d83bbf769 improvement(db): further increase db limits (#696)
* increase sockets connection pool

* correct comment

* increase limits

* remove comments
2025-07-15 12:02:32 -07:00
Vikhyath Mondreti
fd96e446ae improvement(sockets): increase buffer for connections (#695)
* increase sockets connection pool

* correct comment
2025-07-15 11:38:38 -07:00
Emir Karabeg
8b095105ee fix: remove package-lock
fix: remove package-lock
2025-07-15 10:44:29 -07:00
Emir Karabeg
4bb1237027 fix: removed package-lock 2025-07-15 10:32:15 -07:00
Emir Karabeg
46f84e83e9 feat(platform): new UI and templates (#639) (#693)
* improvement: control bar

* improvement: debug flow

* improvement: control bar hovers and skeleton loading

* improvement: completed control bar

* improvement: panel tab selector complete

* refactor: deleted notifications and history dropdown

* improvement: chat UI complete

* fix: tab change on control bar run

* improvement: finshed console (audio display not working)

* fix: text wrapping in console content

* improvement: audio UI

* improvement: image display

* feat: add input to console

* improvement: code input and showing input on errors

* feat: download chat and console

* improvement: expandable panel and console visibility

* improvement: empty state UI

* improvement: finished variables

* fix: image in console entry

* improvement: sidebar and templates ui

* feat: uploading and fetching templates

* improvement: sidebar and control bar

* improvement: templates

* feat: templates done
2025-07-15 09:58:44 -07:00
Emir Karabeg
487f0328c9 feat(platform): new UI and templates (#639)
* improvement: control bar

* improvement: debug flow

* improvement: control bar hovers and skeleton loading

* improvement: completed control bar

* improvement: panel tab selector complete

* refactor: deleted notifications and history dropdown

* improvement: chat UI complete

* fix: tab change on control bar run

* improvement: finshed console (audio display not working)

* fix: text wrapping in console content

* improvement: audio UI

* improvement: image display

* feat: add input to console

* improvement: code input and showing input on errors

* feat: download chat and console

* improvement: expandable panel and console visibility

* improvement: empty state UI

* improvement: finished variables

* fix: image in console entry

* improvement: sidebar and templates ui

* feat: uploading and fetching templates

* improvement: sidebar and control bar

* improvement: templates

* feat: templates done
2025-07-15 09:43:36 -07:00
Vikhyath Mondreti
b223e45de9 Merge pull request #692 from simstudioai/staging
v0.2.15: fix + improvement
2025-07-15 04:11:49 -07:00
Vikhyath Mondreti
0c5e70fc23 max 25 conc connections (#691) 2025-07-15 03:50:59 -07:00
Vikhyath Mondreti
bb759368d9 improvement(kb): pagination for docs + remove kb token count problematic query (#689)
* added pagination to docs in kb

* ack PR comments

* fix failing tests

* fix(kb): remove problematic query updating kb token count

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
2025-07-15 00:28:07 -07:00
Adam Gough
a7a2056b5f Improvement(gmail-tools): added search and read (#680)
* improvement: added search and read gmail

* fix: meta.json file unwanted changes

* fix: modified docs, removed duplication #680

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-07-14 19:26:06 -07:00
Vikhyath Mondreti
1213a64ecd improvement(subflow-docs): docs for loops and parallels added under blocks section (#686)
* docs: update loop and parallel block documentation

* improvement(subflows-docs): add docs for subflows
2025-07-14 18:59:49 -07:00
Vikhyath Mondreti
39444afcdc Merge pull request #688 from simstudioai/staging
v0.2.14: fix + improvement
2025-07-14 18:44:37 -07:00
Vikhyath Mondreti
a030329fd5 fix(kb): auth check for create doc tool (#687) 2025-07-14 18:40:33 -07:00
Waleed Latif
1420f4857b remove root-level tailwind v3 override (#684) 2025-07-14 17:04:03 -07:00
Waleed Latif
b1b8654236 fix(console): match by execution & block id when updating console-entry (#685)
* fix(console): match by execution & block id when updating console-entry

* remove fallback
2025-07-14 17:03:39 -07:00
Waleed Latif
d13a06e2c5 improvement(imports): changed relative to absolute imports (#681)
* improvement(imports): replace relative imports with aliases

* replace console.log with logger
2025-07-14 15:55:04 -07:00
Vikhyath Mondreti
29d0732002 fix(unsubscribe): unsubscribe missing suspense boundary (#683) 2025-07-14 15:46:06 -07:00
Vikhyath Mondreti
e8c51e99a2 fix(queueing): make debouncing native to queue (#682) 2025-07-14 15:33:25 -07:00
Waleed Latif
7192cdef6f v0.2.13: fix + improvement + feat
v0.2.13: fix + improvement + feat
2025-07-14 14:21:02 -07:00
Waleed Latif
8a9bc4e929 fix(permissions): make permissions check case insensitive, resolve hydration issues by consolidating environment checking function (#678)
* fix(permissions): make permissions check case insensitive

* consolidated use of helpers to fetch environment

* use import aliases

* fix(voice): added voice functionality back to chat client (#676)

* fix(voice): added voice functioanlity back to chat clinet

* add logic to support deployed chat in staging

* fix(api-timeout): increase timeout for API block to 2 min (#677)

* feat(wealthbox): added wealthbox crm (#669)

* feat: wealthbox

* feat: added tools

* feat: tested and finished tools

* feat: tested and finished tools

* feat: added refresh token

* fix: added docs

* bun lint

* feat: removed files #669

* fix: greptile comments

* fix: stringified messages #669

* add visibilty to params

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-07-14 13:42:06 -07:00
Adam Gough
d65bdaf546 feat(wealthbox): added wealthbox crm (#669)
* feat: wealthbox

* feat: added tools

* feat: tested and finished tools

* feat: tested and finished tools

* feat: added refresh token

* fix: added docs

* bun lint

* feat: removed files #669

* fix: greptile comments

* fix: stringified messages #669

* add visibilty to params

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-07-14 13:07:55 -07:00
Vikhyath Mondreti
348b524d86 fix(api-timeout): increase timeout for API block to 2 min (#677) 2025-07-14 10:50:36 -07:00
Waleed Latif
0361397879 fix(voice): added voice functionality back to chat client (#676)
* fix(voice): added voice functioanlity back to chat clinet

* add logic to support deployed chat in staging
2025-07-14 09:53:27 -07:00
Waleed Latif
ff2b1d33c8 fix(tool-input): added tool input, visibility enum for tool params, fixed google provider bugs (#674)
* transfrom from block-centric tool input component to tool-centric tool input component for agent tools

* added additional type safety, created generic wrapper for tool input & reused across all subblock types

* stop retries if tool call fails, implemented for all providers except google

* bug fix with tool name extraction

* another bug fix

* ran script to update docs

* update contributing guide tool/block add example to reflect new param structure

* update README

* add key control to combobox, fixed google

* fixed google provider, fixed combobox

* fixed a ton of tools, ensured that the agent tool has full parity with actual tool for all tools

* update docs to reflect new structure

* updated visibility for gmail draft

* standardize dropdown values for tool definitions

* add asterisk for user-only + required fields

* updated visibility for tools

* consolidate redactApiKey util, fixed console entry bug that overwrites previous block logs

* updated docs

* update contributing guide to guide users to point their branches at staging instead of main

* nits

* move socket tests
2025-07-13 20:16:49 -07:00
Vikhyath Mondreti
db22e26662 Merge pull request #671 from simstudioai/fix/queuing
improvement(queuing): queuing with retries for sockets ops
2025-07-13 01:18:30 -07:00
Waleed Latif
38f5aae0fb v0.2.12: fix + improvement
v0.2.12: fix + improvement
2025-07-12 20:26:20 -07:00
Waleed Latif
36eb04dab5 fix(stripe): added missing webhook secret for stripe webhook billing endpoint 2025-07-12 20:20:00 -07:00
Vikhyath Mondreti
f8000a747a Merge branch 'fix/queuing' of github.com:simstudioai/sim into fix/queuing 2025-07-12 18:34:44 -07:00
Vikhyath Mondreti
9a954d1830 working impl 2025-07-12 18:34:31 -07:00
Vikhyath Mondreti
f16d759d8d simplify 2025-07-12 18:27:56 -07:00
Waleed Latif
dad72e3100 fix(ui): fixed loop collection placeholder to match parallel collection placeholder 2025-07-12 17:39:48 -07:00
Vikhyath Mondreti
4285b36a42 Merge pull request #673 from simstudioai/fix/trace-spans-tool-calls
improvement(trace-span): make tool calls separately collect in the tracespan
2025-07-12 14:03:01 -07:00
Vikhyath Mondreti
6967ac0417 improve UI 2025-07-12 13:59:42 -07:00
Vikhyath Mondreti
027614f373 improvement(trace-span): make tool calls separately display in trace span" 2025-07-12 13:15:44 -07:00
Vikhyath Mondreti
b4b6895efa add tool calls to trace span 2025-07-12 13:06:47 -07:00
Vikhyath Mondreti
5b7c07c283 Merge pull request #670 from simstudioai/improvement/gmail
improvement(gmail): added gmail draft operation
2025-07-12 12:34:46 -07:00
Vikhyath Mondreti
db4ad80a4c fix subflow ops to go through queue 2025-07-12 12:19:42 -07:00
Vikhyath Mondreti
0023e8df80 fix retry mechanism 2025-07-12 11:38:38 -07:00
Adam Gough
c81f881855 improvement: fixed docs #670 2025-07-12 11:21:31 -07:00
Vikhyath Mondreti
2f726fa9f3 remove console.log 2025-07-11 20:29:22 -07:00
Vikhyath Mondreti
4d3dee7f0f fix field typing 2025-07-11 20:27:14 -07:00
Vikhyath Mondreti
7860894007 fix incorrect dep 2025-07-11 20:24:37 -07:00
Vikhyath Mondreti
52ffc39194 remove test file 2025-07-11 20:19:03 -07:00
Vikhyath Mondreti
f666ccad43 remove console log 2025-07-11 20:18:30 -07:00
Vikhyath Mondreti
95dfe9e6d2 remove unused file 2025-07-11 20:17:05 -07:00
Vikhyath Mondreti
91a4c6d588 fix subblock updates 2025-07-11 20:11:54 -07:00
Vikhyath Mondreti
5f9bfdde06 feat(queuing): sockets queuing mechanism 2025-07-11 19:53:40 -07:00
Adam Gough
0bd480cfe4 improvement: added draft operation 2025-07-11 15:49:14 -07:00
Adam Gough
1afdeed244 improvement: added gmail draft operation 2025-07-11 15:47:14 -07:00
Waleed Latif
e216b176ac fix(text-fields): prevent save password on usage limit change (#667)
* prevent save password on usage limit change

* prevent more password managers from appearing
2025-07-10 20:15:38 -07:00
Waleed Latif
f0e605f5fa fix(precommit-hook): fixed pre commit hook to use lint-staged (#666) 2025-07-10 19:50:09 -07:00
Waleed Latif
4c85e34d2b fix(scrollbar): fixed double scrollbar (#665) 2025-07-10 19:43:56 -07:00
Vikhyath Mondreti
7e174f239a Merge pull request #659 from simstudioai/fix/cancel-sub
fix(cancel-subscription): cancel subscription needs reference id
2025-07-10 17:31:55 -07:00
Vikhyath Mondreti
af0dcf7efd remove optional chain 2025-07-10 16:13:36 -07:00
Vikhyath Mondreti
617ea25ab4 pass reference id to cancel func 2025-07-10 16:04:23 -07:00
Waleed Latif
b7d536b7bc v0.2.11: fix + feat + improvement
v0.2.11: fix + feat + improvement
2025-07-10 15:23:44 -07:00
Waleed Latif
e83745fcaf feat(models): add grok-4 (#655) 2025-07-10 14:19:45 -07:00
Waleed Latif
3887733da5 feat(kb): added cost for kb blocks (#654)
* added cost to kb upload + search

* small fix

* ack PR comments
2025-07-10 13:53:20 -07:00
Vikhyath Mondreti
614d826217 Merge pull request #652 from simstudioai/fix/resp-format-json-extraction
fix(resp-format): add UI warning for invalid json in response format
2025-07-10 13:21:09 -07:00
Vikhyath Mondreti
a0a4b21000 remove useless paths 2025-07-10 13:17:45 -07:00
Vikhyath Mondreti
1f6dcd8465 remove regex handling never hit 2025-07-10 13:17:35 -07:00
Waleed Latif
30538d9380 fix(docs): fixed docs script to reflect the new output format for all blocks (#653)
* fix(docs): fixed tool docs generator script to match new output structure from blocks

* updated outdated docs
2025-07-10 12:03:37 -07:00
Vikhyath Mondreti
6149489483 Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/code.tsx
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-10 11:56:25 -07:00
Vikhyath Mondreti
9ede001202 lint 2025-07-10 11:47:36 -07:00
Vikhyath Mondreti
209d822ce9 fix response format json extraction issues + add warning for invalid json 2025-07-10 11:47:29 -07:00
Vikhyath Mondreti
31d9e2a4a8 feat(kb-tags-filtering): filter kb docs using pre-set tags (#648)
* feat(knowledge-base): tag filtering

* fix lint

* remove migrations

* fix migrations

* fix lint

* Update apps/sim/app/api/knowledge/search/route.ts

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

* fix lint

* fix lint

* UI

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Waleed Latif <walif6@gmail.com>
2025-07-09 22:54:40 -07:00
Waleed Latif
e5080febd5 feat(billing): add comprehensive usage-based billing system (#625)
* feat(billing): add comprehensive usage-based billing system

- Complete billing infrastructure with subscription management
- Usage tracking and limits for organizations
- Team management with role-based permissions
- CRON jobs for automated billing and cleanup
- Stripe integration for payments and invoicing
- Email notifications for billing events
- Organization-based workspace management
- API endpoints for billing operations

* fix tests, standardize datetime logic

* add lazy init for stripe client, similar to s3

* cleanup

* ack PR comments

* fixed build

* convert everything to UTC

* add delete subscription functionality using better auth

* fix lint

* fix linter error

* remove invoice emails since it is natively managed via stripe

* fix build

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
2025-07-09 22:42:23 -07:00
Vikhyath Mondreti
529fd44405 Merge pull request #650 from simstudioai/improvement/logging-ui
improvement(logging-ui): improve logging UI to be less of information dump
2025-07-09 20:41:16 -07:00
Vikhyath Mondreti
717b4dd2ff revert 2025-07-09 20:36:17 -07:00
Vikhyath Mondreti
8aa86e0e9d remove duplicate info in trace span info for tool calls 2025-07-09 20:15:13 -07:00
Vikhyath Mondreti
148f0a6da3 fix lint 2025-07-09 19:51:46 -07:00
Vikhyath Mondreti
14f422ef5e fix frozen canvas trace span interpretation issue 2025-07-09 19:51:35 -07:00
Vikhyath Mondreti
f27cb18883 fix lint 2025-07-09 19:20:07 -07:00
Vikhyath Mondreti
e102b6cf17 improve logging ui 2025-07-09 19:19:53 -07:00
Vikhyath Mondreti
50595c5c49 Merge pull request #646 from simstudioai/feat/ask-docs
feat(yaml workflow): yaml workflow representation + doc embeddings
2025-07-09 13:27:10 -07:00
Siddharth Ganesan
3c61bc167a lint 2025-07-09 12:54:20 -07:00
Siddharth Ganesan
ef681d8a04 Greptile fixes 2025-07-09 12:54:14 -07:00
Waleed Latif
df4971a876 fix(reddit): fixed reddit missing refresh token for oauth 2025-07-09 12:46:02 -07:00
Vikhyath Mondreti
f269fc9776 Merge pull request #647 from simstudioai/staging
v0.2.10: fix
2025-07-09 12:06:35 -07:00
Vikhyath Mondreti
c65384d715 Merge branch 'main' into staging 2025-07-09 12:00:02 -07:00
Vikhyath Mondreti
24e19a83a5 add 6s timeout (#645)
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
2025-07-09 11:53:43 -07:00
Siddharth Ganesan
5c487f59f9 Remove json export 2025-07-09 11:39:03 -07:00
Siddharth Ganesan
c45da7b93e Lint 2025-07-09 11:37:13 -07:00
Siddharth Ganesan
cfc261d646 Move upload button 2025-07-09 11:37:08 -07:00
Siddharth Ganesan
763d0de5d5 Lint 2025-07-09 11:13:32 -07:00
Siddharth Ganesan
eade867d98 Comment instead of ff 2025-07-09 11:13:28 -07:00
Adam Gough
4a26b061a4 fix(search-chunk): searchbar in knowledge base chunk (#557)
* fix: chunk search bar fix

* fix: fixed reload and refresh

* fix: fixed structure

* fix: need to fix persisting in knowledge search

* fix: adding page as query param

* fix: bun run lint (#557)

* added instantaneous client-side search, added fuzzy search & text highlighting

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Waleed Latif <walif6@gmail.com>
2025-07-09 10:52:28 -07:00
Siddharth Ganesan
8176b37d89 Lint 2025-07-09 10:32:19 -07:00
Siddharth Ganesan
610ea0b689 Yaml fixes 2025-07-09 10:32:14 -07:00
Siddharth Ganesan
3c1914c566 Fix loop/parallel yaml 2025-07-09 10:23:44 -07:00
Siddharth Ganesan
218041dba3 Handle loops/parallel 2025-07-09 10:23:31 -07:00
Siddharth Ganesan
a2827a52c0 Checkpoint 2025-07-08 22:20:46 -07:00
Siddharth Ganesan
6ca8311a76 Lint 2025-07-08 22:15:13 -07:00
Siddharth Ganesan
37c4f835dd Read workflow checkpoint 2025-07-08 22:15:09 -07:00
Siddharth Ganesan
0b01d4bc78 Lint 2025-07-08 22:07:54 -07:00
Siddharth Ganesan
a5883171f9 Get user workflow tool 2025-07-08 22:07:48 -07:00
Waleed Latif
c2f786e40b v0.2.9: fix + feat (#643)
* fix(sharing): fixed folders not appearing when sharing workflows (#616)

* fix(sharing): fixed folders not appearing when sharing workflows

* cleanup

* fixed error case

* fix(deletions): folder deletions were hanging + use cascade deletions throughout  (#620)

* use cascade deletion

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

* fix(envvars): t3-env standardization (#606)

* chore: use t3-env as source of truth

* chore: update mock env for failing tests

* feat(enhanced logs): integration + log visualizer canvas (#618)

* feat(logs): enhanced logging system with cleanup and theme fixes

- Implement enhanced logging cleanup with S3 archival and retention policies
- Fix error propagation in trace spans for manual executions
- Add theme-aware styling for frozen canvas modal
- Integrate enhanced logging system across all execution pathways
- Add comprehensive trace span processing and iteration navigation
- Fix boolean parameter types in enhanced logs API

* add warning for old logs

* fix lint

* added cost for streaming outputs

* fix overflow issue

* fix lint

* fix selection on closing sidebar

* tooltips z index increase

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix(frozen canvas): don't error if workflow state not available for migrated logs (#624)

* fix(frozen canvas): don't error if workflow state not available for old logs

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

* fix(reddit): update to oauth endpoints  (#627)

* fix(reddit): change tool to use oauth token

* fix lint

* add contact info

* Update apps/sim/tools/reddit/get_comments.ts

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

* Update apps/sim/tools/reddit/hot_posts.ts

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

* Update apps/sim/tools/reddit/get_posts.ts

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

* fix type error

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* feat(tools): added reordering of tool calls in agent tool input  (#629)

* added tool re-ordering in agent block

* styling

* fix(oauth): fix oauth to use correct subblock value setter + remove unused local storage code (#628)

* fix(oauth): fixed oauth state not persisting in credential selector

* remove unused local storage code for oauth

* fix lint

* selector clearance issue fix

* fix typing issue

* fix lint

* remove cred id from logs

* fix lint

* works

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

* fix(mem-deletion): hard deletion of memory (#622)

* fix: memory deletion

* fix: bun run lint

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>

* feat(build): added turbopack builds to prod (#630)

* added turbopack to prod builds

* block access to sourcemaps

* revert changes to docs

* fix(docs): fixed broken docs links (#632)

* fix(resp format): non-json input was crashing (#631)

* fix response format non-json input crash bug

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

* fix(revert-deployed): correctly revert to deployed state as unit op using separate endpoint (#633)

* fix(revert-deployed): revert deployed functionality with separate endpoint

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

* fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks (#634)

* fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks

* fixed build

* fix(response-format): add response format to tag dropdown, chat panel, and chat client (#637)

* add response format structure to tag dropdown

* handle response format outputs for chat client and chat panel, implemented the response format handling for streamed responses

* cleanup

* fix(sockets-server-disconnection): on reconnect force sync store to db  (#638)

* keep warning until refresh

* works

* fix sockets server sync on reconnection

* infinite reconn attempts

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

* fix(build): fixed build

* Revert "fix(sockets-server-disconnection): on reconnect force sync store to d…" (#640)

This reverts commit 6dc8b17bed.

* fix(sockets): force user to refresh on disconnect in order to mkae changes, add read-only offline mode (#641)

* force user to refresh on disconnect in order to mkae changes, add read-only offline mode

* remove unused hook

* style

* update tooltip msg

* remove unnecessary useMemo around log

* fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events (#642)

* fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events

* reuse existing isStreaming state for code block llm-generated response format

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-07-08 21:58:06 -07:00
Waleed Latif
3421eaec27 Merge branch 'main' into staging 2025-07-08 21:52:12 -07:00
Siddharth Ganesan
f6b25bf727 Lint 2025-07-08 21:47:37 -07:00
Siddharth Ganesan
aa343fb62f Checkpoint 2025-07-08 21:47:30 -07:00
Siddharth Ganesan
cc249c2dd0 Lint 2025-07-08 21:33:39 -07:00
Siddharth Ganesan
f1734766c3 Remove logs 2025-07-08 21:33:33 -07:00
Siddharth Ganesan
e37f362459 Lint 2025-07-08 21:27:14 -07:00
Siddharth Ganesan
bb9291aecc It works?? 2025-07-08 21:27:08 -07:00
Siddharth Ganesan
5dc3ba3379 Lint 2025-07-08 21:20:07 -07:00
Siddharth Ganesan
684a8020d4 Closer 2025-07-08 21:20:00 -07:00
Waleed Latif
9097c520a5 fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events (#642)
* fix(sockets): added debouncing for sub-block values to prevent overloading socket server, fixed persistence issue during streaming back from LLM response format, removed unused events

* reuse existing isStreaming state for code block llm-generated response format
2025-07-08 21:19:46 -07:00
Siddharth Ganesan
bacb6f3831 Lint 2025-07-08 20:54:21 -07:00
Siddharth Ganesan
2a0224f6ae Initial yaml 2025-07-08 20:54:15 -07:00
Siddharth Ganesan
6cb15a620a Lint 2025-07-08 20:42:44 -07:00
Siddharth Ganesan
c7b77bd303 Yaml language basics 2025-07-08 20:42:40 -07:00
Siddharth Ganesan
c0b8e1aca3 Modal fixes 2025-07-08 20:30:14 -07:00
Siddharth Ganesan
82cb609bb7 Lint 2025-07-08 20:28:39 -07:00
Siddharth Ganesan
07cd6f9e49 Better ui 2025-07-08 20:28:32 -07:00
Siddharth Ganesan
c53e950269 Remove dead code 2025-07-08 20:17:21 -07:00
Waleed Latif
2ce68aedf5 fix(sockets): force user to refresh on disconnect in order to mkae changes, add read-only offline mode (#641)
* force user to refresh on disconnect in order to mkae changes, add read-only offline mode

* remove unused hook

* style

* update tooltip msg

* remove unnecessary useMemo around log
2025-07-08 20:09:33 -07:00
Siddharth Ganesan
88282378ea Lint 2025-07-08 20:08:42 -07:00
Siddharth Ganesan
1b3b85f4c4 Checkpoint 2025-07-08 20:08:34 -07:00
Siddharth Ganesan
4b60bba992 Lint 2025-07-08 19:52:13 -07:00
Siddharth Ganesan
4aaa68d21b Better 2025-07-08 19:52:06 -07:00
Siddharth Ganesan
776ae06671 Lint 2025-07-08 19:46:13 -07:00
Siddharth Ganesan
ccf5c2f6d8 Works? 2025-07-08 19:46:06 -07:00
Siddharth Ganesan
02c41127c2 Lint 2025-07-08 19:14:57 -07:00
Siddharth Ganesan
d1fe209d29 Big refactor 2025-07-08 19:14:51 -07:00
Siddharth Ganesan
ee66c15ed9 some fixes 2025-07-08 18:44:59 -07:00
Waleed Latif
d9046042af Revert "fix(sockets-server-disconnection): on reconnect force sync store to d…" (#640)
This reverts commit 6dc8b17bed.
2025-07-08 18:32:29 -07:00
Siddharth Ganesan
4fffc66ee0 Lint 2025-07-08 18:30:44 -07:00
Siddharth Ganesan
a3159bcebc Fix streaming bug 2025-07-08 18:30:35 -07:00
Siddharth Ganesan
2354909ef9 Lint 2025-07-08 18:14:07 -07:00
Siddharth Ganesan
caccb61362 Tool call version 2025-07-08 18:13:59 -07:00
Siddharth Ganesan
3c7e7949d9 Lint 2025-07-08 17:31:35 -07:00
Siddharth Ganesan
537fbdb2ce UI fixes 2025-07-08 17:31:27 -07:00
Siddharth Ganesan
3460a7b39e Convo update 2025-07-08 17:20:05 -07:00
Siddharth Ganesan
d75751bbe6 Convo update 2025-07-08 17:19:56 -07:00
Waleed Latif
2c9a4f4c3e fix(build): fixed build 2025-07-08 16:52:35 -07:00
Siddharth Ganesan
767b63c57d Fix spacing 2025-07-08 16:51:44 -07:00
Siddharth Ganesan
b58d8773c9 Spacing 2025-07-08 16:51:36 -07:00
Siddharth Ganesan
3af1a6e100 Lint 2025-07-08 16:49:09 -07:00
Siddharth Ganesan
840a028f92 Add footer fullscreen option 2025-07-08 16:49:03 -07:00
Siddharth Ganesan
7bc644a478 Better formatting 2025-07-08 16:42:10 -07:00
Siddharth Ganesan
70a51006f6 Better formatting 2025-07-08 16:42:03 -07:00
Siddharth Ganesan
17513d77ea Initial chatbot ui 2025-07-08 16:38:22 -07:00
Vikhyath Mondreti
6dc8b17bed fix(sockets-server-disconnection): on reconnect force sync store to db (#638)
* keep warning until refresh

* works

* fix sockets server sync on reconnection

* infinite reconn attempts

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
2025-07-08 16:34:43 -07:00
Siddharth Ganesan
70a5f4ec31 Lint fix 2025-07-08 16:11:55 -07:00
Siddharth Ganesan
b9fa50b4de Add db migration 2025-07-08 16:11:44 -07:00
Waleed Latif
97021559cc fix(response-format): add response format to tag dropdown, chat panel, and chat client (#637)
* add response format structure to tag dropdown

* handle response format outputs for chat client and chat panel, implemented the response format handling for streamed responses

* cleanup
2025-07-08 15:49:31 -07:00
Siddharth Ganesan
76c0c56689 Initial lint 2025-07-08 15:36:33 -07:00
Siddharth Ganesan
850447a604 Initial commit 2025-07-08 15:36:25 -07:00
Waleed Latif
0f21fbf705 fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks (#634)
* fix(dropdown): simplify & fix tag dropdown for parallel & loop blocks

* fixed build
2025-07-08 10:14:14 -07:00
Vikhyath Mondreti
3e45d793f1 fix(revert-deployed): correctly revert to deployed state as unit op using separate endpoint (#633)
* fix(revert-deployed): revert deployed functionality with separate endpoint

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
2025-07-07 22:16:17 -07:00
Vikhyath Mondreti
5167deb75c fix(resp format): non-json input was crashing (#631)
* fix response format non-json input crash bug

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
2025-07-07 20:03:01 -07:00
Waleed Latif
02b7899861 fix(docs): fixed broken docs links (#632) 2025-07-07 19:59:30 -07:00
Waleed Latif
7e4669108f feat(build): added turbopack builds to prod (#630)
* added turbopack to prod builds

* block access to sourcemaps

* revert changes to docs
2025-07-07 19:51:39 -07:00
Adam Gough
ede224a15f fix(mem-deletion): hard deletion of memory (#622)
* fix: memory deletion

* fix: bun run lint

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-07-07 19:28:28 -07:00
Vikhyath Mondreti
5cf7d025db fix(oauth): fix oauth to use correct subblock value setter + remove unused local storage code (#628)
* fix(oauth): fixed oauth state not persisting in credential selector

* remove unused local storage code for oauth

* fix lint

* selector clearance issue fix

* fix typing issue

* fix lint

* remove cred id from logs

* fix lint

* works

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
2025-07-07 18:40:33 -07:00
Waleed Latif
b4eda8fe6a feat(tools): added reordering of tool calls in agent tool input (#629)
* added tool re-ordering in agent block

* styling
2025-07-07 17:25:51 -07:00
Vikhyath Mondreti
60e2e6c735 fix(reddit): update to oauth endpoints (#627)
* fix(reddit): change tool to use oauth token

* fix lint

* add contact info

* Update apps/sim/tools/reddit/get_comments.ts

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

* Update apps/sim/tools/reddit/hot_posts.ts

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

* Update apps/sim/tools/reddit/get_posts.ts

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

* fix type error

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-07 13:32:23 -07:00
Vikhyath Mondreti
c635b19548 fix(frozen canvas): don't error if workflow state not available for migrated logs (#624)
* fix(frozen canvas): don't error if workflow state not available for old logs

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
2025-07-07 02:34:49 -07:00
Vikhyath Mondreti
f3bc1fc250 v0.2.8: fix + feat + improvement (#621)
* fix(sharing): fixed folders not appearing when sharing workflows (#616)

* fix(sharing): fixed folders not appearing when sharing workflows

* cleanup

* fixed error case

* fix(deletions): folder deletions were hanging + use cascade deletions throughout  (#620)

* use cascade deletion

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

* fix(envvars): t3-env standardization (#606)

* chore: use t3-env as source of truth

* chore: update mock env for failing tests

* feat(enhanced logs): integration + log visualizer canvas (#618)

* feat(logs): enhanced logging system with cleanup and theme fixes

- Implement enhanced logging cleanup with S3 archival and retention policies
- Fix error propagation in trace spans for manual executions
- Add theme-aware styling for frozen canvas modal
- Integrate enhanced logging system across all execution pathways
- Add comprehensive trace span processing and iteration navigation
- Fix boolean parameter types in enhanced logs API

* add warning for old logs

* fix lint

* added cost for streaming outputs

* fix overflow issue

* fix lint

* fix selection on closing sidebar

* tooltips z index increase

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Waleed Latif <walif6@gmail.com>

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
2025-07-06 20:07:43 -07:00
Vikhyath Mondreti
0bf9ce0b9e feat(enhanced logs): integration + log visualizer canvas (#618)
* feat(logs): enhanced logging system with cleanup and theme fixes

- Implement enhanced logging cleanup with S3 archival and retention policies
- Fix error propagation in trace spans for manual executions
- Add theme-aware styling for frozen canvas modal
- Integrate enhanced logging system across all execution pathways
- Add comprehensive trace span processing and iteration navigation
- Fix boolean parameter types in enhanced logs API

* add warning for old logs

* fix lint

* added cost for streaming outputs

* fix overflow issue

* fix lint

* fix selection on closing sidebar

* tooltips z index increase

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Waleed Latif <walif6@gmail.com>
2025-07-06 20:01:28 -07:00
Aditya Tripathi
e22f0123a3 fix(envvars): t3-env standardization (#606)
* chore: use t3-env as source of truth

* chore: update mock env for failing tests
2025-07-06 20:01:28 -07:00
Vikhyath Mondreti
231bfb9add fix(deletions): folder deletions were hanging + use cascade deletions throughout (#620)
* use cascade deletion

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
2025-07-06 20:01:28 -07:00
Waleed Latif
cac9ad250d fix(sharing): fixed folders not appearing when sharing workflows (#616)
* fix(sharing): fixed folders not appearing when sharing workflows

* cleanup

* fixed error case
2025-07-06 20:01:28 -07:00
Vikhyath Mondreti
78b5ae7b3d v0.2.7: fix + feat (#615)
* feat(logging): add additional logs for proxy routes

* fix(blocks): workflow handler not working outside gui (#609)

* fix: key to call api internally for workflow block

* feat: use jwt for internal auth to avoid a static key

* chore: formatter

* fix(sidebar): added loop & parallel subblcoks to sidebar search

* merged improvement/connection into staging (#604)

* merged improvement/connection into staging

* fix: merge conflicts and improved block path calculation

* fix: removed migration

* fix: removed duplicate call

* fix: resolver and merge conflicts

* fix: knowledge base folder

* fix: settings modal

* fix: typeform block

* fix: parallel handler

* fix: stores index

* fix: tests

* fix: tag-dropdown

* improvement: start block input and tag dropdown

* fix block id resolution + missing bracket

* fix lint

* fix test

* works

* fix

* fix lint

* Revert "fix lint"

This reverts commit 433e2f9cfc.

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>

* fix(autopan): migration missing (#614)

* add autopan migration

* fix lint

* fix linter

* fix tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
2025-07-04 13:48:17 -07:00
Vikhyath Mondreti
016cd6750c v0.2.6: fix + feat + improvement (#612)
* feat(function): added more granular error logs for function execution for easier debugging (#593)

* added more granular error logs for function execution

* added tests

* fixed syntax error reporting

* feat(models): added temp controls for gpt-4.1 family of models (#594)

* improvement(knowledge-upload): create and upload document to KB (#579)

* improvement: added knowledge upload

* improvement: added greptile comments (#579)

* improvement: changed to text to doc (#579)

* improvement: removed comment (#579)

* added input validation, tested persistence of KB selector

* update docs

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix(remove workflow.state usage): no more usage of deprecated state column in any routes (#586)

* fix(remove workflow.state usage): no more usage of deprecated state col in routes

* fix lint

* fix chat route to only use deployed state

* fix lint

* better typing

* remove useless logs

* fix lint

* restore workflow handler file

* removed all other usages of deprecated 'state' column from workflows table, updated tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix(doc-selector-kb): enable doc selector when kb is selected (#596)

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

* fix(unload): remove beforeunload warning since we communicate via wss (#597)

* fix(executor): fix dependency resolution, allow blocks with multiple inputs to execute (#598)

* feat(billing): added migrations for usage-based billing (#601)

* feat(billing): added migrations for usage-based billing

* lint

* lint

* feat(logging): add new schemas + types for new logging system (#599)

* feat(logging): add new schemas + types for logging

* fix lint

* update migration

* fix lint

* Remove migration 48 to avoid conflict with staging

* fixed merge conflict

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

* fix(createWorkflow): cleanup create workflow to prevent re-renders (#607)

* fix(createWorkflow): no more client side id, duplicate schedules calls

* fix lint

* more cleanup

* fix lint

* fix spamming of create button causing issues

* fix lint

* add more colors + default workflow name changed

* Update apps/sim/stores/workflows/registry/utils.ts

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

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(telegram): added markdown text rendering (#611)

* fix: added proper markdown

* fix: reverted route.ts file

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>

* fix(kb-upload): fix and consolidate KB file uploads logic (#610)

* fix(kb-upload): fix and consolidate logic

* fix lint

* consolidated presigned routes, fixed temp id kb store issue, added nav to next/prev chunk on edit chunk modal

* fix ci test

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Waleed Latif <walif6@gmail.com>

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-07-03 12:53:14 -07:00
Waleed Latif
3b982533d1 v0.2.5: feat, improvement, fix (#595) (#603)
* feat(function): added more granular error logs for function execution for easier debugging (#593)

* added more granular error logs for function execution

* added tests

* fixed syntax error reporting

* feat(models): added temp controls for gpt-4.1 family of models (#594)

* improvement(knowledge-upload): create and upload document to KB (#579)

* improvement: added knowledge upload

* improvement: added greptile comments (#579)

* improvement: changed to text to doc (#579)

* improvement: removed comment (#579)

* added input validation, tested persistence of KB selector

* update docs

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix(remove workflow.state usage): no more usage of deprecated state column in any routes (#586)

* fix(remove workflow.state usage): no more usage of deprecated state col in routes

* fix lint

* fix chat route to only use deployed state

* fix lint

* better typing

* remove useless logs

* fix lint

* restore workflow handler file

* removed all other usages of deprecated 'state' column from workflows table, updated tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix(doc-selector-kb): enable doc selector when kb is selected (#596)

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

* fix(unload): remove beforeunload warning since we communicate via wss (#597)

* fix(executor): fix dependency resolution, allow blocks with multiple inputs to execute (#598)

* feat(billing): added migrations for usage-based billing (#601)

* feat(billing): added migrations for usage-based billing

* lint

* lint

* feat(logging): add new schemas + types for new logging system (#599)

* feat(logging): add new schemas + types for logging

* fix lint

* update migration

* fix lint

* Remove migration 48 to avoid conflict with staging

* fixed merge conflict

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

---------

Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
2025-07-02 08:40:41 -07:00
Vikhyath Mondreti
1604ce4d7c v0.2.4: feat, improvement, fix (#595)
* feat(function): added more granular error logs for function execution for easier debugging (#593)

* added more granular error logs for function execution

* added tests

* fixed syntax error reporting

* feat(models): added temp controls for gpt-4.1 family of models (#594)

* improvement(knowledge-upload): create and upload document to KB (#579)

* improvement: added knowledge upload

* improvement: added greptile comments (#579)

* improvement: changed to text to doc (#579)

* improvement: removed comment (#579)

* added input validation, tested persistence of KB selector

* update docs

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix(remove workflow.state usage): no more usage of deprecated state column in any routes (#586)

* fix(remove workflow.state usage): no more usage of deprecated state col in routes

* fix lint

* fix chat route to only use deployed state

* fix lint

* better typing

* remove useless logs

* fix lint

* restore workflow handler file

* removed all other usages of deprecated 'state' column from workflows table, updated tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
2025-06-30 19:23:37 -07:00
Vikhyath Mondreti
86168f1a87 fix(dep): dependency for useEffect missing 2025-06-30 18:10:20 -07:00
Vikhyath Mondreti
5d7fc5382c fix lint 2025-06-30 17:53:59 -07:00
Vikhyath Mondreti
7a5aeadbb7 fix(knowledge base): selector infinite render 2025-06-30 17:53:51 -07:00
Vikhyath Mondreti
f4e627a9f7 v0.2.3: fix (#592)
* fix(variable resolution): use variable references to not have escaping issues (#587)

* fix(variable-resolution): don't inject stringified json, use var refs

* fix lint

* remove unused var

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

* fix(subblock updates): special selectors persistence (#591)

* fix(knowledge-base-selector): should trigger sockets event for persistence

* fix subblock value updates for non useSubblockValue components

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>

* fix(race-cond): for auto-connect rare race condition between adding edge + block (#582)

* auto connect race condition

* fix lint

* Update apps/sim/hooks/use-collaborative-workflow.ts

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

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

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

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-06-30 16:57:48 -07:00
Vikhyath Mondreti
b0c1547198 fix test failure 2025-06-30 15:52:26 -07:00
Vikhyath Mondreti
d19632aec3 fix typing issue 2025-06-30 14:01:21 -07:00
Vikhyath Mondreti
35ac68f579 fix(func var resolution): variable ref codepath triggered - lint fixed 2025-06-30 13:55:12 -07:00
Vikhyath Mondreti
9c14f5f8fc fix(func var resolution): variable ref codepath triggered 2025-06-30 13:54:53 -07:00
Vikhyath Mondreti
d50db1d3fb add dot check 2025-06-30 12:45:36 -07:00
Vikhyath Mondreti
b3960ad77a v0.2.2: fix (#588)
* fix(loop-foreach): forEach loop iterations (#581)

* fix: working on fixing foreach loop max

* fix: removed default of 5 iterations

* fix: bun run lint

* fix: greptile comments (#581)

* fix: removed safety max (#581)

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>

* improvement(sockets conn): sockets connection refresh warning (#580)

* working conn status

* improvement(sockets conn): sockets connection refresh warning

* fix styling

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>

* fix(variable resolution): use variable references to not have escaping issues (#587)

* fix(variable-resolution): don't inject stringified json, use var refs

* fix lint

* remove unused var

---------

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>

---------

Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
2025-06-30 11:50:59 -07:00
3985 changed files with 930232 additions and 130689 deletions

19
.cursorrules Normal file
View File

@@ -0,0 +1,19 @@
# Role
You are a professional software engineer. All code you write MUST follow best practices, ensuring accuracy, quality, readability, and cleanliness. You MUST make FOCUSED EDITS that are EFFICIENT and ELEGANT.
## Logs
ENSURE that you use the logger.info and logger.warn and logger.error instead of the console.log whenever you want to display logs.
## Comments
You must use TSDOC for comments. Do not use ==== for comments to separate sections.
## Globals styles
You should not update the global styles unless it is absolutely necessary. Keep all styling local to components and files.
## Bun
Use bun and bunx not npm and npx

View File

@@ -1,69 +0,0 @@
# Sim Studio 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 Studio 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 Studio 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.2.22-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 Studio Development Container
# 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

@@ -1,5 +1,5 @@
{
"name": "Sim Studio Dev Environment",
"name": "Sim Dev Environment",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
@@ -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,53 +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
- POSTGRES_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:
@@ -77,7 +80,7 @@ services:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=simstudio
ports:
- "5432:5432"
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s

View File

@@ -3,16 +3,48 @@
# Exit on error, but with some error handling
set -e
echo "🔧 Setting up Sim Studio development environment..."
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,29 +108,12 @@ 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 Studio 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
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "✅ Sim Studio development environment setup complete!"
echo "✅ Sim development environment setup complete!"
echo ""
echo "Your environment is now ready. A new terminal session will show"
echo "available commands. You can start the development server with:"

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

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

@@ -1,4 +1,4 @@
# Code of Conduct - Sim Studio
# Code of Conduct - Sim
## Our Pledge
@@ -55,7 +55,7 @@ representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
reported to the community leaders responsible for enforcement at <waleed@simstudio.ai>.
reported to the community leaders responsible for enforcement at <waleed@sim.ai>.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the

View File

@@ -1,9 +1,9 @@
# Contributing to Sim Studio
# Contributing to Sim
Thank you for your interest in contributing to Sim Studio! Our goal is to provide developers with a powerful, user-friendly platform for building, testing, and optimizing agentic workflows. We welcome contributions in all forms—from bug fixes and design improvements to brand-new features.
Thank you for your interest in contributing to Sim! Our goal is to provide developers with a powerful, user-friendly platform for building, testing, and optimizing agentic workflows. We welcome contributions in all forms—from bug fixes and design improvements to brand-new features.
> **Project Overview:**
> Sim Studio is a monorepo using Turborepo, containing the main application (`apps/sim/`), documentation (`apps/docs/`), and shared packages (`packages/`). The main application is built with Next.js (app router), ReactFlow, Zustand, Shadcn, and Tailwind CSS. Please ensure your contributions follow our best practices for clarity, maintainability, and consistency.
> Sim is a monorepo using Turborepo, containing the main application (`apps/sim/`), documentation (`apps/docs/`), and shared packages (`packages/`). The main application is built with Next.js (app router), ReactFlow, Zustand, Shadcn, and Tailwind CSS. Please ensure your contributions follow our best practices for clarity, maintainability, and consistency.
---
@@ -15,8 +15,6 @@ Thank you for your interest in contributing to Sim Studio! Our goal is to provid
- [Commit Message Guidelines](#commit-message-guidelines)
- [Local Development Setup](#local-development-setup)
- [Adding New Blocks and Tools](#adding-new-blocks-and-tools)
- [Local Storage Mode](#local-storage-mode)
- [Standalone Build](#standalone-build)
- [License](#license)
- [Contributor License Agreement (CLA)](#contributor-license-agreement-cla)
@@ -57,7 +55,7 @@ We strive to keep our workflow as simple as possible. To contribute:
```
7. **Create a Pull Request**
Open a pull request against the `main` branch on GitHub. Please provide a clear description of the changes and reference any relevant issues (e.g., `fixes #123`).
Open a pull request against the `staging` branch on GitHub. Please provide a clear description of the changes and reference any relevant issues (e.g., `fixes #123`).
---
@@ -85,7 +83,7 @@ If you discover a bug or have a feature request, please open an issue in our Git
Before creating a pull request:
- **Ensure Your Branch Is Up-to-Date:**
Rebase your branch onto the latest `main` branch to prevent merge conflicts.
Rebase your branch onto the latest `staging` branch to prevent merge conflicts.
- **Follow the Guidelines:**
Make sure your changes are well-tested, follow our coding standards, and include relevant documentation if necessary.
@@ -132,7 +130,7 @@ To set up your local development environment:
### Option 1: Using NPM Package (Simplest)
The easiest way to run Sim Studio locally is using our NPM package:
The easiest way to run Sim locally is using our NPM package:
```bash
npx simstudio
@@ -142,7 +140,7 @@ After running this command, open [http://localhost:3000/](http://localhost:3000/
#### Options
- `-p, --port <port>`: Specify the port to run Sim Studio on (default: 3000)
- `-p, --port <port>`: Specify the port to run Sim on (default: 3000)
- `--no-pull`: Skip pulling the latest Docker images
#### Requirements
@@ -156,7 +154,7 @@ After running this command, open [http://localhost:3000/](http://localhost:3000/
git clone https://github.com/<your-username>/sim.git
cd sim
# Start Sim Studio
# Start Sim
docker compose -f docker-compose.prod.yml up -d
```
@@ -164,15 +162,19 @@ Access the application at [http://localhost:3000/](http://localhost:3000/)
#### Using Local Models
To use local models with Sim Studio:
To use local models with Sim:
1. Pull models using our helper script:
1. Install Ollama and pull models:
```bash
./apps/sim/scripts/ollama_docker.sh pull <model_name>
# Install Ollama (if not already installed)
curl -fsSL https://ollama.ai/install.sh | sh
# Pull a model (e.g., gemma3:4b)
ollama pull gemma3:4b
```
2. Start Sim Studio with local model support:
2. Start Sim with local model support:
```bash
# With NVIDIA GPU support
@@ -209,13 +211,14 @@ Dev Containers provide a consistent and easy-to-use development environment:
3. **Start Developing:**
- Run `bun run dev` in the terminal or use the `sim-start` alias
- Run `bun run dev:full` in the terminal or use the `sim-start` alias
- This starts both the main application and the realtime socket server
- All dependencies and configurations are automatically set up
- Your changes will be automatically hot-reloaded
4. **GitHub Codespaces:**
- This setup also works with GitHub Codespaces if you prefer development in the browser
- Just click "Code" → "Codespaces" → "Create codespace on main"
- Just click "Code" → "Codespaces" → "Create codespace on staging"
### Option 4: Manual Setup
@@ -246,9 +249,11 @@ If you prefer not to use Docker or Dev Containers:
4. **Run the Development Server:**
```bash
bun run dev
bun run dev:full
```
This command starts both the main application and the realtime socket server required for full functionality.
5. **Make Your Changes and Test Locally.**
### Email Template Development
@@ -275,7 +280,7 @@ When working on email templates, you can preview them using a local email previe
## Adding New Blocks and Tools
Sim Studio is built in a modular fashion where blocks and tools extend the platform's functionality. To maintain consistency and quality, please follow the guidelines below when adding a new block or tool.
Sim is built in a modular fashion where blocks and tools extend the platform's functionality. To maintain consistency and quality, please follow the guidelines below when adding a new block or tool.
### Where to Add Your Code
@@ -300,8 +305,8 @@ In addition, you will need to update the registries:
```typescript:/apps/sim/blocks/blocks/pinecone.ts
import { PineconeIcon } from '@/components/icons'
import { PineconeResponse } from '@/tools/pinecone/types'
import { BlockConfig } from '../types'
import type { BlockConfig } from '@/blocks/types'
import type { PineconeResponse } from '@/tools/pinecone/types'
export const PineconeBlock: BlockConfig<PineconeResponse> = {
type: 'pinecone',
@@ -312,13 +317,56 @@ In addition, you will need to update the registries:
bgColor: '#123456',
icon: PineconeIcon,
// If this block requires OAuth authentication
provider: 'pinecone',
// Define subBlocks for the UI configuration
subBlocks: [
// Block configuration options
{
id: 'operation',
title: 'Operation',
type: 'dropdown'
required: true,
options: [
{ label: 'Generate Embeddings', id: 'generate' },
{ label: 'Search Text', id: 'search_text' },
],
value: () => 'generate',
},
{
id: 'apiKey',
title: 'API Key',
type: 'short-input'
placeholder: 'Your Pinecone API key',
password: true,
required: true,
},
],
tools: {
access: ['pinecone_generate_embeddings', 'pinecone_search_text'],
config: {
tool: (params: Record<string, any>) => {
switch (params.operation) {
case 'generate':
return 'pinecone_generate_embeddings'
case 'search_text':
return 'pinecone_search_text'
default:
throw new Error('Invalid operation selected')
}
},
},
},
inputs: {
operation: { type: 'string', description: 'Operation to perform' },
apiKey: { type: 'string', description: 'Pinecone API key' },
searchQuery: { type: 'string', description: 'Search query text' },
topK: { type: 'string', description: 'Number of results to return' },
},
outputs: {
matches: { type: 'any', description: 'Search results or generated embeddings' },
data: { type: 'any', description: 'Response data from Pinecone' },
usage: { type: 'any', description: 'API usage statistics' },
},
}
```
@@ -366,8 +414,8 @@ In addition, you will need to update the registries:
Your tool should export a constant with a naming convention of `{toolName}Tool`. The tool ID should follow the format `{provider}_{tool_name}`. For example:
```typescript:/apps/sim/tools/pinecone/fetch.ts
import { ToolConfig, ToolResponse } from '../types'
import { PineconeParams, PineconeResponse } from './types'
import { ToolConfig, ToolResponse } from '@/tools/types'
import { PineconeParams, PineconeResponse } from '@/tools/pinecone/types'
export const fetchTool: ToolConfig<PineconeParams, PineconeResponse> = {
id: 'pinecone_fetch', // Follow the {provider}_{tool_name} format
@@ -379,7 +427,18 @@ In addition, you will need to update the registries:
provider: 'pinecone', // ID of the OAuth provider
params: {
// Tool parameters
parameterName: {
type: 'string',
required: true,
visibility: 'user-or-llm', // Controls parameter visibility
description: 'Description of the parameter',
},
optionalParam: {
type: 'string',
required: false,
visibility: 'user-only',
description: 'Optional parameter only user can set',
},
},
request: {
// Request configuration
@@ -387,9 +446,6 @@ In addition, you will need to update the registries:
transformResponse: async (response: Response) => {
// Transform response
},
transformError: (error) => {
// Handle errors
},
}
```
@@ -397,7 +453,7 @@ In addition, you will need to update the registries:
Update the tools registry in `/apps/sim/tools/index.ts` to include your new tool:
```typescript:/apps/sim/tools/index.ts
import { fetchTool, generateEmbeddingsTool, searchTextTool } from './pinecone'
import { fetchTool, generateEmbeddingsTool, searchTextTool } from '/@tools/pinecone'
// ... other imports
export const tools: Record<string, ToolConfig> = {
@@ -429,11 +485,57 @@ Maintaining consistent naming across the codebase is critical for auto-generatio
- **Tool Exports:** Should be named `{toolName}Tool` (e.g., `fetchTool`)
- **Tool IDs:** Should follow the format `{provider}_{tool_name}` (e.g., `pinecone_fetch`)
### Parameter Visibility System
Sim implements a sophisticated parameter visibility system that controls how parameters are exposed to users and LLMs in agent workflows. Each parameter can have one of four visibility levels:
| Visibility | User Sees | LLM Sees | How It Gets Set |
|-------------|-----------|----------|--------------------------------|
| `user-only` | ✅ Yes | ❌ No | User provides in UI |
| `user-or-llm` | ✅ Yes | ✅ Yes | User provides OR LLM generates |
| `llm-only` | ❌ No | ✅ Yes | LLM generates only |
| `hidden` | ❌ No | ❌ No | Application injects at runtime |
#### Visibility Guidelines
- **`user-or-llm`**: Use for core parameters that can be provided by users or intelligently filled by the LLM (e.g., search queries, email subjects)
- **`user-only`**: Use for configuration parameters, API keys, and settings that only users should control (e.g., number of results, authentication credentials)
- **`llm-only`**: Use for computed values that the LLM should handle internally (e.g., dynamic calculations, contextual data)
- **`hidden`**: Use for system-level parameters injected at runtime (e.g., OAuth tokens, internal identifiers)
#### Example Implementation
```typescript
params: {
query: {
type: 'string',
required: true,
visibility: 'user-or-llm', // User can provide or LLM can generate
description: 'Search query to execute',
},
apiKey: {
type: 'string',
required: true,
visibility: 'user-only', // Only user provides this
description: 'API key for authentication',
},
internalId: {
type: 'string',
required: false,
visibility: 'hidden', // System provides this at runtime
description: 'Internal tracking identifier',
},
}
```
This visibility system ensures clean user interfaces while maintaining full flexibility for LLM-driven workflows.
### Guidelines & Best Practices
- **Code Style:** Follow the project's ESLint and Prettier configurations. Use meaningful variable names and small, focused functions.
- **Code Style:** Follow the project's Biome configurations. Use meaningful variable names and small, focused functions.
- **Documentation:** Clearly document the purpose, inputs, outputs, and any special behavior for your block/tool.
- **Error Handling:** Implement robust error handling and provide user-friendly error messages.
- **Parameter Visibility:** Always specify the appropriate visibility level for each parameter to ensure proper UI behavior and LLM integration.
- **Testing:** Add unit or integration tests to verify your changes when possible.
- **Commit Changes:** Update all related components and registries, and describe your changes in your pull request.
@@ -451,7 +553,7 @@ This project is licensed under the Apache License 2.0. By contributing, you agre
By contributing to this repository, you agree that your contributions are provided under the terms of the Apache License Version 2.0, as included in the LICENSE file of this repository.
In addition, by submitting your contributions, you grant Sim Studio, Inc. ("The Licensor") a perpetual, irrevocable, worldwide, royalty-free, sublicensable right and license to:
In addition, by submitting your contributions, you grant Sim, Inc. ("The Licensor") a perpetual, irrevocable, worldwide, royalty-free, sublicensable right and license to:
- Use, copy, modify, distribute, publicly display, publicly perform, and prepare derivative works of your contributions.
- Incorporate your contributions into other works or products.
@@ -463,4 +565,4 @@ If you do not agree with these terms, you must not contribute your work to this
---
Thank you for taking the time to contribute to Sim Studio. We truly appreciate your efforts and look forward to collaborating with you!
Thank you for taking the time to contribute to Sim. We truly appreciate your efforts and look forward to collaborating with you!

View File

@@ -1,42 +1,25 @@
## Description
## Summary
Brief description of what this PR does and why.
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes #(issue)
Fixes # (issue)
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation
- [ ] Other: ___________
## Type of change
## Testing
How has this been tested? What should reviewers focus on?
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Security enhancement
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)
## How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] All tests pass locally and in CI (`bun run test`)
- [ ] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] I have updated version numbers as needed (if needed)
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-reviewed my changes
- [ ] Tests added/updated and passing
- [ ] No new warnings introduced
- [ ] I confirm that I have read and agree to the terms outlined in the [Contributor License Agreement (CLA)](./CONTRIBUTING.md#contributor-license-agreement-cla)
## Security Considerations:
- [ ] My changes do not introduce any new security vulnerabilities
- [ ] I have considered the security implications of my changes
## Additional Information:
Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.
## Screenshots/Videos
<!-- If applicable, add screenshots or videos to help explain your changes -->
<!-- For UI changes, before/after screenshots are especially helpful -->

4
.github/SECURITY.md vendored
View File

@@ -8,11 +8,11 @@
## Reporting a Vulnerability
We take the security of Sim Studio seriously. If you believe you've found a security vulnerability, please follow these steps:
We take the security of Sim seriously. If you believe you've found a security vulnerability, please follow these steps:
1. **Do not disclose the vulnerability publicly** or to any third parties.
2. **Email us directly** at security@simstudio.ai with details of the vulnerability.
2. **Email us directly** at security@sim.ai with details of the vulnerability.
3. **Include the following information** in your report:

View File

@@ -1,66 +0,0 @@
name: Build and Publish Docker Image
on:
push:
branches: [main]
tags: ['v*']
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=sha,format=long
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -6,72 +6,210 @@ on:
pull_request:
branches: [main, staging]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: false
jobs:
test:
test-build:
name: Test and Build
runs-on: ubuntu-latest
uses: ./.github/workflows/test-build.yml
secrets: inherit
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: bun install
- name: Run tests with coverage
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.simstudio.ai'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run test
- name: Build application
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.simstudio.ai'
STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
RESEND_API_KEY: 'dummy_key_for_ci_only'
AWS_REGION: 'us-west-2'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
directory: ./apps/sim/coverage
fail_ci_if_error: false
verbose: true
migrations:
name: Apply Database Migrations
runs-on: ubuntu-latest
# Build AMD64 images and push to ECR immediately (+ GHCR for main)
build-amd64:
name: Build AMD64
needs: test-build
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
needs: test
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
ghcr_image: ghcr.io/simstudioai/simstudio
ecr_repo_secret: ECR_APP
- dockerfile: ./docker/db.Dockerfile
ghcr_image: ghcr.io/simstudioai/migrations
ecr_repo_secret: ECR_MIGRATIONS
- dockerfile: ./docker/realtime.Dockerfile
ghcr_image: ghcr.io/simstudioai/realtime
ecr_repo_secret: ECR_REALTIME
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
bun-version: latest
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }}
- name: Install dependencies
run: bun install
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Apply migrations
working-directory: ./apps/sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
run: bunx drizzle-kit push
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate tags
id: meta
run: |
ECR_REGISTRY="${{ steps.login-ecr.outputs.registry }}"
ECR_REPO="${{ secrets[matrix.ecr_repo_secret] }}"
GHCR_IMAGE="${{ matrix.ghcr_image }}"
# ECR tags (always build for ECR)
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
ECR_TAG="latest"
else
ECR_TAG="staging"
fi
ECR_IMAGE="${ECR_REGISTRY}/${ECR_REPO}:${ECR_TAG}"
# Build tags list
TAGS="${ECR_IMAGE}"
# Add GHCR tags only for main branch
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
GHCR_AMD64="${GHCR_IMAGE}:latest-amd64"
GHCR_SHA="${GHCR_IMAGE}:${{ github.sha }}-amd64"
TAGS="${TAGS},$GHCR_AMD64,$GHCR_SHA"
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push images
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
# 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
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate ARM64 tags
id: meta
run: |
IMAGE="${{ matrix.image }}"
echo "tags=${IMAGE}:latest-arm64,${IMAGE}:${{ github.sha }}-arm64" >> $GITHUB_OUTPUT
- name: Build and push ARM64 to GHCR
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
# 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]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
packages: write
strategy:
matrix:
include:
- image: ghcr.io/simstudioai/simstudio
- image: ghcr.io/simstudioai/migrations
- image: ghcr.io/simstudioai/realtime
steps:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifests
run: |
IMAGE_BASE="${{ matrix.image }}"
# Create latest manifest
docker manifest create "${IMAGE_BASE}:latest" \
"${IMAGE_BASE}:latest-amd64" \
"${IMAGE_BASE}:latest-arm64"
docker manifest push "${IMAGE_BASE}:latest"
# Create SHA manifest
docker manifest create "${IMAGE_BASE}:${{ github.sha }}" \
"${IMAGE_BASE}:${{ github.sha }}-amd64" \
"${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
# Process docs embeddings (after ECR images are pushed, runs in parallel with trigger-deploy)
process-docs:
name: Process Docs
needs: build-amd64
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
uses: ./.github/workflows/docs-embeddings.yml
secrets: inherit

35
.github/workflows/docs-embeddings.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Process Docs Embeddings
on:
workflow_call:
workflow_dispatch: # Allow manual triggering
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'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.22
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: bun install
- name: Process docs embeddings
working-directory: ./apps/sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: bun run scripts/process-docs.ts --clear

158
.github/workflows/i18n.yml vendored Normal file
View File

@@ -0,0 +1,158 @@
name: 'Auto-translate Documentation'
on:
push:
branches: [ staging ]
paths:
- 'apps/docs/content/docs/en/**'
- 'apps/docs/i18n.json'
permissions:
contents: write
pull-requests: write
jobs:
translate:
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.actor != 'github-actions[bot]' # Prevent infinite loops
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.22
- name: Run Lingo.dev translations
env:
LINGODOTDEV_API_KEY: ${{ secrets.LINGODOTDEV_API_KEY }}
run: |
cd apps/docs
bunx lingo.dev@latest i18n
- name: Check for translation changes
id: changes
run: |
cd apps/docs
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
if [ -n "$(git status --porcelain content/docs)" ]; then
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request with translations
if: steps.changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_PAT }}
commit-message: "feat(i18n): update translations"
title: "feat(i18n): update translations"
body: |
## Summary
Automated translation updates triggered by changes to documentation.
This PR was automatically created after content changes were made, updating translations for all supported languages using Lingo.dev AI translation engine.
**Original trigger**: ${{ github.event.head_commit.message }}
**Commit**: ${{ github.sha }}
**Workflow**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [x] Documentation
- [ ] Other: ___________
## Testing
This PR includes automated translations for modified English documentation content:
- 🇪🇸 Spanish (es) translations
- 🇫🇷 French (fr) translations
- 🇨🇳 Chinese (zh) translations
- 🇯🇵 Japanese (ja) translations
- 🇩🇪 German (de) translations
**What reviewers should focus on:**
- Verify translated content accuracy and context
- Check that all links and references work correctly in translated versions
- Ensure formatting, code blocks, and structure are preserved
- Validate that technical terms are appropriately translated
## Checklist
- [x] Code follows project style guidelines (automated translation)
- [x] Self-reviewed my changes (automated process)
- [ ] Tests added/updated and passing
- [x] No new warnings introduced
- [x] I confirm that I have read and agree to the terms outlined in the [Contributor License Agreement (CLA)](./CONTRIBUTING.md#contributor-license-agreement-cla)
## Screenshots/Videos
<!-- Translation changes are text-based - no visual changes expected -->
<!-- Reviewers should check the documentation site renders correctly for all languages -->
branch: auto-translate/staging-merge-${{ github.run_id }}
base: staging
labels: |
i18n
verify-translations:
needs: translate
runs-on: blacksmith-4vcpu-ubuntu-2404
if: always() # Run even if translation fails
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: staging
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.22
- name: Install dependencies
run: |
cd apps/docs
bun install
- name: Build documentation to verify translations
run: |
cd apps/docs
bun run build
- name: Report translation status
run: |
cd apps/docs
echo "## Translation Status Report" >> $GITHUB_STEP_SUMMARY
echo "**Triggered by merge to staging branch**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
en_count=$(find content/docs/en -name "*.mdx" | wc -l)
es_count=$(find content/docs/es -name "*.mdx" 2>/dev/null | wc -l || echo 0)
fr_count=$(find content/docs/fr -name "*.mdx" 2>/dev/null | wc -l || echo 0)
zh_count=$(find content/docs/zh -name "*.mdx" 2>/dev/null | wc -l || echo 0)
ja_count=$(find content/docs/ja -name "*.mdx" 2>/dev/null | wc -l || echo 0)
de_count=$(find content/docs/de -name "*.mdx" 2>/dev/null | wc -l || echo 0)
es_percentage=$((es_count * 100 / en_count))
fr_percentage=$((fr_count * 100 / en_count))
zh_percentage=$((zh_count * 100 / en_count))
ja_percentage=$((ja_count * 100 / en_count))
de_percentage=$((de_count * 100 / en_count))
echo "### Coverage Statistics" >> $GITHUB_STEP_SUMMARY
echo "- **🇬🇧 English**: $en_count files (source)" >> $GITHUB_STEP_SUMMARY
echo "- **🇪🇸 Spanish**: $es_count/$en_count files ($es_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇫🇷 French**: $fr_count/$en_count files ($fr_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇨🇳 Chinese**: $zh_count/$en_count files ($zh_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇯🇵 Japanese**: $ja_count/$en_count files ($ja_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇩🇪 German**: $de_count/$en_count files ($de_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "🔄 **Auto-translation PR**: Check for new pull request with updated translations" >> $GITHUB_STEP_SUMMARY

181
.github/workflows/images.yml vendored Normal file
View File

@@ -0,0 +1,181 @@
name: Build and Push Images
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
packages: write
id-token: write
jobs:
build-amd64:
name: Build AMD64
runs-on: blacksmith-4vcpu-ubuntu-2404
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
ghcr_image: ghcr.io/simstudioai/simstudio
ecr_repo_secret: ECR_APP
- dockerfile: ./docker/db.Dockerfile
ghcr_image: ghcr.io/simstudioai/migrations
ecr_repo_secret: ECR_MIGRATIONS
- dockerfile: ./docker/realtime.Dockerfile
ghcr_image: ghcr.io/simstudioai/realtime
ecr_repo_secret: ECR_REALTIME
outputs:
registry: ${{ steps.login-ecr.outputs.registry }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate tags
id: meta
run: |
ECR_REGISTRY="${{ steps.login-ecr.outputs.registry }}"
ECR_REPO="${{ secrets[matrix.ecr_repo_secret] }}"
GHCR_IMAGE="${{ matrix.ghcr_image }}"
# ECR tags (always build for ECR)
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
ECR_TAG="latest"
else
ECR_TAG="staging"
fi
ECR_IMAGE="${ECR_REGISTRY}/${ECR_REPO}:${ECR_TAG}"
# Build tags list
TAGS="${ECR_IMAGE}"
# Add GHCR tags only for main branch
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
GHCR_AMD64="${GHCR_IMAGE}:latest-amd64"
GHCR_SHA="${GHCR_IMAGE}:${{ github.sha }}-amd64"
TAGS="${TAGS},$GHCR_AMD64,$GHCR_SHA"
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push images
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
build-ghcr-arm64:
name: Build ARM64 (GHCR Only)
runs-on: linux-arm64-8-core
if: github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate ARM64 tags
id: meta
run: |
IMAGE="${{ matrix.image }}"
echo "tags=${IMAGE}:latest-arm64,${IMAGE}:${{ github.sha }}-arm64" >> $GITHUB_OUTPUT
- name: Build and push ARM64 to GHCR
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
create-ghcr-manifests:
name: Create GHCR Manifests
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: [build-amd64, build-ghcr-arm64]
if: github.ref == 'refs/heads/main'
strategy:
matrix:
include:
- image: ghcr.io/simstudioai/simstudio
- image: ghcr.io/simstudioai/migrations
- image: ghcr.io/simstudioai/realtime
steps:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifests
run: |
IMAGE_BASE="${{ matrix.image }}"
# Create latest manifest
docker manifest create "${IMAGE_BASE}:latest" \
"${IMAGE_BASE}:latest-amd64" \
"${IMAGE_BASE}:latest-arm64"
docker manifest push "${IMAGE_BASE}:latest"
# Create SHA manifest
docker manifest create "${IMAGE_BASE}:${{ github.sha }}" \
"${IMAGE_BASE}:${{ github.sha }}-amd64" \
"${IMAGE_BASE}:${{ github.sha }}-arm64"
docker manifest push "${IMAGE_BASE}:${{ github.sha }}"

28
.github/workflows/migrations.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Database Migrations
on:
workflow_call:
workflow_dispatch:
jobs:
migrate:
name: Apply Database Migrations
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.22
- name: Install dependencies
run: bun install
- name: Apply migrations
working-directory: ./packages/db
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
run: bunx drizzle-kit migrate --config=./drizzle.config.ts

View File

@@ -8,7 +8,7 @@ on:
jobs:
publish-npm:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -16,7 +16,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.2.22
- name: Setup Node.js for npm publishing
uses: actions/setup-node@v4

View File

@@ -8,7 +8,7 @@ on:
jobs:
publish-pypi:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -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

@@ -8,7 +8,7 @@ on:
jobs:
publish-npm:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -16,16 +16,15 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.2.22
- 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: Install dependencies
working-directory: packages/ts-sdk
run: bun install
- name: Run tests
@@ -80,6 +79,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

57
.github/workflows/test-build.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: Test and Build
on:
workflow_call:
workflow_dispatch:
jobs:
test-build:
name: Test and Build
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.22
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- 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'
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run test
- name: Build application
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
RESEND_API_KEY: 'dummy_key_for_ci_only'
AWS_REGION: 'us-west-2'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
directory: ./apps/sim/coverage
fail_ci_if_error: false
verbose: true

44
.github/workflows/trigger-deploy.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
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: 1.2.22
- 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

8
.gitignore vendored
View File

@@ -46,7 +46,7 @@ sim-standalone.tar.gz
next-env.d.ts
# cursorrules
.cursorrules
# .cursorrules
# docs
/apps/docs/.source
@@ -65,4 +65,8 @@ start-collector.sh
.turbo
# VSCode
.vscode
.vscode
## Helm Chart Tests
helm/sim/test
i18n.cache

View File

@@ -1 +1 @@
bun lint
bunx lint-staged

2
NOTICE
View File

@@ -1,4 +1,4 @@
Sim Studio
Copyright 2025 Sim Studio
This product includes software developed for the Sim Studio project.
This product includes software developed for the Sim project.

164
README.md
View File

@@ -1,50 +1,46 @@
<p align="center">
<img src="apps/sim/public/static/sim.png" alt="Sim Studio Logo" width="500"/>
<a href="https://sim.ai" target="_blank" rel="noopener noreferrer">
<img src="apps/sim/public/logo/reverse/text/large.png" alt="Sim Logo" width="500"/>
</a>
</p>
<p align="center">Build and deploy AI agent workflows in minutes.</p>
<p align="center">
<a href="https://sim.ai" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/sim.ai-6F3DFA" alt="Sim.ai"></a>
<a href="https://discord.gg/Hr4UWYEcTT" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Discord-Join%20Server-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
<a href="https://x.com/simdotai" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/twitter/follow/simstudioai?style=social" alt="Twitter"></a>
<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>
<p align="center">
<a href="https://www.apache.org/licenses/LICENSE-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache-2.0"></a>
<a href="https://discord.gg/Hr4UWYEcTT"><img src="https://img.shields.io/badge/Discord-Join%20Server-7289DA?logo=discord&logoColor=white" alt="Discord"></a>
<a href="https://x.com/simstudioai"><img src="https://img.shields.io/twitter/follow/simstudioai?style=social" alt="Twitter"></a>
<a href="https://github.com/simstudioai/sim/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome"></a>
<a href="https://docs.simstudio.ai"><img src="https://img.shields.io/badge/Docs-visit%20documentation-blue.svg" alt="Documentation"></a>
<img src="apps/sim/public/static/demo.gif" alt="Sim Demo" width="800"/>
</p>
<p align="center">
<strong>Sim Studio</strong> is a lightweight, user-friendly platform for building AI agent workflows.
</p>
## Quickstart
<p align="center">
<img src="apps/sim/public/static/demo.gif" alt="Sim Studio Demo" width="800"/>
</p>
### Cloud-hosted: [sim.ai](https://sim.ai)
## Getting Started
<a href="https://sim.ai" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/sim.ai-6F3DFA?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iNjE2IiBoZWlnaHQ9IjYxNiIgdmlld0JveD0iMCAwIDYxNiA2MTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTU5XzMxMykiPgo8cGF0aCBkPSJNNjE2IDBIMFY2MTZINjE2VjBaIiBmaWxsPSIjNkYzREZBIi8+CjxwYXRoIGQ9Ik04MyAzNjUuNTY3SDExM0MxMTMgMzczLjgwNSAxMTYgMzgwLjM3MyAxMjIgMzg1LjI3MkMxMjggMzg5Ljk0OCAxMzYuMTExIDM5Mi4yODUgMTQ2LjMzMyAzOTIuMjg1QzE1Ny40NDQgMzkyLjI4NSAxNjYgMzkwLjE3MSAxNzIgMzg1LjkzOUMxNzcuOTk5IDM4MS40ODcgMTgxIDM3NS41ODYgMTgxIDM2OC4yMzlDMTgxIDM2Mi44OTUgMTc5LjMzMyAzNTguNDQyIDE3NiAzNTQuODhDMTcyLjg4OSAzNTEuMzE4IDE2Ny4xMTEgMzQ4LjQyMiAxNTguNjY3IDM0Ni4xOTZMMTMwIDMzOS41MTdDMTE1LjU1NSAzMzUuOTU1IDEwNC43NzggMzMwLjQ5OSA5Ny42NjY1IDMyMy4xNTFDOTAuNzc3NSAzMTUuODA0IDg3LjMzMzQgMzA2LjExOSA4Ny4zMzM0IDI5NC4wOTZDODcuMzMzNCAyODQuMDc2IDg5Ljg4OSAyNzUuMzkyIDk0Ljk5OTYgMjY4LjA0NUMxMDAuMzMzIDI2MC42OTcgMTA3LjU1NSAyNTUuMDIgMTE2LjY2NiAyNTEuMDEyQzEyNiAyNDcuMDA0IDEzNi42NjcgMjQ1IDE0OC42NjYgMjQ1QzE2MC42NjcgMjQ1IDE3MSAyNDcuMTE2IDE3OS42NjcgMjUxLjM0NkMxODguNTU1IDI1NS41NzYgMTk1LjQ0NCAyNjEuNDc3IDIwMC4zMzMgMjY5LjA0N0MyMDUuNDQ0IDI3Ni42MTcgMjA4LjExMSAyODUuNjM0IDIwOC4zMzMgMjk2LjA5OUgxNzguMzMzQzE3OC4xMTEgMjg3LjYzOCAxNzUuMzMzIDI4MS4wNyAxNjkuOTk5IDI3Ni4zOTRDMTY0LjY2NiAyNzEuNzE5IDE1Ny4yMjIgMjY5LjM4MSAxNDcuNjY3IDI2OS4zODFDMTM3Ljg4OSAyNjkuMzgxIDEzMC4zMzMgMjcxLjQ5NiAxMjUgMjc1LjcyNkMxMTkuNjY2IDI3OS45NTcgMTE3IDI4NS43NDYgMTE3IDI5My4wOTNDMTE3IDMwNC4wMDMgMTI1IDMxMS40NjIgMTQxIDMxNS40N0wxNjkuNjY3IDMyMi40ODNDMTgzLjQ0NSAzMjUuNiAxOTMuNzc4IDMzMC43MjIgMjAwLjY2NyAzMzcuODQ3QzIwNy41NTUgMzQ0Ljc0OSAyMTEgMzU0LjIxMiAyMTEgMzY2LjIzNUMyMTEgMzc2LjQ3NyAyMDguMjIyIDM4NS40OTQgMjAyLjY2NiAzOTMuMjg3QzE5Ny4xMTEgNDAwLjg1NyAxODkuNDQ0IDQwNi43NTggMTc5LjY2NyA0MTAuOTg5QzE3MC4xMTEgNDE0Ljk5NiAxNTguNzc4IDQxNyAxNDUuNjY3IDQxN0MxMjYuNTU1IDQxNyAxMTEuMzMzIDQxMi4zMjUgOTkuOTk5NyA0MDIuOTczQzg4LjY2NjggMzkzLjYyMSA4MyAzODEuMTUzIDgzIDM2NS41NjdaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjMyLjI5MSA0MTNWMjUwLjA4MkMyNDQuNjg0IDI1NC42MTQgMjUwLjE0OCAyNTQuNjE0IDI2My4zNzEgMjUwLjA4MlY0MTNIMjMyLjI5MVpNMjQ3LjUgMjM5LjMxM0MyNDEuOTkgMjM5LjMxMyAyMzcuMTQgMjM3LjMxMyAyMzIuOTUyIDIzMy4zMTZDMjI4Ljk4NCAyMjkuMDk1IDIyNyAyMjQuMjA5IDIyNyAyMTguNjU2QzIyNyAyMTIuODgyIDIyOC45ODQgMjA3Ljk5NSAyMzIuOTUyIDIwMy45OTdDMjM3LjE0IDE5OS45OTkgMjQxLjk5IDE5OCAyNDcuNSAxOThDMjUzLjIzMSAxOTggMjU4LjA4IDE5OS45OTkgMjYyLjA0OSAyMDMuOTk3QzI2Ni4wMTYgMjA3Ljk5NSAyNjggMjEyLjg4MiAyNjggMjE4LjY1NkMyNjggMjI0LjIwOSAyNjYuMDE2IDIyOS4wOTUgMjYyLjA0OSAyMzMuMzE2QzI1OC4wOCAyMzcuMzEzIDI1My4yMzEgMjM5LjMxMyAyNDcuNSAyMzkuMzEzWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTMxOS4zMzMgNDEzSDI4OFYyNDkuNjc2SDMxNlYyNzcuMjMzQzMxOS4zMzMgMjY4LjEwNCAzMjUuNzc4IDI2MC4zNjQgMzM0LjY2NyAyNTQuMzUyQzM0My43NzggMjQ4LjExNyAzNTQuNzc4IDI0NSAzNjcuNjY3IDI0NUMzODIuMTExIDI0NSAzOTQuMTEyIDI0OC44OTcgNDAzLjY2NyAyNTYuNjlDNDEzLjIyMiAyNjQuNDg0IDQxOS40NDQgMjc0LjgzNyA0MjIuMzM0IDI4Ny43NTJINDE2LjY2N0M0MTguODg5IDI3NC44MzcgNDI1IDI2NC40ODQgNDM1IDI1Ni42OUM0NDUgMjQ4Ljg5NyA0NTcuMzM0IDI0NSA0NzIgMjQ1QzQ5MC42NjYgMjQ1IDUwNS4zMzQgMjUwLjQ1NSA1MTYgMjYxLjM2NkM1MjYuNjY3IDI3Mi4yNzYgNTMyIDI4Ny4xOTUgNTMyIDMwNi4xMjFWNDEzSDUwMS4zMzNWMzEzLjgwNEM1MDEuMzMzIDMwMC44ODkgNDk4IDI5MC45ODEgNDkxLjMzMyAyODQuMDc4QzQ4NC44ODkgMjc2Ljk1MiA0NzYuMTExIDI3My4zOSA0NjUgMjczLjM5QzQ1Ny4yMjIgMjczLjM5IDQ1MC4zMzMgMjc1LjE3MSA0NDQuMzM0IDI3OC43MzRDNDM4LjU1NiAyODIuMDc0IDQzNCAyODYuOTcyIDQzMC42NjcgMjkzLjQzQzQyNy4zMzMgMjk5Ljg4NyA0MjUuNjY3IDMwNy40NTcgNDI1LjY2NyAzMTYuMTQxVjQxM0gzOTQuNjY3VjMxMy40NjlDMzk0LjY2NyAzMDAuNTU1IDM5MS40NDUgMjkwLjc1OCAzODUgMjg0LjA3OEMzNzguNTU2IDI3Ny4xNzUgMzY5Ljc3OCAyNzMuNzI0IDM1OC42NjcgMjczLjcyNEMzNTAuODg5IDI3My43MjQgMzQ0IDI3NS41MDUgMzM4IDI3OS4wNjhDMzMyLjIyMiAyODIuNDA4IDMyNy42NjcgMjg3LjMwNyAzMjQuMzMzIDI5My43NjNDMzIxIDI5OS45OTggMzE5LjMzMyAzMDcuNDU3IDMxOS4zMzMgMzE2LjE0MVY0MTNaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzExNTlfMzEzIj4KPHJlY3Qgd2lkdGg9IjYxNiIgaGVpZ2h0PSI2MTYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==&logoColor=white" alt="Sim.ai"></a>
1. Use our [cloud-hosted version](https://simstudio.ai)
2. Self-host using one of the methods below
## Self-Hosting Options
### Option 1: NPM Package (Simplest)
The easiest way to run Sim Studio locally is using our [NPM package](https://www.npmjs.com/package/simstudio?activeTab=readme):
### Self-hosted: NPM Package
```bash
npx simstudio
```
→ http://localhost:3000
After running these commands, open [http://localhost:3000/](http://localhost:3000/) in your browser.
#### Note
Docker must be installed and running on your machine.
#### Options
- `-p, --port <port>`: Specify the port to run Sim Studio on (default: 3000)
- `--no-pull`: Skip pulling the latest Docker images
| Flag | Description |
|------|-------------|
| `-p, --port <port>` | Port to run Sim on (default `3000`) |
| `--no-pull` | Skip pulling latest Docker images |
#### Requirements
- Docker must be installed and running on your machine
### Option 2: Docker Compose
### Self-hosted: Docker Compose
```bash
# Clone the repository
@@ -53,42 +49,43 @@ git clone https://github.com/simstudioai/sim.git
# Navigate to the project directory
cd sim
# Start Sim Studio
# Start Sim
docker compose -f docker-compose.prod.yml up -d
```
Access the application at [http://localhost:3000/](http://localhost:3000/)
#### Using Local Models
#### Using Local Models with Ollama
To use local models with Sim Studio:
1. Pull models using our helper script:
Run Sim with local AI models using [Ollama](https://ollama.ai) - no external APIs required:
```bash
./apps/sim/scripts/ollama_docker.sh pull <model_name>
# Start with GPU support (automatically downloads gemma3:4b model)
docker compose -f docker-compose.ollama.yml --profile setup up -d
# For CPU-only systems:
docker compose -f docker-compose.ollama.yml --profile cpu --profile setup up -d
```
2. Start Sim Studio with local model support:
Wait for the model to download, then visit [http://localhost:3000](http://localhost:3000). Add more models with:
```bash
# With NVIDIA GPU support
docker compose --profile local-gpu -f docker-compose.ollama.yml up -d
# Without GPU (CPU only)
docker compose --profile local-cpu -f docker-compose.ollama.yml up -d
# If hosting on a server, update the environment variables in the docker-compose.prod.yml file to include the server's public IP then start again (OLLAMA_URL to i.e. http://1.1.1.1:11434)
docker compose -f docker-compose.prod.yml up -d
docker compose -f docker-compose.ollama.yml exec ollama ollama pull llama3.1:8b
```
### Option 3: Dev Containers
### Self-hosted: Dev Containers
1. Open VS Code with the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
2. Open the project and click "Reopen in Container" when prompted
3. Run `bun run dev:full` in the terminal or use the `sim-start` alias
- This starts both the main application and the realtime socket server
### Option 4: Manual Setup
### Self-hosted: Manual Setup
**Requirements:**
- [Bun](https://bun.sh/) runtime
- 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.
1. Clone and install dependencies:
@@ -98,39 +95,84 @@ cd sim
bun install
```
2. Set up environment:
2. Set up PostgreSQL with pgvector:
You need PostgreSQL with the `vector` extension for embedding support. Choose one option:
**Option A: Using Docker (Recommended)**
```bash
# Start PostgreSQL with pgvector extension
docker run --name simstudio-db \
-e POSTGRES_PASSWORD=your_password \
-e POSTGRES_DB=simstudio \
-p 5432:5432 -d \
pgvector/pgvector:pg17
```
**Option B: Manual Installation**
- Install PostgreSQL 12+ and the pgvector extension
- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation)
3. Set up environment:
```bash
cd apps/sim
cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
```
3. Set up the database:
Update your `.env` file with the database URL:
```bash
bunx drizzle-kit push
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
```
4. Start the development servers:
Next.js app:
4. Set up the database:
First, configure the database package environment:
```bash
bun run dev
cd packages/db
cp .env.example .env
```
Start the realtime server:
Update your `packages/db/.env` file with the database URL:
```bash
bun run dev:sockets
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
```
Run both together (recommended):
Then run the migrations:
```bash
bunx drizzle-kit migrate --config=./drizzle.config.ts
```
5. Start the development servers:
**Recommended approach - run both servers together (from project root):**
```bash
bun run dev:full
```
This starts both the main Next.js application and the realtime socket server required for full functionality.
**Alternative - run servers separately:**
Next.js app (from project root):
```bash
bun run dev
```
Realtime socket server (from `apps/sim` directory in a separate terminal):
```bash
cd apps/sim
bun run dev:sockets
```
## Copilot API Keys
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
## Tech Stack
- **Framework**: [Next.js](https://nextjs.org/) (App Router)
@@ -143,6 +185,8 @@ bun run dev:full
- **Docs**: [Fumadocs](https://fumadocs.vercel.app/)
- **Monorepo**: [Turborepo](https://turborepo.org/)
- **Realtime**: [Socket.io](https://socket.io/)
- **Background Jobs**: [Trigger.dev](https://trigger.dev/)
- **Remote Code Execution**: [E2B](https://www.e2b.dev/)
## Contributing
@@ -152,4 +196,4 @@ We welcome contributions! Please see our [Contributing Guide](.github/CONTRIBUTI
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
<p align="center">Made with ❤️ by the Sim Studio Team</p>
<p align="center">Made with ❤️ by the Sim Team</p>

View File

@@ -1,5 +0,0 @@
import type { ReactNode } from 'react'
export default function SlugLayout({ children }: { children: ReactNode }) {
return children
}

View File

@@ -1,58 +0,0 @@
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
import { notFound } from 'next/navigation'
import mdxComponents from '@/components/mdx-components'
import { source } from '@/lib/source'
export const dynamic = 'force-dynamic'
export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = source.getPage(params.slug)
if (!page) notFound()
const MDX = page.data.body
return (
<DocsPage
toc={page.data.toc}
full={page.data.full}
tableOfContent={{
style: 'clerk',
enabled: true,
header: <div className='mb-2 font-medium text-sm'>On this page</div>,
single: false,
}}
article={{
className: 'scroll-smooth max-sm:pb-16',
}}
tableOfContentPopover={{
style: 'clerk',
enabled: true,
}}
footer={{
enabled: false,
}}
>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
<MDX components={mdxComponents} />
</DocsBody>
</DocsPage>
)
}
export async function generateStaticParams() {
return source.generateParams()
}
export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = source.getPage(params.slug)
if (!page) notFound()
return {
title: page.data.title,
description: page.data.description,
}
}

View File

@@ -1,46 +0,0 @@
import type { ReactNode } from 'react'
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
import { ExternalLink, GithubIcon } from 'lucide-react'
import Link from 'next/link'
import { source } from '@/lib/source'
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>
)
export default function Layout({ children }: { children: ReactNode }) {
return (
<>
<DocsLayout
tree={source.pageTree}
nav={{
title: <div className='flex items-center font-medium'>Sim Studio</div>,
}}
links={[
{
text: 'Visit Sim Studio',
url: 'https://simstudio.ai',
icon: <ExternalLink className='h-4 w-4' />,
},
]}
sidebar={{
defaultOpenLevel: 1,
collapsible: true,
footer: null,
}}
>
{children}
</DocsLayout>
<GitHubLink />
</>
)
}

View File

@@ -0,0 +1,303 @@
import { findNeighbour } from 'fumadocs-core/server'
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 { StructuredData } from '@/components/structured-data'
import { CodeBlock } from '@/components/ui/code-block'
import { CopyPageButton } from '@/components/ui/copy-page-button'
import { 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 baseUrl = 'https://docs.sim.ai'
const pageTreeRecord = source.pageTree as Record<string, any>
const pageTree =
pageTreeRecord[params.lang] ?? pageTreeRecord.en ?? Object.values(pageTreeRecord)[0]
const neighbours = pageTree ? findNeighbour(pageTree, page.url) : null
const generateBreadcrumbs = () => {
const breadcrumbs: Array<{ name: string; url: string }> = [
{
name: 'Home',
url: baseUrl,
},
]
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: page.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='https://x.com/simdotai'
target='_blank'
rel='noopener noreferrer'
aria-label='X (Twitter)'
>
<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>
<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 || ''}
url={`${baseUrl}${page.url}`}
lang={params.lang}
breadcrumb={breadcrumbs}
/>
<DocsPage
toc={page.data.toc}
full={page.data.full}
breadcrumb={{
enabled: false,
}}
tableOfContent={{
style: 'clerk',
enabled: true,
header: <div 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,
}}
footer={{
enabled: true,
component: <CustomFooter />,
}}
>
<div className='relative'>
<div className='absolute top-1 right-0 flex items-center gap-2'>
<CopyPageButton
content={`# ${page.data.title}
${page.data.description || ''}
${page.data.content || ''}`}
/>
<PageNavigationArrows previous={neighbours?.previous} next={neighbours?.next} />
</div>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
</div>
<DocsBody>
<MDX
components={{
...defaultMdxComponents,
CodeBlock,
}}
/>
</DocsBody>
</DocsPage>
</>
)
}
export async function generateStaticParams() {
return source.generateParams()
}
export async function generateMetadata(props: {
params: Promise<{ slug?: string[]; lang: string }>
}) {
const params = await props.params
const page = source.getPage(params.slug, params.lang)
if (!page) notFound()
const baseUrl = 'https://docs.sim.ai'
const fullUrl = `${baseUrl}${page.url}`
return {
title: page.data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
keywords: [
'AI workflow builder',
'visual workflow editor',
'AI automation',
'workflow automation',
'AI agents',
'no-code AI',
'drag and drop workflows',
page.data.title?.toLowerCase().split(' '),
]
.flat()
.filter(Boolean),
authors: [{ name: 'Sim Team' }],
category: 'Developer Tools',
openGraph: {
title: page.data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
url: fullUrl,
siteName: 'Sim Documentation',
type: 'article',
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()}`)),
},
twitter: {
card: 'summary',
title: page.data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-video-preview': -1,
'max-image-preview': 'large',
'max-snippet': -1,
},
},
canonical: fullUrl,
alternates: {
canonical: fullUrl,
languages: {
'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

@@ -0,0 +1,140 @@
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 { Geist_Mono, Inter } from 'next/font/google'
import Image from 'next/image'
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, {
translations: {
en: {
displayName: 'English',
},
es: {
displayName: 'Español',
},
fr: {
displayName: 'Français',
},
de: {
displayName: 'Deutsch',
},
ja: {
displayName: '日本語',
},
zh: {
displayName: '简体中文',
},
},
})
type LayoutProps = {
children: ReactNode
params: Promise<{ lang: string }>
}
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.variable} ${geistMono.variable}`}
suppressHydrationWarning
>
<head>
<script
type='application/ld+json'
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
/>
</head>
<body className='flex min-h-screen flex-col font-sans'>
<RootProvider i18n={provider(lang)}>
<Navbar />
<DocsLayout
tree={source.pageTree[lang]}
themeSwitch={{
enabled: false,
}}
nav={{
title: (
<Image
src='/static/logo.png'
alt='Sim'
width={72}
height={28}
className='h-7 w-auto'
priority
/>
),
}}
sidebar={{
defaultOpenLevel: 0,
collapsible: false,
footer: null,
banner: null,
components: {
Item: SidebarItem,
Folder: SidebarFolder,
Separator: SidebarSeparator,
},
}}
containerProps={{
className: '!pt-10',
}}
>
{children}
</DocsLayout>
<Analytics />
</RootProvider>
</body>
</html>
)
}

View File

@@ -1,4 +1,16 @@
import { createFromSource } from 'fumadocs-core/search/server'
import { source } from '@/lib/source'
export const { GET } = createFromSource(source)
export const revalidate = 3600 // Revalidate every hour
export const { GET } = createFromSource(source, {
localeMap: {
en: { language: 'english' },
es: { language: 'spanish' },
fr: { language: 'french' },
de: { language: 'german' },
// ja and zh are not supported by the stemmer library, so we'll skip language config for them
ja: {},
zh: {},
},
})

View File

@@ -1,8 +1,473 @@
@import "tailwindcss";
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
:root {
@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 */
* {
--fd-border-sidebar: transparent !important;
}
/* Override any CSS custom properties for borders */
: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;
}
/* 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;
}
: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;
}
:root:not(.dark) nav button[type="button"] kbd {
color: rgba(0, 0, 0, 0.6) !important;
}
/* 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;
}
/* ============================================
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;
}
/* Responsive sidebar positioning */
/* Mobile: Fumadocs handles drawer */
@media (min-width: 768px) and (max-width: 1024px) {
aside[data-sidebar],
aside#nd-sidebar {
left: var(--sidebar-offset) !important;
}
}
/* Desktop layout alignment */
@media (min-width: 1025px) {
[data-sidebar-container] {
margin-left: var(--sidebar-offset) !important;
}
aside[data-sidebar],
aside#nd-sidebar {
left: var(--sidebar-offset) !important;
}
/* TOC positioning - target all possible selectors */
[data-toc],
aside[data-toc],
div[data-toc],
.fd-toc,
#nd-toc,
nav[data-toc],
aside:has([role="complementary"]) {
right: var(--toc-offset) !important;
}
/* Alternative TOC container targeting */
[data-docs-page] > aside:last-child,
main ~ aside {
right: var(--toc-offset) !important;
}
}
/* Sidebar spacing - compact like turborepo */
[data-sidebar-viewport] {
padding: 0.5rem 20px 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 */
#nd-sidebar a,
#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 */
.dark #nd-sidebar a,
.dark #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*="xpand"]) {
color: rgba(255, 255, 255, 0.6) !important;
}
/* Light mode sidebar text */
:root:not(.dark) #nd-sidebar a,
:root: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 */
[data-sidebar-viewport] [data-separator] {
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 */
.dark #nd-sidebar a[data-active="true"],
.dark #nd-sidebar button[data-active="true"],
.dark #nd-sidebar a.bg-fd-primary\/10,
.dark #nd-sidebar a.text-fd-primary,
.dark #nd-sidebar a[class*="bg-fd-primary"],
.dark #nd-sidebar a[class*="text-fd-primary"],
.dark #nd-sidebar a.bg-purple-50\/80,
.dark #nd-sidebar a.text-purple-600,
.dark #nd-sidebar a[class*="bg-purple"],
.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 */
:root:not(.dark) #nd-sidebar a[data-active="true"],
:root:not(.dark) #nd-sidebar button[data-active="true"],
:root:not(.dark) #nd-sidebar a.bg-fd-primary\/10,
:root:not(.dark) #nd-sidebar a.text-fd-primary,
:root:not(.dark) #nd-sidebar a[class*="bg-fd-primary"],
:root:not(.dark) #nd-sidebar a[class*="text-fd-primary"],
:root:not(.dark) #nd-sidebar a.bg-purple-50\/80,
:root:not(.dark) #nd-sidebar a.text-purple-600,
:root:not(.dark) #nd-sidebar a[class*="bg-purple"],
:root: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 */
.dark #nd-sidebar a:hover:not([data-active="true"]),
.dark #nd-sidebar button:hover:not([data-active="true"]) {
background-color: rgba(255, 255, 255, 0.08) !important;
}
/* Light mode hover state */
:root:not(.dark) #nd-sidebar a:hover:not([data-active="true"]),
:root: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 */
.dark #nd-sidebar a.bg-purple-50\/80:hover,
.dark #nd-sidebar a[class*="bg-purple"]:hover,
.dark #nd-sidebar a[data-active="true"]:hover,
.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 */
:root:not(.dark) #nd-sidebar a.bg-purple-50\/80:hover,
:root:not(.dark) #nd-sidebar a[class*="bg-purple"]:hover,
:root:not(.dark) #nd-sidebar a[data-active="true"]:hover,
:root: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"] {
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;
width: fit-content;
min-width: 100%;
}
/* Syntax highlighting adjustments for better readability */
pre code .line {
padding-left: 0;
padding-right: 0;
}
/* Custom text highlighting styles */
@@ -15,4 +480,65 @@
color: var(--color-fd-primary);
}
/* 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 */
main[data-main] {
max-width: var(--spacing-fd-container, 1400px);
margin-left: auto;
margin-right: auto;
padding-top: 1rem;
padding-left: calc(var(--sidebar-offset) + var(--content-gap));
padding-right: calc(var(--toc-offset) + 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;
border-style: solid !important;
}
/* Tailwind v4 content sources */
@source '../app/**/*.{js,ts,jsx,tsx,mdx}';
@source '../components/**/*.{js,ts,jsx,tsx,mdx}';
@source '../content/**/*.{js,ts,jsx,tsx,mdx}';
@source '../mdx-components.tsx';
@source '../node_modules/fumadocs-ui/dist/**/*.js';

View File

@@ -1,30 +1,38 @@
import type { ReactNode } from 'react'
import { RootProvider } from 'fumadocs-ui/provider'
import { Inter } from 'next/font/google'
import './global.css'
import { Analytics } from '@vercel/analytics/next'
const inter = Inter({
subsets: ['latin'],
})
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang='en' className={inter.className} suppressHydrationWarning>
<body className='flex min-h-screen flex-col'>
<RootProvider>
{children}
<Analytics />
</RootProvider>
</body>
</html>
)
export default function RootLayout({ children }: { children: ReactNode }) {
return children
}
export const metadata = {
title: 'Sim Studio',
metadataBase: new URL('https://docs.sim.ai'),
title: {
default: 'Sim Documentation - Visual Workflow Builder for AI Applications',
template: '%s',
},
description:
'Build agents in seconds with a drag and drop workflow builder. Access comprehensive documentation to help you create efficient workflows and maximize your automation capabilities.',
'Comprehensive documentation for Sim - the visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines by connecting blocks on a canvas—no coding required.',
keywords: [
'AI workflow builder',
'visual workflow editor',
'AI automation',
'workflow automation',
'AI agents',
'no-code AI',
'drag and drop workflows',
'AI integrations',
'workflow canvas',
'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',
icons: {
icon: [
@@ -37,6 +45,48 @@ export const metadata = {
appleWebApp: {
capable: true,
statusBarStyle: 'default',
title: 'Sim Studio Docs',
title: 'Sim Docs',
},
openGraph: {
type: 'website',
locale: 'en_US',
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.',
},
twitter: {
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: '@simdotai',
site: '@simdotai',
images: ['/og-image.png'],
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-video-preview': -1,
'max-image-preview': 'large',
'max-snippet': -1,
},
},
alternates: {
canonical: 'https://docs.sim.ai',
languages: {
'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,12 +1,87 @@
import { getLLMText } from '@/lib/llms'
import { source } from '@/lib/source'
// cached forever
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

@@ -0,0 +1,100 @@
export const revalidate = false
export async function GET() {
const baseUrl = 'https://docs.sim.ai'
const robotsTxt = `# Robots.txt for Sim Documentation
# Generated on ${new Date().toISOString()}
User-agent: *
Allow: /
# Search engine crawlers
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
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: /
User-agent: ChatGPT-User
Allow: /
User-agent: CCBot
Allow: /
User-agent: anthropic-ai
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/
Disallow: /_next/static/
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:
# 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: {
'Content-Type': 'text/plain',
},
})
}

View File

@@ -0,0 +1,63 @@
import { i18n } from '@/lib/i18n'
import { source } from '@/lib/source'
export const revalidate = false
export async function GET() {
const baseUrl = 'https://docs.sim.ai'
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}\//, '/')
return i18n.languages.map((lang) => {
const url =
lang === i18n.defaultLanguage
? `${baseUrl}${urlWithoutLang}`
: `${baseUrl}/${lang}${urlWithoutLang}`
return ` <url>
<loc>${url}</loc>
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
<changefreq>weekly</changefreq>
<priority>${getPriority(urlWithoutLang)}</priority>
${i18n.languages.length > 1 ? generateAlternateLinks(baseUrl, urlWithoutLang) : ''}
</url>`
})
})
.join('\n')
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
${urls}
</urlset>`
return new Response(sitemap, {
headers: {
'Content-Type': 'application/xml',
'Cache-Control': 'public, max-age=3600, s-maxage=3600',
},
})
}
function generateAlternateLinks(baseUrl: string, urlWithoutLang: string): string {
return i18n.languages
.map((lang) => {
const url =
lang === i18n.defaultLanguage
? `${baseUrl}${urlWithoutLang}`
: `${baseUrl}/${lang}${urlWithoutLang}`
return ` <xhtml:link rel="alternate" hreflang="${lang}" href="${url}" />`
})
.join('\n')
}

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,138 @@
'use client'
import { type ReactNode, useEffect, useState } from 'react'
import type { PageTree } from 'fumadocs-core/server'
import { ChevronRight } from 'lucide-react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { cn } from '@/lib/utils'
function isActive(url: string, pathname: string, nested = true): boolean {
return url === pathname || (nested && pathname.startsWith(`${url}/`))
}
export function SidebarItem({ item }: { item: PageTree.Item }) {
const pathname = usePathname()
const active = isActive(item.url, pathname, false)
return (
<li className='mb-[0.0625rem] list-none'>
<Link
href={item.url}
className={cn(
'block rounded-md px-2.5 py-1.5 font-normal text-[13px] leading-tight transition-colors',
'text-gray-600 dark:text-gray-400',
!active && 'hover:bg-gray-100/60 dark:hover:bg-gray-800/40',
active &&
'bg-purple-50/80 font-medium text-purple-600 dark:bg-purple-900/15 dark:text-purple-400'
)}
>
{item.name}
</Link>
</li>
)
}
export function SidebarFolder({
item,
level,
children,
}: {
item: PageTree.Folder
level: number
children: ReactNode
}) {
const pathname = usePathname()
const hasActiveChild = checkHasActiveChild(item, pathname)
const [open, setOpen] = useState(hasActiveChild)
useEffect(() => {
setOpen(hasActiveChild)
}, [hasActiveChild])
return (
<li className='mb-[0.0625rem] list-none'>
{item.index ? (
<div className='flex items-center gap-0.5'>
<Link
href={item.index.url}
className={cn(
'block flex-1 rounded-md px-2.5 py-1.5 font-medium text-[13px] leading-tight transition-colors',
'text-gray-800 dark:text-gray-200',
!isActive(item.index.url, pathname, false) &&
'hover:bg-gray-100/60 dark:hover:bg-gray-800/40',
isActive(item.index.url, pathname, false) &&
'bg-purple-50/80 text-purple-600 dark:bg-purple-900/15 dark:text-purple-400'
)}
>
{item.name}
</Link>
<button
onClick={() => setOpen(!open)}
className='rounded p-1 transition-colors hover:bg-gray-100/60 dark:hover:bg-gray-800/40'
aria-label={open ? 'Collapse' : 'Expand'}
>
<ChevronRight
className={cn(
'h-3 w-3 text-gray-400 transition-transform duration-200 ease-in-out dark:text-gray-500',
open && 'rotate-90'
)}
/>
</button>
</div>
) : (
<button
onClick={() => setOpen(!open)}
className={cn(
'flex w-full items-center justify-between rounded-md px-2.5 py-1.5 text-left font-medium text-[13px] leading-tight transition-colors',
'hover:bg-gray-100/60 dark:hover:bg-gray-800/40',
'text-gray-800 dark:text-gray-200'
)}
>
<span>{item.name}</span>
<ChevronRight
className={cn(
'ml-auto h-3 w-3 flex-shrink-0 text-gray-400 transition-transform duration-200 ease-in-out dark:text-gray-500',
open && 'rotate-90'
)}
/>
</button>
)}
<div
className={cn(
'overflow-hidden transition-all duration-200 ease-in-out',
open ? 'max-h-[10000px] opacity-100' : 'max-h-0 opacity-0'
)}
>
<ul className='mt-0.5 ml-2 space-y-[0.0625rem] border-gray-200/60 border-l pl-2.5 dark:border-gray-700/60'>
{children}
</ul>
</div>
</li>
)
}
export function SidebarSeparator({ item }: { item: PageTree.Separator }) {
return (
<p className='mt-4 mb-1.5 px-2.5 font-semibold text-[10px] text-gray-500/80 uppercase tracking-wide dark:text-gray-500'>
{item.name}
</p>
)
}
function checkHasActiveChild(node: PageTree.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>
)
}

View File

@@ -270,3 +270,26 @@ export const ResponseIcon = (props: SVGProps<SVGSVGElement>) => (
<path d='m9 17-5-5 5-5' />
</svg>
)
export const StarterIcon = (props: SVGProps<SVGSVGElement>) => (
<svg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>
<path d='M8 5v14l11-7z' fill='currentColor' />
</svg>
)
export const LoopIcon = (props: SVGProps<SVGSVGElement>) => (
<svg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>
<path
d='M4 12a8 8 0 018-8V2.5L16 6l-4 3.5V8a6 6 0 00-6 6 6 6 0 006 6 6 6 0 006-6h2a8 8 0 01-8 8 8 8 0 01-8-8z'
fill='currentColor'
/>
</svg>
)
export const ParallelIcon = (props: SVGProps<SVGSVGElement>) => (
<svg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>
<rect x='3' y='3' width='18' height='6' rx='1' stroke='currentColor' strokeWidth='2' />
<rect x='3' y='15' width='18' height='6' rx='1' stroke='currentColor' strokeWidth='2' />
<path d='M12 9v6' stroke='currentColor' strokeWidth='2' strokeLinecap='round' />
</svg>
)

View File

@@ -1,10 +0,0 @@
import defaultMdxComponents from 'fumadocs-ui/mdx'
import { ThemeImage } from './ui/theme-image'
// Extend the default MDX components with our custom components
const mdxComponents = {
...defaultMdxComponents,
ThemeImage,
}
export default mdxComponents

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) + 20px)',
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,174 @@
import Script from 'next/script'
interface StructuredDataProps {
title: string
description: string
url: string
lang: string
dateModified?: string
breadcrumb?: Array<{ name: string; url: string }>
}
export function StructuredData({
title,
description,
url,
lang,
dateModified,
breadcrumb,
}: StructuredDataProps) {
const baseUrl = 'https://docs.sim.ai'
const articleStructuredData = {
'@context': 'https://schema.org',
'@type': 'TechArticle',
headline: title,
description: description,
url: url,
datePublished: dateModified || new Date().toISOString(),
dateModified: dateModified || new Date().toISOString(),
author: {
'@type': 'Organization',
name: 'Sim Team',
url: baseUrl,
},
publisher: {
'@type': 'Organization',
name: 'Sim',
url: baseUrl,
logo: {
'@type': 'ImageObject',
url: `${baseUrl}/static/logo.png`,
},
},
mainEntityOfPage: {
'@type': 'WebPage',
'@id': url,
},
inLanguage: lang,
isPartOf: {
'@type': 'WebSite',
name: 'Sim Documentation',
url: baseUrl,
},
potentialAction: {
'@type': 'ReadAction',
target: url,
},
}
const breadcrumbStructuredData = breadcrumb && {
'@context': 'https://schema.org',
'@type': 'BreadcrumbList',
itemListElement: breadcrumb.map((item, index) => ({
'@type': 'ListItem',
position: index + 1,
name: item.name,
item: item.url,
})),
}
const websiteStructuredData = url === baseUrl && {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'Sim Documentation',
url: baseUrl,
description:
'Comprehensive documentation for Sim visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines.',
publisher: {
'@type': 'Organization',
name: 'Sim',
url: baseUrl,
},
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: `${baseUrl}/search?q={search_term_string}`,
},
'query-input': 'required name=search_term_string',
},
inLanguage: ['en', 'es', 'fr', 'de', 'ja', 'zh'],
}
const faqStructuredData = title.toLowerCase().includes('faq') && {
'@context': 'https://schema.org',
'@type': 'FAQPage',
mainEntity: [],
}
const softwareStructuredData = {
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
name: 'Sim',
applicationCategory: 'DeveloperApplication',
operatingSystem: 'Any',
description:
'Visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines by connecting blocks on a canvas—no coding required.',
url: baseUrl,
author: {
'@type': 'Organization',
name: 'Sim Team',
},
offers: {
'@type': 'Offer',
category: 'Developer Tools',
},
featureList: [
'Visual workflow builder with drag-and-drop interface',
'AI agent creation and automation',
'80+ built-in integrations',
'Real-time team collaboration',
'Multiple deployment options',
'Custom integrations via MCP protocol',
],
}
return (
<>
<Script
id='article-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(articleStructuredData),
}}
/>
{breadcrumbStructuredData && (
<Script
id='breadcrumb-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(breadcrumbStructuredData),
}}
/>
)}
{websiteStructuredData && (
<Script
id='website-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(websiteStructuredData),
}}
/>
)}
{faqStructuredData && (
<Script
id='faq-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(faqStructuredData),
}}
/>
)}
{url === baseUrl && (
<Script
id='software-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(softwareStructuredData),
}}
/>
)}
</>
)
}

View File

@@ -1,163 +0,0 @@
import { cn } from '@/lib/utils'
import {
AgentIcon,
ApiIcon,
ChartBarIcon,
CodeIcon,
ConditionalIcon,
ConnectIcon,
ResponseIcon,
} from '../icons'
// Custom Feature component specifically for BlockTypes to handle the 6-item layout
const BlockFeature = ({
title,
description,
icon,
href,
index,
totalItems,
itemsPerRow,
}: {
title: string
description: string
icon: React.ReactNode
href?: string
index: number
totalItems: number
itemsPerRow: number
}) => {
const blockColor = {
'--block-color':
title === 'Agent'
? '#8b5cf6'
: title === 'API'
? '#3b82f6'
: title === 'Condition'
? '#f59e0b'
: title === 'Function'
? '#10b981'
: title === 'Router'
? '#6366f1'
: title === 'Evaluator'
? '#ef4444'
: '#8b5cf6',
} as React.CSSProperties
const content = (
<>
{index < itemsPerRow && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
{index >= itemsPerRow && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
<div
className='relative z-10 mb-4 px-10 text-neutral-500 transition-colors duration-200 group-hover/feature:text-[color:var(--block-color,#8b5cf6)] dark:text-neutral-400 dark:group-hover/feature:text-[color:var(--block-color,#a78bfa)]'
style={blockColor}
>
{icon}
</div>
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
<div
className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-[color:var(--block-color,#8b5cf6)] dark:bg-neutral-700'
style={blockColor}
/>
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
{title}
</span>
</div>
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
{description}
</p>
</>
)
const containerClasses = cn(
'flex flex-col lg:border-r py-5 relative group/feature dark:border-neutral-800',
(index === 0 || index === itemsPerRow) && 'lg:border-l dark:border-neutral-800',
index < itemsPerRow && 'lg:border-b dark:border-neutral-800',
href && 'cursor-pointer hover:bg-neutral-50 dark:hover:bg-neutral-900/50 transition-colors'
)
if (href) {
return (
<a href={href} className={containerClasses} style={{ textDecoration: 'none' }}>
{content}
</a>
)
}
return <div className={containerClasses}>{content}</div>
}
export function BlockTypes() {
const features = [
{
title: 'Agent',
description:
'Create powerful AI agents using any LLM provider with customizable system prompts and tool integrations.',
icon: <AgentIcon className='h-6 w-6' />,
href: '/blocks/agent',
},
{
title: 'API',
description:
'Connect to any external API with support for all standard HTTP methods and customizable request parameters.',
icon: <ApiIcon className='h-6 w-6' />,
href: '/blocks/api',
},
{
title: 'Condition',
description:
'Add a condition to the workflow to branch the execution path based on a boolean expression.',
icon: <ConditionalIcon className='h-6 w-6' />,
href: '/blocks/condition',
},
{
title: 'Function',
description:
'Execute custom JavaScript or TypeScript code within your workflow to transform data or implement complex logic.',
icon: <CodeIcon className='h-6 w-6' />,
href: '/blocks/function',
},
{
title: 'Router',
description:
'Intelligently direct workflow execution to different paths based on input analysis.',
icon: <ConnectIcon className='h-6 w-6' />,
href: '/blocks/router',
},
{
title: 'Evaluator',
description:
'Assess content using customizable evaluation metrics and scoring criteria across multiple dimensions.',
icon: <ChartBarIcon className='h-6 w-6' />,
href: '/blocks/evaluator',
},
{
title: 'Response',
description:
'Send a response back to the caller with customizable data, status, and headers.',
icon: <ResponseIcon className='h-6 w-6' />,
href: '/blocks/response',
},
]
const totalItems = features.length
const itemsPerRow = 3 // For large screens
return (
<div className='relative z-10 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-3'>
{features.map((feature, index) => (
<BlockFeature
key={feature.title}
{...feature}
index={index}
totalItems={totalItems}
itemsPerRow={itemsPerRow}
/>
))}
</div>
)
}

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(
'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,42 @@
'use client'
import { useState } from 'react'
import { Check, Copy } from 'lucide-react'
interface CopyPageButtonProps {
content: string
}
export function CopyPageButton({ content }: CopyPageButtonProps) {
const [copied, setCopied] = useState(false)
const handleCopy = async () => {
try {
await navigator.clipboard.writeText(content)
setCopied(true)
setTimeout(() => setCopied(false), 2000)
} catch (err) {
console.error('Failed to copy:', err)
}
}
return (
<button
onClick={handleCopy}
className='flex 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={copied ? 'Copied to clipboard' : 'Copy page content'}
>
{copied ? (
<>
<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

@@ -1,102 +0,0 @@
import {
IconAdjustmentsBolt,
IconCloud,
IconEaseInOut,
IconHeart,
IconHelp,
IconHistory,
IconRouteAltLeft,
IconTerminal2,
} from '@tabler/icons-react'
import { cn } from '@/lib/utils'
export function Features() {
const features = [
{
title: 'Multi-LLM Support',
description: 'Connect to any LLM provider including OpenAI, Anthropic, and more',
icon: <IconCloud />,
},
{
title: 'API Deployment',
description: 'Deploy your workflows as secure, scalable APIs',
icon: <IconTerminal2 />,
},
{
title: 'Webhook Integration',
description: 'Trigger workflows via webhooks from external services',
icon: <IconRouteAltLeft />,
},
{
title: 'Scheduled Execution',
description: 'Schedule workflows to run at specific times or intervals',
icon: <IconEaseInOut />,
},
{
title: '40+ Integrations',
description: 'Connect to hundreds of external services and data sources',
icon: <IconAdjustmentsBolt />,
},
{
title: 'Visual Debugging',
description: 'Debug workflows visually with detailed execution logs',
icon: <IconHelp />,
},
{
title: 'Version Control',
description: 'Track changes and roll back to previous versions',
icon: <IconHistory />,
},
{
title: 'Team Collaboration',
description: 'Collaborate with team members on workflow development',
icon: <IconHeart />,
},
]
return (
<div className='relative z-20 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-4'>
{features.map((feature, index) => (
<Feature key={feature.title} {...feature} index={index} />
))}
</div>
)
}
export const Feature = ({
title,
description,
icon,
index,
}: {
title: string
description: string
icon: React.ReactNode
index: number
}) => {
return (
<div
className={cn(
'group/feature relative flex flex-col py-5 lg:border-r dark:border-neutral-800',
(index === 0 || index === 4) && 'lg:border-l dark:border-neutral-800',
index < 4 && 'lg:border-b dark:border-neutral-800'
)}
>
{index < 4 && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
{index >= 4 && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
<div className='relative z-10 mb-4 px-10 text-neutral-600 dark:text-neutral-400'>{icon}</div>
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
<div className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-purple-500 dark:bg-neutral-700' />
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
{title}
</span>
</div>
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
{description}
</p>
</div>
)
}

View File

@@ -0,0 +1,53 @@
'use client'
import { useState } from 'react'
import NextImage, { type ImageProps as NextImageProps } from 'next/image'
import { cn } from '@/lib/utils'
import { Lightbox } from './lightbox'
interface ImageProps extends Omit<NextImageProps, 'className'> {
className?: string
enableLightbox?: boolean
}
export function Image({
className = 'w-full',
enableLightbox = true,
alt = '',
src,
...props
}: ImageProps) {
const [isLightboxOpen, setIsLightboxOpen] = useState(false)
const handleImageClick = () => {
if (enableLightbox) {
setIsLightboxOpen(true)
}
}
return (
<>
<NextImage
className={cn(
'overflow-hidden rounded-xl border border-border object-cover shadow-sm',
enableLightbox && 'cursor-pointer transition-opacity hover:opacity-90',
className
)}
alt={alt}
src={src}
onClick={handleImageClick}
{...props}
/>
{enableLightbox && (
<Lightbox
isOpen={isLightboxOpen}
onClose={() => setIsLightboxOpen(false)}
src={typeof src === 'string' ? src : String(src)}
alt={alt}
type='image'
/>
)}
</>
)
}

View File

@@ -0,0 +1,129 @@
'use client'
import { useEffect, useState } from 'react'
import { Check, ChevronRight } from 'lucide-react'
import { useParams, usePathname, useRouter } from 'next/navigation'
const languages = {
en: { name: 'English', flag: '🇺🇸' },
es: { name: 'Español', flag: '🇪🇸' },
fr: { name: 'Français', flag: '🇫🇷' },
de: { name: 'Deutsch', flag: '🇩🇪' },
ja: { name: '日本語', flag: '🇯🇵' },
zh: { name: '简体中文', flag: '🇨🇳' },
}
export function LanguageDropdown() {
const [isOpen, setIsOpen] = useState(false)
const pathname = usePathname()
const params = useParams()
const router = useRouter()
const [currentLang, setCurrentLang] = useState(() => {
const langFromParams = params?.lang as string
return langFromParams && Object.keys(languages).includes(langFromParams) ? langFromParams : 'en'
})
useEffect(() => {
const langFromParams = params?.lang as string
if (langFromParams && Object.keys(languages).includes(langFromParams)) {
if (langFromParams !== currentLang) {
setCurrentLang(langFromParams)
}
} else {
if (currentLang !== 'en') {
setCurrentLang('en')
}
}
}, [params, currentLang])
const handleLanguageChange = (locale: string) => {
if (locale === currentLang) {
setIsOpen(false)
return
}
setIsOpen(false)
const segments = pathname.split('/').filter(Boolean)
if (segments[0] && Object.keys(languages).includes(segments[0])) {
segments.shift()
}
let newPath = ''
if (locale === 'en') {
newPath = segments.length > 0 ? `/${segments.join('/')}` : '/introduction'
} else {
newPath = `/${locale}${segments.length > 0 ? `/${segments.join('/')}` : '/introduction'}`
}
router.push(newPath)
}
useEffect(() => {
if (!isOpen) return
const onKey = (e: KeyboardEvent) => {
if (e.key === 'Escape') setIsOpen(false)
}
window.addEventListener('keydown', onKey)
return () => window.removeEventListener('keydown', onKey)
}, [isOpen])
return (
<div className='relative'>
<button
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
setIsOpen(!isOpen)
}}
aria-haspopup='listbox'
aria-expanded={isOpen}
aria-controls='language-menu'
className='flex 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>{languages[currentLang as keyof typeof languages]?.name}</span>
<ChevronRight className='h-3.5 w-3.5' />
</button>
{isOpen && (
<>
<div className='fixed inset-0 z-[1000]' aria-hidden onClick={() => setIsOpen(false)} />
<div
id='language-menu'
role='listbox'
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
key={code}
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
handleLanguageChange(code)
}}
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 ${
currentLang === code ? 'bg-muted/60 font-medium text-primary' : 'text-foreground'
}`}
>
<span className='text-base md:text-sm'>{lang.flag}</span>
<span className='leading-none'>{lang.name}</span>
{currentLang === code && (
<Check className='ml-auto h-4 w-4 text-primary md:h-3.5 md:w-3.5' />
)}
</button>
))}
</div>
</>
)}
</div>
)
}

View File

@@ -0,0 +1,74 @@
'use client'
import { useEffect, useRef } from 'react'
import { getAssetUrl } from '@/lib/utils'
interface LightboxProps {
isOpen: boolean
onClose: () => void
src: string
alt: string
type: 'image' | 'video'
}
export function Lightbox({ isOpen, onClose, src, alt, type }: LightboxProps) {
const overlayRef = useRef<HTMLDivElement>(null)
useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
onClose()
}
}
const handleClickOutside = (event: MouseEvent) => {
if (overlayRef.current && event.target === overlayRef.current) {
onClose()
}
}
if (isOpen) {
document.addEventListener('keydown', handleKeyDown)
document.addEventListener('click', handleClickOutside)
document.body.style.overflow = 'hidden'
}
return () => {
document.removeEventListener('keydown', handleKeyDown)
document.removeEventListener('click', handleClickOutside)
document.body.style.overflow = 'unset'
}
}, [isOpen, onClose])
if (!isOpen) return null
return (
<div
ref={overlayRef}
className='fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-12 backdrop-blur-sm'
role='dialog'
aria-modal='true'
aria-label='Media viewer'
>
<div className='relative max-h-full max-w-full overflow-hidden rounded-xl shadow-2xl'>
{type === 'image' ? (
<img
src={src}
alt={alt}
className='max-h-[calc(100vh-6rem)] max-w-[calc(100vw-6rem)] rounded-xl object-contain'
loading='lazy'
/>
) : (
<video
src={getAssetUrl(src)}
autoPlay
loop
muted
playsInline
className='max-h-[calc(100vh-6rem)] max-w-[calc(100vw-6rem)] rounded-xl outline-none focus:outline-none'
/>
)}
</div>
</div>
)
}

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] 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

@@ -1,48 +0,0 @@
'use client'
import { useEffect, useState } from 'react'
import Image from 'next/image'
import { useTheme } from 'next-themes'
interface ThemeImageProps {
lightSrc: string
darkSrc: string
alt: string
width?: number
height?: number
className?: string
}
export function ThemeImage({
lightSrc,
darkSrc,
alt,
width = 600,
height = 400,
className = 'rounded-lg border border-border my-6',
}: ThemeImageProps) {
const { resolvedTheme } = useTheme()
const [imageSrc, setImageSrc] = useState(lightSrc)
const [mounted, setMounted] = useState(false)
// Wait until component is mounted to avoid hydration mismatch
useEffect(() => {
setMounted(true)
}, [])
useEffect(() => {
if (mounted) {
setImageSrc(resolvedTheme === 'dark' ? darkSrc : lightSrc)
}
}, [resolvedTheme, lightSrc, darkSrc, mounted])
if (!mounted) {
return null
}
return (
<div className='flex justify-center'>
<Image src={imageSrc} alt={alt} width={width} height={height} className={className} />
</div>
)
}

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 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 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

@@ -0,0 +1,57 @@
'use client'
import { useState } from 'react'
import { getAssetUrl } from '@/lib/utils'
import { Lightbox } from './lightbox'
interface VideoProps {
src: string
className?: string
autoPlay?: boolean
loop?: boolean
muted?: boolean
playsInline?: boolean
enableLightbox?: boolean
}
export function Video({
src,
className = 'w-full rounded-xl border border-border shadow-sm overflow-hidden outline-none focus:outline-none',
autoPlay = true,
loop = true,
muted = true,
playsInline = true,
enableLightbox = true,
}: VideoProps) {
const [isLightboxOpen, setIsLightboxOpen] = useState(false)
const handleVideoClick = () => {
if (enableLightbox) {
setIsLightboxOpen(true)
}
}
return (
<>
<video
autoPlay={autoPlay}
loop={loop}
muted={muted}
playsInline={playsInline}
className={`${className} ${enableLightbox ? 'cursor-pointer transition-opacity hover:opacity-90' : ''}`}
src={getAssetUrl(src)}
onClick={handleVideoClick}
/>
{enableLightbox && (
<Lightbox
isOpen={isLightboxOpen}
onClose={() => setIsLightboxOpen(false)}
src={src}
alt={`Video: ${src}`}
type='video'
/>
)}
</>
)
}

View File

@@ -1,212 +0,0 @@
---
title: Agent
description: Create powerful AI agents using any LLM provider
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Agent block is a fundamental component in Sim Studio that allows you to create powerful AI agents using various LLM providers. These agents can process inputs based on customizable system prompts and utilize integrated tools to enhance their capabilities.
<ThemeImage
lightSrc="/static/light/agent-light.png"
darkSrc="/static/dark/agent-dark.png"
alt="Agent Block"
width={300}
height={175}
/>
<Callout type="info">
Agent blocks serve as interfaces to Large Language Models, enabling your workflow to leverage
state-of-the-art AI capabilities.
</Callout>
## Overview
The Agent block serves as an interface to Large Language Models (LLMs), enabling you to create agents that can:
<Steps>
<Step>
<strong>Respond to user inputs</strong>: Generate natural language responses based on provided
inputs
</Step>
<Step>
<strong>Follow instructions</strong>: Adhere to specific instructions defined in the system
prompt
</Step>
<Step>
<strong>Use specialized tools</strong>: Interact with integrated tools to extend capabilities
</Step>
<Step>
<strong>Structure output</strong>: Generate responses in structured formats when needed
</Step>
</Steps>
## Configuration Options
### System Prompt
The system prompt defines the agent's behavior, capabilities, and limitations. It's the primary way to instruct the agent on how to respond to inputs.
```markdown
You are a helpful assistant that specializes in financial analysis.
Always provide clear explanations and cite sources when possible.
When responding to questions about investments, include risk disclaimers.
```
### User Prompt
The user prompt or context is the specific input or question that the agent should respond to. This can be:
- Directly provided in the block configuration
- Connected from another block's output
- Dynamically generated during workflow execution
### Model Selection
Choose from a variety of LLM providers:
- OpenAI (GPT-4o, o1, o3, o4-mini, gpt-4.1)
- Anthropic (Claude 3.7 Sonnet)
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
- Groq, Cerebras
- Ollama Local Models
- And more
### Temperature
Control the creativity and randomness of responses:
<Tabs items={['Low (0-0.3)', 'Medium (0.3-0.7)', 'High (0.7-2.0)']}>
<Tab>
<p>
More deterministic, focused responses. Best for factual tasks, customer support, and
situations where accuracy is critical.
</p>
</Tab>
<Tab>
<p>
Balanced creativity and focus. Suitable for general purpose applications that require both
accuracy and some creativity.
</p>
</Tab>
<Tab>
<p>
More creative, varied responses. Ideal for creative writing, brainstorming, and generating
diverse ideas.
</p>
</Tab>
</Tabs>
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">
The temperature range (0-1 or 0-2) varies depending on the selected model.
</p>
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
### Tools
Integrate specialized tools to enhance the agent's capabilities. You can add tools to your agent by:
1. Clicking the Tools section in the Agent configuration
2. Selecting from the tools dropdown menu
3. Choosing an existing tool or creating a new one
<ThemeImage
lightSrc="/static/light/tooldropdown-light.png"
darkSrc="/static/dark/tooldropdown-dark.png"
alt="Tools Dropdown"
width={150}
height={125}
/>
Available tools include:
- **Confluence**: Access and query Confluence knowledge bases
- **Evaluator**: Use evaluation metrics to assess content
- **GitHub**: Interact with GitHub repositories and issues
- **Gmail**: Process and respond to emails
- **Firecrawl**: Web search and content retrieval
- And many, many more pre-built integrations
You can also create custom tools to meet specific requirements for your agent's capabilities.
<Callout type="info">
Tools significantly expand what your agent can do, allowing it to access external systems,
retrieve information, and take actions beyond simple text generation.
</Callout>
### Response Format
Define a structured format for the agent's response when needed, using JSON or other formats.
## Inputs and Outputs
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>User Prompt</strong>: The user's query or context for the agent
</li>
<li>
<strong>System Prompt</strong>: Instructions for the agent (optional)
</li>
<li>
<strong>Tools</strong>: Optional tool connections that the agent can use
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Content</strong>: The agent's response text
</li>
<li>
<strong>Model</strong>: The model used for generation
</li>
<li>
<strong>Tokens</strong>: Usage statistics (prompt, completion, total)
</li>
<li>
<strong>Tool Calls</strong>: Details of any tools used during processing
</li>
<li>
<strong>Cost</strong>: Cost of the response
</li>
<li>
<strong>Usage</strong>: Usage statistics (prompt, completion, total)
</li>
</ul>
</Tab>
</Tabs>
## Example Usage
Here's an example of how an Agent block might be configured for a customer support workflow:
```yaml
# Example Agent Configuration
systemPrompt: |
You are a customer support agent for TechCorp.
Always maintain a professional, friendly tone.
If you don't know an answer, direct the customer to email support@techcorp.com.
Never make up information about products or policies.
model: OpenAI/gpt-4
temperature: 0.2
tools:
- ProductDatabase
- OrderHistory
- SupportTicketCreator
```
## Best Practices
- **Be specific in system prompts**: Clearly define the agent's role, tone, and limitations. The more specific your instructions are, the better the agent will be able to fulfill its intended purpose.
- **Choose the right temperature setting**: Use lower temperature settings (0-0.3) when accuracy is important, or increase temperature (0.7-2.0) for more creative or varied responses
- **Combine with Evaluator blocks**: Use Evaluator blocks to assess agent responses and ensure quality. This allows you to create feedback loops and implement quality control measures.
- **Leverage tools effectively**: Integrate tools that complement the agent's purpose and enhance its capabilities. Be selective about which tools you provide to avoid overwhelming the agent.

View File

@@ -1,128 +0,0 @@
---
title: API
description: Connect to external services through API endpoints
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The API block enables you to connect your workflow to external services through HTTP requests. It supports various methods like GET, POST, PUT, DELETE, and PATCH, allowing you to interact with virtually any API endpoint.
<ThemeImage
lightSrc="/static/light/api-light.png"
darkSrc="/static/dark/api-dark.png"
alt="API Block"
width={300}
height={175}
/>
## Overview
The API block enables you to:
- Make HTTP requests to external services and APIs
- Process and transform data from external sources
- Send data to external systems
- Integrate with third-party platforms and services
- Create webhooks and callbacks
## Configuration Options
### URL
The endpoint URL for the API request. This can be:
- A static URL entered directly in the block
- A dynamic URL connected from another block's output
- A URL with path parameters
### Method
Select the HTTP method for your request:
- **GET**: Retrieve data from the server
- **POST**: Send data to the server to create a resource
- **PUT**: Update an existing resource on the server
- **DELETE**: Remove a resource from the server
- **PATCH**: Partially update an existing resource
### Query Parameters
Define key-value pairs that will be appended to the URL as query parameters. For example:
```
Key: apiKey
Value: your_api_key_here
Key: limit
Value: 10
```
These would be added to the URL as `?apiKey=your_api_key_here&limit=10`.
### Headers
Configure HTTP headers for your request. Common headers include:
```
Key: Content-Type
Value: application/json
Key: Authorization
Value: Bearer your_token_here
```
### Request Body
For methods that support a request body (POST, PUT, PATCH), you can define the data to send. The body can be:
- JSON data entered directly in the block
- Data connected from another block's output
- Dynamically generated during workflow execution
## Inputs and Outputs
### Inputs
- **URL**: The endpoint to send the request to
- **Method**: The HTTP method to use
- **Query Parameters**: Key-value pairs for URL parameters
- **Headers**: HTTP headers for the request
- **Body**: Data to send with the request (for applicable methods)
### Outputs
- **Status Code**: The HTTP status code returned by the server
- **Response Body**: The data returned by the server
- **Headers**: Response headers from the server
- **Error**: Any error information if the request fails
## Example Usage
Here's an example of how an API block might be configured to fetch weather data:
```yaml
# Example API Configuration
url: https://api.weatherapi.com/v1/current.json
method: GET
params:
- key: key
value: your_api_key_here
- key: q
value: London
- key: aqi
value: no
headers:
- key: Accept
value: application/json
```
## Best Practices
- **Use environment variables for sensitive data**: Don't hardcode API keys or credentials
- **Handle errors gracefully**: Connect error handling logic for failed requests
- **Validate responses**: Check status codes and response formats before processing data
- **Respect rate limits**: Be mindful of API rate limits and implement appropriate throttling
- **Cache responses when appropriate**: For frequently accessed data that doesn't change often

View File

@@ -1,191 +0,0 @@
---
title: Condition
description: Create conditional logic and branching in your workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Condition block allows you to branch your workflow execution path based on boolean expressions. It evaluates conditions and routes the workflow accordingly, enabling you to create dynamic, responsive workflows with different execution paths.
<ThemeImage
lightSrc="/static/light/condition-light.png"
darkSrc="/static/dark/condition-dark.png"
alt="Condition Block"
width={300}
height={175}
/>
<Callout>
Condition blocks enable deterministic decision-making without requiring an LLM, making them ideal
for straightforward branching logic.
</Callout>
## Overview
The Condition block serves as a decision point in your workflow, enabling:
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Branching Logic</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Create different execution paths based on specific conditions
</div>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Rule-Based Routing</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Route workflows deterministically without needing an LLM
</div>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Data-Driven Decisions</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Create workflow paths based on structured data values
</div>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">If-Then-Else Logic</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Implement conditional programming paradigms in your workflows
</div>
</div>
</div>
## How It Works
The Condition block:
<Steps>
<Step>
<strong>Evaluate Expression</strong>: Evaluates a boolean expression or condition
</Step>
<Step>
<strong>Determine Result</strong>: Determines whether the condition evaluates to true or false
</Step>
<Step>
<strong>Route Workflow</strong>: Routes the workflow to the appropriate path based on the result
</Step>
<Step>
<strong>Provide Context</strong>: Provides context about the decision made
</Step>
</Steps>
## Configuration Options
### Conditions
Define one or more conditions that will be evaluated. Each condition includes:
- **Expression**: A JavaScript/TypeScript expression that evaluates to true or false
- **Path**: The destination block to route to if the condition is true
- **Description**: Optional explanation of what the condition checks
You can create multiple conditions that are evaluated in order, with the first matching condition determining the execution path.
### Condition Expression Format
Conditions use JavaScript syntax and can reference input values from previous blocks.
<Tabs items={['Score Threshold', 'Text Analysis', 'Multiple Conditions']}>
<Tab>
```javascript
// Check if a score is above a threshold
input.score > 75
```
</Tab>
<Tab>
```javascript
// Check if a text contains specific keywords
input.text.includes('urgent') || input.text.includes('emergency')
```
</Tab>
<Tab>
```javascript
// Check multiple conditions
input.age >= 18 && input.country === 'US'
```
</Tab>
</Tabs>
## Inputs and Outputs
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Variables</strong>: Values from previous blocks that can be referenced in conditions
</li>
<li>
<strong>Conditions</strong>: Boolean expressions to evaluate
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Content</strong>: A description of the evaluation result
</li>
<li>
<strong>Condition Result</strong>: The boolean result of the condition evaluation
</li>
<li>
<strong>Selected Path</strong>: Details of the chosen routing destination
</li>
<li>
<strong>Selected Condition ID</strong>: Identifier of the condition that was matched
</li>
</ul>
</Tab>
</Tabs>
## Example Usage
Here's an example of how a Condition block might be used in a customer satisfaction workflow:
```yaml
# Example Condition Configuration
conditions:
- id: 'high_satisfaction'
expression: 'input.satisfactionScore >= 8'
description: 'Customer is highly satisfied'
path: 'positive_feedback_block'
- id: 'medium_satisfaction'
expression: 'input.satisfactionScore >= 5'
description: 'Customer is moderately satisfied'
path: 'neutral_feedback_block'
- id: 'default'
expression: 'true'
description: 'Customer is not satisfied'
path: 'improvement_feedback_block'
```
## Best Practices
### Order conditions correctly
Conditions are evaluated in order, so place more specific conditions before general ones. This ensures that more specific logic takes precedence over general fallbacks.
### Include a default condition
Add a catch-all condition (e.g., `true`) as the last condition to handle cases when no other conditions match. This prevents workflow execution from getting stuck.
### Keep expressions simple
Use clear, straightforward boolean expressions for better readability. Complex expressions can be difficult to debug and maintain.
### Document your conditions
Add descriptions to explain the purpose of each condition. This helps other team members understand the logic and makes maintenance easier.
### Test edge cases
Ensure your conditions handle boundary values correctly. Test with values at the edges of your condition ranges to verify correct behavior.

View File

@@ -1,128 +0,0 @@
---
title: Evaluator
description: Assess content quality using customizable evaluation metrics
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Evaluator block allows you to assess the quality of content using customizable evaluation metrics. This is particularly useful for evaluating AI-generated text, ensuring outputs meet specific criteria, and building quality-control mechanisms into your workflows.
<ThemeImage
lightSrc="/static/light/evaluator-light.png"
darkSrc="/static/dark/evaluator-dark.png"
alt="Evaluator Block"
width={300}
height={175}
/>
## Overview
The Evaluator block utilizes LLMs to objectively evaluate content based on custom metrics you define. This is especially useful for:
- Assessing the quality of AI-generated content
- Evaluating responses against specific criteria
- Creating scoring frameworks for different types of content
- Building objective feedback loops in your workflows
## Configuration Options
### Evaluation Metrics
Define custom metrics to evaluate content against. Each metric includes:
- **Name**: A short identifier for the metric
- **Description**: A detailed explanation of what the metric measures
- **Range**: The numeric range for scoring (e.g., 1-5, 0-10)
Example metrics:
```
Accuracy (1-5): How factually accurate is the content?
Clarity (1-5): How clear and understandable is the content?
Relevance (1-5): How relevant is the content to the original query?
```
### Content
The content to be evaluated. This can be:
- Directly provided in the block configuration
- Connected from another block's output (typically an Agent block)
- Dynamically generated during workflow execution
### Model Selection
Choose an LLM provider to perform the evaluation:
- OpenAI (GPT-4o, o1, o3, , gpt-4.1)
- Anthropic (Claude 3.7 Sonnet)
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
- Groq, Cerebras
- Ollama Local Models
- And more
The chosen model should have strong reasoning capabilities to provide accurate evaluations.
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
## How It Works
1. The Evaluator block takes the provided content and your custom metrics
2. It generates a specialized prompt that instructs the LLM to evaluate the content
3. The prompt includes clear guidelines on how to score each metric
4. The LLM evaluates the content and returns numeric scores for each metric
5. The Evaluator block formats these scores as structured output for use in your workflow
## Inputs and Outputs
### Inputs
- **Content**: The text or structured data to evaluate
- **Metrics**: Custom evaluation criteria with scoring ranges
- **Model Settings**: LLM provider and parameters
### Outputs
- **Content**: A summary of the evaluation
- **Model**: The model used for evaluation
- **Tokens**: Usage statistics
- **Metric Scores**: Numeric scores for each defined metric
## Example Usage
Here's an example of how an Evaluator block might be configured for assessing customer service responses:
```yaml
# Example Evaluator Configuration
metrics:
- name: Empathy
description: How well does the response acknowledge and address the customer's emotional state?
range:
min: 1
max: 5
- name: Solution
description: How effectively does the response solve the customer's problem?
range:
min: 1
max: 5
- name: Clarity
description: How clear and easy to understand is the response?
range:
min: 1
max: 5
model: Anthropic/claude-3-opus
```
## Best Practices
- **Use specific metric descriptions**: Clearly define what each metric measures to get more accurate evaluations
- **Choose appropriate ranges**: Select scoring ranges that provide enough granularity without being overly complex
- **Connect with Agent blocks**: Use Evaluator blocks to assess Agent block outputs and create feedback loops
- **Use consistent metrics**: For comparative analysis, maintain consistent metrics across similar evaluations
- **Combine multiple metrics**: Use several metrics to get a comprehensive evaluation

View File

@@ -1,137 +0,0 @@
---
title: Function
description: Execute custom JavaScript or TypeScript code in your workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Function block allows you to write and execute custom JavaScript or TypeScript code directly within your workflow. This powerful feature enables you to implement complex logic, data transformations, and integration with external libraries.
<ThemeImage
lightSrc="/static/light/function-light.png"
darkSrc="/static/dark/function-dark.png"
alt="Function Block"
width={300}
height={175}
/>
## Overview
The Function block brings the full power of JavaScript/TypeScript to your workflows, allowing for:
- Custom data transformation and manipulation
- Complex conditional logic
- Mathematical calculations and algorithms
- Integration with external libraries
- Creation of reusable utility functions
## How It Works
The Function block:
1. Takes your custom JavaScript/TypeScript code
2. Executes it in a secure, isolated environment
3. Processes any inputs provided from previous blocks
4. Returns the result for use in subsequent blocks
## Configuration Options
### Code Editor
A full-featured code editor where you can write your JavaScript/TypeScript code. The editor supports:
- Syntax highlighting
- Code completion
- Error checking
- Multiple lines of code
### Inputs
Your function can access inputs from previous blocks through an `input` object. For example:
```javascript
// Access data from a previous block
const customerName = input.customerData.name;
const orderTotal = input.orderData.total;
// Process the data
const discount = orderTotal > 100 ? 0.1 : 0;
const finalPrice = orderTotal * (1 - discount);
// Return the result
return {
customerName,
originalTotal: orderTotal,
discount: discount * 100 + '%',
finalPrice
};
```
## Safety and Limitations
For security and performance reasons, function execution has certain limitations:
- **Execution Time**: Functions have a maximum execution time to prevent infinite loops
- **Memory Usage**: Memory is limited to prevent excessive resource usage
- **Network Access**: Network calls are restricted to prevent unauthorized access
- **Available APIs**: Only a subset of browser APIs are available
## Inputs and Outputs
### Inputs
- **Code**: Your JavaScript/TypeScript code to execute
- **Input Data**: Values from previous blocks that can be accessed in your code
### Outputs
- **Result**: The value returned by your function
- **Standard Output**: Any console output from your function
- **Execution Time**: The time taken to execute your function (in milliseconds)
## Example Usage
Here's an example of a Function block that processes customer data and calculates a loyalty score:
```javascript
// Example Function Block Code
// Process customer data and calculate loyalty score
// Access input from previous blocks
const { purchaseHistory, accountAge, supportTickets } = input;
// Calculate metrics
const totalSpent = purchaseHistory.reduce((sum, purchase) => sum + purchase.amount, 0);
const purchaseFrequency = purchaseHistory.length / (accountAge / 365);
const ticketRatio = supportTickets.resolved / supportTickets.total;
// Calculate loyalty score (0-100)
const spendScore = Math.min(totalSpent / 1000 * 30, 30);
const frequencyScore = Math.min(purchaseFrequency * 20, 40);
const supportScore = ticketRatio * 30;
const loyaltyScore = Math.round(spendScore + frequencyScore + supportScore);
// Return results
return {
customer: input.name,
loyaltyScore,
loyaltyTier: loyaltyScore >= 80 ? "Platinum" : loyaltyScore >= 60 ? "Gold" : loyaltyScore >= 40 ? "Silver" : "Bronze",
metrics: {
spendScore,
frequencyScore,
supportScore
}
};
```
## Best Practices
- **Keep functions focused**: Write functions that do one thing well
- **Handle errors gracefully**: Use try/catch blocks to handle potential errors
- **Document your code**: Add comments to explain complex logic
- **Test edge cases**: Ensure your code handles unusual inputs correctly
- **Optimize for performance**: Be mindful of computational complexity for large datasets

View File

@@ -1,54 +0,0 @@
---
title: Blocks
description: Building blocks for your agentic workflows
---
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { BlockTypes } from '@/components/ui/block-types'
Blocks are the fundamental building components of Sim Studio workflows. Each block has a specific purpose and can be connected to other blocks to create sophisticated workflows.
## What is a Block?
A block is a reusable, configurable component that performs a specific function within your workflow. Blocks have inputs and outputs that allow them to communicate with other blocks. They can process data, make decisions, interact with external systems, or perform computations.
## Primary Block Types
Sim Studio provides six powerful block types that form the foundation of any workflow. Each block is designed to handle specific aspects of your agentic applications, from AI-powered reasoning to conditional logic and external integrations.
<BlockTypes />
## Block Connections
Blocks can be connected to form a directed graph representing your workflow. Each connection represents the flow of data from one block to another:
<Steps>
<Step>
<strong>Outputs to Inputs</strong>: A block's outputs can be connected to another block's
inputs.
</Step>
<Step>
<strong>Multiple Connections</strong>: A block can have multiple incoming and outgoing
connections.
</Step>
<Step>
<strong>Conditional Flows</strong>: Some blocks (like Router and Condition) can have multiple
output paths based on conditions.
</Step>
</Steps>
## Block Configuration
Each block type has its own configuration options allowing you to customize its behavior.
### Common Configuration Options
- **Input/output definitions**: Define how data flows in and out of the block
- **Processing instructions**: Configure how the block processes its inputs
- **API keys or authentication details**: Provide necessary credentials for external services
- **Retry policies**: Configure how the block handles failures
- **Error handling behavior**: Define how errors are managed and reported
See the specific documentation for each block type to learn about its configuration options.

View File

@@ -1,4 +0,0 @@
{
"title": "Blocks",
"pages": ["agent", "api", "condition", "function", "evaluator", "router", "response", "workflow"]
}

View File

@@ -1,188 +0,0 @@
---
title: Response
description: Send a structured response back to API calls
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Response block is the final component in API-enabled workflows that transforms your workflow's variables into a structured HTTP response. This block serves as the endpoint that returns data, status codes, and headers back to API callers.
<ThemeImage
lightSrc="/static/light/response-light.png"
darkSrc="/static/dark/response-dark.png"
alt="Response Block"
width={430}
height={784}
/>
<Callout type="info">
Response blocks are terminal blocks - they mark the end of a workflow execution and cannot have further connections.
</Callout>
## Overview
The Response block serves as the final output mechanism for API workflows, enabling you to:
<Steps>
<Step>
<strong>Return structured data</strong>: Transform workflow variables into JSON responses
</Step>
<Step>
<strong>Set HTTP status codes</strong>: Control the response status (200, 400, 500, etc.)
</Step>
<Step>
<strong>Configure headers</strong>: Add custom HTTP headers to the response
</Step>
<Step>
<strong>Reference variables</strong>: Use workflow variables dynamically in the response
</Step>
</Steps>
## Configuration Options
### Response Data
The response data is the main content that will be sent back to the API caller. This should be formatted as JSON and can include:
- Static values
- Dynamic references to workflow variables using the `<variable.name>` syntax
- Nested objects and arrays
- Any valid JSON structure
### Status Code
Set the HTTP status code for the response. Common status codes include:
<Tabs items={['Success (2xx)', 'Client Error (4xx)', 'Server Error (5xx)']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>200</strong>: OK - Standard success response</li>
<li><strong>201</strong>: Created - Resource successfully created</li>
<li><strong>204</strong>: No Content - Success with no response body</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>400</strong>: Bad Request - Invalid request parameters</li>
<li><strong>401</strong>: Unauthorized - Authentication required</li>
<li><strong>404</strong>: Not Found - Resource doesn't exist</li>
<li><strong>422</strong>: Unprocessable Entity - Validation errors</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>500</strong>: Internal Server Error - Server-side error</li>
<li><strong>502</strong>: Bad Gateway - External service error</li>
<li><strong>503</strong>: Service Unavailable - Service temporarily down</li>
</ul>
</Tab>
</Tabs>
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">
Default status code is 200 if not specified.
</p>
### Response Headers
Configure additional HTTP headers to include in the response.
Headers are configured as key-value pairs:
| Key | Value |
|-----|-------|
| Content-Type | application/json |
| Cache-Control | no-cache |
| X-API-Version | 1.0 |
## Inputs and Outputs
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>data</strong> (JSON, optional): The JSON data to send in the response body
</li>
<li>
<strong>status</strong> (number, optional): HTTP status code (default: 200)
</li>
<li>
<strong>headers</strong> (JSON, optional): Additional response headers
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>response</strong>: Complete response object containing:
<ul className="list-disc space-y-1 pl-6 mt-2">
<li><strong>data</strong>: The response body data</li>
<li><strong>status</strong>: HTTP status code</li>
<li><strong>headers</strong>: Response headers</li>
</ul>
</li>
</ul>
</Tab>
</Tabs>
## Variable References
Use the `<variable.name>` syntax to dynamically insert workflow variables into your response:
```json
{
"user": {
"id": "<variable.userId>",
"name": "<variable.userName>",
"email": "<variable.userEmail>"
},
"query": "<variable.searchQuery>",
"results": "<variable.searchResults>",
"totalFound": "<variable.resultCount>",
"processingTime": "<variable.executionTime>ms"
}
```
<Callout type="warning">
Variable names are case-sensitive and must match exactly with the variables available in your workflow.
</Callout>
## Example Usage
Here's an example of how a Response block might be configured for a user search API:
```yaml
data: |
{
"success": true,
"data": {
"users": "<variable.searchResults>",
"pagination": {
"page": "<variable.currentPage>",
"limit": "<variable.pageSize>",
"total": "<variable.totalUsers>"
}
},
"query": {
"searchTerm": "<variable.searchTerm>",
"filters": "<variable.appliedFilters>"
},
"timestamp": "<variable.timestamp>"
}
status: 200
headers:
- key: X-Total-Count
value: <variable.totalUsers>
- key: Cache-Control
value: public, max-age=300
```
## Best Practices
- **Use meaningful status codes**: Choose appropriate HTTP status codes that accurately reflect the outcome of the workflow
- **Structure your responses consistently**: Maintain a consistent JSON structure across all your API endpoints for better developer experience
- **Include relevant metadata**: Add timestamps and version information to help with debugging and monitoring
- **Handle errors gracefully**: Use conditional logic in your workflow to set appropriate error responses with descriptive messages
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes

View File

@@ -1,120 +0,0 @@
---
title: Router
description: Route workflow execution based on specific conditions or logic
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Router block is a powerful component in Sim Studio that intelligently routes workflow execution based on content analysis, user input, or predefined conditions. It acts as a decision-making junction in your workflow, directing the flow to different paths based on various criteria.
<ThemeImage
lightSrc="/static/light/router-light.png"
darkSrc="/static/dark/router-dark.png"
alt="Router Block"
width={300}
height={175}
/>
## Overview
The Router block uses LLMs to analyze input content and determine the most appropriate next step in your workflow. This allows for:
- Creating dynamic, adaptable workflows
- Implementing complex decision trees
- Routing user requests to specialized components
- Building conversational systems that can handle diverse inputs
## How It Works
The Router block:
1. Analyzes the input content using an LLM
2. Evaluates the content against the available target blocks in your workflow
3. Identifies the most appropriate destination based on the content's intent or requirements
4. Routes the workflow execution to the selected block
## Configuration Options
### Content/Prompt
The content or prompt that the Router will analyze to make routing decisions. This can be:
- A direct user query or input
- Output from a previous block
- A system-generated message
### Target Blocks
The possible destination blocks that the Router can select from. The Router will automatically detect connected blocks, but you can also:
- Customize the descriptions of target blocks to improve routing accuracy
- Specify routing criteria for each target block
- Exclude certain blocks from being considered as routing targets
### Model Selection
Choose an LLM provider to power the routing decision:
- OpenAI (GPT-4o, o1, o3, o4-mini)
- Anthropic (Claude 3.7 Sonnet)
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
- Groq, Cerebras
- Ollama Local Models
- And more
Select a model with strong reasoning capabilities for more accurate routing decisions.
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
## Inputs and Outputs
### Inputs
- **Content/Prompt**: The text to analyze for routing decisions
- **Target Blocks**: Connected blocks that are potential routing destinations
- **Model Settings**: LLM provider and parameters
### Outputs
- **Content**: A summary of the routing decision
- **Model**: The model used for decision-making
- **Tokens**: Usage statistics
- **Selected Path**: Details of the chosen routing destination, including:
- Block ID
- Block Type
- Block Title
## Example Usage
Here's an example of how a Router block might be used in a customer support workflow:
```yaml
# Example Router Configuration
prompt: |
Analyze the user query and route to the most appropriate department.
Choose ONE destination based on the query content and intent.
model: OpenAI/gpt-4
```
In this example, the Router might be connected to:
- A product support block
- A billing inquiries block
- A technical support block
- A general inquiries block
Based on the user's query, the Router would analyze the content and direct it to the most appropriate specialized support block.
## Best Practices
- **Provide clear descriptions for target blocks**: Help the Router understand when to select each destination
- **Use specific routing criteria**: Define clear conditions for selecting each path
- **Consider fallback paths**: Connect a default destination for when no specific path is appropriate
- **Test with diverse inputs**: Ensure the Router handles various input types correctly
- **Review routing decisions**: Monitor the Router's performance and refine as needed

View File

@@ -1,231 +0,0 @@
---
title: Workflow
description: Execute other workflows as reusable components within your current workflow
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Workflow block allows you to execute other workflows as reusable components within your current workflow. This powerful feature enables modular design, code reuse, and the creation of complex nested workflows that can be composed from smaller, focused workflows.
<ThemeImage
lightSrc="/static/light/workflow-light.png"
darkSrc="/static/dark/workflow-dark.png"
alt="Workflow Block"
width={300}
height={175}
/>
<Callout type="info">
Workflow blocks enable modular design by allowing you to compose complex workflows from smaller, reusable components.
</Callout>
## Overview
The Workflow block serves as a bridge between workflows, enabling you to:
<Steps>
<Step>
<strong>Reuse existing workflows</strong>: Execute previously created workflows as components within new workflows
</Step>
<Step>
<strong>Create modular designs</strong>: Break down complex processes into smaller, manageable workflows
</Step>
<Step>
<strong>Maintain separation of concerns</strong>: Keep different business logic isolated in separate workflows
</Step>
<Step>
<strong>Enable team collaboration</strong>: Share and reuse workflows across different projects and team members
</Step>
</Steps>
## How It Works
The Workflow block:
1. Takes a reference to another workflow in your workspace
2. Passes input data from the current workflow to the child workflow
3. Executes the child workflow in an isolated context
4. Returns the results back to the parent workflow for further processing
## Configuration Options
### Workflow Selection
Choose which workflow to execute from a dropdown list of available workflows in your workspace. The list includes:
- All workflows you have access to in the current workspace
- Workflows shared with you by other team members
- Both enabled and disabled workflows (though only enabled workflows can be executed)
### Input Data
Define the data to pass to the child workflow:
- **Single Variable Input**: Select a variable or block output to pass to the child workflow
- **Variable References**: Use `<variable.name>` to reference workflow variables
- **Block References**: Use `<blockName.response.field>` to reference outputs from previous blocks
- **Automatic Mapping**: The selected data is automatically available as `start.response.input` in the child workflow
- **Optional**: The input field is optional - child workflows can run without input data
- **Type Preservation**: Variable types (strings, numbers, objects, etc.) are preserved when passed to the child workflow
### Examples of Input References
- `<variable.customerData>` - Pass a workflow variable
- `<dataProcessor.response.result>` - Pass the result from a previous block
- `<start.response.input>` - Pass the original workflow input
- `<apiCall.response.data.user>` - Pass a specific field from an API response
### Execution Context
The child workflow executes with:
- Its own isolated execution context
- Access to the same workspace resources (API keys, environment variables)
- Proper workspace membership and permission checks
- Independent logging and monitoring
## Safety and Limitations
To prevent infinite recursion and ensure system stability, the Workflow block includes several safety mechanisms:
<Callout type="warning">
**Cycle Detection**: The system automatically detects and prevents circular dependencies between workflows to avoid infinite loops.
</Callout>
- **Maximum Depth Limit**: Nested workflows are limited to a maximum depth of 10 levels
- **Cycle Detection**: Automatic detection and prevention of circular workflow dependencies
- **Timeout Protection**: Child workflows inherit timeout settings to prevent indefinite execution
- **Resource Limits**: Memory and execution time limits apply to prevent resource exhaustion
## Inputs and Outputs
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow ID</strong>: The identifier of the workflow to execute
</li>
<li>
<strong>Input Variable</strong>: Variable or block reference to pass to the child workflow (e.g., `<variable.name>` or `<block.response.field>`)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Response</strong>: The complete output from the child workflow execution
</li>
<li>
<strong>Child Workflow Name</strong>: The name of the executed child workflow
</li>
<li>
<strong>Success Status</strong>: Boolean indicating whether the child workflow completed successfully
</li>
<li>
<strong>Error Information</strong>: Details about any errors that occurred during execution
</li>
<li>
<strong>Execution Metadata</strong>: Information about execution time, resource usage, and performance
</li>
</ul>
</Tab>
</Tabs>
## Example Usage
Here's an example of how a Workflow block might be used to create a modular customer onboarding process:
### Parent Workflow: Customer Onboarding
```yaml
# Main customer onboarding workflow
blocks:
- type: workflow
name: "Validate Customer Data"
workflowId: "customer-validation-workflow"
input: "<variable.newCustomer>"
- type: workflow
name: "Setup Customer Account"
workflowId: "account-setup-workflow"
input: "<Validate Customer Data.response.result>"
- type: workflow
name: "Send Welcome Email"
workflowId: "welcome-email-workflow"
input: "<Setup Customer Account.response.result.accountDetails>"
```
### Child Workflow: Customer Validation
```yaml
# Reusable customer validation workflow
# Access the input data using: start.response.input
blocks:
- type: function
name: "Validate Email"
code: |
const customerData = start.response.input;
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(customerData.email);
- type: api
name: "Check Credit Score"
url: "https://api.creditcheck.com/score"
method: "POST"
body: "<start.response.input>"
```
### Variable Reference Examples
```yaml
# Using workflow variables
input: "<variable.customerInfo>"
# Using block outputs
input: "<dataProcessor.response.cleanedData>"
# Using nested object properties
input: "<apiCall.response.data.user.profile>"
# Using array elements (if supported by the resolver)
input: "<listProcessor.response.items[0]>"
```
## Access Control and Permissions
The Workflow block respects workspace permissions and access controls:
- **Workspace Membership**: Only workflows within the same workspace can be executed
- **Permission Inheritance**: Child workflows inherit the execution permissions of the parent workflow
- **API Key Access**: Child workflows have access to the same API keys and environment variables as the parent
- **User Context**: The execution maintains the original user context for audit and logging purposes
## Best Practices
- **Keep workflows focused**: Design child workflows to handle specific, well-defined tasks
- **Minimize nesting depth**: Avoid deeply nested workflow hierarchies for better maintainability
- **Handle errors gracefully**: Implement proper error handling for child workflow failures
- **Document dependencies**: Clearly document which workflows depend on others
- **Version control**: Consider versioning strategies for workflows that are used as components
- **Test independently**: Ensure child workflows can be tested and validated independently
- **Monitor performance**: Be aware that nested workflows can impact overall execution time
## Common Patterns
### Microservice Architecture
Break down complex business processes into smaller, focused workflows that can be developed and maintained independently.
### Reusable Components
Create library workflows for common operations like data validation, email sending, or API integrations that can be reused across multiple projects.
### Conditional Execution
Use workflow blocks within conditional logic to execute different business processes based on runtime conditions.
### Parallel Processing
Combine workflow blocks with parallel execution to run multiple child workflows simultaneously for improved performance.
<Callout type="tip">
When designing modular workflows, think of each workflow as a function with clear inputs, outputs, and a single responsibility.
</Callout>

View File

@@ -1,190 +0,0 @@
---
title: Accessing Connected Data
description: Techniques for accessing and manipulating data from connected blocks
---
import { Callout } from 'fumadocs-ui/components/callout'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
Once blocks are connected, you can access data from source blocks in destination blocks using connection tags and various data access techniques.
## Basic Data Access
The simplest way to access data is through direct references using connection tags:
<Files>
<File name="Simple Property" annotation="<block.content>" />
<File name="Nested Property" annotation="<block.tokens.total>" />
<File name="Array Element" annotation="<block.items[0].name>" />
<File name="Complex Path" annotation="<block.data.users[2].profile.email>" />
</Files>
## Advanced Data Access Techniques
### Array Access
You can access array elements using square bracket notation:
```javascript
// Access the first item in an array
<block.items[0]>
// Access a specific property of an array item
<block.items[2].name>
// Access the last item in an array (in Function blocks)
const items = input.block.items;
const lastItem = items[items.length - 1];
```
### Object Property Access
Access object properties using dot notation:
```javascript
// Access a simple property
<block.content>
// Access a nested property
<block.data.user.profile.name>
// Access a property with special characters (in Function blocks)
const data = input.block.data;
const specialProp = data['property-with-dashes'];
```
### Dynamic References
Connection references are evaluated at runtime, allowing for dynamic data flow through your workflow:
```javascript
// In a Function block, you can access connected data
const userName = input.userBlock.name;
const orderTotal = input.apiBlock.body.order.total;
// Process the data
const discount = orderTotal > 100 ? 0.1 : 0;
const finalPrice = orderTotal * (1 - discount);
// Return the result
return {
userName,
originalTotal: orderTotal,
discount: discount * 100 + '%',
finalPrice
};
```
## Data Transformation
### Using Function Blocks
Function blocks are the most powerful way to transform data between connections:
```javascript
// Example: Transform API response data
const apiResponse = input.apiBlock.data;
const transformedData = {
users: apiResponse.results.map(user => ({
id: user.id,
fullName: `${user.firstName} ${user.lastName}`,
email: user.email.toLowerCase(),
isActive: user.status === 'active'
})),
totalCount: apiResponse.count,
timestamp: new Date().toISOString()
};
return transformedData;
```
### String Interpolation
You can combine connection tags with static text:
```
Hello, <userBlock.name>! Your order #<orderBlock.id> has been processed.
```
### Conditional Content
In Function blocks, you can create conditional content based on connected data:
```javascript
const user = input.userBlock;
const orderTotal = input.orderBlock.total;
let message = `Thank you for your order, ${user.name}!`;
if (orderTotal > 100) {
message += " You've qualified for free shipping!";
} else {
message += ` Add $${(100 - orderTotal).toFixed(2)} more to qualify for free shipping.`;
}
return { message };
```
## Handling Missing Data
It's important to handle cases where connected data might be missing or null:
<Callout type="warning">
Always validate connected data before using it, especially when accessing nested properties or
array elements.
</Callout>
### Default Values
In Function blocks, you can provide default values for missing data:
```javascript
const userName = input.userBlock?.name || 'Guest'
const items = input.orderBlock?.items || []
const total = input.orderBlock?.total ?? 0
```
### Conditional Checks
Check if data exists before accessing nested properties:
```javascript
let userEmail = 'No email provided'
if (input.userBlock && input.userBlock.contact && input.userBlock.contact.email) {
userEmail = input.userBlock.contact.email
}
```
### Optional Chaining
In Function blocks, use optional chaining to safely access nested properties:
```javascript
const userCity = input.userBlock?.address?.city
const firstItemName = input.orderBlock?.items?.[0]?.name
```
## Debugging Connection Data
When troubleshooting connection issues, these techniques can help:
1. **Log Data**: In Function blocks, use `console.log()` to inspect connected data
2. **Return Full Objects**: Return the full input object to see all available data
3. **Check Types**: Verify the data types of connected values
4. **Validate Paths**: Ensure you're using the correct path to access nested data
```javascript
// Example debugging function
function debugConnections() {
console.log('All inputs:', input)
console.log('User data type:', typeof input.userBlock)
console.log('Order items:', input.orderBlock?.items)
return {
debug: true,
allInputs: input,
userExists: !!input.userBlock,
orderItemCount: input.orderBlock?.items?.length || 0,
}
}
```

View File

@@ -1,76 +0,0 @@
---
title: Connection Basics
description: Learn how connections work in Sim Studio
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
## How Connections Work
Connections are the pathways that allow data to flow between blocks in your workflow. When you connect two blocks in Sim Studio, you're establishing a data flow relationship that defines how information passes from one block to another.
<Callout type="info">
Each connection represents a directed relationship where data flows from a source block's output
to a destination block's input.
</Callout>
### Creating Connections
<Steps>
<Step>
<strong>Select Source Block</strong>: Click on the output port of the block you want to connect
from
</Step>
<Step>
<strong>Draw Connection</strong>: Drag to the input port of the destination block
</Step>
<Step>
<strong>Confirm Connection</strong>: Release to create the connection
</Step>
<Step>
<strong>Configure (Optional)</strong>: Some connections may require additional configuration
</Step>
</Steps>
### Connection Flow
The flow of data through connections follows these principles:
1. **Directional Flow**: Data always flows from outputs to inputs
2. **Execution Order**: Blocks execute in order based on their connections
3. **Data Transformation**: Data may be transformed as it passes between blocks
4. **Conditional Paths**: Some blocks (like Router and Condition) can direct flow to different paths
### Connection Visualization
Connections are visually represented in the workflow editor:
- **Solid Lines**: Active connections that will pass data
- **Animated Flow**: During execution, data flow is visualized along connections
- **Color Coding**: Different connection types may have different colors
- **Connection Tags**: Visual indicators showing what data is available
### Managing Connections
You can manage your connections in several ways:
- **Delete**: Click on a connection and press Delete or use the context menu
- **Reroute**: Drag a connection to change its path
- **Inspect**: Click on a connection to see details about the data being passed
- **Disable**: Temporarily disable a connection without deleting it
<Callout type="warning">
Deleting a connection will immediately stop data flow between the blocks. Make sure this is
intended before removing connections.
</Callout>
## Connection Compatibility
Not all blocks can be connected to each other. Compatibility depends on:
1. **Data Type Compatibility**: The output type must be compatible with the input type
2. **Block Restrictions**: Some blocks may have restrictions on what they can connect to
3. **Workflow Logic**: Connections must make logical sense in the context of your workflow
The editor will indicate when connections are invalid or incompatible.

View File

@@ -1,208 +0,0 @@
---
title: Connection Best Practices
description: Recommended patterns for effective connection management
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
## Workflow Organization
### Organize Your Connections
Keep your workflow clean and understandable by organizing connections logically:
- **Minimize crossing connections** when possible to reduce visual complexity
- **Group related blocks together** to make data flow more intuitive
- **Use consistent flow direction** (typically left-to-right or top-to-bottom)
- **Label complex connections** with descriptive names
<Callout type="info">
A well-organized workflow is easier to understand, debug, and maintain. Take time to arrange your
blocks and connections in a logical manner.
</Callout>
### Connection Naming Conventions
When working with multiple connections, consistent naming helps maintain clarity:
<Steps>
<Step>
<strong>Use descriptive block names</strong>: Name blocks based on their function (e.g.,
"UserDataFetcher", "ResponseGenerator")
</Step>
<Step>
<strong>Be specific with connection references</strong>: Use clear variable names when
referencing connections in code
</Step>
<Step>
<strong>Document complex connections</strong>: Add comments explaining non-obvious data
transformations
</Step>
</Steps>
## Data Validation
### Validate Data Flow
Ensure that the data being passed between blocks is compatible:
- **Check that required fields are available** in the source block
- **Verify data types match expectations** before using them
- **Use Function blocks to transform data** when necessary
- **Handle missing or null values** with default values or conditional logic
```javascript
// Example: Validating and transforming data in a Function block
function processUserData() {
// Validate required fields
if (!input.userBlock || !input.userBlock.id) {
return { error: 'Missing user data', valid: false }
}
// Transform and validate data types
const userId = String(input.userBlock.id)
const userName = input.userBlock.name || 'Unknown User'
const userScore = Number(input.userBlock.score) || 0
return {
valid: true,
user: {
id: userId,
name: userName,
score: userScore,
isHighScore: userScore > 100,
},
}
}
```
## Documentation
### Document Connection Purpose
Add comments or descriptions to clarify the purpose of connections, especially in complex workflows:
- **What data is being passed**: Document the key fields and their purpose
- **Why this connection exists**: Explain the relationship between blocks
- **Any transformations or conditions applied**: Note any data processing that occurs
```javascript
// Example: Documenting connection purpose in a Function block
/*
* This function processes user data from the UserFetcher block
* and order history from the OrderHistory block to generate
* personalized product recommendations.
*
* Input:
* - userBlock: User profile data (id, preferences, history)
* - orderBlock: Recent order history (items, dates, amounts)
*
* Output:
* - recommendations: Array of recommended product IDs
* - userSegment: Calculated user segment for marketing
* - conversionProbability: Estimated likelihood of purchase
*/
function generateRecommendations() {
// Implementation...
}
```
## Testing and Debugging
### Test Connection References
Verify that connection references work as expected:
- **Test with different input values** to ensure robustness
- **Check edge cases** (empty values, large datasets, special characters)
- **Ensure error handling for missing or invalid data**
- **Use console logging in Function blocks** to debug connection issues
```javascript
// Example: Testing connection references with edge cases
function testConnections() {
console.log('Testing connections...')
// Log all inputs for debugging
console.log('All inputs:', JSON.stringify(input, null, 2))
// Test for missing data
const hasUserData = !!input.userBlock
console.log('Has user data:', hasUserData)
// Test edge cases
const items = input.orderBlock?.items || []
console.log('Item count:', items.length)
console.log('Empty items test:', items.length === 0 ? 'Passed' : 'Failed')
// Return test results
return {
tests: {
hasUserData,
hasItems: items.length > 0,
hasLargeOrder: items.length > 10,
},
}
}
```
## Performance Considerations
### Optimize Data Flow
Keep your workflows efficient by optimizing how data flows through connections:
- **Pass only necessary data** between blocks to reduce memory usage
- **Use Function blocks to filter large datasets** before passing them on
- **Consider caching results** for expensive operations
- **Break complex workflows into smaller, reusable components**
```javascript
// Example: Optimizing data flow by filtering
function optimizeUserData() {
const userData = input.userBlock
// Only pass necessary fields to downstream blocks
return {
id: userData.id,
name: userData.name,
email: userData.email,
// Filter out unnecessary profile data, history, etc.
}
}
```
## Security Best Practices
### Secure Sensitive Data
Protect sensitive information when using connections:
- **Never expose API keys or credentials** in connection data
- **Sanitize user input** before processing it
- **Redact sensitive information** when logging connection data
- **Use secure connections** for external API calls
<Callout type="warning">
Be careful when logging connection data that might contain sensitive information. Always redact or
mask sensitive fields like passwords, API keys, or personal information.
</Callout>
## Advanced Patterns
### Conditional Connections
Use Condition blocks to create dynamic workflows:
- **Route data based on content** to different processing paths
- **Implement fallback paths** for error handling
- **Create decision trees** for complex business logic
### Feedback Loops
Create more sophisticated workflows with feedback connections:
- **Implement iterative processing** by connecting later blocks back to earlier ones
- **Use Memory blocks** to store state between iterations
- **Set termination conditions** to prevent infinite loops

View File

@@ -1,192 +0,0 @@
---
title: Connection Data Structure
description: Understanding the data structure of different block outputs
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
When you connect blocks, the output data structure from the source block determines what values are available in the destination block. Each block type produces a specific output structure that you can reference in downstream blocks.
<Callout type="info">
Understanding these data structures is essential for effectively using connection tags and
accessing the right data in your workflows.
</Callout>
## Block Output Structures
Different block types produce different output structures. Here's what you can expect from each block type:
<Tabs items={['Agent Output', 'API Output', 'Function Output', 'Evaluator Output', 'Condition Output', 'Router Output']}>
<Tab>
```json
{
"content": "The generated text response",
"model": "gpt-4o",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"toolCalls": [...],
"cost": [...],
"usage": [...]
}
```
### Agent Block Output Fields
- **content**: The main text response generated by the agent
- **model**: The AI model used (e.g., "gpt-4o", "claude-3-opus")
- **tokens**: Token usage statistics
- **prompt**: Number of tokens in the prompt
- **completion**: Number of tokens in the completion
- **total**: Total tokens used
- **toolCalls**: Array of tool calls made by the agent (if any)
- **cost**: Array of cost objects for each tool call (if any)
- **usage**: Token usage statistics for the entire response
</Tab>
<Tab>
```json
{
"data": "Response data",
"status": 200,
"headers": {
"content-type": "application/json",
"cache-control": "no-cache"
}
}
```
### API Block Output Fields
- **data**: The response data from the API (can be any type)
- **status**: HTTP status code of the response
- **headers**: HTTP headers returned by the API
</Tab>
<Tab>
```json
{
"result": "Function return value",
"stdout": "Console output",
"executionTime": 45
}
```
### Function Block Output Fields
- **result**: The return value of the function (can be any type)
- **stdout**: Console output captured during function execution
- **executionTime**: Time taken to execute the function (in milliseconds)
</Tab>
<Tab>
```json
{
"content": "Evaluation summary",
"model": "gpt-4o",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"metric1": 8.5,
"metric2": 7.2,
"metric3": 9.0
}
```
### Evaluator Block Output Fields
- **content**: Summary of the evaluation
- **model**: The AI model used for evaluation
- **tokens**: Token usage statistics
- **[metricName]**: Score for each metric defined in the evaluator (dynamic fields)
</Tab>
<Tab>
```json
{
"content": "Original content passed through",
"conditionResult": true,
"selectedPath": {
"blockId": "2acd9007-27e8-4510-a487-73d3b825e7c1",
"blockType": "agent",
"blockTitle": "Follow-up Agent"
},
"selectedConditionId": "condition-1"
}
```
### Condition Block Output Fields
- **content**: The original content passed through
- **conditionResult**: Boolean result of the condition evaluation
- **selectedPath**: Information about the selected path
- **blockId**: ID of the next block in the selected path
- **blockType**: Type of the next block
- **blockTitle**: Title of the next block
- **selectedConditionId**: ID of the selected condition
</Tab>
<Tab>
```json
{
"content": "Routing decision",
"model": "gpt-4o",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"selectedPath": {
"blockId": "2acd9007-27e8-4510-a487-73d3b825e7c1",
"blockType": "agent",
"blockTitle": "Customer Service Agent"
}
}
```
### Router Block Output Fields
- **content**: The routing decision text
- **model**: The AI model used for routing
- **tokens**: Token usage statistics
- **selectedPath**: Information about the selected path
- **blockId**: ID of the selected destination block
- **blockType**: Type of the selected block
- **blockTitle**: Title of the selected block
</Tab>
</Tabs>
## Custom Output Structures
Some blocks may produce custom output structures based on their configuration:
1. **Agent Blocks with Response Format**: When using a response format in an Agent block, the output structure will match the defined schema instead of the standard structure.
2. **Function Blocks**: The `result` field can contain any data structure returned by your function code.
3. **API Blocks**: The `data` field will contain whatever the API returns, which could be any valid JSON structure.
<Callout type="warning">
Always check the actual output structure of your blocks during development to ensure you're
referencing the correct fields in your connections.
</Callout>
## Nested Data Structures
Many block outputs contain nested data structures. You can access these using dot notation in connection tags:
```
<blockId.path.to.nested.data>
```
For example:
- `<agent1.tokens.total>` - Access the total tokens from an Agent block
- `<api1.data.results[0].id>` - Access the ID of the first result from an API response
- `<function1.result.calculations.total>` - Access a nested field in a Function block's result

View File

@@ -1,41 +0,0 @@
---
title: Connections
description: Connect your blocks to one another.
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { ConnectIcon } from '@/components/icons'
Connections are the pathways that allow data to flow between blocks in your workflow. They define how information is passed from one block to another, enabling you to create sophisticated, multi-step processes.
<Callout type="info">
Properly configured connections are essential for creating effective workflows. They determine how
data moves through your system and how blocks interact with each other.
</Callout>
<div>
<video autoPlay loop muted playsInline className="w-full" src="/connections.mp4"></video>
</div>
## Connection Types
Sim Studio supports different types of connections that enable various workflow patterns:
<Cards>
<Card title="Connection Basics" href="/connections/basics">
Learn how connections work and how to create them in your workflows
</Card>
<Card title="Connection Tags" href="/connections/tags">
Understand how to use connection tags to reference data between blocks
</Card>
<Card title="Data Structure" href="/connections/data-structure">
Explore the output data structures of different block types
</Card>
<Card title="Accessing Data" href="/connections/accessing-data">
Learn techniques for accessing and manipulating connected data
</Card>
<Card title="Best Practices" href="/connections/best-practices">
Follow recommended patterns for effective connection management
</Card>
</Cards>

View File

@@ -1,4 +0,0 @@
{
"title": "Connections",
"pages": ["basics", "tags", "data-structure", "accessing-data", "best-practices"]
}

View File

@@ -1,109 +0,0 @@
---
title: Connection Tags
description: Using connection tags to reference data between blocks
---
import { Callout } from 'fumadocs-ui/components/callout'
Connection tags are visual representations of the data available from connected blocks. They provide an easy way to reference outputs from previous blocks in your workflow.
<div>
<video autoPlay loop muted playsInline className="w-full" src="/connections.mp4"></video>
</div>
### What Are Connection Tags?
Connection tags are interactive elements that appear when blocks are connected. They represent the data that can flow from one block to another and allow you to:
- Visualize available data from source blocks
- Reference specific data fields in destination blocks
- Create dynamic data flows between blocks
<Callout type="info">
Connection tags make it easy to see what data is available from previous blocks and use it in your
current block without having to remember complex data structures.
</Callout>
## Using Connection Tags
There are two primary ways to use connection tags in your workflows:
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Drag and Drop</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Click on a connection tag and drag it into input fields of destination blocks. A dropdown will
appear showing available values.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Hover over a connection tag to see available data</li>
<li>Click and drag the tag to an input field</li>
<li>Select the specific data field from the dropdown</li>
<li>The reference is inserted automatically</li>
</ol>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Angle Bracket Syntax</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Type <code>&lt;&gt;</code> in input fields to see a dropdown of available connection values
from previous blocks.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Click in any input field where you want to use connected data</li>
<li>
Type <code>&lt;&gt;</code> to trigger the connection dropdown
</li>
<li>Browse and select the data you want to reference</li>
<li>Continue typing or select from the dropdown to complete the reference</li>
</ol>
</div>
</div>
## Tag Syntax
Connection tags use a simple syntax to reference data:
```
<blockId.path.to.data>
```
Where:
- `blockId` is the identifier of the source block
- `path.to.data` is the path to the specific data field
For example:
- `<agent1.content>` - References the content field from a block with ID "agent1"
- `<api2.data.users[0].name>` - References the name of the first user in the users array from the data field of a block with ID "api2"
## Dynamic Tag References
Connection tags are evaluated at runtime, which means:
1. They always reference the most current data
2. They can be used in expressions and combined with static text
3. They can be nested within other data structures
### Examples
```javascript
// Reference in text
"The user's name is <userBlock.name>"
// Reference in JSON
{
"userName": "<userBlock.name>",
"orderTotal": <apiBlock.data.total>
}
// Reference in code
const greeting = "Hello, <userBlock.name>!";
const total = <apiBlock.data.total> * 1.1; // Add 10% tax
```
<Callout type="warning">
When using connection tags in numeric contexts, make sure the referenced data is actually a number
to avoid type conversion issues.
</Callout>

View File

@@ -0,0 +1,280 @@
---
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.
<div className="flex justify-center">
<Image
src="/static/blocks/agent.png"
alt="Agent-Block-Konfiguration"
width={500}
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>
## Konfigurationsoptionen
### System-Prompt
Der System-Prompt legt die Betriebsparameter und Verhaltenseinschränkungen des Agenten fest. Diese Konfiguration definiert die Rolle des Agenten, die Antwortmethodik und die Verarbeitungsgrenzen für alle eingehenden Anfragen.
```markdown
You are a helpful assistant that specializes in financial analysis.
Always provide clear explanations and cite sources when possible.
When responding to questions about investments, include risk disclaimers.
```
### Benutzer-Prompt
Der Benutzer-Prompt stellt die primären Eingabedaten für die Inferenzverarbeitung dar. Dieser Parameter akzeptiert natürlichsprachlichen Text oder strukturierte Daten, die der Agent analysieren und auf die er reagieren wird. Zu den Eingabequellen gehören:
- **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
### 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>
### Temperatur
Steuern Sie die Kreativität und Zufälligkeit 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>
### API-Schlüssel
Ihr API-Schlüssel für den ausgewählten LLM-Anbieter. Dieser wird sicher gespeichert und für die Authentifizierung verwendet.
### 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.
**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**:
- **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
- **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>
### 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:
```json
{
"name": "user_analysis",
"schema": {
"type": "object",
"properties": {
"sentiment": {
"type": "string",
"enum": ["positive", "negative", "neutral"]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": ["sentiment", "confidence"]
}
}
```
Diese Konfiguration beschränkt die Ausgabe des Modells auf die Einhaltung des angegebenen Schemas, verhindert Freitext-Antworten und stellt eine strukturierte Datengenerierung 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)
## 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.
- 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.
## Eingaben und 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>
## Beispielanwendungsfälle
### Automatisierung des Kundenservice
<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>
### Multi-Modell-Inhaltsanalyse
<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>
### Werkzeuggestützter Forschungsassistent
<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>
## 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.

View File

@@ -0,0 +1,232 @@
---
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.
<div className="flex justify-center">
<Image
src="/static/blocks/api.png"
alt="API-Block"
width={500}
height={400}
className="my-6"
/>
</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:
- Eine statische URL, die direkt im Block eingegeben wird
- Eine dynamische URL, die mit der Ausgabe eines anderen Blocks verbunden ist
- Eine URL mit Pfadparametern
### Methode
Wählen Sie die HTTP-Methode für Ihre Anfrage:
- **GET**: Daten vom Server abrufen
- **POST**: Daten an den Server senden, um eine Ressource zu erstellen
- **PUT**: Eine bestehende Ressource auf dem Server aktualisieren
- **DELETE**: Eine Ressource vom Server entfernen
- **PATCH**: Eine bestehende Ressource teilweise aktualisieren
### Abfrageparameter
Definieren Sie Schlüssel-Wert-Paare, die als Abfrageparameter an die URL angehängt werden. Zum Beispiel:
```
Key: apiKey
Value: your_api_key_here
Key: limit
Value: 10
```
Diese würden der URL als `?apiKey=your_api_key_here&limit=10` hinzugefügt werden.
### Header
Konfigurieren Sie HTTP-Header für Ihre Anfrage. Häufige Header sind:
```
Key: Content-Type
Value: application/json
Key: Authorization
Value: Bearer your_token_here
```
### Anfrage-Body
Für Methoden, die einen Anfrage-Body unterstützen (POST, PUT, PATCH), können Sie die zu sendenden Daten definieren. Der Body 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
### Zugriff auf Ergebnisse
Nach Abschluss einer API-Anfrage können Sie auf folgende Ausgaben zugreifen:
- **`<api.data>`**: Die Antwortdaten vom API
- **`<api.status>`**: HTTP-Statuscode (200, 404, 500, usw.)
- **`<api.headers>`**: Antwort-Header vom Server
- **`<api.error>`**: Fehlerdetails, falls die Anfrage fehlgeschlagen ist
## Erweiterte Funktionen
### Dynamische URL-Konstruktion
Bauen Sie URLs dynamisch mit Variablen aus vorherigen Blöcken:
```javascript
// In a Function block before the API
const userId = <start.userId>;
const apiUrl = `https://api.example.com/users/${userId}/profile`;
```
### Anfrage-Wiederholungen
Der API-Block behandelt automatisch:
- Netzwerk-Timeouts mit exponentiellem Backoff
- Rate-Limit-Antworten (429-Statuscodes)
- Serverfehler (5xx-Statuscodes) mit Wiederholungslogik
- Verbindungsfehler mit Wiederverbindungsversuchen
### Antwortvalidierung
Validieren Sie API-Antworten vor der Verarbeitung:
```javascript
// In a Function block after the API
if (<api.status> === 200) {
const data = <api.data>;
// Process successful response
} else {
// Handle error response
console.error(`API Error: ${<api.status>}`);
}
```
## Eingaben und 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>
## Beispielanwendungsfälle
### Benutzerprofildaten 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>
### Zahlungsabwicklung
<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>
## Best Practices
- **Umgebungsvariablen für sensible Daten verwenden**: Keine API-Schlüssel oder Anmeldedaten im Code hinterlegen
- **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

View File

@@ -0,0 +1,242 @@
---
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.
<div className="flex justify-center">
<Image
src="/static/blocks/condition.png"
alt="Bedingungsblock"
width={500}
height={350}
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
- **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.
### Format für Bedingungsausdrücke
Bedingungen verwenden JavaScript-Syntax und können auf Eingabewerte aus vorherigen Blöcken verweisen.
<Tabs items={['Schwellenwert', 'Textanalyse', 'Mehrere Bedingungen']}>
<Tab>
```javascript
// Check if a score is above a threshold
<agent.score> > 75
```
</Tab>
<Tab>
```javascript
// Check if a text contains specific keywords
<agent.text>.includes('urgent') || <agent.text>.includes('emergency')
```
</Tab>
<Tab>
```javascript
// Check multiple conditions
<agent.age> >= 18 && <agent.country> === 'US'
```
</Tab>
</Tabs>
### Zugriff auf Ergebnisse
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
## Erweiterte Funktionen
### Komplexe Ausdrücke
Verwenden Sie JavaScript-Operatoren und -Funktionen in Bedingungen:
```javascript
// String operations
<user.email>.endsWith('@company.com')
// Array operations
<api.tags>.includes('urgent')
// Mathematical operations
<agent.confidence> * 100 > 85
// Date comparisons
new Date(<api.created_at>) > new Date('2024-01-01')
```
### Auswertung mehrerer Bedingungen
Bedingungen werden der Reihe nach ausgewertet, bis eine übereinstimmt:
```javascript
// Condition 1: Check for high priority
<ticket.priority> === 'high'
// Condition 2: Check for urgent keywords
<ticket.subject>.toLowerCase().includes('urgent')
// Condition 3: Default fallback
true
```
### Fehlerbehandlung
Bedingungen behandeln automatisch:
- Undefinierte oder Null-Werte mit sicherer Auswertung
- Typabweichungen mit geeigneten Fallbacks
- Ungültige Ausdrücke mit Fehlerprotokollierung
- Fehlende Variablen mit Standardwerten
## Eingaben und 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>
## Beispielanwendungsfälle
### Routing im Kundenservice
<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>
### Inhaltsmoderation
<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>
### Benutzer-Onboarding-Prozess
<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>
## Best Practices
- **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
- **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

@@ -0,0 +1,199 @@
---
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.
<div className="flex justify-center">
<Image
src="/static/blocks/evaluator.png"
alt="Evaluator-Block-Konfiguration"
width={500}
height={400}
className="my-6"
/>
</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:
- **Name**: Eine kurze Bezeichnung für die Metrik
- **Beschreibung**: Eine detaillierte Erklärung dessen, was die Metrik misst
- **Bereich**: Der numerische Bereich für die Bewertung (z.B. 1-5, 0-10)
Beispielmetriken:
```
Accuracy (1-5): How factually accurate is the content?
Clarity (1-5): How clear and understandable is the content?
Relevance (1-5): How relevant is the content to the original query?
```
### Inhalt
Der zu bewertende Inhalt. Dies kann sein:
- Direkt in der Blockkonfiguration bereitgestellt
- Verbunden mit der Ausgabe eines anderen Blocks (typischerweise ein Agent-Block)
- Dynamisch während der Workflow-Ausführung generiert
### Modellauswahl
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
<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.
### 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
<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>
### A/B-Testing von Inhalten
<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>
### Qualitätskontrolle im Kundensupport
<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>
## Eingaben und 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>
## 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
- **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

View File

@@ -0,0 +1,156 @@
---
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.
<div className="flex justify-center">
<Image
src="/static/blocks/function.png"
alt="Funktionsblock mit Code-Editor"
width={500}
height={350}
className="my-6"
/>
</div>
## Überblick
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>
## Beispielanwendungsfälle
### Datenverarbeitungspipeline
<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>
### Implementierung von Geschäftslogik
<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>
### Datenvalidierung und -bereinigung
<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>
### Beispiel: Treuepunkte-Rechner
```javascript title="loyalty-calculator.js"
// Process customer data and calculate loyalty score
const { purchaseHistory, accountAge, supportTickets } = <agent>;
// Calculate metrics
const totalSpent = purchaseHistory.reduce((sum, purchase) => sum + purchase.amount, 0);
const purchaseFrequency = purchaseHistory.length / (accountAge / 365);
const ticketRatio = supportTickets.resolved / supportTickets.total;
// Calculate loyalty score (0-100)
const spendScore = Math.min(totalSpent / 1000 * 30, 30);
const frequencyScore = Math.min(purchaseFrequency * 20, 40);
const supportScore = ticketRatio * 30;
const loyaltyScore = Math.round(spendScore + frequencyScore + supportScore);
return {
customer: <agent.name>,
loyaltyScore,
loyaltyTier: loyaltyScore >= 80 ? "Platinum" : loyaltyScore >= 60 ? "Gold" : "Silver",
metrics: { spendScore, frequencyScore, supportScore }
};
```
## Best Practices
- **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

View File

@@ -0,0 +1,250 @@
---
title: Guardrails
---
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 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={350}
className="my-6"
/>
</div>
## Übersicht
Mit dem Guardrails-Block können Sie:
<Steps>
<Step>
<strong>JSON-Struktur validieren</strong>: Stellen Sie sicher, dass LLM-Ausgaben gültiges JSON sind, bevor sie geparst werden
</Step>
<Step>
<strong>Regex-Muster abgleichen</strong>: Überprüfen Sie, ob Inhalte bestimmten Formaten entsprechen (E-Mails, Telefonnummern, URLs usw.)
</Step>
<Step>
<strong>Halluzinationen erkennen</strong>: Nutzen Sie RAG + LLM-Scoring, um KI-Ausgaben anhand von Wissensdatenbankinhalten zu validieren
</Step>
<Step>
<strong>PII erkennen</strong>: Identifizieren und optional maskieren Sie personenbezogene Daten über mehr als 40 Entitätstypen hinweg
</Step>
</Steps>
## Validierungstypen
### JSON-Validierung
Überprüft, ob Inhalte korrekt formatiertes JSON sind. Perfekt, um sicherzustellen, dass strukturierte LLM-Ausgaben sicher geparst werden können.
**Anwendungsfälle:**
- Validieren von JSON-Antworten aus Agent-Blöcken vor dem Parsen
- Sicherstellen, dass API-Payloads korrekt formatiert sind
- Überprüfen der Integrität strukturierter Daten
**Output:**
- `passed`: `true` wenn gültiges JSON, sonst `false`
- `error`: Fehlermeldung bei fehlgeschlagener Validierung (z.B. "Invalid JSON: Unexpected token...")
### Regex-Validierung
Überprüft, ob Inhalte einem bestimmten regulären Ausdrucksmuster entsprechen.
**Anwendungsfälle:**
- Validieren von E-Mail-Adressen
- Überprüfen von Telefonnummernformaten
- Verifizieren von URLs oder benutzerdefinierten Kennungen
- Durchsetzen spezifischer Textmuster
**Konfiguration:**
- **Regex-Muster**: Der reguläre Ausdruck, der abgeglichen werden soll (z.B. `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` für E-Mails)
**Output:**
- `passed`: `true` wenn der Inhalt dem Muster entspricht, `false` andernfalls
- `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. Durchsucht Ihre Wissensdatenbank nach relevantem Kontext
2. Sendet sowohl die KI-Ausgabe als auch den abgerufenen Kontext an ein LLM
3. LLM weist einen Konfidenzwert zu (Skala 0-10)
- **0** = Vollständige Halluzination (völlig unbegründet)
- **10** = Vollständig fundiert (komplett durch Wissensdatenbank gestützt)
4. Validierung besteht, wenn der Wert ≥ Schwellenwert (Standard: 3)
**Konfiguration:**
- **Wissensdatenbank**: Auswahl aus Ihren vorhandenen Wissensdatenbanken
- **Modell**: LLM für die Bewertung wählen (erfordert starkes Reasoning - GPT-4o, Claude 3.7 Sonnet empfohlen)
- **API-Schlüssel**: Authentifizierung für den ausgewählten LLM-Anbieter (automatisch ausgeblendet für gehostete/Ollama-Modelle)
- **Konfidenz-Schwellenwert**: Mindestwert zum Bestehen (0-10, Standard: 3)
- **Top K** (Erweitert): Anzahl der abzurufenden Wissensdatenbank-Chunks (Standard: 10)
**Output:**
- `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
- Sicherstellen, dass Kundenservice-Antworten sachlich korrekt sind
- Überprüfen, ob generierte Inhalte mit dem Quellmaterial übereinstimmen
- Qualitätskontrolle für RAG-Anwendungen
### PII-Erkennung
Erkennt personenbezogene Daten mit Microsoft Presidio. Unterstützt über 40 Entitätstypen in mehreren Ländern und Sprachen.
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="guardrails.mp4" width={500} height={350} />
</div>
**Funktionsweise:**
1. Scannt Inhalte nach PII-Entitäten mittels Mustererkennung und NLP
2. Gibt erkannte Entitäten mit Positionen und Konfidenzwerten zurück
3. Maskiert optional erkannte PII in der Ausgabe
**Konfiguration:**
- **Zu erkennende PII-Typen**: Auswahl aus gruppierten Kategorien über Modal-Selektor
- **Allgemein**: Personenname, E-Mail, Telefon, Kreditkarte, IP-Adresse usw.
- **USA**: SSN, 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, wenn die Validierung fehlschlägt
**Anwendungsfälle:**
- Blockieren von Inhalten mit sensiblen persönlichen Informationen
- Maskieren von PII vor der Protokollierung oder Speicherung von Daten
- Einhaltung von DSGVO, HIPAA und anderen Datenschutzbestimmungen
- Bereinigung von Benutzereingaben vor der Verarbeitung
## Konfiguration
### Zu validierender Inhalt
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 liefern zurück:
- **`<guardrails.passed>`**: Boolean, der angibt, ob die Validierung erfolgreich war
- **`<guardrails.validationType>`**: Die Art der durchgeführten Validierung
- **`<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 maskierter PII (wenn Modus = "Mask")
## Beispielanwendungsfälle
### JSON vor dem Parsen validieren
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Sicherstellen, dass die Agent-Ausgabe gültiges JSON ist</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent generiert strukturierte JSON-Antwort</li>
<li>Guardrails validiert das JSON-Format</li>
<li>Bedingungsblock prüft `<guardrails.passed>`</li>
<li>Bei Erfolg → Daten parsen und verwenden, Bei Fehler → Wiederholen oder Fehler behandeln</li>
</ol>
</div>
### Halluzinationen verhindern
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Validierung von Kundendienstantworten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent generiert Antwort auf Kundenfrage</li>
<li>Guardrails prüft gegen die Wissensdatenbank der Support-Dokumentation</li>
<li>Wenn Konfidenzwert ≥ 3 → Antwort senden</li>
<li>Wenn Konfidenzwert \< 3 → Für manuelle Überprüfung markieren</li>
</ol>
</div>
### PII in Benutzereingaben blockieren
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Bereinigung von benutzergenerierten Inhalten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Benutzer reicht Formular mit Textinhalt ein</li>
<li>Guardrails erkennt PII (E-Mails, Telefonnummern, Sozialversicherungsnummern usw.)</li>
<li>Bei erkannter PII → Einreichung ablehnen oder sensible Daten maskieren</li>
<li>Ohne PII → Normal verarbeiten</li>
</ol>
</div>
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="guardrails-example.mp4" width={500} height={350} />
</div>
### E-Mail-Format validieren
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: E-Mail-Adressformat überprüfen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent extrahiert E-Mail aus Text</li>
<li>Guardrails validiert mit Regex-Muster</li>
<li>Bei Gültigkeit → E-Mail für Benachrichtigung verwenden</li>
<li>Bei Ungültigkeit → Korrektur anfordern</li>
</ol>
</div>
## Best Practices
- **Verkettung mit Condition-Blöcken**: Verwende `<guardrails.passed>` um Workflow-Logik basierend auf Validierungsergebnissen zu verzweigen
- **JSON-Validierung vor dem Parsen verwenden**: Validiere immer die JSON-Struktur, bevor du versuchst, LLM-Ausgaben zu parsen
- **Passende PII-Typen auswählen**: Wähle nur die PII-Entitätstypen aus, die für deinen Anwendungsfall relevant sind, um bessere Leistung zu erzielen
- **Vernünftige Konfidenz-Schwellenwerte festlegen**: Passe für die Halluzinationserkennung den Schwellenwert basierend auf deinen Genauigkeitsanforderungen an (höher = strenger)
- **Starke Modelle für Halluzinationserkennung verwenden**: GPT-4o oder Claude 3.7 Sonnet bieten genauere Konfidenz-Bewertungen
- **PII für Logging maskieren**: Verwende den "Mask"-Modus, wenn du Inhalte protokollieren oder speichern musst, die PII enthalten könnten
- **Regex-Muster testen**: Validiere deine Regex-Muster gründlich, bevor du sie in der Produktion einsetzt
- **Validierungsfehler überwachen**: Verfolge `<guardrails.error>` Nachrichten, um häufige Validierungsprobleme zu identifizieren
<Callout type="info">
Guardrails-Validierung erfolgt synchron in deinem Workflow. Für die Halluzinationserkennung solltest du schnellere Modelle (wie GPT-4o-mini) wählen, wenn Latenz kritisch ist.
</Callout>

View File

@@ -0,0 +1,139 @@
---
title: Übersicht
description: Die Bausteine deiner KI-Workflows
---
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Video } from '@/components/ui/video'
Blöcke sind die Bausteine, die du miteinander verbindest, um KI-Workflows zu erstellen. Betrachte sie als spezialisierte Module, die jeweils eine bestimmte Aufgabe übernehmen vom Chatten mit KI-Modellen über API-Aufrufe bis hin zur Datenverarbeitung.
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="connections.mp4" width={700} height={450} />
</div>
## Grundlegende Blocktypen
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)
- **[Function](/blocks/function)** - Führe benutzerdefinierten JavaScript/TypeScript-Code aus
- **[API](/blocks/api)** - Verbinde dich mit externen Diensten über HTTP-Anfragen
### Logikblöcke
- **[Condition](/blocks/condition)** - Verzweige Workflow-Pfade basierend auf booleschen Ausdrücken
- **[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
### Ausgabeblöcke
- **[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 steuern, wie der Block sich verhält
**Ausgaben**: Daten, die der Block für andere Blöcke zur Verwendung erzeugt
<Steps>
<Step>
<strong>Eingabe empfangen</strong>: Block erhält Daten von verbundenen Blöcken oder Benutzereingaben
</Step>
<Step>
<strong>Verarbeiten</strong>: Block verarbeitet die Eingabe gemäß seiner Konfiguration
</Step>
<Step>
<strong>Ergebnisse ausgeben</strong>: Block erzeugt Ausgabedaten für die nächsten Blöcke im Workflow
</Step>
</Steps>
## Blöcke verbinden
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 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">
<Video src="connections.mp4" width={700} height={450} />
</div>
## Häufige Muster
### Sequentielle Verarbeitung
Verbinden Sie Blöcke in einer Kette, wobei jeder Block die Ausgabe des vorherigen verarbeitet:
```
User Input → Agent → Function → Response
```
### Bedingte Verzweigung
Verwenden Sie Bedingung- oder Router-Blöcke, um verschiedene Pfade zu erstellen:
```
User Input → Router → Agent A (for questions)
→ Agent B (for commands)
```
### Qualitätskontrolle
Verwenden Sie Evaluator-Blöcke, um Ausgaben zu bewerten und zu filtern:
```
Agent → Evaluator → Condition → Response (if good)
→ Agent (retry if bad)
```
## Block-Konfiguration
Jeder Blocktyp hat spezifische Konfigurationsoptionen:
**Alle Blöcke**:
- Eingabe-/Ausgabeverbindungen
- Fehlerbehandlungsverhalten
- Einstellungen für Ausführungs-Timeout
**KI-Blöcke** (Agent, Router, Evaluator):
- Modellauswahl (OpenAI, Anthropic, Google, lokal)
- API-Schlüssel und Authentifizierung
- Temperatur und andere Modellparameter
- Systemaufforderungen und Anweisungen
**Logik-Blöcke** (Bedingung, Funktion):
- Benutzerdefinierte Ausdrücke oder Code
- Variablenreferenzen
- Einstellungen für Ausführungsumgebung
**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 erstellen
</Card>
<Card title="Funktions-Block" href="/blocks/function">
Benutzerdefinierten Code ausführen, um Daten zu verarbeiten und zu transformieren
</Card>
<Card title="API-Block" href="/blocks/api">
Integration mit externen Diensten und APIs
</Card>
<Card title="Bedingungs-Block" href="/blocks/condition">
Verzweigende Logik basierend auf Datenbewertung erstellen
</Card>
<Card title="Variablen-Block" href="/blocks/variables">
Workflow-bezogene Variablen setzen und verwalten
</Card>
<Card title="Warte-Block" href="/blocks/wait">
Workflow-Ausführung für bestimmte Zeitverzögerungen pausieren
</Card>
</Cards>

View File

@@ -0,0 +1,279 @@
---
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 Schleifenblock unterstützt vier Arten der Iteration:
<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.
</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>Auf Bedingungen basierte Schleifen</strong>: Ausführung fortsetzen, während oder bis eine Bedingung erfüllt ist
</Step>
<Step>
<strong>Ergebnisse aggregieren</strong>: Ausgaben aus allen Schleifendurchläufen 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 vier Arten von Schleifen:
<Tabs items={['For-Schleife', 'ForEach-Schleife', 'While-Schleife', 'Do-While-Schleife']}>
<Tab>
**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-Schleife mit Iterationen"
width={500}
height={400}
className="my-6"
/>
</div>
Verwende diese, wenn du eine Operation eine bestimmte Anzahl von Malen wiederholen musst.
```
Example: Run 5 times
- Iteration 1
- Iteration 2
- Iteration 3
- Iteration 4
- Iteration 5
```
</Tab>
<Tab>
**ForEach-Schleife (Sammlung)** - Eine sammlungsbasierte Schleife, die über jedes Element in einem Array oder Objekt iteriert:
<div className="flex justify-center">
<Image
src="/static/blocks/loop-2.png"
alt="ForEach-Schleife mit Sammlung"
width={500}
height={400}
className="my-6"
/>
</div>
Verwende diese, wenn du eine Sammlung von Elementen verarbeiten musst.
```
Example: Process ["apple", "banana", "orange"]
- Iteration 1: Process "apple"
- Iteration 2: Process "banana"
- Iteration 3: Process "orange"
```
</Tab>
<Tab>
**While-Schleife (Bedingungsbasiert)** - Wird weiter 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-3.png"
alt="Do-While-Schleife mit Bedingung"
width={500}
height={400}
className="my-6"
/>
</div>
Verwende diese, wenn du mindestens eine Ausführung benötigst und dann eine Schleife, 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
### Eine Schleife erstellen
1. Ziehe einen Schleifenblock aus der Werkzeugleiste auf deine Leinwand
2. Konfiguriere den Schleifentyp und die Parameter
3. Ziehe andere Blöcke in den Schleifencontainer
4. Verbinde die Blöcke nach Bedarf
### Auf Ergebnisse zugreifen
Nach Abschluss einer Schleife können Sie auf die aggregierten Ergebnisse zugreifen:
- **`<loop.results>`**: Array mit Ergebnissen aus allen Schleifendurchläufen
## Beispielanwendungsfälle
### Verarbeitung von API-Ergebnissen
<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>
### Iterative Inhaltserstellung
<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>
### Zähler mit While-Schleife
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Elemente mit zählerbasierter Schleife verarbeiten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Workflow-Variable initialisieren: `i = 0`</li>
<li>While-Schleife mit Bedingung: `<variable.i>` \< 10</li>
<li>Innerhalb der Schleife: Agent verarbeitet Element am Index `<variable.i>`</li>
<li>Innerhalb der Schleife: Variable erhöht `i = <variable.i> + 1`</li>
<li>Schleife wird fortgesetzt, solange i kleiner als 10 ist</li>
</ol>
</div>
## Erweiterte Funktionen
### Einschränkungen
<Callout type="warning">
Container-Blöcke (Schleifen und Parallele) können nicht ineinander verschachtelt werden. Das bedeutet:
- Sie können keinen Schleifenblock in einem anderen Schleifenblock platzieren
- Sie können keinen Parallelblock in einem Schleifenblock platzieren
- Sie können keinen Container-Block in einem anderen Container-Block platzieren
Wenn Sie mehrdimensionale Iterationen benötigen, sollten Sie Ihren Workflow umstrukturieren, 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.
</Callout>
## Eingaben und Ausgaben
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Schleifentyp</strong>: Wählen Sie zwischen 'for', 'forEach', 'while' oder 'doWhile'
</li>
<li>
<strong>Iterationen</strong>: Anzahl der Ausführungen (für for-Schleifen)
</li>
<li>
<strong>Sammlung</strong>: Array oder Objekt, über das iteriert werden soll (forEach-Schleifen)
</li>
<li>
<strong>Bedingung</strong>: Boolescher Ausdruck zur Auswertung (while/do-while-Schleifen)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>loop.currentItem</strong>: Aktuell verarbeitetes Element
</li>
<li>
<strong>loop.index</strong>: Aktuelle Iterationsnummer (0-basiert)
</li>
<li>
<strong>loop.items</strong>: Vollständige Sammlung (forEach-Schleifen)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>loop.results</strong>: Array aller Iterationsergebnisse
</li>
<li>
<strong>Struktur</strong>: Ergebnisse behalten die Iterationsreihenfolge bei
</li>
<li>
<strong>Zugriff</strong>: Verfügbar in Blöcken nach der Schleife
</li>
</ul>
</Tab>
</Tabs>
## Bewährte Praktiken
- **Vernünftige Grenzen setzen**: Halten Sie die Anzahl der Iterationen in einem vernünftigen Rahmen, um lange Ausführungszeiten zu vermeiden
- **ForEach für Sammlungen verwenden**: Verwenden Sie ForEach statt For-Schleifen, wenn Sie Arrays oder Objekte verarbeiten
- **Fehler elegant behandeln**: Erwägen Sie, Fehlerbehandlung innerhalb von Schleifen einzubauen, um robuste Workflows zu gewährleisten

View File

@@ -0,0 +1,231 @@
---
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:
<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:
<Tabs items={['Count-based', 'Collection-based']}>
<Tab>
**Anzahlbasierte Parallelität** - Führe eine feste Anzahl paralleler Instanzen aus:
<div className="flex justify-center">
<Image
src="/static/blocks/parallel-1.png"
alt="Anzahlbasierte parallele Ausführung"
width={500}
height={400}
className="my-6"
/>
</div>
Verwende dies, wenn du dieselbe Operation mehrmals gleichzeitig ausführen musst.
```
Example: Run 5 parallel instances
- Instance 1 ┐
- Instance 2 ├─ All execute simultaneously
- Instance 3 │
- Instance 4 │
- Instance 5 ┘
```
</Tab>
<Tab>
**Sammlungsbasierte Parallelität** - Verteile eine Sammlung auf parallele Instanzen:
<div className="flex justify-center">
<Image
src="/static/blocks/parallel-2.png"
alt="Sammlungsbasierte parallele Ausführung"
width={500}
height={400}
className="my-6"
/>
</div>
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" ┘
```
</Tab>
</Tabs>
## Wie man Parallel-Blöcke verwendet
### Einen Parallel-Block erstellen
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
### Auf Ergebnisse zugreifen
Nach Abschluss eines parallelen Blocks können Sie auf aggregierte Ergebnisse zugreifen:
- **`<parallel.results>`**: Array mit Ergebnissen aus allen parallelen Instanzen
## Beispielanwendungsfälle
### Batch-API-Verarbeitung
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Mehrere API-Aufrufe gleichzeitig verarbeiten</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>
</ol>
</div>
### Multi-Modell-KI-Verarbeitung
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Antworten von mehreren KI-Modellen erhalten</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Sammlungsbasierte Parallelverarbeitung über eine Liste von Modell-IDs (z.B. ["gpt-4o", "claude-3.7-sonnet", "gemini-2.5-pro"])</li>
<li>Innerhalb des parallelen Blocks: Das Modell des Agenten wird auf das aktuelle Element aus der Sammlung gesetzt</li>
<li>Nach dem parallelen Block: Vergleichen und Auswählen der besten Antwort</li>
</ol>
</div>
## Erweiterte Funktionen
### Ergebnisaggregation
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, ...]
```
### Instanzisolierung
Jede parallele Instanz läuft unabhängig:
- Separate Variablenbereiche
- Kein gemeinsamer Zustand zwischen Instanzen
- Fehler in einer Instanz beeinflussen andere nicht
### Einschränkungen
<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 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:
- API-Ratenbegrenzungen bei gleichzeitigen Anfragen
- Speichernutzung bei großen Datensätzen
- Maximum von 20 gleichzeitigen Instanzen, um Ressourcenerschöpfung zu vermeiden
</Callout>
## Parallel vs. Loop
Verstehen, wann was zu verwenden ist:
| Funktion | Parallel | Loop |
|---------|----------|------|
| Ausführung | Gleichzeitig | Sequentiell |
| Geschwindigkeit | Schneller für unabhängige Operationen | Langsamer, aber geordnet |
| Reihenfolge | Keine garantierte Reihenfolge | Behält Reihenfolge bei |
| Anwendungsfall | Unabhängige Operationen | Abhängige Operationen |
| Ressourcennutzung | Höher | Niedriger |
## Eingaben und Ausgaben
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
<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)
</li>
<li>
<strong>Collection</strong>: Array oder Objekt zur Verteilung (sammlungsbasiert)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>parallel.currentItem</strong>: Element für diese Instanz
</li>
<li>
<strong>parallel.index</strong>: Instanznummer (0-basiert)
</li>
<li>
<strong>parallel.items</strong>: Vollständige Sammlung (sammlungsbasiert)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>parallel.results</strong>: Array aller Instanzergebnisse
</li>
<li>
<strong>Access</strong>: Verfügbar in Blöcken nach dem Parallel
</li>
</ul>
</Tab>
</Tabs>
## 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
- **Fehlerbehandlung**: Jede Instanz sollte ihre eigenen Fehler angemessen behandeln

View File

@@ -0,0 +1,246 @@
---
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.
<div className="flex justify-center">
<Image
src="/static/blocks/response.png"
alt="Konfiguration des Antwort-Blocks"
width={500}
height={400}
className="my-6"
/>
</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.
</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
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
- Verschachtelte Objekte und Arrays
- Jede gültige JSON-Struktur
### Statuscode
Legen Sie den HTTP-Statuscode für die Antwort fest. Häufige Statuscodes sind:
<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>
<div className="mt-4 text-sm text-gray-600 dark:text-gray-400">
Der Standard-Statuscode ist 200, wenn nicht anders angegeben.
</div>
### Antwort-Header
Konfigurieren Sie zusätzliche HTTP-Header, die in die Antwort aufgenommen werden sollen.
Header werden als Schlüssel-Wert-Paare konfiguriert:
| Schlüssel | Wert |
|-----|-------|
| Content-Type | application/json |
| Cache-Control | no-cache |
| X-API-Version | 1.0 |
## Beispielanwendungsfälle
### API-Endpunkt-Antwort
<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>
### Webhook-Bestätigung
<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>
### Fehlerantwort-Behandlung
<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>
## Eingaben und 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>
## Variablenreferenzen
Verwenden Sie die `<variable.name>` Syntax, um Workflow-Variablen dynamisch in Ihre Antwort einzufügen:
```json
{
"user": {
"id": "<variable.userId>",
"name": "<variable.userName>",
"email": "<variable.userEmail>"
},
"query": "<variable.searchQuery>",
"results": "<variable.searchResults>",
"totalFound": "<variable.resultCount>",
"processingTime": "<variable.executionTime>ms"
}
```
<Callout type="warning">
Variablennamen sind Groß- und Kleinschreibung sensitiv und müssen exakt mit den in Ihrem Workflow verfügbaren Variablen übereinstimmen.
</Callout>
## 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
- **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

View File

@@ -0,0 +1,225 @@
---
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.
<div className="flex justify-center">
<Image
src="/static/blocks/router.png"
alt="Router-Block mit mehreren Pfaden"
width={500}
height={400}
className="my-6"
/>
</div>
## Überblick
Der Router-Block ermöglicht Ihnen:
<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>
## Konfigurationsoptionen
### Inhalt/Prompt
Der Inhalt oder Prompt, den der Router analysiert, um Routing-Entscheidungen zu treffen. Dies kann sein:
- Eine direkte Benutzeranfrage oder -eingabe
- Ausgabe aus einem vorherigen Block
- Eine vom System generierte 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 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
### Modellauswahl
Wählen Sie ein KI-Modell für die Routing-Entscheidung:
**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
<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.
### 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
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>
## Beispielanwendungsfälle
### Kundensupport-Triage
<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>
### Inhaltsklassifizierung
<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>
### Lead-Qualifizierung
<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>
## Best Practices
- **Klare Zielbeschreibungen bereitstellen**: Helfen Sie dem Router zu verstehen, wann jedes Ziel mit spezifischen, detaillierten Beschreibungen ausgewählt werden soll
- **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
- **Routing-Leistung überwachen**: Überprüfen Sie Routing-Entscheidungen regelmäßig und verfeinern Sie Kriterien basierend auf tatsächlichen Nutzungsmustern
- **Geeignete Modelle auswählen**: Verwenden Sie Modelle mit starken Argumentationsfähigkeiten für komplexe Routing-Entscheidungen

View File

@@ -0,0 +1,123 @@
---
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={350}
className="my-6"
/>
</div>
<Callout>
Greife überall in deinem Workflow auf Variablen zu, indem du die `<variable.variableName>` Syntax verwendest.
</Callout>
## Überblick
Der Variablen-Block ermöglicht dir:
<Steps>
<Step>
<strong>Workflow-Variablen aktualisieren</strong>: Ändere Variablenwerte während der Ausführung
</Step>
<Step>
<strong>Dynamische Daten speichern</strong>: Erfasse Block-Ausgaben in Variablen
</Step>
<Step>
<strong>Zustand beibehalten</strong>: Verfolge Zähler, Flags und Zwischenergebnisse
</Step>
</Steps>
## Wie man Variablen verwendet
### 1. Im Workflow-Variablenbereich initialisieren
Erstelle zunächst deine Variablen im Variablen-Bereich des Workflows (zugänglich über die Workflow-Einstellungen):
```
customerEmail = ""
retryCount = 0
currentStatus = "pending"
```
### 2. Mit dem Variablen-Block aktualisieren
Verwende 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
Referenziere 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 Zustand
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Fortschritt durch Schleifeniterationen verfolgen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Im Workflow initialisieren: `itemsProcessed = 0`, `lastResult = ""`</li>
<li>Schleife iteriert über Elemente</li>
<li>Innerhalb der Schleife: Agent verarbeitet aktuelles Element</li>
<li>Innerhalb der Schleife: Variablen aktualisieren `itemsProcessed = <variable.itemsProcessed> + 1`</li>
<li>Innerhalb der Schleife: Variablen aktualisieren `lastResult = <agent.content>`</li>
<li>Nächste Iteration: Auf `<variable.lastResult>` zugreifen, um mit aktuellem Ergebnis zu vergleichen</li>
</ol>
</div>
### Wiederholungslogik
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: API-Wiederholungsversuche verfolgen</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Im Workflow initialisieren: `retryCount = 0`</li>
<li>API-Block versucht Anfrage</li>
<li>Bei Fehlschlag erhöht Variablen: `retryCount = <variable.retryCount> + 1`</li>
<li>Bedingung prüft, ob `<variable.retryCount>` \< 3 ist, um zu wiederholen oder abzubrechen</li>
</ol>
</div>
### Dynamische Konfiguration
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Benutzerkontext für Workflow speichern</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Im Workflow initialisieren: `userId = ""`, `userTier = ""`</li>
<li>API ruft Benutzerprofil ab</li>
<li>Variablen speichern: `userId = <api.id>`, `userTier = <api.tier>`</li>
<li>Agent personalisiert Antwort mit `<variable.userTier>`</li>
<li>API verwendet `<variable.userId>` für Logging</li>
</ol>
</div>
## Ausgaben
- **`<variables.assignments>`**: JSON-Objekt mit allen Variablenzuweisungen aus diesem Block
## Bewährte Praktiken
- **Im Workflow-Einstellungen initialisieren**: Erstellen Sie Variablen immer im Workflow-Variablenbereich, bevor Sie sie verwenden
- **Dynamisch aktualisieren**: Verwenden Sie Variablenblöcke, um Werte basierend auf Blockausgaben oder Berechnungen zu aktualisieren
- **In Schleifen verwenden**: Perfekt für die Zustandsverfolgung über Iterationen hinweg
- **Beschreibend benennen**: Verwenden Sie klare Namen wie `currentIndex`, `totalProcessed` oder `lastError`

View File

@@ -0,0 +1,99 @@
---
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="Warten-Block"
width={500}
height={350}
className="my-6"
/>
</div>
## Übersicht
Mit dem Warten-Block kannst du:
<Steps>
<Step>
<strong>Zeitverzögerungen hinzufügen</strong>: Ausführung zwischen Workflow-Schritten pausieren
</Step>
<Step>
<strong>Ratenbegrenzungen einhalten</strong>: API-Aufrufe zeitlich verteilen, um innerhalb der Limits zu bleiben
</Step>
<Step>
<strong>Sequenzen planen</strong>: Zeitgesteuerte Workflows mit Verzögerungen zwischen Aktionen erstellen
</Step>
</Steps>
## Konfiguration
### Wartezeit
Gib die Dauer der Ausführungspause ein:
- **Eingabe**: Positive Zahl
- **Maximum**: 600 Sekunden (10 Minuten) oder 10 Minuten
### Einheit
Wähle die Zeiteinheit:
- **Sekunden**: Für kurze, präzise Verzögerungen
- **Minuten**: Für längere Pausen
<Callout type="info">
Warten-Blö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 des Wartens ('waiting', 'completed' oder 'cancelled')
## Beispielanwendungsfälle
### API-Ratenbegrenzung
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Innerhalb der API-Ratenbegrenzungen bleiben</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API-Block macht erste Anfrage</li>
<li>Warten-Block pausiert für 2 Sekunden</li>
<li>API-Block macht zweite Anfrage</li>
<li>Prozess läuft weiter, ohne Ratenbegrenzungen zu überschreiten</li>
</ol>
</div>
### Zeitgesteuerte Benachrichtigungen
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Folgenachrichten senden</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Funktion sendet erste E-Mail</li>
<li>Warten-Block pausiert für 5 Minuten</li>
<li>Funktion sendet Folge-E-Mail</li>
</ol>
</div>
### Verarbeitungsverzögerungen
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Szenario: Warten auf externes System</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API-Block löst Job im externen System aus</li>
<li>Warte-Block pausiert für 30 Sekunden</li>
<li>API-Block prüft den Abschlussstatus des Jobs</li>
</ol>
</div>
## Bewährte Praktiken
- **Halte Wartezeiten angemessen**: Verwende Warten für Verzögerungen bis zu 10 Minuten. Für längere Verzögerungen solltest du geplante Workflows in Betracht ziehen
- **Überwache die Ausführungszeit**: Denke daran, dass Wartezeiten die Gesamtdauer des Workflows verlängern

View File

@@ -0,0 +1,40 @@
---
title: Workflow-Block
description: Führe einen anderen Workflow innerhalb des aktuellen Ablaufs aus
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Image } from '@/components/ui/image'
## Was er macht
<div className='flex justify-center my-6'>
<Image
src='/static/blocks/workflow.png'
alt='Workflow-Block-Konfiguration'
width={400}
height={280}
className='rounded-xl border border-border shadow-sm'
/>
</div>
Füge einen Workflow-Block hinzu, wenn du einen untergeordneten Workflow als Teil eines größeren Ablaufs aufrufen möchtest. Der Block führt die neueste bereitgestellte Version dieses Workflows aus, wartet auf dessen Abschluss und setzt dann mit dem übergeordneten Workflow fort.
## Konfiguration
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:
- `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
- 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.
- Wenn der untergeordnete Workflow fehlschlägt, löst der Block einen Fehler aus, es sei denn, du behandelst ihn nachgelagert.
<Callout>
Halte untergeordnete Workflows fokussiert. Kleine, wiederverwendbare Abläufe machen es einfacher, sie zu kombinieren, ohne tiefe Verschachtelungen zu erzeugen.
</Callout>

View File

@@ -0,0 +1,42 @@
---
title: Grundlagen
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
## Wie Verbindungen funktionieren
Verbindungen sind die Pfade, die den Datenfluss zwischen Blöcken in Ihrem Workflow ermöglichen. In Sim definieren Verbindungen, wie Informationen von einem Block zum anderen übertragen werden und ermöglichen so den Datenfluss durch Ihren gesamten Workflow.
<Callout type="info">
Jede Verbindung stellt eine gerichtete Beziehung dar, bei der Daten vom Ausgang eines Quellblocks
zum Eingang eines Zielblocks fließen.
</Callout>
### Verbindungen erstellen
<Steps>
<Step>
<strong>Quellblock auswählen</strong>: Klicken Sie auf den Ausgangsport des Blocks, von dem aus Sie verbinden möchten
</Step>
<Step>
<strong>Verbindung ziehen</strong>: Ziehen Sie zum Eingangsport des Zielblocks
</Step>
<Step>
<strong>Verbindung bestätigen</strong>: Loslassen, um die Verbindung zu erstellen
</Step>
</Steps>
### Verbindungsfluss
Der Datenfluss durch Verbindungen folgt diesen Prinzipien:
1. **Gerichteter Fluss**: Daten fließen immer von Ausgängen zu Eingängen
2. **Ausführungsreihenfolge**: Blöcke werden basierend auf ihren Verbindungen der Reihe nach ausgeführt
3. **Datentransformation**: Daten können beim Übergang zwischen Blöcken transformiert werden
4. **Bedingte Pfade**: Einige Blöcke (wie Router und Bedingung) können den Fluss auf verschiedene Pfade leiten
<Callout type="warning">
Das Löschen einer Verbindung stoppt sofort den Datenfluss zwischen den Blöcken. Stellen Sie sicher, dass dies beabsichtigt ist, bevor Sie Verbindungen entfernen.
</Callout>

View File

@@ -0,0 +1,194 @@
---
title: Datenstruktur
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
Wenn Sie Blöcke verbinden, ist das Verständnis der Datenstruktur verschiedener Block-Ausgaben wichtig, da die Ausgabedatenstruktur des Quellblocks bestimmt, welche Werte im Zielblock verfügbar sind. Jeder Blocktyp erzeugt eine spezifische Ausgabestruktur, auf die Sie in nachgelagerten Blöcken verweisen können.
<Callout type="info">
Das Verständnis dieser Datenstrukturen ist wesentlich für die effektive Nutzung von Verbindungs-Tags und
den Zugriff auf die richtigen Daten in Ihren Workflows.
</Callout>
## Block-Ausgabestrukturen
Verschiedene Blocktypen erzeugen unterschiedliche Ausgabestrukturen. Hier ist, was Sie von jedem Blocktyp erwarten können:
<Tabs items={['Agent Output', 'API Output', 'Function Output', 'Evaluator Output', 'Condition Output', 'Router Output']}>
<Tab>
```json
{
"content": "The generated text response",
"model": "gpt-4o",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"toolCalls": [...],
"cost": [...],
"usage": [...]
}
```
### Ausgabefelder des Agent-Blocks
- **content**: Die vom Agenten generierte Haupttextantwort
- **model**: Das verwendete KI-Modell (z.B. "gpt-4o", "claude-3-opus")
- **tokens**: Token-Nutzungsstatistiken
- **prompt**: Anzahl der Token in der Eingabeaufforderung
- **completion**: Anzahl der Token in der Vervollständigung
- **total**: Insgesamt verwendete Token
- **toolCalls**: Array von Werkzeugaufrufen des Agenten (falls vorhanden)
- **cost**: Array von Kostenobjekten für jeden Werkzeugaufruf (falls vorhanden)
- **usage**: Token-Nutzungsstatistiken für die gesamte Antwort
</Tab>
<Tab>
```json
{
"data": "Response data",
"status": 200,
"headers": {
"content-type": "application/json",
"cache-control": "no-cache"
}
}
```
### Ausgabefelder des API-Blocks
- **data**: Die Antwortdaten von der API (kann jeden Typ haben)
- **status**: HTTP-Statuscode der Antwort
- **headers**: Von der API zurückgegebene HTTP-Header
</Tab>
<Tab>
```json
{
"result": "Function return value",
"stdout": "Console output",
}
```
### Ausgabefelder des Funktionsblocks
- **result**: Der Rückgabewert der Funktion (kann jeden Typ haben)
- **stdout**: Während der Funktionsausführung erfasste Konsolenausgabe
</Tab>
<Tab>
```json
{
"content": "Evaluation summary",
"model": "gpt-5",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"metric1": 8.5,
"metric2": 7.2,
"metric3": 9.0
}
```
### Ausgabefelder des Evaluator-Blocks
- **content**: Zusammenfassung der Auswertung
- **model**: Das für die Auswertung verwendete KI-Modell
- **tokens**: Statistiken zur Token-Nutzung
- **[metricName]**: Bewertung für jede im Evaluator definierte Metrik (dynamische Felder)
</Tab>
<Tab>
```json
{
"content": "Original content passed through",
"conditionResult": true,
"selectedPath": {
"blockId": "2acd9007-27e8-4510-a487-73d3b825e7c1",
"blockType": "agent",
"blockTitle": "Follow-up Agent"
},
"selectedConditionId": "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
</Tab>
<Tab>
```json
{
"content": "Routing decision",
"model": "gpt-4o",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"selectedPath": {
"blockId": "2acd9007-27e8-4510-a487-73d3b825e7c1",
"blockType": "agent",
"blockTitle": "Customer Service Agent"
}
}
```
### Ausgabefelder des Router-Blocks
- **content**: Der Routing-Entscheidungstext
- **model**: Das für das Routing verwendete KI-Modell
- **tokens**: Statistiken zur Token-Nutzung
- **selectedPath**: Informationen über den ausgewählten Pfad
- **blockId**: ID des ausgewählten Zielblocks
- **blockType**: Typ des ausgewählten Blocks
- **blockTitle**: Titel des ausgewählten Blocks
</Tab>
</Tabs>
## Benutzerdefinierte Ausgabestrukturen
Einige Blöcke können basierend auf ihrer Konfiguration benutzerdefinierte Ausgabestrukturen erzeugen:
1. **Agent-Blöcke mit Antwortformat**: Bei Verwendung eines Antwortformats in einem Agent-Block entspricht die Ausgabestruktur dem definierten Schema anstelle der Standardstruktur.
2. **Function-Blöcke**: Das Feld `result` kann jede Datenstruktur enthalten, die von Ihrem Funktionscode zurückgegeben wird.
3. **API-Blöcke**: Das Feld `data` enthält die Rückgabe der API, die jede gültige JSON-Struktur sein kann.
<Callout type="warning">
Überprüfen Sie während der Entwicklung immer die tatsächliche Ausgabestruktur Ihrer Blöcke, um sicherzustellen, dass Sie in Ihren Verbindungen auf die richtigen Felder verweisen.
</Callout>
## Verschachtelte Datenstrukturen
Viele Block-Ausgaben enthalten verschachtelte Datenstrukturen. Du kannst auf diese mit Punktnotation in Verbindungs-Tags zugreifen:
```
<blockName.path.to.nested.data>
```
Zum Beispiel:
- `<agent1.tokens.total>` - Greife auf die Gesamtzahl der Tokens aus einem Agent-Block zu
- `<api1.data.results[0].id>` - Greife auf die ID des ersten Ergebnisses einer API-Antwort zu
- `<function1.result.calculations.total>` - Greife auf ein verschachteltes Feld im Ergebnis eines Funktionsblocks zu

View File

@@ -0,0 +1,42 @@
---
title: Übersicht
description: Verbinde deine Blöcke miteinander.
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { ConnectIcon } from '@/components/icons'
import { Video } from '@/components/ui/video'
Verbindungen sind die Pfade, die den Datenfluss zwischen Blöcken in deinem Workflow ermöglichen. Sie definieren, wie Informationen von einem Block zum anderen weitergegeben werden und ermöglichen dir, komplexe, mehrstufige Prozesse zu erstellen.
<Callout type="info">
Richtig konfigurierte Verbindungen sind entscheidend für die Erstellung effektiver Workflows. Sie bestimmen, wie
Daten durch dein System fließen und wie Blöcke miteinander interagieren.
</Callout>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
## Verbindungstypen
Sim unterstützt verschiedene Arten von Verbindungen, die verschiedene Workflow-Muster ermöglichen:
<Cards>
<Card title="Grundlagen der Verbindungen" href="/connections/basics">
Lerne, wie Verbindungen funktionieren und wie du sie in deinen Workflows erstellst
</Card>
<Card title="Verbindungs-Tags" href="/connections/tags">
Verstehe, wie du Verbindungs-Tags verwendest, um auf Daten zwischen Blöcken zu verweisen
</Card>
<Card title="Datenstruktur" href="/connections/data-structure">
Erkunde die Ausgabedatenstrukturen verschiedener Blocktypen
</Card>
<Card title="Datenzugriff" href="/connections/accessing-data">
Lerne Techniken für den Zugriff und die Manipulation verbundener Daten
</Card>
<Card title="Best Practices" href="/connections/best-practices">
Folge empfohlenen Mustern für effektives Verbindungsmanagement
</Card>
</Cards>

View File

@@ -0,0 +1,109 @@
---
title: Tags
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Video } from '@/components/ui/video'
Verbindungs-Tags sind visuelle Darstellungen der verfügbaren Daten aus verbundenen Blöcken und bieten eine einfache Möglichkeit, auf Daten zwischen Blöcken und Ausgaben aus vorherigen Blöcken in Ihrem Workflow zu verweisen.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
### Was sind Verbindungs-Tags?
Verbindungs-Tags sind interaktive Elemente, die erscheinen, wenn Blöcke verbunden werden. Sie repräsentieren die Daten, die von einem Block zum anderen fließen können und ermöglichen es Ihnen:
- Verfügbare Daten aus Quellblöcken zu visualisieren
- Auf bestimmte Datenfelder in Zielblöcken zu verweisen
- Dynamische Datenflüsse zwischen Blöcken zu erstellen
<Callout type="info">
Verbindungs-Tags machen es einfach zu sehen, welche Daten aus vorherigen Blöcken verfügbar sind und diese in Ihrem
aktuellen Block zu verwenden, ohne sich komplexe Datenstrukturen merken zu müssen.
</Callout>
## Verwendung von Verbindungs-Tags
Es gibt zwei Hauptmethoden, um Verbindungs-Tags in Ihren Workflows zu verwenden:
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Drag and Drop</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Klicken Sie auf einen Verbindungs-Tag und ziehen Sie ihn in Eingabefelder von Zielblöcken. Ein Dropdown-Menü wird
angezeigt, das verfügbare Werte zeigt.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Fahren Sie mit dem Mauszeiger über einen Verbindungs-Tag, um verfügbare Daten zu sehen</li>
<li>Klicken und ziehen Sie den Tag in ein Eingabefeld</li>
<li>Wählen Sie das spezifische Datenfeld aus dem Dropdown-Menü</li>
<li>Die Referenz wird automatisch eingefügt</li>
</ol>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Spitze-Klammer-Syntax</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Geben Sie <code>&lt;&gt;</code> in Eingabefeldern ein, um ein Dropdown-Menü mit verfügbaren Verbindungswerten
aus vorherigen Blöcken zu sehen.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Klicken Sie in ein beliebiges Eingabefeld, in dem Sie verbundene Daten verwenden möchten</li>
<li>
Geben Sie <code>&lt;&gt;</code> ein, um das Verbindungs-Dropdown-Menü aufzurufen
</li>
<li>Durchsuchen und wählen Sie die Daten aus, auf die Sie verweisen möchten</li>
<li>Tippen Sie weiter oder wählen Sie aus dem Dropdown-Menü, um die Referenz zu vervollständigen</li>
</ol>
</div>
</div>
## Tag-Syntax
Verbindungs-Tags verwenden eine einfache Syntax, um auf Daten zu verweisen:
```
<blockName.path.to.data>
```
Wobei:
- `blockName` ist der Name des Quellblocks
- `path.to.data` ist der Pfad zum spezifischen Datenfeld
Zum Beispiel:
- `<agent1.content>` - Verweist auf das Inhaltsfeld eines Blocks mit der ID "agent1"
- `<api2.data.users[0].name>` - Verweist auf den Namen des ersten Benutzers im Benutzer-Array aus dem Datenfeld eines Blocks mit der ID "api2"
## Dynamische Tag-Referenzen
Verbindungs-Tags werden zur Laufzeit ausgewertet, was bedeutet:
1. Sie verweisen immer auf die aktuellsten Daten
2. Sie können in Ausdrücken verwendet und mit statischem Text kombiniert werden
3. Sie können in andere Datenstrukturen eingebettet werden
### Beispiele
```javascript
// Reference in text
"The user's name is <userBlock.name>"
// Reference in JSON
{
"userName": "<userBlock.name>",
"orderTotal": <apiBlock.data.total>
}
// Reference in code
const greeting = "Hello, <userBlock.name>!";
const total = <apiBlock.data.total> * 1.1; // Add 10% tax
```
<Callout type="warning">
Wenn Sie Verbindungs-Tags in numerischen Kontexten verwenden, stellen Sie sicher, dass die referenzierten Daten tatsächlich eine Zahl sind,
um Typkonvertierungsprobleme zu vermeiden.
</Callout>

View File

@@ -0,0 +1,161 @@
---
title: Copilot
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Image } from '@/components/ui/image'
import { MessageCircle, Package, Zap, Infinity as InfinityIcon, Brain, BrainCircuit } from 'lucide-react'
Copilot ist dein Assistent im Editor, der dir hilft, Workflows mit Sim Copilot zu erstellen und zu bearbeiten sowie diese zu verstehen und zu verbessern. Er kann:
- **Erklären**: Beantwortet Fragen zu Sim und deinem aktuellen Workflow
- **Anleiten**: Schlägt Bearbeitungen und Best Practices vor
- **Bearbeiten**: Nimmt Änderungen an Blöcken, Verbindungen und Einstellungen vor, wenn du zustimmst
<Callout type="info">
Copilot ist ein von Sim verwalteter Dienst. Für selbst gehostete Installationen generiere einen Copilot API-Schlüssel in der gehosteten App (sim.ai → Einstellungen → Copilot)
1. Gehe zu [sim.ai](https://sim.ai) → Einstellungen → Copilot und generiere einen Copilot API-Schlüssel
2. Setze `COPILOT_API_KEY` in deiner selbst gehosteten Umgebung auf diesen Wert
</Callout>
## Kontextmenü (@)
Verwende das `@` Symbol, um auf verschiedene Ressourcen zu verweisen und Copilot mehr Kontext über deinen Arbeitsbereich zu geben:
<Image
src="/static/copilot/copilot-menu.png"
alt="Copilot-Kontextmenü mit verfügbaren Referenzoptionen"
width={600}
height={400}
/>
Das `@` Menü bietet Zugriff auf:
- **Chats**: Verweise auf vorherige Copilot-Gespräche
- **Alle Workflows**: Verweise auf beliebige Workflows in deinem Arbeitsbereich
- **Workflow-Blöcke**: Verweise auf bestimmte Blöcke aus Workflows
- **Blöcke**: Verweise auf Blocktypen und Vorlagen
- **Wissen**: Verweise auf deine hochgeladenen Dokumente und Wissensdatenbank
- **Dokumentation**: Verweise auf Sim-Dokumentation
- **Vorlagen**: Verweise auf Workflow-Vorlagen
- **Logs**: Verweise auf Ausführungsprotokolle und Ergebnisse
Diese kontextbezogenen Informationen helfen Copilot, genauere und relevantere Unterstützung für deinen spezifischen Anwendungsfall zu bieten.
## Modi
<Cards>
<Card
title={
<span className="inline-flex items-center gap-2">
<MessageCircle className="h-4 w-4 text-muted-foreground" />
Fragen
</span>
}
>
<div className="m-0 text-sm">
Frage-Antwort-Modus für Erklärungen, Anleitungen und Vorschläge ohne Änderungen an deinem Workflow vorzunehmen.
</div>
</Card>
<Card
title={
<span className="inline-flex items-center gap-2">
<Package className="h-4 w-4 text-muted-foreground" />
Agent
</span>
}
>
<div className="m-0 text-sm">
Erstellen-und-Bearbeiten-Modus. Copilot schlägt spezifische Änderungen vor (Blöcke hinzufügen, Variablen verbinden, Einstellungen anpassen) und wendet sie an, wenn du zustimmst.
</div>
</Card>
</Cards>
## Tiefenebenen
<Cards>
<Card
title={
<span className="inline-flex items-center gap-2">
<Zap className="h-4 w-4 text-muted-foreground" />
Schnell
</span>
}
>
<div className="m-0 text-sm">Am schnellsten und günstigsten. Ideal für kleine Änderungen, einfache Workflows und geringfügige Anpassungen.</div>
</Card>
<Card
title={
<span className="inline-flex items-center gap-2">
<InfinityIcon className="h-4 w-4 text-muted-foreground" />
Auto
</span>
}
>
<div className="m-0 text-sm">Ausgewogene Geschwindigkeit und Denkleistung. Empfohlene Standardeinstellung für die meisten Aufgaben.</div>
</Card>
<Card
title={
<span className="inline-flex items-center gap-2">
<Brain className="h-4 w-4 text-muted-foreground" />
Erweitert
</span>
}
>
<div className="m-0 text-sm">Mehr Denkleistung für umfangreichere Workflows und komplexe Änderungen bei gleichzeitiger Leistungsfähigkeit.</div>
</Card>
<Card
title={
<span className="inline-flex items-center gap-2">
<BrainCircuit className="h-4 w-4 text-muted-foreground" />
Behemoth
</span>
}
>
<div className="m-0 text-sm">Maximale Denkleistung für tiefgreifende Planung, Fehlerbehebung und komplexe architektonische Änderungen.</div>
</Card>
</Cards>
### Modusauswahl-Oberfläche
Du kannst einfach zwischen verschiedenen Denkmodi über den Modusauswähler in der Copilot-Oberfläche wechseln:
<Image
src="/static/copilot/copilot-models.png"
alt="Copilot-Modusauswahl zeigt den erweiterten Modus mit MAX-Umschalter"
width={600}
height={300}
/>
Die Oberfläche ermöglicht dir:
- **Denkebene auswählen**: Wähle zwischen Schnell, Auto, Erweitert oder Behemoth
- **MAX-Modus aktivieren**: Umschalten für maximale Denkfähigkeiten, wenn du die gründlichste Analyse benötigst
- **Modusbeschreibungen anzeigen**: Verstehe, wofür jeder Modus optimiert ist
Wähle deinen Modus basierend auf der Komplexität deiner Aufgabe - verwende Schnell für einfache Fragen und Behemoth für komplexe architektonische Änderungen.
## Abrechnung und Kostenberechnung
### Wie Kosten berechnet werden
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
```javascript
copilotCost = (inputTokens × inputPrice + outputTokens × (outputPrice × 1.5)) / 1,000,000
```
| Komponente | Angewendeter Tarif |
|------------|------------------------|
| Input | inputPrice |
| Output | 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.
</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.
</Callout>

View File

@@ -0,0 +1,551 @@
---
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.
## Authentifizierung
Alle API-Anfragen erfordern einen API-Schlüssel, der im Header `x-api-key` übergeben wird:
```bash
curl -H "x-api-key: YOUR_API_KEY" \
https://sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID
```
Sie können API-Schlüssel in Ihren Benutzereinstellungen im Sim-Dashboard generieren.
## Logs-API
Alle API-Antworten enthalten Informationen über Ihre Workflow-Ausführungslimits und -nutzung:
```json
"limits": {
"workflowExecutionRateLimit": {
"sync": {
"limit": 60, // Max sync workflow executions per minute
"remaining": 58, // Remaining sync workflow executions
"resetAt": "..." // When the window resets
},
"async": {
"limit": 60, // Max async workflow executions per minute
"remaining": 59, // Remaining async workflow executions
"resetAt": "..." // When the window resets
}
},
"usage": {
"currentPeriodCost": 1.234, // Current billing period usage in USD
"limit": 10, // Usage limit in USD
"plan": "pro", // Current subscription plan
"isExceeded": false // Whether limit is exceeded
}
}
```
**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-*`).
### Logs abfragen
Fragen Sie Workflow-Ausführungsprotokolle mit umfangreichen Filteroptionen ab.
<Tabs items={['Request', 'Response']}>
<Tab value="Request">
```http
GET /api/v1/logs
```
**Erforderliche Parameter:**
- `workspaceId` - Ihre Workspace-ID
**Optionale Filter:**
- `workflowIds` - Kommagetrennte Workflow-IDs
- `folderIds` - Kommagetrennte Ordner-IDs
- `triggers` - Kommagetrennte Auslösertypen: `api`, `webhook`, `schedule`, `manual`, `chat`
- `level` - Nach Level filtern: `info`, `error`
- `startDate` - ISO-Zeitstempel für den Beginn des Datumsbereichs
- `endDate` - ISO-Zeitstempel für das Ende des Datumsbereichs
- `executionId` - Exakte Übereinstimmung der Ausführungs-ID
- `minDurationMs` - Minimale Ausführungsdauer in Millisekunden
- `maxDurationMs` - Maximale Ausführungsdauer in Millisekunden
- `minCost` - Minimale Ausführungskosten
- `maxCost` - Maximale Ausführungskosten
- `model` - Nach verwendetem KI-Modell filtern
**Paginierung:**
- `limit` - Ergebnisse pro Seite (Standard: 100)
- `cursor` - Cursor für die nächste Seite
- `order` - Sortierreihenfolge: `desc`, `asc` (Standard: desc)
**Detailebene:**
- `details` - Detailebene der Antwort: `basic`, `full` (Standard: basic)
- `includeTraceSpans` - Trace-Spans einschließen (Standard: false)
- `includeFinalOutput` - Endgültige Ausgabe einschließen (Standard: false)
</Tab>
<Tab value="Response">
```json
{
"data": [
{
"id": "log_abc123",
"workflowId": "wf_xyz789",
"executionId": "exec_def456",
"level": "info",
"trigger": "api",
"startedAt": "2025-01-01T12:34:56.789Z",
"endedAt": "2025-01-01T12:34:57.123Z",
"totalDurationMs": 334,
"cost": {
"total": 0.00234
},
"files": null
}
],
"nextCursor": "eyJzIjoiMjAyNS0wMS0wMVQxMjozNDo1Ni43ODlaIiwiaWQiOiJsb2dfYWJjMTIzIn0",
"limits": {
"workflowExecutionRateLimit": {
"sync": {
"limit": 60,
"remaining": 58,
"resetAt": "2025-01-01T12:35:56.789Z"
},
"async": {
"limit": 60,
"remaining": 59,
"resetAt": "2025-01-01T12:35:56.789Z"
}
},
"usage": {
"currentPeriodCost": 1.234,
"limit": 10,
"plan": "pro",
"isExceeded": false
}
}
}
```
</Tab>
</Tabs>
### Log-Details abrufen
Rufen Sie detaillierte Informationen zu einem bestimmten Logeintrag ab.
<Tabs items={['Request', 'Response']}>
<Tab value="Request">
```http
GET /api/v1/logs/{id}
```
</Tab>
<Tab value="Response">
```json
{
"data": {
"id": "log_abc123",
"workflowId": "wf_xyz789",
"executionId": "exec_def456",
"level": "info",
"trigger": "api",
"startedAt": "2025-01-01T12:34:56.789Z",
"endedAt": "2025-01-01T12:34:57.123Z",
"totalDurationMs": 334,
"workflow": {
"id": "wf_xyz789",
"name": "My Workflow",
"description": "Process customer data"
},
"executionData": {
"traceSpans": [...],
"finalOutput": {...}
},
"cost": {
"total": 0.00234,
"tokens": {
"prompt": 123,
"completion": 456,
"total": 579
},
"models": {
"gpt-4o": {
"input": 0.001,
"output": 0.00134,
"total": 0.00234,
"tokens": {
"prompt": 123,
"completion": 456,
"total": 579
}
}
}
},
"limits": {
"workflowExecutionRateLimit": {
"sync": {
"limit": 60,
"remaining": 58,
"resetAt": "2025-01-01T12:35:56.789Z"
},
"async": {
"limit": 60,
"remaining": 59,
"resetAt": "2025-01-01T12:35:56.789Z"
}
},
"usage": {
"currentPeriodCost": 1.234,
"limit": 10,
"plan": "pro",
"isExceeded": false
}
}
}
}
```
</Tab>
</Tabs>
### Ausführungsdetails abrufen
Rufen Sie Ausführungsdetails einschließlich des Workflow-Zustandsschnappschusses ab.
<Tabs items={['Request', 'Response']}>
<Tab value="Request">
```http
GET /api/v1/logs/executions/{executionId}
```
</Tab>
<Tab value="Response">
```json
{
"executionId": "exec_def456",
"workflowId": "wf_xyz789",
"workflowState": {
"blocks": {...},
"edges": [...],
"loops": {...},
"parallels": {...}
},
"executionMetadata": {
"trigger": "api",
"startedAt": "2025-01-01T12:34:56.789Z",
"endedAt": "2025-01-01T12:34:57.123Z",
"totalDurationMs": 334,
"cost": {...}
}
}
```
</Tab>
</Tabs>
## Webhook-Abonnements
Erhalten Sie Echtzeitbenachrichtigungen, wenn Workflow-Ausführungen abgeschlossen werden. Webhooks werden über die Sim-Benutzeroberfläche im Workflow-Editor 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.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="configure-webhook.mp4" width={700} height={450} />
</div>
**Verfügbare Konfigurationsoptionen:**
- `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
### Webhook-Nutzlast
Wenn eine Workflow-Ausführung abgeschlossen ist, sendet Sim eine POST-Anfrage an Ihre Webhook-URL:
```json
{
"id": "evt_123",
"type": "workflow.execution.completed",
"timestamp": 1735925767890,
"data": {
"workflowId": "wf_xyz789",
"executionId": "exec_def456",
"status": "success",
"level": "info",
"trigger": "api",
"startedAt": "2025-01-01T12:34:56.789Z",
"endedAt": "2025-01-01T12:34:57.123Z",
"totalDurationMs": 334,
"cost": {
"total": 0.00234,
"tokens": {
"prompt": 123,
"completion": 456,
"total": 579
},
"models": {
"gpt-4o": {
"input": 0.001,
"output": 0.00134,
"total": 0.00234,
"tokens": {
"prompt": 123,
"completion": 456,
"total": 579
}
}
}
},
"files": null,
"finalOutput": {...}, // Only if includeFinalOutput=true
"traceSpans": [...], // Only if includeTraceSpans=true
"rateLimits": {...}, // Only if includeRateLimits=true
"usage": {...} // Only if includeUsageData=true
},
"links": {
"log": "/v1/logs/log_abc123",
"execution": "/v1/logs/executions/exec_def456"
}
}
```
### Webhook-Header
Jede Webhook-Anfrage enthält diese Header:
- `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
### Signaturverifizierung
Wenn Sie ein Webhook-Secret konfigurieren, überprüfen Sie die Signatur, um sicherzustellen, dass der Webhook von Sim stammt:
<Tabs items={['Node.js', 'Python']}>
<Tab value="Node.js">
```javascript
import crypto from 'crypto';
function verifyWebhookSignature(body, signature, secret) {
const [timestampPart, signaturePart] = signature.split(',');
const timestamp = timestampPart.replace('t=', '');
const expectedSignature = signaturePart.replace('v1=', '');
const signatureBase = `${timestamp}.${body}`;
const hmac = crypto.createHmac('sha256', secret);
hmac.update(signatureBase);
const computedSignature = hmac.digest('hex');
return computedSignature === expectedSignature;
}
// In your webhook handler
app.post('/webhook', (req, res) => {
const signature = req.headers['sim-signature'];
const body = JSON.stringify(req.body);
if (!verifyWebhookSignature(body, signature, process.env.WEBHOOK_SECRET)) {
return res.status(401).send('Invalid signature');
}
// Process the webhook...
});
```
</Tab>
<Tab value="Python">
```python
import hmac
import hashlib
import json
def verify_webhook_signature(body: str, signature: str, secret: str) -> bool:
timestamp_part, signature_part = signature.split(',')
timestamp = timestamp_part.replace('t=', '')
expected_signature = signature_part.replace('v1=', '')
signature_base = f"{timestamp}.{body}"
computed_signature = hmac.new(
secret.encode(),
signature_base.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(computed_signature, expected_signature)
# In your webhook handler
@app.route('/webhook', methods=['POST'])
def webhook():
signature = request.headers.get('sim-signature')
body = json.dumps(request.json)
if not verify_webhook_signature(body, signature, os.environ['WEBHOOK_SECRET']):
return 'Invalid signature', 401
# Process the webhook...
```
</Tab>
</Tabs>
### Wiederholungsrichtlinie
Fehlgeschlagene Webhook-Zustellungen werden mit exponentiellem Backoff und Jitter wiederholt:
- 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
- Nur HTTP 5xx und 429 Antworten lösen Wiederholungen aus
- Zustellungen haben ein Timeout nach 30 Sekunden
<Callout type="info">
Webhook-Zustellungen werden asynchron verarbeitet und beeinträchtigen nicht die Leistung der Workflow-Ausführung.
</Callout>
## Best Practices
1. **Polling-Strategie**: Verwenden Sie beim Abfragen von Logs die cursorbasierte 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.
3. **Idempotenz**: Verwenden Sie 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.
5. **Rate-Limiting**: Implementieren Sie exponentielles Backoff, wenn Sie 429-Antworten erhalten. Überprüfen Sie den `Retry-After`Header für die empfohlene Wartezeit.
## Rate-Limiting
Die API implementiert Rate-Limiting, um eine faire Nutzung zu gewährleisten:
- **Kostenloser Plan**: 10 Anfragen pro Minute
- **Pro-Plan**: 30 Anfragen pro Minute
- **Team-Plan**: 60 Anfragen pro Minute
- **Enterprise-Plan**: Individuelle Limits
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
## Beispiel: Abfragen neuer Logs
```javascript
let cursor = null;
const workspaceId = 'YOUR_WORKSPACE_ID';
const startDate = new Date().toISOString();
async function pollLogs() {
const params = new URLSearchParams({
workspaceId,
startDate,
order: 'asc',
limit: '100'
});
if (cursor) {
params.append('cursor', cursor);
}
const response = await fetch(
`https://sim.ai/api/v1/logs?${params}`,
{
headers: {
'x-api-key': 'YOUR_API_KEY'
}
}
);
if (response.ok) {
const data = await response.json();
// Process new logs
for (const log of data.data) {
console.log(`New execution: ${log.executionId}`);
}
// Update cursor for next poll
if (data.nextCursor) {
cursor = data.nextCursor;
}
}
}
// Poll every 30 seconds
setInterval(pollLogs, 30000);
```
## Beispiel: Verarbeitung von Webhooks
```javascript
import express from 'express';
import crypto from 'crypto';
const app = express();
app.use(express.json());
app.post('/sim-webhook', (req, res) => {
// Verify signature
const signature = req.headers['sim-signature'];
const body = JSON.stringify(req.body);
if (!verifyWebhookSignature(body, signature, process.env.WEBHOOK_SECRET)) {
return res.status(401).send('Invalid signature');
}
// Check timestamp to prevent replay attacks
const timestamp = parseInt(req.headers['sim-timestamp']);
const fiveMinutesAgo = Date.now() - (5 * 60 * 1000);
if (timestamp < fiveMinutesAgo) {
return res.status(401).send('Timestamp too old');
}
// Process the webhook
const event = req.body;
switch (event.type) {
case 'workflow.execution.completed':
const { workflowId, executionId, status, cost } = event.data;
if (status === 'error') {
console.error(`Workflow ${workflowId} failed: ${executionId}`);
// Handle error...
} else {
console.log(`Workflow ${workflowId} completed: ${executionId}`);
console.log(`Cost: $${cost.total}`);
// Process successful execution...
}
break;
}
// Return 200 to acknowledge receipt
res.status(200).send('OK');
});
app.listen(3000, () => {
console.log('Webhook server listening on port 3000');
});
```

View File

@@ -0,0 +1,132 @@
---
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.
## Wie Workflows ausgeführt werden
Die Ausführungs-Engine von Sim verarbeitet Workflows intelligent, indem sie Abhängigkeiten analysiert und Blöcke in der effizientesten Reihenfolge ausführt.
### Parallele Ausführung als Standard
Mehrere Blöcke werden gleichzeitig ausgeführt, wenn sie nicht voneinander abhängig sind. Diese parallele Ausführung verbessert die Leistung erheblich, ohne dass eine manuelle Konfiguration erforderlich ist.
<Image
src="/static/execution/concurrency.png"
alt="Mehrere Blöcke, die nach dem Start-Block parallel ausgeführt werden"
width={800}
height={500}
/>
In diesem Beispiel werden sowohl der Kundensupport- als auch der Deep-Researcher-Agentenblock gleichzeitig nach dem Start-Block ausgeführt, was die Effizienz maximiert.
### Automatische Ausgabekombination
Wenn Blöcke mehrere Abhängigkeiten haben, wartet die Ausführungs-Engine automatisch auf den Abschluss aller Abhängigkeiten und stellt dann ihre kombinierten Ausgaben dem nächsten Block zur Verfügung. Keine manuelle Kombination erforderlich.
<Image
src="/static/execution/combination.png"
alt="Funktionsblock, der automatisch Ausgaben von mehreren vorherigen Blöcken empfängt"
width={800}
height={500}
/>
Der Funktionsblock erhält Ausgaben von beiden Agentenblöcken, sobald diese abgeschlossen sind, sodass Sie die kombinierten Ergebnisse verarbeiten können.
### Intelligentes Routing
Workflows können sich in mehrere Richtungen verzweigen, indem sie Routing-Blöcke verwenden. Die Ausführungs-Engine unterstützt sowohl deterministisches Routing (mit Bedingungsblöcken) als auch KI-gesteuertes Routing (mit Router-Blöcken).
<Image
src="/static/execution/routing.png"
alt="Workflow, der sowohl bedingte als auch router-basierte Verzweigungen zeigt"
width={800}
height={500}
/>
Dieser Workflow zeigt, wie die Ausführung unterschiedlichen Pfaden basierend auf Bedingungen oder KI-Entscheidungen folgen kann, wobei jeder Pfad unabhängig ausgeführt wird.
## Blocktypen
Sim bietet verschiedene Arten von Blöcken, die spezifische Zwecke in Ihren Workflows erfüllen:
<Cards>
<Card title="Auslöser" href="/triggers">
**Starter-Blöcke** initiieren Workflows und **Webhook-Blöcke** reagieren auf externe Ereignisse. Jeder Workflow benötigt einen Auslöser, um die Ausführung zu beginnen.
</Card>
<Card title="Verarbeitungsblöcke" href="/blocks">
**Agent-Blöcke** interagieren mit KI-Modellen, **Funktionsblöcke** führen benutzerdefinierten Code aus und **API-Blöcke** verbinden sich mit externen Diensten. Diese Blöcke transformieren und verarbeiten Ihre Daten.
</Card>
<Card title="Kontrollfluss" href="/blocks">
**Router-Blöcke** nutzen KI, um Pfade zu wählen, **Bedingungsblöcke** verzweigen basierend auf Logik und **Schleifen-/Parallelblöcke** handhaben Iterationen und Nebenläufigkeit.
</Card>
<Card title="Ausgabe & Antwort" href="/blocks">
**Antwortblöcke** formatieren endgültige Ausgaben für APIs und Chat-Schnittstellen und liefern strukturierte Ergebnisse aus Ihren Workflows.
</Card>
</Cards>
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:
- **Live-Block-Status**: Sehen Sie, welche Blöcke gerade ausgeführt werden, abgeschlossen sind oder fehlgeschlagen sind
- **Ausführungsprotokolle**: Detaillierte Protokolle erscheinen in Echtzeit und zeigen Eingaben, Ausgaben und eventuelle Fehler
- **Leistungskennzahlen**: Verfolgen Sie die Ausführungszeit und Kosten für jeden Block
- **Pfadvisualisierung**: Verstehen Sie, welche Ausführungspfade durch Ihren Workflow genommen wurden
<Callout type="info">
Alle Ausführungsdetails werden erfasst und sind auch nach Abschluss der Workflows zur Überprüfung verfügbar, was bei der Fehlerbehebung und Optimierung hilft.
</Callout>
## Wichtige Ausführungsprinzipien
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
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
## Nächste Schritte
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

View File

@@ -0,0 +1,221 @@
---
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'
Sim berechnet automatisch die Kosten für alle Workflow-Ausführungen und bietet transparente Preise basierend auf der Nutzung von KI-Modellen und Ausführungsgebühren. Das Verständnis dieser Kosten hilft Ihnen, Workflows zu optimieren und Ihr Budget effektiv zu verwalten.
## Wie Kosten berechnet werden
Jede Workflow-Ausführung umfasst zwei Kostenkomponenten:
**Basis-Ausführungsgebühr**: 0,001 $ pro Ausführung
**KI-Modellnutzung**: Variable Kosten basierend auf dem Token-Verbrauch
```javascript
modelCost = (inputTokens × inputPrice + outputTokens × outputPrice) / 1,000,000
totalCost = baseExecutionCharge + modelCost
```
<Callout type="info">
KI-Modellpreise werden pro Million Token berechnet. Die Berechnung teilt durch 1.000.000, um die tatsächlichen Kosten zu ermitteln. Workflows ohne KI-Blöcke verursachen nur die Basis-Ausführungsgebühr.
</Callout>
## Modellaufschlüsselung in Logs
Für Workflows mit KI-Blöcken können Sie detaillierte Kosteninformationen in den Logs einsehen:
<div className="flex justify-center">
<Image
src="/static/logs/logs-cost.png"
alt="Modellaufschlüsselung"
width={600}
height={400}
className="my-6"
/>
</div>
Die Modellaufschlüsselung zeigt:
- **Token-Nutzung**: Eingabe- und Ausgabe-Token-Anzahl für jedes Modell
- **Kostenaufschlüsselung**: Einzelkosten pro Modell und Operation
- **Modellverteilung**: Welche Modelle verwendet wurden und wie oft
- **Gesamtkosten**: Gesamtkosten für die gesamte Workflow-Ausführung
## Preisoptionen
<Tabs items={['Gehostete Modelle', 'Eigener API-Schlüssel']}>
<Tab>
**Gehostete Modelle** - Sim stellt API-Schlüssel mit einem 2,5-fachen Preismultiplikator bereit:
| 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.*
</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 $ |
| Ollama | 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.
</Callout>
## Kostenoptimierungsstrategien
<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>
## 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
- **Abrechnungsdetails**: Prognostizierte Gebühren und Mindestverpflichtungen
- **Planverwaltung**: Upgrade-Optionen und Abrechnungsverlauf
### Programmatische Nutzungsverfolgung
Sie können Ihre aktuelle Nutzung und Limits programmatisch über die API abfragen:
**Endpunkt:**
```text
GET /api/users/me/usage-limits
```
**Authentifizierung:**
- Fügen Sie Ihren API-Schlüssel im `X-API-Key` Header hinzu
**Beispielanfrage:**
```bash
curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" https://sim.ai/api/users/me/usage-limits
```
**Beispielantwort:**
```json
{
"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" },
"authType": "api"
},
"usage": {
"currentPeriodCost": 12.34,
"limit": 100,
"plan": "pro"
}
}
```
**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
## Planlimits
Verschiedene Abonnementpläne haben unterschiedliche Nutzungslimits:
| Plan | Monatliches Nutzungslimit | Ratengrenze (pro Minute) |
|------|-------------------|-------------------------|
| **Free** | $10 | 5 sync, 10 async |
| **Pro** | $100 | 10 sync, 50 async |
| **Team** | $500 (gepoolt) | 50 sync, 100 async |
| **Enterprise** | Individuell | Individuell |
## 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
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
## 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
- Sehen Sie sich [Workflow-Optimierungstechniken](/blocks) an, um Kosten zu reduzieren
**Team-Plan (40 $/Sitz/Monat):**
- Gemeinsame Nutzung für alle Teammitglieder
- Überschreitung wird anhand der Gesamtnutzung des Teams berechnet
- Organisationsinhaber erhält eine Rechnung
**Enterprise-Pläne:**
- Fester monatlicher Preis, keine Überschreitungen
- Benutzerdefinierte Nutzungslimits gemäß Vereinbarung
### Schwellenwertabrechnung
Wenn die nicht abgerechnete Überschreitung 50 $ erreicht, berechnet Sim automatisch den gesamten nicht abgerechneten Betrag.
**Beispiel:**
- Tag 10: 70 $ Überschreitung → Sofortige Abrechnung von 70 $
- Tag 15: Zusätzliche Nutzung von 35 $ (insgesamt 105 $) → Bereits abgerechnet, keine Aktion
- Tag 20: Weitere Nutzung von 50 $ (insgesamt 155 $, 85 $ nicht abgerechnet) → Sofortige Abrechnung von 85 $
Dies verteilt hohe Überschreitungsgebühren über den Monat, anstatt eine große Rechnung am Ende des Abrechnungszeitraums zu stellen.
## Best Practices für Kostenmanagement
1. **Regelmäßige Überwachung**: Überprüfen Sie Ihr Nutzungs-Dashboard häufig, um Überraschungen zu vermeiden
2. **Budgets festlegen**: Nutzen Sie Planlimits als Leitplanken für Ihre Ausgaben
3. **Workflows optimieren**: Überprüfen Sie kostenintensive Ausführungen und optimieren Sie Prompts oder Modellauswahl
4. **Geeignete Modelle verwenden**: Passen Sie die Modellkomplexität an die Aufgabenanforderungen an
5. **Ähnliche Aufgaben bündeln**: Kombinieren Sie wenn möglich mehrere Anfragen, um den Overhead zu reduzieren
## Nächste Schritte
- Überprüfen Sie Ihre aktuelle Nutzung unter [Einstellungen → Abonnement](https://sim.ai/settings/subscription)
- Erfahren Sie mehr über [Protokollierung](/execution/logging), um Ausführungsdetails zu verfolgen
- Erkunden Sie die [externe API](/execution/api) für programmatische Kostenüberwachung
- Sehen Sie sich [Workflow-Optimierungstechniken](/blocks) zur Kostenreduzierung an

View File

@@ -0,0 +1,153 @@
---
title: Übersicht
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Image } from '@/components/ui/image'
Die Ausführungs-Engine von Sim bringt Ihre Workflows zum Leben, indem sie Blöcke in der richtigen Reihenfolge verarbeitet, den Datenfluss verwaltet und Fehler elegant behandelt, sodass Sie genau verstehen können, wie Workflows in Sim ausgeführt werden.
<Callout type="info">
Jede Workflow-Ausführung folgt einem deterministischen Pfad, der auf Ihren Blockverbindungen und Ihrer Logik basiert, um vorhersehbare und zuverlässige Ergebnisse zu gewährleisten.
</Callout>
## Dokumentationsübersicht
<Cards>
<Card title="Grundlagen der Ausführung" href="/execution/basics">
Erfahren Sie mehr über den grundlegenden Ausführungsablauf, Blocktypen und wie Daten durch Ihren
Workflow fließen
</Card>
<Card title="Protokollierung" href="/execution/logging">
Überwachen Sie Workflow-Ausführungen mit umfassender Protokollierung und Echtzeit-Sichtbarkeit
</Card>
<Card title="Kostenberechnung" href="/execution/costs">
Verstehen Sie, wie die Kosten für Workflow-Ausführungen berechnet und optimiert werden
</Card>
<Card title="Externe API" href="/execution/api">
Greifen Sie programmgesteuert über REST-API auf Ausführungsprotokolle zu und richten Sie Webhooks ein
</Card>
</Cards>
## Schlüsselkonzepte
### Topologische Ausführung
Blöcke werden in Abhängigkeitsreihenfolge ausgeführt, ähnlich wie eine Tabellenkalkulation Zellen neu berechnet. Die Ausführungs-Engine bestimmt automatisch, welche Blöcke basierend auf abgeschlossenen Abhängigkeiten ausgeführt werden können.
### Pfadverfolgung
Die Engine verfolgt aktiv Ausführungspfade durch Ihren Workflow. Router- und Bedingungsblöcke aktualisieren diese Pfade dynamisch und stellen sicher, dass nur relevante Blöcke ausgeführt werden.
### Schichtbasierte Verarbeitung
Anstatt Blöcke einzeln auszuführen, identifiziert die Engine Schichten von Blöcken, die parallel ausgeführt werden können, und optimiert so die Leistung für komplexe Workflows.
### Ausführungskontext
Jeder Workflow behält während der Ausführung einen umfangreichen Kontext bei, der Folgendes enthält:
- Block-Ausgaben und -Zustände
- Aktive Ausführungspfade
- Verfolgung von Schleifen- und Paralleliterationen
- 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 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 Trigger die aktualisierte Version verwendet.
<div className='flex justify-center my-6'>
<Image
src='/static/execution/deployment-versions-light.png'
alt='Tabelle mit Deployment-Versionen'
width={500}
height={280}
className='rounded-xl border border-border shadow-sm'
/>
</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.
## Programmatische Ausführung
Führe Workflows aus deinen Anwendungen mit unseren offiziellen SDKs aus:
```bash
# TypeScript/JavaScript
npm install simstudio-ts-sdk
# Python
pip install simstudio-sdk
```
```typescript
// TypeScript Example
import { SimStudioClient } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: 'your-api-key'
});
const result = await client.executeWorkflow('workflow-id', {
input: { message: 'Hello' }
});
```
## Best Practices
### Design für Zuverlässigkeit
- Behandle Fehler elegant mit geeigneten Fallback-Pfaden
- Verwende Umgebungsvariablen für sensible Daten
- Füge Logging zu Funktionsblöcken für Debugging hinzu
### Leistung optimieren
- Minimiere externe API-Aufrufe wo möglich
- Nutze parallele Ausführung für unabhängige Operationen
- Cache Ergebnisse mit Memory-Blöcken, wenn angemessen
### Ausführungen überwachen
- Überprüfe Logs regelmäßig, um Leistungsmuster zu verstehen
- Verfolge Kosten für KI-Modellnutzung
- Verwende Workflow-Snapshots zur Fehlerbehebung
## Was kommt als nächstes?
Beginne mit [Ausführungsgrundlagen](/execution/basics), um zu verstehen, wie Workflows laufen, und erkunde dann [Logging](/execution/logging), um deine Ausführungen zu überwachen, sowie [Kostenberechnung](/execution/costs), um deine Ausgaben zu optimieren.

View File

@@ -0,0 +1,150 @@
---
title: Protokollierung
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Sim bietet umfassende Protokollierung für alle Workflow-Ausführungen und gibt Ihnen vollständige Transparenz darüber, wie Ihre Workflows laufen, welche Daten durch sie fließen und wo möglicherweise Probleme auftreten.
## Protokollierungssystem
Sim bietet zwei komplementäre Protokollierungsschnittstellen, die verschiedenen Workflows und Anwendungsfällen entsprechen:
### Echtzeit-Konsole
Während der manuellen oder Chat-Workflow-Ausführung erscheinen Protokolle in Echtzeit im Konsolen-Panel auf der rechten Seite des Workflow-Editors:
<div className="flex justify-center">
<Image
src="/static/logs/console.png"
alt="Echtzeit-Konsolen-Panel"
width={400}
height={300}
className="my-6"
/>
</div>
Die Konsole zeigt:
- Fortschritt der Blockausführung mit Hervorhebung des aktiven Blocks
- Echtzeit-Ausgaben nach Abschluss der Blöcke
- Ausführungszeit für jeden Block
- Erfolgs-/Fehlerstatusanzeigen
### Protokollseite
Alle Workflow-Ausführungen ob manuell ausgelöst, über API, Chat, Zeitplan oder Webhook werden auf der dedizierten Protokollseite protokolliert:
<div className="flex justify-center">
<Image
src="/static/logs/logs.png"
alt="Protokollseite"
width={600}
height={400}
className="my-6"
/>
</div>
Die Protokollseite bietet:
- Umfassende Filterung nach Zeitraum, Status, Auslösertyp, Ordner und Workflow
- Suchfunktion über alle Protokolle
- Live-Modus für Echtzeit-Updates
- 7-tägige Protokollaufbewahrung (erweiterbar für längere Aufbewahrung)
## Protokolldetails-Seitenleiste
Durch Klicken auf einen Protokolleintrag öffnet sich eine detaillierte Seitenleistenansicht:
<div className="flex justify-center">
<Image
src="/static/logs/logs-sidebar.png"
alt="Protokoll-Seitenleiste mit Details"
width={600}
height={400}
className="my-6"
/>
</div>
### Block-Eingabe/Ausgabe
Sehen Sie den vollständigen Datenfluss für jeden Block mit Tabs zum Umschalten zwischen:
<Tabs items={['Output', 'Input']}>
<Tab>
**Output-Tab** zeigt das Ausführungsergebnis des Blocks:
- Strukturierte Daten mit JSON-Formatierung
- Markdown-Rendering für KI-generierte Inhalte
- Kopierschaltfläche für einfache Datenextraktion
</Tab>
<Tab>
**Input-Tab** zeigt, was an den Block übergeben wurde:
- Aufgelöste Variablenwerte
- Referenzierte Ausgaben anderer Blöcke
- Verwendete Umgebungsvariablen
- API-Schlüssel werden aus Sicherheitsgründen automatisch unkenntlich gemacht
</Tab>
</Tabs>
### Ausführungszeitlinie
Für Workflow-übergreifende Protokolle, sehen Sie detaillierte Ausführungsmetriken:
- Start- und Endzeitstempel
- Gesamtdauer des Workflows
- Ausführungszeiten einzelner Blöcke
- Identifikation von Leistungsengpässen
## Workflow-Snapshots
Für jede protokollierte Ausführung klicken Sie auf "Snapshot anzeigen", um den exakten Workflow-Zustand zum Ausführungszeitpunkt zu sehen:
<div className="flex justify-center">
<Image
src="/static/logs/logs-frozen-canvas.png"
alt="Workflow-Snapshot"
width={600}
height={400}
className="my-6"
/>
</div>
Der Snapshot bietet:
- Eingefrorene Arbeitsfläche, die die Workflow-Struktur zeigt
- Block-Zustände und Verbindungen, wie sie während der Ausführung waren
- Klicken Sie auf einen beliebigen Block, um dessen Ein- und Ausgaben zu sehen
- Nützlich zum Debuggen von Workflows, die seitdem geändert wurden
<Callout type="info">
Workflow-Snapshots sind nur für Ausführungen verfügbar, die nach der Einführung des erweiterten Protokollierungssystems durchgeführt wurden. Ältere migrierte Protokolle zeigen die Meldung "Protokollierter Zustand nicht gefunden".
</Callout>
## Protokollaufbewahrung
- **Kostenloser Plan**: 7 Tage Protokollaufbewahrung
- **Pro-Plan**: 30 Tage Protokollaufbewahrung
- **Team-Plan**: 90 Tage Protokollaufbewahrung
- **Enterprise-Plan**: Individuelle Aufbewahrungszeiträume verfügbar
## Best Practices
### Für die Entwicklung
- Verwenden Sie die Echtzeit-Konsole für sofortiges Feedback während des Testens
- Überprüfen Sie Block-Ein- und Ausgaben, um den Datenfluss zu verifizieren
- Nutzen Sie Workflow-Snapshots, um funktionierende mit fehlerhaften Versionen zu vergleichen
### Für die Produktion
- Überwachen Sie die Protokollseite regelmäßig auf Fehler oder Leistungsprobleme
- Richten Sie Filter ein, um sich auf bestimmte Workflows oder Zeiträume zu konzentrieren
- Verwenden Sie den Live-Modus während kritischer Bereitstellungen, um Ausführungen in Echtzeit zu beobachten
### Für das Debugging
- Überprüfen Sie immer die Ausführungszeitlinie, um langsame Blöcke zu identifizieren
- Vergleichen Sie Eingaben zwischen funktionierenden und fehlerhaften Ausführungen
- Verwenden Sie Workflow-Snapshots, um den genauen Zustand zu sehen, wenn Probleme aufgetreten sind
## Nächste Schritte
- 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

View File

@@ -0,0 +1,193 @@
---
title: Erste Schritte
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import {
AgentIcon,
ApiIcon,
ChartBarIcon,
CodeIcon,
ConditionalIcon,
ConnectIcon,
ExaAIIcon,
FirecrawlIcon,
GmailIcon,
NotionIcon,
PerplexityIcon,
SlackIcon,
} from '@/components/icons'
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.
<Callout type="info">
Dieses Tutorial dauert etwa 10 Minuten und behandelt die wesentlichen Konzepte zum Erstellen von Workflows in Sim.
</Callout>
## Was wir erstellen
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
<Image
src="/static/getting-started/started-1.png"
alt="Beispiel für erste Schritte"
width={800}
height={500}
/>
## 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".
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.
Ziehe nun einen **Agenten-Block** aus dem Blockbereich auf der linken Seite auf die Arbeitsfläche.
Konfiguriere den Agenten-Block:
- **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)
<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.
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)
<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.
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
Du solltest die Antwort des Agenten sehen, der die in deinem Text beschriebene Person analysiert.
<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.
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
<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**.
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
Du solltest jetzt eine strukturierte JSON-Ausgabe sehen, bei der die Informationen der Person in die Felder Standort, Beruf und Bildung gegliedert sind.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="getting-started/started-6.mp4" width={700} height={450} />
</div>
</Step>
</Steps>
## Was du gerade 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
- ✅ Strukturierte JSON-Daten mit KI-generierten Schemas zurückgibt
- ✅ Workflow-Tests und Iterationen demonstriert
- ✅ Die Leistungsfähigkeit des visuellen Workflow-Aufbaus zeigt
## Wichtige Konzepte, die du gelernt hast
### Verwendete Block-Typen
<Files>
<File
name="Start Block"
icon={<ConnectIcon className="h-4 w-4" />}
annotation="Einstiegspunkt für Benutzereingaben (automatisch enthalten)"
/>
<File
name="Agent Block"
icon={<AgentIcon className="h-4 w-4" />}
annotation="KI-Modell für Textverarbeitung und -analyse"
/>
</Files>
### Grundlegende Workflow-Konzepte
**Datenfluss**: Variablen fließen zwischen Blöcken durch das Ziehen von Verbindungen
**Chat-Schnittstelle**: Teste Workflows in Echtzeit mit dem Chat-Panel mit verschiedenen Ausgabeoptionen
**Tool-Integration**: Erweitere die Fähigkeiten des Agenten durch Hinzufügen externer Tools wie Exa und Linkup
**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
**KI-generierte Schemas**: Nutze den Zauberstab (✨), um Schemas mit natürlicher Sprache zu generieren
**Iterative Entwicklung**: Teste, modifiziere und teste Workflows einfach erneut
## Nächste Schritte
<Cards>
<Card title="Weitere Blöcke hinzufügen" href="/blocks">
Erfahre mehr über API-, Funktions- und Bedingungsblöcke
</Card>
<Card title="Tools verwenden" href="/tools">
Integration mit externen Diensten wie Gmail, Slack und Notion
</Card>
<Card title="Benutzerdefinierte Logik hinzufügen" href="/blocks/function">
Verwende Funktionsblöcke für benutzerdefinierte Datenverarbeitung
</Card>
<Card title="Deinen Workflow bereitstellen" href="/execution">
Mache deinen Workflow über REST API zugänglich
</Card>
</Cards>
## Brauchst du Hilfe?
**Bei einem Schritt hängengeblieben?** Schau in unserer [Blocks-Dokumentation](/blocks) nach detaillierten Erklärungen zu jeder Komponente.
**Möchten Sie mehr Beispiele sehen?** Durchsuchen Sie unsere [Tools-Dokumentation](/tools), um zu sehen, welche Integrationen verfügbar sind.
**Bereit für die Bereitstellung?** Erfahren Sie mehr über [Ausführung und Bereitstellung](/execution), um Ihre Workflows zu aktivieren.

Some files were not shown because too many files have changed in this diff Show More