* progress on cred sets
* fix credential set system
* return data to render credential set in block preview
* progress
* invite flow
* simplify code
* fix ui
* fix tests
* fix types
* fix
* fix icon for outlook
* fix cred set name not showing up for owner
* fix rendering of credential set name
* fix outlook well known folder id resolution
* fix perms for creating cred set
* add to docs and simplify ui
* consolidate webhook code better
* fix tests
* fix credential collab logic issue
* fix ui
* fix lint
* feat(fireflies): added fireflies tools and trigger
* finished fireflies
* added wandConfig to all timestamp subblocks on the platform
* added current time to timestamp wand generation
* fix file upload subblock styling, tested all fireflies ops
* removed dropdown for trigger for fireflies
* updated docs
* added fireflies to formatWebhookInput
* added more wandConfigs
* feat(time-picker): added timepicker emcn component, added to playground, added searchable prop for dropdown, added more timezones for schedule, updated license and notice date
* removed unused params, cleaned up redundant utils
* fix(parallel): add parallel sentinel to make parallel-parallel and parallel-loop work correctly
* fix regular -> parallel + copilot nested subflows
* add tests
* consolidate to always explode parallel dag at runtime
* improvement(schedules): use tanstack query to fetch schedule data, cleanup ui on schedule info component
* update trigger-save UI, increase auto disable to 100 consecutive from 10
* updated docs
* consolidate consts
* improvement(variables): update workflows to use deployed variables, not local ones to align with the rest of the canvas components
* update change detection to ignore trigger id since it is runtime metadata and not actually required to be redeployed
* improvement(logs): state machine of workflow execution
* cleanup more code
* fallback consistency
* fix labels
* backfill in migration correctly
* make streaming stop in chat window correctly
* improvement(usage-limit): update usage in real time, fix token output object
* updated tokenBreakdown to tokens, standardized input/output/total token object type across providers
* update remaining references
* ack PR comment
* remove singleton query client instance from hooks, leave only in zustand
* fixed logs for parallel and loop execution flow
* Fix array check for collection
* fixed for empty loop and paralle blocks and showing input on dashboard
* extracted utility functions
* fixed the refrencing errors and making sure it propogates to the console
* fix parallel
* fix tests'
---------
Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
* fix(search): removed full text param from built-in search, anthropic provider streaming fix
* rewrite gemini provider with official sdk + add thinking capability
* vertex gemini consolidation
* never silently use different model
* pass oauth client through the googleAuthOptions param directly
* make server side provider registry
* remove comments
* take oauth selector below model selector
---------
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Reddit API requires User-Agent header for all requests including OAuth
token refresh. Without it, requests fail with 403 error after the
initial token expires.
Fixes#1822
* improvement(pricing): increase free user limit to 20 usd
* make gemini pricing accurate
* generate migration for db constant
* update docs
* test notif data
* fix(vars): add socket persistence when variable names are changed, update variable name normalization to match block name normalization, added space constraint on envvar names
* removed redundant queueing, removed unused immediate flag from sockets ops
* ack PR comments
* creating boolean, number and date tags with different equality matchings
* feat: add UI for tag field types with filter operators
- Update base-tags-modal with field type selector dropdown
- Update document-tags-modal with different input types per fieldType
- Update knowledge-tag-filters with operator dropdown and type-specific inputs
- Update search routes to support all tag slot types
- Update hook to use AllTagSlot type
* feat: add field type support to document-tag-entry component
- Add dropdown with all field types (Text, Number, Date, Boolean)
- Render different value inputs based on field type
- Update slot counting to include all field types (28 total)
* fix: resolve MAX_TAG_SLOTS error and z-index dropdown issue
- Replace MAX_TAG_SLOTS with totalSlots in document-tag-entry
- Add z-index to SelectContent in base-tags-modal for proper layering
* fix: handle non-text columns in getTagUsage query
- Only apply empty string check for text columns (tag1-tag7)
- Numeric/date/boolean columns only check IS NOT NULL
- Cast values to text for consistent output
* refactor: use EMCN components for KB UI
- Replace @/components/ui imports with @/components/emcn
- Use Combobox instead of Select for dropdowns
- Use EMCN Switch, Button, Input, Label components
- Remove unsupported 'size' prop from EMCN Button
* fix: layout for delete button next to date picker
- Change delete button from absolute to inline positioning
- Add proper column width (w-10) for delete button
- Add empty header cell for delete column
- Apply fix to both document-tag-entry and knowledge-tag-filters
* fix: clear value when switching tag field type
- Reset value to empty when changing type (e.g., boolean to text)
- Reset value when tag name changes and type differs
- Prevents 'true'/'false' from sticking in text inputs
* feat: add full support for number/date/boolean tag filtering in KB search
- Copy all tag types (number, date, boolean) from document to embedding records
- Update processDocumentTags to handle all field types with proper type conversion
- Add number/date/boolean columns to document queries in checkDocumentWriteAccess
- Update chunk creation to inherit all tag types from parent document
- Add getSearchResultFields helper for consistent query result selection
- Support structured filters with operators (eq, gt, lt, between, etc.)
- Fix search queries to include all 28 tag fields in results
* fixing tags import issue
* fix rm file
* reduced number to 3 and date to 2
* fixing lint
* fixed the prop size issue
* increased number from 3 to 5 and boolean from 7 to 2
* fixed number the sql stuff
* progress
* fix document tag and kb tag modals
* update datepicker emcn component
* fix ui
* progress on KB block tags UI
* fix issues with date filters
* fix execution parsing of types for KB tags
* remove migration before merge
* regen migrations
* fix tests and types
* address greptile comments
* fix more greptile comments
* fix filtering logic for multiple of same row
* fix tests
---------
Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
* fix(subflow): prevent auto-connect across subflow edges with keyboard shortcut block additions, make positioning for auto-drop smarter
* stronger typing
* fix(autofill): add dummy inputs to prevent browser autofill for various fields, prevent having 0 workflows in workspace
* cleanup
* ack PR comments
* fix failing test
* feat(og): add opengraph images for templates, blogs, and updated existing opengraph image for all other pages
* added to workspace templates page as well
* ack PR comments
* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records (#2441)
* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records
* ack PR comments
* ack PR comments
* cleanup salesforce refresh logic
* ack more PR comments
* feat(compare-schema): ci check to make sure schema.ts never goes out of sync with migrations
* test out of sync [do not merge]
* Revert "test out of sync [do not merge]"
This reverts commit 9771f66b84.
* fix(condition): used isolated vms for condition block RCE
* ack PR comment
* one more
* remove inputForm from sched, update loop condition to also use isolated vm
* hide servicenow
* feat(vertex): added vertex to list of supported providers
* added utils files for each provider, consolidated gemini utils, added dynamic verbosity and reasoning fetcher
* feat(service-now): added service now block
* fix: bun lock
* improvement: fixed @trigger.dev/sdk imports and removal of sentry blocks
* improvement: fixed @trigger.dev/sdk import
* improvement: fixed @trigger.dev/sdk import
* fix(servicenow): save accessTokenExpiresAt on initial OAuth account creation
* docs(servicenow): add ServiceNow tool documentation and icon mapping
* fixing bun lint issues
* fixing username/password fields
* fixing test file for refreshaccesstoken to support instance uri
* removing basic auth and fixing undo-redo/store.ts
* removed import set api code, changed CRUD operations to CRUD_record and added wand configuration to help users to generate JSON Arrays
---------
Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
* make creator profile required
* fix grafana tag dropdown / outputs mismatch
* fix grafana annotations to make dashboard id required
* fix fal ai
* fix fal ai
* fix zep
* fix(tools): fix perplexity & parallel ai tag dropdown inaccuracies
* fixed stt, tts and added output conditions to conditionally display tag dropdown values based on other subblock values
* updated exa to match latest API
* feat(folders): add the ability to create a folder within a folder in popover (#2287)
* fix(agent): filter out empty params to ensure LLM can set tool params at runtime (#2288)
* fix(mcp): added backfill effect to add missing descriptions for mcp tools (#2290)
* fix(redis): cleanup access pattern across callsites (#2289)
* fix(redis): cleanup access pattern across callsites
* swap redis command to be non blocking
* improvement(log-details): polling, trace spans (#2292)
---------
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
* fix(custom-bot-slack): dependsOn incorrectly set for bot_token"
* fix other references to be compatible
* fix dependsOn for things depending on authMethod"
* feat(tools): added rds tools/block
* feat(tools): added rds, dynamodb, background color gradient
* changed conditions for WHERE condition to be json conditions instead of raw string
* fix(team-plans): track departed member usage so value not lost
* reset usage to 0 when they leave team
* prep merge with stagig
* regen migrations
* fix org invite + ws selection'
---------
Co-authored-by: Waleed <walif6@gmail.com>
* feat(agent): added workflow, kb, and function as a tool for agent block
* fix keyboard nav and keyboard selection in tool-inp
* ack PR comments
* remove custom tool changes
* fixed kb tools for agent
* cleanup
* feat(tools): added speech to text with openai whisper, elevenlabs, and deepgram
* added new file icons, implemented ffmpeg
* updated docs
* revert environment
* added blacksmith optimizations to workflows and dockerfiles to enhance performance. please review before pushing to production
* remove cache from and cache to directives from docker based actions, per blacksmith docs
---------
Co-authored-by: Connor Mulholland <connormul@Connors-MacBook-Pro.local>
* fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow
* remove currentIteration in loop
* improvement(docs): remove copy page from mobile view on docs
* bring title and pagenav lower on mobile
* added cursor pointer to clickable components in docs
* fix(triggers): dedup + not surfacing deployment status log
* fix ms teams
* change to microsoftteams
* Revert "change to microsoftteams"
This reverts commit 217f808641.
* fix
* fix
* fix provider name
* fix oauth for msteams
* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect
* fix build
* ack PR comments
* fix(custom-tools): updates to existing tools
* don't reorder custom tools in modal based on edit time
* restructure custom tools to persist copilot generated tools
* fix tests
* fix(templates): view current ui
* update UI to be less cluttered
* make state management for creating user profile smoother
* fix autoselect logic
* fix lint
* improvement(docs): added new platform ss
* rename approval to human in the loop
* cleanup
* remove yml
* removed other languages large sections
* fix icons
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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
* 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>
* improvement(performance): remove writes to workflow updated_at on position updates for blocks, edges, & subflows
* update query pattern for logs routes
* 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
* 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
* 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
* 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>
* 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
* 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>
* 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.
* 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
* 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
* 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
* fix(migrations): downgrade nextjs
* fix(bun): pin bun version in db migrations
* Revert "fix(migrations): downgrade nextjs"
This reverts commit 27b544f22d.
* 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
* 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
* update infra and remove railway
* feat(logs): added intelligent search to logs
* Revert "update infra and remove railway"
This reverts commit abfa2f8d51.
* cleanup
* cleanup
* 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
* 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.
* update infra and remove railway
* fix(kb): exclude deleted docs from queries
* Revert "update infra and remove railway"
This reverts commit b23258a5a1.
* 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>
* 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
* 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
* 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
* 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
* update infra and remove railway
* fix(notifications): increase precision on billing calculations
* Revert "update infra and remove railway"
This reverts commit d17603e844.
* cleanup
* 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
* 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>
* 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
* 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
* 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>
* 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
* 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>
* 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
* 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>
* 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
* 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>
* fix(gpt-5): fixed verbosity and reasoning parsm
* fixed dropdown
* default values for verbosity and reasoning effort
* cleanup
* use default value in dropdown
* 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>
* 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
* 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
* 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>
* 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
* 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
* 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
* 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>
* 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>
* 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
* 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
* 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>
* 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
* 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
* 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
* 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
* fix(logs-page): optimize loading times by improving query, removing unused index, adding new index
* add migration files
* remove fake min loading time
* 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>
* 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>
* 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>
* 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>
* added CDN for large assets with fallback to static assets
* remove video assets from docs
---------
Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
* 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>
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* feat(workspace): add ability to leave joined workspaces
* renamed workspaces/members/[id] to workspaces/members/[userId]
* revert name change for route
* 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
* 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
* 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
* 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
* 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
* 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
* 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(frozen canvas): don't error if workflow state not available for old logs
* fix lint
---------
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@vikhyaths-air.lan>
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.
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
@@ -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/
@@ -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'
@@ -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'
@@ -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!
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 -->
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.
- [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 -->
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.
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.
If you already have Ollama running on your host machine (outside Docker), you need to configure the `OLLAMA_URL` to use `host.docker.internal` instead of `localhost`:
```bash
# With NVIDIA GPU support
docker compose --profile local-gpu -f docker-compose.ollama.yml up -d
# Docker Desktop (macOS/Windows)
OLLAMA_URL=http://host.docker.internal:11434 docker compose -f docker-compose.prod.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
# Linux (add extra_hosts or use host IP)
docker compose -f docker-compose.prod.yml up -d# Then set OLLAMA_URL to your host's IP
```
### Option 3: Dev Containers
**Why?** When running inside Docker, `localhost` refers to the container itself, not your host machine. `host.docker.internal` is a special DNS name that resolves to the host.
For Linux users, you can either:
- Use your host machine's actual IP address (e.g., `http://192.168.1.100:11434`)
- Add `extra_hosts: ["host.docker.internal:host-gateway"]` to the simstudio service in your compose file
#### Using vLLM
Sim also supports [vLLM](https://docs.vllm.ai/) for self-hosted models with OpenAI-compatible API:
```bash
# Set these environment variables
VLLM_BASE_URL=http://your-vllm-server:8000
VLLM_API_KEY=your_optional_api_key # Only if your vLLM instance requires auth
```
When running with Docker, use `host.docker.internal` if vLLM is on your host machine (same as Ollama above).
### Self-hosted: Dev Containers
1. Open VS Code with the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
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
- [Node.js](https://nodejs.org/) v20+ (required for sandboxed code execution)
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
**Note:** Sim uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
1. Clone and install dependencies:
@@ -98,37 +143,123 @@ 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)
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.',
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.',
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
'Comprehensive documentation for Sim visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines.',
'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',
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:
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.
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
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:
<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.
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
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
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.
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:
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
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
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.
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:
- **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
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.
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.
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:
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Agent-Block verbindet deinen Workflow mit Large Language Models (LLMs). Er verarbeitet natürlichsprachliche Eingaben, ruft externe Tools auf und generiert strukturierte oder unstrukturierte Ausgaben.
<div className="flex justify-center">
<Image
src="/static/blocks/agent.png"
alt="Agent-Block-Konfiguration"
width={500}
height={400}
className="my-6"
/>
</div>
## 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 generierte Inhalte während der Workflow-Ausführung
### Modellauswahl
Der Agent-Block unterstützt mehrere LLM-Anbieter über eine einheitliche Inferenzschnittstelle. Verfügbare Modelle umfassen:
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle
### Temperatur
Steuert die Zufälligkeit und Kreativität der Antworten:
- **Niedrig (0-0,3)**: Deterministisch und fokussiert. Am besten für faktische Aufgaben und Genauigkeit.
- **Mittel (0,3-0,7)**: Ausgewogene Kreativität und Fokus. Gut für allgemeine Verwendung.
- **Hoch (0,7-2,0)**: Kreativ und abwechslungsreich. Ideal für Brainstorming und Content-Generierung.
### API-Schlüssel
Ihr API-Schlüssel für den ausgewählten LLM-Anbieter. Dieser wird sicher gespeichert und für die Authentifizierung verwendet.
### Tools
Erweitern Sie die Fähigkeiten des Agenten mit externen Integrationen. Wählen Sie aus über 60 vorgefertigten Tools oder definieren Sie benutzerdefinierte Funktionen.
**Verfügbare Kategorien:**
- **Kommunikation**: Gmail, Slack, Telegram, WhatsApp, Microsoft Teams
- **Datenquellen**: Notion, Google Sheets, Airtable, Supabase, Pinecone
- **Webdienste**: Firecrawl, Google Search, Exa AI, Browser-Automatisierung
- **Auto**: Modell entscheidet kontextbasiert, wann Tools verwendet werden
- **Erforderlich**: Tool muss bei jeder Anfrage aufgerufen werden
- **Keine**: Tool verfügbar, aber dem Modell nicht vorgeschlagen
### Antwortformat
Der Parameter für das Antwortformat erzwingt die Generierung strukturierter Ausgaben durch JSON-Schema-Validierung. Dies gewährleistet konsistente, maschinenlesbare Antworten, die vordefinierten Datenstrukturen entsprechen:
```json
{
"type": "object",
"properties": {
"sentiment": {
"type": "string",
"enum": ["positive", "neutral", "negative"]
},
"summary": {
"type": "string",
"description": "Brief summary of the content"
}
},
"required": ["sentiment", "summary"]
}
```
Diese Konfiguration beschränkt die Ausgabe des Modells auf die Einhaltung des angegebenen Schemas, verhindert Freitextantworten und stellt die Generierung strukturierter Daten sicher.
### Zugriff auf Ergebnisse
Nach Abschluss eines Agenten können Sie auf seine Ausgaben zugreifen:
- **response**: Der Antworttext oder die strukturierten Daten des Agenten
- **toolExecutions**: Details zu allen Tools, die der Agent während der Ausführung verwendet hat
- **estimatedCost**: Geschätzte Kosten des API-Aufrufs (falls verfügbar)
## Erweiterte Funktionen
### Memory + Agent: Gesprächsverlauf
Verwenden Sie einen memory Block mit einer konsistenten memoryId (zum Beispiel, conversationHistory), um Nachrichten zwischen Durchläufen zu speichern und diesen Verlauf in den Prompt des Agenten einzubeziehen.
- Fügen Sie die Nachricht des Benutzers vor dem Agenten hinzu
- Lesen Sie den Gesprächsverlauf für den Kontext
- Hängen Sie die Antwort des Agenten nach dessen Ausführung an
Siehe den [`Memory`](/tools/memory) Blockverweis für Details.
## Ausgaben
- **`<agent.content>`**: Antworttext des Agenten
- **`<agent.tokens>`**: Token-Nutzungsstatistiken
- **`<agent.tool_calls>`**: Details zur Tool-Ausführung
- **`<agent.cost>`**: Geschätzte Kosten des API-Aufrufs
## Beispielanwendungsfälle
**Automatisierung des Kundenservice** - Bearbeitung von Anfragen mit Datenbank- und Tool-Zugriff
**Multi-Modell-Inhaltsanalyse** - Analyse von Inhalten mit verschiedenen KI-Modellen
```
Function (Process) → Agent (GPT-4o Technical) → Agent (Claude Sentiment) → Function (Report)
```
**Tool-gestützter Rechercheassistent** - Recherche mit Websuche und Dokumentenzugriff
```
Input → Agent (Google Search, Notion) → Function (Compile Report)
```
## Bewährte Praktiken
- **Sei spezifisch in System-Prompts**: Definiere die Rolle, den Ton und die Einschränkungen des Agenten klar. Je spezifischer deine Anweisungen sind, desto besser kann der Agent seinen vorgesehenen Zweck erfüllen.
- **Wähle die richtige Temperatureinstellung**: Verwende niedrigere Temperatureinstellungen (0-0,3), wenn Genauigkeit wichtig ist, oder erhöhe die Temperatur (0,7-2,0) für kreativere oder vielfältigere Antworten
- **Nutze Tools effektiv**: Integriere Tools, die den Zweck des Agenten ergänzen und seine Fähigkeiten erweitern. Sei selektiv bei der Auswahl der Tools, um den Agenten nicht zu überfordern. Für Aufgaben mit wenig Überschneidung verwende einen anderen Agent-Block für die besten Ergebnisse.
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der API-Block verbindet Ihren Workflow mit externen Diensten durch HTTP-Anfragen. Unterstützt GET, POST, PUT, DELETE und PATCH Methoden für die Interaktion mit REST-APIs.
<div className="flex justify-center">
<Image
src="/static/blocks/api.png"
alt="API-Block"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### URL
Die Endpunkt-URL für die API-Anfrage. Diese kann sein:
- Eine statische URL, die direkt im Block eingegeben wird
- Eine dynamische URL, die mit der Ausgabe eines anderen Blocks verbunden ist
- 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.
### 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
```
### Anfragekörper
Für Methoden, die einen Anfragekörper unterstützen (POST, PUT, PATCH), können Sie die zu sendenden Daten definieren. Der Körper kann sein:
- JSON-Daten, die direkt im Block eingegeben werden
- Daten, die mit der Ausgabe eines anderen Blocks verbunden sind
- Dynamisch während der Workflow-Ausführung generiert
### Zugriff auf Ergebnisse
Nach Abschluss einer API-Anfrage können Sie auf folgende Ausgaben zugreifen:
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Bedingungsblock verzweigt die Workflow-Ausführung basierend auf booleschen Ausdrücken. Bewerten Sie Bedingungen anhand vorheriger Block-Ausgaben und leiten Sie zu verschiedenen Pfaden weiter, ohne dass ein LLM erforderlich ist.
<div className="flex justify-center">
<Image
src="/static/blocks/condition.png"
alt="Bedingungsblock"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### Bedingungen
Definieren Sie eine oder mehrere Bedingungen, die ausgewertet werden. Jede Bedingung umfasst:
- **Ausdruck**: Ein JavaScript/TypeScript-Ausdruck, der zu wahr oder falsch ausgewertet wird
- **Pfad**: Der Zielblock, zu dem weitergeleitet werden soll, wenn die Bedingung wahr ist
- **Beschreibung**: Optionale Erklärung, was die Bedingung prüft
Sie können mehrere Bedingungen erstellen, die der Reihe nach ausgewertet werden, wobei die erste übereinstimmende Bedingung den Ausführungspfad bestimmt.
### Format für Bedingungsausdrücke
Bedingungen verwenden JavaScript-Syntax und können auf Eingabewerte aus vorherigen Blöcken verweisen.
**Benutzer-Onboarding-Ablauf** - Onboarding basierend auf Benutzertyp personalisieren
```
Function (Process) → Condition (account_type === 'enterprise') → Advanced or Simple
```
## Bewährte Praktiken
- **Bedingungen korrekt anordnen**: Platzieren Sie spezifischere Bedingungen vor allgemeinen, um sicherzustellen, dass spezifische Logik Vorrang vor Fallbacks hat
- **Verwenden Sie den Else-Zweig bei Bedarf**: Wenn keine Bedingungen übereinstimmen und der Else-Zweig nicht verbunden ist, endet der Workflow-Zweig ordnungsgemäß. Verbinden Sie den Else-Zweig, wenn Sie einen Fallback-Pfad für nicht übereinstimmende Fälle benötigen
- **Halten Sie Ausdrücke einfach**: Verwenden Sie klare, unkomplizierte boolesche Ausdrücke für bessere Lesbarkeit und einfachere Fehlersuche
- **Dokumentieren Sie Ihre Bedingungen**: Fügen Sie Beschreibungen hinzu, um den Zweck jeder Bedingung für bessere Teamzusammenarbeit und Wartung zu erklären
- **Testen Sie Grenzfälle**: Überprüfen Sie, ob Bedingungen Grenzwerte korrekt behandeln, indem Sie mit Werten an den Grenzen Ihrer Bedingungsbereiche testen
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Evaluator-Block nutzt KI, um die Inhaltsqualität anhand benutzerdefinierter Metriken zu bewerten. Perfekt für Qualitätskontrolle, A/B-Tests und um sicherzustellen, dass KI-Ausgaben bestimmte Standards erfüllen.
<div className="flex justify-center">
<Image
src="/static/blocks/evaluator.png"
alt="Evaluator-Block-Konfiguration"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### Bewertungsmetriken
Definieren Sie benutzerdefinierte Metriken, anhand derer Inhalte bewertet werden. Jede Metrik umfasst:
- **Name**: Eine kurze Bezeichnung für die Metrik
- **Beschreibung**: Eine detaillierte Erklärung, 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:
- **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 zu komplex zu sein
- **Verbinden Sie mit Agent-Blöcken**: Verwenden Sie Evaluator-Blöcke, um die Ausgaben von Agent-Blöcken zu bewerten und Feedback-Schleifen zu erstellen
- **Verwenden Sie konsistente Metriken**: Für vergleichende Analysen sollten Sie konsistente Metriken über ähnliche Bewertungen hinweg beibehalten
- **Kombinieren Sie mehrere Metriken**: Verwenden Sie verschiedene Metriken, um eine umfassende Bewertung zu erhalten
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.