Compare commits

...

69 Commits

Author SHA1 Message Date
Waleed Latif
9c12ddf491 v0.3.14: aliased imports, logger naming changes, teams webhook synchronization 2025-07-28 10:05:07 -07:00
Vikhyath Mondreti
27ef45f717 no immediate acks for ms teams webhook (#805) 2025-07-28 09:21:59 -07:00
Waleed Latif
0414aa5f6d refactor(imports): added aliased imports everywhere (#799)
* refactor(imports): added aliased imports everywhere

* more aliased imports

* add barrel exports

* add more barrel exports

* cleanup

---------

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

* modify remaining files

* simplify code structure

---------

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

* fix build error

* ack PR comments

---------

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

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

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

* Update .github/workflows/build.yml

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

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-25 15:57:16 -07:00
Vikhyath Mondreti
c91c132e88 Merge pull request #789 from simstudioai/staging
v0.3.11: fix force-dynamic routes, webhooks, kb search perms
2025-07-25 12:44:19 -07:00
Vikhyath Mondreti
5028930b9f fix(webhooks): immediate acks only for teams (#788) 2025-07-25 11:05:14 -07:00
Vikhyath Mondreti
b565babe1f fix(nextjs): add force dynamic to 38 routes (#787) 2025-07-25 10:29:47 -07:00
Vikhyath Mondreti
2f57d8a884 fix(kb-perms): search tool perms to use new system (#786)
* fix(kb): search tool perms

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

* improvement(ui/ux): logs control bar

* improvement(ui): log table

* improvement: logs sidebar

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

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

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

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

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

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

* readd test file

* fixed test

* address greptile comments

* fix button disabling logic

* update filter condition for legacy kbs

* fix kb selector to respect the workspace scoping

* remove testing code

* make workspace selection and prevent cascade deletion

* make workspace selector pass lint

* lint fixed

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

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

* updated docs with new videos, new tools

* update typeform icon

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

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

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

* fixed hanging chat deploy modal

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

* consolidated naming utils

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

* Doc agent fixes

* Refactor copilot

* Lint

* Update yaml editor

* Lint

* Fix block tool

* Lint

* Get block metadata tool

* Lint

* Yaml changes

* Lint

* Fixes?

* Lint

* Better yaml language

* Lint

* UPdate

* Lint

* Fix condition blocks

* lint

* Fix start block

* Fix starter block stuff

* Lint

* Fix yaml ui

* Lint

* get yaml tool

* Lint

* hi

* Lint

* Agnet

* Copilot UI

* Lint

* Better workflow builder

* Lint

* REHYDRATION

* Lint

* Auto layout

* Lint

* Fixes

* Lint

* Chatbar sizing

* Lint

* Initial chat fixes

* Lint

* Dropdown overflow

* Lint

* UI text

* Lint

* Sample question pills

* Lint

* Ui button

* Fix dropdown appearance

* Lint

* Modal fixes

* UI Updates

* Lint

* Initial ask vs agent mode

* Lint

* Ask vs agent

* Lint

* Ask udpate

* Ui fixes

* Lint

* User message width

* Chat leak fix

* Lint

* Agent ui

* Checkpointing

* Lint

* Checkpoints

* Lint

* Tweaks

* Sample questions

* Lint

* Modal full screen mode

* Lint

* Prompt updates

* Cleaning

* Lint

* Prompt update

* Streaming v1

* Lint

* Tool call inline

* Lint

* Checkpoint

* Lint

* Fix lint

* Sizing

* Lint

* Copilot ui tool call fixes

* Remove output from tool call ui

* Updates

* Lint

* Checkpoitn

* Loading icon

* Lint

* Pulse

* Lint

* Modal fixes

* Sidebar padding

* Checkpoint

* checkpoint

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

* improvement: control bar

* improvement: debug flow

* improvement: control bar hovers and skeleton loading

* improvement: completed control bar

* improvement: panel tab selector complete

* refactor: deleted notifications and history dropdown

* improvement: chat UI complete

* fix: tab change on control bar run

* improvement: finshed console (audio display not working)

* fix: text wrapping in console content

* improvement: audio UI

* improvement: image display

* feat: add input to console

* improvement: code input and showing input on errors

* feat: download chat and console

* improvement: expandable panel and console visibility

* improvement: empty state UI

* improvement: finished variables

* fix: image in console entry

* improvement: sidebar and templates ui

* feat: uploading and fetching templates

* improvement: sidebar and control bar

* improvement: templates

* feat: templates done

* fix(sockets): remove package-lock

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

* Checkpoint

* Fix build error

* Checkpoitn

* Docs updates

* Checkpoint

* Streaming vs non streaming

* Clean up yaml save

* Fix revert checkpoitn yaml

* Doc fixes

* Small docs fix

* Clean up old yaml docs

* Doc updates

* Hide copilot

* Revert width

* Db migration fixes

* Add snapshot

* Remove space from mdx

* Add spaces

* Lint

* Address greptile comments

* lint fix

* Hide copilot

---------

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

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

* docs: Updates

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

* Apply suggestions from code review

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

* chore: Updated placeholder text

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

* chore: Post merge updates

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

* chore:  visibility to 'user-only'

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

---------

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

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

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

* add new dmeo

* change console to logger

* new demo

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

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

* added firecrawl crawl tool

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

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

* added additional notion tools, tested

* added additional supabase tools, updated CSP

* added remaining supabase tools

* finished supabase tools

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

* fixed failing test

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

* correctly clear status

* works

* improvements

* fix build issue

* add docs

* remove comments, logs

* fix migration to have foreign ref key

* change filename to snake case

* modified dropdown to match combobox styling

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

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

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

* icons fix

---------

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

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

* fix: workflow rename styling

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

* improvement: added workflow and workspace to search

* improvement: folder path opened for current workflow on load

* improvement: ui/ux workspace selector

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

* working async queue

* working impl of sync + async request formats

* fix tests

* fix rate limit calc

* fix rate limiting issues

* regen migration

* fix test

* fix instrumentation script issues

* remove use workflow queue env var

* make modal have async examples

* Remove conflicting 54th migration before merging staging

* new migration files

* remove console log

* update modal correctly

* working sync executor

* works for sync

* remove useless stats endpoint

* fix tests

* add sync exec timeout

* working impl with cron job

* migrate to trigger.dev

* remove migration

* remove unused code

* update readme

* restructure jobs API response

* add logging for async execs

* improvement: example ui/ux

* use getBaseUrl() func

---------

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

* added advanced mode for oauth block

* added wealthbox advanced mode

* fixed wealthbox

* moved types to types file

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

* upgrade turbo

* fixed starter block input not resolving as string
2025-07-17 17:57:23 -07:00
1075 changed files with 72255 additions and 12273 deletions

View File

@@ -7,17 +7,43 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# AMD64 builds on x86 runners
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
platform: linux/amd64
arch: amd64
runner: linux-x64-8-core
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
platform: linux/amd64
arch: amd64
runner: linux-x64-8-core
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
platform: linux/amd64
arch: amd64
runner: linux-x64-8-core
# ARM64 builds on native ARM64 runners
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
platform: linux/arm64
arch: arm64
runner: linux-arm64-8-core
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
platform: linux/arm64
arch: arm64
runner: linux-arm64-8-core
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
platform: linux/arm64
arch: arm64
runner: linux-arm64-8-core
runs-on: ${{ matrix.runner }}
permissions:
contents: read
packages: write
@@ -26,9 +52,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -41,6 +64,55 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=raw,value=latest-${{ matrix.arch }},enable=${{ github.ref == 'refs/heads/main' }}
type=ref,event=pr,suffix=-${{ matrix.arch }}
type=semver,pattern={{version}},suffix=-${{ matrix.arch }}
type=semver,pattern={{major}}.{{minor}},suffix=-${{ matrix.arch }}
type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-${{ matrix.arch }}
type=sha,format=long,suffix=-${{ matrix.arch }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=build-v2
cache-to: type=gha,mode=max,scope=build-v2
provenance: false
sbom: false
create-manifests:
runs-on: ubuntu-latest
needs: build-and-push
if: github.event_name != 'pull_request'
strategy:
matrix:
include:
- image: ghcr.io/simstudioai/simstudio
- image: ghcr.io/simstudioai/migrations
- image: ghcr.io/simstudioai/realtime
permissions:
contents: read
packages: write
steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for manifest
id: meta
uses: docker/metadata-action@v5
with:
@@ -53,14 +125,35 @@ jobs:
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=sha,format=long
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Create and push manifest
run: |
# Extract the tags from metadata (these are the final manifest tags we want)
MANIFEST_TAGS="${{ steps.meta.outputs.tags }}"
# Create manifest for each tag
for manifest_tag in $MANIFEST_TAGS; do
echo "Creating manifest for $manifest_tag"
# The architecture-specific images have -amd64 and -arm64 suffixes
amd64_image="${manifest_tag}-amd64"
arm64_image="${manifest_tag}-arm64"
echo "Looking for images: $amd64_image and $arm64_image"
# Check if both architecture images exist
if docker manifest inspect "$amd64_image" >/dev/null 2>&1 && docker manifest inspect "$arm64_image" >/dev/null 2>&1; then
echo "Both images found, creating manifest..."
docker manifest create "$manifest_tag" \
"$amd64_image" \
"$arm64_image"
docker manifest push "$manifest_tag"
echo "Successfully created and pushed manifest for $manifest_tag"
else
echo "Error: One or both architecture images not found"
echo "Checking AMD64 image: $amd64_image"
docker manifest inspect "$amd64_image" || echo "AMD64 image not found"
echo "Checking ARM64 image: $arm64_image"
docker manifest inspect "$arm64_image" || echo "ARM64 image not found"
exit 1
fi
done

View File

@@ -74,4 +74,4 @@ jobs:
working-directory: ./apps/sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
run: bunx drizzle-kit push
run: bunx drizzle-kit migrate

View File

@@ -91,6 +91,12 @@ docker compose -f docker-compose.prod.yml up -d
### Option 4: Manual Setup
**Requirements:**
- [Bun](https://bun.sh/) runtime
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
**Note:** Sim Studio uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
1. Clone and install dependencies:
```bash
@@ -99,20 +105,43 @@ cd sim
bun install
```
2. Set up environment:
2. Set up PostgreSQL with pgvector:
You need PostgreSQL with the `vector` extension for embedding support. Choose one option:
**Option A: Using Docker (Recommended)**
```bash
# Start PostgreSQL with pgvector extension
docker run --name simstudio-db \
-e POSTGRES_PASSWORD=your_password \
-e POSTGRES_DB=simstudio \
-p 5432:5432 -d \
pgvector/pgvector:pg17
```
**Option B: Manual Installation**
- Install PostgreSQL 12+ and the pgvector extension
- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation)
3. Set up environment:
```bash
cd apps/sim
cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
```
3. Set up the database:
Update your `.env` file with the database URL:
```bash
bunx drizzle-kit push
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
```
4. Start the development servers:
4. Set up the database:
```bash
bunx drizzle-kit migrate
```
5. Start the development servers:
**Recommended approach - run both servers together (from project root):**
@@ -147,6 +176,7 @@ bun run dev:sockets
- **Docs**: [Fumadocs](https://fumadocs.vercel.app/)
- **Monorepo**: [Turborepo](https://turborepo.org/)
- **Realtime**: [Socket.io](https://socket.io/)
- **Background Jobs**: [Trigger.dev](https://trigger.dev/)
## Contributing

View File

@@ -1,4 +1,3 @@
import { cn } from '@/lib/utils'
import {
AgentIcon,
ApiIcon,
@@ -7,7 +6,8 @@ import {
ConditionalIcon,
ConnectIcon,
ResponseIcon,
} from '../icons'
} from '@/components/icons'
import { cn } from '@/lib/utils'
// Custom Feature component specifically for BlockTypes to handle the 6-item layout
const BlockFeature = ({

View File

@@ -0,0 +1,30 @@
import { getVideoUrl } from '@/lib/utils'
interface VideoProps {
src: string
className?: string
autoPlay?: boolean
loop?: boolean
muted?: boolean
playsInline?: boolean
}
export function Video({
src,
className = 'w-full -mb-2 rounded-lg',
autoPlay = true,
loop = true,
muted = true,
playsInline = true,
}: VideoProps) {
return (
<video
autoPlay={autoPlay}
loop={loop}
muted={muted}
playsInline={playsInline}
className={className}
src={getVideoUrl(src)}
/>
)
}

View File

@@ -7,6 +7,7 @@ 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'
import { Video } from '@/components/ui/video'
The Evaluator block uses AI to score and assess content quality based on metrics you define. Perfect for quality control, A/B testing, and ensuring your AI outputs meet specific standards.
@@ -63,7 +64,7 @@ Choose an AI model to perform the evaluation:
**Local Models**: Any model running on Ollama
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/models.mp4"></video>
<Video src="models.mp4" />
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate evaluations.

View File

@@ -7,11 +7,12 @@ 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'
import { Video } from '@/components/ui/video'
Blocks are the building components you connect together to create AI workflows. Think of them as specialized modules that each handle a specific task—from chatting with AI models to making API calls or processing data.
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
<Video src="connections.mp4" />
</div>
## Core Block Types
@@ -62,7 +63,7 @@ You create workflows by connecting blocks together. The output of one block beco
- **Branching paths**: Some blocks can route to different paths based on conditions
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
<Video src="connections.mp4" />
</div>
## Common Patterns

View File

@@ -172,4 +172,4 @@ After a loop completes, you can access aggregated results:
- **Set reasonable limits**: Keep iteration counts reasonable to avoid long execution times
- **Use ForEach for collections**: When processing arrays or objects, use ForEach instead of For loops
- **Handle errors gracefully**: Consider adding error handling inside loops for robust workflows
- **Handle errors gracefully**: Consider adding error handling inside loops for robust workflows

View File

@@ -4,12 +4,12 @@
"agent",
"api",
"condition",
"function",
"evaluator",
"router",
"response",
"workflow",
"function",
"loop",
"parallel"
"parallel",
"response",
"router",
"workflow"
]
}

View File

@@ -207,4 +207,4 @@ Understanding when to use each:
- **Independent operations only**: Ensure operations don't depend on each other
- **Handle rate limits**: Add delays or throttling for API-heavy workflows
- **Error handling**: Each instance should handle its own errors gracefully
- **Error handling**: Each instance should handle its own errors gracefully

View File

@@ -182,4 +182,5 @@ headers:
- **Structure your responses consistently**: Maintain a consistent JSON structure across all your API endpoints for better developer experience
- **Include relevant metadata**: Add timestamps and version information to help with debugging and monitoring
- **Handle errors gracefully**: Use conditional logic in your workflow to set appropriate error responses with descriptive messages
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes

View File

@@ -8,6 +8,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { ThemeImage } from '@/components/ui/theme-image'
import { Video } from '@/components/ui/video'
The Router block uses AI to intelligently decide which path your workflow should take next. Unlike Condition blocks that use simple rules, Router blocks can understand context and make smart routing decisions based on content analysis.
@@ -103,7 +104,7 @@ Choose an AI model to power the routing decision:
**Local Models**: Any model running on Ollama
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/router-model-dropdown.mp4"></video>
<Video src="router-model-dropdown.mp4" />
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate routing decisions.

View File

@@ -256,4 +256,4 @@ return {
- **Document dependencies**: Clearly document which workflows depend on others and maintain dependency maps
- **Test independently**: Ensure child workflows can be tested and validated independently from parent workflows
- **Monitor performance**: Be aware that nested workflows can impact overall execution time and resource usage
- **Use semantic naming**: Give workflows descriptive names that clearly indicate their purpose and functionality
- **Use semantic naming**: Give workflows descriptive names that clearly indicate their purpose and functionality

View File

@@ -6,6 +6,7 @@ description: Connect your blocks to one another.
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { ConnectIcon } from '@/components/icons'
import { Video } from '@/components/ui/video'
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.
@@ -15,7 +16,7 @@ Connections are the pathways that allow data to flow between blocks in your work
</Callout>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
<Video src="connections.mp4" />
</div>
## Connection Types

View File

@@ -4,11 +4,12 @@ description: Using connection tags to reference data between blocks
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Video } from '@/components/ui/video'
Connection tags are visual representations of the data available from connected blocks. They provide an easy way to reference outputs from previous blocks in your workflow.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
<Video src="connections.mp4" />
</div>
### What Are Connection Tags?

View File

@@ -20,6 +20,7 @@ import {
LoopIcon,
ParallelIcon,
} from '@/components/icons'
import { Video } from '@/components/ui/video'
When you run a workflow in Sim Studio, the execution engine follows a systematic process to ensure blocks are executed in the correct order with proper data flow.
@@ -161,13 +162,9 @@ Run workflows on-demand through the Sim Studio interface by clicking the "Run" b
- One-off tasks
- Workflows that need human supervision
<ThemeImage
lightSrc="/static/light/manual-execution-light.png"
darkSrc="/static/dark/manual-execution-dark.png"
alt="Manual Execution"
width={600}
height={400}
/>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="input-format.mp4" />
</div>
### Scheduled Execution
@@ -178,13 +175,9 @@ Configure workflows to run automatically on a specified schedule:
- Configure timezone settings
- Set minimum and maximum execution intervals
<ThemeImage
lightSrc="/static/light/scheduled-execution-light.png"
darkSrc="/static/dark/scheduled-execution-dark.png"
alt="Scheduled Execution"
width={600}
height={400}
/>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="configure-schedule.mp4" />
</div>
### API Endpoints
@@ -195,13 +188,19 @@ Each workflow can be exposed as an API endpoint:
- Send custom inputs via POST requests
- Receive execution results as JSON responses
<ThemeImage
lightSrc="/static/light/api-execution-light.png"
darkSrc="/static/dark/api-execution-dark.png"
alt="API Execution"
width={600}
height={400}
/>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="api-deployment.mp4" />
</div>
#### Viewing Deployed APIs
Monitor your deployed workflow APIs and their current state:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="api-redeployment.mp4" />
</div>
This shows how to view the deployed state and compare with the original deployed API configuration.
### Webhooks
@@ -212,13 +211,9 @@ Configure workflows to execute in response to external events:
- Configure webhook security settings
- Support for specialized webhooks (GitHub, Stripe, etc.)
<ThemeImage
lightSrc="/static/light/webhook-execution-light.png"
darkSrc="/static/dark/webhook-execution-dark.png"
alt="Webhook Execution"
width={600}
height={400}
/>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="webhooks.mp4" />
</div>
<Callout type="info">
The execution method you choose depends on your workflow's purpose. Manual execution is great for

View File

@@ -23,6 +23,7 @@ import {
PerplexityIcon,
SlackIcon,
} from '@/components/icons'
import { Video } from '@/components/ui/video'
This tutorial will guide you through building your first AI workflow in Sim Studio. We'll create a people research agent that can find information about individuals using state-of-the-art LLM-Search tools.
@@ -63,7 +64,7 @@ A people research agent that:
- **User Prompt**: Drag the connection from the Start block's output into this field (this connects `<start.input>` to the user prompt)
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-2.mp4"></video>
<Video src="examples/started-2.mp4" />
</div>
</Step>
@@ -77,7 +78,7 @@ A people research agent that:
- Add your API keys for both tools (this allows the agent to search the web and access additional information)
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-3.mp4"></video>
<Video src="examples/started-3.mp4" />
</div>
</Step>
@@ -92,7 +93,7 @@ A people research agent that:
You should see the agent's response analyzing the person described in your text.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-4.mp4"></video>
<Video src="examples/started-4.mp4" />
</div>
</Step>
@@ -105,7 +106,7 @@ A people research agent that:
- The AI will generate a JSON schema for you automatically
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-5.mp4"></video>
<Video src="examples/started-5.mp4" />
</div>
</Step>
@@ -120,7 +121,7 @@ A people research agent that:
You should now see structured JSON output with the person's information organized into location, profession, and education fields.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-6.mp4"></video>
<Video src="examples/started-6.mp4" />
</div>
</Step>
</Steps>

View File

@@ -5,6 +5,7 @@
"./introduction/index",
"./getting-started/index",
"---Create---",
"triggers",
"blocks",
"tools",
"---Connections---",
@@ -13,6 +14,7 @@
"execution",
"---Advanced---",
"./variables/index",
"yaml",
"---SDKs---",
"./sdks/python",
"./sdks/typescript"

View File

@@ -142,6 +142,25 @@ Get an AI-generated answer to a question with citations from the web using Exa A
| `url` | string |
| `text` | string |
### `exa_research`
Perform comprehensive research using AI to generate detailed reports with citations
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | Research query or topic |
| `includeText` | boolean | No | Include full text content in results |
| `apiKey` | string | Yes | Exa AI API Key |
#### Output
| Parameter | Type |
| --------- | ---- |
| `taskId` | string |
| `research` | string |
## Block Configuration
@@ -162,6 +181,7 @@ Get an AI-generated answer to a question with citations from the web using Exa A
| `similarLinks` | json | similarLinks output from the block |
| `answer` | string | answer output from the block |
| `citations` | json | citations output from the block |
| `research` | json | research output from the block |
## Notes

View File

@@ -95,6 +95,28 @@ Search for information on the web using Firecrawl
| `data` | string |
| `warning` | string |
### `firecrawl_crawl`
Crawl entire websites and extract structured content from all accessible pages
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | The website URL to crawl |
| `limit` | number | No | Maximum number of pages to crawl \(default: 100\) |
| `onlyMainContent` | boolean | No | Extract only main content from pages |
| `apiKey` | string | Yes | Firecrawl API Key |
#### Output
| Parameter | Type |
| --------- | ---- |
| `jobId` | string |
| `pages` | string |
| `total` | string |
| `creditsUsed` | string |
## Block Configuration
@@ -116,6 +138,9 @@ Search for information on the web using Firecrawl
| `metadata` | json | metadata output from the block |
| `data` | json | data output from the block |
| `warning` | any | warning output from the block |
| `pages` | json | pages output from the block |
| `total` | number | total output from the block |
| `creditsUsed` | number | creditsUsed output from the block |
## Notes

View File

@@ -64,3 +64,14 @@ Tools typically return structured data that can be processed by subsequent block
- Status information
Refer to each tool's specific documentation to understand its exact output format.
## YAML Configuration
For detailed YAML workflow configuration and syntax, see the [YAML Workflow Reference](/yaml) documentation. This includes comprehensive guides for:
- **Block Reference Syntax**: How to connect and reference data between blocks
- **Tool Configuration**: Using tools in both standalone blocks and agent configurations
- **Environment Variables**: Secure handling of API keys and credentials
- **Complete Examples**: Real-world workflow patterns and configurations
For specific tool parameters and configuration options, refer to each tool's individual documentation page.

View File

@@ -34,8 +34,10 @@
"outlook",
"perplexity",
"pinecone",
"qdrant",
"reddit",
"s3",
"schedule",
"serper",
"slack",
"stagehand",
@@ -49,6 +51,7 @@
"typeform",
"vision",
"wealthbox",
"webhook",
"whatsapp",
"x",
"youtube"

View File

@@ -62,6 +62,30 @@ Read content from a Notion page
| `createdTime` | string |
| `url` | string |
### `notion_read_database`
Read database information and structure from Notion
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `databaseId` | string | Yes | The ID of the Notion database to read |
#### Output
| Parameter | Type |
| --------- | ---- |
| `metadata` | string |
| `url` | string |
| `id` | string |
| `createdTime` | string |
| `lastEditedTime` | string |
| `properties` | string |
| `content` | string |
| `title` | string |
### `notion_write`
Append content to a Notion page
@@ -89,10 +113,8 @@ Create a new page in Notion
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `parentType` | string | Yes | Type of parent: |
| `parentId` | string | Yes | ID of the parent page or database |
| `title` | string | No | Title of the page \(required for parent pages, not for databases\) |
| `properties` | json | No | JSON object of properties for database pages |
| `parentId` | string | Yes | ID of the parent page |
| `title` | string | No | Title of the new page |
| `content` | string | No | Optional content to add to the page upon creation |
#### Output
@@ -101,6 +123,77 @@ Create a new page in Notion
| --------- | ---- |
| `content` | string |
### `notion_query_database`
Query and filter Notion database entries with advanced filtering
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `databaseId` | string | Yes | The ID of the database to query |
| `filter` | string | No | Filter conditions as JSON \(optional\) |
| `sorts` | string | No | Sort criteria as JSON array \(optional\) |
| `pageSize` | number | No | Number of results to return \(default: 100, max: 100\) |
#### Output
| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |
| `hasMore` | string |
| `nextCursor` | string |
| `results` | string |
### `notion_search`
Search across all pages and databases in Notion workspace
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `query` | string | No | Search terms \(leave empty to get all pages\) |
| `filterType` | string | No | Filter by object type: page, database, or leave empty for all |
| `pageSize` | number | No | Number of results to return \(default: 100, max: 100\) |
#### Output
| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |
| `hasMore` | string |
| `nextCursor` | string |
| `results` | string |
### `notion_create_database`
Create a new database in Notion with custom properties
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `parentId` | string | Yes | ID of the parent page where the database will be created |
| `title` | string | Yes | Title for the new database |
| `properties` | string | No | Database properties as JSON object \(optional, will create a default |
#### Output
| Parameter | Type |
| --------- | ---- |
| `metadata` | string |
| `url` | string |
| `createdTime` | string |
| `properties` | string |
| `content` | string |
| `title` | string |
## Block Configuration

View File

@@ -0,0 +1,182 @@
---
title: Qdrant
description: Use Qdrant vector database
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="qdrant"
color="#1A223F"
icon={true}
iconSvg={`<svg className="block-icon" fill='none' viewBox='0 0 49 56' xmlns='http://www.w3.org/2000/svg'>
<g clipPath='url(#b)'>
<path
d='m38.489 51.477-1.1167-30.787-2.0223-8.1167 13.498 1.429v37.242l-8.2456 4.7589-2.1138-4.5259z'
clipRule='evenodd'
fill='#24386C'
fillRule='evenodd'
/>
<path
d='m48.847 14-8.2457 4.7622-17.016-3.7326-19.917 8.1094-3.3183-9.139 12.122-7 12.126-7 12.123 7 12.126 7z'
clipRule='evenodd'
fill='#7589BE'
fillRule='evenodd'
/>
<path
d='m0.34961 13.999 8.2457 4.7622 4.7798 14.215 16.139 12.913-4.9158 10.109-12.126-7.0004-12.123-7v-28z'
clipRule='evenodd'
fill='#B2BFE8'
fillRule='evenodd'
/>
<path
d='m30.066 38.421-5.4666 8.059v9.5207l7.757-4.4756 3.9968-5.9681'
clipRule='evenodd'
fill='#24386C'
fillRule='evenodd'
/>
<path
d='m24.602 36.962-7.7603-13.436 1.6715-4.4531 6.3544-3.0809 7.488 7.5343-7.7536 13.436z'
clipRule='evenodd'
fill='#7589BE'
fillRule='evenodd'
/>
<path
d='m16.843 23.525 7.7569 4.4756v8.9585l-7.1741 0.3087-4.3397-5.5412 3.7569-8.2016z'
clipRule='evenodd'
fill='#B2BFE8'
fillRule='evenodd'
/>
<path
d='m24.6 28 7.757-4.4752 5.2792 8.7903-6.3886 5.2784-6.6476-0.6346v-8.9589z'
clipRule='evenodd'
fill='#24386C'
fillRule='evenodd'
/>
<path
d='m32.355 51.524 8.2457 4.476v-37.238l-8.0032-4.6189-7.9995-4.6189-8.0031 4.6189-7.9995 4.6189v18.479l7.9995 4.6189 8.0031 4.6193 7.757-4.4797v9.5244zm0-19.045-7.757 4.4793-7.7569-4.4793v-8.9549l7.7569-4.4792 7.757 4.4792v8.9549z'
clipRule='evenodd'
fill='#DC244C'
fillRule='evenodd'
/>
<path d='m24.603 46.483v-9.5222l-7.7166-4.4411v9.5064l7.7166 4.4569z' fill='url(#a)' />
</g>
<defs>
<linearGradient
id='a'
x1='23.18'
x2='15.491'
y1='38.781'
y2='38.781'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#FF3364' offset='0' />
<stop stopColor='#C91540' stopOpacity='0' offset='1' />
</linearGradient>
<clipPath id='b'>
<rect transform='translate(.34961)' fill='#fff' />
</clipPath>
</defs>
</svg>`}
/>
## Usage Instructions
Store, search, and retrieve vector embeddings using Qdrant. Perform semantic similarity searches and manage your vector collections.
## Tools
### `qdrant_upsert_points`
Insert or update points in a Qdrant collection
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | Qdrant base URL |
| `apiKey` | string | No | Qdrant API key \(optional\) |
| `collection` | string | Yes | Collection name |
| `points` | array | Yes | Array of points to upsert |
#### Output
| Parameter | Type |
| --------- | ---- |
| `status` | string |
| `data` | string |
### `qdrant_search_vector`
Search for similar vectors in a Qdrant collection
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | Qdrant base URL |
| `apiKey` | string | No | Qdrant API key \(optional\) |
| `collection` | string | Yes | Collection name |
| `vector` | array | Yes | Vector to search for |
| `limit` | number | No | Number of results to return |
| `filter` | object | No | Filter to apply to the search |
| `with_payload` | boolean | No | Include payload in response |
| `with_vector` | boolean | No | Include vector in response |
#### Output
| Parameter | Type |
| --------- | ---- |
| `data` | string |
| `status` | string |
### `qdrant_fetch_points`
Fetch points by ID from a Qdrant collection
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | Qdrant base URL |
| `apiKey` | string | No | Qdrant API key \(optional\) |
| `collection` | string | Yes | Collection name |
| `ids` | array | Yes | Array of point IDs to fetch |
| `with_payload` | boolean | No | Include payload in response |
| `with_vector` | boolean | No | Include vector in response |
#### Output
| Parameter | Type |
| --------- | ---- |
| `data` | string |
| `status` | string |
## Block Configuration
### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `operation` | string | Yes | Operation |
### Outputs
| Output | Type | Description |
| ------ | ---- | ----------- |
| `matches` | any | matches output from the block |
| `upsertedCount` | any | upsertedCount output from the block |
| `data` | any | data output from the block |
| `status` | any | status output from the block |
## Notes
- Category: `tools`
- Type: `qdrant`

View File

@@ -0,0 +1,57 @@
---
title: Schedule
description: Trigger workflow execution on a schedule
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="schedule"
color="#7B68EE"
icon={true}
iconSvg={`<svg className="block-icon"
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
>
<path d='M8 2v4' />
<path d='M16 2v4' />
<rect x='3' y='4' rx='2' />
<path d='M3 10h18' />
</svg>`}
/>
## Usage Instructions
Configure automated workflow execution with flexible timing options. Set up recurring workflows that run at specific intervals or times.
## Block Configuration
### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `scheduleConfig` | schedule-config | Yes | Schedule Status |
| `scheduleType` | dropdown | Yes | Frequency |
### Outputs
This block does not produce any outputs.
## Notes
- Category: `triggers`
- Type: `schedule`

View File

@@ -83,6 +83,52 @@ Send messages to Slack channels or users through the Slack API. Supports Slack m
| `ts` | string |
| `channel` | string |
### `slack_canvas`
Create and share Slack canvases in channels. Canvases are collaborative documents within Slack.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Authentication method: oauth or bot_token |
| `botToken` | string | No | Bot token for Custom Bot |
| `accessToken` | string | No | OAuth access token or bot token for Slack API |
| `channel` | string | Yes | Target Slack channel \(e.g., #general\) |
| `title` | string | Yes | Title of the canvas |
| `content` | string | Yes | Canvas content in markdown format |
| `document_content` | object | No | Structured canvas document content |
#### Output
| Parameter | Type |
| --------- | ---- |
| `canvas_id` | string |
| `channel` | string |
| `title` | string |
### `slack_message_reader`
Read the latest messages from Slack channels. Retrieve conversation history with filtering options.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Authentication method: oauth or bot_token |
| `botToken` | string | No | Bot token for Custom Bot |
| `accessToken` | string | No | OAuth access token or bot token for Slack API |
| `channel` | string | Yes | Slack channel to read messages from \(e.g., #general\) |
| `limit` | number | No | Number of messages to retrieve \(default: 10, max: 100\) |
| `oldest` | string | No | Start of time range \(timestamp\) |
| `latest` | string | No | End of time range \(timestamp\) |
#### Output
| Parameter | Type |
| --------- | ---- |
| `messages` | string |
## Block Configuration
@@ -101,6 +147,9 @@ Send messages to Slack channels or users through the Slack API. Supports Slack m
| ------ | ---- | ----------- |
| `ts` | string | ts output from the block |
| `channel` | string | channel output from the block |
| `canvas_id` | string | canvas_id output from the block |
| `title` | string | title output from the block |
| `messages` | json | messages output from the block |
## Notes

View File

@@ -85,8 +85,10 @@ Query data from a Supabase table
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to query |
| `filter` | object | No | Filter to apply to the query |
| `apiKey` | string | Yes | Your Supabase client anon key |
| `filter` | string | No | PostgREST filter \(e.g., |
| `orderBy` | string | No | Column to order by \(add DESC for descending\) |
| `limit` | number | No | Maximum number of rows to return |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
@@ -106,7 +108,7 @@ Insert data into a Supabase table
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to insert data into |
| `data` | any | Yes | The data to insert |
| `apiKey` | string | Yes | Your Supabase client anon key |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
@@ -115,6 +117,65 @@ Insert data into a Supabase table
| `message` | string |
| `results` | string |
### `supabase_get_row`
Get a single row from a Supabase table based on filter criteria
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to query |
| `filter` | string | Yes | PostgREST filter to find the specific row \(e.g., |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type |
| --------- | ---- |
| `message` | string |
| `results` | string |
### `supabase_update`
Update rows in a Supabase table based on filter criteria
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to update |
| `filter` | string | Yes | PostgREST filter to identify rows to update \(e.g., |
| `data` | object | Yes | Data to update in the matching rows |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type |
| --------- | ---- |
| `message` | string |
### `supabase_delete`
Delete rows from a Supabase table based on filter criteria
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to delete from |
| `filter` | string | Yes | PostgREST filter to identify rows to delete \(e.g., |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type |
| --------- | ---- |
| `message` | string |
## Block Configuration

View File

@@ -11,15 +11,22 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
icon={true}
iconSvg={`<svg className="block-icon"
viewBox='0 0 24 24'
fill='none'
version='1.1'
id='Layer_1'
xmlns='http://www.w3.org/2000/svg'
xmlnsXlink='http://www.w3.org/1999/xlink'
x='0px'
y='0px'
viewBox='0 0 122.3 80.3'
xmlSpace='preserve'
>
<g transform='translate(1, 4)'>
<rect x='0' y='0' rx='2.5' fill='currentColor' />
<rect x='8' y='0' rx='4' fill='currentColor' />
<g>
<path
fill='currentColor'
d='M94.3,0H65.4c-26,0-28,11.2-28,26.2l0,27.9c0,15.6,2,26.2,28.1,26.2h28.8c26,0,28-11.2,28-26.1V26.2
C122.3,11.2,120.3,0,94.3,0z M0,20.1C0,6.9,5.2,0,14,0c8.8,0,14,6.9,14,20.1v40.1c0,13.2-5.2,20.1-14,20.1c-8.8,0-14-6.9-14-20.1
V20.1z'
/>
</g>
</svg>`}
/>

View File

@@ -0,0 +1,46 @@
---
title: Webhook
description: Trigger workflow execution from external webhooks
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="webhook"
color="#10B981"
icon={true}
iconSvg={`<svg className="block-icon"
fill='currentColor'
viewBox='0 0 24 24'
xmlns='http://www.w3.org/2000/svg'
>
<path d='M17.974 7A4.967 4.967 0 0 0 18 6.5a5.5 5.5 0 1 0-8.672 4.491L7.18 15.114A2.428 2.428 0 0 0 6.496 15 2.5 2.5 0 1 0 9 17.496a2.36 2.36 0 0 0-.93-1.925l2.576-4.943-.41-.241A4.5 4.5 0 1 1 17 6.5a4.8 4.8 0 0 1-.022.452zM6.503 18.999a1.5 1.5 0 1 1 1.496-1.503A1.518 1.518 0 0 1 6.503 19zM18.5 12a5.735 5.735 0 0 0-1.453.157l-2.744-3.941A2.414 2.414 0 0 0 15 6.5a2.544 2.544 0 1 0-1.518 2.284l3.17 4.557.36-.13A4.267 4.267 0 0 1 18.5 13a4.5 4.5 0 1 1-.008 9h-.006a4.684 4.684 0 0 1-3.12-1.355l-.703.71A5.653 5.653 0 0 0 18.49 23h.011a5.5 5.5 0 0 0 0-11zM11 6.5A1.5 1.5 0 1 1 12.5 8 1.509 1.509 0 0 1 11 6.5zM18.5 20a2.5 2.5 0 1 0-2.447-3h-5.05l-.003.497A4.546 4.546 0 0 1 6.5 22 4.526 4.526 0 0 1 2 17.5a4.596 4.596 0 0 1 3.148-4.37l-.296-.954A5.606 5.606 0 0 0 1 17.5 5.532 5.532 0 0 0 6.5 23a5.573 5.573 0 0 0 5.478-5h4.08a2.487 2.487 0 0 0 2.442 2zm0-4a1.5 1.5 0 1 1-1.5 1.5 1.509 1.509 0 0 1 1.5-1.5z' />
<path fill='none' d='M0 0h24v24H0z' />
</svg>`}
/>
## Block Configuration
### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhookProvider` | dropdown | Yes | Webhook Provider |
### Outputs
This block does not produce any outputs.
## Notes
- Category: `triggers`
- Type: `webhook`

View File

@@ -0,0 +1,4 @@
{
"title": "Triggers",
"pages": ["starter", "schedule", "webhook"]
}

View File

@@ -0,0 +1,69 @@
---
title: Schedule
description: Automatically trigger workflows on a recurring schedule
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Schedule block automatically triggers workflow execution at specified intervals or times.
<ThemeImage
lightSrc="/static/light/schedule-light.png"
darkSrc="/static/dark/schedule-dark.png"
alt="Schedule Block"
width={350}
height={175}
/>
## Schedule Options
Configure when your workflow runs using the dropdown options:
<Tabs items={['Simple Intervals', 'Cron Expressions']}>
<Tab>
<ul className="list-disc space-y-1 pl-6">
<li><strong>Every few minutes</strong>: 5, 15, 30 minute intervals</li>
<li><strong>Hourly</strong>: Every hour or every few hours</li>
<li><strong>Daily</strong>: Once or multiple times per day</li>
<li><strong>Weekly</strong>: Specific days of the week</li>
<li><strong>Monthly</strong>: Specific days of the month</li>
</ul>
</Tab>
<Tab>
<p>Use cron expressions for advanced scheduling:</p>
<div className="text-sm space-y-1">
<div><code>0 9 * * 1-5</code> - Every weekday at 9 AM</div>
<div><code>*/15 * * * *</code> - Every 15 minutes</div>
<div><code>0 0 1 * *</code> - First day of each month</div>
</div>
</Tab>
</Tabs>
## Configuring Schedules
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/configure-schedule.mp4"></video>
</div>
When a workflow is scheduled:
- The schedule becomes **active** and shows the next execution time
- Click the **"Scheduled"** button to deactivate the schedule
- Schedules automatically deactivate after **3 consecutive failures**
## Disabled Schedules
<ThemeImage
lightSrc="/static/light/schedule-disabled-light.png"
darkSrc="/static/dark/schedule-disabled-dark.png"
alt="Disabled Schedule"
width={500}
height={200}
/>
Disabled schedules show when they were last active and can be re-enabled at any time.
<Callout>
Schedule blocks cannot receive incoming connections and serve as pure workflow triggers.
</Callout>

View File

@@ -0,0 +1,92 @@
---
title: Starter
description: Manually initiate workflow execution with input parameters
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Starter block allows manual workflow execution with two input modes: structured parameters or conversational chat.
<ThemeImage
lightSrc="/static/light/starter-light.png"
darkSrc="/static/dark/starter-dark.png"
alt="Starter Block with Manual and Chat Mode Options"
width={350}
height={175}
/>
## Execution Modes
Choose your input method from the dropdown:
<Tabs items={['Manual Mode', 'Chat Mode']}>
<Tab>
<div className="space-y-4">
<ul className="list-disc space-y-1 pl-6">
<li><strong>Structured inputs</strong>: Define specific parameters (text, number, boolean, JSON, file, date)</li>
<li><strong>Form interface</strong>: Users fill out a form with predefined fields</li>
<li><strong>API friendly</strong>: Perfect for programmatic execution</li>
</ul>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/input-format.mp4"></video>
</div>
<p className="text-sm text-gray-600">Configure input parameters that will be available when deploying as an API endpoint.</p>
</div>
</Tab>
<Tab>
<div className="space-y-4">
<ul className="list-disc space-y-1 pl-6">
<li><strong>Natural language</strong>: Users type questions or requests</li>
<li><strong>start.input variable</strong>: Captures all user input as `<start.input>`</li>
<li><strong>start.conversationId</strong>: Access conversation ID as `<start.conversationId>`</li>
<li><strong>Conversational</strong>: Ideal for AI-powered workflows</li>
</ul>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/chat-input.mp4"></video>
</div>
<p className="text-sm text-gray-600">Chat with your workflow and access both input text and conversation ID for context-aware responses.</p>
</div>
</Tab>
</Tabs>
## Using Chat Variables
In Chat mode, access user input and conversation context through special variables:
```yaml
# Reference the chat input and conversation ID in your workflow
user_message: "<start.input>"
conversation_id: "<start.conversationId>"
```
- **`<start.input>`** - Contains the user's message text
- **`<start.conversationId>`** - Unique identifier for the conversation thread
## API Execution
<Tabs items={['Manual Mode', 'Chat Mode']}>
<Tab>
```bash
curl -X POST "https://api.sim.dev/v1/workflows/{id}/start" \
-H "Authorization: Bearer {api-key}" \
-d '{"parameters": {"userId": "123", "action": "process"}}'
```
</Tab>
<Tab>
```bash
curl -X POST "https://api.sim.dev/v1/workflows/{id}/start" \
-H "Authorization: Bearer {api-key}" \
-d '{"input": "Analyze Q4 sales data"}'
```
</Tab>
</Tabs>
<Callout>
Starter blocks are ideal for testing workflows and user-initiated tasks. For automated execution, use Schedule or Webhook triggers.
</Callout>

View File

@@ -0,0 +1,54 @@
---
title: Webhooks
description: Trigger workflow execution from external webhooks
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
import { Video } from '@/components/ui/video'
The Webhook block allows external services to automatically trigger your workflow execution through HTTP webhooks.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="webhooks.mp4" />
</div>
## Supported Providers
Choose from the dropdown to configure your webhook source:
<Tabs items={['Popular Services', 'Generic']}>
<Tab>
<ul className="grid grid-cols-2 gap-1 text-sm">
<li>**Slack** - Bot events and messages</li>
<li>**Gmail** - Email notifications</li>
<li>**GitHub** - Repository events</li>
<li>**Discord** - Server events</li>
<li>**Airtable** - Database changes</li>
<li>**Telegram** - Bot messages</li>
<li>**WhatsApp** - Messaging events</li>
<li>**Stripe** - Payment events</li>
</ul>
</Tab>
<Tab>
<p>For custom integrations:</p>
<ul className="list-disc space-y-1 pl-6 text-sm">
<li><strong>HTTP POST</strong>: Accepts requests from any client</li>
<li><strong>Authentication</strong>: Bearer token or custom headers</li>
<li><strong>Security</strong>: IP restrictions and rate limiting</li>
<li><strong>Deduplication</strong>: Prevents duplicate requests</li>
</ul>
</Tab>
</Tabs>
## How It Works
1. **Configure Provider** - Select from dropdown and set up authentication
2. **Get Webhook URL** - Automatically generated unique endpoint
3. **External Service** - Sends HTTP POST to your webhook URL
4. **Workflow Triggers** - Automatically starts when webhook is received
<Callout>
Webhooks cannot receive incoming connections and serve as pure workflow triggers.
</Callout>

View File

@@ -7,16 +7,13 @@ 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'
import { Video } from '@/components/ui/video'
Variables in Sim Studio act as a global store for data that can be accessed and modified by any block in your workflow. They provide a powerful way to share information between different parts of your workflow, maintain state, and create more dynamic applications.
<ThemeImage
lightSrc="/static/light/variables-light.png"
darkSrc="/static/dark/variables-dark.png"
alt="Variables Panel"
width={300}
height={175}
/>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="variables.mp4" />
</div>
<Callout type="info">
Variables allow you to store and share data across your entire workflow, making it easy to
@@ -60,13 +57,9 @@ Variables can be accessed from any block in your workflow using the variable dro
2. Browse the dropdown menu to select from available variables
3. Select the variable you want to use
<ThemeImage
lightSrc="/static/light/variabledropdown-light.png"
darkSrc="/static/dark/variabledropdown-dark.png"
alt="Variable Dropdown"
width={300}
height={175}
/>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="variables-dropdown.mp4" />
</div>
<Callout>
You can also drag the connection tag into a field to open the variable dropdown and access

View File

@@ -0,0 +1,238 @@
---
title: Block Reference Syntax
description: How to reference data between blocks in YAML workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
Block references are the foundation of data flow in Sim Studio workflows. Understanding how to correctly reference outputs from one block as inputs to another is essential for building functional workflows.
## Basic Reference Rules
### 1. Use Block Names, Not Block IDs
<Tabs items={['Correct', 'Incorrect']}>
<Tab>
```yaml
# Block definition
email-sender:
type: agent
name: "Email Generator"
# ... configuration
# Reference the block
next-block:
inputs:
userPrompt: "Process this: <emailgenerator.content>"
```
</Tab>
<Tab>
```yaml
# Block definition
email-sender:
type: agent
name: "Email Generator"
# ... configuration
# ❌ Don't reference by block ID
next-block:
inputs:
userPrompt: "Process this: <email-sender.content>"
```
</Tab>
</Tabs>
### 2. Convert Names to Reference Format
To create a block reference:
1. **Take the block name**: "Email Generator"
2. **Convert to lowercase**: "email generator"
3. **Remove spaces and special characters**: "emailgenerator"
4. **Add property**: `<emailgenerator.content>`
### 3. Use Correct Properties
Different block types expose different properties:
- **Agent blocks**: `.content` (the AI response)
- **Function blocks**: `.output` (the return value)
- **API blocks**: `.output` (the response data)
- **Tool blocks**: `.output` (the tool result)
## Reference Examples
### Common Block References
```yaml
# Agent block outputs
<agentname.content> # Primary AI response
<agentname.tokens> # Token usage information
<agentname.cost> # Estimated cost
<agentname.tool_calls> # Tool execution details
# Function block outputs
<functionname.output> # Function return value
<functionname.error> # Error information (if any)
# API block outputs
<apiname.output> # Response data
<apiname.status> # HTTP status code
<apiname.headers> # Response headers
# Tool block outputs
<toolname.output> # Tool execution result
```
### Multi-Word Block Names
```yaml
# Block name: "Data Processor 2"
<dataprocessor2.output>
# Block name: "Email Validation Service"
<emailvalidationservice.output>
# Block name: "Customer Info Agent"
<customerinfoagent.content>
```
## Special Reference Cases
### Starter Block
<Callout type="warning">
The starter block is always referenced as `<start.input>` regardless of its actual name.
</Callout>
```yaml
# Starter block definition
my-custom-start:
type: starter
name: "Custom Workflow Start"
# ... configuration
# Always reference as 'start'
agent-1:
inputs:
userPrompt: <start.input> # ✅ Correct
# userPrompt: <customworkflowstart.input> # ❌ Wrong
```
### Loop Variables
Inside loop blocks, special variables are available:
```yaml
# Available in loop child blocks
<loop.index> # Current iteration (0-based)
<loop.currentItem> # Current item being processed (forEach loops)
<loop.items> # Full collection (forEach loops)
```
### Parallel Variables
Inside parallel blocks, special variables are available:
```yaml
# Available in parallel child blocks
<parallel.index> # Instance number (0-based)
<parallel.currentItem> # Item for this instance
<parallel.items> # Full collection
```
## Complex Reference Examples
### Nested Data Access
When referencing complex objects, use dot notation:
```yaml
# If an agent returns structured data
data-analyzer:
type: agent
name: "Data Analyzer"
inputs:
responseFormat: |
{
"schema": {
"type": "object",
"properties": {
"analysis": {"type": "object"},
"summary": {"type": "string"},
"metrics": {"type": "object"}
}
}
}
# Reference nested properties
next-step:
inputs:
userPrompt: |
Summary: <dataanalyzer.analysis.summary>
Score: <dataanalyzer.metrics.score>
Full data: <dataanalyzer.content>
```
### Multiple References in Text
```yaml
email-composer:
type: agent
inputs:
userPrompt: |
Create an email with the following information:
Customer: <customeragent.content>
Order Details: <orderprocessor.output>
Support Ticket: <ticketanalyzer.content>
Original request: <start.input>
```
### References in Code Blocks
When using references in function blocks, they're replaced as JavaScript values:
```yaml
data-processor:
type: function
inputs:
code: |
// References are replaced with actual values
const customerData = <customeragent.content>;
const orderInfo = <orderprocessor.output>;
const originalInput = <start.input>;
// Process the data
return {
customer: customerData.name,
orderId: orderInfo.id,
processed: true
};
```
## Reference Validation
Sim Studio validates all references when importing YAML:
### Valid References
- Block exists in the workflow
- Property is appropriate for block type
- No circular dependencies
- Proper syntax formatting
### Common Errors
- **Block not found**: Referenced block doesn't exist
- **Wrong property**: Using `.content` on a function block
- **Typos**: Misspelled block names or properties
- **Circular references**: Block references itself directly or indirectly
## Best Practices
1. **Use descriptive block names**: Makes references more readable
2. **Be consistent**: Use the same naming convention throughout
3. **Check references**: Ensure all referenced blocks exist
4. **Avoid deep nesting**: Keep reference chains manageable
5. **Document complex flows**: Add comments to explain reference relationships

View File

@@ -0,0 +1,218 @@
---
title: Agent Block YAML Schema
description: YAML configuration reference for Agent blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
properties:
type:
type: string
enum: [agent]
description: Block type identifier
name:
type: string
description: Display name for this agent block
inputs:
type: object
properties:
systemPrompt:
type: string
description: Instructions that define the agent's role and behavior
userPrompt:
type: string
description: Input content to process (can reference other blocks)
model:
type: string
description: AI model identifier (e.g., gpt-4o, gemini-2.5-pro, deepseek-chat)
temperature:
type: number
minimum: 0
maximum: 2
description: Response creativity level (varies by model)
apiKey:
type: string
description: API key for the model provider (use {{ENV_VAR}} format)
azureEndpoint:
type: string
description: Azure OpenAI endpoint URL (required for Azure models)
azureApiVersion:
type: string
description: Azure API version (required for Azure models)
memories:
type: string
description: Memory context from memory blocks
tools:
type: array
description: List of external tools the agent can use
items:
type: object
required: [type, title, toolId, operation, usageControl]
properties:
type:
type: string
description: Tool type identifier
title:
type: string
description: Human-readable display name
toolId:
type: string
description: Internal tool identifier
operation:
type: string
description: Tool operation/method name
usageControl:
type: string
enum: [auto, required, none]
description: When AI can use the tool
params:
type: object
description: Tool-specific configuration parameters
isExpanded:
type: boolean
description: UI state
default: false
responseFormat:
type: object
description: JSON Schema to enforce structured output
required:
- model
- apiKey
connections:
type: object
properties:
success:
type: string
description: Target block ID for successful execution
error:
type: string
description: Target block ID for error handling
```
## Tool Configuration
Tools are defined as an array where each tool has this structure:
```yaml
tools:
- type: <string> # Tool type identifier (exa, gmail, slack, etc.)
title: <string> # Human-readable display name
toolId: <string> # Internal tool identifier
operation: <string> # Tool operation/method name
usageControl: <string> # When AI can use it (auto | required | none)
params: <object> # Tool-specific configuration parameters
isExpanded: <boolean> # UI state (optional, default: false)
```
## Connection Configuration
Connections define where the workflow goes based on execution results:
```yaml
connections:
success: <string> # Target block ID for successful execution
error: <string> # Target block ID for error handling (optional)
```
## Examples
### Basic Agent
```yaml
content-agent:
type: agent
name: "Content Analyzer 1"
inputs:
systemPrompt: "You are a helpful content analyzer. Be concise and clear."
userPrompt: <start.input>
model: gpt-4o
temperature: 0.3
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: summary-block
summary-block:
type: agent
name: "Summary Generator"
inputs:
systemPrompt: "Create a brief summary of the analysis."
userPrompt: "Analyze this: <contentanalyzer1.content>"
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: final-step
```
### Agent with Tools
```yaml
research-agent:
type: agent
name: "Research Assistant"
inputs:
systemPrompt: "Research the topic and provide detailed information."
userPrompt: <start.input>
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
tools:
- type: exa
title: "Web Search"
toolId: exa_search
operation: exa_search
usageControl: auto
params:
apiKey: '{{EXA_API_KEY}}'
connections:
success: summary-block
```
### Structured Output
```yaml
data-extractor:
type: agent
name: "Extract Contact Info"
inputs:
systemPrompt: "Extract contact information from the text."
userPrompt: <start.input>
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
responseFormat: |
{
"name": "contact_extraction",
"schema": {
"type": "object",
"properties": {
"name": {"type": "string"},
"email": {"type": "string"},
"phone": {"type": "string"}
},
"required": ["name"]
},
"strict": true
}
connections:
success: save-contact
```
### Azure OpenAI
```yaml
azure-agent:
type: agent
name: "Azure AI Assistant"
inputs:
systemPrompt: "You are a helpful assistant."
userPrompt: <start.input>
model: gpt-4o
apiKey: '{{AZURE_OPENAI_API_KEY}}'
azureEndpoint: '{{AZURE_OPENAI_ENDPOINT}}'
azureApiVersion: "2024-07-01-preview"
connections:
success: response-block
```

View File

@@ -0,0 +1,179 @@
---
title: API Block YAML Schema
description: YAML configuration reference for API blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
properties:
type:
type: string
enum: [api]
description: Block type identifier
name:
type: string
description: Display name for this API block
inputs:
type: object
required:
- url
- method
properties:
url:
type: string
description: The endpoint URL to send the request to
method:
type: string
enum: [GET, POST, PUT, DELETE, PATCH]
description: HTTP method for the request
default: GET
queryParams:
type: array
description: Query parameters as key-value pairs
items:
type: object
properties:
key:
type: string
description: Parameter name
value:
type: string
description: Parameter value
headers:
type: array
description: HTTP headers as key-value pairs
items:
type: object
properties:
key:
type: string
description: Header name
value:
type: string
description: Header value
body:
type: string
description: Request body for POST/PUT/PATCH methods
timeout:
type: number
description: Request timeout in milliseconds
default: 30000
minimum: 1000
maximum: 300000
connections:
type: object
properties:
success:
type: string
description: Target block ID for successful requests
error:
type: string
description: Target block ID for error handling
```
## Connection Configuration
Connections define where the workflow goes based on request results:
```yaml
connections:
success: <string> # Target block ID for successful requests
error: <string> # Target block ID for error handling (optional)
```
## Examples
### Simple GET Request
```yaml
user-api:
type: api
name: "Fetch User Data"
inputs:
url: "https://api.example.com/users/123"
method: GET
headers:
- key: "Authorization"
value: "Bearer {{API_TOKEN}}"
- key: "Content-Type"
value: "application/json"
connections:
success: process-user-data
error: handle-api-error
```
### POST Request with Body
```yaml
create-ticket:
type: api
name: "Create Support Ticket"
inputs:
url: "https://api.support.com/tickets"
method: POST
headers:
- key: "Authorization"
value: "Bearer {{SUPPORT_API_KEY}}"
- key: "Content-Type"
value: "application/json"
body: |
{
"title": "<agent.title>",
"description": "<agent.description>",
"priority": "high"
}
connections:
success: ticket-created
error: ticket-error
```
### Dynamic URL with Query Parameters
```yaml
search-api:
type: api
name: "Search Products"
inputs:
url: "https://api.store.com/products"
method: GET
queryParams:
- key: "q"
value: <start.searchTerm>
- key: "limit"
value: "10"
- key: "category"
value: <filter.category>
headers:
- key: "Authorization"
value: "Bearer {{STORE_API_KEY}}"
connections:
success: display-results
```
## Output References
After an API block executes, you can reference its outputs:
```yaml
# In subsequent blocks
next-block:
inputs:
data: <api-block-name.output> # Response data
status: <api-block-name.status> # HTTP status code
headers: <api-block-name.headers> # Response headers
error: <api-block-name.error> # Error details (if any)
```
## Best Practices
- Use environment variables for API keys: `{{API_KEY_NAME}}`
- Include error handling with error connections
- Set appropriate timeouts for your use case
- Validate response status codes in subsequent blocks
- Use meaningful block names for easier reference

View File

@@ -0,0 +1,165 @@
---
title: Condition Block YAML Schema
description: YAML configuration reference for Condition blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
- connections
properties:
type:
type: string
enum: [condition]
description: Block type identifier
name:
type: string
description: Display name for this condition block
inputs:
type: object
required:
- conditions
properties:
conditions:
type: object
description: Conditional expressions and their logic
properties:
if:
type: string
description: Primary condition expression (boolean)
else-if:
type: string
description: Secondary condition expression (optional)
else-if-2:
type: string
description: Third condition expression (optional)
else-if-3:
type: string
description: Fourth condition expression (optional)
# Additional else-if-N conditions can be added as needed
else:
type: boolean
description: Default fallback condition (optional)
default: true
connections:
type: object
required:
- conditions
properties:
conditions:
type: object
description: Target blocks for each condition outcome
properties:
if:
type: string
description: Target block ID when 'if' condition is true
else-if:
type: string
description: Target block ID when 'else-if' condition is true
else-if-2:
type: string
description: Target block ID when 'else-if-2' condition is true
else-if-3:
type: string
description: Target block ID when 'else-if-3' condition is true
# Additional else-if-N connections can be added as needed
else:
type: string
description: Target block ID when no conditions match
```
## Connection Configuration
Unlike other blocks, conditions use branching connections based on condition outcomes:
```yaml
connections:
conditions:
if: <string> # Target block ID when primary condition is true
else-if: <string> # Target block ID when secondary condition is true (optional)
else-if-2: <string> # Target block ID when third condition is true (optional)
else-if-3: <string> # Target block ID when fourth condition is true (optional)
# Additional else-if-N connections can be added as needed
else: <string> # Target block ID when no conditions match (optional)
```
## Examples
### Simple If-Else
```yaml
status-check:
type: condition
name: "Status Check"
inputs:
conditions:
if: <start.status> === "approved"
else: true
connections:
conditions:
if: send-approval-email
else: send-rejection-email
```
### Multiple Conditions
```yaml
user-routing:
type: condition
name: "User Type Router"
inputs:
conditions:
if: <start.user_type> === "admin"
else-if: <start.user_type> === "premium"
else-if-2: <start.user_type> === "basic"
else: true
connections:
conditions:
if: admin-dashboard
else-if: premium-features
else-if-2: basic-features
else: registration-flow
```
### Numeric Comparisons
```yaml
score-evaluation:
type: condition
name: "Score Evaluation"
inputs:
conditions:
if: <agent.score> >= 90
else-if: <agent.score> >= 70
else-if-2: <agent.score> >= 50
else: true
connections:
conditions:
if: excellent-response
else-if: good-response
else-if-2: average-response
else: poor-response
```
### Complex Logic
```yaml
eligibility-check:
type: condition
name: "Eligibility Check"
inputs:
conditions:
if: <start.age> >= 18 && <start.verified> === true
else-if: <start.age> >= 16 && <start.parent_consent> === true
else: true
connections:
conditions:
if: full-access
else-if: limited-access
else: access-denied
```

View File

@@ -0,0 +1,255 @@
---
title: Evaluator Block YAML Schema
description: YAML configuration reference for Evaluator blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
properties:
type:
type: string
enum: [evaluator]
description: Block type identifier
name:
type: string
description: Display name for this evaluator block
inputs:
type: object
required:
- content
- metrics
- model
- apiKey
properties:
content:
type: string
description: Content to evaluate (can reference other blocks)
metrics:
type: array
description: Evaluation criteria and scoring ranges
items:
type: object
properties:
name:
type: string
description: Metric identifier
description:
type: string
description: Detailed explanation of what the metric measures
range:
type: object
properties:
min:
type: number
description: Minimum score value
max:
type: number
description: Maximum score value
required: [min, max]
description: Scoring range with numeric bounds
model:
type: string
description: AI model identifier (e.g., gpt-4o, claude-3-5-sonnet-20241022)
apiKey:
type: string
description: API key for the model provider (use {{ENV_VAR}} format)
temperature:
type: number
minimum: 0
maximum: 2
description: Model temperature for evaluation
default: 0.3
azureEndpoint:
type: string
description: Azure OpenAI endpoint URL (required for Azure models)
azureApiVersion:
type: string
description: Azure API version (required for Azure models)
connections:
type: object
properties:
success:
type: string
description: Target block ID for successful evaluation
error:
type: string
description: Target block ID for error handling
```
## Connection Configuration
Connections define where the workflow goes based on evaluation results:
```yaml
connections:
success: <string> # Target block ID for successful evaluation
error: <string> # Target block ID for error handling (optional)
```
## Examples
### Content Quality Evaluation
```yaml
content-evaluator:
type: evaluator
name: "Content Quality Evaluator"
inputs:
content: <content-generator.content>
metrics:
- name: "accuracy"
description: "How factually accurate is the content?"
range:
min: 1
max: 5
- name: "clarity"
description: "How clear and understandable is the content?"
range:
min: 1
max: 5
- name: "relevance"
description: "How relevant is the content to the original query?"
range:
min: 1
max: 5
- name: "completeness"
description: "How complete and comprehensive is the content?"
range:
min: 1
max: 5
model: gpt-4o
temperature: 0.2
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: quality-report
error: evaluation-error
```
### Customer Response Evaluation
```yaml
response-evaluator:
type: evaluator
name: "Customer Response Evaluator"
inputs:
content: <customer-agent.content>
metrics:
- name: "helpfulness"
description: "How helpful is the response in addressing the customer's needs?"
range:
min: 1
max: 10
- name: "tone"
description: "How appropriate and professional is the tone?"
range:
min: 1
max: 10
- name: "completeness"
description: "Does the response fully address all aspects of the inquiry?"
range:
min: 1
max: 10
model: claude-3-5-sonnet-20241022
apiKey: '{{ANTHROPIC_API_KEY}}'
connections:
success: response-processor
```
### A/B Testing Evaluation
```yaml
ab-test-evaluator:
type: evaluator
name: "A/B Test Evaluator"
inputs:
content: |
Version A: <version-a.content>
Version B: <version-b.content>
Compare these two versions for the following criteria.
metrics:
- name: "engagement"
description: "Which version is more likely to engage users?"
range: "A, B, or Tie"
- name: "clarity"
description: "Which version communicates more clearly?"
range: "A, B, or Tie"
- name: "persuasiveness"
description: "Which version is more persuasive?"
range: "A, B, or Tie"
model: gpt-4o
temperature: 0.1
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: test-results
```
### Multi-Dimensional Content Scoring
```yaml
comprehensive-evaluator:
type: evaluator
name: "Comprehensive Content Evaluator"
inputs:
content: <ai-writer.content>
metrics:
- name: "technical_accuracy"
description: "How technically accurate and correct is the information?"
range:
min: 0
max: 100
- name: "readability"
description: "How easy is the content to read and understand?"
range:
min: 0
max: 100
- name: "seo_optimization"
description: "How well optimized is the content for search engines?"
range:
min: 0
max: 100
- name: "user_engagement"
description: "How likely is this content to engage and retain readers?"
range:
min: 0
max: 100
- name: "brand_alignment"
description: "How well does the content align with brand voice and values?"
range:
min: 0
max: 100
model: gpt-4o
temperature: 0.3
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: content-optimization
```
## Output References
After an evaluator block executes, you can reference its outputs:
```yaml
# In subsequent blocks
next-block:
inputs:
evaluation: <evaluator-name.content> # Evaluation summary
scores: <evaluator-name.scores> # Individual metric scores
overall: <evaluator-name.overall> # Overall assessment
```
## Best Practices
- Define clear, specific evaluation criteria
- Use appropriate scoring ranges for your use case
- Choose models with strong reasoning capabilities
- Use lower temperature for consistent scoring
- Include detailed metric descriptions
- Test with diverse content types
- Consider multiple evaluators for complex assessments

View File

@@ -0,0 +1,162 @@
---
title: Function Block YAML Schema
description: YAML configuration reference for Function blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
properties:
type:
type: string
enum: [function]
description: Block type identifier
name:
type: string
description: Display name for this function block
inputs:
type: object
required:
- code
properties:
code:
type: string
description: JavaScript/TypeScript code to execute (multiline string)
timeout:
type: number
description: Maximum execution time in milliseconds
default: 30000
minimum: 1000
maximum: 300000
connections:
type: object
properties:
success:
type: string
description: Target block ID for successful execution
error:
type: string
description: Target block ID for error handling
```
## Connection Configuration
Connections define where the workflow goes based on execution results:
```yaml
connections:
success: <string> # Target block ID for successful execution
error: <string> # Target block ID for error handling (optional)
```
## Examples
### Simple Validation
```yaml
input-validator:
type: function
name: "Input Validator"
inputs:
code: |-
// Check if input number is greater than 5
const inputValue = parseInt(<start.input>, 10);
if (inputValue > 5) {
return {
valid: true,
value: inputValue,
message: "Input is valid"
};
} else {
return {
valid: false,
value: inputValue,
message: "Input must be greater than 5"
};
}
connections:
success: next-step
error: handle-error
```
### Data Processing
```yaml
data-processor:
type: function
name: "Data Transformer"
inputs:
code: |
// Transform the input data
const rawData = <start.input>;
// Process and clean the data
const processed = rawData
.filter(item => item.status === 'active')
.map(item => ({
id: item.id,
name: item.name.trim(),
date: new Date(item.created).toISOString()
}));
return processed;
connections:
success: api-save
error: error-handler
```
### API Integration
```yaml
api-formatter:
type: function
name: "Format API Request"
inputs:
code: |
// Prepare data for API submission
const userData = <agent.response>;
const apiPayload = {
timestamp: new Date().toISOString(),
data: userData,
source: "workflow-automation",
version: "1.0"
};
return apiPayload;
connections:
success: api-call
```
### Calculations
```yaml
calculator:
type: function
name: "Calculate Results"
inputs:
code: |
// Perform calculations on input data
const numbers = <start.input>;
const sum = numbers.reduce((a, b) => a + b, 0);
const average = sum / numbers.length;
const max = Math.max(...numbers);
const min = Math.min(...numbers);
return {
sum,
average,
max,
min,
count: numbers.length
};
connections:
success: results-display
```

View File

@@ -0,0 +1,151 @@
---
title: Block Schemas
description: Complete YAML schema reference for all Sim Studio blocks
---
import { Card, Cards } from "fumadocs-ui/components/card";
This section contains the complete YAML schema definitions for all available block types in Sim Studio. Each block type has specific configuration requirements and output formats.
## Core Blocks
These are the essential building blocks for creating workflows:
<Cards>
<Card title="Starter Block" href="/yaml/blocks/starter">
Workflow entry point supporting manual triggers, webhooks, and schedules
</Card>
<Card title="Agent Block" href="/yaml/blocks/agent">
AI-powered processing with LLM integration and tool support
</Card>
<Card title="Function Block" href="/yaml/blocks/function">
Custom JavaScript/TypeScript code execution environment
</Card>
<Card title="Response Block" href="/yaml/blocks/response">
Format and return final workflow results
</Card>
</Cards>
## Logic & Control Flow
Blocks for implementing conditional logic and control flow:
<Cards>
<Card title="Condition Block" href="/yaml/blocks/condition">
Conditional branching based on boolean expressions
</Card>
<Card title="Router Block" href="/yaml/blocks/router">
AI-powered intelligent routing to multiple paths
</Card>
<Card title="Loop Block" href="/yaml/blocks/loop">
Iterative processing with for and forEach loops
</Card>
<Card title="Parallel Block" href="/yaml/blocks/parallel">
Concurrent execution across multiple instances
</Card>
</Cards>
## Integration Blocks
Blocks for connecting to external services and systems:
<Cards>
<Card title="API Block" href="/yaml/blocks/api">
HTTP requests to external REST APIs
</Card>
<Card title="Webhook Block" href="/yaml/blocks/webhook">
Webhook triggers for external integrations
</Card>
</Cards>
## Advanced Blocks
Specialized blocks for complex workflow patterns:
<Cards>
<Card title="Evaluator Block" href="/yaml/blocks/evaluator">
Validate outputs against defined criteria and metrics
</Card>
<Card title="Workflow Block" href="/yaml/blocks/workflow">
Execute other workflows as reusable components
</Card>
</Cards>
## Common Schema Elements
All blocks share these common elements:
### Basic Structure
```yaml
block-id:
type: <block-type>
name: <display-name>
inputs:
# Block-specific configuration
connections:
# Connection definitions
```
### Connection Types
- **success**: Target block for successful execution
- **error**: Target block for error handling (optional)
- **conditions**: Multiple paths for conditional blocks
### Environment Variables
Use double curly braces for environment variables:
```yaml
inputs:
apiKey: '{{API_KEY_NAME}}'
endpoint: '{{SERVICE_ENDPOINT}}'
```
### Block References
Reference other block outputs using the block name in lowercase:
```yaml
inputs:
userPrompt: <blockname.content>
data: <functionblock.output>
originalInput: <start.input>
```
## Validation Rules
All YAML blocks are validated against their schemas:
1. **Required fields**: Must be present
2. **Type validation**: Values must match expected types
3. **Enum validation**: String values must be from allowed lists
4. **Range validation**: Numbers must be within specified ranges
5. **Pattern validation**: Strings must match regex patterns (where applicable)
## Quick Reference
### Block Types and Properties
| Block Type | Primary Output | Common Use Cases |
|------------|----------------|------------------|
| starter | `.input` | Workflow entry point |
| agent | `.content` | AI processing, text generation |
| function | `.output` | Data transformation, calculations |
| api | `.output` | External service integration |
| condition | N/A (branching) | Conditional logic |
| router | N/A (branching) | Intelligent routing |
| response | N/A (terminal) | Final output formatting |
| loop | `.results` | Iterative processing |
| parallel | `.results` | Concurrent processing |
| webhook | `.payload` | External triggers |
| evaluator | `.score` | Output validation, quality assessment |
| workflow | `.output` | Sub-workflow execution, modularity |
### Required vs Optional
- **Always required**: `type`, `name`
- **Usually required**: `inputs`, `connections`
- **Context dependent**: Specific input fields vary by block type
- **Always optional**: `error` connections, UI-specific fields

View File

@@ -0,0 +1,305 @@
---
title: Loop Block YAML Schema
description: YAML configuration reference for Loop blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
- connections
properties:
type:
type: string
enum: [loop]
description: Block type identifier
name:
type: string
description: Display name for this loop block
inputs:
type: object
required:
- loopType
properties:
loopType:
type: string
enum: [for, forEach]
description: Type of loop to execute
iterations:
type: number
description: Number of iterations (for 'for' loops)
minimum: 1
maximum: 1000
collection:
type: string
description: Collection to iterate over (for 'forEach' loops)
maxConcurrency:
type: number
description: Maximum concurrent executions
default: 1
minimum: 1
maximum: 10
connections:
type: object
required:
- loop
properties:
loop:
type: object
required:
- start
properties:
start:
type: string
description: Target block ID to execute inside the loop
end:
type: string
description: Target block ID for loop completion (optional)
success:
type: string
description: Target block ID after loop completion (alternative format)
error:
type: string
description: Target block ID for error handling
```
## Connection Configuration
Loop blocks use a special connection format with a `loop` section:
```yaml
connections:
loop:
start: <string> # Target block ID to execute inside the loop
end: <string> # Target block ID after loop completion (optional)
error: <string> # Target block ID for error handling (optional)
```
Alternative format (legacy):
```yaml
connections:
success: <string> # Target block ID after loop completion
error: <string> # Target block ID for error handling (optional)
```
## Child Block Configuration
Blocks inside a loop must have their `parentId` set to the loop block ID:
```yaml
loop-1:
type: loop
name: "Process Items"
inputs:
loopType: forEach
collection: <start.items>
connections:
loop:
start: process-item
end: final-results
# Child block inside the loop
process-item:
type: agent
name: "Process Item"
parentId: loop-1 # References the loop block
inputs:
systemPrompt: "Process this item"
userPrompt: <loop.currentItem>
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
```
## Examples
### For Loop (Fixed Iterations)
```yaml
countdown-loop:
type: loop
name: "Countdown Loop"
inputs:
loopType: for
iterations: 5
connections:
loop:
start: countdown-agent
end: countdown-complete
countdown-agent:
type: agent
name: "Countdown Agent"
parentId: countdown-loop
inputs:
systemPrompt: "Generate a countdown message"
userPrompt: "Count down from 5. Current number: <loop.index>"
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
```
### ForEach Loop (Collection Processing)
```yaml
email-processor-loop:
type: loop
name: "Email Processor Loop"
inputs:
loopType: forEach
collection: <start.emails>
connections:
loop:
start: process-single-email
end: all-emails-processed
process-single-email:
type: agent
name: "Process Single Email"
parentId: email-processor-loop
inputs:
systemPrompt: "Classify and respond to this email"
userPrompt: "Email content: <loop.currentItem>"
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
```
### Complex Loop with Multiple Child Blocks
```yaml
data-analysis-loop:
type: loop
name: "Data Analysis Loop"
inputs:
loopType: forEach
collection: <data-fetcher.records>
maxConcurrency: 3
connections:
loop:
start: validate-record
end: generate-report
error: handle-loop-error
validate-record:
type: function
name: "Validate Record"
parentId: data-analysis-loop
inputs:
code: |
const record = <loop.currentItem>;
const index = <loop.index>;
// Validate the record
if (!record.id || !record.data) {
throw new Error(`Invalid record at index ${index}`);
}
return {
valid: true,
recordId: record.id,
processedAt: new Date().toISOString()
};
connections:
success: analyze-record
error: record-error
analyze-record:
type: agent
name: "Analyze Record"
parentId: data-analysis-loop
inputs:
systemPrompt: "Analyze this data record and extract insights"
userPrompt: |
Record ID: <validaterecord.recordId>
Data: <loop.currentItem.data>
Position in collection: <loop.index>
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: store-analysis
store-analysis:
type: function
name: "Store Analysis"
parentId: data-analysis-loop
inputs:
code: |
const analysis = <analyzerecord.content>;
const recordId = <validaterecord.recordId>;
// Store analysis result
return {
recordId,
analysis,
completedAt: new Date().toISOString()
};
```
### Concurrent Processing Loop
```yaml
parallel-processing-loop:
type: loop
name: "Parallel Processing Loop"
inputs:
loopType: forEach
collection: <start.tasks>
maxConcurrency: 5
connections:
loop:
start: process-task
end: aggregate-results
process-task:
type: api
name: "Process Task"
parentId: parallel-processing-loop
inputs:
url: "https://api.example.com/process"
method: POST
headers:
- key: "Authorization"
value: "Bearer {{API_TOKEN}}"
body: |
{
"taskId": "<loop.currentItem.id>",
"data": "<loop.currentItem.data>"
}
connections:
success: task-completed
```
## Loop Variables
Inside loop child blocks, these special variables are available:
```yaml
# Available in all child blocks of the loop
<loop.index> # Current iteration number (0-based)
<loop.currentItem> # Current item being processed (forEach loops)
<loop.items> # Full collection (forEach loops)
```
## Output References
After a loop completes, you can reference its aggregated results:
```yaml
# In blocks after the loop
final-processor:
inputs:
all-results: <loop-name.results> # Array of all iteration results
total-count: <loop-name.count> # Number of iterations completed
```
## Best Practices
- Set reasonable iteration limits to avoid long execution times
- Use forEach for collection processing, for loops for fixed iterations
- Consider using maxConcurrency for I/O bound operations
- Include error handling for robust loop execution
- Use descriptive names for loop child blocks
- Test with small collections first
- Monitor execution time for large collections

View File

@@ -0,0 +1,17 @@
{
"title": "Block Schemas",
"pages": [
"starter",
"agent",
"function",
"api",
"condition",
"router",
"evaluator",
"response",
"loop",
"parallel",
"webhook",
"workflow"
]
}

View File

@@ -0,0 +1,322 @@
---
title: Parallel Block YAML Schema
description: YAML configuration reference for Parallel blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
- connections
properties:
type:
type: string
enum: [parallel]
description: Block type identifier
name:
type: string
description: Display name for this parallel block
inputs:
type: object
required:
- parallelType
properties:
parallelType:
type: string
enum: [count, collection]
description: Type of parallel execution
count:
type: number
description: Number of parallel instances (for 'count' type)
minimum: 1
maximum: 100
collection:
type: string
description: Collection to distribute across instances (for 'collection' type)
maxConcurrency:
type: number
description: Maximum concurrent executions
default: 10
minimum: 1
maximum: 50
connections:
type: object
required:
- parallel
properties:
parallel:
type: object
required:
- start
properties:
start:
type: string
description: Target block ID to execute inside each parallel instance
end:
type: string
description: Target block ID after all parallel instances complete (optional)
success:
type: string
description: Target block ID after all instances complete (alternative format)
error:
type: string
description: Target block ID for error handling
```
## Connection Configuration
Parallel blocks use a special connection format with a `parallel` section:
```yaml
connections:
parallel:
start: <string> # Target block ID to execute inside each parallel instance
end: <string> # Target block ID after all instances complete (optional)
error: <string> # Target block ID for error handling (optional)
```
Alternative format (legacy):
```yaml
connections:
success: <string> # Target block ID after all instances complete
error: <string> # Target block ID for error handling (optional)
```
## Child Block Configuration
Blocks inside a parallel block must have their `parentId` set to the parallel block ID:
```yaml
parallel-1:
type: parallel
name: "Process Items"
inputs:
parallelType: collection
collection: <start.items>
connections:
parallel:
start: process-item
end: aggregate-results
# Child block inside the parallel
process-item:
type: agent
name: "Process Item"
parentId: parallel-1 # References the parallel block
inputs:
systemPrompt: "Process this item"
userPrompt: <parallel.currentItem>
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
```
## Examples
### Count-Based Parallel Processing
```yaml
worker-parallel:
type: parallel
name: "Worker Parallel"
inputs:
parallelType: count
count: 5
maxConcurrency: 3
connections:
parallel:
start: worker-task
end: collect-worker-results
worker-task:
type: api
name: "Worker Task"
parentId: worker-parallel
inputs:
url: "https://api.worker.com/process"
method: POST
headers:
- key: "Authorization"
value: "Bearer {{WORKER_API_KEY}}"
body: |
{
"instanceId": <parallel.index>,
"timestamp": "{{new Date().toISOString()}}"
}
connections:
success: worker-complete
```
### Collection-Based Parallel Processing
```yaml
api-parallel:
type: parallel
name: "API Parallel"
inputs:
parallelType: collection
collection: <start.apiEndpoints>
maxConcurrency: 10
connections:
parallel:
start: call-api
end: merge-api-results
call-api:
type: api
name: "Call API"
parentId: api-parallel
inputs:
url: <parallel.currentItem.endpoint>
method: <parallel.currentItem.method>
headers:
- key: "Authorization"
value: "Bearer {{API_TOKEN}}"
connections:
success: api-complete
```
### Complex Parallel Processing Pipeline
```yaml
data-processing-parallel:
type: parallel
name: "Data Processing Parallel"
inputs:
parallelType: collection
collection: <data-loader.records>
maxConcurrency: 8
connections:
parallel:
start: validate-data
end: final-aggregation
error: parallel-error-handler
validate-data:
type: function
name: "Validate Data"
parentId: data-processing-parallel
inputs:
code: |
const record = <parallel.currentItem>;
const index = <parallel.index>;
// Validate record structure
if (!record.id || !record.content) {
throw new Error(`Invalid record at index ${index}`);
}
return {
valid: true,
recordId: record.id,
validatedAt: new Date().toISOString()
};
connections:
success: process-data
error: validation-error
process-data:
type: agent
name: "Process Data"
parentId: data-processing-parallel
inputs:
systemPrompt: "Process and analyze this data record"
userPrompt: |
Record ID: <validatedata.recordId>
Content: <parallel.currentItem.content>
Instance: <parallel.index>
model: gpt-4o
temperature: 0.3
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: store-result
store-result:
type: function
name: "Store Result"
parentId: data-processing-parallel
inputs:
code: |
const processed = <processdata.content>;
const recordId = <validatedata.recordId>;
return {
recordId,
processed,
completedAt: new Date().toISOString(),
instanceIndex: <parallel.index>
};
```
### Concurrent AI Analysis
```yaml
multi-model-parallel:
type: parallel
name: "Multi-Model Analysis"
inputs:
parallelType: collection
collection: |
[
{"model": "gpt-4o", "focus": "technical accuracy"},
{"model": "claude-3-5-sonnet-20241022", "focus": "creative quality"},
{"model": "gemini-2.0-flash-exp", "focus": "factual verification"}
]
maxConcurrency: 3
connections:
parallel:
start: analyze-content
end: combine-analyses
analyze-content:
type: agent
name: "Analyze Content"
parentId: multi-model-parallel
inputs:
systemPrompt: |
You are analyzing content with a focus on <parallel.currentItem.focus>.
Provide detailed analysis from this perspective.
userPrompt: |
Content to analyze: <start.content>
Analysis focus: <parallel.currentItem.focus>
model: <parallel.currentItem.model>
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: analysis-complete
```
## Parallel Variables
Inside parallel child blocks, these special variables are available:
```yaml
# Available in all child blocks of the parallel
<parallel.index> # Instance number (0-based)
<parallel.currentItem> # Item for this instance (collection type)
<parallel.items> # Full collection (collection type)
```
## Output References
After a parallel block completes, you can reference its aggregated results:
```yaml
# In blocks after the parallel
final-processor:
inputs:
all-results: <parallel-name.results> # Array of all instance results
total-count: <parallel-name.count> # Number of instances completed
```
## Best Practices
- Use appropriate maxConcurrency to avoid overwhelming APIs
- Ensure operations are independent and don't rely on each other
- Include error handling for robust parallel execution
- Test with small collections first
- Monitor rate limits for external APIs
- Use collection type for distributing work, count type for fixed instances
- Consider memory usage with large collections

View File

@@ -0,0 +1,140 @@
---
title: Response Block YAML Schema
description: YAML configuration reference for Response blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
properties:
type:
type: string
enum: [response]
description: Block type identifier
name:
type: string
description: Display name for this response block
inputs:
type: object
properties:
dataMode:
type: string
enum: [structured, json]
description: Mode for defining response data structure
default: structured
builderData:
type: object
description: Structured response data (when dataMode is 'structured')
data:
type: object
description: JSON response data (when dataMode is 'json')
status:
type: number
description: HTTP status code
default: 200
minimum: 100
maximum: 599
headers:
type: array
description: Response headers as key-value pairs
items:
type: object
properties:
key:
type: string
description: Header name
value:
type: string
description: Header value
```
## Connection Configuration
Response blocks are terminal blocks (no outgoing connections) and define the final output:
```yaml
# No connections object needed - Response blocks are always terminal
```
## Examples
### Simple Response
```yaml
simple-response:
type: response
name: "Simple Response"
inputs:
data:
message: "Hello World"
timestamp: <function.timestamp>
status: 200
```
### Success Response
```yaml
success-response:
type: response
name: "Success Response"
inputs:
data:
success: true
user:
id: <agent.user_id>
name: <agent.user_name>
email: <agent.user_email>
created_at: <function.timestamp>
status: 201
headers:
- key: "Location"
value: "/api/users/<agent.user_id>"
- key: "X-Created-By"
value: "workflow-engine"
```
### Error Response
```yaml
error-response:
type: response
name: "Error Response"
inputs:
data:
error: true
message: <agent.error_message>
code: "VALIDATION_FAILED"
details: <function.validation_errors>
status: 400
headers:
- key: "X-Error-Code"
value: "VALIDATION_FAILED"
```
### Paginated Response
```yaml
paginated-response:
type: response
name: "Paginated Response"
inputs:
data:
data: <agent.results>
pagination:
page: <start.page>
per_page: <start.per_page>
total: <function.total_count>
total_pages: <function.total_pages>
status: 200
headers:
- key: "X-Total-Count"
value: <function.total_count>
- key: "Cache-Control"
value: "public, max-age=300"
- key: "Content-Type"
value: "application/json"
```

View File

@@ -0,0 +1,200 @@
---
title: Router Block YAML Schema
description: YAML configuration reference for Router blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
properties:
type:
type: string
enum: [router]
description: Block type identifier
name:
type: string
description: Display name for this router block
inputs:
type: object
required:
- prompt
- model
- apiKey
properties:
prompt:
type: string
description: Instructions for routing decisions and criteria
model:
type: string
description: AI model identifier (e.g., gpt-4o, gemini-2.5-pro, deepseek-chat)
apiKey:
type: string
description: API key for the model provider (use {{ENV_VAR}} format)
temperature:
type: number
minimum: 0
maximum: 2
description: Model temperature for routing decisions
default: 0.3
azureEndpoint:
type: string
description: Azure OpenAI endpoint URL (required for Azure models)
azureApiVersion:
type: string
description: Azure API version (required for Azure models)
connections:
type: object
description: Multiple connection paths for different routing outcomes
properties:
success:
type: array
items:
type: string
description: Array of target block IDs for routing destinations
```
## Connection Configuration
Router blocks use a success array containing all possible routing destinations:
```yaml
connections:
success:
- <string> # Target block ID option 1
- <string> # Target block ID option 2
- <string> # Target block ID option 3
# Additional target block IDs as needed
```
## Examples
### Content Type Router
```yaml
content-router:
type: router
name: "Content Type Router"
inputs:
prompt: |
Route this content based on its type:
- If it's a question, route to question-handler
- If it's a complaint, route to complaint-handler
- If it's feedback, route to feedback-handler
- If it's a request, route to request-handler
Content: <start.input>
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
connections:
success:
- question-handler
- complaint-handler
- feedback-handler
- request-handler
```
### Priority Router
```yaml
priority-router:
type: router
name: "Priority Router"
inputs:
prompt: |
Analyze the urgency and route accordingly:
- urgent-queue: High priority, needs immediate attention
- standard-queue: Normal priority, standard processing
- low-queue: Low priority, can be delayed
Email content: <email-analyzer.content>
Route based on urgency indicators, deadlines, and tone.
model: gpt-4o
temperature: 0.2
apiKey: '{{OPENAI_API_KEY}}'
connections:
success:
- urgent-queue
- standard-queue
- low-queue
```
### Department Router
```yaml
department-router:
type: router
name: "Department Router"
inputs:
prompt: |
Route this customer inquiry to the appropriate department:
- sales-team: Sales questions, pricing, demos
- support-team: Technical issues, bug reports, how-to questions
- billing-team: Payment issues, subscription changes, invoices
- general-team: General inquiries, feedback, other topics
Customer message: <start.input>
Customer type: <customer-analyzer.type>
model: claude-3-5-sonnet-20241022
apiKey: '{{ANTHROPIC_API_KEY}}'
connections:
success:
- sales-team
- support-team
- billing-team
- general-team
```
## Advanced Configuration
### Multiple Models Router
```yaml
model-selector-router:
type: router
name: "Model Selection Router"
inputs:
prompt: |
Based on the task complexity, route to the appropriate model:
- simple-gpt35: Simple questions, basic tasks
- advanced-gpt4: Complex analysis, detailed reasoning
- specialized-claude: Creative writing, nuanced analysis
Task: <start.task>
Complexity indicators: <analyzer.complexity>
model: gpt-4o-mini
temperature: 0.1
apiKey: '{{OPENAI_API_KEY}}'
connections:
success:
- simple-gpt35
- advanced-gpt4
- specialized-claude
```
## Output References
Router blocks don't produce direct outputs but control workflow path:
```yaml
# Router decisions affect which subsequent blocks execute
# Access the routed block's outputs normally:
final-step:
inputs:
routed-result: <routed-block-name.content>
```
## Best Practices
- Provide clear routing criteria in the prompt
- Use specific, descriptive target block names
- Include examples of content for each routing path
- Use lower temperature values for consistent routing
- Test with diverse input types to ensure accurate routing
- Consider fallback paths for edge cases

View File

@@ -0,0 +1,183 @@
---
title: Starter Block YAML Schema
description: YAML configuration reference for Starter blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
properties:
type:
type: string
enum: [starter]
description: Block type identifier
name:
type: string
description: Display name for this starter block
inputs:
type: object
properties:
startWorkflow:
type: string
enum: [manual, webhook, schedule]
description: How the workflow should be triggered
default: manual
inputFormat:
type: array
description: Expected input structure for API calls (manual workflows)
items:
type: object
properties:
name:
type: string
description: Field name
type:
type: string
enum: [string, number, boolean, object, array]
description: Field type
scheduleType:
type: string
enum: [hourly, daily, weekly, monthly]
description: Schedule frequency (schedule workflows only)
hourlyMinute:
type: number
minimum: 0
maximum: 59
description: Minute of the hour to run (hourly schedules)
dailyTime:
type: string
pattern: "^([01]?[0-9]|2[0-3]):[0-5][0-9]$"
description: Time of day to run in HH:MM format (daily schedules)
weeklyDay:
type: string
enum: [MON, TUE, WED, THU, FRI, SAT, SUN]
description: Day of week to run (weekly schedules)
weeklyTime:
type: string
pattern: "^([01]?[0-9]|2[0-3]):[0-5][0-9]$"
description: Time of day to run in HH:MM format (weekly schedules)
monthlyDay:
type: number
minimum: 1
maximum: 28
description: Day of month to run (monthly schedules)
monthlyTime:
type: string
pattern: "^([01]?[0-9]|2[0-3]):[0-5][0-9]$"
description: Time of day to run in HH:MM format (monthly schedules)
timezone:
type: string
description: Timezone for scheduled workflows
default: UTC
webhookProvider:
type: string
enum: [slack, gmail, airtable, telegram, generic, whatsapp, github, discord, stripe]
description: Provider for webhook integration (webhook workflows only)
webhookConfig:
type: object
description: Provider-specific webhook configuration
connections:
type: object
properties:
success:
type: string
description: Target block ID to execute when workflow starts
```
## Connection Configuration
The starter block only has a success connection since it's the entry point:
```yaml
connections:
success: <string> # Target block ID to execute when workflow starts
```
## Examples
### Manual Start
```yaml
start:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: next-block
```
### Manual Start with Input Format
```yaml
start:
type: starter
name: Start
inputs:
startWorkflow: manual
inputFormat:
- name: query
type: string
- name: email
type: string
- name: age
type: number
- name: isActive
type: boolean
- name: preferences
type: object
- name: tags
type: array
connections:
success: agent-1
```
### Daily Schedule
```yaml
start:
type: starter
name: Start
inputs:
startWorkflow: schedule
scheduleType: daily
dailyTime: "09:00"
timezone: "America/New_York"
connections:
success: daily-task
```
### Weekly Schedule
```yaml
start:
type: starter
name: Start
inputs:
startWorkflow: schedule
scheduleType: weekly
weeklyDay: MON
weeklyTime: "08:30"
timezone: UTC
connections:
success: weekly-report
```
### Webhook Trigger
```yaml
start:
type: starter
name: Start
inputs:
startWorkflow: webhook
webhookProvider: slack
webhookConfig:
# Provider-specific configuration
connections:
success: process-webhook
```

View File

@@ -0,0 +1,278 @@
---
title: Webhook Block YAML Schema
description: YAML configuration reference for Webhook blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
properties:
type:
type: string
enum: [webhook]
description: Block type identifier
name:
type: string
description: Display name for this webhook block
inputs:
type: object
properties:
webhookConfig:
type: object
description: Webhook configuration settings
properties:
enabled:
type: boolean
description: Whether the webhook is active
default: true
secret:
type: string
description: Secret key for webhook verification
headers:
type: array
description: Expected headers for validation
items:
type: object
properties:
key:
type: string
description: Header name
value:
type: string
description: Expected header value
methods:
type: array
description: Allowed HTTP methods
items:
type: string
enum: [GET, POST, PUT, DELETE, PATCH]
default: [POST]
responseConfig:
type: object
description: Response configuration for the webhook
properties:
status:
type: number
description: HTTP status code to return
default: 200
minimum: 100
maximum: 599
headers:
type: array
description: Response headers
items:
type: object
properties:
key:
type: string
description: Header name
value:
type: string
description: Header value
body:
type: string
description: Response body content
connections:
type: object
properties:
success:
type: string
description: Target block ID for successful webhook processing
error:
type: string
description: Target block ID for error handling
```
## Connection Configuration
Connections define where the workflow goes based on webhook processing:
```yaml
connections:
success: <string> # Target block ID for successful processing
error: <string> # Target block ID for error handling (optional)
```
## Examples
### Basic Webhook Trigger
```yaml
github-webhook:
type: webhook
name: "GitHub Webhook"
inputs:
webhookConfig:
enabled: true
secret: "{{GITHUB_WEBHOOK_SECRET}}"
methods: [POST]
headers:
- key: "X-GitHub-Event"
value: "push"
responseConfig:
status: 200
body: |
{
"message": "Webhook received successfully",
"timestamp": "{{new Date().toISOString()}}"
}
connections:
success: process-github-event
error: webhook-error-handler
```
### Slack Event Webhook
```yaml
slack-events:
type: webhook
name: "Slack Events"
inputs:
webhookConfig:
enabled: true
secret: "{{SLACK_SIGNING_SECRET}}"
methods: [POST]
headers:
- key: "Content-Type"
value: "application/json"
responseConfig:
status: 200
headers:
- key: "Content-Type"
value: "application/json"
body: |
{
"challenge": "<webhook.challenge>"
}
connections:
success: handle-slack-event
```
### Payment Webhook (Stripe)
```yaml
stripe-webhook:
type: webhook
name: "Stripe Payment Webhook"
inputs:
webhookConfig:
enabled: true
secret: "{{STRIPE_WEBHOOK_SECRET}}"
methods: [POST]
headers:
- key: "Stripe-Signature"
value: "*"
responseConfig:
status: 200
headers:
- key: "Content-Type"
value: "application/json"
body: |
{
"received": true
}
connections:
success: process-payment-event
error: payment-webhook-error
```
### Generic API Webhook
```yaml
api-webhook:
type: webhook
name: "API Webhook"
inputs:
webhookConfig:
enabled: true
methods: [POST, PUT]
headers:
- key: "Authorization"
value: "Bearer {{WEBHOOK_API_KEY}}"
- key: "Content-Type"
value: "application/json"
responseConfig:
status: 202
headers:
- key: "Content-Type"
value: "application/json"
- key: "X-Processed-By"
value: "Sim Studio"
body: |
{
"status": "accepted",
"id": "{{Math.random().toString(36).substr(2, 9)}}",
"received_at": "{{new Date().toISOString()}}"
}
connections:
success: process-webhook-data
```
### Multi-Method Webhook
```yaml
crud-webhook:
type: webhook
name: "CRUD Webhook"
inputs:
webhookConfig:
enabled: true
methods: [GET, POST, PUT, DELETE]
headers:
- key: "X-API-Key"
value: "{{CRUD_API_KEY}}"
responseConfig:
status: 200
headers:
- key: "Content-Type"
value: "application/json"
body: |
{
"method": "<webhook.method>",
"processed": true,
"timestamp": "{{new Date().toISOString()}}"
}
connections:
success: route-by-method
```
## Webhook Variables
Inside webhook-triggered workflows, these special variables are available:
```yaml
# Available in blocks after the webhook
<webhook.payload> # Full request payload/body
<webhook.headers> # Request headers
<webhook.method> # HTTP method used
<webhook.query> # Query parameters
<webhook.path> # Request path
<webhook.challenge> # Challenge parameter (for verification)
```
## Output References
After a webhook processes a request, you can reference its data:
```yaml
# In subsequent blocks
process-webhook:
inputs:
payload: <webhook-name.payload> # Request payload
headers: <webhook-name.headers> # Request headers
method: <webhook-name.method> # HTTP method
```
## Security Best Practices
- Always use webhook secrets for verification
- Validate expected headers and methods
- Implement proper error handling
- Use HTTPS endpoints in production
- Monitor webhook activity and failures
- Set appropriate response timeouts
- Validate payload structure before processing

View File

@@ -0,0 +1,299 @@
---
title: Workflow Block YAML Schema
description: YAML configuration reference for Workflow blocks
---
## Schema Definition
```yaml
type: object
required:
- type
- name
- inputs
properties:
type:
type: string
enum: [workflow]
description: Block type identifier
name:
type: string
description: Display name for this workflow block
inputs:
type: object
required:
- workflowId
properties:
workflowId:
type: string
description: ID of the workflow to execute
inputMapping:
type: object
description: Map current workflow data to sub-workflow inputs
additionalProperties:
type: string
description: Input value or reference to parent workflow data
environmentVariables:
type: object
description: Environment variables to pass to sub-workflow
additionalProperties:
type: string
description: Environment variable value
timeout:
type: number
description: Maximum execution time in milliseconds
default: 300000
minimum: 1000
maximum: 1800000
connections:
type: object
properties:
success:
type: string
description: Target block ID for successful workflow completion
error:
type: string
description: Target block ID for error handling
```
## Connection Configuration
Connections define where the workflow goes based on sub-workflow results:
```yaml
connections:
success: <string> # Target block ID for successful completion
error: <string> # Target block ID for error handling (optional)
```
## Examples
### Simple Workflow Execution
```yaml
data-processor:
type: workflow
name: "Data Processing Workflow"
inputs:
workflowId: "data-processing-v2"
inputMapping:
rawData: <start.input>
userId: <user-validator.userId>
environmentVariables:
PROCESSING_MODE: "production"
LOG_LEVEL: "info"
connections:
success: process-results
error: workflow-error-handler
```
### Content Generation Pipeline
```yaml
content-generator:
type: workflow
name: "Content Generation Pipeline"
inputs:
workflowId: "content-generation-v3"
inputMapping:
topic: <start.topic>
style: <style-analyzer.recommendedStyle>
targetAudience: <audience-detector.audience>
brandGuidelines: <brand-config.guidelines>
environmentVariables:
CONTENT_API_KEY: "{{CONTENT_API_KEY}}"
QUALITY_THRESHOLD: "high"
timeout: 120000
connections:
success: review-content
error: content-generation-failed
```
### Multi-Step Analysis Workflow
```yaml
analysis-workflow:
type: workflow
name: "Analysis Workflow"
inputs:
workflowId: "comprehensive-analysis"
inputMapping:
document: <document-processor.content>
analysisType: "comprehensive"
includeMetrics: true
outputFormat: "structured"
environmentVariables:
ANALYSIS_MODEL: "gpt-4o"
OPENAI_API_KEY: "{{OPENAI_API_KEY}}"
CLAUDE_API_KEY: "{{CLAUDE_API_KEY}}"
connections:
success: compile-analysis-report
error: analysis-workflow-error
```
### Conditional Workflow Execution
```yaml
customer-workflow-router:
type: condition
name: "Customer Workflow Router"
inputs:
conditions:
if: <customer-type.type> === "enterprise"
else-if: <customer-type.type> === "premium"
else: true
connections:
conditions:
if: enterprise-workflow
else-if: premium-workflow
else: standard-workflow
enterprise-workflow:
type: workflow
name: "Enterprise Customer Workflow"
inputs:
workflowId: "enterprise-customer-processing"
inputMapping:
customerData: <customer-data.profile>
accountManager: <account-assignment.manager>
tier: "enterprise"
environmentVariables:
PRIORITY_LEVEL: "high"
SLA_REQUIREMENTS: "strict"
connections:
success: enterprise-complete
premium-workflow:
type: workflow
name: "Premium Customer Workflow"
inputs:
workflowId: "premium-customer-processing"
inputMapping:
customerData: <customer-data.profile>
supportLevel: "premium"
environmentVariables:
PRIORITY_LEVEL: "medium"
connections:
success: premium-complete
standard-workflow:
type: workflow
name: "Standard Customer Workflow"
inputs:
workflowId: "standard-customer-processing"
inputMapping:
customerData: <customer-data.profile>
environmentVariables:
PRIORITY_LEVEL: "standard"
connections:
success: standard-complete
```
### Parallel Workflow Execution
```yaml
parallel-workflows:
type: parallel
name: "Parallel Workflow Processing"
inputs:
parallelType: collection
collection: |
[
{"workflowId": "sentiment-analysis", "focus": "sentiment"},
{"workflowId": "topic-extraction", "focus": "topics"},
{"workflowId": "entity-recognition", "focus": "entities"}
]
connections:
success: merge-workflow-results
execute-analysis-workflow:
type: workflow
name: "Execute Analysis Workflow"
parentId: parallel-workflows
inputs:
workflowId: <parallel.currentItem.workflowId>
inputMapping:
content: <start.content>
analysisType: <parallel.currentItem.focus>
environmentVariables:
ANALYSIS_API_KEY: "{{ANALYSIS_API_KEY}}"
connections:
success: workflow-complete
```
### Error Handling Workflow
```yaml
main-workflow:
type: workflow
name: "Main Processing Workflow"
inputs:
workflowId: "main-processing-v1"
inputMapping:
data: <start.input>
timeout: 180000
connections:
success: main-complete
error: error-recovery-workflow
error-recovery-workflow:
type: workflow
name: "Error Recovery Workflow"
inputs:
workflowId: "error-recovery-v1"
inputMapping:
originalInput: <start.input>
errorDetails: <main-workflow.error>
failureTimestamp: "{{new Date().toISOString()}}"
environmentVariables:
RECOVERY_MODE: "automatic"
FALLBACK_ENABLED: "true"
connections:
success: recovery-complete
error: manual-intervention-required
```
## Input Mapping
Map data from the parent workflow to the sub-workflow:
```yaml
inputMapping:
# Static values
mode: "production"
version: "1.0"
# References to parent workflow data
userData: <user-processor.profile>
settings: <config-loader.settings>
# Complex object mapping
requestData:
id: <start.requestId>
timestamp: "{{new Date().toISOString()}}"
source: "parent-workflow"
```
## Output References
After a workflow block completes, you can reference its outputs:
```yaml
# In subsequent blocks
next-block:
inputs:
workflowResult: <workflow-name.output> # Sub-workflow output
executionTime: <workflow-name.duration> # Execution duration
status: <workflow-name.status> # Execution status
```
## Best Practices
- Use descriptive workflow IDs for clarity
- Map only necessary data to sub-workflows
- Set appropriate timeouts for workflow complexity
- Include error handling for robust execution
- Pass environment variables securely
- Test sub-workflows independently first
- Monitor nested workflow performance
- Use versioned workflow IDs for stability

View File

@@ -0,0 +1,273 @@
---
title: YAML Workflow Examples
description: Examples of complete YAML workflows
---
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
## Multi-Agent Chain Workflow
A workflow where multiple AI agents process information sequentially:
```yaml
version: '1.0'
blocks:
start:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: agent-1-initiator
agent-1-initiator:
type: agent
name: Agent 1 Initiator
inputs:
systemPrompt: You are the first agent in a chain. Your role is to analyze the input and create an initial response that will be passed to the next agent.
userPrompt: |-
Welcome! I'm the first agent in our chain.
Input to process: <start.input>
Please create an initial analysis or greeting that the next agent can build upon. Be creative and set a positive tone for the chain!
model: gpt-4o
temperature: 0.7
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: agent-2-enhancer
agent-2-enhancer:
type: agent
name: Agent 2 Enhancer
inputs:
systemPrompt: You are the second agent in a chain. Take the output from Agent 1 and enhance it with additional insights or improvements.
userPrompt: |-
I'm the second agent! Here's what Agent 1 provided:
<agent1initiator.content>
Now I'll enhance this with additional details, insights, or improvements. Let me build upon their work!
model: gpt-4o
temperature: 0.7
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: agent-3-refiner
agent-3-refiner:
type: agent
name: Agent 3 Refiner
inputs:
systemPrompt: You are the third agent in a chain. Take the enhanced output from Agent 2 and refine it further, adding structure or organization.
userPrompt: |-
I'm the third agent in our chain! Here's the enhanced work from Agent 2:
<agent2enhancer.content>
My job is to refine and organize this content. I'll add structure, clarity, and polish to make it even better!
model: gpt-4o
temperature: 0.6
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: agent-4-finalizer
agent-4-finalizer:
type: agent
name: Agent 4 Finalizer
inputs:
systemPrompt: You are the final agent in a chain of 4. Create a comprehensive summary and conclusion based on all the previous agents' work.
userPrompt: |-
I'm the final agent! Here's the refined work from Agent 3:
<agent3refiner.content>
As the last agent in our chain, I'll create a final, polished summary that brings together all the work from our team of 4 agents. Let me conclude this beautifully!
model: gpt-4o
temperature: 0.5
apiKey: '{{OPENAI_API_KEY}}'
```
## Router-Based Conditional Workflow
A workflow that uses routing logic to send data to different agents based on conditions:
```yaml
version: '1.0'
blocks:
start:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: router-1
router-1:
type: router
name: Router 1
inputs:
prompt: go to agent 1 if <start.input> is greater than 5. else agent 2 if greater than 10. else agent 3
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
connections:
success:
- agent-1
- agent-2
- agent-3
agent-1:
type: agent
name: Agent 1
inputs:
systemPrompt: say 1
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
agent-2:
type: agent
name: Agent 2
inputs:
systemPrompt: say 2
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
agent-3:
type: agent
name: Agent 3
inputs:
systemPrompt: say 3
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
```
## Web Search with Structured Output
A workflow that searches the web using tools and returns structured data:
```yaml
version: '1.0'
blocks:
59eb07c1-1411-4b28-a274-fa78f55daf72:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: d77c2c98-56c4-432d-9338-9bac54a2d42f
d77c2c98-56c4-432d-9338-9bac54a2d42f:
type: agent
name: Agent 1
inputs:
systemPrompt: look up the user input. use structured output
userPrompt: <start.input>
model: claude-sonnet-4-0
apiKey: '{{ANTHROPIC_API_KEY}}'
tools:
- type: exa
title: Exa
params:
type: auto
apiKey: '{{EXA_API_KEY}}'
numResults: ''
toolId: exa_search
operation: exa_search
isExpanded: true
usageControl: auto
responseFormat: |-
{
"name": "output_schema",
"description": "Defines the structure for an output object.",
"strict": true,
"schema": {
"type": "object",
"properties": {
"output": {
"type": "string",
"description": "The output value"
}
},
"additionalProperties": false,
"required": ["output"]
}
}
```
## Loop Processing with Collection
A workflow that processes each item in a collection using a loop:
```yaml
version: '1.0'
blocks:
start:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: food-analysis-loop
food-analysis-loop:
type: loop
name: Food Analysis Loop
inputs:
count: 5
loopType: forEach
collection: '["apple", "banana", "carrot"]'
connections:
loop:
start: calorie-agent
calorie-agent:
type: agent
name: Calorie Analyzer
inputs:
systemPrompt: Return the number of calories in the food
userPrompt: <loop.currentItem>
model: claude-sonnet-4-0
apiKey: '{{ANTHROPIC_API_KEY}}'
parentId: food-analysis-loop
```
## Email Classification and Response
A workflow that classifies emails and generates appropriate responses:
```yaml
version: '1.0'
blocks:
start:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: email-classifier
email-classifier:
type: agent
name: Email Classifier
inputs:
systemPrompt: Classify emails into categories and extract key information.
userPrompt: |
Classify this email: <start.input>
Categories: support, billing, sales, feedback
Extract: urgency level, customer sentiment, main request
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: response-generator
response-generator:
type: agent
name: Response Generator
inputs:
systemPrompt: Generate appropriate responses based on email classification.
userPrompt: |
Email classification: <emailclassifier.content>
Original email: <start.input>
Generate a professional, helpful response addressing the customer's needs.
model: gpt-4o
temperature: 0.7
apiKey: '{{OPENAI_API_KEY}}'
```

View File

@@ -0,0 +1,159 @@
---
title: YAML Workflow Reference
description: Complete guide to writing YAML workflows in Sim Studio
---
import { Card, Cards } from "fumadocs-ui/components/card";
import { Step, Steps } from "fumadocs-ui/components/steps";
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
YAML workflows provide a powerful way to define, version, and share workflow configurations in Sim Studio. This reference guide covers the complete YAML syntax, block schemas, and best practices for creating robust workflows.
## Quick Start
Every Sim Studio workflow follows this basic structure:
```yaml
version: '1.0'
blocks:
start:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: agent-1
agent-1:
type: agent
name: "AI Assistant"
inputs:
systemPrompt: "You are a helpful assistant."
userPrompt: 'Hi'
model: gpt-4o
apiKey: '{{OPENAI_API_KEY}}'
```
## Core Concepts
<Steps>
<Step>
<strong>Version Declaration</strong>: Must be exactly `version: '1.0'` (with quotes)
</Step>
<Step>
<strong>Blocks Structure</strong>: All workflow blocks are defined under the `blocks` key
</Step>
<Step>
<strong>Block References</strong>: Use block names in lowercase with spaces removed (e.g., `<aiassistant.content>`)
</Step>
<Step>
<strong>Environment Variables</strong>: Reference with double curly braces `{{VARIABLE_NAME}}`
</Step>
</Steps>
## Block Types
Sim Studio supports several core block types, each with specific YAML schemas:
<Cards>
<Card title="Starter Block" href="/yaml/blocks/starter">
Workflow entry point with support for manual, webhook, and scheduled triggers
</Card>
<Card title="Agent Block" href="/yaml/blocks/agent">
AI-powered processing with support for tools and structured output
</Card>
<Card title="Function Block" href="/yaml/blocks/function">
Custom JavaScript/TypeScript code execution
</Card>
<Card title="API Block" href="/yaml/blocks/api">
HTTP requests to external services
</Card>
<Card title="Condition Block" href="/yaml/blocks/condition">
Conditional branching based on boolean expressions
</Card>
<Card title="Router Block" href="/yaml/blocks/router">
AI-powered intelligent routing to multiple paths
</Card>
<Card title="Loop Block" href="/yaml/blocks/loop">
Iterative processing with for and forEach loops
</Card>
<Card title="Parallel Block" href="/yaml/blocks/parallel">
Concurrent execution across multiple instances
</Card>
<Card title="Webhook Block" href="/yaml/blocks/webhook">
Webhook triggers for external integrations
</Card>
<Card title="Evaluator Block" href="/yaml/blocks/evaluator">
Validate outputs against defined criteria and metrics
</Card>
<Card title="Workflow Block" href="/yaml/blocks/workflow">
Execute other workflows as reusable components
</Card>
<Card title="Response Block" href="/yaml/blocks/response">
Final workflow output formatting
</Card>
</Cards>
## Block Reference Syntax
The most critical aspect of YAML workflows is understanding how to reference data between blocks:
### Basic Rules
1. **Use the block name** (not the block ID) converted to lowercase with spaces removed
2. **Add the appropriate property** (.content for agents, .output for tools)
3. **When using chat, reference the starter block** as `<start.input>`
### Examples
```yaml
# Block definitions
email-processor:
type: agent
name: "Email Agent"
# ... configuration
data-formatter:
type: function
name: "Data Agent"
# ... configuration
# Referencing their outputs
next-block:
type: agent
name: "Next Step"
inputs:
userPrompt: |
Process this email: <emailagent.content>
Use this formatted data: <dataagent.output>
Original input: <start.input>
```
### Special Cases
- **Loop Variables**: `<loop.index>`, `<loop.currentItem>`, `<loop.items>`
- **Parallel Variables**: `<parallel.index>`, `<parallel.currentItem>`
## Environment Variables
Use environment variables for sensitive data like API keys:
```yaml
inputs:
apiKey: '{{OPENAI_API_KEY}}'
database: '{{DATABASE_URL}}'
token: '{{SLACK_BOT_TOKEN}}'
```
## Best Practices
- **Keep block names human-readable**: "Email Processor" for UI display
- **Reference environment variables**: Never hardcode API keys
- **Structure for readability**: Group related blocks logically
- **Test incrementally**: Build workflows step by step
## Next Steps
- [Block Reference Syntax](/yaml/block-reference) - Detailed reference rules
- [Complete Block Schemas](/yaml/blocks) - All available block types
- [Workflow Examples](/yaml/examples) - Real-world workflow patterns

View File

@@ -0,0 +1,4 @@
{
"title": "YAML Reference",
"pages": ["index", "block-reference", "blocks", "examples"]
}

View File

@@ -7,3 +7,15 @@ import { twMerge } from 'tailwind-merge'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
/**
* Get the full URL for a video asset stored in Vercel Blob
*/
export function getVideoUrl(filename: string) {
const baseUrl = process.env.NEXT_PUBLIC_BLOB_BASE_URL
if (!baseUrl) {
console.warn('NEXT_PUBLIC_BLOB_BASE_URL not configured, falling back to local path')
return `/${filename}`
}
return `${baseUrl}/${filename}`
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

2
apps/sim/.gitignore vendored
View File

@@ -50,3 +50,5 @@ next-env.d.ts
# Uploads
/uploads
.trigger

View File

@@ -2,7 +2,7 @@
import Image from 'next/image'
import Link from 'next/link'
import { GridPattern } from '../(landing)/components/grid-pattern'
import { GridPattern } from '@/app/(landing)/components/grid-pattern'
export default function AuthLayout({ children }: { children: React.ReactNode }) {
return (

View File

@@ -6,7 +6,7 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { useRouter, useSearchParams } from 'next/navigation'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { client } from '@/lib/auth-client'
import LoginPage from './login-form'
import LoginPage from '@/app/(auth)/login/login-form'
vi.mock('next/navigation', () => ({
useRouter: vi.fn(),

View File

@@ -15,7 +15,7 @@ import {
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { client } from '@/lib/auth-client'
import { createLogger } from '@/lib/logs/console-logger'
import { createLogger } from '@/lib/logs/console/logger'
import { cn } from '@/lib/utils'
import { SocialLoginButtons } from '@/app/(auth)/components/social-login-buttons'

View File

@@ -1,5 +1,5 @@
import { getOAuthProviderStatus } from '../components/oauth-provider-checker'
import LoginForm from './login-form'
import { getOAuthProviderStatus } from '@/app/(auth)/components/oauth-provider-checker'
import LoginForm from '@/app/(auth)/login/login-form'
// Force dynamic rendering to avoid prerender errors with search params
export const dynamic = 'force-dynamic'

View File

@@ -11,8 +11,8 @@ import {
CardHeader,
CardTitle,
} from '@/components/ui/card'
import { createLogger } from '@/lib/logs/console-logger'
import { SetNewPasswordForm } from './reset-password-form'
import { createLogger } from '@/lib/logs/console/logger'
import { SetNewPasswordForm } from '@/app/(auth)/reset-password/reset-password-form'
const logger = createLogger('ResetPasswordPage')

View File

@@ -1,6 +1,6 @@
import { env, isTruthy } from '@/lib/env'
import { getOAuthProviderStatus } from '../components/oauth-provider-checker'
import SignupForm from './signup-form'
import { getOAuthProviderStatus } from '@/app/(auth)/components/oauth-provider-checker'
import SignupForm from '@/app/(auth)/signup/signup-form'
// Force dynamic rendering to avoid prerender errors with search params
export const dynamic = 'force-dynamic'

View File

@@ -6,7 +6,7 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { useRouter, useSearchParams } from 'next/navigation'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { client } from '@/lib/auth-client'
import SignupPage from './signup-form'
import SignupPage from '@/app/(auth)/signup/signup-form'
vi.mock('next/navigation', () => ({
useRouter: vi.fn(),

View File

@@ -1,7 +1,7 @@
import { env } from '@/lib/env'
import { isProd } from '@/lib/environment'
import { getBaseUrl } from '@/lib/urls/utils'
import { VerifyContent } from './verify-content'
import { VerifyContent } from '@/app/(auth)/verify/verify-content'
// Force dynamic rendering to avoid prerender errors with search params
export const dynamic = 'force-dynamic'

View File

@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'
import { useRouter, useSearchParams } from 'next/navigation'
import { client } from '@/lib/auth-client'
import { env, isTruthy } from '@/lib/env'
import { createLogger } from '@/lib/logs/console-logger'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('useVerification')

View File

@@ -4,7 +4,7 @@ import { Suspense, useEffect, useState } from 'react'
import { Button } from '@/components/ui/button'
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp'
import { cn } from '@/lib/utils'
import { useVerification } from './use-verification'
import { useVerification } from '@/app/(auth)/verify/use-verification'
interface VerifyContentProps {
hasResendKey: boolean

View File

@@ -17,9 +17,9 @@ import ReactFlow, {
} from 'reactflow'
import 'reactflow/dist/style.css'
import { HeroBlock } from './hero-block'
import { HeroEdge } from './hero-edge'
import { useWindowSize } from './use-window-size'
import { HeroBlock } from '@/app/(landing)/components/hero-block'
import { HeroEdge } from '@/app/(landing)/components/hero-edge'
import { useWindowSize } from '@/app/(landing)/components/use-window-size'
const nodeTypes: NodeTypes = { heroBlock: HeroBlock }
const edgeTypes: EdgeTypes = { heroEdge: HeroEdge }

View File

@@ -15,7 +15,7 @@ import {
SheetTitle,
SheetTrigger,
} from '@/components/ui/sheet'
import { usePrefetchOnHover } from '../utils/prefetch'
import { usePrefetchOnHover } from '@/app/(landing)/utils/prefetch'
// --- Framer Motion Variants ---
const desktopNavContainerVariants = {

View File

@@ -3,9 +3,9 @@
import { useEffect, useState } from 'react'
import { AnimatePresence, motion } from 'framer-motion'
import { usePathname } from 'next/navigation'
import { getFormattedGitHubStars } from '../actions/github'
import GitHubStarsClient from './github-stars-client'
import NavClient from './nav-client'
import { getFormattedGitHubStars } from '@/app/(landing)/actions/github'
import GitHubStarsClient from '@/app/(landing)/components/github-stars-client'
import NavClient from '@/app/(landing)/components/nav-client'
interface NavWrapperProps {
onOpenTypeformLink: () => void

View File

@@ -1,7 +1,7 @@
'use client'
import { motion } from 'framer-motion'
import { BlogCard } from '../blog-card'
import { BlogCard } from '@/app/(landing)/components/blog-card'
function Blogs() {
return (

View File

@@ -18,8 +18,8 @@ import 'reactflow/dist/style.css'
import { AgentIcon, ConnectIcon, StartIcon } from '@/components/icons'
import { cn } from '@/lib/utils'
import { DotPattern } from '../dot-pattern'
import { HeroBlock } from '../hero-block'
import { DotPattern } from '@/app/(landing)/components/dot-pattern'
import { HeroBlock } from '@/app/(landing)/components/hero-block'
// --- Types ---
type Feature = {

View File

@@ -6,8 +6,8 @@ import { useRouter } from 'next/navigation'
import { DiscordIcon, GithubIcon, xIcon as XIcon } from '@/components/icons'
import { Button } from '@/components/ui/button'
import { useSession } from '@/lib/auth-client'
import { usePrefetchOnHover } from '../../utils/prefetch'
import useIsMobile from '../hooks/use-is-mobile'
import useIsMobile from '@/app/(landing)/components/hooks/use-is-mobile'
import { usePrefetchOnHover } from '@/app/(landing)/utils/prefetch'
function Footer() {
const router = useRouter()

View File

@@ -5,8 +5,8 @@ import { Command, CornerDownLeft } from 'lucide-react'
import { useRouter } from 'next/navigation'
import { Button } from '@/components/ui/button'
import { useSession } from '@/lib/auth-client'
import { GridPattern } from '../grid-pattern'
import HeroWorkflowProvider from '../hero-workflow'
import { GridPattern } from '@/app/(landing)/components/grid-pattern'
import HeroWorkflowProvider from '@/app/(landing)/components/hero-workflow'
function Hero() {
const router = useRouter()

View File

@@ -3,9 +3,9 @@
import { motion } from 'framer-motion'
import { GitBranch, RefreshCcw } from 'lucide-react'
import ReactFlow, { ConnectionLineType, Position, ReactFlowProvider } from 'reactflow'
import { DotPattern } from '@/app/(landing)/components/dot-pattern'
import { HeroBlock } from '@/app/(landing)/components/hero-block'
import { OrbitingCircles } from '@/app/(landing)/components/magicui/orbiting-circles'
import { DotPattern } from '../dot-pattern'
import { HeroBlock } from '../hero-block'
function Integrations() {
return (
@@ -172,6 +172,9 @@ function Integrations() {
<div className='flex aspect-square h-16 w-16 items-center justify-center rounded-xl border border-[#353535] bg-[#242424] p-1 shadow-[0px_2px_6px_0px_rgba(126,_48,_252,_0.1)]'>
<Icons.pinecone />
</div>
<div className='flex aspect-square h-16 w-16 items-center justify-center rounded-xl border border-[#353535] bg-[#242424] p-1 shadow-[0px_2px_6px_0px_rgba(126,_48,_252,_0.1)]'>
<Icons.qdrant />
</div>
<div className='flex aspect-square h-16 w-16 items-center justify-center rounded-xl border border-[#353535] bg-[#242424] p-1 shadow-[0px_2px_6px_0px_rgba(126,_48,_252,_0.1)]'>
<Icons.slack />
</div>
@@ -290,6 +293,9 @@ function Integrations() {
<div className='flex aspect-square h-12 w-12 items-center justify-center rounded-xl border border-[#353535] bg-[#242424] p-1 shadow-[0px_2px_6px_0px_rgba(126,_48,_252,_0.1)]'>
<Icons.pinecone />
</div>
<div className='flex aspect-square h-12 w-12 items-center justify-center rounded-xl border border-[#353535] bg-[#242424] p-1 shadow-[0px_2px_6px_0px_rgba(126,_48,_252,_0.1)]'>
<Icons.qdrant />
</div>
<div className='flex aspect-square h-12 w-12 items-center justify-center rounded-xl border border-[#353535] bg-[#242424] p-1 shadow-[0px_2px_6px_0px_rgba(126,_48,_252,_0.1)]'>
<Icons.slack />
</div>
@@ -512,6 +518,77 @@ const Icons = {
/>
</svg>
),
qdrant: () => (
<svg width='48' height='48' fill='none' viewBox='0 0 49 56' xmlns='http://www.w3.org/2000/svg'>
<g clipPath='url(#b)'>
<path
d='m38.489 51.477-1.1167-30.787-2.0223-8.1167 13.498 1.429v37.242l-8.2456 4.7589-2.1138-4.5259z'
clipRule='evenodd'
fill='#24386C'
fillRule='evenodd'
/>
<path
d='m48.847 14-8.2457 4.7622-17.016-3.7326-19.917 8.1094-3.3183-9.139 12.122-7 12.126-7 12.123 7 12.126 7z'
clipRule='evenodd'
fill='#7589BE'
fillRule='evenodd'
/>
<path
d='m0.34961 13.999 8.2457 4.7622 4.7798 14.215 16.139 12.913-4.9158 10.109-12.126-7.0004-12.123-7v-28z'
clipRule='evenodd'
fill='#B2BFE8'
fillRule='evenodd'
/>
<path
d='m30.066 38.421-5.4666 8.059v9.5207l7.757-4.4756 3.9968-5.9681'
clipRule='evenodd'
fill='#24386C'
fillRule='evenodd'
/>
<path
d='m24.602 36.962-7.7603-13.436 1.6715-4.4531 6.3544-3.0809 7.488 7.5343-7.7536 13.436z'
clipRule='evenodd'
fill='#7589BE'
fillRule='evenodd'
/>
<path
d='m16.843 23.525 7.7569 4.4756v8.9585l-7.1741 0.3087-4.3397-5.5412 3.7569-8.2016z'
clipRule='evenodd'
fill='#B2BFE8'
fillRule='evenodd'
/>
<path
d='m24.6 28 7.757-4.4752 5.2792 8.7903-6.3886 5.2784-6.6476-0.6346v-8.9589z'
clipRule='evenodd'
fill='#24386C'
fillRule='evenodd'
/>
<path
d='m32.355 51.524 8.2457 4.476v-37.238l-8.0032-4.6189-7.9995-4.6189-8.0031 4.6189-7.9995 4.6189v18.479l7.9995 4.6189 8.0031 4.6193 7.757-4.4797v9.5244zm0-19.045-7.757 4.4793-7.7569-4.4793v-8.9549l7.7569-4.4792 7.757 4.4792v8.9549z'
clipRule='evenodd'
fill='#DC244C'
fillRule='evenodd'
/>
<path d='m24.603 46.483v-9.5222l-7.7166-4.4411v9.5064l7.7166 4.4569z' fill='url(#a)' />
</g>
<defs>
<linearGradient
id='a'
x1='23.18'
x2='15.491'
y1='38.781'
y2='38.781'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#FF3364' offset='0' />
<stop stopColor='#C91540' stopOpacity='0' offset='1' />
</linearGradient>
<clipPath id='b'>
<rect transform='translate(.34961)' width='48.3' height='56' fill='#fff' />
</clipPath>
</defs>
</svg>
),
slack: () => (
<svg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'>
<g clipPath='url(#clip0_82_6239)'>

View File

@@ -1,8 +1,8 @@
'use client'
import { motion } from 'framer-motion'
import useIsMobile from '@/app/(landing)/components/hooks/use-is-mobile'
import { Marquee } from '@/app/(landing)/components/magicui/marquee'
import useIsMobile from '../hooks/use-is-mobile'
const X_TESTIMONIALS = [
{

View File

@@ -26,10 +26,10 @@ import {
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { Button } from '@/components/ui/button'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
import { GridPattern } from '../components/grid-pattern'
import NavWrapper from '../components/nav-wrapper'
import Footer from '../components/sections/footer'
import { getCachedContributorsData, prefetchContributorsData } from '../utils/prefetch'
import { GridPattern } from '@/app/(landing)/components/grid-pattern'
import NavWrapper from '@/app/(landing)/components/nav-wrapper'
import Footer from '@/app/(landing)/components/sections/footer'
import { getCachedContributorsData, prefetchContributorsData } from '@/app/(landing)/utils/prefetch'
interface Contributor {
login: string

View File

@@ -1,10 +1,10 @@
'use client'
import NavWrapper from './components/nav-wrapper'
import Footer from './components/sections/footer'
import Hero from './components/sections/hero'
import Integrations from './components/sections/integrations'
import Testimonials from './components/sections/testimonials'
import NavWrapper from '@/app/(landing)/components/nav-wrapper'
import Footer from '@/app/(landing)/components/sections/footer'
import Hero from '@/app/(landing)/components/sections/hero'
import Integrations from '@/app/(landing)/components/sections/integrations'
import Testimonials from '@/app/(landing)/components/sections/testimonials'
export default function Landing() {
const handleOpenTypeformLink = () => {

View File

@@ -1,9 +1,9 @@
'use client'
import Link from 'next/link'
import { GridPattern } from '../components/grid-pattern'
import NavWrapper from '../components/nav-wrapper'
import Footer from '../components/sections/footer'
import { GridPattern } from '@/app/(landing)/components/grid-pattern'
import NavWrapper from '@/app/(landing)/components/nav-wrapper'
import Footer from '@/app/(landing)/components/sections/footer'
export default function PrivacyPolicy() {
const handleOpenTypeformLink = () => {

View File

@@ -1,9 +1,9 @@
'use client'
import Link from 'next/link'
import { GridPattern } from '../components/grid-pattern'
import NavWrapper from '../components/nav-wrapper'
import Footer from '../components/sections/footer'
import { GridPattern } from '@/app/(landing)/components/grid-pattern'
import NavWrapper from '@/app/(landing)/components/nav-wrapper'
import Footer from '@/app/(landing)/components/sections/footer'
export default function TermsOfService() {
const handleOpenTypeformLink = () => {

View File

@@ -1,6 +1,6 @@
// Utility for prefetching and caching contributors page data
import { getCommitsData, getContributors, getRepositoryStats } from '../actions/github'
import { generateActivityData, generateCommitTimelineData } from './github'
import { getCommitsData, getContributors, getRepositoryStats } from '@/app/(landing)/actions/github'
import { generateActivityData, generateCommitTimelineData } from '@/app/(landing)/utils/github'
interface Contributor {
login: string

View File

@@ -279,12 +279,7 @@ export function mockExecutionDependencies() {
}
})
vi.mock('@/lib/logs/execution-logger', () => ({
persistExecutionLogs: vi.fn().mockResolvedValue(undefined),
persistExecutionError: vi.fn().mockResolvedValue(undefined),
}))
vi.mock('@/lib/logs/trace-spans', () => ({
vi.mock('@/lib/logs/execution/trace-spans/trace-spans', () => ({
buildTraceSpans: vi.fn().mockReturnValue({
traceSpans: [],
totalDuration: 100,
@@ -380,8 +375,7 @@ export function mockWorkflowAccessValidation(shouldSucceed = true) {
export async function getMockedDependencies() {
const utilsModule = await import('@/lib/utils')
const logsModule = await import('@/lib/logs/execution-logger')
const traceSpansModule = await import('@/lib/logs/trace-spans')
const traceSpansModule = await import('@/lib/logs/execution/trace-spans/trace-spans')
const workflowUtilsModule = await import('@/lib/workflows/utils')
const executorModule = await import('@/executor')
const serializerModule = await import('@/serializer')
@@ -389,8 +383,6 @@ export async function getMockedDependencies() {
return {
decryptSecret: utilsModule.decryptSecret,
persistExecutionLogs: logsModule.persistExecutionLogs,
persistExecutionError: logsModule.persistExecutionError,
buildTraceSpans: traceSpansModule.buildTraceSpans,
updateWorkflowRunCounts: workflowUtilsModule.updateWorkflowRunCounts,
Executor: executorModule.Executor,
@@ -647,6 +639,15 @@ export function mockKnowledgeSchemas() {
tag7: 'tag7',
createdAt: 'created_at',
},
permissions: {
id: 'permission_id',
userId: 'user_id',
entityType: 'entity_type',
entityId: 'entity_id',
permissionType: 'permission_type',
createdAt: 'created_at',
updatedAt: 'updated_at',
},
}))
}
@@ -654,7 +655,7 @@ export function mockKnowledgeSchemas() {
* Mock console logger
*/
export function mockConsoleLogger() {
vi.doMock('@/lib/logs/console-logger', () => ({
vi.doMock('@/lib/logs/console/logger', () => ({
createLogger: vi.fn().mockReturnValue(mockLogger),
}))
}

View File

@@ -27,7 +27,7 @@ describe('Forget Password API Route', () => {
redirectTo: 'https://example.com/reset',
})
const { POST } = await import('./route')
const { POST } = await import('@/app/api/auth/forget-password/route')
const response = await POST(req)
const data = await response.json()
@@ -56,7 +56,7 @@ describe('Forget Password API Route', () => {
email: 'test@example.com',
})
const { POST } = await import('./route')
const { POST } = await import('@/app/api/auth/forget-password/route')
const response = await POST(req)
const data = await response.json()
@@ -79,7 +79,7 @@ describe('Forget Password API Route', () => {
const req = createMockRequest('POST', {})
const { POST } = await import('./route')
const { POST } = await import('@/app/api/auth/forget-password/route')
const response = await POST(req)
const data = await response.json()
@@ -98,7 +98,7 @@ describe('Forget Password API Route', () => {
email: '',
})
const { POST } = await import('./route')
const { POST } = await import('@/app/api/auth/forget-password/route')
const response = await POST(req)
const data = await response.json()
@@ -126,7 +126,7 @@ describe('Forget Password API Route', () => {
email: 'nonexistent@example.com',
})
const { POST } = await import('./route')
const { POST } = await import('@/app/api/auth/forget-password/route')
const response = await POST(req)
const data = await response.json()
@@ -134,7 +134,7 @@ describe('Forget Password API Route', () => {
expect(response.status).toBe(500)
expect(data.message).toBe(errorMessage)
const logger = await import('@/lib/logs/console-logger')
const logger = await import('@/lib/logs/console/logger')
const mockLogger = logger.createLogger('ForgetPasswordTest')
expect(mockLogger.error).toHaveBeenCalledWith('Error requesting password reset:', {
error: expect.any(Error),
@@ -156,7 +156,7 @@ describe('Forget Password API Route', () => {
email: 'test@example.com',
})
const { POST } = await import('./route')
const { POST } = await import('@/app/api/auth/forget-password/route')
const response = await POST(req)
const data = await response.json()
@@ -164,7 +164,7 @@ describe('Forget Password API Route', () => {
expect(response.status).toBe(500)
expect(data.message).toBe('Failed to send password reset email. Please try again later.')
const logger = await import('@/lib/logs/console-logger')
const logger = await import('@/lib/logs/console/logger')
const mockLogger = logger.createLogger('ForgetPasswordTest')
expect(mockLogger.error).toHaveBeenCalled()
})

Some files were not shown because too many files have changed in this diff Show More