mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 23:17:59 -05:00
Compare commits
230 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
805b245ca9 | ||
|
|
bf0ea10e62 | ||
|
|
9be41b4b73 | ||
|
|
f08a51cc34 | ||
|
|
2f8d9eaede | ||
|
|
e37a8681e0 | ||
|
|
e93a5ce646 | ||
|
|
fe5ce5a374 | ||
|
|
3a48980916 | ||
|
|
b42c43ae87 | ||
|
|
5fec81320c | ||
|
|
2d5da6e25b | ||
|
|
5d17ed830b | ||
|
|
2a7b4da969 | ||
|
|
c43b03935c | ||
|
|
0da8a7068a | ||
|
|
f5f65fd8d1 | ||
|
|
754d768070 | ||
|
|
05c83e27b9 | ||
|
|
244c086ef2 | ||
|
|
f8cfdba5ee | ||
|
|
82d491d1b6 | ||
|
|
7c00f07d8f | ||
|
|
bbde2be093 | ||
|
|
bf9b3fdc99 | ||
|
|
e4523961ea | ||
|
|
02cecd5745 | ||
|
|
00334e501f | ||
|
|
0049644224 | ||
|
|
8764954282 | ||
|
|
76a04251a7 | ||
|
|
99105841b1 | ||
|
|
0fb2f7c44e | ||
|
|
1a719470b8 | ||
|
|
9584f3cb57 | ||
|
|
9239954029 | ||
|
|
7b50eccc89 | ||
|
|
70899852a3 | ||
|
|
c85adf695d | ||
|
|
a05ba867cd | ||
|
|
24a3b9a167 | ||
|
|
936d2d31e2 | ||
|
|
fb40d25234 | ||
|
|
c3fe758991 | ||
|
|
793e9262bd | ||
|
|
391c3efa14 | ||
|
|
d30e116781 | ||
|
|
7182f35702 | ||
|
|
0a5bf5a821 | ||
|
|
d084ecdcb1 | ||
|
|
76df2b9cd9 | ||
|
|
37786d371e | ||
|
|
aa2577be91 | ||
|
|
726901cb31 | ||
|
|
49a8a0551d | ||
|
|
59b68d21be | ||
|
|
c7ee74ecf8 | ||
|
|
00f893e318 | ||
|
|
567f7a5e10 | ||
|
|
b0cc595434 | ||
|
|
7bc61702ec | ||
|
|
c6907c2921 | ||
|
|
77bbdc1089 | ||
|
|
96438c3a54 | ||
|
|
10a4566614 | ||
|
|
10ab1b4041 | ||
|
|
fc7171b038 | ||
|
|
f3a405364f | ||
|
|
1eda44d605 | ||
|
|
282345b983 | ||
|
|
5febdfbe82 | ||
|
|
30f793072b | ||
|
|
79d8dcb198 | ||
|
|
87344117cb | ||
|
|
dcf6e10b5b | ||
|
|
7080b9eccc | ||
|
|
391925a178 | ||
|
|
f93a1bf837 | ||
|
|
0d4849b812 | ||
|
|
215e1e9831 | ||
|
|
2c86679bd7 | ||
|
|
7a5169f01b | ||
|
|
d829ab2747 | ||
|
|
46d23bd278 | ||
|
|
a0893946dd | ||
|
|
9b284c82ce | ||
|
|
c8bc9dbb55 | ||
|
|
2784b9686f | ||
|
|
78395f6ded | ||
|
|
81d96ef746 | ||
|
|
a137df338c | ||
|
|
fc93a30843 | ||
|
|
c9d826e7d6 | ||
|
|
222f97f097 | ||
|
|
ddac090485 | ||
|
|
1c9198c226 | ||
|
|
6946db9eb6 | ||
|
|
01881d0db4 | ||
|
|
33ac68ba2e | ||
|
|
10584e17ec | ||
|
|
4ed6a70350 | ||
|
|
3e1d7e718c | ||
|
|
6ffe5421c0 | ||
|
|
ada5f5162e | ||
|
|
798cdd1a56 | ||
|
|
43d60e9670 | ||
|
|
5de5ff5baa | ||
|
|
7b50046fbf | ||
|
|
44c8f0556a | ||
|
|
060b676313 | ||
|
|
44f10488db | ||
|
|
9c8e0d8dcf | ||
|
|
ad91e59d38 | ||
|
|
316985c664 | ||
|
|
6986a4edf9 | ||
|
|
36cd271984 | ||
|
|
d024f8da89 | ||
|
|
8e6101b0e3 | ||
|
|
86d94074ac | ||
|
|
e9892d7f32 | ||
|
|
a0b27570f7 | ||
|
|
590764e5dc | ||
|
|
a0f80c8102 | ||
|
|
0f2dd48887 | ||
|
|
dc1433eecf | ||
|
|
d9e99a4fab | ||
|
|
7d640823c3 | ||
|
|
de2ce6fcb7 | ||
|
|
2e77d4625a | ||
|
|
a94f61702c | ||
|
|
c5727ef018 | ||
|
|
e17cdc9698 | ||
|
|
4239810bb2 | ||
|
|
a9196314d7 | ||
|
|
51120c8fd5 | ||
|
|
88d8a1b104 | ||
|
|
50cbc890c2 | ||
|
|
b2450530d1 | ||
|
|
3b82e7d224 | ||
|
|
ca6884cdc2 | ||
|
|
2fb0894c2a | ||
|
|
6e682f5f47 | ||
|
|
84b9d766e9 | ||
|
|
7169f33a84 | ||
|
|
79bea155b3 | ||
|
|
80a7bf5e5f | ||
|
|
334f12c602 | ||
|
|
819c0cc8eb | ||
|
|
38afdeb83a | ||
|
|
cbfe9a69fe | ||
|
|
ad4060aa92 | ||
|
|
6afb453fc0 | ||
|
|
8e6057a39e | ||
|
|
76253de031 | ||
|
|
4d03c8b6ac | ||
|
|
28dd9e89f8 | ||
|
|
3e809d24c4 | ||
|
|
3f468dc302 | ||
|
|
911f2881de | ||
|
|
b74e71a47a | ||
|
|
ae38f20367 | ||
|
|
b1126e3d6a | ||
|
|
ef8ae60afd | ||
|
|
8ec194a604 | ||
|
|
950e055a8d | ||
|
|
79b761c022 | ||
|
|
45c92067e2 | ||
|
|
8c268e23dd | ||
|
|
0c8a773e56 | ||
|
|
c77a21e9b4 | ||
|
|
5664890065 | ||
|
|
328d361a70 | ||
|
|
afcc66afc6 | ||
|
|
0015dc93de | ||
|
|
6d380c28e3 | ||
|
|
a94fd8703f | ||
|
|
b9b662bf6d | ||
|
|
a5b809c8e9 | ||
|
|
31ccaa5227 | ||
|
|
d2cf31b42c | ||
|
|
4cd80947bd | ||
|
|
33123c6361 | ||
|
|
6170b80086 | ||
|
|
bacf733503 | ||
|
|
6f8f307a5d | ||
|
|
1ebcaf5bfd | ||
|
|
47090713ef | ||
|
|
f5cbcfb514 | ||
|
|
2a4590e649 | ||
|
|
533f765c34 | ||
|
|
0af7fb2a7a | ||
|
|
b29827c4ee | ||
|
|
8f75e795f2 | ||
|
|
1ec9770df3 | ||
|
|
c8b2c9ea63 | ||
|
|
fd82b99c5c | ||
|
|
f2894e645e | ||
|
|
18ce26616e | ||
|
|
c7866c8388 | ||
|
|
ef31a2fe7b | ||
|
|
717e17d02a | ||
|
|
e57d3f79a1 | ||
|
|
0b055623a0 | ||
|
|
96fdfbc3e6 | ||
|
|
a66c1e3b16 | ||
|
|
4bbc2b243c | ||
|
|
0621caf5a5 | ||
|
|
f07cffd264 | ||
|
|
1152a264bc | ||
|
|
274ebdf4eb | ||
|
|
43cb4cbf15 | ||
|
|
38b169cc31 | ||
|
|
38efb9a871 | ||
|
|
575a482273 | ||
|
|
7010c2d45a | ||
|
|
db369fed55 | ||
|
|
76c22e9164 | ||
|
|
626dafae49 | ||
|
|
2c7806feaa | ||
|
|
230143af3c | ||
|
|
c27698f7b3 | ||
|
|
5326f2f63c | ||
|
|
c47f8719e9 | ||
|
|
3580241d93 | ||
|
|
0fc0f683a6 | ||
|
|
d79cad4c52 | ||
|
|
a92ee8bf46 | ||
|
|
1438028982 | ||
|
|
fcc590c02b | ||
|
|
01e9016dbc |
@@ -18,14 +18,26 @@ alias pgc="PGPASSWORD=postgres psql -h db -U postgres -d simstudio"
|
||||
alias check-db="PGPASSWORD=postgres psql -h db -U postgres -c '\l'"
|
||||
|
||||
# Sim Studio specific aliases
|
||||
alias logs="cd /workspace/sim && tail -f logs/*.log 2>/dev/null || echo 'No log files found'"
|
||||
alias sim-start="cd /workspace/sim && npm run dev"
|
||||
alias sim-migrate="cd /workspace/sim && npx drizzle-kit push"
|
||||
alias sim-generate="cd /workspace/sim && npx drizzle-kit generate"
|
||||
alias sim-rebuild="cd /workspace/sim && npm run build && npm start"
|
||||
alias logs="cd /workspace/apps/sim && tail -f logs/*.log 2>/dev/null || echo 'No log files found'"
|
||||
alias sim-start="cd /workspace && bun run dev"
|
||||
alias sim-migrate="cd /workspace/apps/sim && bunx drizzle-kit push"
|
||||
alias sim-generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
|
||||
alias sim-rebuild="cd /workspace && bun run build && bun run start"
|
||||
alias docs-dev="cd /workspace/apps/docs && bun run dev"
|
||||
|
||||
# Default to sim directory
|
||||
cd /workspace/sim 2>/dev/null || true
|
||||
# Turbo related commands
|
||||
alias turbo-build="cd /workspace && bunx turbo run build"
|
||||
alias turbo-dev="cd /workspace && bunx turbo run dev"
|
||||
alias turbo-test="cd /workspace && bunx turbo run test"
|
||||
|
||||
# Bun specific commands
|
||||
alias bun-update="cd /workspace && bun update"
|
||||
alias bun-add="cd /workspace && bun add"
|
||||
alias bun-pm="cd /workspace && bun pm"
|
||||
alias bun-canary="bun upgrade --canary"
|
||||
|
||||
# Default to workspace directory
|
||||
cd /workspace 2>/dev/null || true
|
||||
|
||||
# Welcome message - only show once per session
|
||||
if [ -z "$SIM_WELCOME_SHOWN" ]; then
|
||||
@@ -36,10 +48,22 @@ if [ -z "$SIM_WELCOME_SHOWN" ]; then
|
||||
echo "🚀 Welcome to Sim Studio development environment!"
|
||||
echo ""
|
||||
echo "Available commands:"
|
||||
echo " sim-start - Start the development server"
|
||||
echo " sim-migrate - Push schema changes to the database"
|
||||
echo " sim-generate - Generate new migrations"
|
||||
echo " sim-rebuild - Build and start the production server"
|
||||
echo " sim-start - Start all apps in development mode"
|
||||
echo " sim-migrate - Push schema changes to the database for sim app"
|
||||
echo " sim-generate - Generate new migrations for sim app"
|
||||
echo " sim-rebuild - Build and start all apps"
|
||||
echo " docs-dev - Start only the docs app in development mode"
|
||||
echo ""
|
||||
echo "Turbo commands:"
|
||||
echo " turbo-build - Build all apps using Turborepo"
|
||||
echo " turbo-dev - Start development mode for all apps"
|
||||
echo " turbo-test - Run tests for all packages"
|
||||
echo ""
|
||||
echo "Bun commands:"
|
||||
echo " bun-update - Update dependencies"
|
||||
echo " bun-add - Add a new dependency"
|
||||
echo " bun-pm - Manage dependencies"
|
||||
echo " bun-canary - Upgrade to the latest canary version of Bun"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
fi
|
||||
@@ -1,4 +1,5 @@
|
||||
FROM node:20-bullseye
|
||||
# Use the latest Bun canary image for development
|
||||
FROM oven/bun:canary
|
||||
|
||||
# Avoid warnings by switching to noninteractive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
@@ -6,12 +7,13 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Install necessary packages for development
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install --no-install-recommends \
|
||||
git curl wget jq sudo postgresql-client \
|
||||
git curl wget jq sudo postgresql-client vim nano \
|
||||
bash-completion ca-certificates lsb-release gnupg \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create a non-root user
|
||||
ARG USERNAME=node
|
||||
ARG USERNAME=bun
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
@@ -19,11 +21,15 @@ ARG USER_GID=$USER_UID
|
||||
RUN echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USERNAME \
|
||||
&& chmod 0440 /etc/sudoers.d/$USERNAME
|
||||
|
||||
# Make sure we have the latest npm
|
||||
RUN npm install -g npm@latest
|
||||
# Install global packages for development
|
||||
RUN bun install -g turbo drizzle-kit typescript @types/node
|
||||
|
||||
# Install global packages
|
||||
RUN npm install -g drizzle-kit
|
||||
# Install bun completions
|
||||
RUN bun completions > /etc/bash_completion.d/bun
|
||||
|
||||
# Set up shell environment
|
||||
RUN echo "export PATH=$PATH:/home/$USERNAME/.bun/bin" >> /etc/profile
|
||||
RUN echo "source /etc/profile" >> /etc/bash.bashrc
|
||||
|
||||
# Switch back to dialog for any ad-hoc use of apt-get
|
||||
ENV DEBIAN_FRONTEND=dialog
|
||||
@@ -31,4 +37,6 @@ ENV DEBIAN_FRONTEND=dialog
|
||||
WORKDIR /workspace
|
||||
|
||||
# Expose the ports we're interested in
|
||||
EXPOSE 3000
|
||||
EXPOSE 3000
|
||||
EXPOSE 3001
|
||||
EXPOSE 3002
|
||||
@@ -33,7 +33,7 @@ This directory contains configuration files for Visual Studio Code Dev Container
|
||||
- Run database migrations
|
||||
- Configure helpful aliases
|
||||
|
||||
5. Start the application with `sim-start` (alias for `npm run dev`)
|
||||
5. Start the application with `sim-start` (alias for `bun run dev`)
|
||||
|
||||
### Development Commands
|
||||
|
||||
|
||||
@@ -10,14 +10,8 @@
|
||||
"settings": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"source.fixAll.biome": "explicit",
|
||||
"source.organizeImports.biome": "explicit"
|
||||
},
|
||||
"terminal.integrated.defaultProfile.linux": "bash",
|
||||
"terminal.integrated.profiles.linux": {
|
||||
@@ -29,16 +23,15 @@
|
||||
"terminal.integrated.shellIntegration.enabled": true
|
||||
},
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"biomejs.biome",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"ms-vscode.vscode-typescript-next",
|
||||
"github.copilot",
|
||||
"github.copilot-chat",
|
||||
"rvest.vs-code-prettier-eslint",
|
||||
"mikestead.dotenv",
|
||||
"dsznajder.es7-react-js-snippets",
|
||||
"steoates.autoimport"
|
||||
"steoates.autoimport",
|
||||
"oven.bun-vscode"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -49,12 +42,11 @@
|
||||
|
||||
"postStartCommand": "bash -c 'if [ ! -f ~/.bashrc ] || ! grep -q \"sim-start\" ~/.bashrc; then cp .devcontainer/.bashrc ~/.bashrc; fi'",
|
||||
|
||||
"remoteUser": "node",
|
||||
"remoteUser": "bun",
|
||||
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/git:1": {},
|
||||
"ghcr.io/devcontainers-contrib/features/npm-package:1": {
|
||||
"package": "typescript",
|
||||
"ghcr.io/prulloac/devcontainer-features/bun:1": {
|
||||
"version": "latest"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
@@ -7,6 +5,7 @@ services:
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
volumes:
|
||||
- ..:/workspace:cached
|
||||
- bun-cache:/home/bun/.bun/cache:delegated
|
||||
command: sleep infinity
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
@@ -14,15 +13,62 @@ services:
|
||||
- POSTGRES_URL=postgresql://postgres:postgres@db:5432/simstudio
|
||||
- BETTER_AUTH_URL=http://localhost:3000
|
||||
- NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||
- BUN_INSTALL_CACHE_DIR=/home/bun/.bun/cache
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
realtime:
|
||||
condition: service_healthy
|
||||
migrations:
|
||||
condition: service_completed_successfully
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "3001:3001"
|
||||
working_dir: /workspace
|
||||
healthcheck:
|
||||
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3000']
|
||||
interval: 90s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
realtime:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
command: sleep infinity
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
|
||||
- BETTER_AUTH_URL=http://localhost:3000
|
||||
- NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "3000:3000"
|
||||
working_dir: /workspace/sim
|
||||
- "3002:3002"
|
||||
working_dir: /workspace
|
||||
healthcheck:
|
||||
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002']
|
||||
interval: 90s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
migrations:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/db.Dockerfile
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
command: ['bun', 'run', 'db:migrate']
|
||||
restart: 'no'
|
||||
|
||||
db:
|
||||
image: postgres:16
|
||||
image: pgvector/pgvector:pg17
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
@@ -39,4 +85,5 @@ services:
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
postgres-data:
|
||||
bun-cache:
|
||||
|
||||
@@ -5,8 +5,8 @@ set -e
|
||||
|
||||
echo "🔧 Setting up Sim Studio development environment..."
|
||||
|
||||
# Change to the sim directory
|
||||
cd /workspace/sim
|
||||
# Change to the workspace root directory
|
||||
cd /workspace
|
||||
|
||||
# Setup .bashrc
|
||||
echo "📄 Setting up .bashrc with aliases..."
|
||||
@@ -15,27 +15,50 @@ cp /workspace/.devcontainer/.bashrc ~/.bashrc
|
||||
echo 'if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' >> ~/.profile
|
||||
|
||||
# Clean and reinstall dependencies to ensure platform compatibility
|
||||
echo "📦 Cleaning and reinstalling npm dependencies..."
|
||||
echo "📦 Cleaning and reinstalling dependencies..."
|
||||
if [ -d "node_modules" ]; then
|
||||
echo "Removing existing node_modules to ensure platform compatibility..."
|
||||
rm -rf node_modules
|
||||
rm -rf apps/sim/node_modules
|
||||
rm -rf apps/docs/node_modules
|
||||
fi
|
||||
|
||||
# Ensure Bun cache directory exists and has correct permissions
|
||||
mkdir -p ~/.bun/cache
|
||||
chmod 700 ~/.bun ~/.bun/cache
|
||||
|
||||
# Install dependencies with platform-specific binaries
|
||||
npm install || {
|
||||
echo "⚠️ npm install had issues but continuing setup..."
|
||||
echo "Installing dependencies with Bun..."
|
||||
bun install || {
|
||||
echo "⚠️ bun install had issues but continuing setup..."
|
||||
}
|
||||
|
||||
# Set up environment variables if .env doesn't exist
|
||||
if [ ! -f ".env" ]; then
|
||||
# Check for native dependencies
|
||||
echo "Checking for native dependencies compatibility..."
|
||||
NATIVE_DEPS=$(grep '"trustedDependencies"' apps/sim/package.json || echo "")
|
||||
if [ ! -z "$NATIVE_DEPS" ]; then
|
||||
echo "⚠️ Native dependencies detected. Ensuring compatibility with Bun..."
|
||||
for pkg in $(echo $NATIVE_DEPS | grep -oP '"[^"]*"' | tr -d '"' | grep -v "trustedDependencies"); do
|
||||
echo "Checking compatibility for $pkg..."
|
||||
done
|
||||
fi
|
||||
|
||||
# Set up environment variables if .env doesn't exist for the sim app
|
||||
if [ ! -f "apps/sim/.env" ]; then
|
||||
echo "📄 Creating .env file from template..."
|
||||
cp .env.example .env 2>/dev/null || echo "DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio" > .env
|
||||
if [ -f "apps/sim/.env.example" ]; then
|
||||
cp apps/sim/.env.example apps/sim/.env
|
||||
else
|
||||
echo "DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio" > apps/sim/.env
|
||||
fi
|
||||
fi
|
||||
|
||||
# Generate schema and run database migrations
|
||||
echo "🗃️ Running database schema generation and migrations..."
|
||||
echo "Generating schema..."
|
||||
npx drizzle-kit generate
|
||||
cd apps/sim
|
||||
bunx drizzle-kit generate
|
||||
cd ../..
|
||||
|
||||
echo "Waiting for database to be ready..."
|
||||
# Try to connect to the database, but don't fail the script if it doesn't work
|
||||
@@ -44,7 +67,9 @@ echo "Waiting for database to be ready..."
|
||||
while [ $timeout -gt 0 ]; do
|
||||
if PGPASSWORD=postgres psql -h db -U postgres -c '\q' 2>/dev/null; then
|
||||
echo "Database is ready!"
|
||||
DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio npx drizzle-kit push
|
||||
cd apps/sim
|
||||
DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio bunx drizzle-kit push
|
||||
cd ../..
|
||||
break
|
||||
fi
|
||||
echo "Database is unavailable - sleeping (${timeout}s remaining)"
|
||||
@@ -61,13 +86,14 @@ echo "Waiting for database to be ready..."
|
||||
cat << EOF >> ~/.bashrc
|
||||
|
||||
# Additional Sim Studio Development Aliases
|
||||
alias migrate="cd /workspace/sim && DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio npx drizzle-kit push"
|
||||
alias generate="cd /workspace/sim && npx drizzle-kit generate"
|
||||
alias dev="cd /workspace/sim && npm run dev"
|
||||
alias build="cd /workspace/sim && npm run build"
|
||||
alias start="cd /workspace/sim && npm run start"
|
||||
alias lint="cd /workspace/sim && npm run lint"
|
||||
alias test="cd /workspace/sim && npm run test"
|
||||
alias migrate="cd /workspace/apps/sim && DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio bunx drizzle-kit push"
|
||||
alias generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
|
||||
alias dev="cd /workspace && bun run dev"
|
||||
alias build="cd /workspace && bun run build"
|
||||
alias start="cd /workspace && bun run dev"
|
||||
alias lint="cd /workspace/apps/sim && bun run lint"
|
||||
alias test="cd /workspace && bun run test"
|
||||
alias bun-update="cd /workspace && bun update"
|
||||
EOF
|
||||
|
||||
# Source the .bashrc to make aliases available immediately
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
# Exclude files from Docker build
|
||||
.git
|
||||
.github
|
||||
node_modules
|
||||
.next
|
||||
.vercel
|
||||
.husky
|
||||
.env
|
||||
.env.*
|
||||
npm-debug.log
|
||||
LICENSE
|
||||
NOTICE
|
||||
.prettierrc
|
||||
.prettierignore
|
||||
README.md
|
||||
.devcontainer
|
||||
.gitignore
|
||||
.husky
|
||||
.github
|
||||
.devcontainer
|
||||
.env.example
|
||||
node_modules
|
||||
22
.github/CODE_OF_CONDUCT.md
vendored
22
.github/CODE_OF_CONDUCT.md
vendored
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
|
||||
Examples of behaviour that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologising to those affected by our mistakes,
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologising to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
- Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behaviour include:
|
||||
|
||||
* The use of sexualised language or imagery, and sexual attention or advances
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
- The use of sexualised language or imagery, and sexual attention or advances
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
@@ -112,4 +112,4 @@ the community.
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
|
||||
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
|
||||
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
|
||||
and was generated by [contributing.md](https://contributing.md/generator).
|
||||
and was generated by [contributing.md](https://contributing.md/generator).
|
||||
|
||||
158
.github/CONTRIBUTING.md
vendored
158
.github/CONTRIBUTING.md
vendored
@@ -3,7 +3,7 @@
|
||||
Thank you for your interest in contributing to Sim Studio! Our goal is to provide developers with a powerful, user-friendly platform for building, testing, and optimizing agentic workflows. We welcome contributions in all forms—from bug fixes and design improvements to brand-new features.
|
||||
|
||||
> **Project Overview:**
|
||||
> Sim Studio is a monorepo containing the main application (`sim/`) and documentation (`docs/`). The main application is built with Next.js (app router), ReactFlow, Zustand, Shadcn, and Tailwind CSS. Please ensure your contributions follow our best practices for clarity, maintainability, and consistency.
|
||||
> Sim Studio is a monorepo using Turborepo, containing the main application (`apps/sim/`), documentation (`apps/docs/`), and shared packages (`packages/`). The main application is built with Next.js (app router), ReactFlow, Zustand, Shadcn, and Tailwind CSS. Please ensure your contributions follow our best practices for clarity, maintainability, and consistency.
|
||||
|
||||
---
|
||||
|
||||
@@ -130,54 +130,69 @@ Using clear and consistent commit messages makes it easier for everyone to under
|
||||
|
||||
To set up your local development environment:
|
||||
|
||||
### Option 1: Using Docker (Recommended)
|
||||
### Option 1: Using NPM Package (Simplest)
|
||||
|
||||
Docker provides a consistent development environment with all dependencies pre-configured.
|
||||
The easiest way to run Sim Studio locally is using our NPM package:
|
||||
|
||||
1. **Clone the Repository:**
|
||||
```bash
|
||||
npx simstudio
|
||||
```
|
||||
|
||||
```bash
|
||||
git clone https://github.com/<your-username>/sim.git
|
||||
cd sim
|
||||
```
|
||||
After running this command, open [http://localhost:3000/](http://localhost:3000/) in your browser.
|
||||
|
||||
2. **Start the Docker Environment:**
|
||||
#### Options
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
- `-p, --port <port>`: Specify the port to run Sim Studio on (default: 3000)
|
||||
- `--no-pull`: Skip pulling the latest Docker images
|
||||
|
||||
Or use the convenience script which handles environment setup and migrations:
|
||||
#### Requirements
|
||||
|
||||
```bash
|
||||
chmod +x scripts/start_simstudio_docker.sh
|
||||
./scripts/start_simstudio_docker.sh
|
||||
```
|
||||
- Docker must be installed and running on your machine
|
||||
|
||||
This will:
|
||||
### Option 2: Using Docker Compose
|
||||
|
||||
- Start a PostgreSQL database container
|
||||
- Build and run the Next.js application with hot-reloading
|
||||
- Set up all necessary environment variables
|
||||
- Apply database migrations automatically
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/<your-username>/sim.git
|
||||
cd sim
|
||||
|
||||
3. **View Logs:**
|
||||
# Start Sim Studio
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
```bash
|
||||
docker compose logs -f simstudio
|
||||
```
|
||||
Access the application at [http://localhost:3000/](http://localhost:3000/)
|
||||
|
||||
4. **Make Your Changes:**
|
||||
- Edit files in your local directory
|
||||
- Changes will be automatically reflected thanks to hot-reloading
|
||||
#### Using Local Models
|
||||
|
||||
### Option 2: Using VS Code / Cursor Dev Containers
|
||||
To use local models with Sim Studio:
|
||||
|
||||
1. Pull models using our helper script:
|
||||
|
||||
```bash
|
||||
./apps/sim/scripts/ollama_docker.sh pull <model_name>
|
||||
```
|
||||
|
||||
2. Start Sim Studio with local model support:
|
||||
|
||||
```bash
|
||||
# With NVIDIA GPU support
|
||||
docker compose --profile local-gpu -f docker-compose.ollama.yml up -d
|
||||
|
||||
# Without GPU (CPU only)
|
||||
docker compose --profile local-cpu -f docker-compose.ollama.yml up -d
|
||||
|
||||
# If hosting on a server, update the environment variables in the docker-compose.prod.yml file
|
||||
# to include the server's public IP then start again (OLLAMA_URL to i.e. http://1.1.1.1:11434)
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
### Option 3: Using VS Code / Cursor Dev Containers
|
||||
|
||||
Dev Containers provide a consistent and easy-to-use development environment:
|
||||
|
||||
1. **Prerequisites:**
|
||||
|
||||
- Visual Studio Code
|
||||
- Visual Studio Code or Cursor
|
||||
- Docker Desktop
|
||||
- [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for VS Code
|
||||
|
||||
@@ -188,58 +203,53 @@ Dev Containers provide a consistent and easy-to-use development environment:
|
||||
git clone https://github.com/<your-username>/sim.git
|
||||
cd sim
|
||||
```
|
||||
- Open the project in VS Code
|
||||
- Open the project in VS Code/Cursor
|
||||
- When prompted, click "Reopen in Container" (or press F1 and select "Remote-Containers: Reopen in Container")
|
||||
- Wait for the container to build and initialize
|
||||
- The development environment will be set up in the `sim/` directory
|
||||
|
||||
3. **Start Developing:**
|
||||
|
||||
- Run `bun run dev` in the terminal or use the `sim-start` alias
|
||||
- All dependencies and configurations are automatically set up
|
||||
- Use the provided aliases (like `sim-start`) to run common commands
|
||||
- Your changes will be automatically hot-reloaded
|
||||
|
||||
4. **GitHub Codespaces:**
|
||||
- This setup also works with GitHub Codespaces if you prefer development in the browser
|
||||
- Just click "Code" → "Codespaces" → "Create codespace on main"
|
||||
|
||||
### Option 3: Manual Setup
|
||||
### Option 4: Manual Setup
|
||||
|
||||
If you prefer not to use Docker or Dev Containers:
|
||||
|
||||
1. **Clone the Repository:**
|
||||
```bash
|
||||
git clone https://github.com/<your-username>/sim.git
|
||||
cd sim/sim
|
||||
cd sim
|
||||
bun install
|
||||
```
|
||||
2. **Install Dependencies:**
|
||||
|
||||
- Using NPM:
|
||||
2. **Set Up Environment:**
|
||||
|
||||
- Navigate to the app directory:
|
||||
```bash
|
||||
npm install
|
||||
cd apps/sim
|
||||
```
|
||||
|
||||
3. **Set Up Environment:**
|
||||
|
||||
- Copy `.env.example` to `.env`
|
||||
- Configure database connection and other required authentication variables
|
||||
- Configure required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
|
||||
|
||||
4. **Set Up Database:**
|
||||
3. **Set Up Database:**
|
||||
|
||||
- You need a PostgreSQL instance running
|
||||
- Run migrations:
|
||||
```bash
|
||||
npm run db:push
|
||||
```
|
||||
```bash
|
||||
bunx drizzle-kit push
|
||||
```
|
||||
|
||||
5. **Run the Development Server:**
|
||||
4. **Run the Development Server:**
|
||||
|
||||
- With NPM:
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
```bash
|
||||
bun run dev
|
||||
```
|
||||
|
||||
6. **Make Your Changes and Test Locally.**
|
||||
5. **Make Your Changes and Test Locally.**
|
||||
|
||||
### Email Template Development
|
||||
|
||||
@@ -248,7 +258,7 @@ When working on email templates, you can preview them using a local email previe
|
||||
1. **Run the Email Preview Server:**
|
||||
|
||||
```bash
|
||||
npm run email:dev
|
||||
bun run email:dev
|
||||
```
|
||||
|
||||
2. **Access the Preview:**
|
||||
@@ -269,26 +279,26 @@ Sim Studio is built in a modular fashion where blocks and tools extend the platf
|
||||
|
||||
### Where to Add Your Code
|
||||
|
||||
- **Blocks:** Create your new block file under the `/sim/blocks/blocks` directory. The name of the file should match the provider name (e.g., `pinecone.ts`).
|
||||
- **Tools:** Create a new directory under `/sim/tools` with the same name as the provider (e.g., `/sim/tools/pinecone`).
|
||||
- **Blocks:** Create your new block file under the `/apps/sim/blocks/blocks` directory. The name of the file should match the provider name (e.g., `pinecone.ts`).
|
||||
- **Tools:** Create a new directory under `/apps/sim/tools` with the same name as the provider (e.g., `/apps/sim/tools/pinecone`).
|
||||
|
||||
In addition, you will need to update the registries:
|
||||
|
||||
- **Block Registry:** Update the blocks index (`/sim/blocks/index.ts`) to include your new block.
|
||||
- **Tool Registry:** Update the tools registry (`/sim/tools/index.ts`) to add your new tool.
|
||||
- **Block Registry:** Update the blocks index (`/apps/sim/blocks/index.ts`) to include your new block.
|
||||
- **Tool Registry:** Update the tools registry (`/apps/sim/tools/index.ts`) to add your new tool.
|
||||
|
||||
### How to Create a New Block
|
||||
|
||||
1. **Create a New File:**
|
||||
Create a file for your block named after the provider (e.g., `pinecone.ts`) in the `/sim/blocks/blocks` directory.
|
||||
Create a file for your block named after the provider (e.g., `pinecone.ts`) in the `/apps/sim/blocks/blocks` directory.
|
||||
|
||||
2. **Create a New Icon:**
|
||||
Create a new icon for your block in the `/sim/components/icons.tsx` file. The icon should follow the same naming convention as the block (e.g., `PineconeIcon`).
|
||||
Create a new icon for your block in the `/apps/sim/components/icons.tsx` file. The icon should follow the same naming convention as the block (e.g., `PineconeIcon`).
|
||||
|
||||
3. **Define the Block Configuration:**
|
||||
Your block should export a constant of type `BlockConfig`. For example:
|
||||
|
||||
```typescript:/sim/blocks/blocks/pinecone.ts
|
||||
```typescript:/apps/sim/blocks/blocks/pinecone.ts
|
||||
import { PineconeIcon } from '@/components/icons'
|
||||
import { PineconeResponse } from '@/tools/pinecone/types'
|
||||
import { BlockConfig } from '../types'
|
||||
@@ -313,11 +323,11 @@ In addition, you will need to update the registries:
|
||||
```
|
||||
|
||||
4. **Register Your Block:**
|
||||
Add your block to the blocks registry (`/sim/blocks/registry.ts`):
|
||||
Add your block to the blocks registry (`/apps/sim/blocks/registry.ts`):
|
||||
|
||||
```typescript:/sim/blocks/registry.ts
|
||||
```typescript:/apps/sim/blocks/registry.ts
|
||||
import { PineconeBlock } from './blocks/pinecone'
|
||||
|
||||
|
||||
// Registry of all available blocks
|
||||
export const registry: Record<string, BlockConfig> = {
|
||||
// ... existing blocks
|
||||
@@ -333,7 +343,7 @@ In addition, you will need to update the registries:
|
||||
### How to Create a New Tool
|
||||
|
||||
1. **Create a New Directory:**
|
||||
Create a directory under `/sim/tools` with the same name as the provider (e.g., `/sim/tools/pinecone`).
|
||||
Create a directory under `/apps/sim/tools` with the same name as the provider (e.g., `/apps/sim/tools/pinecone`).
|
||||
|
||||
2. **Create Tool Files:**
|
||||
Create separate files for each tool functionality with descriptive names (e.g., `fetch.ts`, `generate_embeddings.ts`, `search_text.ts`) in your tool directory.
|
||||
@@ -344,7 +354,7 @@ In addition, you will need to update the registries:
|
||||
4. **Create an Index File:**
|
||||
Create an `index.ts` file in your tool directory that imports and exports all tools:
|
||||
|
||||
```typescript:/sim/tools/pinecone/index.ts
|
||||
```typescript:/apps/sim/tools/pinecone/index.ts
|
||||
import { fetchTool } from './fetch'
|
||||
import { generateEmbeddingsTool } from './generate_embeddings'
|
||||
import { searchTextTool } from './search_text'
|
||||
@@ -355,7 +365,7 @@ In addition, you will need to update the registries:
|
||||
5. **Define the Tool Configuration:**
|
||||
Your tool should export a constant with a naming convention of `{toolName}Tool`. The tool ID should follow the format `{provider}_{tool_name}`. For example:
|
||||
|
||||
```typescript:/sim/tools/pinecone/fetch.ts
|
||||
```typescript:/apps/sim/tools/pinecone/fetch.ts
|
||||
import { ToolConfig, ToolResponse } from '../types'
|
||||
import { PineconeParams, PineconeResponse } from './types'
|
||||
|
||||
@@ -384,9 +394,9 @@ In addition, you will need to update the registries:
|
||||
```
|
||||
|
||||
6. **Register Your Tool:**
|
||||
Update the tools registry in `/sim/tools/index.ts` to include your new tool:
|
||||
Update the tools registry in `/apps/sim/tools/index.ts` to include your new tool:
|
||||
|
||||
```typescript:/sim/tools/index.ts
|
||||
```typescript:/apps/sim/tools/index.ts
|
||||
import { fetchTool, generateEmbeddingsTool, searchTextTool } from './pinecone'
|
||||
// ... other imports
|
||||
|
||||
@@ -401,6 +411,12 @@ In addition, you will need to update the registries:
|
||||
7. **Test Your Tool:**
|
||||
Ensure that your tool functions correctly by making test requests and verifying the responses.
|
||||
|
||||
8. **Generate Documentation:**
|
||||
Run the documentation generator to create docs for your new tool:
|
||||
```bash
|
||||
./scripts/generate-docs.sh
|
||||
```
|
||||
|
||||
### Naming Conventions
|
||||
|
||||
Maintaining consistent naming across the codebase is critical for auto-generation of tools and documentation. Follow these naming guidelines:
|
||||
|
||||
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG]"
|
||||
title: '[BUG]'
|
||||
labels: bug
|
||||
assignees: ''
|
||||
---
|
||||
@@ -11,6 +11,7 @@ A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
@@ -23,4 +24,4 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
Add any other context about the problem here.
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/feature_request.md
vendored
4
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[REQUEST]"
|
||||
title: '[REQUEST]'
|
||||
labels: feature
|
||||
assignees: ''
|
||||
---
|
||||
@@ -16,4 +16,4 @@ A clear and concise description of what you want to happen.
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -26,7 +26,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi
|
||||
- [ ] I have performed a self-review of my own code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] All tests pass locally and in CI (`npm test`)
|
||||
- [ ] All tests pass locally and in CI (`bun run test`)
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] Any dependent changes have been merged and published in downstream modules
|
||||
- [ ] I have updated version numbers as needed (if needed)
|
||||
|
||||
4
.github/SECURITY.md
vendored
4
.github/SECURITY.md
vendored
@@ -6,7 +6,6 @@
|
||||
| ------- | ------------------ |
|
||||
| 0.1.x | :white_check_mark: |
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
We take the security of Sim Studio seriously. If you believe you've found a security vulnerability, please follow these steps:
|
||||
@@ -16,6 +15,7 @@ We take the security of Sim Studio seriously. If you believe you've found a secu
|
||||
2. **Email us directly** at security@simstudio.ai with details of the vulnerability.
|
||||
|
||||
3. **Include the following information** in your report:
|
||||
|
||||
- Description of the vulnerability
|
||||
- Steps to reproduce
|
||||
- Potential impact
|
||||
@@ -23,4 +23,4 @@ We take the security of Sim Studio seriously. If you believe you've found a secu
|
||||
|
||||
4. We will acknowledge receipt of your vulnerability report within 48 hours and provide an estimated timeline for a fix.
|
||||
|
||||
5. Once the vulnerability is fixed, we will notify you and publicly acknowledge your contribution (unless you prefer to remain anonymous).
|
||||
5. Once the vulnerability is fixed, we will notify you and publicly acknowledge your contribution (unless you prefer to remain anonymous).
|
||||
|
||||
98
.github/dependabot.yml
vendored
98
.github/dependabot.yml
vendored
@@ -1,98 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/sim"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
time: "09:00"
|
||||
# Disable version updates
|
||||
open-pull-requests-limit: 0
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "security"
|
||||
commit-message:
|
||||
prefix: "fix(deps)"
|
||||
prefix-development: "chore(deps)"
|
||||
include: "scope"
|
||||
groups:
|
||||
dependencies:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
# Documentation site dependencies (/docs)
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/docs"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "wednesday"
|
||||
# Disable version updates
|
||||
open-pull-requests-limit: 0
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "security"
|
||||
commit-message:
|
||||
prefix: "docs(deps)"
|
||||
include: "scope"
|
||||
groups:
|
||||
docs-dependencies:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
# Root-level dependencies (if any)
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "friday"
|
||||
# Disable version updates
|
||||
open-pull-requests-limit: 0
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "security"
|
||||
commit-message:
|
||||
prefix: "chore(deps)"
|
||||
include: "scope"
|
||||
groups:
|
||||
root-dependencies:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
# GitHub Actions workflows
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
# Disable version updates
|
||||
open-pull-requests-limit: 0
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "security"
|
||||
commit-message:
|
||||
prefix: "ci(deps)"
|
||||
groups:
|
||||
actions:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
# Docker containers (if applicable)
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
# Disable version updates
|
||||
open-pull-requests-limit: 0
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "security"
|
||||
commit-message:
|
||||
prefix: "docker(deps)"
|
||||
groups:
|
||||
docker:
|
||||
applies-to: security-updates
|
||||
patterns:
|
||||
- "*"
|
||||
66
.github/workflows/build.yml
vendored
Normal file
66
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: Build and Publish Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: ./docker/app.Dockerfile
|
||||
image: ghcr.io/simstudioai/simstudio
|
||||
- dockerfile: ./docker/db.Dockerfile
|
||||
image: ghcr.io/simstudioai/migrations
|
||||
- dockerfile: ./docker/realtime.Dockerfile
|
||||
image: ghcr.io/simstudioai/realtime
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ matrix.image }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}.{{minor}}.{{patch}}
|
||||
type=sha,format=long
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
90
.github/workflows/ci.yml
vendored
90
.github/workflows/ci.yml
vendored
@@ -2,82 +2,76 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [main, staging]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches: [main, staging]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test and Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: './sim/package-lock.json'
|
||||
|
||||
node-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./sim
|
||||
run: npm ci
|
||||
|
||||
- name: Fix Rollup module issue
|
||||
working-directory: ./sim
|
||||
run: |
|
||||
rm -rf node_modules package-lock.json
|
||||
npm install
|
||||
|
||||
run: bun install
|
||||
|
||||
- name: Run tests with coverage
|
||||
working-directory: ./sim
|
||||
env:
|
||||
NODE_OPTIONS: "--no-warnings"
|
||||
run: npm run test:coverage
|
||||
|
||||
NODE_OPTIONS: '--no-warnings'
|
||||
NEXT_PUBLIC_APP_URL: 'https://www.simstudio.ai'
|
||||
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
|
||||
run: bun run test
|
||||
|
||||
- name: Build application
|
||||
working-directory: ./sim
|
||||
env:
|
||||
NODE_OPTIONS: "--no-warnings"
|
||||
NEXT_PUBLIC_APP_URL: "https://www.simstudio.ai"
|
||||
STRIPE_SECRET_KEY: "dummy_key_for_ci_only"
|
||||
STRIPE_WEBHOOK_SECRET: "dummy_secret_for_ci_only"
|
||||
RESEND_API_KEY: "dummy_key_for_ci_only"
|
||||
AWS_REGION: "us-west-2"
|
||||
run: npm run build
|
||||
|
||||
NODE_OPTIONS: '--no-warnings'
|
||||
NEXT_PUBLIC_APP_URL: 'https://www.simstudio.ai'
|
||||
STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
|
||||
STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
|
||||
RESEND_API_KEY: 'dummy_key_for_ci_only'
|
||||
AWS_REGION: 'us-west-2'
|
||||
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
|
||||
run: bun run build
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
directory: ./sim/coverage
|
||||
directory: ./apps/sim/coverage
|
||||
fail_ci_if_error: false
|
||||
verbose: true
|
||||
verbose: true
|
||||
|
||||
migrations:
|
||||
name: Apply Database Migrations
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
|
||||
needs: test
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: './sim/package-lock.json'
|
||||
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./sim
|
||||
run: npm ci
|
||||
|
||||
run: bun install
|
||||
|
||||
- name: Apply migrations
|
||||
working-directory: ./sim
|
||||
working-directory: ./apps/sim
|
||||
env:
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
run: npx drizzle-kit push
|
||||
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
|
||||
run: bunx drizzle-kit push
|
||||
|
||||
58
.github/workflows/publish-cli.yml
vendored
Normal file
58
.github/workflows/publish-cli.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Publish CLI Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/cli/**'
|
||||
|
||||
jobs:
|
||||
publish-npm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Setup Node.js for npm publishing
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
registry-url: 'https://registry.npmjs.org/'
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: packages/cli
|
||||
run: bun install
|
||||
|
||||
- name: Build package
|
||||
working-directory: packages/cli
|
||||
run: bun run build
|
||||
|
||||
- name: Get package version
|
||||
id: package_version
|
||||
working-directory: packages/cli
|
||||
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if version already exists
|
||||
id: version_check
|
||||
run: |
|
||||
if npm view simstudio@${{ steps.package_version.outputs.version }} version &> /dev/null; then
|
||||
echo "exists=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "exists=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Publish to npm
|
||||
if: steps.version_check.outputs.exists == 'false'
|
||||
working-directory: packages/cli
|
||||
run: npm publish --access=public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Log skipped publish
|
||||
if: steps.version_check.outputs.exists == 'true'
|
||||
run: echo "Skipped publishing because version ${{ steps.package_version.outputs.version }} already exists on npm"
|
||||
89
.github/workflows/publish-python-sdk.yml
vendored
Normal file
89
.github/workflows/publish-python-sdk.yml
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
name: Publish Python SDK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/python-sdk/**'
|
||||
|
||||
jobs:
|
||||
publish-pypi:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build twine pytest requests tomli
|
||||
|
||||
- name: Run tests
|
||||
working-directory: packages/python-sdk
|
||||
run: |
|
||||
PYTHONPATH=. pytest tests/ -v
|
||||
|
||||
- name: Get package version
|
||||
id: package_version
|
||||
working-directory: packages/python-sdk
|
||||
run: echo "version=$(python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if version already exists
|
||||
id: version_check
|
||||
run: |
|
||||
if pip index versions simstudio-sdk | grep -q "${{ steps.package_version.outputs.version }}"; then
|
||||
echo "exists=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "exists=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Build package
|
||||
if: steps.version_check.outputs.exists == 'false'
|
||||
working-directory: packages/python-sdk
|
||||
run: python -m build
|
||||
|
||||
- name: Check package
|
||||
if: steps.version_check.outputs.exists == 'false'
|
||||
working-directory: packages/python-sdk
|
||||
run: twine check dist/*
|
||||
|
||||
- name: Publish to PyPI
|
||||
if: steps.version_check.outputs.exists == 'false'
|
||||
working-directory: packages/python-sdk
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: twine upload dist/*
|
||||
|
||||
- name: Log skipped publish
|
||||
if: steps.version_check.outputs.exists == 'true'
|
||||
run: echo "Skipped publishing because version ${{ steps.package_version.outputs.version }} already exists on PyPI"
|
||||
|
||||
- name: Create GitHub Release
|
||||
if: steps.version_check.outputs.exists == 'false'
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: python-sdk-v${{ steps.package_version.outputs.version }}
|
||||
name: Python SDK v${{ steps.package_version.outputs.version }}
|
||||
body: |
|
||||
## Python SDK v${{ steps.package_version.outputs.version }}
|
||||
|
||||
Published simstudio-sdk==${{ steps.package_version.outputs.version }} to PyPI.
|
||||
|
||||
### Installation
|
||||
```bash
|
||||
pip install simstudio-sdk==${{ steps.package_version.outputs.version }}
|
||||
```
|
||||
|
||||
### Documentation
|
||||
See the [README](https://github.com/simstudio/sim/tree/main/packages/python-sdk) for usage instructions.
|
||||
draft: false
|
||||
prerelease: false
|
||||
85
.github/workflows/publish-ts-sdk.yml
vendored
Normal file
85
.github/workflows/publish-ts-sdk.yml
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
name: Publish TypeScript SDK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/ts-sdk/**'
|
||||
|
||||
jobs:
|
||||
publish-npm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Setup Node.js for npm publishing
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
registry-url: 'https://registry.npmjs.org/'
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: packages/ts-sdk
|
||||
run: bun install
|
||||
|
||||
- name: Run tests
|
||||
working-directory: packages/ts-sdk
|
||||
run: bun run test
|
||||
|
||||
- name: Build package
|
||||
working-directory: packages/ts-sdk
|
||||
run: bun run build
|
||||
|
||||
- name: Get package version
|
||||
id: package_version
|
||||
working-directory: packages/ts-sdk
|
||||
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if version already exists
|
||||
id: version_check
|
||||
run: |
|
||||
if npm view simstudio-ts-sdk@${{ steps.package_version.outputs.version }} version &> /dev/null; then
|
||||
echo "exists=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "exists=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Publish to npm
|
||||
if: steps.version_check.outputs.exists == 'false'
|
||||
working-directory: packages/ts-sdk
|
||||
run: npm publish --access=public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Log skipped publish
|
||||
if: steps.version_check.outputs.exists == 'true'
|
||||
run: echo "Skipped publishing because version ${{ steps.package_version.outputs.version }} already exists on npm"
|
||||
|
||||
- name: Create GitHub Release
|
||||
if: steps.version_check.outputs.exists == 'false'
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: typescript-sdk-v${{ steps.package_version.outputs.version }}
|
||||
name: TypeScript SDK v${{ steps.package_version.outputs.version }}
|
||||
body: |
|
||||
## TypeScript SDK v${{ steps.package_version.outputs.version }}
|
||||
|
||||
Published simstudio-ts-sdk@${{ steps.package_version.outputs.version }} to npm.
|
||||
|
||||
### Installation
|
||||
```bash
|
||||
npm install simstudio-ts-sdk@${{ steps.package_version.outputs.version }}
|
||||
```
|
||||
|
||||
### Documentation
|
||||
See the [README](https://github.com/simstudio/sim/tree/main/packages/ts-sdk) for usage instructions.
|
||||
draft: false
|
||||
prerelease: false
|
||||
46
.gitignore
vendored
46
.gitignore
vendored
@@ -1,28 +1,23 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
*/node_modules
|
||||
docs/node_modules
|
||||
/node_modules
|
||||
/apps/**/node_modules
|
||||
/packages/**/node_modules
|
||||
/.pnp
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/versions
|
||||
/scripts/node_modules
|
||||
|
||||
# bun specific
|
||||
bun-debug.log*
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
/apps/**/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
sim/.next/
|
||||
sim/out/
|
||||
sim/build
|
||||
docs/.next/
|
||||
docs/out/
|
||||
docs/build
|
||||
/apps/**/out/
|
||||
/apps/**/.next/
|
||||
/apps/**/build
|
||||
|
||||
# production
|
||||
/build
|
||||
@@ -35,12 +30,6 @@ sim-standalone.tar.gz
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# env files
|
||||
.env
|
||||
*.env
|
||||
@@ -60,17 +49,20 @@ next-env.d.ts
|
||||
.cursorrules
|
||||
|
||||
# docs
|
||||
docs/.source
|
||||
docs/.contentlayer
|
||||
docs/.content-collections
|
||||
/apps/docs/.source
|
||||
/apps/docs/.contentlayer
|
||||
/apps/docs/.content-collections
|
||||
|
||||
# database instantiation
|
||||
**/postgres_data/
|
||||
|
||||
# file uploads
|
||||
uploads/
|
||||
|
||||
# collector configuration
|
||||
collector-config.yaml
|
||||
docker-compose.collector.yml
|
||||
start-collector.sh
|
||||
|
||||
# Turborepo
|
||||
.turbo
|
||||
|
||||
# VSCode
|
||||
.vscode
|
||||
@@ -1 +1 @@
|
||||
cd sim && npx lint-staged
|
||||
bun lint
|
||||
21
Dockerfile
21
Dockerfile
@@ -1,21 +0,0 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the entire sim directory
|
||||
COPY sim/ ./
|
||||
|
||||
# Create the .env file if it doesn't exist
|
||||
RUN touch .env
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Generate database schema
|
||||
RUN npx drizzle-kit generate
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# Run migrations and start the app
|
||||
CMD npx drizzle-kit push && npm run dev
|
||||
218
README.md
218
README.md
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="sim/public/static/sim.png" alt="Sim Studio Logo" width="500"/>
|
||||
<img src="apps/sim/public/static/sim.png" alt="Sim Studio Logo" width="500"/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -14,171 +14,135 @@
|
||||
<strong>Sim Studio</strong> is a lightweight, user-friendly platform for building AI agent workflows.
|
||||
</p>
|
||||
|
||||
## Run
|
||||
<p align="center">
|
||||
<img src="apps/sim/public/static/demo.gif" alt="Sim Studio Demo" width="800"/>
|
||||
</p>
|
||||
|
||||
1. Run on our [cloud-hosted version](https://simstudio.ai)
|
||||
2. Self-host
|
||||
## Getting Started
|
||||
|
||||
## How to Self-Host
|
||||
1. Use our [cloud-hosted version](https://simstudio.ai)
|
||||
2. Self-host using one of the methods below
|
||||
|
||||
There are several ways to self-host Sim Studio:
|
||||
## Self-Hosting Options
|
||||
|
||||
### Option 1: Docker Environment (Recommended)
|
||||
### Option 1: NPM Package (Simplest)
|
||||
|
||||
The easiest way to run Sim Studio locally is using our [NPM package](https://www.npmjs.com/package/simstudio?activeTab=readme):
|
||||
|
||||
```bash
|
||||
# Clone your forked repository
|
||||
git clone https://github.com/YOUR_USERNAME/sim.git
|
||||
cd sim
|
||||
|
||||
# Create environment file and update with required environment variables (BETTER_AUTH_SECRET)
|
||||
cp sim/.env.example sim/.env
|
||||
|
||||
# Start Sim Studio using the provided script
|
||||
docker compose up -d --build
|
||||
|
||||
or
|
||||
|
||||
./start_simstudio_docker.sh
|
||||
npx simstudio
|
||||
```
|
||||
|
||||
After running these commands:
|
||||
After running these commands, open [http://localhost:3000/](http://localhost:3000/) in your browser.
|
||||
|
||||
1. **Access the Application**:
|
||||
#### Options
|
||||
|
||||
- Open [http://localhost:3000/w/](http://localhost:3000/w/) in your browser
|
||||
- The `/w/` path is where the main workspace interface is located
|
||||
- `-p, --port <port>`: Specify the port to run Sim Studio on (default: 3000)
|
||||
- `--no-pull`: Skip pulling the latest Docker images
|
||||
|
||||
2. **Useful Docker Commands**:
|
||||
#### Requirements
|
||||
|
||||
```bash
|
||||
# View application logs
|
||||
docker compose logs -f simstudio
|
||||
- Docker must be installed and running on your machine
|
||||
|
||||
# Access PostgreSQL database
|
||||
docker compose exec db psql -U postgres -d simstudio
|
||||
|
||||
# Stop the environment
|
||||
docker compose down
|
||||
|
||||
# Rebuild and restart (after code changes)
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
#### Working with Local Models
|
||||
|
||||
To use local models with Sim Studio, follow these steps:
|
||||
|
||||
1. **Pull Local Models**
|
||||
|
||||
```bash
|
||||
# Run the ollama_docker.sh script to pull the required models
|
||||
./sim/scripts/ollama_docker.sh pull <model_name>
|
||||
```
|
||||
|
||||
2. **Start Sim Studio with Local Models**
|
||||
|
||||
```bash
|
||||
#Start Sim Studio with local model support
|
||||
./start_simstudio_docker.sh --local
|
||||
|
||||
# or
|
||||
|
||||
# Start Sim Studio with local model support if you have nvidia GPU
|
||||
docker compose up --profile local-gpu -d --build
|
||||
|
||||
# or
|
||||
|
||||
# Start Sim Studio with local model support if you don't have nvidia GPU
|
||||
docker compose up --profile local-cpu -d --build
|
||||
```
|
||||
|
||||
The application will now be configured to use your local models. You can access it at [http://localhost:3000/w/](http://localhost:3000/w/).
|
||||
|
||||
#### Connecting to Existing Ollama Instance
|
||||
|
||||
If you already have an Ollama instance running on your host machine, you can connect to it using one of these methods:
|
||||
|
||||
```bash
|
||||
# Method 1: Use host networking (simplest approach)
|
||||
docker compose up --profile local-cpu -d --build --network=host
|
||||
```
|
||||
|
||||
Or modify your docker-compose.yml:
|
||||
|
||||
```yaml
|
||||
# Method 2: Add host.docker.internal mapping
|
||||
services:
|
||||
simstudio:
|
||||
# ... existing configuration ...
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
environment:
|
||||
- OLLAMA_HOST=http://host.docker.internal:11434
|
||||
```
|
||||
|
||||
### Option 2: Dev Containers
|
||||
|
||||
1. Open VS Code or your favorite VS Code fork (Cursor, Windsurf, etc.)
|
||||
2. Install the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
|
||||
3. Open the project in your editor
|
||||
4. Click "Reopen in Container" when prompted
|
||||
5. The environment will automatically be set up in the `sim` directory
|
||||
6. Run `npm run dev` in the terminal or use the `sim-start` alias
|
||||
|
||||
### Option 3: Manual Setup
|
||||
|
||||
1. **Install Dependencies**
|
||||
### Option 2: Docker Compose
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/YOUR_USERNAME/sim.git
|
||||
cd sim/sim
|
||||
git clone https://github.com/simstudioai/sim.git
|
||||
|
||||
# Install dependencies
|
||||
npm install
|
||||
# Navigate to the project directory
|
||||
cd sim
|
||||
|
||||
# Start Sim Studio
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
2. **Set Up Environment**
|
||||
Access the application at [http://localhost:3000/](http://localhost:3000/)
|
||||
|
||||
#### Using Local Models
|
||||
|
||||
To use local models with Sim Studio:
|
||||
|
||||
1. Pull models using our helper script:
|
||||
|
||||
```bash
|
||||
# Copy .env.example to .env
|
||||
cp .env.example .env
|
||||
|
||||
# Configure your .env file with the required environment variables:
|
||||
# - Database connection (PostgreSQL)
|
||||
# - Authentication settings (Better-Auth Secret)
|
||||
./apps/sim/scripts/ollama_docker.sh pull <model_name>
|
||||
```
|
||||
|
||||
⚠️ **Important Notes:**
|
||||
- If `RESEND_API_KEY` is not set, verification codes for login/signup will be logged to the console.
|
||||
- You can use these logged codes for testing authentication locally.
|
||||
- For production environments, you should set up a proper email provider.
|
||||
|
||||
3. **Set Up Database**
|
||||
2. Start Sim Studio with local model support:
|
||||
|
||||
```bash
|
||||
# Push the database schema
|
||||
npx drizzle-kit push
|
||||
# With NVIDIA GPU support
|
||||
docker compose --profile local-gpu -f docker-compose.ollama.yml up -d
|
||||
|
||||
# Without GPU (CPU only)
|
||||
docker compose --profile local-cpu -f docker-compose.ollama.yml up -d
|
||||
|
||||
# If hosting on a server, update the environment variables in the docker-compose.prod.yml file to include the server's public IP then start again (OLLAMA_URL to i.e. http://1.1.1.1:11434)
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
4. **Start Development Server**
|
||||
### Option 3: Dev Containers
|
||||
|
||||
1. Open VS Code with the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
|
||||
2. Open the project and click "Reopen in Container" when prompted
|
||||
3. Run `bun run dev:full` in the terminal or use the `sim-start` alias
|
||||
|
||||
### Option 4: Manual Setup
|
||||
|
||||
1. Clone and install dependencies:
|
||||
|
||||
```bash
|
||||
# Start the development server
|
||||
npm run dev
|
||||
git clone https://github.com/simstudioai/sim.git
|
||||
cd sim
|
||||
bun install
|
||||
```
|
||||
|
||||
5. **Open [http://localhost:3000](http://localhost:3000) in your browser**
|
||||
2. 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:
|
||||
|
||||
```bash
|
||||
bunx drizzle-kit push
|
||||
```
|
||||
|
||||
4. Start the development servers:
|
||||
|
||||
Next.js app:
|
||||
|
||||
```bash
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Start the realtime server:
|
||||
|
||||
```bash
|
||||
bun run dev:sockets
|
||||
```
|
||||
|
||||
Run both together (recommended):
|
||||
|
||||
```bash
|
||||
bun run dev:full
|
||||
```
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **Framework**: [Next.js](https://nextjs.org/) (App Router)
|
||||
- **Runtime**: [Bun](https://bun.sh/)
|
||||
- **Database**: PostgreSQL with [Drizzle ORM](https://orm.drizzle.team)
|
||||
- **Authentication**: [Better Auth](https://better-auth.com)
|
||||
- **UI**: [Shadcn](https://ui.shadcn.com/), [Tailwind CSS](https://tailwindcss.com)
|
||||
- **State Management**: [Zustand](https://zustand-demo.pmnd.rs/)
|
||||
- **Flow Editor**: [ReactFlow](https://reactflow.dev/)
|
||||
- **Docs**: [Fumadocs](https://fumadocs.vercel.app/)
|
||||
- **Monorepo**: [Turborepo](https://turborepo.org/)
|
||||
- **Realtime**: [Socket.io](https://socket.io/)
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -188,6 +152,4 @@ We welcome contributions! Please see our [Contributing Guide](.github/CONTRIBUTI
|
||||
|
||||
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
##
|
||||
|
||||
<p align="center">Made with ❤️ by the Sim Studio Team</p>
|
||||
<p align="center">Made with ❤️ by the Sim Studio Team</p>
|
||||
39
apps/docs/.gitignore
vendored
Normal file
39
apps/docs/.gitignore
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# bun specific
|
||||
.bun
|
||||
bun.lockb
|
||||
bun-debug.log*
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# env files
|
||||
.env
|
||||
*.env
|
||||
.env.local
|
||||
.env.development
|
||||
.env.test
|
||||
.env.production
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
# Fumadocs
|
||||
/.source/
|
||||
@@ -6,11 +6,7 @@ This is a Next.js application generated with
|
||||
Run development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
yarn dev
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Open http://localhost:3000 with your browser to see the result.
|
||||
@@ -24,3 +20,4 @@ resources:
|
||||
features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
|
||||
- [Bun Documentation](https://bun.sh/docs) - learn about Bun features and API
|
||||
5
apps/docs/app/(docs)/[[...slug]]/layout.tsx
Normal file
5
apps/docs/app/(docs)/[[...slug]]/layout.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
export default function SlugLayout({ children }: { children: ReactNode }) {
|
||||
return children
|
||||
}
|
||||
@@ -1,18 +1,11 @@
|
||||
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
|
||||
import { notFound } from 'next/navigation'
|
||||
import {
|
||||
DocsBody,
|
||||
DocsDescription,
|
||||
DocsPage,
|
||||
DocsTitle,
|
||||
} from 'fumadocs-ui/page'
|
||||
import { source } from '@/lib/source'
|
||||
import mdxComponents from '@/components/mdx-components'
|
||||
import { source } from '@/lib/source'
|
||||
|
||||
export const dynamic = 'force-static'
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export default async function Page(props: {
|
||||
params: Promise<{ slug?: string[] }>
|
||||
}) {
|
||||
export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
|
||||
const params = await props.params
|
||||
const page = source.getPage(params.slug)
|
||||
if (!page) notFound()
|
||||
@@ -26,7 +19,7 @@ export default async function Page(props: {
|
||||
tableOfContent={{
|
||||
style: 'clerk',
|
||||
enabled: true,
|
||||
header: <div className="mb-2 text-sm font-medium">On this page</div>,
|
||||
header: <div className='mb-2 font-medium text-sm'>On this page</div>,
|
||||
single: false,
|
||||
}}
|
||||
article={{
|
||||
@@ -53,9 +46,7 @@ export async function generateStaticParams() {
|
||||
return source.generateParams()
|
||||
}
|
||||
|
||||
export async function generateMetadata(props: {
|
||||
params: Promise<{ slug?: string[] }>
|
||||
}) {
|
||||
export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) {
|
||||
const params = await props.params
|
||||
const page = source.getPage(params.slug)
|
||||
if (!page) notFound()
|
||||
@@ -1,18 +1,18 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
|
||||
import { GithubIcon, ExternalLink } from 'lucide-react'
|
||||
import { ExternalLink, GithubIcon } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import { source } from '@/lib/source'
|
||||
|
||||
const GitHubLink = () => (
|
||||
<div className="fixed bottom-4 right-4 z-50">
|
||||
<div className='fixed right-4 bottom-4 z-50'>
|
||||
<Link
|
||||
href="https://github.com/simstudioai/sim"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex items-center justify-center w-8 h-8 rounded-full bg-background border border-border hover:bg-muted transition-colors"
|
||||
href='https://github.com/simstudioai/sim'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background transition-colors hover:bg-muted'
|
||||
>
|
||||
<GithubIcon className="h-4 w-4" />
|
||||
<GithubIcon className='h-4 w-4' />
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
@@ -23,15 +23,13 @@ export default function Layout({ children }: { children: ReactNode }) {
|
||||
<DocsLayout
|
||||
tree={source.pageTree}
|
||||
nav={{
|
||||
title: (
|
||||
<div className="flex items-center font-medium">Sim Studio</div>
|
||||
),
|
||||
title: <div className='flex items-center font-medium'>Sim Studio</div>,
|
||||
}}
|
||||
links={[
|
||||
{
|
||||
text: 'Visit Sim Studio',
|
||||
url: 'https://simstudio.ai',
|
||||
icon: <ExternalLink className="h-4 w-4" />,
|
||||
icon: <ExternalLink className='h-4 w-4' />,
|
||||
},
|
||||
]}
|
||||
sidebar={{
|
||||
18
apps/docs/app/global.css
Normal file
18
apps/docs/app/global.css
Normal file
@@ -0,0 +1,18 @@
|
||||
@import "tailwindcss";
|
||||
@import "fumadocs-ui/css/neutral.css";
|
||||
@import "fumadocs-ui/css/preset.css";
|
||||
:root {
|
||||
--color-fd-primary: #802fff; /* Purple from control-bar component */
|
||||
}
|
||||
|
||||
/* Custom text highlighting styles */
|
||||
.text-highlight {
|
||||
color: var(--color-fd-primary);
|
||||
}
|
||||
|
||||
/* Override marker color for highlighted lists */
|
||||
.highlight-markers li::marker {
|
||||
color: var(--color-fd-primary);
|
||||
}
|
||||
|
||||
@source '../node_modules/fumadocs-ui/dist/**/*.js';
|
||||
@@ -11,11 +11,11 @@ export const baseOptions: BaseLayoutProps = {
|
||||
nav: {
|
||||
title: (
|
||||
<>
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" aria-label="Logo">
|
||||
<circle cx={12} cy={12} r={12} fill="currentColor" />
|
||||
<svg width='24' height='24' xmlns='http://www.w3.org/2000/svg' aria-label='Logo'>
|
||||
<circle cx={12} cy={12} r={12} fill='currentColor' />
|
||||
</svg>
|
||||
My App
|
||||
</>
|
||||
),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { Inter } from 'next/font/google'
|
||||
import { RootProvider } from 'fumadocs-ui/provider'
|
||||
import { Inter } from 'next/font/google'
|
||||
import './global.css'
|
||||
import { Analytics } from '@vercel/analytics/next'
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ['latin'],
|
||||
@@ -9,9 +10,12 @@ const inter = Inter({
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en" className={inter.className} suppressHydrationWarning>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
<RootProvider>{children}</RootProvider>
|
||||
<html lang='en' className={inter.className} suppressHydrationWarning>
|
||||
<body className='flex min-h-screen flex-col'>
|
||||
<RootProvider>
|
||||
{children}
|
||||
<Analytics />
|
||||
</RootProvider>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
18
apps/docs/app/llms.mdx/[[...slug]]/route.ts
Normal file
18
apps/docs/app/llms.mdx/[[...slug]]/route.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { notFound } from 'next/navigation'
|
||||
import { type NextRequest, NextResponse } from 'next/server'
|
||||
import { getLLMText } from '@/lib/llms'
|
||||
import { source } from '@/lib/source'
|
||||
|
||||
export const revalidate = false
|
||||
|
||||
export async function GET(_req: NextRequest, { params }: { params: Promise<{ slug?: string[] }> }) {
|
||||
const { slug } = await params
|
||||
const page = source.getPage(slug)
|
||||
if (!page) notFound()
|
||||
|
||||
return new NextResponse(await getLLMText(page))
|
||||
}
|
||||
|
||||
export function generateStaticParams() {
|
||||
return source.generateParams()
|
||||
}
|
||||
12
apps/docs/app/llms.txt/route.ts
Normal file
12
apps/docs/app/llms.txt/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { getLLMText } from '@/lib/llms'
|
||||
import { source } from '@/lib/source'
|
||||
|
||||
// cached forever
|
||||
export const revalidate = false
|
||||
|
||||
export async function GET() {
|
||||
const scan = source.getPages().map(getLLMText)
|
||||
const scanned = await Promise.all(scan)
|
||||
|
||||
return new Response(scanned.join('\n\n'))
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@ import { ThemeImage } from './ui/theme-image'
|
||||
// Extend the default MDX components with our custom components
|
||||
const mdxComponents = {
|
||||
...defaultMdxComponents,
|
||||
ThemeImage
|
||||
ThemeImage,
|
||||
}
|
||||
|
||||
export default mdxComponents
|
||||
export default mdxComponents
|
||||
@@ -1,31 +1,31 @@
|
||||
'use client'
|
||||
|
||||
import * as React from 'react'
|
||||
import type * as React from 'react'
|
||||
|
||||
interface BlockInfoCardProps {
|
||||
type: string;
|
||||
color: string;
|
||||
icon?: boolean;
|
||||
iconSvg?: string;
|
||||
type: string
|
||||
color: string
|
||||
icon?: boolean
|
||||
iconSvg?: string
|
||||
}
|
||||
|
||||
export function BlockInfoCard({
|
||||
type,
|
||||
color,
|
||||
export function BlockInfoCard({
|
||||
type,
|
||||
color,
|
||||
icon = false,
|
||||
iconSvg
|
||||
iconSvg,
|
||||
}: BlockInfoCardProps): React.ReactNode {
|
||||
return (
|
||||
<div className="mb-6 rounded-lg overflow-hidden border border-border">
|
||||
<div className="flex items-center justify-center p-6">
|
||||
<div
|
||||
className="h-20 w-20 rounded-lg flex items-center justify-center"
|
||||
<div className='mb-6 overflow-hidden rounded-lg border border-border'>
|
||||
<div className='flex items-center justify-center p-6'>
|
||||
<div
|
||||
className='flex h-20 w-20 items-center justify-center rounded-lg'
|
||||
style={{ backgroundColor: color }}
|
||||
>
|
||||
{iconSvg ? (
|
||||
<div className="w-10 h-10 text-white" dangerouslySetInnerHTML={{ __html: iconSvg }} />
|
||||
<div className='h-10 w-10 text-white' dangerouslySetInnerHTML={{ __html: iconSvg }} />
|
||||
) : (
|
||||
<div className="text-xl font-mono opacity-70">{type.substring(0, 2)}</div>
|
||||
<div className='font-mono text-xl opacity-70'>{type.substring(0, 2)}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,4 +41,4 @@ export function BlockInfoCard({
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,13 @@
|
||||
import { cn } from '@/lib/utils'
|
||||
import { AgentIcon, ApiIcon, ChartBarIcon, CodeIcon, ConditionalIcon, ConnectIcon } from '../icons'
|
||||
import {
|
||||
AgentIcon,
|
||||
ApiIcon,
|
||||
ChartBarIcon,
|
||||
CodeIcon,
|
||||
ConditionalIcon,
|
||||
ConnectIcon,
|
||||
ResponseIcon,
|
||||
} from '../icons'
|
||||
|
||||
// Custom Feature component specifically for BlockTypes to handle the 6-item layout
|
||||
const BlockFeature = ({
|
||||
@@ -20,34 +28,46 @@ const BlockFeature = ({
|
||||
itemsPerRow: number
|
||||
}) => {
|
||||
const blockColor = {
|
||||
'--block-color': title === 'Agent' ? '#8b5cf6' :
|
||||
title === 'API' ? '#3b82f6' :
|
||||
title === 'Condition' ? '#f59e0b' :
|
||||
title === 'Function' ? '#10b981' :
|
||||
title === 'Router' ? '#6366f1' :
|
||||
title === 'Evaluator' ? '#ef4444' : '#8b5cf6'
|
||||
'--block-color':
|
||||
title === 'Agent'
|
||||
? '#8b5cf6'
|
||||
: title === 'API'
|
||||
? '#3b82f6'
|
||||
: title === 'Condition'
|
||||
? '#f59e0b'
|
||||
: title === 'Function'
|
||||
? '#10b981'
|
||||
: title === 'Router'
|
||||
? '#6366f1'
|
||||
: title === 'Evaluator'
|
||||
? '#ef4444'
|
||||
: '#8b5cf6',
|
||||
} as React.CSSProperties
|
||||
|
||||
|
||||
const content = (
|
||||
<>
|
||||
{index < itemsPerRow && (
|
||||
<div className="opacity-0 group-hover/feature:opacity-100 transition duration-200 absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 dark:from-neutral-800 to-transparent pointer-events-none" />
|
||||
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
|
||||
)}
|
||||
{index >= itemsPerRow && (
|
||||
<div className="opacity-0 group-hover/feature:opacity-100 transition duration-200 absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 dark:from-neutral-800 to-transparent pointer-events-none" />
|
||||
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
|
||||
)}
|
||||
<div className="mb-4 relative z-10 px-10 text-neutral-500 group-hover/feature:text-[color:var(--block-color,#8b5cf6)] dark:text-neutral-400 dark:group-hover/feature:text-[color:var(--block-color,#a78bfa)] transition-colors duration-200"
|
||||
<div
|
||||
className='relative z-10 mb-4 px-10 text-neutral-500 transition-colors duration-200 group-hover/feature:text-[color:var(--block-color,#8b5cf6)] dark:text-neutral-400 dark:group-hover/feature:text-[color:var(--block-color,#a78bfa)]'
|
||||
style={blockColor}
|
||||
>
|
||||
{icon}
|
||||
</div>
|
||||
<div className="text-lg font-bold mb-2 relative z-10 px-10">
|
||||
<div className="absolute left-0 inset-y-0 h-6 group-hover/feature:h-8 w-1 rounded-tr-full rounded-br-full bg-neutral-300 dark:bg-neutral-700 group-hover/feature:bg-[color:var(--block-color,#8b5cf6)] transition-all duration-200 origin-center" style={blockColor} />
|
||||
<span className="group-hover/feature:translate-x-2 transition duration-200 inline-block text-neutral-800 dark:text-neutral-100">
|
||||
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
|
||||
<div
|
||||
className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-[color:var(--block-color,#8b5cf6)] dark:bg-neutral-700'
|
||||
style={blockColor}
|
||||
/>
|
||||
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
|
||||
{title}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-sm text-neutral-600 dark:text-neutral-300 max-w-xs relative z-10 px-10">
|
||||
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
|
||||
{description}
|
||||
</p>
|
||||
</>
|
||||
@@ -77,51 +97,58 @@ export function BlockTypes() {
|
||||
title: 'Agent',
|
||||
description:
|
||||
'Create powerful AI agents using any LLM provider with customizable system prompts and tool integrations.',
|
||||
icon: <AgentIcon className="w-6 h-6" />,
|
||||
icon: <AgentIcon className='h-6 w-6' />,
|
||||
href: '/blocks/agent',
|
||||
},
|
||||
{
|
||||
title: 'API',
|
||||
description:
|
||||
'Connect to any external API with support for all standard HTTP methods and customizable request parameters.',
|
||||
icon: <ApiIcon className="w-6 h-6" />,
|
||||
icon: <ApiIcon className='h-6 w-6' />,
|
||||
href: '/blocks/api',
|
||||
},
|
||||
{
|
||||
title: 'Condition',
|
||||
description:
|
||||
'Add a condition to the workflow to branch the execution path based on a boolean expression.',
|
||||
icon: <ConditionalIcon className="w-6 h-6" />,
|
||||
icon: <ConditionalIcon className='h-6 w-6' />,
|
||||
href: '/blocks/condition',
|
||||
},
|
||||
{
|
||||
title: 'Function',
|
||||
description:
|
||||
'Execute custom JavaScript or TypeScript code within your workflow to transform data or implement complex logic.',
|
||||
icon: <CodeIcon className="w-6 h-6" />,
|
||||
icon: <CodeIcon className='h-6 w-6' />,
|
||||
href: '/blocks/function',
|
||||
},
|
||||
{
|
||||
title: 'Router',
|
||||
description:
|
||||
'Intelligently direct workflow execution to different paths based on input analysis.',
|
||||
icon: <ConnectIcon className="w-6 h-6" />,
|
||||
icon: <ConnectIcon className='h-6 w-6' />,
|
||||
href: '/blocks/router',
|
||||
},
|
||||
{
|
||||
title: 'Evaluator',
|
||||
description:
|
||||
'Assess content using customizable evaluation metrics and scoring criteria across multiple dimensions.',
|
||||
icon: <ChartBarIcon className="w-6 h-6" />,
|
||||
icon: <ChartBarIcon className='h-6 w-6' />,
|
||||
href: '/blocks/evaluator',
|
||||
},
|
||||
{
|
||||
title: 'Response',
|
||||
description:
|
||||
'Send a response back to the caller with customizable data, status, and headers.',
|
||||
icon: <ResponseIcon className='h-6 w-6' />,
|
||||
href: '/blocks/response',
|
||||
},
|
||||
]
|
||||
|
||||
const totalItems = features.length
|
||||
const itemsPerRow = 3 // For large screens
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 relative z-10 py-10 max-w-7xl mx-auto">
|
||||
<div className='relative z-10 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-3'>
|
||||
{features.map((feature, index) => (
|
||||
<BlockFeature
|
||||
key={feature.title}
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
IconAdjustmentsBolt,
|
||||
IconCloud,
|
||||
IconHistory,
|
||||
IconEaseInOut,
|
||||
IconHeart,
|
||||
IconHelp,
|
||||
IconHistory,
|
||||
IconRouteAltLeft,
|
||||
IconTerminal2,
|
||||
} from '@tabler/icons-react'
|
||||
@@ -14,8 +14,7 @@ export function Features() {
|
||||
const features = [
|
||||
{
|
||||
title: 'Multi-LLM Support',
|
||||
description:
|
||||
'Connect to any LLM provider including OpenAI, Anthropic, and more',
|
||||
description: 'Connect to any LLM provider including OpenAI, Anthropic, and more',
|
||||
icon: <IconCloud />,
|
||||
},
|
||||
{
|
||||
@@ -55,7 +54,7 @@ export function Features() {
|
||||
},
|
||||
]
|
||||
return (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 relative z-20 py-10 max-w-7xl mx-auto">
|
||||
<div className='relative z-20 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-4'>
|
||||
{features.map((feature, index) => (
|
||||
<Feature key={feature.title} {...feature} index={index} />
|
||||
))}
|
||||
@@ -77,27 +76,25 @@ export const Feature = ({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'flex flex-col lg:border-r py-5 relative group/feature dark:border-neutral-800',
|
||||
'group/feature relative flex flex-col py-5 lg:border-r dark:border-neutral-800',
|
||||
(index === 0 || index === 4) && 'lg:border-l dark:border-neutral-800',
|
||||
index < 4 && 'lg:border-b dark:border-neutral-800'
|
||||
)}
|
||||
>
|
||||
{index < 4 && (
|
||||
<div className="opacity-0 group-hover/feature:opacity-100 transition duration-200 absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 dark:from-neutral-800 to-transparent pointer-events-none" />
|
||||
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
|
||||
)}
|
||||
{index >= 4 && (
|
||||
<div className="opacity-0 group-hover/feature:opacity-100 transition duration-200 absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 dark:from-neutral-800 to-transparent pointer-events-none" />
|
||||
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
|
||||
)}
|
||||
<div className="mb-4 relative z-10 px-10 text-neutral-600 dark:text-neutral-400">
|
||||
{icon}
|
||||
</div>
|
||||
<div className="text-lg font-bold mb-2 relative z-10 px-10">
|
||||
<div className="absolute left-0 inset-y-0 h-6 group-hover/feature:h-8 w-1 rounded-tr-full rounded-br-full bg-neutral-300 dark:bg-neutral-700 group-hover/feature:bg-purple-500 transition-all duration-200 origin-center" />
|
||||
<span className="group-hover/feature:translate-x-2 transition duration-200 inline-block text-neutral-800 dark:text-neutral-100">
|
||||
<div className='relative z-10 mb-4 px-10 text-neutral-600 dark:text-neutral-400'>{icon}</div>
|
||||
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
|
||||
<div className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-purple-500 dark:bg-neutral-700' />
|
||||
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
|
||||
{title}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-sm text-neutral-600 dark:text-neutral-300 max-w-xs relative z-10 px-10">
|
||||
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
|
||||
{description}
|
||||
</p>
|
||||
</div>
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client'
|
||||
|
||||
import { useTheme } from 'next-themes'
|
||||
import Image from 'next/image'
|
||||
import { useEffect, useState } from 'react'
|
||||
import Image from 'next/image'
|
||||
import { useTheme } from 'next-themes'
|
||||
|
||||
interface ThemeImageProps {
|
||||
lightSrc: string
|
||||
@@ -13,13 +13,13 @@ interface ThemeImageProps {
|
||||
className?: string
|
||||
}
|
||||
|
||||
export function ThemeImage({
|
||||
lightSrc,
|
||||
darkSrc,
|
||||
alt,
|
||||
width = 600,
|
||||
export function ThemeImage({
|
||||
lightSrc,
|
||||
darkSrc,
|
||||
alt,
|
||||
width = 600,
|
||||
height = 400,
|
||||
className = 'rounded-lg border border-border my-6'
|
||||
className = 'rounded-lg border border-border my-6',
|
||||
}: ThemeImageProps) {
|
||||
const { resolvedTheme } = useTheme()
|
||||
const [imageSrc, setImageSrc] = useState(lightSrc)
|
||||
@@ -41,14 +41,8 @@ export function ThemeImage({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src={imageSrc}
|
||||
alt={alt}
|
||||
width={width}
|
||||
height={height}
|
||||
className={className}
|
||||
/>
|
||||
<div className='flex justify-center'>
|
||||
<Image src={imageSrc} alt={alt} width={width} height={height} className={className} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -4,22 +4,23 @@ description: Create powerful AI agents using any LLM provider
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Agent block is a fundamental component in Sim Studio that allows you to create powerful AI agents using various LLM providers. These agents can process inputs based on customizable system prompts and utilize integrated tools to enhance their capabilities.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/agent-light.png"
|
||||
darkSrc="/static/dark/agent-dark.png"
|
||||
alt="Agent Block"
|
||||
width={300}
|
||||
height={175}
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/agent-light.png"
|
||||
darkSrc="/static/dark/agent-dark.png"
|
||||
alt="Agent Block"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
<Callout type="info">
|
||||
Agent blocks serve as interfaces to Large Language Models, enabling your workflow to leverage state-of-the-art AI capabilities.
|
||||
Agent blocks serve as interfaces to Large Language Models, enabling your workflow to leverage
|
||||
state-of-the-art AI capabilities.
|
||||
</Callout>
|
||||
|
||||
## Overview
|
||||
@@ -28,10 +29,12 @@ The Agent block serves as an interface to Large Language Models (LLMs), enabling
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Respond to user inputs</strong>: Generate natural language responses based on provided inputs
|
||||
<strong>Respond to user inputs</strong>: Generate natural language responses based on provided
|
||||
inputs
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Follow instructions</strong>: Adhere to specific instructions defined in the system prompt
|
||||
<strong>Follow instructions</strong>: Adhere to specific instructions defined in the system
|
||||
prompt
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Use specialized tools</strong>: Interact with integrated tools to extend capabilities
|
||||
@@ -65,7 +68,7 @@ The user prompt or context is the specific input or question that the agent shou
|
||||
|
||||
Choose from a variety of LLM providers:
|
||||
|
||||
- OpenAI (GPT-4o, o1, o3, o4-mini)
|
||||
- OpenAI (GPT-4o, o1, o3, o4-mini, gpt-4.1)
|
||||
- Anthropic (Claude 3.7 Sonnet)
|
||||
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
|
||||
- Groq, Cerebras
|
||||
@@ -78,17 +81,28 @@ Control the creativity and randomness of responses:
|
||||
|
||||
<Tabs items={['Low (0-0.3)', 'Medium (0.3-0.7)', 'High (0.7-2.0)']}>
|
||||
<Tab>
|
||||
<p>More deterministic, focused responses. Best for factual tasks, customer support, and situations where accuracy is critical.</p>
|
||||
<p>
|
||||
More deterministic, focused responses. Best for factual tasks, customer support, and
|
||||
situations where accuracy is critical.
|
||||
</p>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<p>Balanced creativity and focus. Suitable for general purpose applications that require both accuracy and some creativity.</p>
|
||||
<p>
|
||||
Balanced creativity and focus. Suitable for general purpose applications that require both
|
||||
accuracy and some creativity.
|
||||
</p>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<p>More creative, varied responses. Ideal for creative writing, brainstorming, and generating diverse ideas.</p>
|
||||
<p>
|
||||
More creative, varied responses. Ideal for creative writing, brainstorming, and generating
|
||||
diverse ideas.
|
||||
</p>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">The temperature range (0-1 or 0-2) varies depending on the selected model.</p>
|
||||
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
The temperature range (0-1 or 0-2) varies depending on the selected model.
|
||||
</p>
|
||||
|
||||
### API Key
|
||||
|
||||
@@ -102,12 +116,12 @@ Integrate specialized tools to enhance the agent's capabilities. You can add too
|
||||
2. Selecting from the tools dropdown menu
|
||||
3. Choosing an existing tool or creating a new one
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/tooldropdown-light.png"
|
||||
darkSrc="/static/dark/tooldropdown-dark.png"
|
||||
alt="Tools Dropdown"
|
||||
width={150}
|
||||
height={125}
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/tooldropdown-light.png"
|
||||
darkSrc="/static/dark/tooldropdown-dark.png"
|
||||
alt="Tools Dropdown"
|
||||
width={150}
|
||||
height={125}
|
||||
/>
|
||||
|
||||
Available tools include:
|
||||
@@ -122,7 +136,8 @@ Available tools include:
|
||||
You can also create custom tools to meet specific requirements for your agent's capabilities.
|
||||
|
||||
<Callout type="info">
|
||||
Tools significantly expand what your agent can do, allowing it to access external systems, retrieve information, and take actions beyond simple text generation.
|
||||
Tools significantly expand what your agent can do, allowing it to access external systems,
|
||||
retrieve information, and take actions beyond simple text generation.
|
||||
</Callout>
|
||||
|
||||
### Response Format
|
||||
@@ -133,20 +148,38 @@ Define a structured format for the agent's response when needed, using JSON or o
|
||||
|
||||
<Tabs items={['Inputs', 'Outputs']}>
|
||||
<Tab>
|
||||
<ul className="list-disc pl-6 space-y-2">
|
||||
<li><strong>User Prompt</strong>: The user's query or context for the agent</li>
|
||||
<li><strong>System Prompt</strong>: Instructions for the agent (optional)</li>
|
||||
<li><strong>Tools</strong>: Optional tool connections that the agent can use</li>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>User Prompt</strong>: The user's query or context for the agent
|
||||
</li>
|
||||
<li>
|
||||
<strong>System Prompt</strong>: Instructions for the agent (optional)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Tools</strong>: Optional tool connections that the agent can use
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<ul className="list-disc pl-6 space-y-2">
|
||||
<li><strong>Content</strong>: The agent's response text</li>
|
||||
<li><strong>Model</strong>: The model used for generation</li>
|
||||
<li><strong>Tokens</strong>: Usage statistics (prompt, completion, total)</li>
|
||||
<li><strong>Tool Calls</strong>: Details of any tools used during processing</li>
|
||||
<li><strong>Cost</strong>: Cost of the response</li>
|
||||
<li><strong>Usage</strong>: Usage statistics (prompt, completion, total)</li>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Content</strong>: The agent's response text
|
||||
</li>
|
||||
<li>
|
||||
<strong>Model</strong>: The model used for generation
|
||||
</li>
|
||||
<li>
|
||||
<strong>Tokens</strong>: Usage statistics (prompt, completion, total)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Tool Calls</strong>: Details of any tools used during processing
|
||||
</li>
|
||||
<li>
|
||||
<strong>Cost</strong>: Cost of the response
|
||||
</li>
|
||||
<li>
|
||||
<strong>Usage</strong>: Usage statistics (prompt, completion, total)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
@@ -176,4 +209,4 @@ tools:
|
||||
- **Be specific in system prompts**: Clearly define the agent's role, tone, and limitations. The more specific your instructions are, the better the agent will be able to fulfill its intended purpose.
|
||||
- **Choose the right temperature setting**: Use lower temperature settings (0-0.3) when accuracy is important, or increase temperature (0.7-2.0) for more creative or varied responses
|
||||
- **Combine with Evaluator blocks**: Use Evaluator blocks to assess agent responses and ensure quality. This allows you to create feedback loops and implement quality control measures.
|
||||
- **Leverage tools effectively**: Integrate tools that complement the agent's purpose and enhance its capabilities. Be selective about which tools you provide to avoid overwhelming the agent.
|
||||
- **Leverage tools effectively**: Integrate tools that complement the agent's purpose and enhance its capabilities. Be selective about which tools you provide to avoid overwhelming the agent.
|
||||
@@ -4,18 +4,18 @@ description: Connect to external services through API endpoints
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The API block enables you to connect your workflow to external services through HTTP requests. It supports various methods like GET, POST, PUT, DELETE, and PATCH, allowing you to interact with virtually any API endpoint.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/api-light.png"
|
||||
darkSrc="/static/dark/api-dark.png"
|
||||
alt="API Block"
|
||||
width={300}
|
||||
height={175}
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/api-light.png"
|
||||
darkSrc="/static/dark/api-dark.png"
|
||||
alt="API Block"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
## Overview
|
||||
@@ -125,4 +125,4 @@ headers:
|
||||
- **Handle errors gracefully**: Connect error handling logic for failed requests
|
||||
- **Validate responses**: Check status codes and response formats before processing data
|
||||
- **Respect rate limits**: Be mindful of API rate limits and implement appropriate throttling
|
||||
- **Cache responses when appropriate**: For frequently accessed data that doesn't change often
|
||||
- **Cache responses when appropriate**: For frequently accessed data that doesn't change often
|
||||
@@ -4,53 +4,54 @@ description: Create conditional logic and branching in your workflows
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Files, Folder, File } from 'fumadocs-ui/components/files'
|
||||
import { File, Files, Folder } from 'fumadocs-ui/components/files'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Condition block allows you to branch your workflow execution path based on boolean expressions. It evaluates conditions and routes the workflow accordingly, enabling you to create dynamic, responsive workflows with different execution paths.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/condition-light.png"
|
||||
darkSrc="/static/dark/condition-dark.png"
|
||||
alt="Condition Block"
|
||||
width={300}
|
||||
height={175}
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/condition-light.png"
|
||||
darkSrc="/static/dark/condition-dark.png"
|
||||
alt="Condition Block"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
<Callout>
|
||||
Condition blocks enable deterministic decision-making without requiring an LLM, making them ideal for straightforward branching logic.
|
||||
Condition blocks enable deterministic decision-making without requiring an LLM, making them ideal
|
||||
for straightforward branching logic.
|
||||
</Callout>
|
||||
|
||||
## Overview
|
||||
|
||||
The Condition block serves as a decision point in your workflow, enabling:
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 my-6">
|
||||
<div className="border border-gray-200 dark:border-gray-800 rounded-lg p-4">
|
||||
<h3 className="font-medium text-lg mb-2">Branching Logic</h3>
|
||||
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
|
||||
<h3 className="mb-2 text-lg font-medium">Branching Logic</h3>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
Create different execution paths based on specific conditions
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border border-gray-200 dark:border-gray-800 rounded-lg p-4">
|
||||
<h3 className="font-medium text-lg mb-2">Rule-Based Routing</h3>
|
||||
|
||||
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
|
||||
<h3 className="mb-2 text-lg font-medium">Rule-Based Routing</h3>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
Route workflows deterministically without needing an LLM
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border border-gray-200 dark:border-gray-800 rounded-lg p-4">
|
||||
<h3 className="font-medium text-lg mb-2">Data-Driven Decisions</h3>
|
||||
|
||||
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
|
||||
<h3 className="mb-2 text-lg font-medium">Data-Driven Decisions</h3>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
Create workflow paths based on structured data values
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border border-gray-200 dark:border-gray-800 rounded-lg p-4">
|
||||
<h3 className="font-medium text-lg mb-2">If-Then-Else Logic</h3>
|
||||
|
||||
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
|
||||
<h3 className="mb-2 text-lg font-medium">If-Then-Else Logic</h3>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
Implement conditional programming paradigms in your workflows
|
||||
</div>
|
||||
@@ -117,17 +118,29 @@ Conditions use JavaScript syntax and can reference input values from previous bl
|
||||
|
||||
<Tabs items={['Inputs', 'Outputs']}>
|
||||
<Tab>
|
||||
<ul className="list-disc pl-6 space-y-2">
|
||||
<li><strong>Variables</strong>: Values from previous blocks that can be referenced in conditions</li>
|
||||
<li><strong>Conditions</strong>: Boolean expressions to evaluate</li>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Variables</strong>: Values from previous blocks that can be referenced in conditions
|
||||
</li>
|
||||
<li>
|
||||
<strong>Conditions</strong>: Boolean expressions to evaluate
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<ul className="list-disc pl-6 space-y-2">
|
||||
<li><strong>Content</strong>: A description of the evaluation result</li>
|
||||
<li><strong>Condition Result</strong>: The boolean result of the condition evaluation</li>
|
||||
<li><strong>Selected Path</strong>: Details of the chosen routing destination</li>
|
||||
<li><strong>Selected Condition ID</strong>: Identifier of the condition that was matched</li>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Content</strong>: A description of the evaluation result
|
||||
</li>
|
||||
<li>
|
||||
<strong>Condition Result</strong>: The boolean result of the condition evaluation
|
||||
</li>
|
||||
<li>
|
||||
<strong>Selected Path</strong>: Details of the chosen routing destination
|
||||
</li>
|
||||
<li>
|
||||
<strong>Selected Condition ID</strong>: Identifier of the condition that was matched
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
@@ -139,20 +152,20 @@ Here's an example of how a Condition block might be used in a customer satisfact
|
||||
```yaml
|
||||
# Example Condition Configuration
|
||||
conditions:
|
||||
- id: "high_satisfaction"
|
||||
expression: "input.satisfactionScore >= 8"
|
||||
description: "Customer is highly satisfied"
|
||||
path: "positive_feedback_block"
|
||||
|
||||
- id: "medium_satisfaction"
|
||||
expression: "input.satisfactionScore >= 5"
|
||||
description: "Customer is moderately satisfied"
|
||||
path: "neutral_feedback_block"
|
||||
|
||||
- id: "default"
|
||||
expression: "true"
|
||||
description: "Customer is not satisfied"
|
||||
path: "improvement_feedback_block"
|
||||
- id: 'high_satisfaction'
|
||||
expression: 'input.satisfactionScore >= 8'
|
||||
description: 'Customer is highly satisfied'
|
||||
path: 'positive_feedback_block'
|
||||
|
||||
- id: 'medium_satisfaction'
|
||||
expression: 'input.satisfactionScore >= 5'
|
||||
description: 'Customer is moderately satisfied'
|
||||
path: 'neutral_feedback_block'
|
||||
|
||||
- id: 'default'
|
||||
expression: 'true'
|
||||
description: 'Customer is not satisfied'
|
||||
path: 'improvement_feedback_block'
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
@@ -175,4 +188,4 @@ Add descriptions to explain the purpose of each condition. This helps other team
|
||||
|
||||
### Test edge cases
|
||||
|
||||
Ensure your conditions handle boundary values correctly. Test with values at the edges of your condition ranges to verify correct behavior.
|
||||
Ensure your conditions handle boundary values correctly. Test with values at the edges of your condition ranges to verify correct behavior.
|
||||
@@ -4,18 +4,18 @@ description: Assess content quality using customizable evaluation metrics
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Evaluator block allows you to assess the quality of content using customizable evaluation metrics. This is particularly useful for evaluating AI-generated text, ensuring outputs meet specific criteria, and building quality-control mechanisms into your workflows.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/evaluator-light.png"
|
||||
darkSrc="/static/dark/evaluator-dark.png"
|
||||
alt="Evaluator Block"
|
||||
width={300}
|
||||
height={175}
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/evaluator-light.png"
|
||||
darkSrc="/static/dark/evaluator-dark.png"
|
||||
alt="Evaluator Block"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
## Overview
|
||||
@@ -57,7 +57,7 @@ The content to be evaluated. This can be:
|
||||
|
||||
Choose an LLM provider to perform the evaluation:
|
||||
|
||||
- OpenAI (GPT-4o, o1, o3, o4-mini)
|
||||
- OpenAI (GPT-4o, o1, o3, , gpt-4.1)
|
||||
- Anthropic (Claude 3.7 Sonnet)
|
||||
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
|
||||
- Groq, Cerebras
|
||||
@@ -102,7 +102,7 @@ Here's an example of how an Evaluator block might be configured for assessing cu
|
||||
metrics:
|
||||
- name: Empathy
|
||||
description: How well does the response acknowledge and address the customer's emotional state?
|
||||
range:
|
||||
range:
|
||||
min: 1
|
||||
max: 5
|
||||
- name: Solution
|
||||
@@ -125,4 +125,4 @@ model: Anthropic/claude-3-opus
|
||||
- **Choose appropriate ranges**: Select scoring ranges that provide enough granularity without being overly complex
|
||||
- **Connect with Agent blocks**: Use Evaluator blocks to assess Agent block outputs and create feedback loops
|
||||
- **Use consistent metrics**: For comparative analysis, maintain consistent metrics across similar evaluations
|
||||
- **Combine multiple metrics**: Use several metrics to get a comprehensive evaluation
|
||||
- **Combine multiple metrics**: Use several metrics to get a comprehensive evaluation
|
||||
@@ -4,18 +4,18 @@ description: Execute custom JavaScript or TypeScript code in your workflows
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Function block allows you to write and execute custom JavaScript or TypeScript code directly within your workflow. This powerful feature enables you to implement complex logic, data transformations, and integration with external libraries.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/function-light.png"
|
||||
darkSrc="/static/dark/function-dark.png"
|
||||
alt="Function Block"
|
||||
width={300}
|
||||
height={175}
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/function-light.png"
|
||||
darkSrc="/static/dark/function-dark.png"
|
||||
alt="Function Block"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
## Overview
|
||||
@@ -134,4 +134,4 @@ return {
|
||||
- **Handle errors gracefully**: Use try/catch blocks to handle potential errors
|
||||
- **Document your code**: Add comments to explain complex logic
|
||||
- **Test edge cases**: Ensure your code handles unusual inputs correctly
|
||||
- **Optimize for performance**: Be mindful of computational complexity for large datasets
|
||||
- **Optimize for performance**: Be mindful of computational complexity for large datasets
|
||||
@@ -4,8 +4,8 @@ description: Building blocks for your agentic workflows
|
||||
---
|
||||
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { BlockTypes } from '@/components/ui/block-types'
|
||||
|
||||
Blocks are the fundamental building components of Sim Studio workflows. Each block has a specific purpose and can be connected to other blocks to create sophisticated workflows.
|
||||
@@ -26,13 +26,16 @@ Blocks can be connected to form a directed graph representing your workflow. Eac
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Outputs to Inputs</strong>: A block's outputs can be connected to another block's inputs.
|
||||
<strong>Outputs to Inputs</strong>: A block's outputs can be connected to another block's
|
||||
inputs.
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Multiple Connections</strong>: A block can have multiple incoming and outgoing connections.
|
||||
<strong>Multiple Connections</strong>: A block can have multiple incoming and outgoing
|
||||
connections.
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Conditional Flows</strong>: Some blocks (like Router and Condition) can have multiple output paths based on conditions.
|
||||
<strong>Conditional Flows</strong>: Some blocks (like Router and Condition) can have multiple
|
||||
output paths based on conditions.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -48,4 +51,4 @@ Each block type has its own configuration options allowing you to customize its
|
||||
- **Retry policies**: Configure how the block handles failures
|
||||
- **Error handling behavior**: Define how errors are managed and reported
|
||||
|
||||
See the specific documentation for each block type to learn about its configuration options.
|
||||
See the specific documentation for each block type to learn about its configuration options.
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"title": "Blocks",
|
||||
"pages": ["agent", "api", "condition", "function", "evaluator", "router"]
|
||||
"pages": ["agent", "api", "condition", "function", "evaluator", "router", "response", "workflow"]
|
||||
}
|
||||
188
apps/docs/content/docs/blocks/response.mdx
Normal file
188
apps/docs/content/docs/blocks/response.mdx
Normal file
@@ -0,0 +1,188 @@
|
||||
---
|
||||
title: Response
|
||||
description: Send a structured response back to API calls
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Response block is the final component in API-enabled workflows that transforms your workflow's variables into a structured HTTP response. This block serves as the endpoint that returns data, status codes, and headers back to API callers.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/response-light.png"
|
||||
darkSrc="/static/dark/response-dark.png"
|
||||
alt="Response Block"
|
||||
width={430}
|
||||
height={784}
|
||||
/>
|
||||
|
||||
<Callout type="info">
|
||||
Response blocks are terminal blocks - they mark the end of a workflow execution and cannot have further connections.
|
||||
</Callout>
|
||||
|
||||
## Overview
|
||||
|
||||
The Response block serves as the final output mechanism for API workflows, enabling you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Return structured data</strong>: Transform workflow variables into JSON responses
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Set HTTP status codes</strong>: Control the response status (200, 400, 500, etc.)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Configure headers</strong>: Add custom HTTP headers to the response
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Reference variables</strong>: Use workflow variables dynamically in the response
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### Response Data
|
||||
|
||||
The response data is the main content that will be sent back to the API caller. This should be formatted as JSON and can include:
|
||||
|
||||
- Static values
|
||||
- Dynamic references to workflow variables using the `<variable.name>` syntax
|
||||
- Nested objects and arrays
|
||||
- Any valid JSON structure
|
||||
|
||||
### Status Code
|
||||
|
||||
Set the HTTP status code for the response. Common status codes include:
|
||||
|
||||
<Tabs items={['Success (2xx)', 'Client Error (4xx)', 'Server Error (5xx)']}>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li><strong>200</strong>: OK - Standard success response</li>
|
||||
<li><strong>201</strong>: Created - Resource successfully created</li>
|
||||
<li><strong>204</strong>: No Content - Success with no response body</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li><strong>400</strong>: Bad Request - Invalid request parameters</li>
|
||||
<li><strong>401</strong>: Unauthorized - Authentication required</li>
|
||||
<li><strong>404</strong>: Not Found - Resource doesn't exist</li>
|
||||
<li><strong>422</strong>: Unprocessable Entity - Validation errors</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li><strong>500</strong>: Internal Server Error - Server-side error</li>
|
||||
<li><strong>502</strong>: Bad Gateway - External service error</li>
|
||||
<li><strong>503</strong>: Service Unavailable - Service temporarily down</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
Default status code is 200 if not specified.
|
||||
</p>
|
||||
|
||||
### Response Headers
|
||||
|
||||
Configure additional HTTP headers to include in the response.
|
||||
|
||||
Headers are configured as key-value pairs:
|
||||
|
||||
| Key | Value |
|
||||
|-----|-------|
|
||||
| Content-Type | application/json |
|
||||
| Cache-Control | no-cache |
|
||||
| X-API-Version | 1.0 |
|
||||
|
||||
## Inputs and Outputs
|
||||
|
||||
<Tabs items={['Inputs', 'Outputs']}>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>data</strong> (JSON, optional): The JSON data to send in the response body
|
||||
</li>
|
||||
<li>
|
||||
<strong>status</strong> (number, optional): HTTP status code (default: 200)
|
||||
</li>
|
||||
<li>
|
||||
<strong>headers</strong> (JSON, optional): Additional response headers
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>response</strong>: Complete response object containing:
|
||||
<ul className="list-disc space-y-1 pl-6 mt-2">
|
||||
<li><strong>data</strong>: The response body data</li>
|
||||
<li><strong>status</strong>: HTTP status code</li>
|
||||
<li><strong>headers</strong>: Response headers</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Variable References
|
||||
|
||||
Use the `<variable.name>` syntax to dynamically insert workflow variables into your response:
|
||||
|
||||
```json
|
||||
{
|
||||
"user": {
|
||||
"id": "<variable.userId>",
|
||||
"name": "<variable.userName>",
|
||||
"email": "<variable.userEmail>"
|
||||
},
|
||||
"query": "<variable.searchQuery>",
|
||||
"results": "<variable.searchResults>",
|
||||
"totalFound": "<variable.resultCount>",
|
||||
"processingTime": "<variable.executionTime>ms"
|
||||
}
|
||||
```
|
||||
|
||||
<Callout type="warning">
|
||||
Variable names are case-sensitive and must match exactly with the variables available in your workflow.
|
||||
</Callout>
|
||||
|
||||
## Example Usage
|
||||
|
||||
Here's an example of how a Response block might be configured for a user search API:
|
||||
|
||||
```yaml
|
||||
data: |
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"users": "<variable.searchResults>",
|
||||
"pagination": {
|
||||
"page": "<variable.currentPage>",
|
||||
"limit": "<variable.pageSize>",
|
||||
"total": "<variable.totalUsers>"
|
||||
}
|
||||
},
|
||||
"query": {
|
||||
"searchTerm": "<variable.searchTerm>",
|
||||
"filters": "<variable.appliedFilters>"
|
||||
},
|
||||
"timestamp": "<variable.timestamp>"
|
||||
}
|
||||
status: 200
|
||||
headers:
|
||||
- key: X-Total-Count
|
||||
value: <variable.totalUsers>
|
||||
- key: Cache-Control
|
||||
value: public, max-age=300
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Use meaningful status codes**: Choose appropriate HTTP status codes that accurately reflect the outcome of the workflow
|
||||
- **Structure your responses consistently**: Maintain a consistent JSON structure across all your API endpoints for better developer experience
|
||||
- **Include relevant metadata**: Add timestamps and version information to help with debugging and monitoring
|
||||
- **Handle errors gracefully**: Use conditional logic in your workflow to set appropriate error responses with descriptive messages
|
||||
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes
|
||||
@@ -4,19 +4,18 @@ description: Route workflow execution based on specific conditions or logic
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Router block is a powerful component in Sim Studio that intelligently routes workflow execution based on content analysis, user input, or predefined conditions. It acts as a decision-making junction in your workflow, directing the flow to different paths based on various criteria.
|
||||
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/router-light.png"
|
||||
darkSrc="/static/dark/router-dark.png"
|
||||
alt="Router Block"
|
||||
width={300}
|
||||
height={175}
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/router-light.png"
|
||||
darkSrc="/static/dark/router-dark.png"
|
||||
alt="Router Block"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
## Overview
|
||||
@@ -104,6 +103,7 @@ model: OpenAI/gpt-4
|
||||
```
|
||||
|
||||
In this example, the Router might be connected to:
|
||||
|
||||
- A product support block
|
||||
- A billing inquiries block
|
||||
- A technical support block
|
||||
@@ -117,4 +117,4 @@ Based on the user's query, the Router would analyze the content and direct it to
|
||||
- **Use specific routing criteria**: Define clear conditions for selecting each path
|
||||
- **Consider fallback paths**: Connect a default destination for when no specific path is appropriate
|
||||
- **Test with diverse inputs**: Ensure the Router handles various input types correctly
|
||||
- **Review routing decisions**: Monitor the Router's performance and refine as needed
|
||||
- **Review routing decisions**: Monitor the Router's performance and refine as needed
|
||||
231
apps/docs/content/docs/blocks/workflow.mdx
Normal file
231
apps/docs/content/docs/blocks/workflow.mdx
Normal file
@@ -0,0 +1,231 @@
|
||||
---
|
||||
title: Workflow
|
||||
description: Execute other workflows as reusable components within your current workflow
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Workflow block allows you to execute other workflows as reusable components within your current workflow. This powerful feature enables modular design, code reuse, and the creation of complex nested workflows that can be composed from smaller, focused workflows.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/workflow-light.png"
|
||||
darkSrc="/static/dark/workflow-dark.png"
|
||||
alt="Workflow Block"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
<Callout type="info">
|
||||
Workflow blocks enable modular design by allowing you to compose complex workflows from smaller, reusable components.
|
||||
</Callout>
|
||||
|
||||
## Overview
|
||||
|
||||
The Workflow block serves as a bridge between workflows, enabling you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Reuse existing workflows</strong>: Execute previously created workflows as components within new workflows
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Create modular designs</strong>: Break down complex processes into smaller, manageable workflows
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Maintain separation of concerns</strong>: Keep different business logic isolated in separate workflows
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Enable team collaboration</strong>: Share and reuse workflows across different projects and team members
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## How It Works
|
||||
|
||||
The Workflow block:
|
||||
|
||||
1. Takes a reference to another workflow in your workspace
|
||||
2. Passes input data from the current workflow to the child workflow
|
||||
3. Executes the child workflow in an isolated context
|
||||
4. Returns the results back to the parent workflow for further processing
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### Workflow Selection
|
||||
|
||||
Choose which workflow to execute from a dropdown list of available workflows in your workspace. The list includes:
|
||||
|
||||
- All workflows you have access to in the current workspace
|
||||
- Workflows shared with you by other team members
|
||||
- Both enabled and disabled workflows (though only enabled workflows can be executed)
|
||||
|
||||
### Input Data
|
||||
|
||||
Define the data to pass to the child workflow:
|
||||
|
||||
- **Single Variable Input**: Select a variable or block output to pass to the child workflow
|
||||
- **Variable References**: Use `<variable.name>` to reference workflow variables
|
||||
- **Block References**: Use `<blockName.response.field>` to reference outputs from previous blocks
|
||||
- **Automatic Mapping**: The selected data is automatically available as `start.response.input` in the child workflow
|
||||
- **Optional**: The input field is optional - child workflows can run without input data
|
||||
- **Type Preservation**: Variable types (strings, numbers, objects, etc.) are preserved when passed to the child workflow
|
||||
|
||||
### Examples of Input References
|
||||
|
||||
- `<variable.customerData>` - Pass a workflow variable
|
||||
- `<dataProcessor.response.result>` - Pass the result from a previous block
|
||||
- `<start.response.input>` - Pass the original workflow input
|
||||
- `<apiCall.response.data.user>` - Pass a specific field from an API response
|
||||
|
||||
### Execution Context
|
||||
|
||||
The child workflow executes with:
|
||||
|
||||
- Its own isolated execution context
|
||||
- Access to the same workspace resources (API keys, environment variables)
|
||||
- Proper workspace membership and permission checks
|
||||
- Independent logging and monitoring
|
||||
|
||||
## Safety and Limitations
|
||||
|
||||
To prevent infinite recursion and ensure system stability, the Workflow block includes several safety mechanisms:
|
||||
|
||||
<Callout type="warning">
|
||||
**Cycle Detection**: The system automatically detects and prevents circular dependencies between workflows to avoid infinite loops.
|
||||
</Callout>
|
||||
|
||||
- **Maximum Depth Limit**: Nested workflows are limited to a maximum depth of 10 levels
|
||||
- **Cycle Detection**: Automatic detection and prevention of circular workflow dependencies
|
||||
- **Timeout Protection**: Child workflows inherit timeout settings to prevent indefinite execution
|
||||
- **Resource Limits**: Memory and execution time limits apply to prevent resource exhaustion
|
||||
|
||||
## Inputs and Outputs
|
||||
|
||||
<Tabs items={['Inputs', 'Outputs']}>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Workflow ID</strong>: The identifier of the workflow to execute
|
||||
</li>
|
||||
<li>
|
||||
<strong>Input Variable</strong>: Variable or block reference to pass to the child workflow (e.g., `<variable.name>` or `<block.response.field>`)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Response</strong>: The complete output from the child workflow execution
|
||||
</li>
|
||||
<li>
|
||||
<strong>Child Workflow Name</strong>: The name of the executed child workflow
|
||||
</li>
|
||||
<li>
|
||||
<strong>Success Status</strong>: Boolean indicating whether the child workflow completed successfully
|
||||
</li>
|
||||
<li>
|
||||
<strong>Error Information</strong>: Details about any errors that occurred during execution
|
||||
</li>
|
||||
<li>
|
||||
<strong>Execution Metadata</strong>: Information about execution time, resource usage, and performance
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Example Usage
|
||||
|
||||
Here's an example of how a Workflow block might be used to create a modular customer onboarding process:
|
||||
|
||||
### Parent Workflow: Customer Onboarding
|
||||
```yaml
|
||||
# Main customer onboarding workflow
|
||||
blocks:
|
||||
- type: workflow
|
||||
name: "Validate Customer Data"
|
||||
workflowId: "customer-validation-workflow"
|
||||
input: "<variable.newCustomer>"
|
||||
|
||||
- type: workflow
|
||||
name: "Setup Customer Account"
|
||||
workflowId: "account-setup-workflow"
|
||||
input: "<Validate Customer Data.response.result>"
|
||||
|
||||
- type: workflow
|
||||
name: "Send Welcome Email"
|
||||
workflowId: "welcome-email-workflow"
|
||||
input: "<Setup Customer Account.response.result.accountDetails>"
|
||||
```
|
||||
|
||||
### Child Workflow: Customer Validation
|
||||
```yaml
|
||||
# Reusable customer validation workflow
|
||||
# Access the input data using: start.response.input
|
||||
blocks:
|
||||
- type: function
|
||||
name: "Validate Email"
|
||||
code: |
|
||||
const customerData = start.response.input;
|
||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
return emailRegex.test(customerData.email);
|
||||
|
||||
- type: api
|
||||
name: "Check Credit Score"
|
||||
url: "https://api.creditcheck.com/score"
|
||||
method: "POST"
|
||||
body: "<start.response.input>"
|
||||
```
|
||||
|
||||
### Variable Reference Examples
|
||||
|
||||
```yaml
|
||||
# Using workflow variables
|
||||
input: "<variable.customerInfo>"
|
||||
|
||||
# Using block outputs
|
||||
input: "<dataProcessor.response.cleanedData>"
|
||||
|
||||
# Using nested object properties
|
||||
input: "<apiCall.response.data.user.profile>"
|
||||
|
||||
# Using array elements (if supported by the resolver)
|
||||
input: "<listProcessor.response.items[0]>"
|
||||
```
|
||||
|
||||
## Access Control and Permissions
|
||||
|
||||
The Workflow block respects workspace permissions and access controls:
|
||||
|
||||
- **Workspace Membership**: Only workflows within the same workspace can be executed
|
||||
- **Permission Inheritance**: Child workflows inherit the execution permissions of the parent workflow
|
||||
- **API Key Access**: Child workflows have access to the same API keys and environment variables as the parent
|
||||
- **User Context**: The execution maintains the original user context for audit and logging purposes
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Keep workflows focused**: Design child workflows to handle specific, well-defined tasks
|
||||
- **Minimize nesting depth**: Avoid deeply nested workflow hierarchies for better maintainability
|
||||
- **Handle errors gracefully**: Implement proper error handling for child workflow failures
|
||||
- **Document dependencies**: Clearly document which workflows depend on others
|
||||
- **Version control**: Consider versioning strategies for workflows that are used as components
|
||||
- **Test independently**: Ensure child workflows can be tested and validated independently
|
||||
- **Monitor performance**: Be aware that nested workflows can impact overall execution time
|
||||
|
||||
## Common Patterns
|
||||
|
||||
### Microservice Architecture
|
||||
Break down complex business processes into smaller, focused workflows that can be developed and maintained independently.
|
||||
|
||||
### Reusable Components
|
||||
Create library workflows for common operations like data validation, email sending, or API integrations that can be reused across multiple projects.
|
||||
|
||||
### Conditional Execution
|
||||
Use workflow blocks within conditional logic to execute different business processes based on runtime conditions.
|
||||
|
||||
### Parallel Processing
|
||||
Combine workflow blocks with parallel execution to run multiple child workflows simultaneously for improved performance.
|
||||
|
||||
<Callout type="tip">
|
||||
When designing modular workflows, think of each workflow as a function with clear inputs, outputs, and a single responsibility.
|
||||
</Callout>
|
||||
@@ -4,7 +4,7 @@ description: Techniques for accessing and manipulating data from connected block
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Files, Folder, File } from 'fumadocs-ui/components/files'
|
||||
import { File, Files, Folder } from 'fumadocs-ui/components/files'
|
||||
|
||||
Once blocks are connected, you can access data from source blocks in destination blocks using connection tags and various data access techniques.
|
||||
|
||||
@@ -130,7 +130,8 @@ return { message };
|
||||
It's important to handle cases where connected data might be missing or null:
|
||||
|
||||
<Callout type="warning">
|
||||
Always validate connected data before using it, especially when accessing nested properties or array elements.
|
||||
Always validate connected data before using it, especially when accessing nested properties or
|
||||
array elements.
|
||||
</Callout>
|
||||
|
||||
### Default Values
|
||||
@@ -138,9 +139,9 @@ It's important to handle cases where connected data might be missing or null:
|
||||
In Function blocks, you can provide default values for missing data:
|
||||
|
||||
```javascript
|
||||
const userName = input.userBlock?.name || 'Guest';
|
||||
const items = input.orderBlock?.items || [];
|
||||
const total = input.orderBlock?.total ?? 0;
|
||||
const userName = input.userBlock?.name || 'Guest'
|
||||
const items = input.orderBlock?.items || []
|
||||
const total = input.orderBlock?.total ?? 0
|
||||
```
|
||||
|
||||
### Conditional Checks
|
||||
@@ -148,9 +149,9 @@ const total = input.orderBlock?.total ?? 0;
|
||||
Check if data exists before accessing nested properties:
|
||||
|
||||
```javascript
|
||||
let userEmail = 'No email provided';
|
||||
let userEmail = 'No email provided'
|
||||
if (input.userBlock && input.userBlock.contact && input.userBlock.contact.email) {
|
||||
userEmail = input.userBlock.contact.email;
|
||||
userEmail = input.userBlock.contact.email
|
||||
}
|
||||
```
|
||||
|
||||
@@ -159,8 +160,8 @@ if (input.userBlock && input.userBlock.contact && input.userBlock.contact.email)
|
||||
In Function blocks, use optional chaining to safely access nested properties:
|
||||
|
||||
```javascript
|
||||
const userCity = input.userBlock?.address?.city;
|
||||
const firstItemName = input.orderBlock?.items?.[0]?.name;
|
||||
const userCity = input.userBlock?.address?.city
|
||||
const firstItemName = input.orderBlock?.items?.[0]?.name
|
||||
```
|
||||
|
||||
## Debugging Connection Data
|
||||
@@ -175,15 +176,15 @@ When troubleshooting connection issues, these techniques can help:
|
||||
```javascript
|
||||
// Example debugging function
|
||||
function debugConnections() {
|
||||
console.log('All inputs:', input);
|
||||
console.log('User data type:', typeof input.userBlock);
|
||||
console.log('Order items:', input.orderBlock?.items);
|
||||
|
||||
console.log('All inputs:', input)
|
||||
console.log('User data type:', typeof input.userBlock)
|
||||
console.log('Order items:', input.orderBlock?.items)
|
||||
|
||||
return {
|
||||
debug: true,
|
||||
allInputs: input,
|
||||
userExists: !!input.userBlock,
|
||||
orderItemCount: input.orderBlock?.items?.length || 0
|
||||
};
|
||||
orderItemCount: input.orderBlock?.items?.length || 0,
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
@@ -4,21 +4,23 @@ description: Learn how connections work in Sim Studio
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
|
||||
## How Connections Work
|
||||
|
||||
Connections are the pathways that allow data to flow between blocks in your workflow. When you connect two blocks in Sim Studio, you're establishing a data flow relationship that defines how information passes from one block to another.
|
||||
|
||||
<Callout type="info">
|
||||
Each connection represents a directed relationship where data flows from a source block's output to a destination block's input.
|
||||
Each connection represents a directed relationship where data flows from a source block's output
|
||||
to a destination block's input.
|
||||
</Callout>
|
||||
|
||||
### Creating Connections
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Select Source Block</strong>: Click on the output port of the block you want to connect from
|
||||
<strong>Select Source Block</strong>: Click on the output port of the block you want to connect
|
||||
from
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Draw Connection</strong>: Drag to the input port of the destination block
|
||||
@@ -59,7 +61,8 @@ You can manage your connections in several ways:
|
||||
- **Disable**: Temporarily disable a connection without deleting it
|
||||
|
||||
<Callout type="warning">
|
||||
Deleting a connection will immediately stop data flow between the blocks. Make sure this is intended before removing connections.
|
||||
Deleting a connection will immediately stop data flow between the blocks. Make sure this is
|
||||
intended before removing connections.
|
||||
</Callout>
|
||||
|
||||
## Connection Compatibility
|
||||
@@ -70,4 +73,4 @@ Not all blocks can be connected to each other. Compatibility depends on:
|
||||
2. **Block Restrictions**: Some blocks may have restrictions on what they can connect to
|
||||
3. **Workflow Logic**: Connections must make logical sense in the context of your workflow
|
||||
|
||||
The editor will indicate when connections are invalid or incompatible.
|
||||
The editor will indicate when connections are invalid or incompatible.
|
||||
@@ -4,7 +4,7 @@ description: Recommended patterns for effective connection management
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
|
||||
## Workflow Organization
|
||||
|
||||
@@ -18,7 +18,8 @@ Keep your workflow clean and understandable by organizing connections logically:
|
||||
- **Label complex connections** with descriptive names
|
||||
|
||||
<Callout type="info">
|
||||
A well-organized workflow is easier to understand, debug, and maintain. Take time to arrange your blocks and connections in a logical manner.
|
||||
A well-organized workflow is easier to understand, debug, and maintain. Take time to arrange your
|
||||
blocks and connections in a logical manner.
|
||||
</Callout>
|
||||
|
||||
### Connection Naming Conventions
|
||||
@@ -27,13 +28,16 @@ When working with multiple connections, consistent naming helps maintain clarity
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Use descriptive block names</strong>: Name blocks based on their function (e.g., "UserDataFetcher", "ResponseGenerator")
|
||||
<strong>Use descriptive block names</strong>: Name blocks based on their function (e.g.,
|
||||
"UserDataFetcher", "ResponseGenerator")
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Be specific with connection references</strong>: Use clear variable names when referencing connections in code
|
||||
<strong>Be specific with connection references</strong>: Use clear variable names when
|
||||
referencing connections in code
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Document complex connections</strong>: Add comments explaining non-obvious data transformations
|
||||
<strong>Document complex connections</strong>: Add comments explaining non-obvious data
|
||||
transformations
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -53,23 +57,23 @@ Ensure that the data being passed between blocks is compatible:
|
||||
function processUserData() {
|
||||
// Validate required fields
|
||||
if (!input.userBlock || !input.userBlock.id) {
|
||||
return { error: "Missing user data", valid: false };
|
||||
return { error: 'Missing user data', valid: false }
|
||||
}
|
||||
|
||||
|
||||
// Transform and validate data types
|
||||
const userId = String(input.userBlock.id);
|
||||
const userName = input.userBlock.name || "Unknown User";
|
||||
const userScore = Number(input.userBlock.score) || 0;
|
||||
|
||||
const userId = String(input.userBlock.id)
|
||||
const userName = input.userBlock.name || 'Unknown User'
|
||||
const userScore = Number(input.userBlock.score) || 0
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
user: {
|
||||
id: userId,
|
||||
name: userName,
|
||||
score: userScore,
|
||||
isHighScore: userScore > 100
|
||||
}
|
||||
};
|
||||
isHighScore: userScore > 100,
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -89,11 +93,11 @@ Add comments or descriptions to clarify the purpose of connections, especially i
|
||||
* This function processes user data from the UserFetcher block
|
||||
* and order history from the OrderHistory block to generate
|
||||
* personalized product recommendations.
|
||||
*
|
||||
*
|
||||
* Input:
|
||||
* - userBlock: User profile data (id, preferences, history)
|
||||
* - orderBlock: Recent order history (items, dates, amounts)
|
||||
*
|
||||
*
|
||||
* Output:
|
||||
* - recommendations: Array of recommended product IDs
|
||||
* - userSegment: Calculated user segment for marketing
|
||||
@@ -118,28 +122,28 @@ Verify that connection references work as expected:
|
||||
```javascript
|
||||
// Example: Testing connection references with edge cases
|
||||
function testConnections() {
|
||||
console.log("Testing connections...");
|
||||
|
||||
console.log('Testing connections...')
|
||||
|
||||
// Log all inputs for debugging
|
||||
console.log("All inputs:", JSON.stringify(input, null, 2));
|
||||
|
||||
console.log('All inputs:', JSON.stringify(input, null, 2))
|
||||
|
||||
// Test for missing data
|
||||
const hasUserData = !!input.userBlock;
|
||||
console.log("Has user data:", hasUserData);
|
||||
|
||||
const hasUserData = !!input.userBlock
|
||||
console.log('Has user data:', hasUserData)
|
||||
|
||||
// Test edge cases
|
||||
const items = input.orderBlock?.items || [];
|
||||
console.log("Item count:", items.length);
|
||||
console.log("Empty items test:", items.length === 0 ? "Passed" : "Failed");
|
||||
|
||||
const items = input.orderBlock?.items || []
|
||||
console.log('Item count:', items.length)
|
||||
console.log('Empty items test:', items.length === 0 ? 'Passed' : 'Failed')
|
||||
|
||||
// Return test results
|
||||
return {
|
||||
tests: {
|
||||
hasUserData,
|
||||
hasItems: items.length > 0,
|
||||
hasLargeOrder: items.length > 10
|
||||
}
|
||||
};
|
||||
hasLargeOrder: items.length > 10,
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -157,15 +161,15 @@ Keep your workflows efficient by optimizing how data flows through connections:
|
||||
```javascript
|
||||
// Example: Optimizing data flow by filtering
|
||||
function optimizeUserData() {
|
||||
const userData = input.userBlock;
|
||||
|
||||
const userData = input.userBlock
|
||||
|
||||
// Only pass necessary fields to downstream blocks
|
||||
return {
|
||||
id: userData.id,
|
||||
name: userData.name,
|
||||
email: userData.email,
|
||||
// Filter out unnecessary profile data, history, etc.
|
||||
};
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -181,7 +185,8 @@ Protect sensitive information when using connections:
|
||||
- **Use secure connections** for external API calls
|
||||
|
||||
<Callout type="warning">
|
||||
Be careful when logging connection data that might contain sensitive information. Always redact or mask sensitive fields like passwords, API keys, or personal information.
|
||||
Be careful when logging connection data that might contain sensitive information. Always redact or
|
||||
mask sensitive fields like passwords, API keys, or personal information.
|
||||
</Callout>
|
||||
|
||||
## Advanced Patterns
|
||||
@@ -200,4 +205,4 @@ Create more sophisticated workflows with feedback connections:
|
||||
|
||||
- **Implement iterative processing** by connecting later blocks back to earlier ones
|
||||
- **Use Memory blocks** to store state between iterations
|
||||
- **Set termination conditions** to prevent infinite loops
|
||||
- **Set termination conditions** to prevent infinite loops
|
||||
@@ -3,13 +3,14 @@ title: Connection Data Structure
|
||||
description: Understanding the data structure of different block outputs
|
||||
---
|
||||
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
When you connect blocks, the output data structure from the source block determines what values are available in the destination block. Each block type produces a specific output structure that you can reference in downstream blocks.
|
||||
|
||||
<Callout type="info">
|
||||
Understanding these data structures is essential for effectively using connection tags and accessing the right data in your workflows.
|
||||
Understanding these data structures is essential for effectively using connection tags and
|
||||
accessing the right data in your workflows.
|
||||
</Callout>
|
||||
|
||||
## Block Output Structures
|
||||
@@ -44,6 +45,7 @@ Different block types produce different output structures. Here's what you can e
|
||||
- **toolCalls**: Array of tool calls made by the agent (if any)
|
||||
- **cost**: Array of cost objects for each tool call (if any)
|
||||
- **usage**: Token usage statistics for the entire response
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
```json
|
||||
@@ -62,6 +64,7 @@ Different block types produce different output structures. Here's what you can e
|
||||
- **data**: The response data from the API (can be any type)
|
||||
- **status**: HTTP status code of the response
|
||||
- **headers**: HTTP headers returned by the API
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
```json
|
||||
@@ -77,6 +80,7 @@ Different block types produce different output structures. Here's what you can e
|
||||
- **result**: The return value of the function (can be any type)
|
||||
- **stdout**: Console output captured during function execution
|
||||
- **executionTime**: Time taken to execute the function (in milliseconds)
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
```json
|
||||
@@ -100,6 +104,7 @@ Different block types produce different output structures. Here's what you can e
|
||||
- **model**: The AI model used for evaluation
|
||||
- **tokens**: Token usage statistics
|
||||
- **[metricName]**: Score for each metric defined in the evaluator (dynamic fields)
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
```json
|
||||
@@ -124,6 +129,7 @@ Different block types produce different output structures. Here's what you can e
|
||||
- **blockType**: Type of the next block
|
||||
- **blockTitle**: Title of the next block
|
||||
- **selectedConditionId**: ID of the selected condition
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
```json
|
||||
@@ -152,6 +158,7 @@ Different block types produce different output structures. Here's what you can e
|
||||
- **blockId**: ID of the selected destination block
|
||||
- **blockType**: Type of the selected block
|
||||
- **blockTitle**: Title of the selected block
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
@@ -166,7 +173,8 @@ Some blocks may produce custom output structures based on their configuration:
|
||||
3. **API Blocks**: The `data` field will contain whatever the API returns, which could be any valid JSON structure.
|
||||
|
||||
<Callout type="warning">
|
||||
Always check the actual output structure of your blocks during development to ensure you're referencing the correct fields in your connections.
|
||||
Always check the actual output structure of your blocks during development to ensure you're
|
||||
referencing the correct fields in your connections.
|
||||
</Callout>
|
||||
|
||||
## Nested Data Structures
|
||||
@@ -178,6 +186,7 @@ Many block outputs contain nested data structures. You can access these using do
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
- `<agent1.tokens.total>` - Access the total tokens from an Agent block
|
||||
- `<api1.data.results[0].id>` - Access the ID of the first result from an API response
|
||||
- `<function1.result.calculations.total>` - Access a nested field in a Function block's result
|
||||
- `<function1.result.calculations.total>` - Access a nested field in a Function block's result
|
||||
@@ -3,26 +3,19 @@ title: Connections
|
||||
description: Connect your blocks to one another.
|
||||
---
|
||||
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { ConnectIcon } from '@/components/icons'
|
||||
|
||||
Connections are the pathways that allow data to flow between blocks in your workflow. They define how information is passed from one block to another, enabling you to create sophisticated, multi-step processes.
|
||||
|
||||
<Callout type="info">
|
||||
Properly configured connections are essential for creating effective workflows. They determine how data moves through your system and how blocks interact with each other.
|
||||
Properly configured connections are essential for creating effective workflows. They determine how
|
||||
data moves through your system and how blocks interact with each other.
|
||||
</Callout>
|
||||
|
||||
<div>
|
||||
<video
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="w-full"
|
||||
src="/connections.mp4"
|
||||
>
|
||||
</video>
|
||||
<video autoPlay loop muted playsInline className="w-full" src="/connections.mp4"></video>
|
||||
</div>
|
||||
|
||||
## Connection Types
|
||||
@@ -46,4 +39,3 @@ Sim Studio supports different types of connections that enable various workflow
|
||||
Follow recommended patterns for effective connection management
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"title": "Connections",
|
||||
"pages": ["basics", "tags", "data-structure", "accessing-data", "best-practices"]
|
||||
}
|
||||
}
|
||||
@@ -8,15 +8,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
|
||||
Connection tags are visual representations of the data available from connected blocks. They provide an easy way to reference outputs from previous blocks in your workflow.
|
||||
|
||||
<div>
|
||||
<video
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="w-full"
|
||||
src="/connections.mp4"
|
||||
>
|
||||
</video>
|
||||
<video autoPlay loop muted playsInline className="w-full" src="/connections.mp4"></video>
|
||||
</div>
|
||||
|
||||
### What Are Connection Tags?
|
||||
@@ -28,35 +20,40 @@ Connection tags are interactive elements that appear when blocks are connected.
|
||||
- Create dynamic data flows between blocks
|
||||
|
||||
<Callout type="info">
|
||||
Connection tags make it easy to see what data is available from previous blocks and use it in your current block without having to remember complex data structures.
|
||||
Connection tags make it easy to see what data is available from previous blocks and use it in your
|
||||
current block without having to remember complex data structures.
|
||||
</Callout>
|
||||
|
||||
## Using Connection Tags
|
||||
|
||||
There are two primary ways to use connection tags in your workflows:
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 my-6">
|
||||
<div className="border border-gray-200 dark:border-gray-800 rounded-lg p-4">
|
||||
<h3 className="font-medium text-lg mb-2">Drag and Drop</h3>
|
||||
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
|
||||
<h3 className="mb-2 text-lg font-medium">Drag and Drop</h3>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
Click on a connection tag and drag it into input fields of destination blocks. A dropdown will appear showing available values.
|
||||
Click on a connection tag and drag it into input fields of destination blocks. A dropdown will
|
||||
appear showing available values.
|
||||
</div>
|
||||
<ol className="mt-2 text-sm text-gray-600 dark:text-gray-400 list-decimal pl-5">
|
||||
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
|
||||
<li>Hover over a connection tag to see available data</li>
|
||||
<li>Click and drag the tag to an input field</li>
|
||||
<li>Select the specific data field from the dropdown</li>
|
||||
<li>The reference is inserted automatically</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div className="border border-gray-200 dark:border-gray-800 rounded-lg p-4">
|
||||
<h3 className="font-medium text-lg mb-2">Angle Bracket Syntax</h3>
|
||||
|
||||
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
|
||||
<h3 className="mb-2 text-lg font-medium">Angle Bracket Syntax</h3>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
Type <code><></code> in input fields to see a dropdown of available connection values from previous blocks.
|
||||
Type <code><></code> in input fields to see a dropdown of available connection values
|
||||
from previous blocks.
|
||||
</div>
|
||||
<ol className="mt-2 text-sm text-gray-600 dark:text-gray-400 list-decimal pl-5">
|
||||
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
|
||||
<li>Click in any input field where you want to use connected data</li>
|
||||
<li>Type <code><></code> to trigger the connection dropdown</li>
|
||||
<li>
|
||||
Type <code><></code> to trigger the connection dropdown
|
||||
</li>
|
||||
<li>Browse and select the data you want to reference</li>
|
||||
<li>Continue typing or select from the dropdown to complete the reference</li>
|
||||
</ol>
|
||||
@@ -72,10 +69,12 @@ Connection tags use a simple syntax to reference data:
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
- `blockId` is the identifier of the source block
|
||||
- `path.to.data` is the path to the specific data field
|
||||
|
||||
For example:
|
||||
|
||||
- `<agent1.content>` - References the content field from a block with ID "agent1"
|
||||
- `<api2.data.users[0].name>` - References the name of the first user in the users array from the data field of a block with ID "api2"
|
||||
|
||||
@@ -105,5 +104,6 @@ const total = <apiBlock.data.total> * 1.1; // Add 10% tax
|
||||
```
|
||||
|
||||
<Callout type="warning">
|
||||
When using connection tags in numeric contexts, make sure the referenced data is actually a number to avoid type conversion issues.
|
||||
</Callout>
|
||||
When using connection tags in numeric contexts, make sure the referenced data is actually a number
|
||||
to avoid type conversion issues.
|
||||
</Callout>
|
||||
@@ -3,9 +3,9 @@ title: Advanced Execution Features
|
||||
description: Master advanced execution capabilities in Sim Studio
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
Sim Studio provides several advanced features that give you more control over workflow execution, error handling, and performance optimization.
|
||||
|
||||
@@ -26,8 +26,8 @@ try {
|
||||
} catch (error) {
|
||||
// Handle the error gracefully
|
||||
console.error("Failed to parse JSON:", error.message);
|
||||
return {
|
||||
success: false,
|
||||
return {
|
||||
success: false,
|
||||
error: error.message,
|
||||
fallbackData: { status: "error", message: "Could not process data" }
|
||||
};
|
||||
@@ -44,7 +44,8 @@ Comprehensive error information is captured in the execution logs:
|
||||
- **Timestamps**: When the error occurred
|
||||
|
||||
<Callout type="info">
|
||||
Error logs are invaluable for debugging workflows. Always check the logs first when troubleshooting execution issues.
|
||||
Error logs are invaluable for debugging workflows. Always check the logs first when
|
||||
troubleshooting execution issues.
|
||||
</Callout>
|
||||
|
||||
### Fallback Mechanisms
|
||||
@@ -72,40 +73,21 @@ Environment variables provide a secure way to store and access configuration val
|
||||
|
||||
<Tabs items={['API Keys', 'Configuration Values', 'Secrets']}>
|
||||
<Tab>
|
||||
Store API credentials securely:
|
||||
|
||||
```
|
||||
OPENAI_API_KEY=sk-...
|
||||
ANTHROPIC_API_KEY=sk-...
|
||||
GOOGLE_API_KEY=AIza...
|
||||
```
|
||||
|
||||
These are automatically available to blocks that need them, without hardcoding sensitive values in your workflow.
|
||||
Store API credentials securely: ``` OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-...
|
||||
GOOGLE_API_KEY=AIza... ``` These are automatically available to blocks that need them, without
|
||||
hardcoding sensitive values in your workflow.
|
||||
</Tab>
|
||||
|
||||
|
||||
<Tab>
|
||||
Manage environment-specific configuration: ``` MAX_RETRIES=3 DEFAULT_MODEL=gpt-4o LOG_LEVEL=info
|
||||
BASE_URL=https://api.example.com ``` These values can be referenced in blocks to control behavior
|
||||
without modifying the workflow itself.
|
||||
</Tab>
|
||||
|
||||
<Tab>
|
||||
Manage environment-specific configuration:
|
||||
|
||||
```
|
||||
MAX_RETRIES=3
|
||||
DEFAULT_MODEL=gpt-4o
|
||||
LOG_LEVEL=info
|
||||
BASE_URL=https://api.example.com
|
||||
```
|
||||
|
||||
These values can be referenced in blocks to control behavior without modifying the workflow itself.
|
||||
</Tab>
|
||||
|
||||
<Tab>
|
||||
Store sensitive information securely:
|
||||
|
||||
```
|
||||
DATABASE_PASSWORD=...
|
||||
JWT_SECRET=...
|
||||
ENCRYPTION_KEY=...
|
||||
```
|
||||
|
||||
These values are encrypted at rest and only decrypted during execution, providing an extra layer of security.
|
||||
Store sensitive information securely: ``` DATABASE_PASSWORD=... JWT_SECRET=...
|
||||
ENCRYPTION_KEY=... ``` These values are encrypted at rest and only decrypted during execution,
|
||||
providing an extra layer of security.
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
@@ -115,8 +97,8 @@ Environment variables can be accessed in different ways depending on the block t
|
||||
|
||||
```javascript
|
||||
// In Function blocks
|
||||
const apiKey = process.env.MY_API_KEY;
|
||||
const maxRetries = parseInt(process.env.MAX_RETRIES || "3");
|
||||
const apiKey = process.env.MY_API_KEY
|
||||
const maxRetries = parseInt(process.env.MAX_RETRIES || '3')
|
||||
|
||||
// In API blocks (via connection tags)
|
||||
// URL: https://api.example.com?key=<env.MY_API_KEY>
|
||||
@@ -126,7 +108,8 @@ const maxRetries = parseInt(process.env.MAX_RETRIES || "3");
|
||||
```
|
||||
|
||||
<Callout type="warning">
|
||||
Never hardcode sensitive information like API keys directly in your workflows. Always use environment variables instead.
|
||||
Never hardcode sensitive information like API keys directly in your workflows. Always use
|
||||
environment variables instead.
|
||||
</Callout>
|
||||
|
||||
## Real-Time Monitoring
|
||||
@@ -135,19 +118,28 @@ Sim Studio provides powerful real-time monitoring capabilities:
|
||||
|
||||
<Accordions>
|
||||
<Accordion title="Active Block Indicator">
|
||||
The currently executing block is highlighted in the workflow editor, making it easy to follow the execution flow in real-time. This visual indicator helps you understand exactly where in your workflow the execution is currently happening.
|
||||
The currently executing block is highlighted in the workflow editor, making it easy to follow
|
||||
the execution flow in real-time. This visual indicator helps you understand exactly where in
|
||||
your workflow the execution is currently happening.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Live Logs Panel">
|
||||
Execution logs appear in real-time in the logs panel on the right side. These logs include detailed information about each block's execution, including inputs, outputs, execution time, and any errors that occur. You can use these logs to debug your workflow and understand how data flows between blocks.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Block States">
|
||||
Each block's state (pending, executing, completed, or error) is visually indicated in the workflow editor. This helps you quickly identify which blocks have executed successfully and which may have encountered issues.
|
||||
</Accordion>
|
||||
|
||||
|
||||
<Accordion title="Live Logs Panel">
|
||||
Execution logs appear in real-time in the logs panel on the right side. These logs include
|
||||
detailed information about each block's execution, including inputs, outputs, execution time, and
|
||||
any errors that occur. You can use these logs to debug your workflow and understand how data flows
|
||||
between blocks.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Block States">
|
||||
Each block's state (pending, executing, completed, or error) is visually indicated in the workflow
|
||||
editor. This helps you quickly identify which blocks have executed successfully and which may have
|
||||
encountered issues.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Performance Metrics">
|
||||
Detailed timing information shows how long each block takes to execute, helping you identify performance bottlenecks in your workflow. The execution engine tracks start time, end time, and total duration for both individual blocks and the entire workflow.
|
||||
Detailed timing information shows how long each block takes to execute, helping you identify
|
||||
performance bottlenecks in your workflow. The execution engine tracks start time, end time, and
|
||||
total duration for both individual blocks and the entire workflow.
|
||||
</Accordion>
|
||||
</Accordions>
|
||||
|
||||
@@ -177,7 +169,8 @@ Optimize your workflows for better performance:
|
||||
- **Monitor Resource Usage**: Keep an eye on memory and CPU usage
|
||||
|
||||
<Callout type="info">
|
||||
Performance optimization is especially important for workflows that run frequently or process large amounts of data.
|
||||
Performance optimization is especially important for workflows that run frequently or process
|
||||
large amounts of data.
|
||||
</Callout>
|
||||
|
||||
## Advanced Execution Context
|
||||
@@ -193,22 +186,22 @@ The execution context maintains detailed information about the workflow executio
|
||||
"block-2": { output: { data: { ... } }, status: "completed" },
|
||||
"block-3": { status: "pending" }
|
||||
},
|
||||
|
||||
|
||||
// Active execution path
|
||||
activeExecutionPath: Set(["block-1", "block-2", "block-5"]),
|
||||
|
||||
|
||||
// Routing decisions
|
||||
decisions: {
|
||||
router: Map(["router-1" => "block-5"]),
|
||||
condition: Map(["condition-1" => "condition-true"])
|
||||
},
|
||||
|
||||
|
||||
// Loop iterations
|
||||
loopIterations: Map(["loop-1" => 2]),
|
||||
|
||||
|
||||
// Environment variables
|
||||
env: { "API_KEY": "...", "MAX_RETRIES": "3" },
|
||||
|
||||
|
||||
// Execution logs
|
||||
logs: [
|
||||
{ blockId: "block-1", timestamp: "...", status: "completed", duration: 120 },
|
||||
@@ -228,9 +221,9 @@ Advanced techniques for debugging workflow execution:
|
||||
Add strategic console.log statements in Function blocks:
|
||||
|
||||
```javascript
|
||||
console.log("Input to processData:", JSON.stringify(input, null, 2));
|
||||
console.log("Processing step 1 complete:", intermediateResult);
|
||||
console.log("Final result:", finalResult);
|
||||
console.log('Input to processData:', JSON.stringify(input, null, 2))
|
||||
console.log('Processing step 1 complete:', intermediateResult)
|
||||
console.log('Final result:', finalResult)
|
||||
```
|
||||
|
||||
### State Inspection
|
||||
@@ -240,18 +233,18 @@ Use Function blocks to inspect the current state:
|
||||
```javascript
|
||||
function debugState() {
|
||||
// Log all inputs
|
||||
console.log("All inputs:", input);
|
||||
|
||||
console.log('All inputs:', input)
|
||||
|
||||
// Return a debug object with relevant information
|
||||
return {
|
||||
debug: true,
|
||||
inputSummary: {
|
||||
hasUserData: !!input.userBlock,
|
||||
apiStatus: input.apiBlock?.status,
|
||||
itemCount: input.dataBlock?.items?.length || 0
|
||||
itemCount: input.dataBlock?.items?.length || 0,
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
};
|
||||
timestamp: new Date().toISOString(),
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -269,19 +262,19 @@ Identify performance bottlenecks:
|
||||
|
||||
```javascript
|
||||
function profileOperation() {
|
||||
const start = performance.now();
|
||||
|
||||
const start = performance.now()
|
||||
|
||||
// Perform the operation
|
||||
const result = performExpensiveOperation();
|
||||
|
||||
const end = performance.now();
|
||||
console.log(`Operation took ${end - start}ms`);
|
||||
|
||||
const result = performExpensiveOperation()
|
||||
|
||||
const end = performance.now()
|
||||
console.log(`Operation took ${end - start}ms`)
|
||||
|
||||
return {
|
||||
result,
|
||||
executionTime: end - start
|
||||
};
|
||||
executionTime: end - start,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
By mastering these advanced execution features, you can create more robust, efficient, and sophisticated workflows in Sim Studio.
|
||||
By mastering these advanced execution features, you can create more robust, efficient, and sophisticated workflows in Sim Studio.
|
||||
200
apps/docs/content/docs/execution/basics.mdx
Normal file
200
apps/docs/content/docs/execution/basics.mdx
Normal file
@@ -0,0 +1,200 @@
|
||||
---
|
||||
title: Execution Basics
|
||||
description: Understanding the fundamental execution flow in Sim Studio
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { File, Files, Folder } from 'fumadocs-ui/components/files'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import {
|
||||
AgentIcon,
|
||||
ApiIcon,
|
||||
ChartBarIcon,
|
||||
CodeIcon,
|
||||
ConditionalIcon,
|
||||
ConnectIcon,
|
||||
} from '@/components/icons'
|
||||
|
||||
When you run a workflow in Sim Studio, the execution engine follows a systematic process to ensure blocks are executed in the correct order and data flows properly between them.
|
||||
|
||||
## Execution Flow
|
||||
|
||||
The execution of a workflow follows these key steps:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
### Validation Before execution begins, the workflow is validated to ensure it has: - An enabled
|
||||
starter block with no incoming connections - Properly connected blocks with valid configurations
|
||||
- No circular dependencies (except in intentional loops) - Valid input and output types between
|
||||
connected blocks
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Initialization The execution context is created, which includes: - Environment variables for
|
||||
the workflow - Input values from the starter block - Initial state for all blocks - Execution path
|
||||
tracking - Loop iteration counters
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Block Execution Blocks are executed in topological order (based on dependencies): - The system
|
||||
identifies which blocks can be executed next - Inputs for each block are resolved from previous
|
||||
block outputs - Each block is executed by its specialized handler - Outputs are stored in the
|
||||
execution context
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Path Determination As execution progresses, the system determines which paths to follow: -
|
||||
Router and conditional blocks make decisions about execution paths - Only blocks on active paths
|
||||
are executed - The path tracker maintains the current execution state
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Result Collection After all blocks have executed: - Final outputs are collected - Execution
|
||||
logs are compiled - Performance metrics are calculated - Results are presented in the UI
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Block Types and Execution
|
||||
|
||||
Different block types have different execution behaviors:
|
||||
|
||||
<Tabs items={['Orchestration Blocks', 'Processing Blocks', 'Integration Blocks']}>
|
||||
<Tab>
|
||||
<Card>
|
||||
Orchestration blocks control the flow of execution through your workflow.
|
||||
<Files>
|
||||
<File
|
||||
name="Starter Block"
|
||||
icon={<ConnectIcon className="h-4 w-4" />}
|
||||
annotation="Initiates workflow execution and provides initial input values. Every workflow must have exactly one starter block."
|
||||
/>
|
||||
<File
|
||||
name="Router Block"
|
||||
icon={<ConnectIcon className="h-4 w-4" />}
|
||||
annotation="Directs execution along specific paths based on dynamic decisions. Uses an AI model to select one of multiple possible paths."
|
||||
/>
|
||||
<File
|
||||
name="Condition Block"
|
||||
icon={<ConditionalIcon className="h-4 w-4" />}
|
||||
annotation="Executes different paths based on conditional logic. Evaluates JavaScript expressions to determine which path to follow."
|
||||
/>
|
||||
</Files>
|
||||
</Card>
|
||||
</Tab>
|
||||
|
||||
<Tab>
|
||||
<Card>
|
||||
Processing blocks transform data and generate new outputs.
|
||||
<Files>
|
||||
<File
|
||||
name="Agent Block"
|
||||
icon={<AgentIcon className="h-4 w-4" />}
|
||||
annotation="Interacts with AI models to generate content. Executes prompts against various LLM providers."
|
||||
/>
|
||||
<File
|
||||
name="Function Block"
|
||||
icon={<CodeIcon className="h-4 w-4" />}
|
||||
annotation="Executes custom JavaScript/TypeScript code. Runs in a secure sandbox environment with access to connected block outputs."
|
||||
/>
|
||||
<File
|
||||
name="Evaluator Block"
|
||||
icon={<ChartBarIcon className="h-4 w-4" />}
|
||||
annotation="Assesses outputs against defined criteria. Uses AI to evaluate content based on custom metrics."
|
||||
/>
|
||||
</Files>
|
||||
</Card>
|
||||
</Tab>
|
||||
|
||||
<Tab>
|
||||
<Card>
|
||||
Integration blocks connect with external systems.
|
||||
<Files>
|
||||
<File
|
||||
name="API Block"
|
||||
icon={<ApiIcon className="h-4 w-4" />}
|
||||
annotation="Makes HTTP requests to external services. Configurable with headers, body, and authentication."
|
||||
/>
|
||||
<File
|
||||
name="Tool Blocks"
|
||||
icon={<CodeIcon className="h-4 w-4" />}
|
||||
annotation="Specialized blocks for specific services (Gmail, Slack, GitHub, etc.). Each has its own execution logic for the specific service."
|
||||
/>
|
||||
</Files>
|
||||
</Card>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Execution Methods
|
||||
|
||||
Sim Studio offers multiple ways to trigger workflow execution:
|
||||
|
||||
### Manual Execution
|
||||
|
||||
Run workflows on-demand through the Sim Studio interface by clicking the "Run" button. This is perfect for:
|
||||
|
||||
- Testing during development
|
||||
- One-off tasks
|
||||
- Workflows that need human supervision
|
||||
|
||||
### Scheduled Execution
|
||||
|
||||
Configure workflows to run automatically on a specified schedule:
|
||||
|
||||
- Set up recurring executions using cron expressions
|
||||
- Define start times and frequency
|
||||
- Configure timezone settings
|
||||
- Set minimum and maximum execution intervals
|
||||
|
||||
### API Endpoints
|
||||
|
||||
Each workflow can be exposed as an API endpoint:
|
||||
|
||||
- Get a unique URL for your workflow
|
||||
- Configure authentication requirements
|
||||
- Send custom inputs via POST requests
|
||||
- Receive execution results as JSON responses
|
||||
|
||||
### Webhooks
|
||||
|
||||
Configure workflows to execute in response to external events:
|
||||
|
||||
- Set up webhook triggers from third-party services
|
||||
- Process incoming webhook data as workflow input
|
||||
- Configure webhook security settings
|
||||
- Support for specialized webhooks (GitHub, Stripe, etc.)
|
||||
|
||||
<Callout type="info">
|
||||
The execution method you choose depends on your workflow's purpose. Manual execution is great for
|
||||
development, while scheduled execution, API endpoints, and webhooks are better for production use
|
||||
cases.
|
||||
</Callout>
|
||||
|
||||
## Execution Context
|
||||
|
||||
Each workflow execution maintains a detailed context that includes:
|
||||
|
||||
- **Block States**: Outputs and execution status of each block
|
||||
- **Execution Path**: The active path through the workflow
|
||||
- **Routing Decisions**: Records of which paths were selected
|
||||
- **Environment Variables**: Configuration values for the workflow
|
||||
- **Execution Logs**: Detailed records of each step in the execution
|
||||
|
||||
This context is maintained throughout the execution and is used to:
|
||||
|
||||
- Resolve inputs for blocks
|
||||
- Determine which blocks to execute next
|
||||
- Track the progress of execution
|
||||
- Provide debugging information
|
||||
- Store intermediate results
|
||||
|
||||
## Real-Time Execution Monitoring
|
||||
|
||||
As your workflow executes, you can monitor its progress in real-time:
|
||||
|
||||
- **Active Block Highlighting**: The currently executing block is highlighted
|
||||
- **Live Logs**: Execution logs appear in real-time in the logs panel
|
||||
- **Block States**: Visual indicators show each block's execution state
|
||||
- **Performance Metrics**: Timing information for each block's execution
|
||||
|
||||
These monitoring features help you understand how your workflow is executing and identify any issues that arise.
|
||||
@@ -3,45 +3,53 @@ title: Execution
|
||||
description: Understand how workflows are executed in Sim Studio
|
||||
---
|
||||
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Files, Folder, File } from 'fumadocs-ui/components/files'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { AgentIcon, ApiIcon, ConditionalIcon, CodeIcon, ChartBarIcon, ConnectIcon, GmailIcon, PerplexityIcon, NotionIcon, ExaAIIcon, FirecrawlIcon, SlackIcon } from '@/components/icons'
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { File, Files, Folder } from 'fumadocs-ui/components/files'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import {
|
||||
AgentIcon,
|
||||
ApiIcon,
|
||||
ChartBarIcon,
|
||||
CodeIcon,
|
||||
ConditionalIcon,
|
||||
ConnectIcon,
|
||||
ExaAIIcon,
|
||||
FirecrawlIcon,
|
||||
GmailIcon,
|
||||
NotionIcon,
|
||||
PerplexityIcon,
|
||||
SlackIcon,
|
||||
} from '@/components/icons'
|
||||
|
||||
Sim Studio provides a powerful execution engine that brings your workflows to life. Understanding how execution works will help you design more effective workflows and troubleshoot any issues that arise.
|
||||
|
||||
<div>
|
||||
<video
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="w-full"
|
||||
src="/loops.mp4"
|
||||
>
|
||||
</video>
|
||||
<video autoPlay loop muted playsInline className="w-full" src="/loops.mp4"></video>
|
||||
</div>
|
||||
|
||||
<Callout type="info">
|
||||
The execution engine handles everything from block execution order to data flow, error handling, and loop management. It ensures your workflows run efficiently and predictably.
|
||||
The execution engine handles everything from block execution order to data flow, error handling,
|
||||
and loop management. It ensures your workflows run efficiently and predictably.
|
||||
</Callout>
|
||||
|
||||
## Execution Documentation
|
||||
|
||||
<Cards>
|
||||
<Card title="Execution Basics" href="/execution/basics">
|
||||
Learn about the fundamental execution flow, block types, and how data flows through your workflow
|
||||
Learn about the fundamental execution flow, block types, and how data flows through your
|
||||
workflow
|
||||
</Card>
|
||||
|
||||
<Card title="Loops" href="/execution/loops">
|
||||
Master the powerful loop functionality to create iterative processes and feedback mechanisms
|
||||
</Card>
|
||||
|
||||
|
||||
<Card title="Loops" href="/execution/loops">
|
||||
Master the powerful loop functionality to create iterative processes and feedback mechanisms
|
||||
</Card>
|
||||
|
||||
<Card title="Advanced Features" href="/execution/advanced">
|
||||
Discover advanced capabilities like error handling, environment variables, and performance optimization
|
||||
Discover advanced capabilities like error handling, environment variables, and performance
|
||||
optimization
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -61,45 +69,36 @@ When you execute a workflow in Sim Studio, the system follows a predictable patt
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
### Validation
|
||||
The workflow is validated to ensure it has an enabled starter block and proper connections. This includes checking that:
|
||||
- The starter block has no incoming connections
|
||||
- All required blocks are present and properly connected
|
||||
- Loop configurations are valid with appropriate iteration limits
|
||||
### Validation The workflow is validated to ensure it has an enabled starter block and proper
|
||||
connections. This includes checking that: - The starter block has no incoming connections - All
|
||||
required blocks are present and properly connected - Loop configurations are valid with
|
||||
appropriate iteration limits
|
||||
</Step>
|
||||
|
||||
|
||||
<Step>
|
||||
### Initialization The execution context is created with environment variables and input values.
|
||||
This context maintains the state of the workflow throughout execution, including: - Block outputs
|
||||
and states - Execution path tracking - Routing decisions - Loop iteration counters
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Block Execution Blocks are executed in topological order, with each block's outputs feeding
|
||||
into subsequent blocks. The executor: - Determines the next layer of blocks to execute based on
|
||||
dependencies - Resolves inputs for each block from previous outputs - Dispatches execution to
|
||||
specialized handlers for each block type
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Path Determination Router and conditional blocks make routing decisions that determine which
|
||||
execution paths to follow. The path tracker: - Updates the active execution path based on these
|
||||
decisions - Ensures that only blocks on active paths are executed - Handles complex branching
|
||||
logic in your workflow
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Initialization
|
||||
The execution context is created with environment variables and input values. This context maintains the state of the workflow throughout execution, including:
|
||||
- Block outputs and states
|
||||
- Execution path tracking
|
||||
- Routing decisions
|
||||
- Loop iteration counters
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Block Execution
|
||||
Blocks are executed in topological order, with each block's outputs feeding into subsequent blocks. The executor:
|
||||
- Determines the next layer of blocks to execute based on dependencies
|
||||
- Resolves inputs for each block from previous outputs
|
||||
- Dispatches execution to specialized handlers for each block type
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Path Determination
|
||||
Router and conditional blocks make routing decisions that determine which execution paths to follow. The path tracker:
|
||||
- Updates the active execution path based on these decisions
|
||||
- Ensures that only blocks on active paths are executed
|
||||
- Handles complex branching logic in your workflow
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### Result Collection
|
||||
The final output and execution logs are collected and presented in the UI. You'll see:
|
||||
- Complete execution logs for each block
|
||||
- Performance metrics and timing information
|
||||
- Any errors that occurred during execution
|
||||
- The final workflow output
|
||||
### Result Collection The final output and execution logs are collected and presented in the UI.
|
||||
You'll see: - Complete execution logs for each block - Performance metrics and timing
|
||||
information - Any errors that occurred during execution - The final workflow output
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -111,23 +110,45 @@ Sim Studio has two main categories of blocks in workflows:
|
||||
<Tab value="Orchestration Blocks">
|
||||
<Card>
|
||||
Orchestration blocks control the flow of execution through your workflow.
|
||||
|
||||
<Files>
|
||||
<File name="Router Blocks" icon={<ConnectIcon className="w-4 h-4" />} annotation="Direct the workflow along specific paths based on dynamic decisions. The router evaluates inputs and selects one of multiple possible paths." />
|
||||
<File name="Conditional Blocks" icon={<ConditionalIcon className="w-4 h-4" />} annotation="Execute different paths based on conditional logic. Conditions are evaluated to true or false, determining which path to follow." />
|
||||
<File
|
||||
name="Router Blocks"
|
||||
icon={<ConnectIcon className="h-4 w-4" />}
|
||||
annotation="Direct the workflow along specific paths based on dynamic decisions. The router evaluates inputs and selects one of multiple possible paths."
|
||||
/>
|
||||
<File
|
||||
name="Conditional Blocks"
|
||||
icon={<ConditionalIcon className="h-4 w-4" />}
|
||||
annotation="Execute different paths based on conditional logic. Conditions are evaluated to true or false, determining which path to follow."
|
||||
/>
|
||||
</Files>
|
||||
</Card>
|
||||
</Tab>
|
||||
|
||||
|
||||
<Tab value="Output Blocks">
|
||||
<Card>
|
||||
Output blocks perform operations and generate results that can be used by downstream blocks.
|
||||
|
||||
<Files>
|
||||
<File name="Agent Block" icon={<AgentIcon className="w-4 h-4" />} annotation="Interact with AI models to generate content. Supports various LLM providers with optional tool calling capabilities." />
|
||||
<File name="Function Blocks" icon={<CodeIcon className="w-4 h-4" />} annotation="Execute custom JavaScript/TypeScript code to process data. Runs in a secure sandbox environment with appropriate timeout limits." />
|
||||
<File name="API Blocks" icon={<ApiIcon className="w-4 h-4" />} annotation="Make HTTP requests to external services. Configure headers, body, and authentication for REST API interactions."/>
|
||||
<File name="Evaluator Blocks" icon={<ChartBarIcon className="w-4 h-4" />} annotation="Assess outputs against defined criteria with customizable scoring logic."/>
|
||||
<File
|
||||
name="Agent Block"
|
||||
icon={<AgentIcon className="h-4 w-4" />}
|
||||
annotation="Interact with AI models to generate content. Supports various LLM providers with optional tool calling capabilities."
|
||||
/>
|
||||
<File
|
||||
name="Function Blocks"
|
||||
icon={<CodeIcon className="h-4 w-4" />}
|
||||
annotation="Execute custom JavaScript/TypeScript code to process data. Runs in a secure sandbox environment with appropriate timeout limits."
|
||||
/>
|
||||
<File
|
||||
name="API Blocks"
|
||||
icon={<ApiIcon className="h-4 w-4" />}
|
||||
annotation="Make HTTP requests to external services. Configure headers, body, and authentication for REST API interactions."
|
||||
/>
|
||||
<File
|
||||
name="Evaluator Blocks"
|
||||
icon={<ChartBarIcon className="h-4 w-4" />}
|
||||
annotation="Assess outputs against defined criteria with customizable scoring logic."
|
||||
/>
|
||||
</Files>
|
||||
</Card>
|
||||
</Tab>
|
||||
@@ -139,19 +160,28 @@ As your workflow executes, Sim Studio provides powerful real-time monitoring cap
|
||||
|
||||
<Accordions>
|
||||
<Accordion title="Active Block Indicator">
|
||||
The currently executing block is highlighted in the workflow editor, making it easy to follow the execution flow in real-time. This visual indicator helps you understand exactly where in your workflow the execution is currently happening.
|
||||
The currently executing block is highlighted in the workflow editor, making it easy to follow
|
||||
the execution flow in real-time. This visual indicator helps you understand exactly where in
|
||||
your workflow the execution is currently happening.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Live Logs Panel">
|
||||
Execution logs appear in real-time in the logs panel on the right side. These logs include detailed information about each block's execution, including inputs, outputs, execution time, and any errors that occur. You can use these logs to debug your workflow and understand how data flows between blocks.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Block States">
|
||||
Each block's state (pending, executing, completed, or error) is visually indicated in the workflow editor. This helps you quickly identify which blocks have executed successfully and which may have encountered issues.
|
||||
</Accordion>
|
||||
|
||||
|
||||
<Accordion title="Live Logs Panel">
|
||||
Execution logs appear in real-time in the logs panel on the right side. These logs include
|
||||
detailed information about each block's execution, including inputs, outputs, execution time, and
|
||||
any errors that occur. You can use these logs to debug your workflow and understand how data flows
|
||||
between blocks.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Block States">
|
||||
Each block's state (pending, executing, completed, or error) is visually indicated in the workflow
|
||||
editor. This helps you quickly identify which blocks have executed successfully and which may have
|
||||
encountered issues.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Performance Metrics">
|
||||
Detailed timing information shows how long each block takes to execute, helping you identify performance bottlenecks in your workflow. The execution engine tracks start time, end time, and total duration for both individual blocks and the entire workflow.
|
||||
Detailed timing information shows how long each block takes to execute, helping you identify
|
||||
performance bottlenecks in your workflow. The execution engine tracks start time, end time, and
|
||||
total duration for both individual blocks and the entire workflow.
|
||||
</Accordion>
|
||||
</Accordions>
|
||||
|
||||
@@ -161,19 +191,26 @@ Sim Studio offers multiple ways to trigger workflow execution:
|
||||
|
||||
<Cards>
|
||||
<Card title="Manual Execution" href="#">
|
||||
Run workflows on-demand through the Sim Studio interface. This is perfect for testing and development, allowing you to iteratively refine your workflow with immediate feedback.
|
||||
Run workflows on-demand through the Sim Studio interface. This is perfect for testing and
|
||||
development, allowing you to iteratively refine your workflow with immediate feedback.
|
||||
</Card>
|
||||
|
||||
<Card title="Scheduled Execution" href="#">
|
||||
Configure workflows to run automatically on a specified schedule using cron expressions. Ideal for regular data processing, reporting tasks, or any workflow that needs to run periodically without manual intervention.
|
||||
</Card>
|
||||
|
||||
<Card title="API Endpoints" href="#">
|
||||
Each workflow can be exposed as an API endpoint with authentication, allowing external systems to trigger execution with custom inputs. This enables seamless integration with your existing applications and services.
|
||||
</Card>
|
||||
|
||||
|
||||
<Card title="Scheduled Execution" href="#">
|
||||
Configure workflows to run automatically on a specified schedule using cron expressions. Ideal for
|
||||
regular data processing, reporting tasks, or any workflow that needs to run periodically without
|
||||
manual intervention.
|
||||
</Card>
|
||||
|
||||
<Card title="API Endpoints" href="#">
|
||||
Each workflow can be exposed as an API endpoint with authentication, allowing external systems to
|
||||
trigger execution with custom inputs. This enables seamless integration with your existing
|
||||
applications and services.
|
||||
</Card>
|
||||
|
||||
<Card title="Webhooks" href="#">
|
||||
Configure workflows to execute in response to external events via webhook triggers. This allows your workflows to react to events from third-party services like GitHub, Stripe, or any platform that supports webhooks.
|
||||
Configure workflows to execute in response to external events via webhook triggers. This allows
|
||||
your workflows to react to events from third-party services like GitHub, Stripe, or any platform
|
||||
that supports webhooks.
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -226,4 +263,3 @@ Each workflow execution maintains a detailed context that includes:
|
||||
- **Timeout Limits** - Function blocks have configurable timeout limits to prevent long-running operations from blocking execution.
|
||||
|
||||
By understanding these execution principles, you can design more efficient and effective workflows in Sim Studio.
|
||||
|
||||
@@ -4,21 +4,13 @@ description: Creating iterative processes with loops in Sim Studio
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
Loops are a powerful feature in Sim Studio that allow you to create iterative processes, implement feedback mechanisms, and build more sophisticated workflows.
|
||||
|
||||
<div>
|
||||
<video
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="w-full"
|
||||
src="/loops.mp4"
|
||||
>
|
||||
</video>
|
||||
<video autoPlay loop muted playsInline className="w-full" src="/loops.mp4"></video>
|
||||
</div>
|
||||
|
||||
## What Are Loops?
|
||||
@@ -31,7 +23,8 @@ Loops in Sim Studio allow a group of blocks to execute repeatedly, with each ite
|
||||
- **Conditional Processing**: Continue execution until specific criteria are met
|
||||
|
||||
<Callout type="info">
|
||||
Loops are particularly powerful for AI workflows, allowing you to implement techniques like chain-of-thought reasoning, recursive refinement, and multi-step problem solving.
|
||||
Loops are particularly powerful for AI workflows, allowing you to implement techniques like
|
||||
chain-of-thought reasoning, recursive refinement, and multi-step problem solving.
|
||||
</Callout>
|
||||
|
||||
## Creating Loops
|
||||
@@ -49,7 +42,8 @@ To create a loop in your workflow:
|
||||
<strong>Configure Loop Settings</strong>: Set iteration limits and conditions
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Create Feedback Connections</strong>: Connect outputs from later blocks back to earlier blocks
|
||||
<strong>Create Feedback Connections</strong>: Connect outputs from later blocks back to earlier
|
||||
blocks
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -63,7 +57,8 @@ When configuring a loop, you can set several important parameters:
|
||||
- **Minimum Iterations**: The minimum number of times the loop must execute before checking conditions
|
||||
|
||||
<Callout type="warning">
|
||||
Always set a reasonable maximum iteration limit to prevent infinite loops. The default limit of 5 iterations is a good starting point for most workflows.
|
||||
Always set a reasonable maximum iteration limit to prevent infinite loops. The default limit of 5
|
||||
iterations is a good starting point for most workflows.
|
||||
</Callout>
|
||||
|
||||
### Loop Conditions
|
||||
@@ -146,12 +141,13 @@ Loops enable powerful workflow patterns:
|
||||
|
||||
### Iterative Refinement
|
||||
|
||||
<div className="p-4 border rounded-md mb-4">
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Example: Content Refinement</h4>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400 mb-2">
|
||||
Create a loop where an Agent block generates content, an Evaluator block assesses it, and a Function block decides whether to continue refining.
|
||||
<div className="mb-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
Create a loop where an Agent block generates content, an Evaluator block assesses it, and a
|
||||
Function block decides whether to continue refining.
|
||||
</div>
|
||||
<ol className="text-sm list-decimal pl-5">
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates initial content</li>
|
||||
<li>Evaluator scores the content</li>
|
||||
<li>Function analyzes score and provides feedback</li>
|
||||
@@ -162,12 +158,12 @@ Loops enable powerful workflow patterns:
|
||||
|
||||
### Batch Processing
|
||||
|
||||
<div className="p-4 border rounded-md mb-4">
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Example: Data Processing Pipeline</h4>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400 mb-2">
|
||||
<div className="mb-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
Process a collection of items one at a time through a series of blocks.
|
||||
</div>
|
||||
<ol className="text-sm list-decimal pl-5">
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Function block extracts the next item from a collection</li>
|
||||
<li>Processing blocks operate on the single item</li>
|
||||
<li>Results are accumulated in a Memory block</li>
|
||||
@@ -177,12 +173,12 @@ Loops enable powerful workflow patterns:
|
||||
|
||||
### Recursive Problem Solving
|
||||
|
||||
<div className="p-4 border rounded-md mb-4">
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Example: Multi-step Reasoning</h4>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400 mb-2">
|
||||
<div className="mb-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
Implement a recursive approach to complex problem solving.
|
||||
</div>
|
||||
<ol className="text-sm list-decimal pl-5">
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent analyzes the current problem state</li>
|
||||
<li>Function block implements a step in the solution</li>
|
||||
<li>Condition block checks if the problem is solved</li>
|
||||
@@ -201,7 +197,8 @@ To use loops effectively in your workflows:
|
||||
- **Test Thoroughly**: Verify that loops terminate as expected in all scenarios
|
||||
|
||||
<Callout type="warning">
|
||||
Loops with many blocks or complex operations can impact performance. Consider optimizing individual blocks if your loops need many iterations.
|
||||
Loops with many blocks or complex operations can impact performance. Consider optimizing
|
||||
individual blocks if your loops need many iterations.
|
||||
</Callout>
|
||||
|
||||
## Loop Debugging
|
||||
@@ -214,4 +211,4 @@ When debugging loops in your workflows:
|
||||
- **Use Console Logging**: Add console.log statements in Function blocks to track loop progress
|
||||
- **Monitor Memory Usage**: Watch for growing data structures that might cause performance issues
|
||||
|
||||
By mastering loops, you can create much more sophisticated and powerful workflows in Sim Studio.
|
||||
By mastering loops, you can create much more sophisticated and powerful workflows in Sim Studio.
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"title": "Execution",
|
||||
"pages": ["basics", "loops", "advanced"]
|
||||
}
|
||||
}
|
||||
101
apps/docs/content/docs/getting-started/index.mdx
Normal file
101
apps/docs/content/docs/getting-started/index.mdx
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
title: Getting Started
|
||||
description: Build, test, and optimize your agentic workflows
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { File, Files, Folder } from 'fumadocs-ui/components/files'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import {
|
||||
AgentIcon,
|
||||
ApiIcon,
|
||||
ChartBarIcon,
|
||||
CodeIcon,
|
||||
ConditionalIcon,
|
||||
ConnectIcon,
|
||||
ExaAIIcon,
|
||||
FirecrawlIcon,
|
||||
GmailIcon,
|
||||
NotionIcon,
|
||||
PerplexityIcon,
|
||||
SlackIcon,
|
||||
} from '@/components/icons'
|
||||
|
||||
Sim Studio is a powerful, user-friendly platform for building, testing, and optimizing your agentic workflows. This documentation will help you understand how to use the various components of Sim Studio to create sophisticated agent-based applications.
|
||||
|
||||
<Callout type="info">
|
||||
This guide will walk you through the essential concepts and help you get started building your
|
||||
first workflow.
|
||||
</Callout>
|
||||
|
||||
## Core Components
|
||||
|
||||
Sim Studio is built around two primary components:
|
||||
|
||||
### Blocks
|
||||
|
||||
Blocks are the fundamental building elements of your workflows. Each block serves a specific purpose:
|
||||
|
||||
<Files>
|
||||
<File
|
||||
name="Agent Block"
|
||||
icon={<AgentIcon className="h-4 w-4" />}
|
||||
annotation="Create AI agents using any LLM provider"
|
||||
/>
|
||||
<File
|
||||
name="API Block"
|
||||
icon={<ApiIcon className="h-4 w-4" />}
|
||||
annotation="Connect to external services and APIs"
|
||||
/>
|
||||
<File
|
||||
name="Condition Block"
|
||||
icon={<ConditionalIcon className="h-4 w-4" />}
|
||||
annotation="Add conditional branching to your workflows"
|
||||
/>
|
||||
<File
|
||||
name="Function Block"
|
||||
icon={<CodeIcon className="h-4 w-4" />}
|
||||
annotation="Execute custom JavaScript/TypeScript code"
|
||||
/>
|
||||
<File
|
||||
name="Evaluator Block"
|
||||
icon={<ChartBarIcon className="h-4 w-4" />}
|
||||
annotation="Assess responses against defined criteria"
|
||||
/>
|
||||
<File
|
||||
name="Router Block"
|
||||
icon={<ConnectIcon className="h-4 w-4" />}
|
||||
annotation="Direct workflow execution based on input analysis"
|
||||
/>
|
||||
</Files>
|
||||
|
||||
### Tools
|
||||
|
||||
Tools extend the capabilities of agents. They provide additional functionality for agents by enabling you to interface with your favorite data sources and take action (e.g posting on X, sending an email)
|
||||
|
||||
<Files>
|
||||
<File name="Gmail Tool" icon={<GmailIcon className="h-4 w-4" />} />
|
||||
<File name="Firecrawl Tool" icon={<FirecrawlIcon className="h-4 w-4" />} />
|
||||
<File name="Perplexity Tool" icon={<PerplexityIcon className="h-4 w-4" />} />
|
||||
<File name="Notion Tool" icon={<NotionIcon className="h-4 w-4" />} />
|
||||
<File name="Exa AI Tool" icon={<ExaAIIcon className="h-4 w-4" />} />
|
||||
<File name="Slack Tool" icon={<SlackIcon className="h-4 w-4" />} />
|
||||
</Files>
|
||||
|
||||
## Getting Started
|
||||
|
||||
<Steps>
|
||||
<Step title="Create a new workflow">
|
||||
Start by creating a new workflow in the Sim Studio dashboard.
|
||||
</Step>
|
||||
<Step title="Add your first block">Drag and drop a block from the sidebar onto the canvas.</Step>
|
||||
<Step title="Configure the block">
|
||||
Set up the block's parameters and inputs according to your needs.
|
||||
</Step>
|
||||
<Step title="Connect blocks">
|
||||
Create connections between blocks to define the flow of data and execution.
|
||||
</Step>
|
||||
<Step title="Test your workflow">Run your workflow with test inputs to verify its behavior.</Step>
|
||||
</Steps>
|
||||
@@ -4,7 +4,7 @@ description: The UI for agents
|
||||
---
|
||||
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Files, Folder, File } from 'fumadocs-ui/components/files'
|
||||
import { File, Files, Folder } from 'fumadocs-ui/components/files'
|
||||
import { Features } from '@/components/ui/features'
|
||||
|
||||
Sim Studio is a powerful platform for building, testing, and optimizing agentic workflows. It provides developers with intuitive tools to design sophisticated agent-based applications through a visual interface. Whether you're prototyping a simple AI assistant or building complex multi-agent systems, Sim Studio offers the flexibility and performance needed for modern AI applications.
|
||||
@@ -29,16 +29,12 @@ Existing frameworks abstract away provider-specific features, forcing developers
|
||||
|
||||
Sim Studio stays <span className="text-highlight">close to provider definitions</span>, directly exposing the parameters that matter:
|
||||
|
||||
<ul className="list-disc pl-6 space-y-2 highlight-markers">
|
||||
<ul className="highlight-markers list-disc space-y-2 pl-6">
|
||||
<li>System prompts and instructions with native formatting</li>
|
||||
<li>
|
||||
Tool definitions and access patterns that match provider implementations
|
||||
</li>
|
||||
<li>Tool definitions and access patterns that match provider implementations</li>
|
||||
<li>Temperature and sampling parameters with their full range of options</li>
|
||||
<li>Structured output formatting that aligns with provider capabilities</li>
|
||||
<li>
|
||||
Model selection and configuration with provider-specific optimizations
|
||||
</li>
|
||||
<li>Model selection and configuration with provider-specific optimizations</li>
|
||||
</ul>
|
||||
|
||||
This approach gives you full control over agent behavior without unnecessary complexity. You leverage each provider's full capabilities without sacrificing the convenience of a unified platform.
|
||||
@@ -67,14 +63,9 @@ Existing solutions provide limited visibility into agent performance, making it
|
||||
|
||||
Sim Studio provides <span className="text-highlight">full visibility into agent performance</span> with integrated observability:
|
||||
|
||||
<ul className="list-disc pl-6 space-y-2 highlight-markers">
|
||||
<li>
|
||||
Detailed execution logs capturing every interaction between agents and
|
||||
models
|
||||
</li>
|
||||
<li>
|
||||
Latency tracing with span visualization to identify performance bottlenecks
|
||||
</li>
|
||||
<ul className="highlight-markers list-disc space-y-2 pl-6">
|
||||
<li>Detailed execution logs capturing every interaction between agents and models</li>
|
||||
<li>Latency tracing with span visualization to identify performance bottlenecks</li>
|
||||
<li>Cost tracking and optimization to prevent budget overruns</li>
|
||||
<li>Error analysis and debugging tools for complex workflows</li>
|
||||
<li>Performance comparisons across different model configurations</li>
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"title": "Introduction",
|
||||
"pages": ["index"]
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,10 @@
|
||||
"---Execution---",
|
||||
"execution",
|
||||
"---Advanced---",
|
||||
"./variables/index"
|
||||
"./variables/index",
|
||||
"---SDKs---",
|
||||
"./sdks/python",
|
||||
"./sdks/typescript"
|
||||
],
|
||||
"defaultOpen": true
|
||||
}
|
||||
409
apps/docs/content/docs/sdks/python.mdx
Normal file
409
apps/docs/content/docs/sdks/python.mdx
Normal file
@@ -0,0 +1,409 @@
|
||||
---
|
||||
title: Python SDK
|
||||
description: The official Python SDK for Sim Studio
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
The official Python SDK for Sim Studio allows you to execute workflows programmatically from your Python applications.
|
||||
|
||||
<Callout type="info">
|
||||
The Python SDK supports Python 3.8+ and provides synchronous workflow execution. All workflow executions are currently synchronous.
|
||||
</Callout>
|
||||
|
||||
## Installation
|
||||
|
||||
Install the SDK using pip:
|
||||
|
||||
```bash
|
||||
pip install simstudio-sdk
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
Here's a simple example to get you started:
|
||||
|
||||
```python
|
||||
from simstudio import SimStudioClient
|
||||
|
||||
# Initialize the client
|
||||
client = SimStudioClient(
|
||||
api_key="your-api-key-here",
|
||||
base_url="https://simstudio.ai" # optional, defaults to https://simstudio.ai
|
||||
)
|
||||
|
||||
# Execute a workflow
|
||||
try:
|
||||
result = client.execute_workflow("workflow-id")
|
||||
print("Workflow executed successfully:", result)
|
||||
except Exception as error:
|
||||
print("Workflow execution failed:", error)
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
### SimStudioClient
|
||||
|
||||
#### Constructor
|
||||
|
||||
```python
|
||||
SimStudioClient(api_key: str, base_url: str = "https://simstudio.ai")
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `api_key` (str): Your Sim Studio API key
|
||||
- `base_url` (str, optional): Base URL for the Sim Studio API
|
||||
|
||||
#### Methods
|
||||
|
||||
##### execute_workflow()
|
||||
|
||||
Execute a workflow with optional input data.
|
||||
|
||||
```python
|
||||
result = client.execute_workflow(
|
||||
"workflow-id",
|
||||
input_data={"message": "Hello, world!"},
|
||||
timeout=30.0 # 30 seconds
|
||||
)
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflow_id` (str): The ID of the workflow to execute
|
||||
- `input_data` (dict, optional): Input data to pass to the workflow
|
||||
- `timeout` (float, optional): Timeout in seconds (default: 30.0)
|
||||
|
||||
**Returns:** `WorkflowExecutionResult`
|
||||
|
||||
##### get_workflow_status()
|
||||
|
||||
Get the status of a workflow (deployment status, etc.).
|
||||
|
||||
```python
|
||||
status = client.get_workflow_status("workflow-id")
|
||||
print("Is deployed:", status.is_deployed)
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflow_id` (str): The ID of the workflow
|
||||
|
||||
**Returns:** `WorkflowStatus`
|
||||
|
||||
##### validate_workflow()
|
||||
|
||||
Validate that a workflow is ready for execution.
|
||||
|
||||
```python
|
||||
is_ready = client.validate_workflow("workflow-id")
|
||||
if is_ready:
|
||||
# Workflow is deployed and ready
|
||||
pass
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflow_id` (str): The ID of the workflow
|
||||
|
||||
**Returns:** `bool`
|
||||
|
||||
##### execute_workflow_sync()
|
||||
|
||||
<Callout type="info">
|
||||
Currently, this method is identical to `execute_workflow()` since all executions are synchronous. This method is provided for future compatibility when asynchronous execution is added.
|
||||
</Callout>
|
||||
|
||||
Execute a workflow (currently synchronous, same as `execute_workflow()`).
|
||||
|
||||
```python
|
||||
result = client.execute_workflow_sync(
|
||||
"workflow-id",
|
||||
input_data={"data": "some input"},
|
||||
timeout=60.0
|
||||
)
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflow_id` (str): The ID of the workflow to execute
|
||||
- `input_data` (dict, optional): Input data to pass to the workflow
|
||||
- `timeout` (float): Timeout for the initial request in seconds
|
||||
|
||||
**Returns:** `WorkflowExecutionResult`
|
||||
|
||||
##### set_api_key()
|
||||
|
||||
Update the API key.
|
||||
|
||||
```python
|
||||
client.set_api_key("new-api-key")
|
||||
```
|
||||
|
||||
##### set_base_url()
|
||||
|
||||
Update the base URL.
|
||||
|
||||
```python
|
||||
client.set_base_url("https://my-custom-domain.com")
|
||||
```
|
||||
|
||||
##### close()
|
||||
|
||||
Close the underlying HTTP session.
|
||||
|
||||
```python
|
||||
client.close()
|
||||
```
|
||||
|
||||
## Data Classes
|
||||
|
||||
### WorkflowExecutionResult
|
||||
|
||||
```python
|
||||
@dataclass
|
||||
class WorkflowExecutionResult:
|
||||
success: bool
|
||||
output: Optional[Any] = None
|
||||
error: Optional[str] = None
|
||||
logs: Optional[List[Any]] = None
|
||||
metadata: Optional[Dict[str, Any]] = None
|
||||
trace_spans: Optional[List[Any]] = None
|
||||
total_duration: Optional[float] = None
|
||||
```
|
||||
|
||||
### WorkflowStatus
|
||||
|
||||
```python
|
||||
@dataclass
|
||||
class WorkflowStatus:
|
||||
is_deployed: bool
|
||||
deployed_at: Optional[str] = None
|
||||
is_published: bool = False
|
||||
needs_redeployment: bool = False
|
||||
```
|
||||
|
||||
### SimStudioError
|
||||
|
||||
```python
|
||||
class SimStudioError(Exception):
|
||||
def __init__(self, message: str, code: Optional[str] = None, status: Optional[int] = None):
|
||||
super().__init__(message)
|
||||
self.code = code
|
||||
self.status = status
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Workflow Execution
|
||||
|
||||
<Steps>
|
||||
<Step title="Initialize the client">
|
||||
Set up the SimStudioClient with your API key.
|
||||
</Step>
|
||||
<Step title="Validate the workflow">
|
||||
Check if the workflow is deployed and ready for execution.
|
||||
</Step>
|
||||
<Step title="Execute the workflow">
|
||||
Run the workflow with your input data.
|
||||
</Step>
|
||||
<Step title="Handle the result">
|
||||
Process the execution result and handle any errors.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
```python
|
||||
import os
|
||||
from simstudio import SimStudioClient
|
||||
|
||||
client = SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY"))
|
||||
|
||||
def run_workflow():
|
||||
try:
|
||||
# Check if workflow is ready
|
||||
is_ready = client.validate_workflow("my-workflow-id")
|
||||
if not is_ready:
|
||||
raise Exception("Workflow is not deployed or ready")
|
||||
|
||||
# Execute the workflow
|
||||
result = client.execute_workflow(
|
||||
"my-workflow-id",
|
||||
input_data={
|
||||
"message": "Process this data",
|
||||
"user_id": "12345"
|
||||
}
|
||||
)
|
||||
|
||||
if result.success:
|
||||
print("Output:", result.output)
|
||||
print("Duration:", result.metadata.get("duration") if result.metadata else None)
|
||||
else:
|
||||
print("Workflow failed:", result.error)
|
||||
|
||||
except Exception as error:
|
||||
print("Error:", error)
|
||||
|
||||
run_workflow()
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
Handle different types of errors that may occur during workflow execution:
|
||||
|
||||
```python
|
||||
from simstudio import SimStudioClient, SimStudioError
|
||||
import os
|
||||
|
||||
client = SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY"))
|
||||
|
||||
def execute_with_error_handling():
|
||||
try:
|
||||
result = client.execute_workflow("workflow-id")
|
||||
return result
|
||||
except SimStudioError as error:
|
||||
if error.code == "UNAUTHORIZED":
|
||||
print("Invalid API key")
|
||||
elif error.code == "TIMEOUT":
|
||||
print("Workflow execution timed out")
|
||||
elif error.code == "USAGE_LIMIT_EXCEEDED":
|
||||
print("Usage limit exceeded")
|
||||
elif error.code == "INVALID_JSON":
|
||||
print("Invalid JSON in request body")
|
||||
else:
|
||||
print(f"Workflow error: {error}")
|
||||
raise
|
||||
except Exception as error:
|
||||
print(f"Unexpected error: {error}")
|
||||
raise
|
||||
```
|
||||
|
||||
### Context Manager Usage
|
||||
|
||||
Use the client as a context manager to automatically handle resource cleanup:
|
||||
|
||||
```python
|
||||
from simstudio import SimStudioClient
|
||||
import os
|
||||
|
||||
# Using context manager to automatically close the session
|
||||
with SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY")) as client:
|
||||
result = client.execute_workflow("workflow-id")
|
||||
print("Result:", result)
|
||||
# Session is automatically closed here
|
||||
```
|
||||
|
||||
### Batch Workflow Execution
|
||||
|
||||
Execute multiple workflows efficiently:
|
||||
|
||||
```python
|
||||
from simstudio import SimStudioClient
|
||||
import os
|
||||
|
||||
client = SimStudioClient(api_key=os.getenv("SIMSTUDIO_API_KEY"))
|
||||
|
||||
def execute_workflows_batch(workflow_data_pairs):
|
||||
"""Execute multiple workflows with different input data."""
|
||||
results = []
|
||||
|
||||
for workflow_id, input_data in workflow_data_pairs:
|
||||
try:
|
||||
# Validate workflow before execution
|
||||
if not client.validate_workflow(workflow_id):
|
||||
print(f"Skipping {workflow_id}: not deployed")
|
||||
continue
|
||||
|
||||
result = client.execute_workflow(workflow_id, input_data)
|
||||
results.append({
|
||||
"workflow_id": workflow_id,
|
||||
"success": result.success,
|
||||
"output": result.output,
|
||||
"error": result.error
|
||||
})
|
||||
|
||||
except Exception as error:
|
||||
results.append({
|
||||
"workflow_id": workflow_id,
|
||||
"success": False,
|
||||
"error": str(error)
|
||||
})
|
||||
|
||||
return results
|
||||
|
||||
# Example usage
|
||||
workflows = [
|
||||
("workflow-1", {"type": "analysis", "data": "sample1"}),
|
||||
("workflow-2", {"type": "processing", "data": "sample2"}),
|
||||
]
|
||||
|
||||
results = execute_workflows_batch(workflows)
|
||||
for result in results:
|
||||
print(f"Workflow {result['workflow_id']}: {'Success' if result['success'] else 'Failed'}")
|
||||
```
|
||||
|
||||
### Environment Configuration
|
||||
|
||||
Configure the client using environment variables:
|
||||
|
||||
<Tabs items={['Development', 'Production']}>
|
||||
<Tab value="Development">
|
||||
```python
|
||||
import os
|
||||
from simstudio import SimStudioClient
|
||||
|
||||
# Development configuration
|
||||
client = SimStudioClient(
|
||||
api_key=os.getenv("SIMSTUDIO_API_KEY"),
|
||||
base_url=os.getenv("SIMSTUDIO_BASE_URL", "https://simstudio.ai")
|
||||
)
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="Production">
|
||||
```python
|
||||
import os
|
||||
from simstudio import SimStudioClient
|
||||
|
||||
# Production configuration with error handling
|
||||
api_key = os.getenv("SIMSTUDIO_API_KEY")
|
||||
if not api_key:
|
||||
raise ValueError("SIMSTUDIO_API_KEY environment variable is required")
|
||||
|
||||
client = SimStudioClient(
|
||||
api_key=api_key,
|
||||
base_url=os.getenv("SIMSTUDIO_BASE_URL", "https://simstudio.ai")
|
||||
)
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Getting Your API Key
|
||||
|
||||
<Steps>
|
||||
<Step title="Log in to Sim Studio">
|
||||
Navigate to [Sim Studio](https://simstudio.ai) and log in to your account.
|
||||
</Step>
|
||||
<Step title="Open your workflow">
|
||||
Navigate to the workflow you want to execute programmatically.
|
||||
</Step>
|
||||
<Step title="Deploy your workflow">
|
||||
Click on "Deploy" to deploy your workflow if it hasn't been deployed yet.
|
||||
</Step>
|
||||
<Step title="Create or select an API key">
|
||||
During the deployment process, select or create an API key.
|
||||
</Step>
|
||||
<Step title="Copy the API key">
|
||||
Copy the API key to use in your Python application.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
<Callout type="warning">
|
||||
Keep your API key secure and never commit it to version control. Use environment variables or secure configuration management.
|
||||
</Callout>
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.8+
|
||||
- requests >= 2.25.0
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
598
apps/docs/content/docs/sdks/typescript.mdx
Normal file
598
apps/docs/content/docs/sdks/typescript.mdx
Normal file
@@ -0,0 +1,598 @@
|
||||
---
|
||||
title: TypeScript/JavaScript SDK
|
||||
description: The official TypeScript/JavaScript SDK for Sim Studio
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
The official TypeScript/JavaScript SDK for Sim Studio allows you to execute workflows programmatically from your Node.js applications, web applications, and other JavaScript environments.
|
||||
|
||||
<Callout type="info">
|
||||
The TypeScript SDK provides full type safety and supports both Node.js and browser environments. All workflow executions are currently synchronous.
|
||||
</Callout>
|
||||
|
||||
## Installation
|
||||
|
||||
Install the SDK using your preferred package manager:
|
||||
|
||||
<Tabs items={['npm', 'yarn', 'bun']}>
|
||||
<Tab value="npm">
|
||||
```bash
|
||||
npm install simstudio-ts-sdk
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="yarn">
|
||||
```bash
|
||||
yarn add simstudio-ts-sdk
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="bun">
|
||||
```bash
|
||||
bun add simstudio-ts-sdk
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Quick Start
|
||||
|
||||
Here's a simple example to get you started:
|
||||
|
||||
```typescript
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
|
||||
// Initialize the client
|
||||
const client = new SimStudioClient({
|
||||
apiKey: 'your-api-key-here',
|
||||
baseUrl: 'https://simstudio.ai' // optional, defaults to https://simstudio.ai
|
||||
});
|
||||
|
||||
// Execute a workflow
|
||||
try {
|
||||
const result = await client.executeWorkflow('workflow-id');
|
||||
console.log('Workflow executed successfully:', result);
|
||||
} catch (error) {
|
||||
console.error('Workflow execution failed:', error);
|
||||
}
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
### SimStudioClient
|
||||
|
||||
#### Constructor
|
||||
|
||||
```typescript
|
||||
new SimStudioClient(config: SimStudioConfig)
|
||||
```
|
||||
|
||||
**Configuration:**
|
||||
- `config.apiKey` (string): Your Sim Studio API key
|
||||
- `config.baseUrl` (string, optional): Base URL for the Sim Studio API (defaults to `https://simstudio.ai`)
|
||||
|
||||
#### Methods
|
||||
|
||||
##### executeWorkflow()
|
||||
|
||||
Execute a workflow with optional input data.
|
||||
|
||||
```typescript
|
||||
const result = await client.executeWorkflow('workflow-id', {
|
||||
input: { message: 'Hello, world!' },
|
||||
timeout: 30000 // 30 seconds
|
||||
});
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflowId` (string): The ID of the workflow to execute
|
||||
- `options` (ExecutionOptions, optional):
|
||||
- `input` (any): Input data to pass to the workflow
|
||||
- `timeout` (number): Timeout in milliseconds (default: 30000)
|
||||
|
||||
**Returns:** `Promise<WorkflowExecutionResult>`
|
||||
|
||||
##### getWorkflowStatus()
|
||||
|
||||
Get the status of a workflow (deployment status, etc.).
|
||||
|
||||
```typescript
|
||||
const status = await client.getWorkflowStatus('workflow-id');
|
||||
console.log('Is deployed:', status.isDeployed);
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflowId` (string): The ID of the workflow
|
||||
|
||||
**Returns:** `Promise<WorkflowStatus>`
|
||||
|
||||
##### validateWorkflow()
|
||||
|
||||
Validate that a workflow is ready for execution.
|
||||
|
||||
```typescript
|
||||
const isReady = await client.validateWorkflow('workflow-id');
|
||||
if (isReady) {
|
||||
// Workflow is deployed and ready
|
||||
}
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflowId` (string): The ID of the workflow
|
||||
|
||||
**Returns:** `Promise<boolean>`
|
||||
|
||||
##### executeWorkflowSync()
|
||||
|
||||
<Callout type="info">
|
||||
Currently, this method is identical to `executeWorkflow()` since all executions are synchronous. This method is provided for future compatibility when asynchronous execution is added.
|
||||
</Callout>
|
||||
|
||||
Execute a workflow (currently synchronous, same as `executeWorkflow()`).
|
||||
|
||||
```typescript
|
||||
const result = await client.executeWorkflowSync('workflow-id', {
|
||||
input: { data: 'some input' },
|
||||
timeout: 60000
|
||||
});
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `workflowId` (string): The ID of the workflow to execute
|
||||
- `options` (ExecutionOptions, optional):
|
||||
- `input` (any): Input data to pass to the workflow
|
||||
- `timeout` (number): Timeout for the initial request in milliseconds
|
||||
|
||||
**Returns:** `Promise<WorkflowExecutionResult>`
|
||||
|
||||
##### setApiKey()
|
||||
|
||||
Update the API key.
|
||||
|
||||
```typescript
|
||||
client.setApiKey('new-api-key');
|
||||
```
|
||||
|
||||
##### setBaseUrl()
|
||||
|
||||
Update the base URL.
|
||||
|
||||
```typescript
|
||||
client.setBaseUrl('https://my-custom-domain.com');
|
||||
```
|
||||
|
||||
## Types
|
||||
|
||||
### WorkflowExecutionResult
|
||||
|
||||
```typescript
|
||||
interface WorkflowExecutionResult {
|
||||
success: boolean;
|
||||
output?: any;
|
||||
error?: string;
|
||||
logs?: any[];
|
||||
metadata?: {
|
||||
duration?: number;
|
||||
executionId?: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
traceSpans?: any[];
|
||||
totalDuration?: number;
|
||||
}
|
||||
```
|
||||
|
||||
### WorkflowStatus
|
||||
|
||||
```typescript
|
||||
interface WorkflowStatus {
|
||||
isDeployed: boolean;
|
||||
deployedAt?: string;
|
||||
isPublished: boolean;
|
||||
needsRedeployment: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
### SimStudioError
|
||||
|
||||
```typescript
|
||||
class SimStudioError extends Error {
|
||||
code?: string;
|
||||
status?: number;
|
||||
}
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Workflow Execution
|
||||
|
||||
<Steps>
|
||||
<Step title="Initialize the client">
|
||||
Set up the SimStudioClient with your API key.
|
||||
</Step>
|
||||
<Step title="Validate the workflow">
|
||||
Check if the workflow is deployed and ready for execution.
|
||||
</Step>
|
||||
<Step title="Execute the workflow">
|
||||
Run the workflow with your input data.
|
||||
</Step>
|
||||
<Step title="Handle the result">
|
||||
Process the execution result and handle any errors.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
```typescript
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
|
||||
const client = new SimStudioClient({
|
||||
apiKey: process.env.SIMSTUDIO_API_KEY!
|
||||
});
|
||||
|
||||
async function runWorkflow() {
|
||||
try {
|
||||
// Check if workflow is ready
|
||||
const isReady = await client.validateWorkflow('my-workflow-id');
|
||||
if (!isReady) {
|
||||
throw new Error('Workflow is not deployed or ready');
|
||||
}
|
||||
|
||||
// Execute the workflow
|
||||
const result = await client.executeWorkflow('my-workflow-id', {
|
||||
input: {
|
||||
message: 'Process this data',
|
||||
userId: '12345'
|
||||
}
|
||||
});
|
||||
|
||||
if (result.success) {
|
||||
console.log('Output:', result.output);
|
||||
console.log('Duration:', result.metadata?.duration);
|
||||
} else {
|
||||
console.error('Workflow failed:', result.error);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
}
|
||||
}
|
||||
|
||||
runWorkflow();
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
Handle different types of errors that may occur during workflow execution:
|
||||
|
||||
```typescript
|
||||
import { SimStudioClient, SimStudioError } from 'simstudio-ts-sdk';
|
||||
|
||||
const client = new SimStudioClient({
|
||||
apiKey: process.env.SIMSTUDIO_API_KEY!
|
||||
});
|
||||
|
||||
async function executeWithErrorHandling() {
|
||||
try {
|
||||
const result = await client.executeWorkflow('workflow-id');
|
||||
return result;
|
||||
} catch (error) {
|
||||
if (error instanceof SimStudioError) {
|
||||
switch (error.code) {
|
||||
case 'UNAUTHORIZED':
|
||||
console.error('Invalid API key');
|
||||
break;
|
||||
case 'TIMEOUT':
|
||||
console.error('Workflow execution timed out');
|
||||
break;
|
||||
case 'USAGE_LIMIT_EXCEEDED':
|
||||
console.error('Usage limit exceeded');
|
||||
break;
|
||||
case 'INVALID_JSON':
|
||||
console.error('Invalid JSON in request body');
|
||||
break;
|
||||
default:
|
||||
console.error('Workflow error:', error.message);
|
||||
}
|
||||
} else {
|
||||
console.error('Unexpected error:', error);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Environment Configuration
|
||||
|
||||
Configure the client using environment variables:
|
||||
|
||||
<Tabs items={['Development', 'Production']}>
|
||||
<Tab value="Development">
|
||||
```typescript
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
|
||||
// Development configuration
|
||||
const apiKey = process.env.SIMSTUDIO_API_KEY;
|
||||
if (!apiKey) {
|
||||
throw new Error('SIMSTUDIO_API_KEY environment variable is required');
|
||||
}
|
||||
|
||||
const client = new SimStudioClient({
|
||||
apiKey,
|
||||
baseUrl: process.env.SIMSTUDIO_BASE_URL // optional
|
||||
});
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="Production">
|
||||
```typescript
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
|
||||
// Production configuration with validation
|
||||
const apiKey = process.env.SIMSTUDIO_API_KEY;
|
||||
if (!apiKey) {
|
||||
throw new Error('SIMSTUDIO_API_KEY environment variable is required');
|
||||
}
|
||||
|
||||
const client = new SimStudioClient({
|
||||
apiKey,
|
||||
baseUrl: process.env.SIMSTUDIO_BASE_URL || 'https://simstudio.ai'
|
||||
});
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Node.js Express Integration
|
||||
|
||||
Integrate with an Express.js server:
|
||||
|
||||
```typescript
|
||||
import express from 'express';
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
|
||||
const app = express();
|
||||
const client = new SimStudioClient({
|
||||
apiKey: process.env.SIMSTUDIO_API_KEY!
|
||||
});
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
app.post('/execute-workflow', async (req, res) => {
|
||||
try {
|
||||
const { workflowId, input } = req.body;
|
||||
|
||||
const result = await client.executeWorkflow(workflowId, {
|
||||
input,
|
||||
timeout: 60000
|
||||
});
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
data: result
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Workflow execution error:', error);
|
||||
res.status(500).json({
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Unknown error'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log('Server running on port 3000');
|
||||
});
|
||||
```
|
||||
|
||||
### Next.js API Route
|
||||
|
||||
Use with Next.js API routes:
|
||||
|
||||
```typescript
|
||||
// pages/api/workflow.ts or app/api/workflow/route.ts
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
|
||||
const client = new SimStudioClient({
|
||||
apiKey: process.env.SIMSTUDIO_API_KEY!
|
||||
});
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse
|
||||
) {
|
||||
if (req.method !== 'POST') {
|
||||
return res.status(405).json({ error: 'Method not allowed' });
|
||||
}
|
||||
|
||||
try {
|
||||
const { workflowId, input } = req.body;
|
||||
|
||||
const result = await client.executeWorkflow(workflowId, {
|
||||
input,
|
||||
timeout: 30000
|
||||
});
|
||||
|
||||
res.status(200).json(result);
|
||||
} catch (error) {
|
||||
console.error('Error executing workflow:', error);
|
||||
res.status(500).json({
|
||||
error: 'Failed to execute workflow'
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Browser Usage
|
||||
|
||||
Use in the browser (with proper CORS configuration):
|
||||
|
||||
```typescript
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
|
||||
// Note: In production, use a proxy server to avoid exposing API keys
|
||||
const client = new SimStudioClient({
|
||||
apiKey: 'your-public-api-key', // Use with caution in browser
|
||||
baseUrl: 'https://simstudio.ai'
|
||||
});
|
||||
|
||||
async function executeClientSideWorkflow() {
|
||||
try {
|
||||
const result = await client.executeWorkflow('workflow-id', {
|
||||
input: {
|
||||
userInput: 'Hello from browser'
|
||||
}
|
||||
});
|
||||
|
||||
console.log('Workflow result:', result);
|
||||
|
||||
// Update UI with result
|
||||
document.getElementById('result')!.textContent =
|
||||
JSON.stringify(result.output, null, 2);
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// Attach to button click
|
||||
document.getElementById('executeBtn')?.addEventListener('click', executeClientSideWorkflow);
|
||||
```
|
||||
|
||||
<Callout type="warning">
|
||||
When using the SDK in the browser, be careful not to expose sensitive API keys. Consider using a backend proxy or public API keys with limited permissions.
|
||||
</Callout>
|
||||
|
||||
### React Hook Example
|
||||
|
||||
Create a custom React hook for workflow execution:
|
||||
|
||||
```typescript
|
||||
import { useState, useCallback } from 'react';
|
||||
import { SimStudioClient, WorkflowExecutionResult } from 'simstudio-ts-sdk';
|
||||
|
||||
const client = new SimStudioClient({
|
||||
apiKey: process.env.NEXT_PUBLIC_SIMSTUDIO_API_KEY!
|
||||
});
|
||||
|
||||
interface UseWorkflowResult {
|
||||
result: WorkflowExecutionResult | null;
|
||||
loading: boolean;
|
||||
error: Error | null;
|
||||
executeWorkflow: (workflowId: string, input?: any) => Promise<void>;
|
||||
}
|
||||
|
||||
export function useWorkflow(): UseWorkflowResult {
|
||||
const [result, setResult] = useState<WorkflowExecutionResult | null>(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<Error | null>(null);
|
||||
|
||||
const executeWorkflow = useCallback(async (workflowId: string, input?: any) => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
setResult(null);
|
||||
|
||||
try {
|
||||
const workflowResult = await client.executeWorkflow(workflowId, {
|
||||
input,
|
||||
timeout: 30000
|
||||
});
|
||||
setResult(workflowResult);
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err : new Error('Unknown error'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return {
|
||||
result,
|
||||
loading,
|
||||
error,
|
||||
executeWorkflow
|
||||
};
|
||||
}
|
||||
|
||||
// Usage in component
|
||||
function WorkflowComponent() {
|
||||
const { result, loading, error, executeWorkflow } = useWorkflow();
|
||||
|
||||
const handleExecute = () => {
|
||||
executeWorkflow('my-workflow-id', {
|
||||
message: 'Hello from React!'
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<button onClick={handleExecute} disabled={loading}>
|
||||
{loading ? 'Executing...' : 'Execute Workflow'}
|
||||
</button>
|
||||
|
||||
{error && <div>Error: {error.message}</div>}
|
||||
{result && (
|
||||
<div>
|
||||
<h3>Result:</h3>
|
||||
<pre>{JSON.stringify(result, null, 2)}</pre>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## Getting Your API Key
|
||||
|
||||
<Steps>
|
||||
<Step title="Log in to Sim Studio">
|
||||
Navigate to [Sim Studio](https://simstudio.ai) and log in to your account.
|
||||
</Step>
|
||||
<Step title="Open your workflow">
|
||||
Navigate to the workflow you want to execute programmatically.
|
||||
</Step>
|
||||
<Step title="Deploy your workflow">
|
||||
Click on "Deploy" to deploy your workflow if it hasn't been deployed yet.
|
||||
</Step>
|
||||
<Step title="Create or select an API key">
|
||||
During the deployment process, select or create an API key.
|
||||
</Step>
|
||||
<Step title="Copy the API key">
|
||||
Copy the API key to use in your TypeScript/JavaScript application.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
<Callout type="warning">
|
||||
Keep your API key secure and never commit it to version control. Use environment variables or secure configuration management.
|
||||
</Callout>
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js 16+
|
||||
- TypeScript 5.0+ (for TypeScript projects)
|
||||
|
||||
## TypeScript Support
|
||||
|
||||
The SDK is written in TypeScript and provides full type safety:
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SimStudioClient,
|
||||
WorkflowExecutionResult,
|
||||
WorkflowStatus,
|
||||
SimStudioError
|
||||
} from 'simstudio-ts-sdk';
|
||||
|
||||
// Type-safe client initialization
|
||||
const client: SimStudioClient = new SimStudioClient({
|
||||
apiKey: process.env.SIMSTUDIO_API_KEY!
|
||||
});
|
||||
|
||||
// Type-safe workflow execution
|
||||
const result: WorkflowExecutionResult = await client.executeWorkflow('workflow-id', {
|
||||
input: {
|
||||
message: 'Hello, TypeScript!'
|
||||
}
|
||||
});
|
||||
|
||||
// Type-safe status checking
|
||||
const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
@@ -13,30 +13,30 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
|
||||
|
||||
viewBox="0 -20.5 256 256"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
preserveAspectRatio="xMidYMid"
|
||||
viewBox='0 -20.5 256 256'
|
||||
version='1.1'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
xmlnsXlink='http://www.w3.org/1999/xlink'
|
||||
preserveAspectRatio='xMidYMid'
|
||||
>
|
||||
<g>
|
||||
<path
|
||||
d="M114.25873,2.70101695 L18.8604023,42.1756384 C13.5552723,44.3711638 13.6102328,51.9065311 18.9486282,54.0225085 L114.746142,92.0117514 C123.163769,95.3498757 132.537419,95.3498757 140.9536,92.0117514 L236.75256,54.0225085 C242.08951,51.9065311 242.145916,44.3711638 236.83934,42.1756384 L141.442459,2.70101695 C132.738459,-0.900338983 122.961284,-0.900338983 114.25873,2.70101695"
|
||||
fill="#FFBF00"
|
||||
></path>
|
||||
d='M114.25873,2.70101695 L18.8604023,42.1756384 C13.5552723,44.3711638 13.6102328,51.9065311 18.9486282,54.0225085 L114.746142,92.0117514 C123.163769,95.3498757 132.537419,95.3498757 140.9536,92.0117514 L236.75256,54.0225085 C242.08951,51.9065311 242.145916,44.3711638 236.83934,42.1756384 L141.442459,2.70101695 C132.738459,-0.900338983 122.961284,-0.900338983 114.25873,2.70101695'
|
||||
fill='#FFBF00'
|
||||
/>
|
||||
<path
|
||||
d="M136.349071,112.756863 L136.349071,207.659101 C136.349071,212.173089 140.900664,215.263892 145.096461,213.600615 L251.844122,172.166219 C254.281184,171.200072 255.879376,168.845451 255.879376,166.224705 L255.879376,71.3224678 C255.879376,66.8084791 251.327783,63.7176768 247.131986,65.3809537 L140.384325,106.815349 C137.94871,107.781496 136.349071,110.136118 136.349071,112.756863"
|
||||
fill="#26B5F8"
|
||||
></path>
|
||||
d='M136.349071,112.756863 L136.349071,207.659101 C136.349071,212.173089 140.900664,215.263892 145.096461,213.600615 L251.844122,172.166219 C254.281184,171.200072 255.879376,168.845451 255.879376,166.224705 L255.879376,71.3224678 C255.879376,66.8084791 251.327783,63.7176768 247.131986,65.3809537 L140.384325,106.815349 C137.94871,107.781496 136.349071,110.136118 136.349071,112.756863'
|
||||
fill='#26B5F8'
|
||||
/>
|
||||
<path
|
||||
d="M111.422771,117.65355 L79.742409,132.949912 L76.5257763,134.504714 L9.65047684,166.548104 C5.4112904,168.593211 0.000578531073,165.503855 0.000578531073,160.794612 L0.000578531073,71.7210757 C0.000578531073,70.0173017 0.874160452,68.5463864 2.04568588,67.4384994 C2.53454463,66.9481944 3.08848814,66.5446689 3.66412655,66.2250305 C5.26231864,65.2661153 7.54173107,65.0101153 9.47981017,65.7766689 L110.890522,105.957098 C116.045234,108.002206 116.450206,115.225166 111.422771,117.65355"
|
||||
fill="#ED3049"
|
||||
></path>
|
||||
d='M111.422771,117.65355 L79.742409,132.949912 L76.5257763,134.504714 L9.65047684,166.548104 C5.4112904,168.593211 0.000578531073,165.503855 0.000578531073,160.794612 L0.000578531073,71.7210757 C0.000578531073,70.0173017 0.874160452,68.5463864 2.04568588,67.4384994 C2.53454463,66.9481944 3.08848814,66.5446689 3.66412655,66.2250305 C5.26231864,65.2661153 7.54173107,65.0101153 9.47981017,65.7766689 L110.890522,105.957098 C116.045234,108.002206 116.450206,115.225166 111.422771,117.65355'
|
||||
fill='#ED3049'
|
||||
/>
|
||||
<path
|
||||
d="M111.422771,117.65355 L79.742409,132.949912 L2.04568588,67.4384994 C2.53454463,66.9481944 3.08848814,66.5446689 3.66412655,66.2250305 C5.26231864,65.2661153 7.54173107,65.0101153 9.47981017,65.7766689 L110.890522,105.957098 C116.045234,108.002206 116.450206,115.225166 111.422771,117.65355"
|
||||
fillOpacity="0.25"
|
||||
fill="#000000"
|
||||
></path>
|
||||
d='M111.422771,117.65355 L79.742409,132.949912 L2.04568588,67.4384994 C2.53454463,66.9481944 3.08848814,66.5446689 3.66412655,66.2250305 C5.26231864,65.2661153 7.54173107,65.0101153 9.47981017,65.7766689 L110.890522,105.957098 C116.045234,108.002206 116.450206,115.225166 111.422771,117.65355'
|
||||
fillOpacity='0.25'
|
||||
fill='#000000'
|
||||
/>
|
||||
</g>
|
||||
</svg>`}
|
||||
/>
|
||||
@@ -11,22 +11,22 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
x="0px"
|
||||
y="0px"
|
||||
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 1250 1250"
|
||||
enableBackground="new 0 0 1250 1250"
|
||||
xmlSpace="preserve"
|
||||
viewBox='0 0 1250 1250'
|
||||
enableBackground='new 0 0 1250 1250'
|
||||
xmlSpace='preserve'
|
||||
>
|
||||
<path
|
||||
fill="#FFFFFF"
|
||||
opacity="1.000000"
|
||||
stroke="none"
|
||||
d="
|
||||
fill='#FFFFFF'
|
||||
opacity='1.000000'
|
||||
stroke='none'
|
||||
d='
|
||||
M671.222290,1079.959839
|
||||
C671.176025,1077.962891 671.089233,1075.965820 671.089111,1073.968872
|
||||
C671.082825,918.318481 671.062683,762.668091 671.192322,607.017761
|
||||
@@ -52,13 +52,13 @@ M671.222290,1079.959839
|
||||
C782.578491,1017.306641 746.954346,1037.809570 711.333679,1058.318848
|
||||
C698.839661,1065.512573 686.367554,1072.744629 673.219116,1079.994141
|
||||
C672.109314,1080.006104 671.665771,1079.982910 671.222290,1079.959839
|
||||
z"
|
||||
z'
|
||||
/>
|
||||
<path
|
||||
fill="#FFFFFF"
|
||||
opacity="1.000000"
|
||||
stroke="none"
|
||||
d="
|
||||
fill='#FFFFFF'
|
||||
opacity='1.000000'
|
||||
stroke='none'
|
||||
d='
|
||||
M684.421631,400.605865
|
||||
C600.749390,352.376038 517.388306,304.342010 433.717010,256.129181
|
||||
C455.858643,243.338989 477.724731,230.689346 499.608948,218.071136
|
||||
@@ -79,13 +79,13 @@ M684.421631,400.605865
|
||||
C829.014954,484.959839 811.879517,474.190002 794.417969,464.012421
|
||||
C774.549316,452.431854 754.597900,440.993225 734.670959,429.512817
|
||||
C718.033508,419.927551 701.379517,410.370911 684.421631,400.605865
|
||||
z"
|
||||
z'
|
||||
/>
|
||||
<path
|
||||
fill="#FFFFFF"
|
||||
opacity="1.000000"
|
||||
stroke="none"
|
||||
d="
|
||||
fill='#FFFFFF'
|
||||
opacity='1.000000'
|
||||
stroke='none'
|
||||
d='
|
||||
M398.927063,451.754761
|
||||
C400.510162,450.940521 401.764893,450.328430 403.700867,449.383972
|
||||
C403.700867,452.154175 403.700897,454.096252 403.700897,456.038330
|
||||
@@ -104,7 +104,7 @@ M398.927063,451.754761
|
||||
C251.315567,739.849976 251.312408,640.200073 251.234558,540.550232
|
||||
C251.232254,537.601685 252.346344,536.241150 254.806610,534.827820
|
||||
C302.775909,507.271362 350.680695,479.602600 398.927063,451.754761
|
||||
z"
|
||||
z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
@@ -11,16 +11,16 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
version="1.0"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version='1.0'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
|
||||
|
||||
viewBox="0 0 150 150"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
viewBox='0 0 150 150'
|
||||
preserveAspectRatio='xMidYMid meet'
|
||||
>
|
||||
<g transform="translate(0,150) scale(0.05,-0.05)" fill="#000000" stroke="none">
|
||||
<g transform='translate(0,150) scale(0.05,-0.05)' fill='#000000' stroke='none'>
|
||||
<path
|
||||
d="M786 2713 c-184 -61 -353 -217 -439 -405 -76 -165 -65 -539 19 -666
|
||||
d='M786 2713 c-184 -61 -353 -217 -439 -405 -76 -165 -65 -539 19 -666
|
||||
l57 -85 -48 -124 c-203 -517 -79 -930 346 -1155 159 -85 441 -71 585 28 l111
|
||||
77 196 -76 c763 -293 1353 304 1051 1063 -77 191 -77 189 -14 282 163 239 97
|
||||
660 -140 893 -235 231 -528 256 -975 83 l-96 -37 -121 67 c-144 79 -383 103
|
||||
@@ -34,7 +34,7 @@ l57 -85 -48 -124 c-203 -517 -79 -930 346 -1155 159 -85 441 -71 585 28 l111
|
||||
-583 1052 117 -106 239 -366 585 -504 671 l-72 44 98 45 c150 68 169 63 305
|
||||
-82z m-329 -310 c161 -184 163 -160 -30 -338 -188 -173 -180 -173 -386 19
|
||||
-163 153 -163 157 7 324 218 213 219 213 409 -5z m354 -375 c92 -239 -179
|
||||
-462 -377 -309 l-46 35 186 163 c211 186 209 185 237 111z"
|
||||
-462 -377 -309 l-46 35 186 163 c211 186 209 185 237 111z'
|
||||
/>
|
||||
</g>
|
||||
</svg>`}
|
||||
@@ -72,20 +72,19 @@ Runs a browser automation task using BrowserUse
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `task` | string | Yes | What should the browser agent do |
|
||||
| `variables` | json | No | Optional variables to use as secrets \(format: \{key: value\}\) |
|
||||
| `save_browser_data` | boolean | No | Whether to save browser data |
|
||||
| `model` | string | No | LLM model to use \(default: gpt-4o\) |
|
||||
| `apiKey` | string | Yes | API key for BrowserUse API |
|
||||
| `pollInterval` | number | No | Interval between polling requests in milliseconds \(default: 5000\) |
|
||||
| `maxPollTime` | number | No | Maximum time to poll for task completion in milliseconds \(default: 300000 - 5 minutes\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `id` | string |
|
||||
| `task` | string |
|
||||
| `success` | string |
|
||||
| `output` | string |
|
||||
| `status` | string |
|
||||
| `steps` | string |
|
||||
| `live_url` | string |
|
||||
|
||||
|
||||
|
||||
@@ -105,11 +104,9 @@ Runs a browser automation task using BrowserUse
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `id` | string | id of the response |
|
||||
| ↳ `task` | string | task of the response |
|
||||
| ↳ `success` | boolean | success of the response |
|
||||
| ↳ `output` | any | output of the response |
|
||||
| ↳ `status` | string | status of the response |
|
||||
| ↳ `steps` | json | steps of the response |
|
||||
| ↳ `live_url` | any | live_url of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Clay
|
||||
description: Populate Clay workbook with data
|
||||
description: Populate Clay workbook
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -9,17 +9,11 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
type="clay"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
||||
|
||||
viewBox="0 0 400 400"
|
||||
>
|
||||
iconSvg={`<svg className="block-icon" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'>
|
||||
<path
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="#41B9FD"
|
||||
d=" M225.000000,1.000000 C227.042313,1.000000 229.084641,1.000000 231.903046,1.237045
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#41B9FD'
|
||||
d=' M225.000000,1.000000 C227.042313,1.000000 229.084641,1.000000 231.903046,1.237045
|
||||
C233.981308,1.648251 235.283447,1.974177 236.585678,1.974532 C276.426849,1.985374 316.268005,1.964254 356.349304,2.036658
|
||||
C356.713806,2.242061 356.838165,2.358902 357.013062,2.696568 C357.361633,3.243123 357.659729,3.568854 358.029053,3.919451
|
||||
C358.100250,3.944317 358.064270,4.090822 358.043335,4.397895 C358.300018,5.454089 358.577637,6.203210 358.919647,7.420082
|
||||
@@ -96,12 +90,12 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
C160.335373,16.929420 160.935471,16.717543 161.932648,16.610218 C166.284805,15.022083 170.239853,13.329394 174.481018,11.497526
|
||||
C175.179947,11.265512 175.592758,11.172676 176.284058,11.232684 C181.045059,9.931384 185.527557,8.477241 190.283020,6.942632
|
||||
C190.929428,6.798172 191.302902,6.734176 192.106628,6.758037 C200.661499,5.630559 208.799301,4.494970 216.903397,3.155535
|
||||
C219.646088,2.702227 222.303574,1.733297 225.000000,1.000000 z"
|
||||
C219.646088,2.702227 222.303574,1.733297 225.000000,1.000000 z'
|
||||
/>
|
||||
<path
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="#CF207F"
|
||||
d=" M139.359467,113.684723 C140.046402,112.896461 140.733337,112.108200 141.935272,111.074768
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#CF207F'
|
||||
d=' M139.359467,113.684723 C140.046402,112.896461 140.733337,112.108200 141.935272,111.074768
|
||||
C142.614975,110.526917 142.779678,110.224220 142.944397,109.921524 C142.944397,109.921532 143.176773,109.554497 143.635193,109.340279
|
||||
C145.124252,107.866608 146.154877,106.607147 147.185501,105.347694 C147.185501,105.347694 147.485733,105.074348 147.925735,104.915680
|
||||
C148.538528,104.456520 148.711319,104.156021 148.884109,103.855530 C149.041901,103.578056 149.247330,103.342041 149.974884,103.098984
|
||||
@@ -157,8 +151,12 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
C135.450775,286.986084 120.418205,262.047058 113.761909,231.918289 C110.147652,215.558807 109.790779,198.967697 111.782127,182.339249
|
||||
C113.832611,165.216965 118.597160,148.944382 127.160858,133.886154 C130.497955,128.018265 133.867905,122.169083 137.222885,116.311386
|
||||
C137.222885,116.311386 137.227158,116.228470 137.540863,116.214661 C138.211945,116.106445 138.569351,116.012032 139.062988,115.851028
|
||||
C139.427094,115.546883 139.469406,115.275383 139.372986,114.756676 C139.495758,114.250427 139.475632,113.964195 139.359467,113.684723 z"/>
|
||||
<path xmlns="http://www.w3.org/2000/svg" fill="#FFC947" d=" M200.266830,145.969620 C200.457306,145.841385 200.647766,145.713150 201.270264,145.275589
|
||||
C139.427094,115.546883 139.469406,115.275383 139.372986,114.756676 C139.495758,114.250427 139.475632,113.964195 139.359467,113.684723 z'
|
||||
/>
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#FFC947'
|
||||
d=' M200.266830,145.969620 C200.457306,145.841385 200.647766,145.713150 201.270264,145.275589
|
||||
C201.994553,144.826004 202.149918,144.593887 202.168381,144.269897 C202.168381,144.269897 202.241974,144.338730 202.627762,144.274597
|
||||
C206.081650,142.583710 209.149765,140.956970 212.217880,139.330231 C212.400635,139.302734 212.583405,139.275208 213.260132,139.131683
|
||||
C214.191147,138.779388 214.628204,138.543121 215.065262,138.306854 C215.065262,138.306870 215.200439,138.347610 215.615753,138.262543
|
||||
@@ -168,13 +166,16 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
C189.032700,245.092545 189.048599,244.976334 188.932205,244.635071 C178.652054,231.033371 175.024597,215.782471 175.030136,199.385284
|
||||
C175.034317,187.007950 178.389404,175.448639 183.294250,164.239044 C183.294250,164.239044 183.188980,163.991821 183.536774,163.962189
|
||||
C186.888184,159.951889 189.891830,155.971222 192.895477,151.990555 C192.895477,151.990555 192.993607,151.991669 193.307098,151.842606
|
||||
C195.835999,149.785568 198.051407,147.877594 200.266830,145.969620 z"/>
|
||||
C195.835999,149.785568 198.051407,147.877594 200.266830,145.969620 z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Clay](https://www.clay.com/) is a data enrichment and workflow automation platform that helps teams streamline lead generation, research, and data operations through powerful integrations and flexible inputs.
|
||||
|
||||
Learn how to use the Clay Tool in Sim Studio to seamlessly insert data into a Clay workbook through webhook triggers. This tutorial walks you through setting up a webhook, configuring data mapping, and automating real-time updates to your Clay workbooks. Perfect for streamlining lead generation and data enrichment directly from your workflow!
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
@@ -13,15 +13,15 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
|
||||
|
||||
viewBox="0 3 21 24"
|
||||
focusable="false"
|
||||
fill="none"
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox='0 3 21 24'
|
||||
focusable='false'
|
||||
fill='none'
|
||||
aria-hidden='true'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
fill="#1868DB"
|
||||
d="M20.602 20.234c-6.584-3.183-8.507-3.66-11.281-3.66-3.255 0-6.03 1.355-8.507 5.16l-.407.622c-.333.513-.407.696-.407.915s.111.403.518.659l4.18 2.598c.221.146.406.22.591.22.222 0 .37-.11.592-.44l.666-1.024c1.035-1.574 1.96-2.086 3.144-2.086 1.035 0 2.256.293 3.772 1.025l4.365 2.049c.444.22.925.11 1.146-.403l2.072-4.537c.222-.512.074-.842-.444-1.098M1.406 12.22c6.583 3.184 8.507 3.66 11.28 3.66 3.256 0 6.03-1.354 8.508-5.16l.407-.622c.332-.512.406-.695.406-.915s-.11-.402-.518-.658L17.31 5.927c-.222-.147-.407-.22-.592-.22-.222 0-.37.11-.592.44l-.665 1.024c-1.036 1.573-1.96 2.086-3.144 2.086-1.036 0-2.257-.293-3.773-1.025L4.18 6.183c-.444-.22-.925-.11-1.147.402L.962 11.123c-.222.512-.074.841.444 1.098"
|
||||
fill='#1868DB'
|
||||
d='M20.602 20.234c-6.584-3.183-8.507-3.66-11.281-3.66-3.255 0-6.03 1.355-8.507 5.16l-.407.622c-.333.513-.407.696-.407.915s.111.403.518.659l4.18 2.598c.221.146.406.22.591.22.222 0 .37-.11.592-.44l.666-1.024c1.035-1.574 1.96-2.086 3.144-2.086 1.035 0 2.256.293 3.772 1.025l4.365 2.049c.444.22.925.11 1.146-.403l2.072-4.537c.222-.512.074-.842-.444-1.098M1.406 12.22c6.583 3.184 8.507 3.66 11.28 3.66 3.256 0 6.03-1.354 8.508-5.16l.407-.622c.332-.512.406-.695.406-.915s-.11-.402-.518-.658L17.31 5.927c-.222-.147-.407-.22-.592-.22-.222 0-.37.11-.592.44l-.665 1.024c-1.036 1.573-1.96 2.086-3.144 2.086-1.036 0-2.257-.293-3.773-1.025L4.18 6.183c-.444-.22-.925-.11-1.147.402L.962 11.123c-.222.512-.074.841.444 1.098'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
161
apps/docs/content/docs/tools/discord.mdx
Normal file
161
apps/docs/content/docs/tools/discord.mdx
Normal file
@@ -0,0 +1,161 @@
|
||||
---
|
||||
title: Discord
|
||||
description: Interact with Discord
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="discord"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 -28.5 256 256'
|
||||
version='1.1'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
xmlnsXlink='http://www.w3.org/1999/xlink'
|
||||
preserveAspectRatio='xMidYMid'
|
||||
>
|
||||
<g>
|
||||
<path
|
||||
d='M216.856339,16.5966031 C200.285002,8.84328665 182.566144,3.2084988 164.041564,0 C161.766523,4.11318106 159.108624,9.64549908 157.276099,14.0464379 C137.583995,11.0849896 118.072967,11.0849896 98.7430163,14.0464379 C96.9108417,9.64549908 94.1925838,4.11318106 91.8971895,0 C73.3526068,3.2084988 55.6133949,8.86399117 39.0420583,16.6376612 C5.61752293,67.146514 -3.4433191,116.400813 1.08711069,164.955721 C23.2560196,181.510915 44.7403634,191.567697 65.8621325,198.148576 C71.0772151,190.971126 75.7283628,183.341335 79.7352139,175.300261 C72.104019,172.400575 64.7949724,168.822202 57.8887866,164.667963 C59.7209612,163.310589 61.5131304,161.891452 63.2445898,160.431257 C105.36741,180.133187 151.134928,180.133187 192.754523,160.431257 C194.506336,161.891452 196.298154,163.310589 198.110326,164.667963 C191.183787,168.842556 183.854737,172.420929 176.223542,175.320965 C180.230393,183.341335 184.861538,190.991831 190.096624,198.16893 C211.238746,191.588051 232.743023,181.531619 254.911949,164.955721 C260.227747,108.668201 245.831087,59.8662432 216.856339,16.5966031 Z M85.4738752,135.09489 C72.8290281,135.09489 62.4592217,123.290155 62.4592217,108.914901 C62.4592217,94.5396472 72.607595,82.7145587 85.4738752,82.7145587 C98.3405064,82.7145587 108.709962,94.5189427 108.488529,108.914901 C108.508531,123.290155 98.3405064,135.09489 85.4738752,135.09489 Z M170.525237,135.09489 C157.88039,135.09489 147.510584,123.290155 147.510584,108.914901 C147.510584,94.5396472 157.658606,82.7145587 170.525237,82.7145587 C183.391518,82.7145587 193.761324,94.5189427 193.539891,108.914901 C193.539891,123.290155 183.391518,135.09489 170.525237,135.09489 Z'
|
||||
fill='#5865F2'
|
||||
fillRule='nonzero'
|
||||
/>
|
||||
</g>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Discord](https://discord.com) is a powerful communication platform that allows you to connect with friends, communities, and teams. It offers a range of features for team collaboration, including text channels, voice channels, and video calls.
|
||||
|
||||
With a Discord account or bot, you can:
|
||||
|
||||
- **Send messages**: Send messages to a specific channel
|
||||
- **Get messages**: Get messages from a specific channel
|
||||
- **Get server**: Get information about a specific server
|
||||
- **Get user**: Get information about a specific user
|
||||
|
||||
In Sim Studio, the Discord integration enables your agents to access and leverage your organization's Discord servers. Agents can retrieve information from Discord channels, search for specific users, get server information, and send messages. This allows your workflows to integrate with your Discord communities, automate notifications, and create interactive experiences.
|
||||
|
||||
> **Important:** To read message content, your Discord bot needs the "Message Content Intent" enabled in the Discord Developer Portal. Without this permission, you'll still receive message metadata but the content field will appear empty.
|
||||
|
||||
Discord components in Sim Studio use efficient lazy loading, only fetching data when needed to minimize API calls and prevent rate limiting. Token refreshing happens automatically in the background to maintain your connection.
|
||||
|
||||
### Setting Up Your Discord Bot
|
||||
|
||||
1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)
|
||||
2. Create a new application and navigate to the "Bot" tab
|
||||
3. Create a bot and copy your bot token
|
||||
4. Under "Privileged Gateway Intents", enable the **Message Content Intent** to read message content
|
||||
5. Invite your bot to your servers with appropriate permissions
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Connect to Discord to send messages, manage channels, and interact with servers. Automate notifications, community management, and integrate Discord into your workflows.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `discord_send_message`
|
||||
|
||||
Send a message to a Discord channel
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Yes | The bot token for authentication |
|
||||
| `channelId` | string | Yes | The Discord channel ID to send the message to |
|
||||
| `content` | string | No | The text content of the message |
|
||||
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
|
||||
### `discord_get_messages`
|
||||
|
||||
Retrieve messages from a Discord channel
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Yes | The bot token for authentication |
|
||||
| `channelId` | string | Yes | The Discord channel ID to retrieve messages from |
|
||||
| `limit` | number | No | Maximum number of messages to retrieve \(default: 10, max: 100\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
|
||||
### `discord_get_server`
|
||||
|
||||
Retrieve information about a Discord server (guild)
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Yes | The bot token for authentication |
|
||||
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
|
||||
### `discord_get_user`
|
||||
|
||||
Retrieve information about a Discord user
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Yes | Discord bot token for authentication |
|
||||
| `userId` | string | Yes | The Discord user ID |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `message` | string | message of the response |
|
||||
| ↳ `data` | any | data of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `discord`
|
||||
@@ -9,9 +9,16 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
type="elevenlabs"
|
||||
color="#181C1E"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 876 876" fill="none">
|
||||
<path d="M498 138H618V738H498V138Z" fill="currentColor"/>
|
||||
<path d="M258 138H378V738H258V138Z" fill="currentColor"/>
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
|
||||
|
||||
viewBox='0 0 876 876'
|
||||
fill='none'
|
||||
>
|
||||
<path d='M498 138H618V738H498V138Z' fill='currentColor' />
|
||||
<path d='M258 138H378V738H258V138Z' fill='currentColor' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
@@ -65,7 +72,7 @@ Convert TTS using ElevenLabs voices
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `text` | string | No | Text - Enter the text to convert to speech |
|
||||
| `text` | string | Yes | Text - Enter the text to convert to speech |
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,29 +6,29 @@ description: Read and parse multiple files
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="dropdown"
|
||||
type="file"
|
||||
color="#40916C"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox="0 0 23 28"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox='0 0 23 28'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d="M8 15.2H15.2M8 20H11.6M2 4.4V23.6C2 24.2365 2.25286 24.847 2.70294 25.2971C3.15303 25.7471 3.76348 26 4.4 26H18.8C19.4365 26 20.047 25.7471 20.4971 25.2971C20.9471 24.847 21.2 24.2365 21.2 23.6V9.6104C21.2 9.29067 21.136 8.97417 21.012 8.67949C20.8879 8.38481 20.7062 8.11789 20.4776 7.8944L15.1496 2.684C14.7012 2.24559 14.0991 2.00008 13.472 2H4.4C3.76348 2 3.15303 2.25286 2.70294 2.70294C2.25286 3.15303 2 3.76348 2 4.4Z"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2.25"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d='M8 15.2H15.2M8 20H11.6M2 4.4V23.6C2 24.2365 2.25286 24.847 2.70294 25.2971C3.15303 25.7471 3.76348 26 4.4 26H18.8C19.4365 26 20.047 25.7471 20.4971 25.2971C20.9471 24.847 21.2 24.2365 21.2 23.6V9.6104C21.2 9.29067 21.136 8.97417 21.012 8.67949C20.8879 8.38481 20.7062 8.11789 20.4776 7.8944L15.1496 2.684C14.7012 2.24559 14.0991 2.00008 13.472 2H4.4C3.76348 2 3.15303 2.25286 2.70294 2.70294C2.25286 3.15303 2 3.76348 2 4.4Z'
|
||||
stroke='currentColor'
|
||||
strokeWidth='2.25'
|
||||
strokeLinecap='round'
|
||||
strokeLinejoin='round'
|
||||
/>
|
||||
<path
|
||||
d="M14 2V6.8C14 7.43652 14.2529 8.04697 14.7029 8.49706C15.153 8.94714 15.7635 9.2 16.4 9.2H21.2"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2.25"
|
||||
strokeLinejoin="round"
|
||||
d='M14 2V6.8C14 7.43652 14.2529 8.04697 14.7029 8.49706C15.153 8.94714 15.7635 9.2 16.4 9.2H21.2'
|
||||
stroke='currentColor'
|
||||
strokeWidth='2.25'
|
||||
strokeLinejoin='round'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
@@ -50,7 +50,7 @@ The File Parser tool is particularly useful for scenarios where your agents need
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Upload and extract contents from structured file formats including PDFs, CSV spreadsheets, and Word documents (DOCX).
|
||||
Upload and extract contents from structured file formats including PDFs, CSV spreadsheets, and Word documents (DOCX). Upload files directly. Specialized parsers extract text and metadata from each format. You can upload multiple files at once and access them individually or as a combined document.
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,11 @@ This tool does not produce any outputs.
|
||||
|
||||
## Block Configuration
|
||||
|
||||
No configuration parameters required.
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `inputMethod` | string | No | |
|
||||
|
||||
|
||||
|
||||
@@ -91,4 +95,4 @@ No configuration parameters required.
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `dropdown`
|
||||
- Type: `file`
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Firecrawl
|
||||
description: Scrape website content
|
||||
description: Scrape or search the web
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -9,26 +9,26 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
type="firecrawl"
|
||||
color="#181C1E"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon" viewBox="0 0 642 600" xmlns="http://www.w3.org/2000/svg" >
|
||||
iconSvg={`<svg className="block-icon" viewBox='0 0 642 600' xmlns='http://www.w3.org/2000/svg' >
|
||||
<path
|
||||
d="M301 63C299 91 303 122 298 149C295 158 289 165 283 169C274 172 266 170 261 167C253 176 248 183 244 191C230 226 226 263 226 301C216 310 203 317 192 310C179 295 175 277 174 259C161 273 153 288 146 304C141 321 138 336 137 352C140 372 145 388 152 402C161 421 174 435 187 449C181 462 165 453 157 450C158 454 161 458 165 461C195 490 231 500 268 509C240 494 211 471 195 442C179 413 172 378 180 344C191 353 200 362 211 364C223 365 232 361 236 353C247 274 299 214 323 143C322 136 327 140 329 142C354 165 367 191 375 218C387 254 381 294 379 329C393 345 413 334 424 329C429 342 432 352 429 362C427 378 417 388 413 400C422 407 433 403 440 400C432 423 419 442 404 460C383 483 358 501 335 512C379 502 420 491 449 459C443 458 427 464 428 452C443 437 464 423 472 403C482 383 485 362 484 339C482 307 472 280 458 254C459 267 452 276 445 284C434 289 426 279 424 272C415 247 424 220 418 198C415 179 405 165 397 150C370 114 336 86 303 64"
|
||||
fill="rgb(253,76,31)"
|
||||
d='M301 63C299 91 303 122 298 149C295 158 289 165 283 169C274 172 266 170 261 167C253 176 248 183 244 191C230 226 226 263 226 301C216 310 203 317 192 310C179 295 175 277 174 259C161 273 153 288 146 304C141 321 138 336 137 352C140 372 145 388 152 402C161 421 174 435 187 449C181 462 165 453 157 450C158 454 161 458 165 461C195 490 231 500 268 509C240 494 211 471 195 442C179 413 172 378 180 344C191 353 200 362 211 364C223 365 232 361 236 353C247 274 299 214 323 143C322 136 327 140 329 142C354 165 367 191 375 218C387 254 381 294 379 329C393 345 413 334 424 329C429 342 432 352 429 362C427 378 417 388 413 400C422 407 433 403 440 400C432 423 419 442 404 460C383 483 358 501 335 512C379 502 420 491 449 459C443 458 427 464 428 452C443 437 464 423 472 403C482 383 485 362 484 339C482 307 472 280 458 254C459 267 452 276 445 284C434 289 426 279 424 272C415 247 424 220 418 198C415 179 405 165 397 150C370 114 336 86 303 64'
|
||||
fill='rgb(253,76,31)'
|
||||
/>
|
||||
<path
|
||||
d="M324 141C303 214 249 273 244 354C235 359 229 364 223 366C205 367 193 357 182 347C180 350 179 353 180 357C178 374 178 390 182 403C185 421 193 434 200 448C212 465 227 480 243 491C258 500 269 513 285 512C284 508 257 485 252 468C241 450 235 433 233 414C241 415 254 420 263 412C260 387 265 363 273 343C281 323 293 306 310 295C317 289 324 285 330 282C328 307 328 331 329 355C330 368 332 379 338 389C358 394 376 384 388 370C383 386 377 401 371 415C376 414 381 411 385 408C383 421 380 431 376 441C366 467 356 491 334 510C358 499 381 483 400 461C418 442 430 423 440 403C432 404 421 410 413 404C414 386 428 377 427 360C429 349 428 340 424 332C413 336 404 341 392 339C386 338 381 334 379 330C380 292 385 248 371 214C366 195 358 180 349 165C341 155 333 145 323 140"
|
||||
fill="rgb(254,156,69)"
|
||||
d='M324 141C303 214 249 273 244 354C235 359 229 364 223 366C205 367 193 357 182 347C180 350 179 353 180 357C178 374 178 390 182 403C185 421 193 434 200 448C212 465 227 480 243 491C258 500 269 513 285 512C284 508 257 485 252 468C241 450 235 433 233 414C241 415 254 420 263 412C260 387 265 363 273 343C281 323 293 306 310 295C317 289 324 285 330 282C328 307 328 331 329 355C330 368 332 379 338 389C358 394 376 384 388 370C383 386 377 401 371 415C376 414 381 411 385 408C383 421 380 431 376 441C366 467 356 491 334 510C358 499 381 483 400 461C418 442 430 423 440 403C432 404 421 410 413 404C414 386 428 377 427 360C429 349 428 340 424 332C413 336 404 341 392 339C386 338 381 334 379 330C380 292 385 248 371 214C366 195 358 180 349 165C341 155 333 145 323 140'
|
||||
fill='rgb(254,156,69)'
|
||||
/>
|
||||
<path
|
||||
d="M330 284C309 293 289 311 279 332C267 356 261 383 265 411C256 420 242 418 235 412C237 438 245 459 258 479C269 493 281 507 295 513C288 495 265 472 265 446C272 447 281 454 288 444C296 425 303 407 309 388C317 406 321 427 336 443C346 449 358 446 363 438C355 464 348 489 334 511C344 501 352 491 357 480C370 457 379 435 385 412C380 411 376 416 371 418C376 401 382 386 387 371C379 382 369 388 358 391C348 394 337 392 334 383C324 353 328 316 330 285"
|
||||
fill="rgb(254,220,87)"
|
||||
d='M330 284C309 293 289 311 279 332C267 356 261 383 265 411C256 420 242 418 235 412C237 438 245 459 258 479C269 493 281 507 295 513C288 495 265 472 265 446C272 447 281 454 288 444C296 425 303 407 309 388C317 406 321 427 336 443C346 449 358 446 363 438C355 464 348 489 334 511C344 501 352 491 357 480C370 457 379 435 385 412C380 411 376 416 371 418C376 401 382 386 387 371C379 382 369 388 358 391C348 394 337 392 334 383C324 353 328 316 330 285'
|
||||
fill='rgb(254,220,87)'
|
||||
/>
|
||||
<path
|
||||
d="M311 389C303 407 297 426 289 445C282 454 273 450 268 445C267 472 285 492 302 512C299 514 297 514 294 514C297 514 299 514 301 514C314 515 325 512 334 513C341 495 355 467 362 443C357 446 351 448 344 447C337 446 334 441 330 438C320 422 316 406 311 391"
|
||||
fill="rgb(251,250,202)"
|
||||
d='M311 389C303 407 297 426 289 445C282 454 273 450 268 445C267 472 285 492 302 512C299 514 297 514 294 514C297 514 299 514 301 514C314 515 325 512 334 513C341 495 355 467 362 443C357 446 351 448 344 447C337 446 334 441 330 438C320 422 316 406 311 391'
|
||||
fill='rgb(251,250,202)'
|
||||
/>
|
||||
<path
|
||||
d="M187 163C188 181 167 187 164 203C158 215 158 228 159 241C172 233 183 221 188 209C193 194 192 178 188 166"
|
||||
fill="rgb(253,76,31)"
|
||||
d='M187 163C188 181 167 187 164 203C158 215 158 228 159 241C172 233 183 221 188 209C193 194 192 178 188 166'
|
||||
fill='rgb(253,76,31)'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
@@ -51,7 +51,7 @@ The Firecrawl integration allows your agents to access and process web content p
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Extract content from any website with advanced web scraping capabilities and content filtering. Retrieve clean, structured data from web pages with options to focus on main content.
|
||||
Extract content from any website with advanced web scraping or search the web for information. Retrieve clean, structured data from web pages with options to focus on main content, or intelligently search for information across the web.
|
||||
|
||||
|
||||
|
||||
@@ -77,6 +77,24 @@ Extract structured content from web pages with comprehensive metadata support. C
|
||||
| `html` | string |
|
||||
| `metadata` | string |
|
||||
|
||||
### `firecrawl_search`
|
||||
|
||||
Search for information on the web using Firecrawl
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `apiKey` | string | Yes | Firecrawl API key |
|
||||
| `query` | string | Yes | The search query to use |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `data` | string |
|
||||
| `warning` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
@@ -85,7 +103,7 @@ Extract structured content from web pages with comprehensive metadata support. C
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `apiKey` | string | Yes | API Key - Enter your Firecrawl API key |
|
||||
| `apiKey` | string | Yes | |
|
||||
|
||||
|
||||
|
||||
@@ -97,6 +115,8 @@ Extract structured content from web pages with comprehensive metadata support. C
|
||||
| ↳ `markdown` | string | markdown of the response |
|
||||
| ↳ `html` | any | html of the response |
|
||||
| ↳ `metadata` | json | metadata of the response |
|
||||
| ↳ `data` | json | data of the response |
|
||||
| ↳ `warning` | any | warning of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
@@ -9,18 +9,12 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
type="github"
|
||||
color="#181C1E"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox="0 0 26 26"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M13 0C11.2928 0 9.60235 0.336255 8.02511 0.989566C6.44788 1.64288 5.01477 2.60045 3.80761 3.80761C1.36964 6.24558 0 9.55219 0 13C0 18.746 3.731 23.621 8.892 25.35C9.542 25.454 9.75 25.051 9.75 24.7V22.503C6.149 23.283 5.382 20.761 5.382 20.761C4.784 19.253 3.939 18.85 3.939 18.85C2.756 18.044 4.03 18.07 4.03 18.07C5.33 18.161 6.019 19.409 6.019 19.409C7.15 21.385 9.061 20.8 9.802 20.488C9.919 19.643 10.257 19.071 10.621 18.746C7.735 18.421 4.706 17.303 4.706 12.35C4.706 10.907 5.2 9.75 6.045 8.827C5.915 8.502 5.46 7.15 6.175 5.395C6.175 5.395 7.267 5.044 9.75 6.721C10.777 6.435 11.895 6.292 13 6.292C14.105 6.292 15.223 6.435 16.25 6.721C18.733 5.044 19.825 5.395 19.825 5.395C20.54 7.15 20.085 8.502 19.955 8.827C20.8 9.75 21.294 10.907 21.294 12.35C21.294 17.316 18.252 18.408 15.353 18.733C15.821 19.136 16.25 19.929 16.25 21.138V24.7C16.25 25.051 16.458 25.467 17.121 25.35C22.282 23.608 26 18.746 26 13C26 11.2928 25.6637 9.60235 25.0104 8.02511C24.3571 6.44788 23.3995 5.01477 22.1924 3.80761C20.9852 2.60045 19.5521 1.64288 17.9749 0.989566C16.3977 0.336255 14.7072 0 13 0Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>`}
|
||||
iconSvg={`<svg className="block-icon" viewBox='0 0 26 26' xmlns='http://www.w3.org/2000/svg'>
|
||||
<path
|
||||
d='M13 0C11.2928 0 9.60235 0.336255 8.02511 0.989566C6.44788 1.64288 5.01477 2.60045 3.80761 3.80761C1.36964 6.24558 0 9.55219 0 13C0 18.746 3.731 23.621 8.892 25.35C9.542 25.454 9.75 25.051 9.75 24.7V22.503C6.149 23.283 5.382 20.761 5.382 20.761C4.784 19.253 3.939 18.85 3.939 18.85C2.756 18.044 4.03 18.07 4.03 18.07C5.33 18.161 6.019 19.409 6.019 19.409C7.15 21.385 9.061 20.8 9.802 20.488C9.919 19.643 10.257 19.071 10.621 18.746C7.735 18.421 4.706 17.303 4.706 12.35C4.706 10.907 5.2 9.75 6.045 8.827C5.915 8.502 5.46 7.15 6.175 5.395C6.175 5.395 7.267 5.044 9.75 6.721C10.777 6.435 11.895 6.292 13 6.292C14.105 6.292 15.223 6.435 16.25 6.721C18.733 5.044 19.825 5.395 19.825 5.395C20.54 7.15 20.085 8.502 19.955 8.827C20.8 9.75 21.294 10.907 21.294 12.35C21.294 17.316 18.252 18.408 15.353 18.733C15.821 19.136 16.25 19.929 16.25 21.138V24.7C16.25 25.051 16.458 25.467 17.121 25.35C22.282 23.608 26 18.746 26 13C26 11.2928 25.6637 9.60235 25.0104 8.02511C24.3571 6.44788 23.3995 5.01477 22.1924 3.80761C20.9852 2.60045 19.5521 1.64288 17.9749 0.989566C16.3977 0.336255 14.7072 0 13 0Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
@@ -79,6 +73,7 @@ Fetch PR details including diff and files changed
|
||||
| `blob_url` | string |
|
||||
| `raw_url` | string |
|
||||
| `status` | string |
|
||||
| `content` | string |
|
||||
|
||||
### `github_comment`
|
||||
|
||||
@@ -112,6 +107,7 @@ Create comments on GitHub PRs
|
||||
| `line` | string |
|
||||
| `side` | string |
|
||||
| `commit_id` | string |
|
||||
| `content` | string |
|
||||
|
||||
### `github_repo_info`
|
||||
|
||||
@@ -135,6 +131,7 @@ Retrieve comprehensive GitHub repository metadata including stars, forks, issues
|
||||
| `forks` | string |
|
||||
| `openIssues` | string |
|
||||
| `language` | string |
|
||||
| `content` | string |
|
||||
|
||||
### `github_latest_commit`
|
||||
|
||||
@@ -159,6 +156,7 @@ Retrieve the latest commit from a GitHub repository
|
||||
| `author` | string |
|
||||
| `login` | string |
|
||||
| `avatar_url` | string |
|
||||
| `content` | string |
|
||||
|
||||
|
||||
|
||||
@@ -10,25 +10,25 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 48 48"
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
viewBox='0 0 48 48'
|
||||
|
||||
|
||||
|
||||
>
|
||||
<path fill="#4caf50" d="M45,16.2l-5,2.75l-5,4.75L35,40h7c1.657,0,3-1.343,3-3V16.2z" />
|
||||
<path fill="#1e88e5" d="M3,16.2l3.614,1.71L13,23.7V40H6c-1.657,0-3-1.343-3-3V16.2z" />
|
||||
<path fill='#4caf50' d='M45,16.2l-5,2.75l-5,4.75L35,40h7c1.657,0,3-1.343,3-3V16.2z' />
|
||||
<path fill='#1e88e5' d='M3,16.2l3.614,1.71L13,23.7V40H6c-1.657,0-3-1.343-3-3V16.2z' />
|
||||
<polygon
|
||||
fill="#e53935"
|
||||
points="35,11.2 24,19.45 13,11.2 12,17 13,23.7 24,31.95 35,23.7 36,17"
|
||||
fill='#e53935'
|
||||
points='35,11.2 24,19.45 13,11.2 12,17 13,23.7 24,31.95 35,23.7 36,17'
|
||||
/>
|
||||
<path
|
||||
fill="#c62828"
|
||||
d="M3,12.298V16.2l10,7.5V11.2L9.876,8.859C9.132,8.301,8.228,8,7.298,8h0C4.924,8,3,9.924,3,12.298z"
|
||||
fill='#c62828'
|
||||
d='M3,12.298V16.2l10,7.5V11.2L9.876,8.859C9.132,8.301,8.228,8,7.298,8h0C4.924,8,3,9.924,3,12.298z'
|
||||
/>
|
||||
<path
|
||||
fill="#fbc02d"
|
||||
d="M45,12.298V16.2l-10,7.5V11.2l3.124-2.341C38.868,8.301,39.772,8,40.702,8h0 C43.076,8,45,9.924,45,12.298z"
|
||||
fill='#fbc02d'
|
||||
d='M45,12.298V16.2l-10,7.5V11.2l3.124-2.341C38.868,8.301,39.772,8,40.702,8h0 C43.076,8,45,9.924,45,12.298z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
239
apps/docs/content/docs/tools/google_calendar.mdx
Normal file
239
apps/docs/content/docs/tools/google_calendar.mdx
Normal file
@@ -0,0 +1,239 @@
|
||||
---
|
||||
title: Google Calendar
|
||||
description: Manage Google Calendar events
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="google_calendar"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
version='1.1'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
xmlnsXlink='http://www.w3.org/1999/xlink'
|
||||
x='0px'
|
||||
y='0px'
|
||||
viewBox='0 0 200 200'
|
||||
enableBackground='new 0 0 200 200'
|
||||
xmlSpace='preserve'
|
||||
>
|
||||
<g>
|
||||
<g transform='translate(3.75 3.75)'>
|
||||
<path
|
||||
fill='#FFFFFF'
|
||||
d='M148.882,43.618l-47.368-5.263l-57.895,5.263L38.355,96.25l5.263,52.632l52.632,6.579l52.632-6.579
|
||||
l5.263-53.947L148.882,43.618z'
|
||||
/>
|
||||
<path
|
||||
fill='#1A73E8'
|
||||
d='M65.211,125.276c-3.934-2.658-6.658-6.539-8.145-11.671l9.132-3.763c0.829,3.158,2.276,5.605,4.342,7.342
|
||||
c2.053,1.737,4.553,2.592,7.474,2.592c2.987,0,5.553-0.908,7.697-2.724s3.224-4.132,3.224-6.934c0-2.868-1.132-5.211-3.395-7.026
|
||||
s-5.105-2.724-8.5-2.724h-5.276v-9.039H76.5c2.921,0,5.382-0.789,7.382-2.368c2-1.579,3-3.737,3-6.487
|
||||
c0-2.447-0.895-4.395-2.684-5.855s-4.053-2.197-6.803-2.197c-2.684,0-4.816,0.711-6.395,2.145s-2.724,3.197-3.447,5.276
|
||||
l-9.039-3.763c1.197-3.395,3.395-6.395,6.618-8.987c3.224-2.592,7.342-3.895,12.342-3.895c3.697,0,7.026,0.711,9.974,2.145
|
||||
c2.947,1.434,5.263,3.421,6.934,5.947c1.671,2.539,2.5,5.382,2.5,8.539c0,3.224-0.776,5.947-2.329,8.184
|
||||
c-1.553,2.237-3.461,3.947-5.724,5.145v0.539c2.987,1.25,5.421,3.158,7.342,5.724c1.908,2.566,2.868,5.632,2.868,9.211
|
||||
s-0.908,6.776-2.724,9.579c-1.816,2.803-4.329,5.013-7.513,6.618c-3.197,1.605-6.789,2.421-10.776,2.421
|
||||
C73.408,129.263,69.145,127.934,65.211,125.276z'
|
||||
/>
|
||||
<path
|
||||
fill='#1A73E8'
|
||||
d='M121.25,79.961l-9.974,7.25l-5.013-7.605l17.987-12.974h6.895v61.197h-9.895L121.25,79.961z'
|
||||
/>
|
||||
<path
|
||||
fill='#EA4335'
|
||||
d='M148.882,196.25l47.368-47.368l-23.684-10.526l-23.684,10.526l-10.526,23.684L148.882,196.25z'
|
||||
/>
|
||||
<path
|
||||
fill='#34A853'
|
||||
d='M33.092,172.566l10.526,23.684h105.263v-47.368H43.618L33.092,172.566z'
|
||||
/>
|
||||
<path
|
||||
fill='#4285F4'
|
||||
d='M12.039-3.75C3.316-3.75-3.75,3.316-3.75,12.039v136.842l23.684,10.526l23.684-10.526V43.618h105.263
|
||||
l10.526-23.684L148.882-3.75H12.039z'
|
||||
/>
|
||||
<path
|
||||
fill='#188038'
|
||||
d='M-3.75,148.882v31.579c0,8.724,7.066,15.789,15.789,15.789h31.579v-47.368H-3.75z'
|
||||
/>
|
||||
<path
|
||||
fill='#FBBC04'
|
||||
d='M148.882,43.618v105.263h47.368V43.618l-23.684-10.526L148.882,43.618z'
|
||||
/>
|
||||
<path
|
||||
fill='#1967D2'
|
||||
d='M196.25,43.618V12.039c0-8.724-7.066-15.789-15.789-15.789h-31.579v47.368H196.25z'
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Google Calendar](https://calendar.google.com) is Google's powerful calendar and scheduling service that provides a comprehensive platform for managing events, meetings, and appointments. With seamless integration across Google's ecosystem and widespread adoption, Google Calendar offers robust features for both personal and professional scheduling needs.
|
||||
|
||||
With Google Calendar, you can:
|
||||
|
||||
- **Create and manage events**: Schedule meetings, appointments, and reminders with detailed information
|
||||
- **Send calendar invites**: Automatically notify and coordinate with attendees through email invitations
|
||||
- **Natural language event creation**: Quickly add events using conversational language like "Meeting with John tomorrow at 3pm"
|
||||
- **View and search events**: Easily find and access your scheduled events across multiple calendars
|
||||
- **Manage multiple calendars**: Organize different types of events across various calendars
|
||||
|
||||
In Sim Studio, the Google Calendar integration enables your agents to programmatically create, read, and manage calendar events. This allows for powerful automation scenarios such as scheduling meetings, sending calendar invites, checking availability, and managing event details. Your agents can create events with natural language input, send automated calendar invitations to attendees, retrieve event information, and list upcoming events. This integration bridges the gap between your AI workflows and calendar management, enabling seamless scheduling automation and coordination with one of the world's most widely used calendar platforms.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Google Calendar functionality to create, read, update, and list calendar events within your workflow. Automate scheduling, check availability, and manage events using OAuth authentication. Email invitations are sent asynchronously and delivery depends on recipients
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `google_calendar_create`
|
||||
|
||||
Create a new event in Google Calendar
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `summary` | string | Yes | Event title/summary |
|
||||
| `description` | string | No | Event description |
|
||||
| `location` | string | No | Event location |
|
||||
| `startDateTime` | string | Yes | Start date and time \(RFC3339 format, e.g., 2025-06-03T10:00:00-08:00\) |
|
||||
| `endDateTime` | string | Yes | End date and time \(RFC3339 format, e.g., 2025-06-03T11:00:00-08:00\) |
|
||||
| `timeZone` | string | No | Time zone \(e.g., America/Los_Angeles\) |
|
||||
| `attendees` | array | No | Array of attendee email addresses |
|
||||
| `sendUpdates` | string | No | How to send updates to attendees: all, externalOnly, or none |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
|
||||
### `google_calendar_list`
|
||||
|
||||
List events from Google Calendar
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `timeMin` | string | No | Lower bound for events \(RFC3339 timestamp, e.g., 2025-06-03T00:00:00Z\) |
|
||||
| `timeMax` | string | No | Upper bound for events \(RFC3339 timestamp, e.g., 2025-06-04T00:00:00Z\) |
|
||||
| `orderBy` | string | No | Order of events returned \(startTime or updated\) |
|
||||
| `showDeleted` | boolean | No | Include deleted events |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
|
||||
### `google_calendar_get`
|
||||
|
||||
Get a specific event from Google Calendar
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `eventId` | string | Yes | Event ID to retrieve |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
|
||||
### `google_calendar_quick_add`
|
||||
|
||||
Create events from natural language text
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `text` | string | Yes | Natural language text describing the event \(e.g., |
|
||||
| `attendees` | array | No | Array of attendee email addresses \(comma-separated string also accepted\) |
|
||||
| `sendUpdates` | string | No | How to send updates to attendees: all, externalOnly, or none |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
|
||||
### `google_calendar_invite`
|
||||
|
||||
Invite attendees to an existing Google Calendar event
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `eventId` | string | Yes | Event ID to invite attendees to |
|
||||
| `attendees` | array | Yes | Array of attendee email addresses to invite |
|
||||
| `sendUpdates` | string | No | How to send updates to attendees: all, externalOnly, or none |
|
||||
| `replaceExisting` | boolean | No | Whether to replace existing attendees or add to them \(defaults to false\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `metadata` | string |
|
||||
| `htmlLink` | string |
|
||||
| `status` | string |
|
||||
| `summary` | string |
|
||||
| `description` | string |
|
||||
| `location` | string |
|
||||
| `start` | string |
|
||||
| `end` | string |
|
||||
| `attendees` | string |
|
||||
| `creator` | string |
|
||||
| `organizer` | string |
|
||||
| `content` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `content` | string | content of the response |
|
||||
| ↳ `metadata` | json | metadata of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `google_calendar`
|
||||
@@ -11,24 +11,60 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 48 48"
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
viewBox='0 0 48 48'
|
||||
|
||||
|
||||
>
|
||||
<path
|
||||
fill="#2196f3"
|
||||
d="M37,45H11c-1.657,0-3-1.343-3-3V6c0-1.657,1.343-3,3-3h19l10,10v29C40,43.657,38.657,45,37,45z"
|
||||
fill='#2196f3'
|
||||
d='M37,45H11c-1.657,0-3-1.343-3-3V6c0-1.657,1.343-3,3-3h19l10,10v29C40,43.657,38.657,45,37,45z'
|
||||
/>
|
||||
<path fill="#bbdefb" d="M40 13L30 13 30 3z" />
|
||||
<path fill="#1565c0" d="M30 13L40 23 40 13z" />
|
||||
<path fill="#e3f2fd" d="M15 23H33V25H15zM15 27H33V29H15zM15 31H33V33H15zM15 35H25V37H15z" />
|
||||
<path fill='#bbdefb' d='M40 13L30 13 30 3z' />
|
||||
<path fill='#1565c0' d='M30 13L40 23 40 13z' />
|
||||
<path fill='#e3f2fd' d='M15 23H33V25H15zM15 27H33V29H15zM15 31H33V33H15zM15 35H25V37H15z' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Google Docs](https://docs.google.com) is a powerful cloud-based document creation and editing service that allows users to create, edit, and collaborate on documents in real-time. As part of Google's productivity suite, Google Docs offers a versatile platform for text documents with robust formatting, commenting, and sharing capabilities.
|
||||
|
||||
Learn how to integrate the Google Docs "Read" tool in Sim Studio to effortlessly fetch data from your docs and to integrate into your workflows. This tutorial walks you through connecting Google Docs, setting up data reads, and using that information to automate processes in real-time. Perfect for syncing live data with your agents.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/f41gy9rBHhE"
|
||||
title="Use the Google Docs Read tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
Learn how to integrate the Google Docs "Update" tool in Sim Studio to effortlessly add content in your docs through your workflows. This tutorial walks you through connecting Google Docs, configuring data writes, and using that information to automate document updates seamlessly. Perfect for maintaining dynamic, real-time documentation with minimal effort.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/L64ROHS2ivA"
|
||||
title="Use the Google Docs Update tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
Learn how to integrate the Google Docs "Create" tool in Sim Studio to effortlessly generate new documents through your workflows. This tutorial walks you through connecting Google Docs, setting up document creation, and using workflow data to populate content automatically. Perfect for streamlining document generation and enhancing productivity.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/lWpHH4qddWk"
|
||||
title="Use the Google Docs Create tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
With Google Docs, you can:
|
||||
|
||||
- **Create and edit documents**: Develop text documents with comprehensive formatting options
|
||||
@@ -67,6 +103,7 @@ Read content from a Google Docs document
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
| `metadata` | string |
|
||||
|
||||
### `google_docs_write`
|
||||
|
||||
@@ -85,6 +122,7 @@ Write or update content in a Google Docs document
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `updatedContent` | string |
|
||||
| `metadata` | string |
|
||||
|
||||
### `google_docs_create`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Google Drive
|
||||
description: Upload, download, and list files
|
||||
description: Create, upload, and list files
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -10,35 +10,35 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 87.3 78"
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
viewBox='0 0 87.3 78'
|
||||
|
||||
|
||||
|
||||
>
|
||||
<path
|
||||
d="m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z"
|
||||
fill="#0066da"
|
||||
d='m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z'
|
||||
fill='#0066da'
|
||||
/>
|
||||
<path
|
||||
d="m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z"
|
||||
fill="#00ac47"
|
||||
d='m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z'
|
||||
fill='#00ac47'
|
||||
/>
|
||||
<path
|
||||
d="m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z"
|
||||
fill="#ea4335"
|
||||
d='m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z'
|
||||
fill='#ea4335'
|
||||
/>
|
||||
<path
|
||||
d="m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z"
|
||||
fill="#00832d"
|
||||
d='m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z'
|
||||
fill='#00832d'
|
||||
/>
|
||||
<path
|
||||
d="m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z"
|
||||
fill="#2684fc"
|
||||
d='m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z'
|
||||
fill='#2684fc'
|
||||
/>
|
||||
<path
|
||||
d="m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z"
|
||||
fill="#ffba00"
|
||||
d='m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z'
|
||||
fill='#ffba00'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
@@ -46,6 +46,18 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Google Drive](https://drive.google.com) is Google's cloud storage and file synchronization service that allows users to store files, synchronize files across devices, and share files with others. As a core component of Google's productivity ecosystem, Google Drive offers robust storage, organization, and collaboration capabilities.
|
||||
|
||||
Learn how to integrate the Google Drive tool in Sim Studio to effortlessly pull information from your Drive through your workflows. This tutorial walks you through connecting Google Drive, setting up data retrieval, and using stored documents and files to enhance automation. Perfect for syncing important data with your agents in real-time.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/cRoRr4b-EAs"
|
||||
title="Use the Google Drive tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
With Google Drive, you can:
|
||||
|
||||
- **Store files in the cloud**: Upload and access your files from anywhere with internet access
|
||||
@@ -61,7 +73,7 @@ In Sim Studio, the Google Drive integration enables your agents to interact dire
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Google Drive functionality to manage files and folders. Upload new files, download existing ones, and list contents of folders using OAuth authentication. Supports file operations with custom MIME types and folder organization.
|
||||
Integrate Google Drive functionality to manage files and folders. Upload new files, get content from existing files, create new folders, and list contents of folders using OAuth authentication. Supports file operations with custom MIME types and folder organization.
|
||||
|
||||
|
||||
|
||||
@@ -95,22 +107,23 @@ Upload a file to Google Drive
|
||||
| `modifiedTime` | string |
|
||||
| `parents` | string |
|
||||
|
||||
### `google_drive_download`
|
||||
### `google_drive_create_folder`
|
||||
|
||||
Download a file from Google Drive
|
||||
Create a new folder in Google Drive
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Drive API |
|
||||
| `fileId` | string | Yes | The ID of the file to download |
|
||||
| `fileName` | string | Yes | Name of the folder to create |
|
||||
| `folderId` | string | No | ID of the parent folder \(leave empty for root folder\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `metadata` | string |
|
||||
| `file` | string |
|
||||
| `name` | string |
|
||||
| `mimeType` | string |
|
||||
| `webViewLink` | string |
|
||||
@@ -152,7 +165,11 @@ List files and folders in Google Drive
|
||||
|
||||
## Block Configuration
|
||||
|
||||
No configuration parameters required.
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
@@ -161,8 +178,8 @@ No configuration parameters required.
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `content` | string | content of the response |
|
||||
| ↳ `metadata` | json | metadata of the response |
|
||||
| ↳ `file` | json | file of the response |
|
||||
| ↳ `files` | json | files of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
@@ -9,29 +9,41 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
type="google_search"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" >
|
||||
iconSvg={`<svg className="block-icon" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' >
|
||||
<path
|
||||
fill="#fbc02d"
|
||||
d="M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12 s5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24s8.955,20,20,20 s20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"
|
||||
/>
|
||||
<path
|
||||
fill="#e53935"
|
||||
d="M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039 l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"
|
||||
/>
|
||||
<path
|
||||
fill="#4caf50"
|
||||
d="M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36 c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"
|
||||
/>
|
||||
<path
|
||||
fill="#1565c0"
|
||||
d="M43.611,20.083L43.595,20L42,20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571 c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"
|
||||
/>
|
||||
fill='#fbc02d'
|
||||
d='M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12 s5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24s8.955,20,20,20 s20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z'
|
||||
/>
|
||||
<path
|
||||
fill='#e53935'
|
||||
d='M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039 l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z'
|
||||
/>
|
||||
<path
|
||||
fill='#4caf50'
|
||||
d='M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36 c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z'
|
||||
/>
|
||||
<path
|
||||
fill='#1565c0'
|
||||
d='M43.611,20.083L43.595,20L42,20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571 c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Google Search](https://www.google.com) is the world's most widely used search engine, providing access to billions of web pages and information sources. Google Search uses sophisticated algorithms to deliver relevant search results based on user queries, making it an essential tool for finding information on the internet.
|
||||
|
||||
Learn how to integrate the Google Search tool in Sim Studio to effortlessly fetch real-time search results through your workflows. This tutorial walks you through connecting Google Search, configuring search queries, and using live data to enhance automation. Perfect for powering your agents with up-to-date information and smarter decision-making.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/1B7hV9b5UMQ"
|
||||
title="Use the Google Search tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
With Google Search, you can:
|
||||
|
||||
- **Find relevant information**: Access billions of web pages with Google's powerful search algorithms
|
||||
@@ -83,7 +95,7 @@ Search the web with the Custom Search API
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `query` | string | No | Search Query - Enter your search query |
|
||||
| `query` | string | Yes | Search Query - Enter your search query |
|
||||
|
||||
|
||||
|
||||
@@ -11,20 +11,20 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 48 48"
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
viewBox='0 0 48 48'
|
||||
|
||||
|
||||
>
|
||||
<path
|
||||
fill="#43a047"
|
||||
d="M37,45H11c-1.657,0-3-1.343-3-3V6c0-1.657,1.343-3,3-3h19l10,10v29C40,43.657,38.657,45,37,45z"
|
||||
fill='#43a047'
|
||||
d='M37,45H11c-1.657,0-3-1.343-3-3V6c0-1.657,1.343-3,3-3h19l10,10v29C40,43.657,38.657,45,37,45z'
|
||||
/>
|
||||
<path fill="#c8e6c9" d="M40 13L30 13 30 3z" />
|
||||
<path fill="#2e7d32" d="M30 13L40 23 40 13z" />
|
||||
<path fill='#c8e6c9' d='M40 13L30 13 30 3z' />
|
||||
<path fill='#2e7d32' d='M30 13L40 23 40 13z' />
|
||||
<path
|
||||
fill="#e8f5e9"
|
||||
d="M31,23H17h-2v2v2v2v2v2v2v2h18v-2v-2v-2v-2v-2v-2v-2H31z M17,25h4v2h-4V25z M17,29h4v2h-4V29z M17,33h4v2h-4V33z M31,35h-8v-2h8V35z M31,31h-8v-2h8V31z M31,27h-8v-2h8V27z"
|
||||
fill='#e8f5e9'
|
||||
d='M31,23H17h-2v2v2v2v2v2v2v2h18v-2v-2v-2v-2v-2v-2v-2H31z M17,25h4v2h-4V25z M17,29h4v2h-4V29z M17,33h4v2h-4V33z M31,35h-8v-2h8V35z M31,31h-8v-2h8V31z M31,27h-8v-2h8V27z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
@@ -32,6 +32,54 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Google Sheets](https://sheets.google.com) is a powerful cloud-based spreadsheet application that allows users to create, edit, and collaborate on spreadsheets in real-time. As part of Google's productivity suite, Google Sheets offers a versatile platform for data organization, analysis, and visualization with robust formatting, formula, and sharing capabilities.
|
||||
|
||||
Learn how to integrate the Google Sheets "Read" tool in Sim Studio to effortlessly fetch data from your spreadsheets to integrate into your workflows. This tutorial walks you through connecting Google Sheets, setting up data reads, and using that information to automate processes in real-time. Perfect for syncing live data with your agents.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/xxP7MZRuq_0"
|
||||
title="Use the Google Sheets Read tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
Discover how to use the Google Sheets "Write" tool in Sim Studio to automatically send data from your workflows to your Google Sheets. This tutorial covers setting up the integration, configuring write operations, and updating your sheets seamlessly as workflows execute. Perfect for maintaining real-time records without manual input.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/cO86qTj7qeY"
|
||||
title="Use the Google Sheets Write tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
Explore how to leverage the Google Sheets "Update" tool in Sim Studio to modify existing entries in your spreadsheets based on workflow execution. This tutorial demonstrates setting up the update logic, mapping data fields, and synchronizing changes instantly. Perfect for keeping your data current and consistent.
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/95by2fL9yn4"
|
||||
title="Use the Google Sheets Update tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
Learn how to use the Google Sheets "Append" tool in Sim Studio to effortlessly add new rows of data to your spreadsheets during workflow execution. This tutorial walks you through setting up the integration, configuring append actions, and ensuring smooth data growth. Perfect for expanding records without manual effort!
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/8DgNvLBCsAo"
|
||||
title="Use the Google Sheets Append tool in Sim Studio"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
With Google Sheets, you can:
|
||||
|
||||
- **Create and edit spreadsheets**: Develop data-driven documents with comprehensive formatting and calculation options
|
||||
@@ -13,13 +13,13 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
|
||||
|
||||
viewBox="0 0 101 100"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox='0 0 101 100'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d="M56.6019 2.6685C53.2445 0.339792 48.8025 0.308905 45.413 2.5907L44.1323 3.45286C44.1309 3.45379 44.1296 3.45471 44.1282 3.45564L5.37916 29.5416C5.37801 29.5424 5.37687 29.5431 5.37572 29.5439L4.37839 30.2153C1.64126 32.058 0 35.1414 0 38.441V90.0841C0 95.5599 4.4395 100 9.91593 100H67.4737C72.9501 100 77.389 95.5605 77.389 90.0841V49.6765C77.389 46.3038 75.675 43.1622 72.8385 41.3373L56.3027 30.6989C53.0908 28.6325 48.9777 28.5944 45.728 30.6009L28.3986 41.301C25.4732 43.1073 23.6922 46.3001 23.6922 49.7382V75.553H33.3248V51.0025C33.3248 50.1189 33.7823 49.2983 34.5337 48.8337L34.535 48.8329L49.5731 39.5476C50.408 39.0322 51.4645 39.0414 52.29 39.5714L66.5886 48.7705C67.3167 49.24 67.7564 50.0471 67.7564 50.9134V87.8176C67.7564 89.2256 66.6152 90.3674 65.2072 90.3674H12.1824C10.7742 90.3674 9.63262 89.2256 9.63262 87.8176V39.6474C9.63262 38.7995 10.0541 38.0071 10.7571 37.5331L49.5075 11.4463C50.3783 10.8601 51.5192 10.8675 52.3822 11.4646L89.8995 37.4867C89.9007 37.4877 89.9024 37.4886 89.9035 37.4896C90.588 37.9663 90.9959 38.7476 90.9959 39.5819V100H100.629V38.3956C100.629 35.1448 99.0352 32.1005 96.3641 30.2478L95.3969 29.5767C95.3941 29.575 95.3918 29.5733 95.3895 29.5717L56.6019 2.6685Z"
|
||||
fill="currentColor"
|
||||
d='M56.6019 2.6685C53.2445 0.339792 48.8025 0.308905 45.413 2.5907L44.1323 3.45286C44.1309 3.45379 44.1296 3.45471 44.1282 3.45564L5.37916 29.5416C5.37801 29.5424 5.37687 29.5431 5.37572 29.5439L4.37839 30.2153C1.64126 32.058 0 35.1414 0 38.441V90.0841C0 95.5599 4.4395 100 9.91593 100H67.4737C72.9501 100 77.389 95.5605 77.389 90.0841V49.6765C77.389 46.3038 75.675 43.1622 72.8385 41.3373L56.3027 30.6989C53.0908 28.6325 48.9777 28.5944 45.728 30.6009L28.3986 41.301C25.4732 43.1073 23.6922 46.3001 23.6922 49.7382V75.553H33.3248V51.0025C33.3248 50.1189 33.7823 49.2983 34.5337 48.8337L34.535 48.8329L49.5731 39.5476C50.408 39.0322 51.4645 39.0414 52.29 39.5714L66.5886 48.7705C67.3167 49.24 67.7564 50.0471 67.7564 50.9134V87.8176C67.7564 89.2256 66.6152 90.3674 65.2072 90.3674H12.1824C10.7742 90.3674 9.63262 89.2256 9.63262 87.8176V39.6474C9.63262 38.7995 10.0541 38.0071 10.7571 37.5331L49.5075 11.4463C50.3783 10.8601 51.5192 10.8675 52.3822 11.4646L89.8995 37.4867C89.9007 37.4877 89.9024 37.4886 89.9035 37.4896C90.588 37.9663 90.9959 38.7476 90.9959 39.5819V100H100.629V38.3956C100.629 35.1448 99.0352 32.1005 96.3641 30.2478L95.3969 29.5767C95.3941 29.575 95.3918 29.5733 95.3895 29.5717L56.6019 2.6685Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
127
apps/docs/content/docs/tools/huggingface.mdx
Normal file
127
apps/docs/content/docs/tools/huggingface.mdx
Normal file
File diff suppressed because one or more lines are too long
@@ -13,17 +13,17 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
|
||||
|
||||
viewBox="0 0 26 26"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
viewBox='0 0 26 26'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
stroke='currentColor'
|
||||
strokeWidth='2'
|
||||
strokeLinecap='round'
|
||||
strokeLinejoin='round'
|
||||
>
|
||||
<path d="M24.903 10.32C16.0897 9.10933 8.48966 15.6533 9.00033 24.3333M5.66699 7.66667C5.66699 8.37391 5.94794 9.05219 6.44804 9.55228C6.94814 10.0524 7.62641 10.3333 8.33366 10.3333C9.0409 10.3333 9.71918 10.0524 10.2193 9.55228C10.7194 9.05219 11.0003 8.37391 11.0003 7.66667C11.0003 6.95942 10.7194 6.28115 10.2193 5.78105C9.71918 5.28095 9.0409 5 8.33366 5C7.62641 5 6.94814 5.28095 6.44804 5.78105C5.94794 6.28115 5.66699 6.95942 5.66699 7.66667Z" />
|
||||
<path d="M1 14.4213C4.70667 13.908 8.03333 15.6986 9.832 18.5546" />
|
||||
<path d="M1 9.53333C1 6.54667 1 5.05333 1.58133 3.912C2.09265 2.90851 2.90851 2.09265 3.912 1.58133C5.05333 1 6.54667 1 9.53333 1H16.4667C19.4533 1 20.9467 1 22.088 1.58133C23.0915 2.09265 23.9073 2.90851 24.4187 3.912C25 5.05333 25 6.54667 25 9.53333V16.4667C25 19.4533 25 20.9467 24.4187 22.088C23.9073 23.0915 23.0915 23.9073 22.088 24.4187C20.9467 25 19.4533 25 16.4667 25H9.53333C6.54667 25 5.05333 25 3.912 24.4187C2.90851 23.9073 2.09265 23.0915 1.58133 22.088C1 20.9467 1 19.4533 1 16.4667V9.53333Z" />
|
||||
<path d='M24.903 10.32C16.0897 9.10933 8.48966 15.6533 9.00033 24.3333M5.66699 7.66667C5.66699 8.37391 5.94794 9.05219 6.44804 9.55228C6.94814 10.0524 7.62641 10.3333 8.33366 10.3333C9.0409 10.3333 9.71918 10.0524 10.2193 9.55228C10.7194 9.05219 11.0003 8.37391 11.0003 7.66667C11.0003 6.95942 10.7194 6.28115 10.2193 5.78105C9.71918 5.28095 9.0409 5 8.33366 5C7.62641 5 6.94814 5.28095 6.44804 5.78105C5.94794 6.28115 5.66699 6.95942 5.66699 7.66667Z' />
|
||||
<path d='M1 14.4213C4.70667 13.908 8.03333 15.6986 9.832 18.5546' />
|
||||
<path d='M1 9.53333C1 6.54667 1 5.05333 1.58133 3.912C2.09265 2.90851 2.90851 2.09265 3.912 1.58133C5.05333 1 6.54667 1 9.53333 1H16.4667C19.4533 1 20.9467 1 22.088 1.58133C23.0915 2.09265 23.9073 2.90851 24.4187 3.912C25 5.05333 25 6.54667 25 9.53333V16.4667C25 19.4533 25 20.9467 24.4187 22.088C23.9073 23.0915 23.0915 23.9073 22.088 24.4187C20.9467 25 19.4533 25 16.4667 25H9.53333C6.54667 25 5.05333 25 3.912 24.4187C2.90851 23.9073 2.09265 23.0915 1.58133 22.088C1 20.9467 1 19.4533 1 16.4667V9.53333Z' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
@@ -46,13 +46,13 @@ In Sim Studio, the DALL-E integration enables your agents to generate images pro
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Create high-quality images using DALL-E. Configure resolution, quality, style, and other parameters to get exactly the image you need.
|
||||
Create high-quality images using OpenAI
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `openai_dalle`
|
||||
### `openai_image`
|
||||
|
||||
Generate images using OpenAI
|
||||
|
||||
@@ -60,11 +60,12 @@ Generate images using OpenAI
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `prompt` | string | Yes | A text description of the desired image\(s\) |
|
||||
| `model` | string | Yes | The DALL-E model to use \(dall-e-2 or dall-e-3\) |
|
||||
| `size` | string | No | The size of the generated images \(1024x1024, 1024x1792, or 1792x1024\) |
|
||||
| `prompt` | string | Yes | A text description of the desired image |
|
||||
| `model` | string | Yes | The model to use \(gpt-image-1 or dall-e-3\) |
|
||||
| `size` | string | Yes | The size of the generated images \(1024x1024, 1024x1792, or 1792x1024\) |
|
||||
| `quality` | string | No | The quality of the image \(standard or hd\) |
|
||||
| `style` | string | No | The style of the image \(vivid or natural\) |
|
||||
| `background` | string | No | The background color, only for gpt-image-1 |
|
||||
| `n` | number | No | The number of images to generate \(1-10\) |
|
||||
| `apiKey` | string | Yes | Your OpenAI API key |
|
||||
|
||||
@@ -84,7 +85,7 @@ Generate images using OpenAI
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `provider` | string | Yes | Provider |
|
||||
| `prompt` | string | Yes | |
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ title: Tools
|
||||
description: Powerful tools to enhance your agentic workflows
|
||||
---
|
||||
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
|
||||
import { Steps, Step } from 'fumadocs-ui/components/steps'
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
|
||||
|
||||
Tools are powerful components in Sim Studio that allow your workflows to interact with external services, process data, and perform specialized tasks. They extend the capabilities of your agents and workflows by providing access to various APIs and services.
|
||||
|
||||
@@ -19,10 +19,16 @@ There are two primary ways to use tools in your Sim Studio workflows:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>As Standalone Blocks</strong>: Tools can be added as individual blocks on the canvas when you need deterministic, direct access to their functionality. This gives you precise control over when and how the tool is called.
|
||||
<strong>As Standalone Blocks</strong>: Tools can be added as individual
|
||||
blocks on the canvas when you need deterministic, direct access to their
|
||||
functionality. This gives you precise control over when and how the tool is
|
||||
called.
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>As Agent Tools</strong>: Tools can be added to Agent blocks by clicking "Add tools" and configuring the required parameters. This allows agents to dynamically choose which tools to use based on the context and requirements of the task.
|
||||
<strong>As Agent Tools</strong>: Tools can be added to Agent blocks by
|
||||
clicking "Add tools" and configuring the required parameters. This allows
|
||||
agents to dynamically choose which tools to use based on the context and
|
||||
requirements of the task.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -57,4 +63,4 @@ Tools typically return structured data that can be processed by subsequent block
|
||||
- Metadata about the operation
|
||||
- Status information
|
||||
|
||||
Refer to each tool's specific documentation to understand its exact output format.
|
||||
Refer to each tool's specific documentation to understand its exact output format.
|
||||
@@ -13,33 +13,33 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
|
||||
|
||||
viewBox="0 0 30 14"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox='0 0 30 14'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d="M17.1516 5.25628C17.1724 5.25598 17.1932 5.25598 17.2146 5.25569C17.2831 5.2551 17.3514 5.2554 17.4197 5.25598C17.468 5.25569 17.5161 5.25569 17.5644 5.2554C17.6655 5.2554 17.7665 5.25569 17.8679 5.25628C17.9956 5.25686 18.1237 5.25657 18.2514 5.25569C19.3043 5.251 20.25 5.39426 21.0642 6.12112C21.0958 6.14632 21.1275 6.17122 21.1594 6.19612C21.8277 6.7885 22.2088 7.68733 22.2704 8.56624C22.278 8.73762 22.2777 8.90901 22.2768 9.08069C22.2771 9.1346 22.2771 9.1885 22.2771 9.24241C22.2774 9.35432 22.2771 9.46594 22.2768 9.57786C22.2762 9.72083 22.2765 9.8638 22.2771 10.0068C22.2774 10.1178 22.2774 10.2285 22.2771 10.3393C22.2771 10.3923 22.2771 10.445 22.2774 10.4978C22.2774 10.571 22.2771 10.6446 22.2765 10.7181C22.2768 10.7395 22.2771 10.7612 22.2771 10.7831C22.2753 10.9405 22.2408 11.0615 22.1335 11.1789C21.9882 11.292 21.8977 11.3102 21.7163 11.3108C21.6862 11.3108 21.6862 11.3108 21.6551 11.3111C21.5874 11.3114 21.5198 11.3114 21.4521 11.3114C21.4035 11.3114 21.3551 11.3116 21.3065 11.3116C21.1746 11.3122 21.0428 11.3122 20.9107 11.3125C20.8284 11.3125 20.746 11.3125 20.6637 11.3128C20.4059 11.3131 20.1481 11.3134 19.8903 11.3137C19.5926 11.3137 19.2953 11.3143 18.9976 11.3152C18.7676 11.3157 18.5376 11.316 18.3077 11.316C18.1703 11.316 18.0329 11.3163 17.8954 11.3169C17.7663 11.3172 17.6368 11.3172 17.5076 11.3172C17.4601 11.3169 17.4129 11.3172 17.3655 11.3175C17.3007 11.3178 17.2357 11.3178 17.1709 11.3175C17.1349 11.3175 17.0986 11.3175 17.0614 11.3175C16.933 11.3034 16.8343 11.2621 16.7385 11.1748C16.6243 11.0278 16.6067 10.9246 16.6067 10.7436C16.6064 10.7111 16.6064 10.7111 16.6064 10.678C16.6061 10.605 16.6058 10.5321 16.6058 10.4594C16.6055 10.4073 16.6055 10.3551 16.6052 10.303C16.6046 10.1313 16.6043 9.95989 16.604 9.78821C16.6037 9.72932 16.6037 9.67014 16.6037 9.61126C16.6032 9.33382 16.6026 9.05637 16.6023 8.77893C16.602 8.45872 16.6014 8.1385 16.6002 7.81858C16.5994 7.57102 16.5988 7.32346 16.5988 7.07591C16.5988 6.92825 16.5985 6.7803 16.5976 6.63264C16.597 6.49348 16.597 6.35432 16.5973 6.21516C16.5973 6.16419 16.597 6.11321 16.5967 6.06223C16.5929 5.56565 16.5929 5.56565 16.7283 5.3887C16.8583 5.27737 16.9811 5.25657 17.1516 5.25628Z"
|
||||
fill="currentColor"
|
||||
d='M17.1516 5.25628C17.1724 5.25598 17.1932 5.25598 17.2146 5.25569C17.2831 5.2551 17.3514 5.2554 17.4197 5.25598C17.468 5.25569 17.5161 5.25569 17.5644 5.2554C17.6655 5.2554 17.7665 5.25569 17.8679 5.25628C17.9956 5.25686 18.1237 5.25657 18.2514 5.25569C19.3043 5.251 20.25 5.39426 21.0642 6.12112C21.0958 6.14632 21.1275 6.17122 21.1594 6.19612C21.8277 6.7885 22.2088 7.68733 22.2704 8.56624C22.278 8.73762 22.2777 8.90901 22.2768 9.08069C22.2771 9.1346 22.2771 9.1885 22.2771 9.24241C22.2774 9.35432 22.2771 9.46594 22.2768 9.57786C22.2762 9.72083 22.2765 9.8638 22.2771 10.0068C22.2774 10.1178 22.2774 10.2285 22.2771 10.3393C22.2771 10.3923 22.2771 10.445 22.2774 10.4978C22.2774 10.571 22.2771 10.6446 22.2765 10.7181C22.2768 10.7395 22.2771 10.7612 22.2771 10.7831C22.2753 10.9405 22.2408 11.0615 22.1335 11.1789C21.9882 11.292 21.8977 11.3102 21.7163 11.3108C21.6862 11.3108 21.6862 11.3108 21.6551 11.3111C21.5874 11.3114 21.5198 11.3114 21.4521 11.3114C21.4035 11.3114 21.3551 11.3116 21.3065 11.3116C21.1746 11.3122 21.0428 11.3122 20.9107 11.3125C20.8284 11.3125 20.746 11.3125 20.6637 11.3128C20.4059 11.3131 20.1481 11.3134 19.8903 11.3137C19.5926 11.3137 19.2953 11.3143 18.9976 11.3152C18.7676 11.3157 18.5376 11.316 18.3077 11.316C18.1703 11.316 18.0329 11.3163 17.8954 11.3169C17.7663 11.3172 17.6368 11.3172 17.5076 11.3172C17.4601 11.3169 17.4129 11.3172 17.3655 11.3175C17.3007 11.3178 17.2357 11.3178 17.1709 11.3175C17.1349 11.3175 17.0986 11.3175 17.0614 11.3175C16.933 11.3034 16.8343 11.2621 16.7385 11.1748C16.6243 11.0278 16.6067 10.9246 16.6067 10.7436C16.6064 10.7111 16.6064 10.7111 16.6064 10.678C16.6061 10.605 16.6058 10.5321 16.6058 10.4594C16.6055 10.4073 16.6055 10.3551 16.6052 10.303C16.6046 10.1313 16.6043 9.95989 16.604 9.78821C16.6037 9.72932 16.6037 9.67014 16.6037 9.61126C16.6032 9.33382 16.6026 9.05637 16.6023 8.77893C16.602 8.45872 16.6014 8.1385 16.6002 7.81858C16.5994 7.57102 16.5988 7.32346 16.5988 7.07591C16.5988 6.92825 16.5985 6.7803 16.5976 6.63264C16.597 6.49348 16.597 6.35432 16.5973 6.21516C16.5973 6.16419 16.597 6.11321 16.5967 6.06223C16.5929 5.56565 16.5929 5.56565 16.7283 5.3887C16.8583 5.27737 16.9811 5.25657 17.1516 5.25628Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
<path
|
||||
d="M28.4893 5.83187C28.5341 5.86966 28.5786 5.90745 28.6229 5.94554C28.6407 5.95931 28.6586 5.97337 28.6771 5.98773C29.2217 6.42161 29.5281 7.12093 29.6483 7.79124C29.6509 7.83665 29.6524 7.88206 29.6527 7.92777C29.6529 7.96761 29.6529 7.96761 29.6532 8.00804C29.6532 8.03704 29.6535 8.06575 29.6535 8.09534C29.6538 8.12611 29.6538 8.15657 29.6541 8.18821C29.6547 8.28929 29.655 8.39036 29.6553 8.49144C29.6553 8.52601 29.6556 8.56058 29.6556 8.59603C29.6562 8.77884 29.6568 8.96165 29.6571 9.14446C29.6573 9.33314 29.6582 9.52181 29.6594 9.71077C29.6603 9.85579 29.6606 10.0011 29.6606 10.1461C29.6609 10.2159 29.6612 10.2856 29.6617 10.355C29.6623 10.4523 29.6623 10.5498 29.662 10.6471C29.6626 10.6902 29.6626 10.6902 29.6632 10.7341C29.662 10.9002 29.6474 11.0025 29.5311 11.1311C29.3805 11.2661 29.2481 11.265 29.0556 11.2632C29.0257 11.2635 28.9958 11.2638 28.9654 11.2638C28.8669 11.2644 28.7685 11.2641 28.67 11.2638C28.6012 11.2638 28.5323 11.2638 28.4635 11.2641C28.3191 11.2641 28.1746 11.2641 28.0302 11.2635C27.8462 11.2626 27.6625 11.2632 27.4785 11.2638C27.3362 11.2644 27.1938 11.2641 27.0517 11.2638C26.9837 11.2638 26.916 11.2638 26.8484 11.2641C25.9759 11.2667 25.1834 11.0508 24.5488 10.4268C24.5201 10.3981 24.4914 10.3691 24.4627 10.3401C24.4384 10.3155 24.4138 10.2909 24.3889 10.2657C23.8404 9.68851 23.5985 8.90687 23.6087 8.12435C23.6301 7.32191 23.9899 6.59681 24.5506 6.03343C25.6158 5.02562 27.3318 4.91839 28.4893 5.83187Z"
|
||||
fill="currentColor"
|
||||
d='M28.4893 5.83187C28.5341 5.86966 28.5786 5.90745 28.6229 5.94554C28.6407 5.95931 28.6586 5.97337 28.6771 5.98773C29.2217 6.42161 29.5281 7.12093 29.6483 7.79124C29.6509 7.83665 29.6524 7.88206 29.6527 7.92777C29.6529 7.96761 29.6529 7.96761 29.6532 8.00804C29.6532 8.03704 29.6535 8.06575 29.6535 8.09534C29.6538 8.12611 29.6538 8.15657 29.6541 8.18821C29.6547 8.28929 29.655 8.39036 29.6553 8.49144C29.6553 8.52601 29.6556 8.56058 29.6556 8.59603C29.6562 8.77884 29.6568 8.96165 29.6571 9.14446C29.6573 9.33314 29.6582 9.52181 29.6594 9.71077C29.6603 9.85579 29.6606 10.0011 29.6606 10.1461C29.6609 10.2159 29.6612 10.2856 29.6617 10.355C29.6623 10.4523 29.6623 10.5498 29.662 10.6471C29.6626 10.6902 29.6626 10.6902 29.6632 10.7341C29.662 10.9002 29.6474 11.0025 29.5311 11.1311C29.3805 11.2661 29.2481 11.265 29.0556 11.2632C29.0257 11.2635 28.9958 11.2638 28.9654 11.2638C28.8669 11.2644 28.7685 11.2641 28.67 11.2638C28.6012 11.2638 28.5323 11.2638 28.4635 11.2641C28.3191 11.2641 28.1746 11.2641 28.0302 11.2635C27.8462 11.2626 27.6625 11.2632 27.4785 11.2638C27.3362 11.2644 27.1938 11.2641 27.0517 11.2638C26.9837 11.2638 26.916 11.2638 26.8484 11.2641C25.9759 11.2667 25.1834 11.0508 24.5488 10.4268C24.5201 10.3981 24.4914 10.3691 24.4627 10.3401C24.4384 10.3155 24.4138 10.2909 24.3889 10.2657C23.8404 9.68851 23.5985 8.90687 23.6087 8.12435C23.6301 7.32191 23.9899 6.59681 24.5506 6.03343C25.6158 5.02562 27.3318 4.91839 28.4893 5.83187Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
<path
|
||||
d="M8.6422 5.41793C8.7591 5.5858 8.7424 5.76246 8.74093 5.95904C8.74122 5.99566 8.74123 6.03228 8.74123 6.07037C8.74152 6.17086 8.74122 6.27164 8.74093 6.37213C8.74064 6.47818 8.74064 6.58424 8.74064 6.69C8.74093 6.86842 8.74035 7.04713 8.74005 7.22554C8.73947 7.43004 8.73917 7.63482 8.73947 7.83961C8.73947 8.03765 8.73947 8.23599 8.73917 8.43404C8.73888 8.51783 8.73888 8.60133 8.73888 8.68511C8.73947 9.82125 8.63869 10.9436 7.85119 11.8339C7.82951 11.8588 7.80753 11.8837 7.78527 11.9095C7.72023 11.9831 7.65402 12.0551 7.58751 12.1269C7.57199 12.1442 7.55675 12.1618 7.54064 12.1796C6.93712 12.8277 5.99757 13.1886 5.12746 13.2276C5.10197 13.2291 5.07619 13.2302 5.04982 13.2314C4.98771 13.2346 4.92531 13.2373 4.8629 13.2402C4.86085 12.0302 4.86085 10.8203 4.86261 9.61031C4.86291 9.44918 4.8629 9.28804 4.8632 9.12691C4.86349 8.63941 4.86466 8.15191 4.86671 7.6647C4.86789 7.45552 4.86847 7.24634 4.86876 7.03717C4.86876 6.84058 4.86964 6.64371 4.87082 6.44713C4.8714 6.37506 4.8714 6.30299 4.8714 6.23092C4.87111 6.13248 4.87199 6.03404 4.87287 5.9356C4.87257 5.90718 4.87228 5.87877 4.87199 5.84947C4.87521 5.66051 4.91417 5.53306 5.03869 5.38863C5.1673 5.27232 5.31642 5.28756 5.48107 5.28756C5.51066 5.28726 5.54025 5.28697 5.57101 5.28668C5.66886 5.28551 5.76701 5.28521 5.86515 5.28463C5.93341 5.28404 6.00167 5.28345 6.06994 5.28287C6.2132 5.2817 6.35617 5.28082 6.49914 5.27994C6.68253 5.27906 6.86564 5.27759 7.04874 5.27584C7.18996 5.27467 7.33087 5.27349 7.47179 5.27261C7.53947 5.27203 7.60685 5.27174 7.67453 5.27115C7.76886 5.27027 7.86349 5.26998 7.95812 5.26939C7.98566 5.2691 8.01349 5.26881 8.0422 5.26881C8.4632 5.26734 8.4632 5.26734 8.6422 5.41793Z"
|
||||
fill="currentColor"
|
||||
d='M8.6422 5.41793C8.7591 5.5858 8.7424 5.76246 8.74093 5.95904C8.74122 5.99566 8.74123 6.03228 8.74123 6.07037C8.74152 6.17086 8.74122 6.27164 8.74093 6.37213C8.74064 6.47818 8.74064 6.58424 8.74064 6.69C8.74093 6.86842 8.74035 7.04713 8.74005 7.22554C8.73947 7.43004 8.73917 7.63482 8.73947 7.83961C8.73947 8.03765 8.73947 8.23599 8.73917 8.43404C8.73888 8.51783 8.73888 8.60133 8.73888 8.68511C8.73947 9.82125 8.63869 10.9436 7.85119 11.8339C7.82951 11.8588 7.80753 11.8837 7.78527 11.9095C7.72023 11.9831 7.65402 12.0551 7.58751 12.1269C7.57199 12.1442 7.55675 12.1618 7.54064 12.1796C6.93712 12.8277 5.99757 13.1886 5.12746 13.2276C5.10197 13.2291 5.07619 13.2302 5.04982 13.2314C4.98771 13.2346 4.92531 13.2373 4.8629 13.2402C4.86085 12.0302 4.86085 10.8203 4.86261 9.61031C4.86291 9.44918 4.8629 9.28804 4.8632 9.12691C4.86349 8.63941 4.86466 8.15191 4.86671 7.6647C4.86789 7.45552 4.86847 7.24634 4.86876 7.03717C4.86876 6.84058 4.86964 6.64371 4.87082 6.44713C4.8714 6.37506 4.8714 6.30299 4.8714 6.23092C4.87111 6.13248 4.87199 6.03404 4.87287 5.9356C4.87257 5.90718 4.87228 5.87877 4.87199 5.84947C4.87521 5.66051 4.91417 5.53306 5.03869 5.38863C5.1673 5.27232 5.31642 5.28756 5.48107 5.28756C5.51066 5.28726 5.54025 5.28697 5.57101 5.28668C5.66886 5.28551 5.76701 5.28521 5.86515 5.28463C5.93341 5.28404 6.00167 5.28345 6.06994 5.28287C6.2132 5.2817 6.35617 5.28082 6.49914 5.27994C6.68253 5.27906 6.86564 5.27759 7.04874 5.27584C7.18996 5.27467 7.33087 5.27349 7.47179 5.27261C7.53947 5.27203 7.60685 5.27174 7.67453 5.27115C7.76886 5.27027 7.86349 5.26998 7.95812 5.26939C7.98566 5.2691 8.01349 5.26881 8.0422 5.26881C8.4632 5.26734 8.4632 5.26734 8.6422 5.41793Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
<path
|
||||
d="M11.2636 5.26714C11.2897 5.26685 11.3155 5.26685 11.3421 5.26655C11.3705 5.26655 11.3987 5.26626 11.428 5.26626C11.4578 5.26597 11.4877 5.26597 11.5185 5.26567C11.6175 5.26509 11.7165 5.26479 11.8158 5.2645C11.8665 5.26421 11.8665 5.26421 11.9184 5.26421C12.0974 5.26362 12.2767 5.26304 12.456 5.26274C12.6408 5.26245 12.8257 5.26157 13.0109 5.2604C13.1532 5.25952 13.2953 5.25923 13.4377 5.25923C13.506 5.25894 13.5742 5.25864 13.6422 5.25806C13.7377 5.25747 13.8332 5.25747 13.9287 5.25776C13.9569 5.25718 13.985 5.25688 14.0137 5.25659C14.1895 5.25776 14.3278 5.28501 14.4731 5.38872C14.6096 5.55659 14.6231 5.68052 14.6234 5.89233C14.6234 5.91343 14.6237 5.93481 14.6237 5.95679C14.6239 6.02798 14.6237 6.09917 14.6237 6.17036C14.6239 6.22134 14.6239 6.27261 14.6239 6.32358C14.6242 6.46216 14.6245 6.60103 14.6245 6.73989C14.6245 6.85562 14.6245 6.97134 14.6245 7.08735C14.6248 7.36069 14.6248 7.63403 14.6248 7.90708C14.6248 8.18921 14.6251 8.47105 14.6257 8.75288C14.626 8.99487 14.6263 9.23687 14.6263 9.47886C14.6263 9.62358 14.6263 9.76802 14.6266 9.91245C14.6269 10.0487 14.6269 10.1846 14.6266 10.3206C14.6266 10.3704 14.6266 10.4202 14.6269 10.47C14.6272 10.5382 14.6269 10.6065 14.6269 10.6745C14.6269 10.7128 14.6269 10.7509 14.6269 10.7902C14.616 10.9469 14.5935 11.0638 14.4895 11.1839C14.2952 11.3498 14.1092 11.3404 13.8655 11.3401C13.8233 11.3404 13.8233 11.3404 13.7802 11.3404C13.687 11.3407 13.5939 11.3407 13.501 11.341C13.436 11.341 13.3712 11.341 13.3065 11.3413C13.1705 11.3413 13.0346 11.3413 12.8987 11.3413C12.7249 11.3413 12.5509 11.3418 12.3772 11.3421C12.2433 11.3424 12.1091 11.3427 11.9752 11.3427C11.9114 11.3427 11.8472 11.3427 11.783 11.343C11.6934 11.3433 11.6034 11.3433 11.5138 11.343C11.4745 11.3433 11.4745 11.3433 11.4341 11.3436C11.2425 11.3424 11.0609 11.3348 10.9044 11.2132C10.7761 11.0486 10.7412 10.9103 10.7412 10.7035C10.7409 10.6821 10.7409 10.6607 10.7406 10.6387C10.7404 10.5672 10.7406 10.496 10.7409 10.4249C10.7409 10.3736 10.7406 10.322 10.7404 10.2708C10.7401 10.1319 10.7404 9.99272 10.7406 9.85386C10.7406 9.70796 10.7406 9.56235 10.7404 9.41675C10.7404 9.17183 10.7404 8.9272 10.7409 8.68257C10.7412 8.40015 10.7412 8.11743 10.7406 7.83472C10.7404 7.59185 10.7404 7.34897 10.7404 7.1061C10.7406 6.96108 10.7406 6.81636 10.7404 6.67134C10.7401 6.53511 10.7404 6.39858 10.7406 6.26235C10.7409 6.21255 10.7409 6.16245 10.7406 6.11265C10.7404 6.04409 10.7406 5.97583 10.7412 5.90757C10.7412 5.86919 10.7412 5.8311 10.7412 5.79185C10.7582 5.62397 10.7963 5.47515 10.9264 5.36118C11.0421 5.28325 11.1262 5.26802 11.2636 5.26714Z"
|
||||
fill="currentColor"
|
||||
d='M11.2636 5.26714C11.2897 5.26685 11.3155 5.26685 11.3421 5.26655C11.3705 5.26655 11.3987 5.26626 11.428 5.26626C11.4578 5.26597 11.4877 5.26597 11.5185 5.26567C11.6175 5.26509 11.7165 5.26479 11.8158 5.2645C11.8665 5.26421 11.8665 5.26421 11.9184 5.26421C12.0974 5.26362 12.2767 5.26304 12.456 5.26274C12.6408 5.26245 12.8257 5.26157 13.0109 5.2604C13.1532 5.25952 13.2953 5.25923 13.4377 5.25923C13.506 5.25894 13.5742 5.25864 13.6422 5.25806C13.7377 5.25747 13.8332 5.25747 13.9287 5.25776C13.9569 5.25718 13.985 5.25688 14.0137 5.25659C14.1895 5.25776 14.3278 5.28501 14.4731 5.38872C14.6096 5.55659 14.6231 5.68052 14.6234 5.89233C14.6234 5.91343 14.6237 5.93481 14.6237 5.95679C14.6239 6.02798 14.6237 6.09917 14.6237 6.17036C14.6239 6.22134 14.6239 6.27261 14.6239 6.32358C14.6242 6.46216 14.6245 6.60103 14.6245 6.73989C14.6245 6.85562 14.6245 6.97134 14.6245 7.08735C14.6248 7.36069 14.6248 7.63403 14.6248 7.90708C14.6248 8.18921 14.6251 8.47105 14.6257 8.75288C14.626 8.99487 14.6263 9.23687 14.6263 9.47886C14.6263 9.62358 14.6263 9.76802 14.6266 9.91245C14.6269 10.0487 14.6269 10.1846 14.6266 10.3206C14.6266 10.3704 14.6266 10.4202 14.6269 10.47C14.6272 10.5382 14.6269 10.6065 14.6269 10.6745C14.6269 10.7128 14.6269 10.7509 14.6269 10.7902C14.616 10.9469 14.5935 11.0638 14.4895 11.1839C14.2952 11.3498 14.1092 11.3404 13.8655 11.3401C13.8233 11.3404 13.8233 11.3404 13.7802 11.3404C13.687 11.3407 13.5939 11.3407 13.501 11.341C13.436 11.341 13.3712 11.341 13.3065 11.3413C13.1705 11.3413 13.0346 11.3413 12.8987 11.3413C12.7249 11.3413 12.5509 11.3418 12.3772 11.3421C12.2433 11.3424 12.1091 11.3427 11.9752 11.3427C11.9114 11.3427 11.8472 11.3427 11.783 11.343C11.6934 11.3433 11.6034 11.3433 11.5138 11.343C11.4745 11.3433 11.4745 11.3433 11.4341 11.3436C11.2425 11.3424 11.0609 11.3348 10.9044 11.2132C10.7761 11.0486 10.7412 10.9103 10.7412 10.7035C10.7409 10.6821 10.7409 10.6607 10.7406 10.6387C10.7404 10.5672 10.7406 10.496 10.7409 10.4249C10.7409 10.3736 10.7406 10.322 10.7404 10.2708C10.7401 10.1319 10.7404 9.99272 10.7406 9.85386C10.7406 9.70796 10.7406 9.56235 10.7404 9.41675C10.7404 9.17183 10.7404 8.9272 10.7409 8.68257C10.7412 8.40015 10.7412 8.11743 10.7406 7.83472C10.7404 7.59185 10.7404 7.34897 10.7404 7.1061C10.7406 6.96108 10.7406 6.81636 10.7404 6.67134C10.7401 6.53511 10.7404 6.39858 10.7406 6.26235C10.7409 6.21255 10.7409 6.16245 10.7406 6.11265C10.7404 6.04409 10.7406 5.97583 10.7412 5.90757C10.7412 5.86919 10.7412 5.8311 10.7412 5.79185C10.7582 5.62397 10.7963 5.47515 10.9264 5.36118C11.0421 5.28325 11.1262 5.26802 11.2636 5.26714Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
<path
|
||||
d="M3.58833 9.8857C3.97827 10.2715 4.18628 10.7596 4.20093 11.3066C4.18452 11.8662 3.96245 12.3628 3.56226 12.7527C3.194 13.0776 2.70064 13.2692 2.20523 13.2466C2.18326 13.2446 2.16158 13.2425 2.13902 13.2402C2.11031 13.2376 2.08159 13.2349 2.05201 13.232C1.51617 13.1658 1.08199 12.9168 0.732767 12.5078C0.370071 12.0132 0.294193 11.4762 0.364505 10.8783C0.476126 10.3738 0.798392 9.944 1.23081 9.66598C1.99693 9.22125 2.9148 9.30006 3.58833 9.8857Z"
|
||||
fill="currentColor"
|
||||
d='M3.58833 9.8857C3.97827 10.2715 4.18628 10.7596 4.20093 11.3066C4.18452 11.8662 3.96245 12.3628 3.56226 12.7527C3.194 13.0776 2.70064 13.2692 2.20523 13.2466C2.18326 13.2446 2.16158 13.2425 2.13902 13.2402C2.11031 13.2376 2.08159 13.2349 2.05201 13.232C1.51617 13.1658 1.08199 12.9168 0.732767 12.5078C0.370071 12.0132 0.294193 11.4762 0.364505 10.8783C0.476126 10.3738 0.798392 9.944 1.23081 9.66598C1.99693 9.22125 2.9148 9.30006 3.58833 9.8857Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
<path
|
||||
d="M12.6714 0.74873C12.6995 0.748437 12.7273 0.748145 12.756 0.747559C13.2318 0.749609 13.693 0.952637 14.0349 1.28105C14.3838 1.6335 14.5947 2.0791 14.6 2.57627C14.5965 3.14111 14.4632 3.62246 14.063 4.04111C13.6912 4.40293 13.2008 4.59365 12.686 4.60859C12.1434 4.59453 11.6864 4.40234 11.2941 4.02969C10.9086 3.62305 10.7357 3.13232 10.7466 2.57598C10.7659 2.08145 10.9883 1.60625 11.3384 1.25791C11.7245 0.919824 12.1578 0.742578 12.6714 0.74873Z"
|
||||
fill="currentColor"
|
||||
d='M12.6714 0.74873C12.6995 0.748437 12.7273 0.748145 12.756 0.747559C13.2318 0.749609 13.693 0.952637 14.0349 1.28105C14.3838 1.6335 14.5947 2.0791 14.6 2.57627C14.5965 3.14111 14.4632 3.62246 14.063 4.04111C13.6912 4.40293 13.2008 4.59365 12.686 4.60859C12.1434 4.59453 11.6864 4.40234 11.2941 4.02969C10.9086 3.62305 10.7357 3.13232 10.7466 2.57598C10.7659 2.08145 10.9883 1.60625 11.3384 1.25791C11.7245 0.919824 12.1578 0.742578 12.6714 0.74873Z'
|
||||
fill='currentColor'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
@@ -81,7 +81,9 @@ Extract and process web content into clean, LLM-friendly text using Jina AI Read
|
||||
|
||||
#### Output
|
||||
|
||||
This tool does not produce any outputs.
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
|
||||
|
||||
|
||||
@@ -11,17 +11,17 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 30 30"
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
viewBox='0 0 30 30'
|
||||
|
||||
|
||||
focusable="false"
|
||||
aria-hidden="true"
|
||||
focusable='false'
|
||||
aria-hidden='true'
|
||||
>
|
||||
<path
|
||||
fill="#1868DB"
|
||||
d="M11.034 21.99h-2.22c-3.346 0-5.747-2.05-5.747-5.052h11.932c.619 0 1.019.44 1.019 1.062v12.007c-2.983 0-4.984-2.416-4.984-5.784zm5.893-5.967h-2.219c-3.347 0-5.748-2.013-5.748-5.015h11.933c.618 0 1.055.402 1.055 1.025V24.04c-2.983 0-5.02-2.416-5.02-5.784zm5.93-5.93h-2.219c-3.347 0-5.748-2.05-5.748-5.052h11.933c.618 0 1.018.439 1.018 1.025v12.007c-2.983 0-4.984-2.416-4.984-5.784z"
|
||||
/>
|
||||
<path
|
||||
fill='#1868DB'
|
||||
d='M11.034 21.99h-2.22c-3.346 0-5.747-2.05-5.747-5.052h11.932c.619 0 1.019.44 1.019 1.062v12.007c-2.983 0-4.984-2.416-4.984-5.784zm5.893-5.967h-2.219c-3.347 0-5.748-2.013-5.748-5.015h11.933c.618 0 1.055.402 1.055 1.025V24.04c-2.983 0-5.02-2.416-5.02-5.784zm5.93-5.93h-2.219c-3.347 0-5.748-2.05-5.748-5.052h11.933c.618 0 1.018.439 1.018 1.025v12.007c-2.983 0-4.984-2.416-4.984-5.784z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
128
apps/docs/content/docs/tools/knowledge.mdx
Normal file
128
apps/docs/content/docs/tools/knowledge.mdx
Normal file
@@ -0,0 +1,128 @@
|
||||
---
|
||||
title: Knowledge
|
||||
description: Use vector search
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="knowledge"
|
||||
color="#00B0B0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
|
||||
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke='currentColor'
|
||||
strokeWidth='1.5'
|
||||
strokeLinecap='round'
|
||||
strokeLinejoin='round'
|
||||
>
|
||||
<path d='M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14' />
|
||||
<path d='m7.5 4.27 9 5.15' />
|
||||
<polyline points='3.29 7 12 12 20.71 7' />
|
||||
<line x1='12' x2='12' y1='22' y2='12' />
|
||||
<circle cx='18.5' cy='15.5' r='2.5' />
|
||||
<path d='M20.27 17.27 22 19' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
Sim Studio's Knowledge Base is a powerful native feature that enables you to create, manage, and query custom knowledge bases directly within the platform. Using advanced AI embeddings and vector search technology, the Knowledge Base block allows you to build intelligent search capabilities into your workflows, making it easy to find and utilize relevant information across your organization.
|
||||
|
||||
The Knowledge Base system provides a comprehensive solution for managing organizational knowledge through its flexible and scalable architecture. With its built-in vector search capabilities, teams can perform semantic searches that understand meaning and context, going beyond traditional keyword matching.
|
||||
|
||||
Key features of the Knowledge Base include:
|
||||
|
||||
- Semantic Search: Advanced AI-powered search that understands meaning and context, not just keywords
|
||||
- Vector Embeddings: Automatic conversion of text into high-dimensional vectors for intelligent similarity matching
|
||||
- Custom Knowledge Bases: Create and manage multiple knowledge bases for different purposes or departments
|
||||
- Flexible Content Types: Support for various document formats and content types
|
||||
- Real-time Updates: Immediate indexing of new content for instant searchability
|
||||
|
||||
In Sim Studio, the Knowledge Base block enables your agents to perform intelligent semantic searches across your custom knowledge bases. This creates opportunities for automated information retrieval, content recommendations, and knowledge discovery as part of your AI workflows. The integration allows agents to search and retrieve relevant information programmatically, facilitating automated knowledge management tasks and ensuring that important information is easily accessible. By leveraging the Knowledge Base block, you can build intelligent agents that enhance information discovery while automating routine knowledge management tasks, improving team efficiency and ensuring consistent access to organizational knowledge.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Perform semantic vector search across one or more knowledge bases or upload new chunks to documents. Uses advanced AI embeddings to understand meaning and context for search operations.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `knowledge_search`
|
||||
|
||||
Search for similar content in one or more knowledge bases using vector similarity
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `knowledgeBaseIds` | string | Yes | ID of the knowledge base to search in, or comma-separated IDs for multiple knowledge bases |
|
||||
| `query` | string | Yes | Search query text |
|
||||
| `topK` | number | No | Number of most similar results to return \(1-100\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `results` | string |
|
||||
| `query` | string |
|
||||
| `totalResults` | string |
|
||||
|
||||
### `knowledge_upload_chunk`
|
||||
|
||||
Upload a new chunk to a document in a knowledge base
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `knowledgeBaseId` | string | Yes | ID of the knowledge base containing the document |
|
||||
| `documentId` | string | Yes | ID of the document to upload the chunk to |
|
||||
| `content` | string | Yes | Content of the chunk to upload |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `data` | string |
|
||||
| `chunkIndex` | string |
|
||||
| `content` | string |
|
||||
| `contentLength` | string |
|
||||
| `tokenCount` | string |
|
||||
| `enabled` | string |
|
||||
| `createdAt` | string |
|
||||
| `updatedAt` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `results` | json | results of the response |
|
||||
| ↳ `query` | string | query of the response |
|
||||
| ↳ `totalResults` | number | totalResults of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `blocks`
|
||||
- Type: `knowledge`
|
||||
116
apps/docs/content/docs/tools/linear.mdx
Normal file
116
apps/docs/content/docs/tools/linear.mdx
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: Linear
|
||||
description: Read and create issues in Linear
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="linear"
|
||||
color="#5E6AD2"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='currentColor'
|
||||
|
||||
|
||||
viewBox='0 0 100 100'
|
||||
>
|
||||
<path
|
||||
fill='currentColor'
|
||||
d='M1.22541 61.5228c-.2225-.9485.90748-1.5459 1.59638-.857L39.3342 97.1782c.6889.6889.0915 1.8189-.857 1.5964C20.0515 94.4522 5.54779 79.9485 1.22541 61.5228ZM.00189135 46.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503 99.7085c.2007.2007.4773.3075.7606.2896 2.3692-.1476 4.6938-.46 6.9624-.9259.7645-.157 1.0301-1.0963.4782-1.6481L2.57595 39.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915 2.2686-.77832 4.5932-.92588465 6.9624ZM4.21093 29.7054c-.16649.3738-.08169.8106.20765 1.1l64.77602 64.776c.2894.2894.7262.3742 1.1.2077 1.7861-.7956 3.5171-1.6927 5.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566 24.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132 1.6684-1.88843 3.3994-2.68399 5.1855ZM12.6587 18.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795 6.45931 35.1114 0 49.9519 0 77.5927 0 100 22.4073 100 50.0481c0 14.8405-6.4593 28.1724-16.7199 37.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587 18.074Z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Linear](https://linear.app) is a leading project management and issue tracking platform that helps teams plan, track, and manage their work effectively. As a modern project management tool, Linear has become increasingly popular among software development teams and project management professionals for its streamlined interface and powerful features.
|
||||
|
||||
Linear provides a comprehensive set of tools for managing complex projects through its flexible and customizable workflow system. With its robust API and integration capabilities, Linear enables teams to streamline their development processes and maintain clear visibility of project progress.
|
||||
|
||||
Key features of Linear include:
|
||||
|
||||
- Agile Project Management: Support for Scrum and Kanban methodologies with customizable boards and workflows
|
||||
- Issue Tracking: Sophisticated tracking system for bugs, stories, epics, and tasks with detailed reporting
|
||||
- Workflow Automation: Powerful automation rules to streamline repetitive tasks and processes
|
||||
- Advanced Search: Complex filtering and reporting capabilities for efficient issue management
|
||||
|
||||
In Sim Studio, the Linear integration allows your agents to seamlessly interact with your project management workflow. This creates opportunities for automated issue creation, updates, and tracking as part of your AI workflows. The integration enables agents to read existing issues and create new ones programmatically, facilitating automated project management tasks and ensuring that important information is properly tracked and documented. By connecting Sim Studio with Linear, you can build intelligent agents that maintain project visibility while automating routine project management tasks, enhancing team productivity and ensuring consistent project tracking.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate with Linear to fetch, filter, and create issues directly from your workflow.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `linear_read_issues`
|
||||
|
||||
Fetch and filter issues from Linear
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `teamId` | string | Yes | Linear team ID |
|
||||
| `projectId` | string | Yes | Linear project ID |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `issues` | string |
|
||||
|
||||
### `linear_create_issue`
|
||||
|
||||
Create a new issue in Linear
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `teamId` | string | Yes | Linear team ID |
|
||||
| `projectId` | string | Yes | Linear project ID |
|
||||
| `title` | string | Yes | Issue title |
|
||||
| `description` | string | No | Issue description |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `issue` | string |
|
||||
| `title` | string |
|
||||
| `description` | string |
|
||||
| `state` | string |
|
||||
| `teamId` | string |
|
||||
| `projectId` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `issues` | json | issues of the response |
|
||||
| ↳ `issue` | json | issue of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `linear`
|
||||
103
apps/docs/content/docs/tools/linkup.mdx
Normal file
103
apps/docs/content/docs/tools/linkup.mdx
Normal file
File diff suppressed because one or more lines are too long
138
apps/docs/content/docs/tools/mem0.mdx
Normal file
138
apps/docs/content/docs/tools/mem0.mdx
Normal file
File diff suppressed because one or more lines are too long
135
apps/docs/content/docs/tools/memory.mdx
Normal file
135
apps/docs/content/docs/tools/memory.mdx
Normal file
@@ -0,0 +1,135 @@
|
||||
---
|
||||
title: Memory
|
||||
description: Add memory store
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="memory"
|
||||
color="#F64F9E"
|
||||
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='M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z' />
|
||||
<path d='M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z' />
|
||||
<path d='M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4' />
|
||||
<path d='M17.599 6.5a3 3 0 0 0 .399-1.375' />
|
||||
<path d='M6.003 5.125A3 3 0 0 0 6.401 6.5' />
|
||||
<path d='M3.477 10.896a4 4 0 0 1 .585-.396' />
|
||||
<path d='M19.938 10.5a4 4 0 0 1 .585.396' />
|
||||
<path d='M6 18a4 4 0 0 1-1.967-.516' />
|
||||
<path d='M19.967 17.484A4 4 0 0 1 18 18' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Create persistent storage for data that needs to be accessed across multiple workflow steps. Store and retrieve information throughout your workflow execution to maintain context and state.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `memory_add`
|
||||
|
||||
Add a new memory to the database or append to existing memory with the same ID.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `id` | string | Yes | Identifier for the memory. If a memory with this ID already exists, the new data will be appended to it. |
|
||||
| `role` | string | Yes | Role for agent memory \(user, assistant, or system\) |
|
||||
| `content` | string | Yes | Content for agent memory |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `memories` | string |
|
||||
|
||||
### `memory_get`
|
||||
|
||||
Retrieve a specific memory by its ID
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `id` | string | Yes | Identifier for the memory to retrieve |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `memories` | string |
|
||||
| `message` | string |
|
||||
|
||||
### `memory_get_all`
|
||||
|
||||
Retrieve all memories from the database
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
| `memories` | string |
|
||||
|
||||
### `memory_delete`
|
||||
|
||||
Delete a specific memory by its ID
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `id` | string | Yes | Identifier for the memory to delete |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `memories` | any | memories of the response |
|
||||
| ↳ `id` | string | id of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `blocks`
|
||||
- Type: `memory`
|
||||
@@ -6,24 +6,34 @@
|
||||
"browser_use",
|
||||
"clay",
|
||||
"confluence",
|
||||
"dropdown",
|
||||
"discord",
|
||||
"elevenlabs",
|
||||
"exa",
|
||||
"file",
|
||||
"firecrawl",
|
||||
"github",
|
||||
"gmail",
|
||||
"google_calendar",
|
||||
"google_docs",
|
||||
"google_drive",
|
||||
"google_search",
|
||||
"google_sheets",
|
||||
"guesty",
|
||||
"huggingface",
|
||||
"image_generator",
|
||||
"jina",
|
||||
"jira",
|
||||
"knowledge",
|
||||
"linear",
|
||||
"linkup",
|
||||
"mem0",
|
||||
"memory",
|
||||
"microsoft_excel",
|
||||
"microsoft_teams",
|
||||
"mistral_parse",
|
||||
"notion",
|
||||
"openai",
|
||||
"outlook",
|
||||
"perplexity",
|
||||
"pinecone",
|
||||
"reddit",
|
||||
@@ -44,4 +54,4 @@
|
||||
"x",
|
||||
"youtube"
|
||||
]
|
||||
}
|
||||
}
|
||||
197
apps/docs/content/docs/tools/microsoft_excel.mdx
Normal file
197
apps/docs/content/docs/tools/microsoft_excel.mdx
Normal file
@@ -0,0 +1,197 @@
|
||||
---
|
||||
title: Microsoft Excel
|
||||
description: Read, write, and update data
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="microsoft_excel"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
version='1.1'
|
||||
id='Livello_1'
|
||||
x='0px'
|
||||
y='0px'
|
||||
viewBox='0 0 2289.75 2130'
|
||||
enableBackground='new 0 0 2289.75 2130'
|
||||
>
|
||||
<path
|
||||
fill='#185C37'
|
||||
d='M1437.75,1011.75L532.5,852v1180.393c0,53.907,43.7,97.607,97.607,97.607l0,0h1562.036 c53.907,0,97.607-43.7,97.607-97.607l0,0V1597.5L1437.75,1011.75z'
|
||||
/>
|
||||
<path
|
||||
fill='#21A366'
|
||||
d='M1437.75,0H630.107C576.2,0,532.5,43.7,532.5,97.607c0,0,0,0,0,0V532.5l905.25,532.5L1917,1224.75 L2289.75,1065V532.5L1437.75,0z'
|
||||
/>
|
||||
<path fill='#107C41' d='M532.5,532.5h905.25V1065H532.5V532.5z' />
|
||||
<path
|
||||
opacity='0.1'
|
||||
enableBackground='new'
|
||||
d='M1180.393,426H532.5v1331.25h647.893c53.834-0.175,97.432-43.773,97.607-97.607 V523.607C1277.825,469.773,1234.227,426.175,1180.393,426z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enableBackground='new'
|
||||
d='M1127.143,479.25H532.5V1810.5h594.643 c53.834-0.175,97.432-43.773,97.607-97.607V576.857C1224.575,523.023,1180.977,479.425,1127.143,479.25z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enableBackground='new'
|
||||
d='M1127.143,479.25H532.5V1704h594.643c53.834-0.175,97.432-43.773,97.607-97.607 V576.857C1224.575,523.023,1180.977,479.425,1127.143,479.25z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enableBackground='new'
|
||||
d='M1073.893,479.25H532.5V1704h541.393c53.834-0.175,97.432-43.773,97.607-97.607 V576.857C1171.325,523.023,1127.727,479.425,1073.893,479.25z'
|
||||
/>
|
||||
<linearGradient
|
||||
id='SVGID_1_'
|
||||
gradientUnits='userSpaceOnUse'
|
||||
x1='203.5132'
|
||||
y1='1729.0183'
|
||||
x2='967.9868'
|
||||
y2='404.9817'
|
||||
gradientTransform='matrix(1 0 0 -1 0 2132)'
|
||||
>
|
||||
<stop offset='0' style={{ stopColor: '#18884F' }} />
|
||||
<stop offset='0.5' style={{ stopColor: '#117E43' }} />
|
||||
<stop offset='1' style={{ stopColor: '#0B6631' }} />
|
||||
</linearGradient>
|
||||
<path
|
||||
fill='url(#SVGID_1_)'
|
||||
d='M97.607,479.25h976.285c53.907,0,97.607,43.7,97.607,97.607v976.285 c0,53.907-43.7,97.607-97.607,97.607H97.607C43.7,1650.75,0,1607.05,0,1553.143V576.857C0,522.95,43.7,479.25,97.607,479.25z'
|
||||
/>
|
||||
<path
|
||||
fill='#FFFFFF'
|
||||
d='M302.3,1382.264l205.332-318.169L319.5,747.683h151.336l102.666,202.35 c9.479,19.223,15.975,33.494,19.49,42.919h1.331c6.745-15.336,13.845-30.228,21.3-44.677L725.371,747.79h138.929l-192.925,314.548 L869.2,1382.263H721.378L602.79,1160.158c-5.586-9.45-10.326-19.376-14.164-29.66h-1.757c-3.474,10.075-8.083,19.722-13.739,28.755 l-122.102,223.011H302.3z'
|
||||
/>
|
||||
<path
|
||||
fill='#33C481'
|
||||
d='M2192.143,0H1437.75v532.5h852V97.607C2289.75,43.7,2246.05,0,2192.143,0L2192.143,0z'
|
||||
/>
|
||||
<path fill='#107C41' d='M1437.75,1065h852v532.5h-852V1065z' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Microsoft Teams](https://www.microsoft.com/en-us/microsoft-365/excel) is a powerful spreadsheet application that enables data management, analysis, and visualization. Through the Microsoft Excel integration in Sim Studio, you can programmatically read, write, and manipulate spreadsheet data to support your workflow automation needs.
|
||||
|
||||
With Microsoft Excel integration, you can:
|
||||
|
||||
- **Read Spreadsheet Data**: Access data from specific ranges, sheets, and cells
|
||||
- **Write and Update Data**: Add new data or modify existing spreadsheet content
|
||||
- **Manage Tables**: Create and manipulate tabular data structures
|
||||
- **Handle Multiple Sheets**: Work with multiple worksheets in a workbook
|
||||
- **Process Data**: Import, export, and transform spreadsheet data
|
||||
|
||||
In Sim Studio, the Microsoft Excel integration provides seamless access to spreadsheet functionality through OAuth authentication. You can read data from specific ranges, write new information, update existing cells, and handle various data formats. The integration supports both reading and writing operations with flexible input and output options. This enables you to build workflows that can effectively manage spreadsheet data, whether you're extracting information for analysis, updating records automatically, or maintaining data consistency across your applications.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Microsoft Excel functionality to manage spreadsheet data. Read data from specific ranges, write new data, update existing cells, and manipulate table data using OAuth authentication. Supports various input and output formats for flexible data handling.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `microsoft_excel_read`
|
||||
|
||||
Read data from a Microsoft Excel spreadsheet
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Excel API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to read from |
|
||||
| `range` | string | No | The range of cells to read from |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `data` | json |
|
||||
|
||||
### `microsoft_excel_write`
|
||||
|
||||
Write data to a Microsoft Excel spreadsheet
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Excel API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to write to |
|
||||
| `range` | string | No | The range of cells to write to |
|
||||
| `values` | array | Yes | The data to write to the spreadsheet |
|
||||
| `valueInputOption` | string | No | The format of the data to write |
|
||||
| `includeValuesInResponse` | boolean | No | Whether to include the written values in the response |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `updatedRange` | string |
|
||||
| `updatedRows` | string |
|
||||
| `updatedColumns` | string |
|
||||
| `updatedCells` | string |
|
||||
| `metadata` | string |
|
||||
| `spreadsheetId` | string |
|
||||
| `spreadsheetUrl` | string |
|
||||
|
||||
### `microsoft_excel_table_add`
|
||||
|
||||
Add new rows to a Microsoft Excel table
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Excel API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet containing the table |
|
||||
| `tableName` | string | Yes | The name of the table to add rows to |
|
||||
| `values` | array | Yes | The data to add to the table \(array of arrays or array of objects\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `data` | json |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `data` | json | data of the response |
|
||||
| ↳ `metadata` | json | metadata of the response |
|
||||
| ↳ `updatedRange` | string | updatedRange of the response |
|
||||
| ↳ `updatedRows` | number | updatedRows of the response |
|
||||
| ↳ `updatedColumns` | number | updatedColumns of the response |
|
||||
| ↳ `updatedCells` | number | updatedCells of the response |
|
||||
| ↳ `index` | number | index of the response |
|
||||
| ↳ `values` | json | values of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `microsoft_excel`
|
||||
217
apps/docs/content/docs/tools/microsoft_teams.mdx
Normal file
217
apps/docs/content/docs/tools/microsoft_teams.mdx
Normal file
@@ -0,0 +1,217 @@
|
||||
---
|
||||
title: Microsoft Teams
|
||||
description: Read, write, and create messages
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="microsoft_teams"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2228.833 2073.333'>
|
||||
<path
|
||||
fill='#5059C9'
|
||||
d='M1554.637,777.5h575.713c54.391,0,98.483,44.092,98.483,98.483c0,0,0,0,0,0v524.398 c0,199.901-162.051,361.952-361.952,361.952h0h-1.711c-199.901,0.028-361.975-162-362.004-361.901c0-0.017,0-0.034,0-0.052V828.971 C1503.167,800.544,1526.211,777.5,1554.637,777.5L1554.637,777.5z'
|
||||
/>
|
||||
<circle fill='#5059C9' cx='1943.75' cy='440.583' r='233.25' />
|
||||
<circle fill='#7B83EB' cx='1218.083' cy='336.917' r='336.917' />
|
||||
<path
|
||||
fill='#7B83EB'
|
||||
d='M1667.323,777.5H717.01c-53.743,1.33-96.257,45.931-95.01,99.676v598.105 c-7.505,322.519,247.657,590.16,570.167,598.053c322.51-7.893,577.671-275.534,570.167-598.053V877.176 C1763.579,823.431,1721.066,778.83,1667.323,777.5z'
|
||||
/>
|
||||
<path
|
||||
opacity='.1'
|
||||
d='M1244,777.5v838.145c-0.258,38.435-23.549,72.964-59.09,87.598 c-11.316,4.787-23.478,7.254-35.765,7.257H667.613c-6.738-17.105-12.958-34.21-18.142-51.833 c-18.144-59.477-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1244z'
|
||||
/>
|
||||
<path
|
||||
opacity='.2'
|
||||
d='M1192.167,777.5v889.978c-0.002,12.287-2.47,24.449-7.257,35.765 c-14.634,35.541-49.163,58.833-87.598,59.09H691.975c-8.812-17.105-17.105-34.21-24.362-51.833 c-7.257-17.623-12.958-34.21-18.142-51.833c-18.144-59.476-27.402-121.307-27.472-183.49V877.02 c-1.246-53.659,41.198-98.19,94.855-99.52H1192.167z'
|
||||
/>
|
||||
<path
|
||||
opacity='.2'
|
||||
d='M1192.167,777.5v786.312c-0.395,52.223-42.632,94.46-94.855,94.855h-447.84 c-18.144-59.476-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1192.167z'
|
||||
/>
|
||||
<path
|
||||
opacity='.2'
|
||||
d='M1140.333,777.5v786.312c-0.395,52.223-42.632,94.46-94.855,94.855H649.472 c-18.144-59.476-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1140.333z'
|
||||
/>
|
||||
<path
|
||||
opacity='.1'
|
||||
d='M1244,509.522v163.275c-8.812,0.518-17.105,1.037-25.917,1.037 c-8.812,0-17.105-0.518-25.917-1.037c-17.496-1.161-34.848-3.937-51.833-8.293c-104.963-24.857-191.679-98.469-233.25-198.003 c-7.153-16.715-12.706-34.071-16.587-51.833h258.648C1201.449,414.866,1243.801,457.217,1244,509.522z'
|
||||
/>
|
||||
<path
|
||||
opacity='.2'
|
||||
d='M1192.167,561.355v111.442c-17.496-1.161-34.848-3.937-51.833-8.293 c-104.963-24.857-191.679-98.469-233.25-198.003h190.228C1149.616,466.699,1191.968,509.051,1192.167,561.355z'
|
||||
/>
|
||||
<path
|
||||
opacity='.2'
|
||||
d='M1192.167,561.355v111.442c-17.496-1.161-34.848-3.937-51.833-8.293 c-104.963-24.857-191.679-98.469-233.25-198.003h190.228C1149.616,466.699,1191.968,509.051,1192.167,561.355z'
|
||||
/>
|
||||
<path
|
||||
opacity='.2'
|
||||
d='M1140.333,561.355v103.148c-104.963-24.857-191.679-98.469-233.25-198.003 h138.395C1097.783,466.699,1140.134,509.051,1140.333,561.355z'
|
||||
/>
|
||||
<linearGradient
|
||||
id='a'
|
||||
gradientUnits='userSpaceOnUse'
|
||||
x1='198.099'
|
||||
y1='1683.0726'
|
||||
x2='942.2344'
|
||||
y2='394.2607'
|
||||
gradientTransform='matrix(1 0 0 -1 0 2075.3333)'
|
||||
>
|
||||
<stop offset='0' stopColor='#5a62c3' />
|
||||
<stop offset='.5' stopColor='#4d55bd' />
|
||||
<stop offset='1' stopColor='#3940ab' />
|
||||
<stop offset='0' stopColor='#5a62c3' />
|
||||
<stop offset='.5' stopColor='#4d55bd' />
|
||||
<stop offset='1' stopColor='#3940ab' />
|
||||
</linearGradient>
|
||||
<path
|
||||
fill='url(#a)'
|
||||
d='M95.01,466.5h950.312c52.473,0,95.01,42.538,95.01,95.01v950.312c0,52.473-42.538,95.01-95.01,95.01 H95.01c-52.473,0-95.01-42.538-95.01-95.01V561.51C0,509.038,42.538,466.5,95.01,466.5z'
|
||||
/>
|
||||
<path
|
||||
fill='#FFF'
|
||||
d='M820.211,828.193H630.241v517.297H509.211V828.193H320.123V727.844h500.088V828.193z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Microsoft Teams](https://teams.microsoft.com) is a robust communication and collaboration platform that enables users to engage in real-time messaging, meetings, and content sharing within teams and organizations. As part of Microsoft's productivity ecosystem, Microsoft Teams offers seamless chat functionality integrated with Office 365, allowing users to post messages, coordinate work, and stay connected across devices and workflows.
|
||||
|
||||
With Microsoft Teams, you can:
|
||||
|
||||
- **Send and receive messages**: Communicate instantly with individuals or groups in chat threads
|
||||
- **Collaborate in real-time**: Share updates and information across teams within channels and chats
|
||||
- **Organize conversations**: Maintain context with threaded discussions and persistent chat history
|
||||
- **Share files and content**: Attach and view documents, images, and links directly in chat
|
||||
- **Integrate with Microsoft 365**: Seamlessly connect with Outlook, SharePoint, OneDrive, and more
|
||||
- **Access across devices**: Use Teams on desktop, web, and mobile with cloud-synced conversations
|
||||
- **Secure communication**: Leverage enterprise-grade security and compliance features
|
||||
|
||||
In Sim Studio, the Microsoft Teams integration enables your agents to interact directly with chat messages programmatically. This allows for powerful automation scenarios such as sending updates, posting alerts, coordinating tasks, and responding to conversations in real time. Your agents can write new messages to chats or channels, update content based on workflow data, and engage with users where collaboration happens. By integrating Sim Studio with Microsoft Teams, you bridge the gap between intelligent workflows and team communication — empowering your agents to streamline collaboration, automate communication tasks, and keep your teams aligned.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Microsoft Teams functionality to manage messages. Read content from existing messages and write to messages using OAuth authentication. Supports text content manipulation for message creation and editing.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `microsoft_teams_read_chat`
|
||||
|
||||
Read content from a Microsoft Teams chat
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `chatId` | string | Yes | The ID of the chat to read from |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
| `metadata` | string |
|
||||
| `messageCount` | string |
|
||||
| `messages` | string |
|
||||
| `totalAttachments` | string |
|
||||
| `attachmentTypes` | string |
|
||||
|
||||
### `microsoft_teams_write_chat`
|
||||
|
||||
Write or update content in a Microsoft Teams chat
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `chatId` | string | Yes | The ID of the chat to write to |
|
||||
| `content` | string | Yes | The content to write to the message |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `updatedContent` | string |
|
||||
| `metadata` | string |
|
||||
|
||||
### `microsoft_teams_read_channel`
|
||||
|
||||
Read content from a Microsoft Teams channel
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `teamId` | string | Yes | The ID of the team to read from |
|
||||
| `channelId` | string | Yes | The ID of the channel to read from |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
| `metadata` | string |
|
||||
| `channelId` | string |
|
||||
| `messageCount` | string |
|
||||
| `messages` | string |
|
||||
| `totalAttachments` | string |
|
||||
| `attachmentTypes` | string |
|
||||
|
||||
### `microsoft_teams_write_channel`
|
||||
|
||||
Write or send a message to a Microsoft Teams channel
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `teamId` | string | Yes | The ID of the team to write to |
|
||||
| `channelId` | string | Yes | The ID of the channel to write to |
|
||||
| `content` | string | Yes | The content to write to the channel |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `updatedContent` | string |
|
||||
| `metadata` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `content` | string | content of the response |
|
||||
| ↳ `metadata` | json | metadata of the response |
|
||||
| ↳ `updatedContent` | boolean | updatedContent of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `microsoft_teams`
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user