Compare commits

..

6 Commits

Author SHA1 Message Date
Waleed Latif
11d5b23d0a update docker publish yml 2025-05-08 08:08:05 -07:00
Waleed Latif
4687f5dd0f added additional error for cli script 2025-05-07 22:58:33 -07:00
Waleed Latif
7f948a3a48 updated README.md 2025-05-07 22:40:09 -07:00
Waleed Latif
b538e5d884 updated README.md 2025-05-07 18:24:55 -07:00
Waleed Latif
1606f19d12 updated dockerfile for devcontainer 2025-05-07 17:10:03 -07:00
Waleed Latif
a9c755c5d4 feat(docker): added docker image & npm pkg to install that image 2025-05-07 17:03:02 -07:00
2631 changed files with 177188 additions and 490526 deletions

View File

@@ -1,4 +1,4 @@
# Sim Development Environment Bashrc
# Sim Studio Development Environment Bashrc
# This gets sourced by post-create.sh
# Enhanced prompt with git branch info
@@ -17,27 +17,15 @@ alias ...="cd ../.."
alias pgc="PGPASSWORD=postgres psql -h db -U postgres -d simstudio"
alias check-db="PGPASSWORD=postgres psql -h db -U postgres -c '\l'"
# Sim specific aliases
alias logs="cd /workspace/apps/sim && tail -f logs/*.log 2>/dev/null || echo 'No log files found'"
alias sim-start="cd /workspace && bun run dev"
alias sim-migrate="cd /workspace/apps/sim && bunx drizzle-kit push"
alias sim-generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias sim-rebuild="cd /workspace && bun run build && bun run start"
alias docs-dev="cd /workspace/apps/docs && bun run dev"
# 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"
# 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
# Default to sim directory
cd /workspace/sim 2>/dev/null || true
# Welcome message - only show once per session
if [ -z "$SIM_WELCOME_SHOWN" ]; then
@@ -45,25 +33,13 @@ if [ -z "$SIM_WELCOME_SHOWN" ]; then
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Welcome to Sim development environment!"
echo "🚀 Welcome to Sim Studio development environment!"
echo ""
echo "Available commands:"
echo " sim-start - Start all apps in development mode"
echo " sim-migrate - Push schema changes to the database for sim app"
echo " sim-generate - Generate new migrations for sim app"
echo " sim-rebuild - Build and start all apps"
echo " docs-dev - Start only the docs app in development mode"
echo ""
echo "Turbo commands:"
echo " turbo-build - Build all apps using Turborepo"
echo " turbo-dev - Start development mode for all apps"
echo " turbo-test - Run tests for all packages"
echo ""
echo "Bun commands:"
echo " bun-update - Update dependencies"
echo " bun-add - Add a new dependency"
echo " bun-pm - Manage dependencies"
echo " bun-canary - Upgrade to the latest canary version of Bun"
echo " 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 "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
fi

View File

@@ -1,19 +1,20 @@
# Use the latest Bun canary image for development
FROM oven/bun:canary
FROM node:20-bullseye
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Set Node.js memory limit
ENV NODE_OPTIONS="--max-old-space-size=4096"
# Install necessary packages for development
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
git curl wget jq sudo postgresql-client vim nano \
bash-completion ca-certificates lsb-release gnupg \
git curl wget jq sudo postgresql-client \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user
ARG USERNAME=bun
ARG USERNAME=node
ARG USER_UID=1000
ARG USER_GID=$USER_UID
@@ -21,15 +22,11 @@ ARG USER_GID=$USER_UID
RUN echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
# Install global packages for development
RUN bun install -g turbo drizzle-kit typescript @types/node
# Make sure we have the latest npm
RUN npm install -g npm@latest
# 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
# Install global packages
RUN npm install -g drizzle-kit
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
@@ -37,6 +34,4 @@ ENV DEBIAN_FRONTEND=dialog
WORKDIR /workspace
# Expose the ports we're interested in
EXPOSE 3000
EXPOSE 3001
EXPOSE 3002
EXPOSE 3000

View File

@@ -1,4 +1,4 @@
# Sim Development Container
# Sim Studio Development Container
This directory contains configuration files for Visual Studio Code Dev Containers / GitHub Codespaces. Dev containers provide a consistent, isolated development environment for this project.
@@ -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 `bun run dev`)
5. Start the application with `sim-start` (alias for `npm run dev`)
### Development Commands

View File

@@ -1,5 +1,5 @@
{
"name": "Sim Dev Environment",
"name": "Sim Studio Dev Environment",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
@@ -10,8 +10,14 @@
"settings": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
@@ -23,15 +29,16 @@
"terminal.integrated.shellIntegration.enabled": true
},
"extensions": [
"biomejs.biome",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"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",
"oven.bun-vscode"
"steoates.autoimport"
]
}
},
@@ -42,11 +49,12 @@
"postStartCommand": "bash -c 'if [ ! -f ~/.bashrc ] || ! grep -q \"sim-start\" ~/.bashrc; then cp .devcontainer/.bashrc ~/.bashrc; fi'",
"remoteUser": "bun",
"remoteUser": "node",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/prulloac/devcontainer-features/bun:1": {
"ghcr.io/devcontainers-contrib/features/npm-package:1": {
"package": "typescript",
"version": "latest"
}
}

View File

@@ -1,3 +1,5 @@
version: '3.8'
services:
app:
build:
@@ -5,7 +7,6 @@ services:
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
- bun-cache:/home/bun/.bun/cache:delegated
command: sleep infinity
environment:
- NODE_ENV=development
@@ -13,62 +14,15 @@ 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:
- "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'
working_dir: /workspace/sim
db:
image: pgvector/pgvector:pg17
image: postgres:16
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
@@ -85,5 +39,4 @@ services:
retries: 5
volumes:
postgres-data:
bun-cache:
postgres-data:

View File

@@ -3,10 +3,10 @@
# Exit on error, but with some error handling
set -e
echo "🔧 Setting up Sim development environment..."
echo "🔧 Setting up Sim Studio development environment..."
# Change to the workspace root directory
cd /workspace
# Change to the sim directory
cd /workspace/sim
# Setup .bashrc
echo "📄 Setting up .bashrc with aliases..."
@@ -15,50 +15,27 @@ 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 dependencies..."
echo "📦 Cleaning and reinstalling npm 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
echo "Installing dependencies with Bun..."
bun install || {
echo "⚠️ bun install had issues but continuing setup..."
npm install || {
echo "⚠️ npm install had issues but continuing setup..."
}
# 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
# Set up environment variables if .env doesn't exist
if [ ! -f ".env" ]; then
echo "📄 Creating .env file from template..."
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
cp .env.example .env 2>/dev/null || echo "DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio" > .env
fi
# Generate schema and run database migrations
echo "🗃️ Running database schema generation and migrations..."
echo "Generating schema..."
cd apps/sim
bunx drizzle-kit generate
cd ../..
npx drizzle-kit generate
echo "Waiting for database to be ready..."
# Try to connect to the database, but don't fail the script if it doesn't work
@@ -67,9 +44,7 @@ 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!"
cd apps/sim
DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio bunx drizzle-kit push
cd ../..
DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio npx drizzle-kit push
break
fi
echo "Database is unavailable - sleeping (${timeout}s remaining)"
@@ -85,15 +60,14 @@ echo "Waiting for database to be ready..."
# Add additional helpful aliases to .bashrc
cat << EOF >> ~/.bashrc
# Additional Sim Development Aliases
alias migrate="cd /workspace/apps/sim && DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio bunx drizzle-kit push"
alias generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias dev="cd /workspace && bun run dev"
alias build="cd /workspace && bun run build"
alias start="cd /workspace && bun run dev"
alias lint="cd /workspace/apps/sim && bun run lint"
alias test="cd /workspace && bun run test"
alias bun-update="cd /workspace && bun update"
# 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"
EOF
# Source the .bashrc to make aliases available immediately
@@ -104,7 +78,7 @@ unset SIM_WELCOME_SHOWN
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "✅ Sim development environment setup complete!"
echo "✅ Sim Studio development environment setup complete!"
echo ""
echo "Your environment is now ready. A new terminal session will show"
echo "available commands. You can start the development server with:"

View File

@@ -1,11 +1,12 @@
LICENSE
NOTICE
.prettierrc
.prettierignore
README.md
.gitignore
.husky
# Exclude files from Docker build
.git
.github
.devcontainer
.env.example
node_modules
node_modules
.next
.vercel
.husky
.env
.env.*
npm-debug.log
README.md
.devcontainer

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG]'
title: "[BUG]"
labels: bug
assignees: ''
---
@@ -11,7 +11,6 @@ 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 '....'
@@ -24,4 +23,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.

View File

@@ -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.

View File

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

8
.github/SECURITY.md vendored
View File

@@ -6,16 +6,16 @@
| ------- | ------------------ |
| 0.1.x | :white_check_mark: |
## Reporting a Vulnerability
We take the security of Sim seriously. If you believe you've found a security vulnerability, please follow these steps:
We take the security of Sim Studio seriously. If you believe you've found a security vulnerability, please follow these steps:
1. **Do not disclose the vulnerability publicly** or to any third parties.
2. **Email us directly** at security@sim.ai with details of the vulnerability.
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 seriously. If you believe you've found a security vu
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 Normal file
View File

@@ -0,0 +1,98 @@
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:
- "*"

View File

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

View File

@@ -2,76 +2,82 @@ name: CI
on:
push:
branches: [main, staging]
branches: [main]
pull_request:
branches: [main, staging]
branches: [main]
jobs:
test:
name: Test and Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup Node
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
node-version: '20'
cache: 'npm'
cache-dependency-path: './sim/package-lock.json'
- name: Install dependencies
run: bun install
working-directory: ./sim
run: npm ci
- name: Fix Rollup module issue
working-directory: ./sim
run: |
rm -rf node_modules package-lock.json
npm install
- name: Run tests with coverage
working-directory: ./sim
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run test
NODE_OPTIONS: "--no-warnings"
run: npm run test:coverage
- name: Build application
working-directory: ./sim
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.sim.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
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
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v3
with:
directory: ./apps/sim/coverage
directory: ./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' || github.ref == 'refs/heads/staging')
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
bun-version: latest
node-version: '20'
cache: 'npm'
cache-dependency-path: './sim/package-lock.json'
- name: Install dependencies
run: bun install
working-directory: ./sim
run: npm ci
- name: Apply migrations
working-directory: ./apps/sim
working-directory: ./sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
run: bunx drizzle-kit migrate
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: npx drizzle-kit push

58
.github/workflows/docker-publish.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: Docker Build and Publish
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: simstudioai/sim
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,format=short
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
buildkitd-flags: --debug
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -1,38 +0,0 @@
name: Process Docs Embeddings
on:
push:
branches: [main, staging]
paths:
- 'apps/docs/**'
workflow_dispatch: # Allow manual triggering
jobs:
process-docs-embeddings:
name: Process Documentation Embeddings
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: bun install
- name: Process docs embeddings
working-directory: ./apps/sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: bun run scripts/process-docs-embeddings.ts --clear

View File

@@ -1,58 +1,93 @@
name: Publish CLI Package
name: Publish Sim Studio CLI
on:
push:
branches: [main]
branches:
- main
paths:
- 'packages/cli/**'
- 'packages/simstudio/**'
- '.github/workflows/publish-cli.yml'
jobs:
publish-npm:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
fetch-depth: 0
- name: Setup Node.js for npm publishing
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache-dependency-path: 'packages/simstudio/package-lock.json'
- name: Install dependencies
working-directory: packages/cli
run: bun install
working-directory: packages/simstudio
run: npm ci
- name: Build package
working-directory: packages/cli
run: bun run build
working-directory: packages/simstudio
run: npm run build
- name: Get package version
id: package_version
working-directory: packages/cli
- name: Get version
working-directory: packages/simstudio
id: get_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Check if version already exists
id: version_check
- name: Check version update
working-directory: packages/simstudio
run: |
if npm view simstudio@${{ steps.package_version.outputs.version }} version &> /dev/null; then
echo "exists=true" >> $GITHUB_OUTPUT
if ! git diff ${{ github.event.before }} ${{ github.sha }} packages/simstudio/package.json | grep -q '"version":'; then
echo "::error::Version not updated in package.json"
exit 1
fi
- name: Run tests
working-directory: packages/simstudio
run: npm test
- name: Check for changes
working-directory: packages/simstudio
id: check_changes
run: |
if git diff --quiet ${{ github.event.before }} ${{ github.sha }} packages/simstudio/; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Publish to npm
if: steps.version_check.outputs.exists == 'false'
working-directory: packages/cli
run: npm publish --access=public
if: steps.check_changes.outputs.changes == 'true'
working-directory: packages/simstudio
run: |
if ! npm publish; then
echo "::error::Failed to publish package"
exit 1
fi
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 Git tag
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git tag -a "v${{ steps.get_version.outputs.version }}" -m "Release v${{ steps.get_version.outputs.version }}"
git push origin "v${{ steps.get_version.outputs.version }}"
- name: Create GitHub Release
if: steps.check_changes.outputs.changes == 'true'
uses: softprops/action-gh-release@v1
with:
name: "v${{ steps.get_version.outputs.version }}"
tag_name: "v${{ steps.get_version.outputs.version }}"
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,89 +0,0 @@
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

View File

@@ -1,85 +0,0 @@
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

49
.gitignore vendored
View File

@@ -1,23 +1,28 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/apps/**/node_modules
*/node_modules
docs/node_modules
/packages/**/node_modules
/scripts/node_modules
# bun specific
bun-debug.log*
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# testing
/coverage
/apps/**/coverage
# next.js
/.next/
/apps/**/out/
/apps/**/.next/
/apps/**/build
sim/.next/
sim/out/
sim/build
docs/.next/
docs/out/
docs/build
# production
/build
@@ -30,6 +35,12 @@ sim-standalone.tar.gz
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# env files
.env
*.env
@@ -49,23 +60,17 @@ next-env.d.ts
.cursorrules
# docs
/apps/docs/.source
/apps/docs/.contentlayer
/apps/docs/.content-collections
docs/.source
docs/.contentlayer
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
## Helm Chart Tests
helm/sim/test

View File

@@ -1 +1 @@
bunx lint-staged
cd sim && npx lint-staged

1
.npmrc
View File

@@ -1 +0,0 @@
ignore-scripts=true

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Set Node.js memory limit
ENV NODE_OPTIONS="--max-old-space-size=4096"
# Copy package files
COPY sim/package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application
COPY sim/ ./
# Generate database schema
RUN npx drizzle-kit generate
# Build the application
RUN npm run build
EXPOSE 3000
# Run migrations and start the app
CMD npx drizzle-kit push && npm run start

2
NOTICE
View File

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

197
README.md
View File

@@ -1,176 +1,143 @@
<p align="center">
<img src="apps/sim/public/static/sim.png" alt="Sim Logo" width="500"/>
<img src="sim/public/static/sim.png" alt="Sim Studio Logo" width="500"/>
</p>
<p align="center">
<a href="https://www.apache.org/licenses/LICENSE-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache-2.0"></a>
<a href="https://discord.gg/Hr4UWYEcTT"><img src="https://img.shields.io/badge/Discord-Join%20Server-7289DA?logo=discord&logoColor=white" alt="Discord"></a>
<a href="https://x.com/simdotai"><img src="https://img.shields.io/twitter/follow/simstudioai?style=social" alt="Twitter"></a>
<a href="https://x.com/simstudioai"><img src="https://img.shields.io/twitter/follow/simstudioai?style=social" alt="Twitter"></a>
<a href="https://github.com/simstudioai/sim/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome"></a>
<a href="https://docs.sim.ai"><img src="https://img.shields.io/badge/Docs-visit%20documentation-blue.svg" alt="Documentation"></a>
<a href="https://docs.simstudio.ai"><img src="https://img.shields.io/badge/Docs-visit%20documentation-blue.svg" alt="Documentation"></a>
</p>
<p align="center">
<strong>Sim</strong> is a lightweight, user-friendly platform for building AI agent workflows.
</p>
<p align="center">
<img src="apps/sim/public/static/demo.gif" alt="Sim Demo" width="800"/>
<strong>Sim Studio</strong> is a lightweight, user-friendly platform for building AI agent workflows.
</p>
## Getting Started
1. Use our [cloud-hosted version](https://sim.ai)
2. Self-host using one of the methods below
### Run on [Sim Studio Cloud](https://simstudio.ai)
## Self-Hosting Options
The fastest way to get started is to use our [cloud-hosted version](https://simstudio.ai) - no setup required!
### Option 1: NPM Package (Simplest)
### Self-host Sim Studio
The easiest way to run Sim locally is using our [NPM package](https://www.npmjs.com/package/simstudio?activeTab=readme):
If you prefer to self-host, there are several options available:
### Option 1: Using CLI (Recommended)
The easiest way to self-host:
```bash
npx simstudio
# This will set up and run Sim Studio locally with minimal configuration
```
After running these commands, open [http://localhost:3000/](http://localhost:3000/) in your browser.
#### Options
- `-p, --port <port>`: Specify the port to run Sim on (default: 3000)
- `--no-pull`: Skip pulling the latest Docker images
#### Requirements
- Docker must be installed and running on your machine
### Option 2: Docker Compose
### Option 2: Using Docker Compose
```bash
# Clone the repository
git clone https://github.com/simstudioai/sim.git
# Navigate to the project directory
cd sim
# Start Sim
docker compose -f docker-compose.prod.yml up -d
# Create environment file (update BETTER_AUTH_SECRET and ENCRYPTION_KEY with secure random values)
cp sim/.env.example sim/.env
# Start with Docker Compose
docker compose up -d --build
```
Access the application at [http://localhost:3000/](http://localhost:3000/)
Once running, access the application at [http://localhost:3000/w/](http://localhost:3000/w/)
#### Using Local Models with Ollama
## Working with Local Models
Run Sim with local AI models using [Ollama](https://ollama.ai) - no external APIs required:
Sim Studio supports integration with local LLM models:
```bash
# Start with GPU support (automatically downloads gemma3:4b model)
docker compose -f docker-compose.ollama.yml --profile setup up -d
# Pull local models
./sim/scripts/ollama_docker.sh pull <model_name>
# For CPU-only systems:
docker compose -f docker-compose.ollama.yml --profile cpu --profile setup up -d
# Start with local model support
./start_simstudio_docker.sh --local
# For systems with NVIDIA GPU
docker compose up --profile local-gpu -d --build
# For CPU-only systems
docker compose up --profile local-cpu -d --build
```
Wait for the model to download, then visit [http://localhost:3000](http://localhost:3000). Add more models with:
```bash
docker compose -f docker-compose.ollama.yml exec ollama ollama pull llama3.1:8b
```
### Connecting to Existing Ollama Instance
### 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
- This starts both the main application and the realtime socket server
### Option 4: Manual Setup
**Requirements:**
- [Bun](https://bun.sh/) runtime
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
**Note:** Sim uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
1. Clone and install dependencies:
If you already have Ollama running locally:
```bash
git clone https://github.com/simstudioai/sim.git
cd sim
bun install
# Using host networking (simplest)
docker compose up --profile local-cpu -d --build --network=host
```
2. Set up PostgreSQL with pgvector:
Or add this to your docker-compose.yml:
You need PostgreSQL with the `vector` extension for embedding support. Choose one option:
```yaml
services:
simstudio:
# ... existing configuration ...
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- OLLAMA_HOST=http://host.docker.internal:11434
```
**Option A: Using Docker (Recommended)**
## Development Setup
### Prerequisites
- Node.js 20+
- Docker (recommended)
- PostgreSQL (if not using Docker)
### Required Environment Variables
For local development, create a `.env` file with these minimum variables:
```env
DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
BETTER_AUTH_SECRET=<generate_a_secure_random_value>
ENCRYPTION_KEY=<generate_a_secure_random_value>
```
⚠️ **Note:** Without `RESEND_API_KEY`, verification codes will be logged to the console for local testing.
### Dev Container Option
1. Open in VS Code with the Remote-Containers extension
2. Click "Reopen in Container" when prompted
3. Run `npm run dev` or use the `sim-start` alias
### Manual Setup
```bash
# Start PostgreSQL with pgvector extension
docker run --name simstudio-db \
-e POSTGRES_PASSWORD=your_password \
-e POSTGRES_DB=simstudio \
-p 5432:5432 -d \
pgvector/pgvector:pg17
cd sim/sim
npm install
cp .env.example .env
npx drizzle-kit push
npm run dev
```
**Option B: Manual Installation**
- Install PostgreSQL 12+ and the pgvector extension
- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation)
## Troubleshooting
3. Set up environment:
Common issues and solutions:
```bash
cd apps/sim
cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
```
Update your `.env` file with the database URL:
```bash
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
```
4. Set up the database:
```bash
bunx drizzle-kit migrate
```
5. Start the development servers:
**Recommended approach - run both servers together (from project root):**
```bash
bun run dev:full
```
This starts both the main Next.js application and the realtime socket server required for full functionality.
**Alternative - run servers separately:**
Next.js app (from project root):
```bash
bun run dev
```
Realtime socket server (from `apps/sim` directory in a separate terminal):
```bash
cd apps/sim
bun run dev:sockets
```
- **Authentication problems**: Check console logs for verification codes if `RESEND_API_KEY` is not set
- **Database connection errors**: Verify PostgreSQL is running and credentials are correct
- **Port conflicts**: Check if port 3000 is already in use by another application
## 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/)
- **Background Jobs**: [Trigger.dev](https://trigger.dev/)
## Contributing
@@ -180,4 +147,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 Team</p>
<p align="center">Made with ❤️ by the Sim Studio Team</p>

39
apps/docs/.gitignore vendored
View File

@@ -1,39 +0,0 @@
# 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/

View File

@@ -1,23 +0,0 @@
# docs
This is a Next.js application generated with
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
Run development server:
```bash
bun run dev
```
Open http://localhost:3000 with your browser to see the result.
## Learn More
To learn more about Next.js and Fumadocs, take a look at the following
resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
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

View File

@@ -1,5 +0,0 @@
import type { ReactNode } from 'react'
export default function SlugLayout({ children }: { children: ReactNode }) {
return children
}

View File

@@ -1,58 +0,0 @@
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
import { notFound } from 'next/navigation'
import mdxComponents from '@/components/mdx-components'
import { source } from '@/lib/source'
export const dynamic = 'force-dynamic'
export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = source.getPage(params.slug)
if (!page) notFound()
const MDX = page.data.body
return (
<DocsPage
toc={page.data.toc}
full={page.data.full}
tableOfContent={{
style: 'clerk',
enabled: true,
header: <div className='mb-2 font-medium text-sm'>On this page</div>,
single: false,
}}
article={{
className: 'scroll-smooth max-sm:pb-16',
}}
tableOfContentPopover={{
style: 'clerk',
enabled: true,
}}
footer={{
enabled: false,
}}
>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
<MDX components={mdxComponents} />
</DocsBody>
</DocsPage>
)
}
export async function generateStaticParams() {
return source.generateParams()
}
export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = source.getPage(params.slug)
if (!page) notFound()
return {
title: page.data.title,
description: page.data.description,
}
}

View File

@@ -1,46 +0,0 @@
import type { ReactNode } from 'react'
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
import { ExternalLink, GithubIcon } from 'lucide-react'
import Link from 'next/link'
import { source } from '@/lib/source'
const GitHubLink = () => (
<div className='fixed right-4 bottom-4 z-50'>
<Link
href='https://github.com/simstudioai/sim'
target='_blank'
rel='noopener noreferrer'
className='flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background transition-colors hover:bg-muted'
>
<GithubIcon className='h-4 w-4' />
</Link>
</div>
)
export default function Layout({ children }: { children: ReactNode }) {
return (
<>
<DocsLayout
tree={source.pageTree}
nav={{
title: <div className='flex items-center font-medium'>Sim</div>,
}}
links={[
{
text: 'Visit Sim',
url: 'https://sim.ai',
icon: <ExternalLink className='h-4 w-4' />,
},
]}
sidebar={{
defaultOpenLevel: 1,
collapsible: true,
footer: null,
}}
>
{children}
</DocsLayout>
<GitHubLink />
</>
)
}

View File

@@ -1,24 +0,0 @@
@import "tailwindcss";
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
@theme {
--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);
}
/* Tailwind v4 content sources */
@source '../app/**/*.{js,ts,jsx,tsx,mdx}';
@source '../components/**/*.{js,ts,jsx,tsx,mdx}';
@source '../content/**/*.{js,ts,jsx,tsx,mdx}';
@source '../mdx-components.tsx';
@source '../node_modules/fumadocs-ui/dist/**/*.js';

View File

@@ -1,21 +0,0 @@
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'
/**
* Shared layout configurations
*
* you can customise layouts individually from:
* Home Layout: app/(home)/layout.tsx
* Docs Layout: app/docs/layout.tsx
*/
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>
My App
</>
),
},
}

View File

@@ -1,42 +0,0 @@
import type { ReactNode } from 'react'
import { RootProvider } from 'fumadocs-ui/provider'
import { Inter } from 'next/font/google'
import './global.css'
import { Analytics } from '@vercel/analytics/next'
const inter = Inter({
subsets: ['latin'],
})
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang='en' className={inter.className} suppressHydrationWarning>
<body className='flex min-h-screen flex-col'>
<RootProvider>
{children}
<Analytics />
</RootProvider>
</body>
</html>
)
}
export const metadata = {
title: 'Sim',
description:
'Build agents in seconds with a drag and drop workflow builder. Access comprehensive documentation to help you create efficient workflows and maximize your automation capabilities.',
manifest: '/favicon/site.webmanifest',
icons: {
icon: [
{ url: '/favicon/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
{ url: '/favicon/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
],
apple: '/favicon/apple-touch-icon.png',
shortcut: '/favicon/favicon.ico',
},
appleWebApp: {
capable: true,
statusBarStyle: 'default',
title: 'Sim Docs',
},
}

View File

@@ -1,18 +0,0 @@
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()
}

View File

@@ -1,12 +0,0 @@
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

View File

@@ -1,44 +0,0 @@
'use client'
import type * as React from 'react'
interface BlockInfoCardProps {
type: string
color: string
icon?: boolean
iconSvg?: string
}
export function BlockInfoCard({
type,
color,
icon = false,
iconSvg,
}: BlockInfoCardProps): React.ReactNode {
return (
<div className='mb-6 overflow-hidden rounded-lg border border-border'>
<div className='flex items-center justify-center p-6'>
<div
className='flex h-20 w-20 items-center justify-center rounded-lg'
style={{ backgroundColor: color }}
>
{iconSvg ? (
<div className='h-10 w-10 text-white' dangerouslySetInnerHTML={{ __html: iconSvg }} />
) : (
<div className='font-mono text-xl opacity-70'>{type.substring(0, 2)}</div>
)}
</div>
</div>
{icon && (
<style jsx global>{`
.block-icon {
width: 80px;
height: 80px;
margin: 1rem auto;
display: block;
}
`}</style>
)}
</div>
)
}

View File

@@ -1,163 +0,0 @@
import {
AgentIcon,
ApiIcon,
ChartBarIcon,
CodeIcon,
ConditionalIcon,
ConnectIcon,
ResponseIcon,
} from '@/components/icons'
import { cn } from '@/lib/utils'
// Custom Feature component specifically for BlockTypes to handle the 6-item layout
const BlockFeature = ({
title,
description,
icon,
href,
index,
totalItems,
itemsPerRow,
}: {
title: string
description: string
icon: React.ReactNode
href?: string
index: number
totalItems: number
itemsPerRow: number
}) => {
const blockColor = {
'--block-color':
title === 'Agent'
? '#8b5cf6'
: title === 'API'
? '#3b82f6'
: title === 'Condition'
? '#f59e0b'
: title === 'Function'
? '#10b981'
: title === 'Router'
? '#6366f1'
: title === 'Evaluator'
? '#ef4444'
: '#8b5cf6',
} as React.CSSProperties
const content = (
<>
{index < itemsPerRow && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
{index >= itemsPerRow && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
<div
className='relative z-10 mb-4 px-10 text-neutral-500 transition-colors duration-200 group-hover/feature:text-[color:var(--block-color,#8b5cf6)] dark:text-neutral-400 dark:group-hover/feature:text-[color:var(--block-color,#a78bfa)]'
style={blockColor}
>
{icon}
</div>
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
<div
className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-[color:var(--block-color,#8b5cf6)] dark:bg-neutral-700'
style={blockColor}
/>
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
{title}
</span>
</div>
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
{description}
</p>
</>
)
const containerClasses = cn(
'flex flex-col lg:border-r py-5 relative group/feature dark:border-neutral-800',
(index === 0 || index === itemsPerRow) && 'lg:border-l dark:border-neutral-800',
index < itemsPerRow && 'lg:border-b dark:border-neutral-800',
href && 'cursor-pointer hover:bg-neutral-50 dark:hover:bg-neutral-900/50 transition-colors'
)
if (href) {
return (
<a href={href} className={containerClasses} style={{ textDecoration: 'none' }}>
{content}
</a>
)
}
return <div className={containerClasses}>{content}</div>
}
export function BlockTypes() {
const features = [
{
title: 'Agent',
description:
'Create powerful AI agents using any LLM provider with customizable system prompts and tool integrations.',
icon: <AgentIcon className='h-6 w-6' />,
href: '/blocks/agent',
},
{
title: 'API',
description:
'Connect to any external API with support for all standard HTTP methods and customizable request parameters.',
icon: <ApiIcon className='h-6 w-6' />,
href: '/blocks/api',
},
{
title: 'Condition',
description:
'Add a condition to the workflow to branch the execution path based on a boolean expression.',
icon: <ConditionalIcon className='h-6 w-6' />,
href: '/blocks/condition',
},
{
title: 'Function',
description:
'Execute custom JavaScript or TypeScript code within your workflow to transform data or implement complex logic.',
icon: <CodeIcon className='h-6 w-6' />,
href: '/blocks/function',
},
{
title: 'Router',
description:
'Intelligently direct workflow execution to different paths based on input analysis.',
icon: <ConnectIcon className='h-6 w-6' />,
href: '/blocks/router',
},
{
title: 'Evaluator',
description:
'Assess content using customizable evaluation metrics and scoring criteria across multiple dimensions.',
icon: <ChartBarIcon className='h-6 w-6' />,
href: '/blocks/evaluator',
},
{
title: 'Response',
description:
'Send a response back to the caller with customizable data, status, and headers.',
icon: <ResponseIcon className='h-6 w-6' />,
href: '/blocks/response',
},
]
const totalItems = features.length
const itemsPerRow = 3 // For large screens
return (
<div className='relative z-10 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-3'>
{features.map((feature, index) => (
<BlockFeature
key={feature.title}
{...feature}
index={index}
totalItems={totalItems}
itemsPerRow={itemsPerRow}
/>
))}
</div>
)
}

View File

@@ -1,102 +0,0 @@
import {
IconAdjustmentsBolt,
IconCloud,
IconEaseInOut,
IconHeart,
IconHelp,
IconHistory,
IconRouteAltLeft,
IconTerminal2,
} from '@tabler/icons-react'
import { cn } from '@/lib/utils'
export function Features() {
const features = [
{
title: 'Multi-LLM Support',
description: 'Connect to any LLM provider including OpenAI, Anthropic, and more',
icon: <IconCloud />,
},
{
title: 'API Deployment',
description: 'Deploy your workflows as secure, scalable APIs',
icon: <IconTerminal2 />,
},
{
title: 'Webhook Integration',
description: 'Trigger workflows via webhooks from external services',
icon: <IconRouteAltLeft />,
},
{
title: 'Scheduled Execution',
description: 'Schedule workflows to run at specific times or intervals',
icon: <IconEaseInOut />,
},
{
title: '40+ Integrations',
description: 'Connect to hundreds of external services and data sources',
icon: <IconAdjustmentsBolt />,
},
{
title: 'Visual Debugging',
description: 'Debug workflows visually with detailed execution logs',
icon: <IconHelp />,
},
{
title: 'Version Control',
description: 'Track changes and roll back to previous versions',
icon: <IconHistory />,
},
{
title: 'Team Collaboration',
description: 'Collaborate with team members on workflow development',
icon: <IconHeart />,
},
]
return (
<div className='relative z-20 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-4'>
{features.map((feature, index) => (
<Feature key={feature.title} {...feature} index={index} />
))}
</div>
)
}
export const Feature = ({
title,
description,
icon,
index,
}: {
title: string
description: string
icon: React.ReactNode
index: number
}) => {
return (
<div
className={cn(
'group/feature relative flex flex-col py-5 lg:border-r dark:border-neutral-800',
(index === 0 || index === 4) && 'lg:border-l dark:border-neutral-800',
index < 4 && 'lg:border-b dark:border-neutral-800'
)}
>
{index < 4 && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
{index >= 4 && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
<div className='relative z-10 mb-4 px-10 text-neutral-600 dark:text-neutral-400'>{icon}</div>
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
<div className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-purple-500 dark:bg-neutral-700' />
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
{title}
</span>
</div>
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
{description}
</p>
</div>
)
}

View File

@@ -1,48 +0,0 @@
'use client'
import { useEffect, useState } from 'react'
import Image from 'next/image'
import { useTheme } from 'next-themes'
interface ThemeImageProps {
lightSrc: string
darkSrc: string
alt: string
width?: number
height?: number
className?: string
}
export function ThemeImage({
lightSrc,
darkSrc,
alt,
width = 600,
height = 400,
className = 'rounded-lg border border-border my-6',
}: ThemeImageProps) {
const { resolvedTheme } = useTheme()
const [imageSrc, setImageSrc] = useState(lightSrc)
const [mounted, setMounted] = useState(false)
// Wait until component is mounted to avoid hydration mismatch
useEffect(() => {
setMounted(true)
}, [])
useEffect(() => {
if (mounted) {
setImageSrc(resolvedTheme === 'dark' ? darkSrc : lightSrc)
}
}, [resolvedTheme, lightSrc, darkSrc, mounted])
if (!mounted) {
return null
}
return (
<div className='flex justify-center'>
<Image src={imageSrc} alt={alt} width={width} height={height} className={className} />
</div>
)
}

View File

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

View File

@@ -1,303 +0,0 @@
---
title: Agent
description: Create powerful AI agents using any LLM provider
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Agent block serves as the interface between your workflow and Large Language Models (LLMs). It executes inference requests against various AI providers, processes natural language inputs according to defined instructions, and generates structured or unstructured outputs for downstream consumption.
<ThemeImage
lightSrc="/static/light/agent-light.png"
darkSrc="/static/dark/agent-dark.png"
alt="Agent Block Configuration"
width={350}
height={175}
/>
## Overview
The Agent block enables you to:
<Steps>
<Step>
<strong>Process natural language</strong>: Analyze user input and generate contextual responses
</Step>
<Step>
<strong>Execute AI-powered tasks</strong>: Perform content analysis, generation, and decision-making
</Step>
<Step>
<strong>Call external tools</strong>: Access APIs, databases, and services during processing
</Step>
<Step>
<strong>Generate structured output</strong>: Return JSON data that matches your schema requirements
</Step>
</Steps>
## Configuration Options
### System Prompt
The system prompt establishes the agent's operational parameters and behavioral constraints. This configuration defines the agent's role, response methodology, and processing boundaries for all incoming requests.
```markdown
You are a helpful assistant that specializes in financial analysis.
Always provide clear explanations and cite sources when possible.
When responding to questions about investments, include risk disclaimers.
```
### User Prompt
The user prompt represents the primary input data for inference processing. This parameter accepts natural language text or structured data that the agent will analyze and respond to. Input sources include:
- **Static Configuration**: Direct text input specified in the block configuration
- **Dynamic Input**: Data passed from upstream blocks through connection interfaces
- **Runtime Generation**: Programmatically generated content during workflow execution
### Model Selection
The Agent block supports multiple LLM providers through a unified inference interface. Available models include:
**OpenAI Models**: GPT-5, GPT-4o, o1, o3, o4-mini, gpt-4.1 (API-based inference)
**Anthropic Models**: Claude 3.7 Sonnet (API-based inference)
**Google Models**: Gemini 2.5 Pro, Gemini 2.0 Flash (API-based inference)
**Alternative Providers**: Groq, Cerebras, xAI, DeepSeek (API-based inference)
**Local Deployment**: Ollama-compatible models (self-hosted inference)
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/models.mp4"></video>
</div>
### Temperature
Control the creativity and randomness of responses:
<Tabs items={['Low (0-0.3)', 'Medium (0.3-0.7)', 'High (0.7-2.0)']}>
<Tab>
More deterministic, focused responses. Best for factual tasks, customer support, and
situations where accuracy is critical.
</Tab>
<Tab>
Balanced creativity and focus. Suitable for general purpose applications that require both
accuracy and some creativity.
</Tab>
<Tab>
More creative, varied responses. Ideal for creative writing, brainstorming, and generating
diverse ideas.
</Tab>
</Tabs>
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">
The temperature range (0-1 or 0-2) varies depending on the selected model.
</p>
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
### Tools
Tools extend the agent's capabilities through external API integrations and service connections. The tool system enables function calling, allowing the agent to execute operations beyond text generation.
**Tool Integration Process**:
1. Access the Tools configuration section within the Agent block
2. Select from 60+ pre-built integrations or define custom functions
3. Configure authentication parameters and operational constraints
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/tools.mp4"></video>
</div>
**Available Tool Categories**:
- **Communication**: Gmail, Slack, Telegram, WhatsApp, Microsoft Teams
- **Data Sources**: Notion, Google Sheets, Airtable, Supabase, Pinecone
- **Web Services**: Firecrawl, Google Search, Exa AI, browser automation
- **Development**: GitHub, Jira, Linear repository and issue management
- **AI Services**: OpenAI, Perplexity, Hugging Face, ElevenLabs
**Tool Execution Control**:
- **Auto**: Model determines tool invocation based on context and necessity
- **Required**: Tool must be called during every inference request
- **None**: Tool definition available but excluded from model context
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/granular-tool-control.mp4"></video>
</div>
### Response Format
The Response Format parameter enforces structured output generation through JSON Schema validation. This ensures consistent, machine-readable responses that conform to predefined data structures:
```json
{
"name": "user_analysis",
"schema": {
"type": "object",
"properties": {
"sentiment": {
"type": "string",
"enum": ["positive", "negative", "neutral"]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": ["sentiment", "confidence"]
}
}
```
This configuration constrains the model's output to comply with the specified schema, preventing free-form text responses and ensuring structured data generation.
### Accessing Results
After an agent completes, you can access its outputs:
- **`<agent.content>`**: The agent's response text or structured data
- **`<agent.tokens>`**: Token usage statistics (prompt, completion, total)
- **`<agent.tool_calls>`**: Details of any tools the agent used during execution
- **`<agent.cost>`**: Estimated cost of the API call (if available)
## Advanced Features
### Memory Integration
Agents can maintain context across interactions using the memory system:
```javascript
// In a Function block before the agent
const memory = {
conversation_history: previousMessages,
user_preferences: userProfile,
session_data: currentSession
};
```
### Structured Output Validation
Use JSON Schema to ensure consistent, machine-readable responses:
```json
{
"type": "object",
"properties": {
"analysis": {"type": "string"},
"confidence": {"type": "number", "minimum": 0, "maximum": 1},
"categories": {"type": "array", "items": {"type": "string"}}
},
"required": ["analysis", "confidence"]
}
```
### Error Handling
Agents automatically handle common errors:
- API rate limits with exponential backoff
- Invalid tool calls with retry logic
- Network failures with connection recovery
- Schema validation errors with fallback responses
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>System Prompt</strong>: Instructions defining agent behavior and role
</li>
<li>
<strong>User Prompt</strong>: Input text or data to process
</li>
<li>
<strong>Model</strong>: AI model selection (OpenAI, Anthropic, Google, etc.)
</li>
<li>
<strong>Temperature</strong>: Response randomness control (0-2)
</li>
<li>
<strong>Tools</strong>: Array of available tools for function calling
</li>
<li>
<strong>Response Format</strong>: JSON Schema for structured output
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>agent.content</strong>: Agent's response text or structured data
</li>
<li>
<strong>agent.tokens</strong>: Token usage statistics object
</li>
<li>
<strong>agent.tool_calls</strong>: Array of tool execution details
</li>
<li>
<strong>agent.cost</strong>: Estimated API call cost (if available)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Content</strong>: Primary response output from the agent
</li>
<li>
<strong>Metadata</strong>: Usage statistics and execution details
</li>
<li>
<strong>Access</strong>: Available in blocks after the agent
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Customer Support Automation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Handle customer inquiries with database access</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User submits support ticket via API block</li>
<li>Agent processes inquiry with product database tools</li>
<li>Agent generates response and creates follow-up ticket</li>
<li>Response block sends reply to customer</li>
</ol>
</div>
### Multi-Model Content Analysis
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Analyze content with different AI models</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block processes uploaded document</li>
<li>Agent with GPT-4o performs technical analysis</li>
<li>Agent with Claude analyzes sentiment and tone</li>
<li>Function block combines results for final report</li>
</ol>
</div>
### Tool-Powered Research Assistant
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Research assistant with web search and document access</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User query received via input</li>
<li>Agent searches web using Google Search tool</li>
<li>Agent accesses Notion database for internal docs</li>
<li>Agent compiles comprehensive research report</li>
</ol>
</div>
## Best Practices
- **Be specific in system prompts**: Clearly define the agent's role, tone, and limitations. The more specific your instructions are, the better the agent will be able to fulfill its intended purpose.
- **Choose the right temperature setting**: Use lower temperature settings (0-0.3) when accuracy is important, or increase temperature (0.7-2.0) for more creative or varied responses
- **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. For tasks with little overlap, use another Agent block for the best results.

View File

@@ -1,234 +0,0 @@
---
title: API
description: Connect to external services through API endpoints
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The API block enables you to connect your workflow to external services through HTTP requests. It supports various methods like GET, POST, PUT, DELETE, and PATCH, allowing you to interact with virtually any API endpoint.
<ThemeImage
lightSrc="/static/light/api-light.png"
darkSrc="/static/dark/api-dark.png"
alt="API Block"
width={350}
height={175}
/>
## Overview
The API block enables you to:
<Steps>
<Step>
<strong>Connect to external services</strong>: Make HTTP requests to REST APIs and web services
</Step>
<Step>
<strong>Send and receive data</strong>: Process responses and transform data from external sources
</Step>
<Step>
<strong>Integrate third-party platforms</strong>: Connect with services like Stripe, Slack, or custom APIs
</Step>
<Step>
<strong>Handle authentication</strong>: Support various auth methods including Bearer tokens and API keys
</Step>
</Steps>
## Configuration Options
### URL
The endpoint URL for the API request. This can be:
- A static URL entered directly in the block
- A dynamic URL connected from another block's output
- A URL with path parameters
### Method
Select the HTTP method for your request:
- **GET**: Retrieve data from the server
- **POST**: Send data to the server to create a resource
- **PUT**: Update an existing resource on the server
- **DELETE**: Remove a resource from the server
- **PATCH**: Partially update an existing resource
### Query Parameters
Define key-value pairs that will be appended to the URL as query parameters. For example:
```
Key: apiKey
Value: your_api_key_here
Key: limit
Value: 10
```
These would be added to the URL as `?apiKey=your_api_key_here&limit=10`.
### Headers
Configure HTTP headers for your request. Common headers include:
```
Key: Content-Type
Value: application/json
Key: Authorization
Value: Bearer your_token_here
```
### Request Body
For methods that support a request body (POST, PUT, PATCH), you can define the data to send. The body can be:
- JSON data entered directly in the block
- Data connected from another block's output
- Dynamically generated during workflow execution
### Accessing Results
After an API request completes, you can access its outputs:
- **`<api.data>`**: The response body data from the API
- **`<api.status>`**: HTTP status code (200, 404, 500, etc.)
- **`<api.headers>`**: Response headers from the server
- **`<api.error>`**: Error details if the request failed
## Advanced Features
### Dynamic URL Construction
Build URLs dynamically using variables from previous blocks:
```javascript
// In a Function block before the API
const userId = <start.userId>;
const apiUrl = `https://api.example.com/users/${userId}/profile`;
```
### Request Retries
The API block automatically handles:
- Network timeouts with exponential backoff
- Rate limit responses (429 status codes)
- Server errors (5xx status codes) with retry logic
- Connection failures with reconnection attempts
### Response Validation
Validate API responses before processing:
```javascript
// In a Function block after the API
if (<api.status> === 200) {
const data = <api.data>;
// Process successful response
} else {
// Handle error response
console.error(`API Error: ${<api.status>}`);
}
```
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>URL</strong>: The endpoint to send the request to
</li>
<li>
<strong>Method</strong>: HTTP method (GET, POST, PUT, DELETE, PATCH)
</li>
<li>
<strong>Query Parameters</strong>: Key-value pairs for URL parameters
</li>
<li>
<strong>Headers</strong>: HTTP headers for authentication and content type
</li>
<li>
<strong>Body</strong>: Request payload for POST/PUT/PATCH methods
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>api.data</strong>: Response body data from the API call
</li>
<li>
<strong>api.status</strong>: HTTP status code returned by server
</li>
<li>
<strong>api.headers</strong>: Response headers from the server
</li>
<li>
<strong>api.error</strong>: Error details if request failed
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Response Data</strong>: Primary API response content
</li>
<li>
<strong>Status Information</strong>: HTTP status and error details
</li>
<li>
<strong>Access</strong>: Available in blocks after the API call
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Fetch User Profile Data
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Retrieve user information from external service</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block constructs user ID from input</li>
<li>API block calls GET /users/&#123;id&#125; endpoint</li>
<li>Function block processes and formats user data</li>
<li>Response block returns formatted profile</li>
</ol>
</div>
### Create Support Ticket
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Submit support request to ticketing system</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent analyzes user issue and generates ticket data</li>
<li>API block POSTs ticket to support system</li>
<li>Condition block checks if ticket was created successfully</li>
<li>Response block confirms ticket creation with ID</li>
</ol>
</div>
### Payment Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Process payment through Stripe API</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block validates payment data</li>
<li>API block creates payment intent via Stripe</li>
<li>Condition block handles payment success/failure</li>
<li>Function block updates order status in database</li>
</ol>
</div>
## Best Practices
- **Use environment variables for sensitive data**: Don't hardcode API keys or credentials
- **Handle errors gracefully**: Connect error handling logic for failed requests
- **Validate responses**: Check status codes and response formats before processing data
- **Respect rate limits**: Be mindful of API rate limits and implement appropriate throttling

View File

@@ -1,236 +0,0 @@
---
title: Condition
description: Create conditional logic and branching in your workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
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={350}
height={175}
/>
<Callout>
Condition blocks enable deterministic decision-making without requiring an LLM, making them ideal
for straightforward branching logic.
</Callout>
## Overview
The Condition block enables you to:
<Steps>
<Step>
<strong>Create branching logic</strong>: Route workflows based on boolean expressions
</Step>
<Step>
<strong>Make data-driven decisions</strong>: Evaluate conditions using previous block outputs
</Step>
<Step>
<strong>Handle multiple scenarios</strong>: Define multiple conditions with different paths
</Step>
<Step>
<strong>Provide deterministic routing</strong>: Make decisions without requiring an LLM
</Step>
</Steps>
## How It Works
The Condition block operates through a sequential evaluation process:
1. **Evaluate Expression** - Processes the JavaScript/TypeScript boolean expression using current workflow data
2. **Determine Result** - Returns true or false based on the expression evaluation
3. **Route Workflow** - Directs execution to the appropriate destination block based on the result
4. **Provide Context** - Generates metadata about the decision for debugging and monitoring
## Configuration Options
### Conditions
Define one or more conditions that will be evaluated. Each condition includes:
- **Expression**: A JavaScript/TypeScript expression that evaluates to true or false
- **Path**: The destination block to route to if the condition is true
- **Description**: Optional explanation of what the condition checks
You can create multiple conditions that are evaluated in order, with the first matching condition determining the execution path.
### Condition Expression Format
Conditions use JavaScript syntax and can reference input values from previous blocks.
<Tabs items={['Score Threshold', 'Text Analysis', 'Multiple Conditions']}>
<Tab>
```javascript
// Check if a score is above a threshold
<agent.score> > 75
```
</Tab>
<Tab>
```javascript
// Check if a text contains specific keywords
<agent.text>.includes('urgent') || <agent.text>.includes('emergency')
```
</Tab>
<Tab>
```javascript
// Check multiple conditions
<agent.age> >= 18 && <agent.country> === 'US'
```
</Tab>
</Tabs>
### Accessing Results
After a condition evaluates, you can access its outputs:
- **`<condition.result>`**: Boolean result of the condition evaluation
- **`<condition.matched_condition>`**: ID of the condition that was matched
- **`<condition.content>`**: Description of the evaluation result
- **`<condition.path>`**: Details of the chosen routing destination
## Advanced Features
### Complex Expressions
Use JavaScript operators and functions in conditions:
```javascript
// String operations
<user.email>.endsWith('@company.com')
// Array operations
<api.tags>.includes('urgent')
// Mathematical operations
<agent.confidence> * 100 > 85
// Date comparisons
new Date(<api.created_at>) > new Date('2024-01-01')
```
### Multiple Condition Evaluation
Conditions are evaluated in order until one matches:
```javascript
// Condition 1: Check for high priority
<ticket.priority> === 'high'
// Condition 2: Check for urgent keywords
<ticket.subject>.toLowerCase().includes('urgent')
// Condition 3: Default fallback
true
```
### Error Handling
Conditions automatically handle:
- Undefined or null values with safe evaluation
- Type mismatches with appropriate fallbacks
- Invalid expressions with error logging
- Missing variables with default values
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Conditions</strong>: Array of boolean expressions to evaluate
</li>
<li>
<strong>Expressions</strong>: JavaScript/TypeScript conditions using block outputs
</li>
<li>
<strong>Routing Paths</strong>: Destination blocks for each condition result
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>condition.result</strong>: Boolean result of condition evaluation
</li>
<li>
<strong>condition.matched_condition</strong>: ID of the matched condition
</li>
<li>
<strong>condition.content</strong>: Description of evaluation result
</li>
<li>
<strong>condition.path</strong>: Details of chosen routing destination
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Boolean Result</strong>: Primary condition evaluation outcome
</li>
<li>
<strong>Routing Information</strong>: Path selection and condition details
</li>
<li>
<strong>Access</strong>: Available in blocks after the condition
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Customer Support Routing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Route support tickets based on priority</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API block fetches support ticket data</li>
<li>Condition checks if `<api.priority>` equals 'high'</li>
<li>High priority tickets → Agent with escalation tools</li>
<li>Normal priority tickets → Standard support agent</li>
</ol>
</div>
### Content Moderation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Filter content based on analysis results</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent analyzes user-generated content</li>
<li>Condition checks if `<agent.toxicity_score>` > 0.7</li>
<li>Toxic content → Moderation workflow</li>
<li>Clean content → Publishing workflow</li>
</ol>
</div>
### User Onboarding Flow
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Personalize onboarding based on user type</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block processes user registration data</li>
<li>Condition checks if `<user.account_type>` === 'enterprise'</li>
<li>Enterprise users → Advanced setup workflow</li>
<li>Individual users → Simple onboarding workflow</li>
</ol>
</div>
## Best Practices
- **Order conditions correctly**: Place more specific conditions before general ones to ensure specific logic takes precedence over fallbacks
- **Include a default condition**: Add a catch-all condition (`true`) as the last condition to handle unmatched cases and prevent workflow execution from getting stuck
- **Keep expressions simple**: Use clear, straightforward boolean expressions for better readability and easier debugging
- **Document your conditions**: Add descriptions to explain the purpose of each condition for better team collaboration and maintenance
- **Test edge cases**: Verify conditions handle boundary values correctly by testing with values at the edges of your condition ranges

View File

@@ -1,131 +0,0 @@
---
title: Evaluator
description: Assess content quality using customizable evaluation metrics
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
import { Video } from '@/components/ui/video'
The Evaluator block uses AI to score and assess content quality based on metrics you define. Perfect for quality control, A/B testing, and ensuring your AI outputs meet specific standards.
<ThemeImage
lightSrc="/static/light/evaluator-light.png"
darkSrc="/static/dark/evaluator-dark.png"
alt="Evaluator Block Configuration"
width={350}
height={175}
/>
## What You Can Evaluate
**AI-Generated Content**: Score chatbot responses, generated articles, or marketing copy
**User Input**: Evaluate customer feedback, survey responses, or form submissions
**Content Quality**: Assess clarity, accuracy, relevance, and tone
**Performance Metrics**: Track improvements over time with consistent scoring
**A/B Testing**: Compare different approaches with objective metrics
## Configuration Options
### Evaluation Metrics
Define custom metrics to evaluate content against. Each metric includes:
- **Name**: A short identifier for the metric
- **Description**: A detailed explanation of what the metric measures
- **Range**: The numeric range for scoring (e.g., 1-5, 0-10)
Example metrics:
```
Accuracy (1-5): How factually accurate is the content?
Clarity (1-5): How clear and understandable is the content?
Relevance (1-5): How relevant is the content to the original query?
```
### Content
The content to be evaluated. This can be:
- Directly provided in the block configuration
- Connected from another block's output (typically an Agent block)
- Dynamically generated during workflow execution
### Model Selection
Choose an AI model to perform the evaluation:
**OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1
**Anthropic**: Claude 3.7 Sonnet
**Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
**Other Providers**: Groq, Cerebras, xAI, DeepSeek
**Local Models**: Any model running on Ollama
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="models.mp4" />
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate evaluations.
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
## How It Works
1. The Evaluator block takes the provided content and your custom metrics
2. It generates a specialized prompt that instructs the LLM to evaluate the content
3. The prompt includes clear guidelines on how to score each metric
4. The LLM evaluates the content and returns numeric scores for each metric
5. The Evaluator block formats these scores as structured output for use in your workflow
## Inputs and Outputs
### Inputs
- **Content**: The text or structured data to evaluate
- **Metrics**: Custom evaluation criteria with scoring ranges
- **Model Settings**: LLM provider and parameters
### Outputs
- **Content**: A summary of the evaluation
- **Model**: The model used for evaluation
- **Tokens**: Usage statistics
- **Metric Scores**: Numeric scores for each defined metric
## Example Usage
Here's an example of how an Evaluator block might be configured for assessing customer service responses:
```yaml
# Example Evaluator Configuration
metrics:
- name: Empathy
description: How well does the response acknowledge and address the customer's emotional state?
range:
min: 1
max: 5
- name: Solution
description: How effectively does the response solve the customer's problem?
range:
min: 1
max: 5
- name: Clarity
description: How clear and easy to understand is the response?
range:
min: 1
max: 5
model: Anthropic/claude-3-opus
```
## Best Practices
- **Use specific metric descriptions**: Clearly define what each metric measures to get more accurate evaluations
- **Choose appropriate ranges**: Select scoring ranges that provide enough granularity without being overly complex
- **Connect with Agent blocks**: Use Evaluator blocks to assess Agent block outputs and create feedback loops
- **Use consistent metrics**: For comparative analysis, maintain consistent metrics across similar evaluations
- **Combine multiple metrics**: Use several metrics to get a comprehensive evaluation

View File

@@ -1,313 +0,0 @@
---
title: Function
description: Execute custom JavaScript or TypeScript code in your workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Function block lets you run custom JavaScript or TypeScript code in your workflow. Use it to transform data, perform calculations, or implement custom logic that isn't available in other blocks.
<ThemeImage
lightSrc="/static/light/function-light.png"
darkSrc="/static/dark/function-dark.png"
alt="Function Block with Code Editor"
width={350}
height={175}
/>
## Overview
The Function block enables you to:
<Steps>
<Step>
<strong>Transform data</strong>: Convert formats, parse text, manipulate arrays and objects
</Step>
<Step>
<strong>Perform calculations</strong>: Math operations, statistics, financial calculations
</Step>
<Step>
<strong>Implement custom logic</strong>: Complex conditionals, loops, and algorithms
</Step>
<Step>
<strong>Process external data</strong>: Parse responses, format requests, handle authentication
</Step>
</Steps>
## How It Works
The Function block runs your code in a secure, isolated environment:
1. **Receive Input**: Access data from previous blocks via the `input` object
2. **Execute Code**: Run your JavaScript/TypeScript code
3. **Return Results**: Use `return` to pass data to the next block
4. **Handle Errors**: Built-in error handling and logging
## Configuration Options
### Code Editor
Write your JavaScript/TypeScript code in a full-featured editor with:
- Syntax highlighting and error checking
- Line numbers and bracket matching
- Support for modern JavaScript features
- Native support for `fetch`
### Accessing Input Data
Use the `input` object to access data from previous blocks:
```javascript
// Access data from connected blocks
const userData = <agent.userData>;
const orderData = <agent.orderData>;
// Access specific fields
const customerName = <agent.customer.name>;
const total = <agent.order.total>;
```
### Common Examples
**Data Transformation**:
```javascript
// Convert and format data
const formatted = {
name: <agent.user.firstName> + ' ' + <agent.user.lastName>,
email: <agent.user.email>.toLowerCase(),
joinDate: new Date(<agent.user.created>).toLocaleDateString()
};
return formatted;
```
**Calculations**:
```javascript
// Calculate discounts and totals
const subtotal = <agent.items>.reduce((sum, item) => sum + item.price, 0);
const discount = subtotal > 100 ? 0.1 : 0;
const total = subtotal * (1 - discount);
return { subtotal, discount, total };
```
**Data Validation**:
```javascript
// Validate email format
const email = <agent.email>;
const isValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
if (!isValid) {
throw new Error('Invalid email format');
}
return { email, isValid };
```
### Accessing Results
After a function executes, you can access its outputs:
- **`<function.result>`**: The value returned from your function
- **`<function.stdout>`**: Any console.log() output from your code
## Advanced Features
### Async/Await Support
Use async functions for complex operations:
```javascript
// Async function example
const processData = async () => {
const data = <api.response>;
// Process data with async operations
const processed = await Promise.all(
data.map(async (item) => {
return {
id: item.id,
processed: true,
timestamp: new Date().toISOString()
};
})
);
return processed;
};
return await processData();
```
### Error Handling
Implement robust error handling:
```javascript
try {
const result = <api.data>;
if (!result || !result.length) {
throw new Error('No data received');
}
return result.map(item => ({
id: item.id,
name: item.name.trim(),
valid: true
}));
} catch (error) {
console.error('Processing failed:', error.message);
return { error: error.message, valid: false };
}
```
### Performance Optimization
Optimize for large datasets:
```javascript
// Efficient data processing
const data = <api.large_dataset>;
// Use efficient array methods
const processed = data
.filter(item => item.status === 'active')
.map(item => ({
id: item.id,
summary: item.description.substring(0, 100)
}))
.slice(0, 1000); // Limit results
return processed;
```
## Security and Limitations
<Callout type="warning">
Functions run in a secure environment with these restrictions:
- **Execution timeout**: 30 seconds maximum to prevent infinite loops
- **Memory limits**: Limited memory to prevent resource exhaustion
- **No network access**: Cannot make HTTP requests (use API blocks instead)
- **Limited APIs**: Only safe JavaScript APIs are available
</Callout>
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Code</strong>: Your JavaScript/TypeScript code to execute
</li>
<li>
<strong>Timeout</strong>: Maximum execution time (defaults to 30 seconds)
</li>
<li>
<strong>Input Data</strong>: All connected block outputs available via variables
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>function.result</strong>: The value returned from your function
</li>
<li>
<strong>function.stdout</strong>: Console.log() output from your code
</li>
<li>
<strong>function.error</strong>: Error details if function failed
</li>
<li>
<strong>function.execution_time</strong>: Time taken to execute
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Function Result</strong>: Primary output from your code
</li>
<li>
<strong>Debug Information</strong>: Logs and execution details
</li>
<li>
<strong>Access</strong>: Available in blocks after the function
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Data Processing Pipeline
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Transform API response into structured data</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API block fetches raw customer data</li>
<li>Function block processes and validates data</li>
<li>Function block calculates derived metrics</li>
<li>Response block returns formatted results</li>
</ol>
</div>
### Business Logic Implementation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Calculate loyalty scores and tiers</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent retrieves customer purchase history</li>
<li>Function block calculates loyalty metrics</li>
<li>Function block determines customer tier</li>
<li>Condition block routes based on tier level</li>
</ol>
</div>
### Data Validation and Sanitization
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Validate and clean user input</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User input received from form submission</li>
<li>Function block validates email format and phone numbers</li>
<li>Function block sanitizes and normalizes data</li>
<li>API block saves validated data to database</li>
</ol>
</div>
### Example: Loyalty Score Calculator
```javascript title="loyalty-calculator.js"
// Process customer data and calculate loyalty score
const { purchaseHistory, accountAge, supportTickets } = <agent>;
// Calculate metrics
const totalSpent = purchaseHistory.reduce((sum, purchase) => sum + purchase.amount, 0);
const purchaseFrequency = purchaseHistory.length / (accountAge / 365);
const ticketRatio = supportTickets.resolved / supportTickets.total;
// Calculate loyalty score (0-100)
const spendScore = Math.min(totalSpent / 1000 * 30, 30);
const frequencyScore = Math.min(purchaseFrequency * 20, 40);
const supportScore = ticketRatio * 30;
const loyaltyScore = Math.round(spendScore + frequencyScore + supportScore);
return {
customer: <agent.name>,
loyaltyScore,
loyaltyTier: loyaltyScore >= 80 ? "Platinum" : loyaltyScore >= 60 ? "Gold" : "Silver",
metrics: { spendScore, frequencyScore, supportScore }
};
```
## Best Practices
- **Keep functions focused**: Write functions that do one thing well to improve maintainability and debugging
- **Handle errors gracefully**: Use try/catch blocks to handle potential errors and provide meaningful error messages
- **Test edge cases**: Ensure your code handles unusual inputs, null values, and boundary conditions correctly
- **Optimize for performance**: Be mindful of computational complexity and memory usage for large datasets
- **Use console.log() for debugging**: Leverage stdout output to debug and monitor function execution

View File

@@ -1,129 +0,0 @@
---
title: Blocks
description: The building components of your AI workflows
---
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { BlockTypes } from '@/components/ui/block-types'
import { Video } from '@/components/ui/video'
Blocks are the building components you connect together to create AI workflows. Think of them as specialized modules that each handle a specific task—from chatting with AI models to making API calls or processing data.
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
## Core Block Types
Sim provides seven core block types that handle the essential functions of AI workflows:
### Processing Blocks
- **[Agent](/blocks/agent)** - Chat with AI models (OpenAI, Anthropic, Google, local models)
- **[Function](/blocks/function)** - Run custom JavaScript/TypeScript code
- **[API](/blocks/api)** - Connect to external services via HTTP requests
### Logic Blocks
- **[Condition](/blocks/condition)** - Branch workflow paths based on boolean expressions
- **[Router](/blocks/router)** - Use AI to intelligently route requests to different paths
- **[Evaluator](/blocks/evaluator)** - Score and assess content quality using AI
### Output Blocks
- **[Response](/blocks/response)** - Format and return final results from your workflow
<BlockTypes />
## How Blocks Work
Each block has three main components:
**Inputs**: Data coming into the block from other blocks or user input
**Configuration**: Settings that control how the block behaves
**Outputs**: Data the block produces for other blocks to use
<Steps>
<Step>
<strong>Receive Input</strong>: Block receives data from connected blocks or user input
</Step>
<Step>
<strong>Process</strong>: Block processes the input according to its configuration
</Step>
<Step>
<strong>Output Results</strong>: Block produces output data for the next blocks in the workflow
</Step>
</Steps>
## Connecting Blocks
You create workflows by connecting blocks together. The output of one block becomes the input of another:
- **Drag to connect**: Drag from an output port to an input port
- **Multiple connections**: One output can connect to multiple inputs
- **Branching paths**: Some blocks can route to different paths based on conditions
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
## Common Patterns
### Sequential Processing
Connect blocks in a chain where each block processes the output of the previous one:
```
User Input → Agent → Function → Response
```
### Conditional Branching
Use Condition or Router blocks to create different paths:
```
User Input → Router → Agent A (for questions)
→ Agent B (for commands)
```
### Quality Control
Use Evaluator blocks to assess and filter outputs:
```
Agent → Evaluator → Condition → Response (if good)
→ Agent (retry if bad)
```
## Block Configuration
Each block type has specific configuration options:
**All Blocks**:
- Input/output connections
- Error handling behavior
- Execution timeout settings
**AI Blocks** (Agent, Router, Evaluator):
- Model selection (OpenAI, Anthropic, Google, local)
- API keys and authentication
- Temperature and other model parameters
- System prompts and instructions
**Logic Blocks** (Condition, Function):
- Custom expressions or code
- Variable references
- Execution environment settings
**Integration Blocks** (API, Response):
- Endpoint configuration
- Headers and authentication
- Request/response formatting
<Cards>
<Card title="Agent Block" href="/blocks/agent">
Connect to AI models and create intelligent responses
</Card>
<Card title="Function Block" href="/blocks/function">
Run custom code to process and transform data
</Card>
<Card title="API Block" href="/blocks/api">
Integrate with external services and APIs
</Card>
<Card title="Condition Block" href="/blocks/condition">
Create branching logic based on data evaluation
</Card>
</Cards>

View File

@@ -1,175 +0,0 @@
---
title: Loop
description: Create iterative workflows with loops that execute blocks repeatedly
---
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 Loop block is a container block in Sim that allows you to execute a group of blocks repeatedly. Loops enable iterative processing in your workflows.
<ThemeImage
lightSrc="/static/light/loop-light.png"
darkSrc="/static/dark/loop-dark.png"
alt="Loop Block"
width={500}
height={300}
/>
<Callout type="info">
Loop blocks are container nodes that can hold other blocks inside them. The blocks inside a loop will execute multiple times based on your configuration.
</Callout>
## Overview
The Loop block enables you to:
<Steps>
<Step>
<strong>Iterate over collections</strong>: Process arrays or objects one item at a time
</Step>
<Step>
<strong>Repeat operations</strong>: Execute blocks a fixed number of times
</Step>
</Steps>
## Configuration Options
### Loop Type
Choose between two types of loops:
<Tabs items={['For Loop', 'ForEach Loop']}>
<Tab>
A numeric loop that executes a fixed number of times. Use this when you need to repeat an operation a specific number of times.
```
Example: Run 5 times
- Iteration 1
- Iteration 2
- Iteration 3
- Iteration 4
- Iteration 5
```
</Tab>
<Tab>
A collection-based loop that iterates over each item in an array or object. Use this when you need to process a collection of items.
```
Example: Process ["apple", "banana", "orange"]
- Iteration 1: Process "apple"
- Iteration 2: Process "banana"
- Iteration 3: Process "orange"
```
</Tab>
</Tabs>
## How to Use Loops
### Creating a Loop
1. Drag a Loop block from the toolbar onto your canvas
2. Configure the loop type and parameters
3. Drag other blocks inside the loop container
4. Connect the blocks as needed
### Accessing Results
After a loop completes, you can access aggregated results:
- **`<loop.results>`**: Array of results from all loop iterations
## Example Use Cases
### Processing API Results
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Process multiple customer records</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API block fetches customer list</li>
<li>ForEach loop iterates over each customer</li>
<li>Inside loop: Agent analyzes customer data</li>
<li>Inside loop: Function stores analysis results</li>
</ol>
</div>
### Iterative Content Generation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Generate multiple variations</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Set For loop to 5 iterations</li>
<li>Inside loop: Agent generates content variation</li>
<li>Inside loop: Evaluator scores the content</li>
<li>After loop: Function selects best variation</li>
</ol>
</div>
## Advanced Features
### Limitations
<Callout type="warning">
Container blocks (Loops and Parallels) cannot be nested inside each other. This means:
- You cannot place a Loop block inside another Loop block
- You cannot place a Parallel block inside a Loop block
- You cannot place any container block inside another container block
If you need multi-dimensional iteration, consider restructuring your workflow to use sequential loops or process data in stages.
</Callout>
<Callout type="info">
Loops execute sequentially, not in parallel. If you need concurrent execution, use the Parallel block instead.
</Callout>
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Loop Type</strong>: Choose between 'for' or 'forEach'
</li>
<li>
<strong>Iterations</strong>: Number of times to execute (for loops)
</li>
<li>
<strong>Collection</strong>: Array or object to iterate over (forEach loops)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>loop.currentItem</strong>: Current item being processed
</li>
<li>
<strong>loop.index</strong>: Current iteration number (0-based)
</li>
<li>
<strong>loop.items</strong>: Full collection (forEach loops)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>loop.results</strong>: Array of all iteration results
</li>
<li>
<strong>Structure</strong>: Results maintain iteration order
</li>
<li>
<strong>Access</strong>: Available in blocks after the loop
</li>
</ul>
</Tab>
</Tabs>
## Best Practices
- **Set reasonable limits**: Keep iteration counts reasonable to avoid long execution times
- **Use ForEach for collections**: When processing arrays or objects, use ForEach instead of For loops
- **Handle errors gracefully**: Consider adding error handling inside loops for robust workflows

View File

@@ -1,15 +0,0 @@
{
"title": "Blocks",
"pages": [
"agent",
"api",
"condition",
"evaluator",
"function",
"loop",
"parallel",
"response",
"router",
"workflow"
]
}

View File

@@ -1,210 +0,0 @@
---
title: Parallel
description: Execute multiple blocks concurrently for faster workflow processing
---
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 Parallel block is a container block in Sim that allows you to execute multiple instances of blocks concurrently.
<ThemeImage
lightSrc="/static/light/parallel-light.png"
darkSrc="/static/dark/parallel-dark.png"
alt="Parallel Block"
width={500}
height={300}
/>
<Callout type="info">
Parallel blocks are container nodes that execute their contents multiple times simultaneously, unlike loops which execute sequentially.
</Callout>
## Overview
The Parallel block enables you to:
<Steps>
<Step>
<strong>Distribute work</strong>: Process multiple items concurrently
</Step>
<Step>
<strong>Speed up execution</strong>: Run independent operations simultaneously
</Step>
<Step>
<strong>Handle bulk operations</strong>: Process large datasets efficiently
</Step>
<Step>
<strong>Aggregate results</strong>: Collect outputs from all parallel executions
</Step>
</Steps>
## Configuration Options
### Parallel Type
Choose between two types of parallel execution:
<Tabs items={['Count-based', 'Collection-based']}>
<Tab>
Execute a fixed number of parallel instances. Use this when you need to run the same operation multiple times concurrently.
```
Example: Run 5 parallel instances
- Instance 1 ┐
- Instance 2 ├─ All execute simultaneously
- Instance 3 │
- Instance 4 │
- Instance 5 ┘
```
</Tab>
<Tab>
Distribute a collection across parallel instances. Each instance processes one item from the collection simultaneously.
```
Example: Process ["task1", "task2", "task3"] in parallel
- Instance 1: Process "task1" ┐
- Instance 2: Process "task2" ├─ All execute simultaneously
- Instance 3: Process "task3" ┘
```
</Tab>
</Tabs>
## How to Use Parallel Blocks
### Creating a Parallel Block
1. Drag a Parallel block from the toolbar onto your canvas
2. Configure the parallel type and parameters
3. Drag a single block inside the parallel container
4. Connect the block as needed
### Accessing Results
After a parallel block completes, you can access aggregated results:
- **`<parallel.results>`**: Array of results from all parallel instances
## Example Use Cases
### Batch API Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Process multiple API calls simultaneously</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Parallel block with collection of API endpoints</li>
<li>Inside parallel: API block calls each endpoint</li>
<li>After parallel: Process all responses together</li>
</ol>
</div>
### Multi-Model AI Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Get responses from multiple AI models</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Count-based parallel set to 3 instances</li>
<li>Inside parallel: Agent configured with different model per instance</li>
<li>After parallel: Compare and select best response</li>
</ol>
</div>
## Advanced Features
### Result Aggregation
Results from all parallel instances are automatically collected:
```javascript
// In a Function block after the parallel
const allResults = input.parallel.results;
// Returns: [result1, result2, result3, ...]
```
### Instance Isolation
Each parallel instance runs independently:
- Separate variable scopes
- No shared state between instances
- Failures in one instance don't affect others
### Limitations
<Callout type="warning">
Container blocks (Loops and Parallels) cannot be nested inside each other. This means:
- You cannot place a Loop block inside a Parallel block
- You cannot place another Parallel block inside a Parallel block
- You cannot place any container block inside another container block
</Callout>
<Callout type="warning">
Parallel blocks can only contain a single block. You cannot have multiple blocks connected to each other inside a parallel - only the first block would execute in that case.
</Callout>
<Callout type="info">
While parallel execution is faster, be mindful of:
- API rate limits when making concurrent requests
- Memory usage with large datasets
- Maximum of 20 concurrent instances to prevent resource exhaustion
</Callout>
## Parallel vs Loop
Understanding when to use each:
| Feature | Parallel | Loop |
|---------|----------|------|
| Execution | Concurrent | Sequential |
| Speed | Faster for independent operations | Slower but ordered |
| Order | No guaranteed order | Maintains order |
| Use case | Independent operations | Dependent operations |
| Resource usage | Higher | Lower |
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Parallel Type</strong>: Choose between 'count' or 'collection'
</li>
<li>
<strong>Count</strong>: Number of instances to run (count-based)
</li>
<li>
<strong>Collection</strong>: Array or object to distribute (collection-based)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>parallel.currentItem</strong>: Item for this instance
</li>
<li>
<strong>parallel.index</strong>: Instance number (0-based)
</li>
<li>
<strong>parallel.items</strong>: Full collection (collection-based)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>parallel.results</strong>: Array of all instance results
</li>
<li>
<strong>Access</strong>: Available in blocks after the parallel
</li>
</ul>
</Tab>
</Tabs>
## Best Practices
- **Independent operations only**: Ensure operations don't depend on each other
- **Handle rate limits**: Add delays or throttling for API-heavy workflows
- **Error handling**: Each instance should handle its own errors gracefully

View File

@@ -1,186 +0,0 @@
---
title: Response
description: Send a structured response back to API calls
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Response block is the final step in your workflow that formats and returns data to whoever called your workflow. It's like the "return" statement for your entire workflow—it packages up results and sends them back.
<ThemeImage
lightSrc="/static/light/response-light.png"
darkSrc="/static/dark/response-dark.png"
alt="Response Block Configuration"
width={350}
height={175}
/>
<Callout type="info">
Response blocks are terminal blocks - they end the workflow execution and cannot connect to other blocks.
</Callout>
## When You Need Response Blocks
**API Endpoints**: When your workflow is called via API, Response blocks format the return data
**Webhooks**: Return confirmation or data back to the calling system
**Testing**: See formatted results when testing your workflow
**Data Export**: Structure data for external systems or reports
## Two Ways to Build Responses
### Builder Mode (Recommended)
Visual interface for building response structure:
- Drag and drop fields
- Reference workflow variables easily
- Visual preview of response structure
### Editor Mode (Advanced)
Write JSON directly:
- Full control over response format
- Support for complex nested structures
- Use `<variable.name>` syntax for dynamic values
## 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>data</strong>: The response body data</li>
<li><strong>status</strong>: HTTP status code</li>
<li><strong>headers</strong>: Response headers</li>
</ul>
</Tab>
</Tabs>
## Variable References
Use the `<variable.name>` syntax to dynamically insert workflow variables into your response:
```json
{
"user": {
"id": "<variable.userId>",
"name": "<variable.userName>",
"email": "<variable.userEmail>"
},
"query": "<variable.searchQuery>",
"results": "<variable.searchResults>",
"totalFound": "<variable.resultCount>",
"processingTime": "<variable.executionTime>ms"
}
```
<Callout type="warning">
Variable names are case-sensitive and must match exactly with the variables available in your workflow.
</Callout>
## Example Usage
Here's an example of how a Response block might be configured for a user search API:
```yaml
data: |
{
"success": true,
"data": {
"users": "<variable.searchResults>",
"pagination": {
"page": "<variable.currentPage>",
"limit": "<variable.pageSize>",
"total": "<variable.totalUsers>"
}
},
"query": {
"searchTerm": "<variable.searchTerm>",
"filters": "<variable.appliedFilters>"
},
"timestamp": "<variable.timestamp>"
}
status: 200
headers:
- key: X-Total-Count
value: <variable.totalUsers>
- key: Cache-Control
value: public, max-age=300
```
## Best Practices
- **Use meaningful status codes**: Choose appropriate HTTP status codes that accurately reflect the outcome of the workflow
- **Structure your responses consistently**: Maintain a consistent JSON structure across all your API endpoints for better developer experience
- **Include relevant metadata**: Add timestamps and version information to help with debugging and monitoring
- **Handle errors gracefully**: Use conditional logic in your workflow to set appropriate error responses with descriptive messages
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes

View File

@@ -1,259 +0,0 @@
---
title: Router
description: Route workflow execution based on specific conditions or logic
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { ThemeImage } from '@/components/ui/theme-image'
import { Video } from '@/components/ui/video'
The Router block uses AI to intelligently decide which path your workflow should take next. Unlike Condition blocks that use simple rules, Router blocks can understand context and make smart routing decisions based on content analysis.
<ThemeImage
lightSrc="/static/light/router-light.png"
darkSrc="/static/dark/router-dark.png"
alt="Router Block with Multiple Paths"
width={350}
height={175}
/>
## Overview
The Router block enables you to:
<Steps>
<Step>
<strong>Intelligent content routing</strong>: Use AI to understand intent and context
</Step>
<Step>
<strong>Dynamic path selection</strong>: Route workflows based on unstructured content analysis
</Step>
<Step>
<strong>Context-aware decisions</strong>: Make smart routing choices beyond simple rules
</Step>
<Step>
<strong>Multi-path management</strong>: Handle complex workflows with multiple potential destinations
</Step>
</Steps>
## Router vs Condition Blocks
<Accordions>
<Accordion title="When to Use Router">
- AI-powered content analysis needed
- Unstructured or varying content types
- Intent-based routing (e.g., "route support tickets to departments")
- Context-aware decision making required
</Accordion>
<Accordion title="When to Use Condition">
- Simple, rule-based decisions
- Structured data or numeric comparisons
- Fast, deterministic routing needed
- Boolean logic sufficient
</Accordion>
</Accordions>
## How It Works
The Router block:
<Steps>
<Step>
<strong>Analyze content</strong>: Uses an LLM to understand input content and context
</Step>
<Step>
<strong>Evaluate targets</strong>: Compares content against available destination blocks
</Step>
<Step>
<strong>Select destination</strong>: Identifies the most appropriate path based on intent
</Step>
<Step>
<strong>Route execution</strong>: Directs workflow to the selected block
</Step>
</Steps>
## Configuration Options
### Content/Prompt
The content or prompt that the Router will analyze to make routing decisions. This can be:
- A direct user query or input
- Output from a previous block
- A system-generated message
### Target Blocks
The possible destination blocks that the Router can select from. The Router will automatically detect connected blocks, but you can also:
- Customize the descriptions of target blocks to improve routing accuracy
- Specify routing criteria for each target block
- Exclude certain blocks from being considered as routing targets
### Model Selection
Choose an AI model to power the routing decision:
**OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1 \
**Anthropic**: Claude 3.7 Sonnet \
**Google**: Gemini 2.5 Pro, Gemini 2.0 Flash \
**Other Providers**: Groq, Cerebras, xAI, DeepSeek \
**Local Models**: Any model running on Ollama
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="router-model-dropdown.mp4" />
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate routing decisions.
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
### Accessing Results
After a router makes a decision, you can access its outputs:
- **`<router.content>`**: Summary of the routing decision made
- **`<router.selected_path>`**: Details of the chosen destination block
- **`<router.tokens>`**: Token usage statistics from the LLM
- **`<router.model>`**: The model used for decision-making
## Advanced Features
### Custom Routing Criteria
Define specific criteria for each target block:
```javascript
// Example routing descriptions
Target Block 1: "Technical support issues, API problems, integration questions"
Target Block 2: "Billing inquiries, subscription changes, payment issues"
Target Block 3: "General questions, feedback, feature requests"
```
### Multi-Model Routing
Use different models for different routing scenarios:
```javascript
// Fast routing for simple cases
Model: GPT-4o-mini
Criteria: Simple, common routing patterns
// Complex routing for nuanced decisions
Model: Claude 3.7 Sonnet
Criteria: Complex content analysis required
```
### Fallback Handling
Implement robust fallback mechanisms:
```javascript
// Router configuration
Primary Targets: ["Support", "Sales", "Technical"]
Fallback Target: "General" // Default when no specific match
Confidence Threshold: 0.7 // Minimum confidence for routing
```
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Content/Prompt</strong>: Text to analyze for routing decisions
</li>
<li>
<strong>Target Blocks</strong>: Connected blocks as potential destinations
</li>
<li>
<strong>Model</strong>: AI model for routing analysis
</li>
<li>
<strong>API Key</strong>: Authentication for selected LLM provider
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>router.content</strong>: Summary of routing decision
</li>
<li>
<strong>router.selected_path</strong>: Details of chosen destination
</li>
<li>
<strong>router.tokens</strong>: Token usage statistics
</li>
<li>
<strong>router.model</strong>: Model used for decision-making
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Routing Decision</strong>: Primary path selection result
</li>
<li>
<strong>Decision Context</strong>: Analysis summary and reasoning
</li>
<li>
<strong>Access</strong>: Available in blocks after the router
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Customer Support Triage
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Route support tickets to specialized departments</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User submits support request via form</li>
<li>Router analyzes ticket content and context</li>
<li>Technical issues → Engineering support agent</li>
<li>Billing questions → Finance support agent</li>
</ol>
</div>
### Content Classification
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Classify and route user-generated content</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User submits content or feedback</li>
<li>Router analyzes content type and sentiment</li>
<li>Feature requests → Product team workflow</li>
<li>Bug reports → Technical support workflow</li>
</ol>
</div>
### Lead Qualification
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Route leads based on qualification criteria</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Lead information captured from form</li>
<li>Router analyzes company size, industry, and needs</li>
<li>Enterprise leads → Sales team with custom pricing</li>
<li>SMB leads → Self-service onboarding flow</li>
</ol>
</div>
## Best Practices
- **Provide clear target descriptions**: Help the Router understand when to select each destination with specific, detailed descriptions
- **Use specific routing criteria**: Define clear conditions and examples for each path to improve accuracy
- **Implement fallback paths**: Connect a default destination for when no specific path is appropriate
- **Test with diverse inputs**: Ensure the Router handles various input types, edge cases, and unexpected content
- **Monitor routing performance**: Review routing decisions regularly and refine criteria based on actual usage patterns
- **Choose appropriate models**: Use models with strong reasoning capabilities for complex routing decisions

View File

@@ -1,259 +0,0 @@
---
title: Workflow
description: Execute other workflows as reusable components within your current workflow
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Workflow block allows you to execute other workflows as reusable components within your current workflow. This powerful feature enables modular design, code reuse, and the creation of complex nested workflows that can be composed from smaller, focused workflows.
<ThemeImage
lightSrc="/static/light/workflow-light.png"
darkSrc="/static/dark/workflow-dark.png"
alt="Workflow Block"
width={300}
height={175}
/>
<Callout type="info">
Workflow blocks enable modular design by allowing you to compose complex workflows from smaller, reusable components.
</Callout>
## Overview
The Workflow block serves as a bridge between workflows, enabling you to:
<Steps>
<Step>
<strong>Reuse existing workflows</strong>: Execute previously created workflows as components within new workflows
</Step>
<Step>
<strong>Create modular designs</strong>: Break down complex processes into smaller, manageable workflows
</Step>
<Step>
<strong>Maintain separation of concerns</strong>: Keep different business logic isolated in separate workflows
</Step>
<Step>
<strong>Enable team collaboration</strong>: Share and reuse workflows across different projects and team members
</Step>
</Steps>
## How It Works
The Workflow block:
1. Takes a reference to another workflow in your workspace
2. Passes input data from the current workflow to the child workflow
3. Executes the child workflow in an isolated context
4. Returns the results back to the parent workflow for further processing
## Configuration Options
### Workflow Selection
Choose which workflow to execute from a dropdown list of available workflows in your workspace. The list includes:
- All workflows you have access to in the current workspace
- Workflows shared with you by other team members
- Both enabled and disabled workflows (though only enabled workflows can be executed)
### Input Data
Define the data to pass to the child workflow:
- **Single Variable Input**: Select a variable or block output to pass to the child workflow
- **Variable References**: Use `<variable.name>` to reference workflow variables
- **Block References**: Use `<blockName.field>` to reference outputs from previous blocks
- **Automatic Mapping**: The selected data is automatically available as `start.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
### Accessing Results
After a workflow executes, you can access its outputs:
- **`<workflow.response>`**: The complete output from the child workflow
- **`<workflow.name>`**: The name of the executed child workflow
- **`<workflow.success>`**: Boolean indicating successful completion
- **`<workflow.error>`**: Error details if the workflow failed
- **`<workflow.execution_time>`**: Time taken to execute the workflow
### 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
## Advanced Features
### Dynamic Workflow Selection
Select workflows dynamically based on runtime conditions:
```javascript
// In a Function block before the Workflow block
const workflowId = <condition.result> ? 'premium-workflow' : 'standard-workflow';
return { selectedWorkflow: workflowId };
```
### Error Handling and Fallbacks
Implement robust error handling for child workflows:
```javascript
// In a Function block after the Workflow block
if (!<workflow.success>) {
console.error('Child workflow failed:', <workflow.error>);
// Implement fallback logic
return { fallback: true, error: <workflow.error> };
}
return <workflow.response>;
```
### Workflow Chaining
Chain multiple workflows together:
```javascript
// Pass output from one workflow to another
Workflow 1 Input: <start.input>
Workflow 2 Input: <workflow1.response>
Workflow 3 Input: <workflow2.response>
```
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow Selection</strong>: Choose which workflow to execute
</li>
<li>
<strong>Input Data</strong>: Variable or block reference to pass to child workflow
</li>
<li>
<strong>Execution Context</strong>: Isolated environment with workspace resources
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>workflow.response</strong>: Complete output from child workflow
</li>
<li>
<strong>workflow.name</strong>: Name of executed child workflow
</li>
<li>
<strong>workflow.success</strong>: Boolean indicating completion status
</li>
<li>
<strong>workflow.error</strong>: Error details if workflow failed
</li>
<li>
<strong>workflow.execution_time</strong>: Time taken to execute
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow Response</strong>: Primary output from child workflow
</li>
<li>
<strong>Execution Status</strong>: Success status and error information
</li>
<li>
<strong>Access</strong>: Available in blocks after the workflow
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Modular Customer Onboarding
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Break down complex onboarding into reusable components</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Main workflow receives customer data</li>
<li>Workflow block executes validation workflow</li>
<li>Workflow block executes account setup workflow</li>
<li>Workflow block executes welcome email workflow</li>
</ol>
</div>
### Microservice Architecture
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Create independent service workflows</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Payment processing workflow handles transactions</li>
<li>Inventory management workflow updates stock</li>
<li>Notification workflow sends confirmations</li>
<li>Main workflow orchestrates all services</li>
</ol>
</div>
### Conditional Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Execute different workflows based on conditions</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Condition block evaluates user type</li>
<li>Enterprise users → Complex approval workflow</li>
<li>Standard users → Simple approval workflow</li>
<li>Free users → Basic processing workflow</li>
</ol>
</div>
### Example: Customer Validation Workflow
```javascript title="validation-workflow.js"
// Main workflow passes customer data to validation workflow
const customerData = <start.input>;
// Validation workflow processes the data
const emailValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(customerData.email);
const phoneValid = /^\+?[1-9]\d{1,14}$/.test(customerData.phone);
return {
customer: customerData,
validation: {
email: emailValid,
phone: phoneValid,
overall: emailValid && phoneValid
}
};
```
## Best Practices
- **Keep workflows focused**: Design child workflows to handle specific, well-defined tasks with clear inputs and outputs
- **Minimize nesting depth**: Avoid deeply nested workflow hierarchies for better maintainability and performance
- **Handle errors gracefully**: Implement proper error handling for child workflow failures and provide fallback mechanisms
- **Document dependencies**: Clearly document which workflows depend on others and maintain dependency maps
- **Test independently**: Ensure child workflows can be tested and validated independently from parent workflows
- **Monitor performance**: Be aware that nested workflows can impact overall execution time and resource usage
- **Use semantic naming**: Give workflows descriptive names that clearly indicate their purpose and functionality

View File

@@ -1,76 +0,0 @@
---
title: Connection Basics
description: Learn how connections work in Sim
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
## How Connections Work
Connections are the pathways that allow data to flow between blocks in your workflow. When you connect two blocks in Sim, you're establishing a data flow relationship that defines how information passes from one block to another.
<Callout type="info">
Each connection represents a directed relationship where data flows from a source block's output
to a destination block's input.
</Callout>
### Creating Connections
<Steps>
<Step>
<strong>Select Source Block</strong>: Click on the output port of the block you want to connect
from
</Step>
<Step>
<strong>Draw Connection</strong>: Drag to the input port of the destination block
</Step>
<Step>
<strong>Confirm Connection</strong>: Release to create the connection
</Step>
<Step>
<strong>Configure (Optional)</strong>: Some connections may require additional configuration
</Step>
</Steps>
### Connection Flow
The flow of data through connections follows these principles:
1. **Directional Flow**: Data always flows from outputs to inputs
2. **Execution Order**: Blocks execute in order based on their connections
3. **Data Transformation**: Data may be transformed as it passes between blocks
4. **Conditional Paths**: Some blocks (like Router and Condition) can direct flow to different paths
### Connection Visualization
Connections are visually represented in the workflow editor:
- **Solid Lines**: Active connections that will pass data
- **Animated Flow**: During execution, data flow is visualized along connections
- **Color Coding**: Different connection types may have different colors
- **Connection Tags**: Visual indicators showing what data is available
### Managing Connections
You can manage your connections in several ways:
- **Delete**: Click on a connection and press Delete or use the context menu
- **Reroute**: Drag a connection to change its path
- **Inspect**: Click on a connection to see details about the data being passed
- **Disable**: Temporarily disable a connection without deleting it
<Callout type="warning">
Deleting a connection will immediately stop data flow between the blocks. Make sure this is
intended before removing connections.
</Callout>
## Connection Compatibility
Not all blocks can be connected to each other. Compatibility depends on:
1. **Data Type Compatibility**: The output type must be compatible with the input type
2. **Block Restrictions**: Some blocks may have restrictions on what they can connect to
3. **Workflow Logic**: Connections must make logical sense in the context of your workflow
The editor will indicate when connections are invalid or incompatible.

View File

@@ -1,42 +0,0 @@
---
title: Connections
description: Connect your blocks to one another.
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { ConnectIcon } from '@/components/icons'
import { Video } from '@/components/ui/video'
Connections are the pathways that allow data to flow between blocks in your workflow. They define how information is passed from one block to another, enabling you to create sophisticated, multi-step processes.
<Callout type="info">
Properly configured connections are essential for creating effective workflows. They determine how
data moves through your system and how blocks interact with each other.
</Callout>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
## Connection Types
Sim supports different types of connections that enable various workflow patterns:
<Cards>
<Card title="Connection Basics" href="/connections/basics">
Learn how connections work and how to create them in your workflows
</Card>
<Card title="Connection Tags" href="/connections/tags">
Understand how to use connection tags to reference data between blocks
</Card>
<Card title="Data Structure" href="/connections/data-structure">
Explore the output data structures of different block types
</Card>
<Card title="Accessing Data" href="/connections/accessing-data">
Learn techniques for accessing and manipulating connected data
</Card>
<Card title="Best Practices" href="/connections/best-practices">
Follow recommended patterns for effective connection management
</Card>
</Cards>

View File

@@ -1,4 +0,0 @@
{
"title": "Connections",
"pages": ["basics", "tags", "data-structure", "accessing-data", "best-practices"]
}

View File

@@ -1,110 +0,0 @@
---
title: Connection Tags
description: Using connection tags to reference data between blocks
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Video } from '@/components/ui/video'
Connection tags are visual representations of the data available from connected blocks. They provide an easy way to reference outputs from previous blocks in your workflow.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
### What Are Connection Tags?
Connection tags are interactive elements that appear when blocks are connected. They represent the data that can flow from one block to another and allow you to:
- Visualize available data from source blocks
- Reference specific data fields in destination blocks
- Create dynamic data flows between blocks
<Callout type="info">
Connection tags make it easy to see what data is available from previous blocks and use it in your
current block without having to remember complex data structures.
</Callout>
## Using Connection Tags
There are two primary ways to use connection tags in your workflows:
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Drag and Drop</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Click on a connection tag and drag it into input fields of destination blocks. A dropdown will
appear showing available values.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Hover over a connection tag to see available data</li>
<li>Click and drag the tag to an input field</li>
<li>Select the specific data field from the dropdown</li>
<li>The reference is inserted automatically</li>
</ol>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Angle Bracket Syntax</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Type <code>&lt;&gt;</code> in input fields to see a dropdown of available connection values
from previous blocks.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Click in any input field where you want to use connected data</li>
<li>
Type <code>&lt;&gt;</code> to trigger the connection dropdown
</li>
<li>Browse and select the data you want to reference</li>
<li>Continue typing or select from the dropdown to complete the reference</li>
</ol>
</div>
</div>
## Tag Syntax
Connection tags use a simple syntax to reference data:
```
<blockId.path.to.data>
```
Where:
- `blockId` is the identifier of the source block
- `path.to.data` is the path to the specific data field
For example:
- `<agent1.content>` - References the content field from a block with ID "agent1"
- `<api2.data.users[0].name>` - References the name of the first user in the users array from the data field of a block with ID "api2"
## Dynamic Tag References
Connection tags are evaluated at runtime, which means:
1. They always reference the most current data
2. They can be used in expressions and combined with static text
3. They can be nested within other data structures
### Examples
```javascript
// Reference in text
"The user's name is <userBlock.name>"
// Reference in JSON
{
"userName": "<userBlock.name>",
"orderTotal": <apiBlock.data.total>
}
// Reference in code
const greeting = "Hello, <userBlock.name>!";
const total = <apiBlock.data.total> * 1.1; // Add 10% tax
```
<Callout type="warning">
When using connection tags in numeric contexts, make sure the referenced data is actually a number
to avoid type conversion issues.
</Callout>

View File

@@ -1,214 +0,0 @@
---
title: Logging and Cost Calculation
description: Understanding workflow logs and how execution costs are calculated in Sim
---
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
Sim provides comprehensive logging for workflow executions and automatic cost calculation for AI model usage.
## Logging System
Sim offers two complementary logging interfaces:
### Real-Time Console (Manual Executions)
During manual workflow execution, logs appear in real-time in the Console panel on the right side of the workflow editor:
<ThemeImage
lightSrc="/static/light/console-panel-light.png"
darkSrc="/static/dark/console-panel-dark.png"
alt="Real-time Console Panel"
width={600}
height={400}
/>
The console shows:
- Block execution progress with active block highlighting
- Real-time outputs as blocks complete
- Execution timing for each block
- Success/error status indicators
### Logs Page (All Executions)
All workflow executions—whether triggered manually, via API, Chat, Schedule, or Webhook—are logged to the dedicated Logs page:
<ThemeImage
lightSrc="/static/light/logs-page-light.png"
darkSrc="/static/dark/logs-page-dark.png"
alt="Logs Page"
width={600}
height={400}
/>
The Logs page provides:
- Comprehensive filtering by time range, status, trigger type, folder, and workflow
- Search functionality across all logs
- Live mode for real-time updates
- 7-day log retention (upgradeable for longer retention)
## Log Details Sidebar
Clicking on any log entry opens a detailed sidebar view:
<ThemeImage
lightSrc="/static/light/logs-sidebar-light.png"
darkSrc="/static/dark/logs-sidebar-dark.png"
alt="Logs Sidebar Details"
width={600}
height={400}
/>
### Block Input/Output
View the complete data flow for each block with tabs to switch between:
<Tabs items={['Output', 'Input']}>
<Tab>
**Output Tab** shows the block's execution result:
- Structured data with JSON formatting
- Markdown rendering for AI-generated content
- Copy button for easy data extraction
</Tab>
<Tab>
**Input Tab** displays what was passed to the block:
- Resolved variable values
- Referenced outputs from other blocks
- Environment variables used
- API keys are automatically redacted for security
</Tab>
</Tabs>
### Execution Timeline
For workflow-level logs, view detailed execution metrics:
- Start and end timestamps
- Total workflow duration
- Individual block execution times
- Performance bottleneck identification
### Model Breakdown
For workflows using AI blocks, expand the Model Breakdown section to see:
<ThemeImage
lightSrc="/static/light/model-breakdown-light.png"
darkSrc="/static/dark/model-breakdown-dark.png"
alt="Model Breakdown"
width={600}
height={400}
/>
- **Token Usage**: Input and output token counts for each model
- **Cost Breakdown**: Individual costs per model and operation
- **Model Distribution**: Which models were used and how many times
- **Total Cost**: Aggregate cost for the entire workflow execution
### Workflow Snapshot
For any logged execution, click "View Snapshot" to see the exact workflow state at execution time:
<ThemeImage
lightSrc="/static/light/workflow-snapshot-light.png"
darkSrc="/static/dark/workflow-snapshot-dark.png"
alt="Workflow Snapshot"
width={600}
height={400}
/>
The snapshot provides:
- Frozen canvas showing the workflow structure
- Block states and connections as they were during execution
- Click any block to see its inputs and outputs
- Useful for debugging workflows that have since been modified
<Callout type="info">
Workflow snapshots are only available for executions after the enhanced logging system was introduced. Older migrated logs show a "Logged State Not Found" message.
</Callout>
## Cost Calculation
Sim automatically calculates costs for all AI model usage:
### How Costs Are Calculated
Every workflow execution includes two cost components:
**Base Execution Charge**: $0.001 per execution
**AI Model Usage**: Variable cost based on token consumption
```javascript
modelCost = (inputTokens × inputPrice + outputTokens × outputPrice) / 1,000,000
totalCost = baseExecutionCharge + modelCost
```
<Callout type="info">
AI model prices are per million tokens. The calculation divides by 1,000,000 to get the actual cost. Workflows without AI blocks only incur the base execution charge.
</Callout>
### Pricing Options
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
<Tab>
**Hosted Models** - Sim provides API keys with a 2.5x pricing multiplier:
| Model | Base Price (Input/Output) | Hosted Price (Input/Output) |
|-------|---------------------------|----------------------------|
| GPT-4o | $2.50 / $10.00 | $6.25 / $25.00 |
| GPT-4.1 | $2.00 / $8.00 | $5.00 / $20.00 |
| o1 | $15.00 / $60.00 | $37.50 / $150.00 |
| o3 | $2.00 / $8.00 | $5.00 / $20.00 |
| Claude 3.5 Sonnet | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Opus 4.0 | $15.00 / $75.00 | $37.50 / $187.50 |
*The 2.5x multiplier covers infrastructure and API management costs.*
</Tab>
<Tab>
**Your Own API Keys** - Use any model at base pricing:
| Provider | Models | Input / Output |
|----------|---------|----------------|
| Google | Gemini 2.5 | $0.15 / $0.60 |
| Deepseek | V3, R1 | $0.75 / $1.00 |
| xAI | Grok 4, Grok 3 | $5.00 / $25.00 |
| Groq | Llama 4 Scout | $0.40 / $0.60 |
| Cerebras | Llama 3.3 70B | $0.94 / $0.94 |
| Ollama | Local models | Free |
*Pay providers directly with no markup*
</Tab>
</Tabs>
<Callout type="warning">
Pricing shown reflects rates as of July 14, 2025. Check provider documentation for current pricing.
</Callout>
### Cost Optimization
<Accordions>
<Accordion title="Model Selection">
Choose models based on task complexity. Simple tasks can use GPT-4.1-nano ($0.10/$0.40) while complex reasoning might need o1 or Claude Opus.
</Accordion>
<Accordion title="Prompt Engineering">
Well-structured, concise prompts reduce token usage without sacrificing quality.
</Accordion>
<Accordion title="Local Models">
Use Ollama for non-critical tasks to eliminate API costs entirely.
</Accordion>
</Accordions>
## Usage Monitoring
Monitor your usage and billing in Settings → Subscription:
- **Current Usage**: Real-time usage and costs for the current period
- **Usage Limits**: Plan limits with visual progress indicators
- **Billing Details**: Projected charges and minimum commitments
- **Plan Management**: Upgrade options and billing history

View File

@@ -1,243 +0,0 @@
---
title: Execution Basics
description: Understanding the fundamental execution flow in Sim
---
import { Callout } from 'fumadocs-ui/components/callout'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
import {
AgentIcon,
ApiIcon,
ChartBarIcon,
CodeIcon,
ConditionalIcon,
ConnectIcon,
ResponseIcon,
StarterIcon,
LoopIcon,
ParallelIcon,
} from '@/components/icons'
import { Video } from '@/components/ui/video'
When you run a workflow in Sim, the execution engine follows a systematic process to ensure blocks are executed in the correct order with proper data flow.
## Execution Flow
The execution engine runs workflows in layers, processing blocks based on their dependencies:
<Steps>
<Step>
<strong>Validation</strong>: Ensures the workflow has a starter block with no incoming connections and all blocks are properly connected.
</Step>
<Step>
<strong>Layer-based Execution</strong>: Identifies which blocks can execute next based on completed dependencies and executes them in parallel.
</Step>
<Step>
<strong>Path Updates</strong>: Router and Condition blocks update the active execution path, determining which blocks execute next.
</Step>
<Step>
<strong>Iteration Processing</strong>: Loop and Parallel blocks manage iterations and create virtual instances for concurrent execution.
</Step>
<Step>
<strong>Result Collection</strong>: Outputs from the final blocks are collected and returned as the workflow result.
</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={<StarterIcon 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."
/>
<File
name="Loop Block"
icon={<LoopIcon className="h-4 w-4" />}
annotation="Executes blocks repeatedly for a fixed number of iterations or over a collection. Manages iteration state and provides access to current item."
/>
<File
name="Parallel Block"
icon={<ParallelIcon className="h-4 w-4" />}
annotation="Executes blocks concurrently across multiple instances. Distributes work based on count or collection for faster processing."
/>
</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."
/>
<File
name="Workflow Block"
icon={<ConnectIcon className="h-4 w-4" />}
annotation="Execute nested workflows as a single block. Allows modular workflow design by embedding one workflow inside another."
/>
</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="Knowledge Base Block"
icon={
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L3 9V20C3 20.55 3.45 21 4 21H9V14H15V21H20C20.55 21 21 20.55 21 20V9L12 2Z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
<circle cx="12" cy="10" r="2" stroke="currentColor" strokeWidth="2"/>
</svg>
}
annotation="Search and interact with knowledge bases. Performs semantic search, retrieves documents, and manages knowledge data."
/>
<File
name="Response Block"
icon={<ResponseIcon className="h-4 w-4" />}
annotation="Format and return responses from workflows. Configure response data, status codes, and headers."
/>
<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 offers multiple ways to trigger workflow execution:
### Manual Execution
Run workflows on-demand through the Sim interface by clicking the "Run" button. This is perfect for:
- Testing during development
- One-off tasks
- Workflows that need human supervision
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="input-format.mp4" />
</div>
### 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
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="configure-schedule.mp4" />
</div>
### 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
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="api-deployment.mp4" />
</div>
#### Viewing Deployed APIs
Monitor your deployed workflow APIs and their current state:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="api-redeployment.mp4" />
</div>
This shows how to view the deployed state and compare with the original deployed API configuration.
### Webhooks
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.)
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="webhooks.mp4" />
</div>
<Callout type="info">
The execution method you choose depends on your workflow's purpose. Manual execution is great for
development, while scheduled execution, API endpoints, and webhooks are better for production use
cases.
</Callout>
## Execution Context
Each workflow execution maintains a context that tracks:
- **Block States**: Outputs and execution status of each block
- **Execution Path**: Active blocks based on routing decisions
- **Loop/Parallel State**: Current iterations and distribution items
- **Environment Variables**: Configuration values available during execution
- **Execution Logs**: Detailed records of each block's execution
## Real-Time Monitoring
Monitor your workflow execution in real-time:
- **Active Block Highlighting**: Currently executing blocks pulse with animation
- **Live Logs**: Execution logs appear instantly in the logs panel
- **Block States**: Visual indicators show success, error, or pending states
- **Performance Metrics**: Execution time for each block
These monitoring features help you understand workflow behavior and quickly identify any issues.

View File

@@ -1,128 +0,0 @@
---
title: Execution
description: Understand how workflows are executed in Sim
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
Sim's execution engine brings your workflows to life by processing blocks in the correct order, managing data flow, and handling errors gracefully.
<Callout type="info">
Every workflow execution follows a deterministic path based on your block connections and logic, ensuring predictable and reliable results.
</Callout>
## Documentation Overview
<Cards>
<Card title="Execution Basics" href="/execution/basics">
Learn about the fundamental execution flow, block types, and how data flows through your
workflow
</Card>
<Card title="Logging and Cost Calculation" href="/execution/advanced">
Understand workflow logs and how execution costs are calculated in Sim
</Card>
</Cards>
## Key Concepts
### Topological Execution
Blocks execute in dependency order, similar to how a spreadsheet recalculates cells. The execution engine automatically determines which blocks can run based on completed dependencies.
### Path Tracking
The engine actively tracks execution paths through your workflow. Router and Condition blocks dynamically update these paths, ensuring only relevant blocks execute.
### Layer-Based Processing
Instead of executing blocks one-by-one, the engine identifies layers of blocks that can run in parallel, optimizing performance for complex workflows.
### Execution Context
Each workflow maintains a rich context during execution containing:
- Block outputs and states
- Active execution paths
- Loop and parallel iteration tracking
- Environment variables
- Routing decisions
## Execution Triggers
Workflows can be executed through multiple channels:
- **Manual**: Test and debug directly in the editor
- **Deploy as API**: Create an HTTP endpoint secured with API keys
- **Deploy as Chat**: Create a conversational interface on a custom subdomain
- **Webhooks**: Respond to external events from third-party services
- **Scheduled**: Run on a recurring schedule using cron expressions
### Deploy as API
When you deploy a workflow as an API, Sim:
- Creates a unique HTTP endpoint: `https://sim.ai/api/workflows/{workflowId}/execute`
- Generates an API key for authentication
- Accepts POST requests with JSON payloads
- Returns workflow execution results as JSON
Example API call:
```bash
curl -X POST https://sim.ai/api/workflows/your-workflow-id/execute \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"input": "your data here"}'
```
### Deploy as Chat
Chat deployment creates a conversational interface for your workflow:
- Hosted on a custom subdomain: `https://your-name.sim.ai`
- Optional authentication (public, password, or email-based)
- Customizable UI with your branding
- Streaming responses for real-time interaction
- Perfect for AI assistants, support bots, or interactive tools
Each deployment method passes data to your workflow's starter block, beginning the execution flow.
## Programmatic Execution
Execute workflows from your applications using our official SDKs:
```bash
# TypeScript/JavaScript
npm install simstudio-ts-sdk
# Python
pip install simstudio-sdk
```
```typescript
// TypeScript Example
import { SimStudioClient } from 'simstudio-ts-sdk';
const client = new SimStudioClient({
apiKey: 'your-api-key'
});
const result = await client.executeWorkflow('workflow-id', {
input: { message: 'Hello' }
});
```
## Best Practices
### Design for Reliability
- Handle errors gracefully with appropriate fallback paths
- Use environment variables for sensitive data
- Add logging to Function blocks for debugging
### Optimize Performance
- Minimize external API calls where possible
- Use parallel execution for independent operations
- Cache results with Memory blocks when appropriate
### Monitor Executions
- Review logs regularly to understand performance patterns
- Track costs for AI model usage
- Use workflow snapshots to debug issues
## What's Next?
Start with [Execution Basics](/execution/basics) to understand how workflows run, then explore [Logging and Cost Calculation](/execution/advanced) to monitor and optimize your executions.

View File

@@ -1,4 +0,0 @@
{
"title": "Execution",
"pages": ["basics", "advanced"]
}

View File

@@ -1,195 +0,0 @@
---
title: Getting Started
description: Build your first AI workflow in 5 minutes
---
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 { ThemeImage } from '@/components/ui/theme-image'
import {
AgentIcon,
ApiIcon,
ChartBarIcon,
CodeIcon,
ConditionalIcon,
ConnectIcon,
ExaAIIcon,
FirecrawlIcon,
GmailIcon,
NotionIcon,
PerplexityIcon,
SlackIcon,
} from '@/components/icons'
import { Video } from '@/components/ui/video'
This tutorial will guide you through building your first AI workflow in Sim. We'll create a people research agent that can find information about individuals using state-of-the-art LLM-Search tools.
<Callout type="info">
This tutorial takes about 10 minutes and covers the essential concepts of building workflows in Sim.
</Callout>
## What We're Building
A people research agent that:
1. Receives a person's name via chat interface
2. Uses an AI agent with advanced search capabilities
3. Searches the web using state-of-the-art LLM-Search tools (Exa and Linkup)
4. Extracts structured information using a response format
5. Returns comprehensive data about the person
<ThemeImage
lightSrc="/static/examples/started/started-1.png"
darkSrc="/static/examples/started/started-1.png"
alt="Getting Started Example"
width={800}
height={500}
/>
## Step-by-Step Tutorial
<Steps>
<Step title="Create workflow and add AI agent">
Open Sim and click "New Workflow" in the dashboard. Name it "Getting Started".
When you create a new workflow, it automatically includes a **Start block** - this is the entry point that receives input from users. For this example, we'll be triggering the workflow via chat, so we don't need to configure anything on the Start block.
Now drag an **Agent Block** onto the canvas from the blocks panel on the left.
Configure the Agent Block:
- **Model**: Select "OpenAI GPT-4o"
- **System Prompt**: "You are a people research agent. When given a person's name, use your available search tools to find comprehensive information about them including their location, profession, educational background, and other relevant details."
- **User Prompt**: Drag the connection from the Start block's output into this field (this connects `<start.input>` to the user prompt)
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="examples/started-2.mp4" />
</div>
</Step>
<Step title="Add tools to the agent">
Let's enhance our agent with tools for better capabilities. Click on the Agent block to select it.
In the **Tools** section:
- Click **Add Tool**
- Select **Exa** from the available tools
- Select **Linkup** from the available tools
- Add your API keys for both tools (this allows the agent to search the web and access additional information)
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<Video src="examples/started-3.mp4" />
</div>
</Step>
<Step title="Test the basic workflow">
Now let's test our workflow. Go to the **Chat panel** on the right side of the screen.
In the chat panel:
- Click the dropdown and select `agent1.content` (this will show us the output of our agent)
- Enter a test message like: "John is a software engineer from San Francisco who studied Computer Science at Stanford University."
- Click "Send" to run the workflow
You should see the agent's response analyzing the person described in your text.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="examples/started-4.mp4" />
</div>
</Step>
<Step title="Add structured output">
Now let's make our agent return structured data. Click on the Agent block to select it.
In the **Response Format** section:
- Click the **magic wand icon** (✨) next to the schema field
- In the prompt that appears, type: "create a schema named person, that contains location, profession, and education"
- The AI will generate a JSON schema for you automatically
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="examples/started-5.mp4" />
</div>
</Step>
<Step title="Test the structured output">
Go back to the **Chat panel**.
Since we added a response format, new output options are now available:
- Click the dropdown and select the new structured output option (the schema we just created)
- Enter a new test message like: "Sarah is a marketing manager from New York who has an MBA from Harvard Business School."
- Click "Send" to run the workflow again
You should now see structured JSON output with the person's information organized into location, profession, and education fields.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="examples/started-6.mp4" />
</div>
</Step>
</Steps>
## What You Just Built
Congratulations! You've created your first AI workflow that:
- ✅ Receives text input via chat interface
- ✅ Uses AI to extract information from unstructured text
- ✅ Integrates external tools (Exa and Linkup) for enhanced capabilities
- ✅ Returns structured JSON data using AI-generated schemas
- ✅ Demonstrates workflow testing and iteration
- ✅ Shows the power of visual workflow building
## Key Concepts You Learned
### Block Types Used
<Files>
<File
name="Start Block"
icon={<ConnectIcon className="h-4 w-4" />}
annotation="Entry point for user input (auto-included)"
/>
<File
name="Agent Block"
icon={<AgentIcon className="h-4 w-4" />}
annotation="AI model for text processing and analysis"
/>
</Files>
### Core Workflow Concepts
**Data Flow**: Variables flow between blocks by dragging connections
**Chat Interface**: Test workflows in real-time using the chat panel with different output options
**Tool Integration**: Enhance agent capabilities by adding external tools like Exa and Linkup
**Variable References**: Access block outputs using `<blockName.output>` syntax
**Structured Output**: Use JSON schemas to get consistent, structured data from AI
**AI-Generated Schemas**: Use the magic wand (✨) to generate schemas with natural language
**Iterative Development**: Test, modify, and re-test workflows easily
## Next Steps
<Cards>
<Card title="Add More Blocks" href="/blocks">
Learn about API, Function, and Condition blocks
</Card>
<Card title="Use Tools" href="/tools">
Integrate with external services like Gmail, Slack, and Notion
</Card>
<Card title="Add Custom Logic" href="/blocks/function">
Use Function blocks for custom data processing
</Card>
<Card title="Deploy Your Workflow" href="/execution">
Make your workflow accessible via REST API
</Card>
</Cards>
## Need Help?
**Stuck on a step?** Check our [Blocks documentation](/blocks) for detailed explanations of each component.
**Want to see more examples?** Browse our [Tools documentation](/tools) to see what integrations are available.
**Ready to deploy?** Learn about [Execution and Deployment](/execution) to make your workflows live.

View File

@@ -1,94 +0,0 @@
---
title: Introduction
description: Build AI workflows visually without code
---
import { Card, Cards } from 'fumadocs-ui/components/card'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
import { Features } from '@/components/ui/features'
Sim is a visual workflow editor that enables you to build AI-powered applications by connecting blocks on a canvas. Drag and drop components to create chatbots, automation workflows, and data processing pipelines without writing code.
## What Makes Sim Powerful
**Multi-Model AI Support** - Connect to OpenAI, Anthropic, Google, Groq, Cerebras, and local models through Ollama. Switch providers without rebuilding workflows.
**60+ Pre-Built Tools** - Gmail, Slack, Notion, Google Sheets, Airtable, Supabase, Pinecone, and more. Extensible architecture allows custom tool integration.
**Flexible Execution** - Run workflows via chat interface, REST API, webhooks, scheduled jobs, or trigger from external systems.
**Production Deployment** - Deploy as APIs, integrate with existing systems using our SDK, or embed as plugins. Built-in monitoring, logging, and error handling.
**Real-time Collaboration** - Work simultaneously with team members on the same workflow, like Google Docs for AI development.
Connect multiple AI models, integrate with 60+ services, and deploy production-ready applications through an intuitive visual interface designed specifically for AI development.
## Core Building Blocks
**Processing Blocks**
- **Agent** - Execute AI model inference with any LLM provider
- **API** - Connect to REST endpoints and external services
- **Function** - Run custom JavaScript for data processing
**Logic Blocks**
- **Condition** - Create branching logic based on data evaluation
- **Router** - Route execution paths using AI-powered decision making
- **Loop** - Iterate over collections sequentially
- **Parallel** - Execute multiple operations concurrently
**Output Blocks**
- **Response** - Format and return final workflow results
- **Evaluator** - Validate outputs against defined criteria
## Built-in Integrations
**AI Models**: OpenAI, Anthropic, Google, Groq, Cerebras, Ollama
**Communication**: Gmail, Slack, Telegram, WhatsApp, Microsoft Teams
**Data Sources**: Notion, Google Sheets, Airtable, Supabase, Pinecone
**Web Services**: Firecrawl, Google Search, Exa AI, Perplexity
**Development**: GitHub, Jira, Linear, browser automation
## Use Cases
**AI Assistants** - Build chatbots with web search, calendar access, and email capabilities
**Content Generation** - Create blog posts, social media content, and marketing materials
**Data Processing** - Extract insights from documents, analyze datasets, and generate reports
**Process Automation** - Automate business workflows with event-driven triggers
**API Orchestration** - Combine multiple services into unified endpoints
## Key Features
**Multi-Provider AI Support** - Switch between OpenAI, Anthropic, Google, and local models without rebuilding workflows
**Real-time Collaboration** - Work simultaneously with team members on the same workflow
**Production-Ready** - Built-in error handling, logging, and monitoring for production deployments
**Local Development** - Test with Ollama locally, then deploy with cloud providers
## Getting Started
Ready to build your first workflow? Our [Getting Started guide](/getting-started) will walk you through creating a customer support assistant in under 10 minutes.
<Cards>
<Card title="Getting Started" href="/getting-started">
Build your first workflow
</Card>
<Card title="Blocks" href="/blocks">
Learn about workflow components
</Card>
<Card title="Tools" href="/tools">
Explore integrations
</Card>
</Cards>

View File

@@ -1,4 +0,0 @@
{
"title": "Introduction",
"pages": ["index"]
}

View File

@@ -1,23 +0,0 @@
{
"title": "Sim Documentation",
"pages": [
"---Introduction---",
"./introduction/index",
"./getting-started/index",
"---Create---",
"triggers",
"blocks",
"tools",
"---Connections---",
"connections",
"---Execution---",
"execution",
"---Advanced---",
"./variables/index",
"yaml",
"---SDKs---",
"./sdks/python",
"./sdks/typescript"
],
"defaultOpen": true
}

View File

@@ -1,409 +0,0 @@
---
title: Python SDK
description: The official Python SDK for Sim
---
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 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://sim.ai" # optional, defaults to https://sim.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://sim.ai")
```
**Parameters:**
- `api_key` (str): Your Sim API key
- `base_url` (str, optional): Base URL for the Sim 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://sim.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://sim.ai")
)
```
</Tab>
</Tabs>
## Getting Your API Key
<Steps>
<Step title="Log in to Sim">
Navigate to [Sim](https://sim.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

View File

@@ -1,598 +0,0 @@
---
title: TypeScript/JavaScript SDK
description: The official TypeScript/JavaScript SDK for Sim
---
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 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://sim.ai' // optional, defaults to https://sim.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 API key
- `config.baseUrl` (string, optional): Base URL for the Sim API (defaults to `https://sim.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://sim.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://sim.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">
Navigate to [Sim](https://sim.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

View File

@@ -1,166 +0,0 @@
---
title: Airtable
description: Read, create, and update Airtable
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="airtable"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
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='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 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>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Airtable](https://airtable.com/) is a powerful cloud-based platform that combines the functionality of a database with the simplicity of a spreadsheet. It allows users to create flexible databases for organizing, storing, and collaborating on information.
With Airtable, you can:
- **Create custom databases**: Build tailored solutions for project management, content calendars, inventory tracking, and more
- **Visualize data**: View your information as a grid, kanban board, calendar, or gallery
- **Automate workflows**: Set up triggers and actions to automate repetitive tasks
- **Integrate with other tools**: Connect with hundreds of other applications through native integrations and APIs
In Sim, the Airtable integration enables your agents to interact with your Airtable bases programmatically. This allows for seamless data operations like retrieving information, creating new records, and updating existing data - all within your agent workflows. Use Airtable as a dynamic data source or destination for your agents, enabling them to access and manipulate structured information as part of their decision-making and task execution processes.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Airtable functionality to manage table records. List, get, create,
## Tools
### `airtable_list_records`
Read records from an Airtable table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseId` | string | Yes | ID of the Airtable base |
| `tableId` | string | Yes | ID of the table |
| `maxRecords` | number | No | Maximum number of records to return |
| `filterFormula` | string | No | Formula to filter records \(e.g., "\(\{Field Name\} = \'Value\'\)"\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `records` | json | Array of retrieved Airtable records |
### `airtable_get_record`
Retrieve a single record from an Airtable table by its ID
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseId` | string | Yes | ID of the Airtable base |
| `tableId` | string | Yes | ID or name of the table |
| `recordId` | string | Yes | ID of the record to retrieve |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `record` | json | Retrieved Airtable record with id, createdTime, and fields |
| `metadata` | json | Operation metadata including record count |
### `airtable_create_records`
Write new records to an Airtable table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseId` | string | Yes | ID of the Airtable base |
| `tableId` | string | Yes | ID or name of the table |
| `records` | json | Yes | Array of records to create, each with a `fields` object |
| `fields` | string | No | No description |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `records` | json | Array of created Airtable records |
### `airtable_update_record`
Update an existing record in an Airtable table by ID
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseId` | string | Yes | ID of the Airtable base |
| `tableId` | string | Yes | ID or name of the table |
| `recordId` | string | Yes | ID of the record to update |
| `fields` | json | Yes | An object containing the field names and their new values |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `record` | json | Updated Airtable record with id, createdTime, and fields |
| `metadata` | json | Operation metadata including record count and updated field names |
### `airtable_update_multiple_records`
Update multiple existing records in an Airtable table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseId` | string | Yes | ID of the Airtable base |
| `tableId` | string | Yes | ID or name of the table |
| `records` | json | Yes | Array of records to update, each with an `id` and a `fields` object |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `records` | json | Array of updated Airtable records |
## Notes
- Category: `tools`
- Type: `airtable`

View File

@@ -1,114 +0,0 @@
---
title: ArXiv
description: Search and retrieve academic papers from ArXiv
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="arxiv"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon" id='logomark' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17.732 24.269'>
<g id='tiny'>
<path
d='M573.549,280.916l2.266,2.738,6.674-7.84c.353-.47.52-.717.353-1.117a1.218,1.218,0,0,0-1.061-.748h0a.953.953,0,0,0-.712.262Z'
transform='translate(-566.984 -271.548)'
fill='#bdb9b4'
/>
<path
d='M579.525,282.225l-10.606-10.174a1.413,1.413,0,0,0-.834-.5,1.09,1.09,0,0,0-1.027.66c-.167.4-.047.681.319,1.206l8.44,10.242h0l-6.282,7.716a1.336,1.336,0,0,0-.323,1.3,1.114,1.114,0,0,0,1.04.69A.992.992,0,0,0,571,293l8.519-7.92A1.924,1.924,0,0,0,579.525,282.225Z'
transform='translate(-566.984 -271.548)'
fill='#b31b1b'
/>
<path
d='M584.32,293.912l-8.525-10.275,0,0L573.53,280.9l-1.389,1.254a2.063,2.063,0,0,0,0,2.965l10.812,10.419a.925.925,0,0,0,.742.282,1.039,1.039,0,0,0,.953-.667A1.261,1.261,0,0,0,584.32,293.912Z'
transform='translate(-566.984 -271.548)'
fill='#bdb9b4'
/>
</g>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[ArXiv](https://arxiv.org/) is a free, open-access repository of scientific research papers in fields such as physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering, systems science, and economics. ArXiv provides a vast collection of preprints and published articles, making it a primary resource for researchers and practitioners worldwide.
With ArXiv, you can:
- **Search for academic papers**: Find research by keywords, author names, titles, categories, and more
- **Retrieve paper metadata**: Access abstracts, author lists, publication dates, and other bibliographic information
- **Download full-text PDFs**: Obtain the complete text of most papers for in-depth study
- **Explore author contributions**: View all papers by a specific author
- **Stay up-to-date**: Discover the latest submissions and trending topics in your field
In Sim, the ArXiv integration enables your agents to programmatically search, retrieve, and analyze scientific papers from ArXiv. This allows you to automate literature reviews, build research assistants, or incorporate up-to-date scientific knowledge into your agentic workflows. Use ArXiv as a dynamic data source for research, discovery, and knowledge extraction within your Sim projects.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Search for academic papers, retrieve metadata, download papers, and access the vast collection of scientific research on ArXiv.
## Tools
### `arxiv_search`
Search for academic papers on ArXiv by keywords, authors, titles, or other fields.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `searchQuery` | string | Yes | The search query to execute |
| `searchField` | string | No | Field to search in: all, ti \(title\), au \(author\), abs \(abstract\), co \(comment\), jr \(journal\), cat \(category\), rn \(report number\) |
| `maxResults` | number | No | Maximum number of results to return \(default: 10, max: 2000\) |
| `sortBy` | string | No | Sort by: relevance, lastUpdatedDate, submittedDate \(default: relevance\) |
| `sortOrder` | string | No | Sort order: ascending, descending \(default: descending\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `papers` | json | Array of papers matching the search query |
### `arxiv_get_paper`
Get detailed information about a specific ArXiv paper by its ID.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `paperId` | string | Yes | ArXiv paper ID \(e.g., "1706.03762"\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `paper` | json | Detailed information about the requested ArXiv paper |
### `arxiv_get_author_papers`
Search for papers by a specific author on ArXiv.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `authorName` | string | Yes | Author name to search for |
| `maxResults` | number | No | Maximum number of results to return \(default: 10, max: 2000\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `authorPapers` | json | Array of papers authored by the specified author |
## Notes
- Category: `tools`
- Type: `arxiv`

View File

@@ -1,95 +0,0 @@
---
title: Browser Use
description: Run browser automation tasks
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="browser_use"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
version='1.0'
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 150 150'
preserveAspectRatio='xMidYMid meet'
>
<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
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
-532 55z m459 -235 c88 -23 96 -51 22 -79 -29 -11 -84 -47 -121 -80 -57 -50
-84 -59 -178 -59 -147 0 -190 -44 -238 -241 -102 -424 -230 -440 -230 -29 1
417 289 606 745 488z m1046 -18 c174 -85 266 -309 239 -582 -26 -256 -165
-165 -230 151 -73 356 -469 332 -954 -58 -587 -472 -829 -1251 -388 -1251 108
0 126 -7 214 -80 54 -44 104 -80 113 -80 54 0 -2 -43 -89 -69 -220 -66 -426
-22 -568 120 -599 599 871 2232 1663 1849z m-234 -510 c969 -1036 357 -1962
-787 -1190 -254 171 -348 303 -323 454 21 128 40 123 231 -59 691 -658 1362
-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'
/>
</g>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[BrowserUse](https://browser-use.com/) is a powerful browser automation platform that enables you to create and run browser tasks programmatically. It provides a way to automate web interactions through natural language instructions, allowing you to navigate websites, fill forms, extract data, and perform complex sequences of actions without writing code.
With BrowserUse, you can:
- **Automate web interactions**: Navigate to websites, click buttons, fill forms, and perform other browser actions
- **Extract data**: Scrape content from websites, including text, images, and structured data
- **Execute complex workflows**: Chain multiple actions together to complete sophisticated web tasks
- **Monitor task execution**: Watch browser tasks run in real-time with visual feedback
- **Process results programmatically**: Receive structured output from web automation tasks
In Sim, the BrowserUse integration allows your agents to interact with the web as if they were human users. This enables scenarios like research, data collection, form submission, and web testing - all through simple natural language instructions. Your agents can gather information from websites, interact with web applications, and perform actions that would typically require manual browsing, expanding their capabilities to include the entire web as a resource.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Execute browser automation tasks with BrowserUse to navigate the web, scrape data, and perform actions as if a real user was interacting with the browser. The task runs asynchronously and the block will poll for completion before returning results.
## Tools
### `browser_use_run_task`
Runs a browser automation task using BrowserUse
#### Input
| 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\}\) |
| `format` | string | No | No description |
| `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 |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Task execution identifier |
| `success` | boolean | Task completion status |
| `output` | json | Task output data |
| `steps` | json | Execution steps taken |
## Notes
- Category: `tools`
- Type: `browser_use`

View File

@@ -1,102 +0,0 @@
---
title: Confluence
description: Interact with Confluence
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="confluence"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
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'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Confluence](https://www.atlassian.com/software/confluence) is Atlassian's powerful team collaboration and knowledge management platform. It serves as a centralized workspace where teams can create, organize, and share information across departments and organizations.
With Confluence, you can:
- **Create structured documentation**: Build comprehensive wikis, project plans, and knowledge bases with rich formatting
- **Collaborate in real-time**: Work together on documents with teammates, with comments, mentions, and editing capabilities
- **Organize information hierarchically**: Structure content with spaces, pages, and nested hierarchies for intuitive navigation
- **Integrate with other tools**: Connect with Jira, Trello, and other Atlassian products for seamless workflow integration
- **Control access permissions**: Manage who can view, edit, or comment on specific content
In Sim, the Confluence integration enables your agents to access and leverage your organization's knowledge base. Agents can retrieve information from Confluence pages, search for specific content, and even update documentation when needed. This allows your workflows to incorporate the collective knowledge stored in your Confluence instance, making it possible to build agents that can reference internal documentation, follow established procedures, and maintain up-to-date information resources as part of their operations.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Connect to Confluence workspaces to retrieve and search documentation. Access page content, metadata, and integrate Confluence documentation into your workflows.
## Tools
### `confluence_retrieve`
Retrieve content from Confluence pages using the Confluence API.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Your Confluence domain \(e.g., yourcompany.atlassian.net\) |
| `pageId` | string | Yes | Confluence page ID to retrieve |
| `cloudId` | string | No | Confluence Cloud ID for the instance. If not provided, it will be fetched using the domain. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `ts` | string | Timestamp of retrieval |
| `pageId` | string | Confluence page ID |
| `content` | string | Page content with HTML tags stripped |
| `title` | string | Page title |
### `confluence_update`
Update a Confluence page using the Confluence API.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Your Confluence domain \(e.g., yourcompany.atlassian.net\) |
| `pageId` | string | Yes | Confluence page ID to update |
| `title` | string | No | New title for the page |
| `content` | string | No | New content for the page in Confluence storage format |
| `version` | number | No | Version number of the page \(required for preventing conflicts\) |
| `cloudId` | string | No | Confluence Cloud ID for the instance. If not provided, it will be fetched using the domain. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `ts` | string | Timestamp of update |
| `pageId` | string | Confluence page ID |
| `title` | string | Updated page title |
| `success` | boolean | Update operation success status |
## Notes
- Category: `tools`
- Type: `confluence`

View File

@@ -1,146 +0,0 @@
---
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, 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 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 | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Discord message data |
### `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 | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `messages` | array | Array of Discord messages with full metadata |
### `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 | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Discord server \(guild\) information |
### `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 | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Discord user information |
## Notes
- Category: `tools`
- Type: `discord`

View File

@@ -1,72 +0,0 @@
---
title: ElevenLabs
description: Convert TTS using ElevenLabs
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
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' />
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[ElevenLabs](https://elevenlabs.io/) is a state-of-the-art text-to-speech platform that creates incredibly natural and expressive AI voices. It offers some of the most realistic and emotionally nuanced synthetic voices available today, making it ideal for creating lifelike audio content.
With ElevenLabs, you can:
- **Generate natural-sounding speech**: Create audio that's nearly indistinguishable from human speech
- **Choose from diverse voice options**: Access a library of pre-made voices with different accents, tones, and characteristics
- **Clone voices**: Create custom voices based on audio samples (with proper permissions)
- **Control speech parameters**: Adjust stability, clarity, and emotional tone to fine-tune output
- **Add realistic emotions**: Incorporate natural-sounding emotions like happiness, sadness, or excitement
In Sim, the ElevenLabs integration enables your agents to convert text to lifelike speech, enhancing the interactivity and engagement of your applications. This is particularly valuable for creating voice assistants, generating audio content, developing accessible applications, or building conversational interfaces that feel more human. The integration allows you to seamlessly incorporate ElevenLabs' advanced speech synthesis capabilities into your agent workflows, bridging the gap between text-based AI and natural human communication.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Generate realistic speech from text using ElevenLabs voices.
## Tools
### `elevenlabs_tts`
Convert TTS using ElevenLabs voices
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `text` | string | Yes | The text to convert to speech |
| `voiceId` | string | Yes | The ID of the voice to use |
| `modelId` | string | No | The ID of the model to use \(defaults to eleven_monolingual_v1\) |
| `apiKey` | string | Yes | Your ElevenLabs API key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `audioUrl` | string | The URL of the generated audio |
## Notes
- Category: `tools`
- Type: `elevenlabs`

View File

@@ -1,82 +0,0 @@
---
title: File
description: Read and parse multiple files
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
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'
>
<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'
/>
<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'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
The File Parser tool provides a powerful way to extract and process content from various file formats, making it easy to incorporate document data into your agent workflows. This tool supports multiple file formats and can handle files up to 200MB in size.
With the File Parser, you can:
- **Process multiple file formats**: Extract text from PDFs, CSVs, Word documents (DOCX), text files, and more
- **Handle large files**: Process documents up to 200MB in size
- **Parse files from URLs**: Directly extract content from files hosted online by providing their URLs
- **Process multiple files at once**: Upload and parse several files in a single operation
- **Extract structured data**: Maintain formatting and structure from the original documents when possible
The File Parser tool is particularly useful for scenarios where your agents need to work with document content, such as analyzing reports, extracting data from spreadsheets, or processing text from various document sources. It simplifies the process of making document content available to your agents, allowing them to work with information stored in files just as easily as with direct text input.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Upload and extract contents from structured file formats including PDFs, CSV spreadsheets, and Word documents (DOCX). You can either provide a URL to a file or 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.
## Tools
### `file_parser`
Parse one or more uploaded files or files from URLs (text, PDF, CSV, images, etc.)
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `filePath` | string | Yes | Path to the file\(s\). Can be a single path, URL, or an array of paths. |
| `fileType` | string | No | Type of file to parse \(auto-detected if not specified\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `files` | array | Array of parsed files |
| `combinedContent` | string | Combined content of all parsed files |
## Notes
- Category: `tools`
- Type: `file`

View File

@@ -1,129 +0,0 @@
---
title: Firecrawl
description: Scrape or search the web
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="firecrawl"
color="#181C1E"
icon={true}
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)'
/>
<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)'
/>
<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)'
/>
<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)'
/>
<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)'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Firecrawl](https://firecrawl.dev/) is a powerful web scraping and content extraction API that integrates seamlessly into Sim, enabling developers to extract clean, structured content from any website. This integration provides a simple way to transform web pages into usable data formats like Markdown and HTML while preserving the essential content.
With Firecrawl in Sim, you can:
- **Extract clean content**: Remove ads, navigation elements, and other distractions to get just the main content
- **Convert to structured formats**: Transform web pages into Markdown, HTML, or JSON
- **Capture metadata**: Extract SEO metadata, Open Graph tags, and other page information
- **Handle JavaScript-heavy sites**: Process content from modern web applications that rely on JavaScript
- **Filter content**: Focus on specific parts of a page using CSS selectors
- **Process at scale**: Handle high-volume scraping needs with a reliable API
- **Search the web**: Perform intelligent web searches and retrieve structured results
- **Crawl entire sites**: Crawl multiple pages from a website and aggregate their content
In Sim, the Firecrawl integration enables your agents to access and process web content programmatically as part of their workflows. Supported operations include:
- **Scrape**: Extract structured content (Markdown, HTML, metadata) from a single web page.
- **Search**: Search the web for information using Firecrawl's intelligent search capabilities.
- **Crawl**: Crawl multiple pages from a website, returning structured content and metadata for each page.
This allows your agents to gather information from websites, extract structured data, and use that information to make decisions or generate insights—all without having to navigate the complexities of raw HTML parsing or browser automation. Simply configure the Firecrawl block with your API key, select the operation (Scrape, Search, or Crawl), and provide the relevant parameters. Your agents can immediately begin working with web content in a clean, structured format.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
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.
## Tools
### `firecrawl_scrape`
Extract structured content from web pages with comprehensive metadata support. Converts content to markdown or HTML while capturing SEO metadata, Open Graph tags, and page information.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | The URL to scrape content from |
| `scrapeOptions` | json | No | Options for content scraping |
| `apiKey` | string | Yes | Firecrawl API key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `markdown` | string | Page content in markdown format |
| `html` | string | Raw HTML content of the page |
| `metadata` | object | Page metadata including SEO and Open Graph information |
### `firecrawl_search`
Search for information on the web using Firecrawl
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | The search query to use |
| `apiKey` | string | Yes | Firecrawl API key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `data` | array | Search results data |
### `firecrawl_crawl`
Crawl entire websites and extract structured content from all accessible pages
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | The website URL to crawl |
| `limit` | number | No | Maximum number of pages to crawl \(default: 100\) |
| `onlyMainContent` | boolean | No | Extract only main content from pages |
| `apiKey` | string | Yes | Firecrawl API Key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `pages` | array | Array of crawled pages with their content and metadata |
## Notes
- Category: `tools`
- Type: `firecrawl`

View File

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

View File

@@ -1,135 +0,0 @@
---
title: GitHub
description: Interact with GitHub or trigger workflows from GitHub events
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
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>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[GitHub](https://github.com/) is the world's leading platform for software development and version control using Git. It provides a collaborative environment where developers can host and review code, manage projects, and build software together.
With GitHub, you can:
- **Host repositories**: Store your code in public or private repositories with version control
- **Collaborate on code**: Use pull requests to propose changes, review code, and merge contributions
- **Track issues**: Create, assign, and manage issues to organize work and track bugs
- **Automate workflows**: Use GitHub Actions to build, test, and deploy code automatically
- **Manage projects**: Organize work with project boards, milestones, and task tracking
- **Document code**: Create and maintain documentation with GitHub Pages and wikis
In Sim, the GitHub integration enables your agents to interact directly with GitHub repositories and workflows. This allows for powerful automation scenarios such as code review assistance, pull request management, issue tracking, and repository exploration. Your agents can fetch repository data, analyze code changes, post comments on pull requests, and perform other GitHub operations programmatically. This integration bridges the gap between your AI workflows and your development processes, enabling seamless collaboration between your agents and your development team.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Access GitHub repositories, pull requests, and comments through the GitHub API. Automate code reviews, PR management, and repository interactions within your workflow. Trigger workflows from GitHub events like push, pull requests, and issues.
## Tools
### `github_pr`
Fetch PR details including diff and files changed
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `owner` | string | Yes | Repository owner |
| `repo` | string | Yes | Repository name |
| `pullNumber` | number | Yes | Pull request number |
| `apiKey` | string | Yes | GitHub API token |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Human-readable PR summary |
| `metadata` | object | Detailed PR metadata including file changes |
### `github_comment`
Create comments on GitHub PRs
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `owner` | string | Yes | Repository owner |
| `repo` | string | Yes | Repository name |
| `body` | string | Yes | Comment content |
| `pullNumber` | number | Yes | Pull request number |
| `path` | string | No | File path for review comment |
| `position` | number | No | Line number for review comment |
| `commentType` | string | No | Type of comment \(pr_comment or file_comment\) |
| `line` | number | No | Line number for review comment |
| `side` | string | No | Side of the diff \(LEFT or RIGHT\) |
| `commitId` | string | No | The SHA of the commit to comment on |
| `apiKey` | string | Yes | GitHub API token |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Human-readable comment confirmation |
| `metadata` | object | Comment metadata |
### `github_repo_info`
Retrieve comprehensive GitHub repository metadata including stars, forks, issues, and primary language. Supports both public and private repositories with optional authentication.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `owner` | string | Yes | Repository owner \(user or organization\) |
| `repo` | string | Yes | Repository name |
| `apiKey` | string | Yes | GitHub Personal Access Token |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Human-readable repository summary |
| `metadata` | object | Repository metadata |
### `github_latest_commit`
Retrieve the latest commit from a GitHub repository
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `owner` | string | Yes | Repository owner \(user or organization\) |
| `repo` | string | Yes | Repository name |
| `branch` | string | No | Branch name \(defaults to the repository's default branch\) |
| `apiKey` | string | Yes | GitHub API token |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Human-readable commit summary |
| `metadata` | object | Commit metadata |
## Notes
- Category: `tools`
- Type: `github`

View File

@@ -1,147 +0,0 @@
---
title: Gmail
description: Send Gmail or trigger workflows from Gmail events
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="gmail"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
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' />
<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'
/>
<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'
/>
<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'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Gmail](https://gmail.com) is Google's popular email service that provides a robust platform for sending, receiving, and managing email communications. With over 1.8 billion active users worldwide, Gmail offers a feature-rich experience with powerful search capabilities, organizational tools, and integration options.
With Gmail, you can:
- **Send and receive emails**: Communicate with contacts through a clean, intuitive interface
- **Organize messages**: Use labels, folders, and filters to keep your inbox organized
- **Search efficiently**: Find specific messages quickly with Google's powerful search technology
- **Automate workflows**: Create filters and rules to automatically process incoming emails
- **Access from anywhere**: Use Gmail across devices with synchronized content and settings
- **Integrate with other services**: Connect with Google Calendar, Drive, and other productivity tools
In Sim, the Gmail integration enables your agents to send, read, and search emails programmatically. This allows for powerful automation scenarios such as sending notifications, processing incoming messages, extracting information from emails, and managing communication workflows. Your agents can compose and send personalized emails, search for specific messages using Gmail's query syntax, and extract content from emails to use in other parts of your workflow. Coming soon, agents will also be able to listen for new emails in real-time, enabling responsive workflows that can trigger actions based on incoming messages. This integration bridges the gap between your AI workflows and email communications, enabling seamless interaction with one of the world's most widely used communication platforms.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Comprehensive Gmail integration with OAuth authentication. Send email messages, read email content, and trigger workflows from Gmail events like new emails and label changes.
## Tools
### `gmail_send`
Send emails using Gmail
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `to` | string | Yes | Recipient email address |
| `subject` | string | Yes | Email subject |
| `body` | string | Yes | Email body content |
| `cc` | string | No | CC recipients \(comma-separated\) |
| `bcc` | string | No | BCC recipients \(comma-separated\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Success message |
| `metadata` | object | Email metadata |
### `gmail_draft`
Draft emails using Gmail
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `to` | string | Yes | Recipient email address |
| `subject` | string | Yes | Email subject |
| `body` | string | Yes | Email body content |
| `cc` | string | No | CC recipients \(comma-separated\) |
| `bcc` | string | No | BCC recipients \(comma-separated\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Success message |
| `metadata` | object | Draft metadata |
### `gmail_read`
Read emails from Gmail
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `messageId` | string | No | ID of the message to read |
| `folder` | string | No | Folder/label to read emails from |
| `unreadOnly` | boolean | No | Only retrieve unread messages |
| `maxResults` | number | No | Maximum number of messages to retrieve \(default: 1, max: 10\) |
| `includeAttachments` | boolean | No | Download and include email attachments |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Text content of the email |
| `metadata` | json | Metadata of the email |
| `attachments` | file[] | Attachments of the email |
### `gmail_search`
Search emails in Gmail
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | Search query for emails |
| `maxResults` | number | No | Maximum number of results to return |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Search results summary |
| `metadata` | object | Search metadata |
## Notes
- Category: `tools`
- Type: `gmail`

View File

@@ -1,209 +0,0 @@
---
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, 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' Google Calendar settings.
## Tools
### `google_calendar_create`
Create a new event in Google Calendar
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `content` | string | Event creation confirmation message |
| `metadata` | json | Created event metadata including ID, status, and details |
### `google_calendar_list`
List events from Google Calendar
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `content` | string | Summary of found events count |
| `metadata` | json | List of events with pagination tokens and event details |
### `google_calendar_get`
Get a specific event from Google Calendar
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
| `eventId` | string | Yes | Event ID to retrieve |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Event retrieval confirmation message |
| `metadata` | json | Event details including ID, status, times, and attendees |
### `google_calendar_quick_add`
Create events from natural language text
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
| `text` | string | Yes | Natural language text describing the event \(e.g., "Meeting with John tomorrow at 3pm"\) |
| `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 | Description |
| --------- | ---- | ----------- |
| `content` | string | Event creation confirmation message from natural language |
| `metadata` | json | Created event metadata including parsed details |
### `google_calendar_invite`
Invite attendees to an existing Google Calendar event
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `content` | string | Attendee invitation confirmation message with email delivery status |
| `metadata` | json | Updated event metadata including attendee list and details |
## Notes
- Category: `tools`
- Type: `google_calendar`

View File

@@ -1,149 +0,0 @@
---
title: Google Docs
description: Read, write, and create documents
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="google_docs"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
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'
/>
<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 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"
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 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"
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 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"
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
- **Collaborate in real-time**: Work simultaneously with multiple users on the same document
- **Track changes**: View revision history and restore previous versions
- **Comment and suggest**: Provide feedback and propose edits without changing the original content
- **Access anywhere**: Use Google Docs across devices with automatic cloud synchronization
- **Work offline**: Continue working without internet connection with changes syncing when back online
- **Integrate with other services**: Connect with Google Drive, Sheets, Slides, and third-party applications
In Sim, the Google Docs integration enables your agents to interact directly with document content programmatically. This allows for powerful automation scenarios such as document creation, content extraction, collaborative editing, and document management. Your agents can read existing documents to extract information, write to documents to update content, and create new documents from scratch. This integration bridges the gap between your AI workflows and document management, enabling seamless interaction with one of the world's most widely used document platforms. By connecting Sim with Google Docs, you can automate document workflows, generate reports, extract insights from documents, and maintain documentation - all through your intelligent agents.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Google Docs functionality to manage documents. Read content from existing documents, write to documents, and create new documents using OAuth authentication. Supports text content manipulation for document creation and editing.
## Tools
### `google_docs_read`
Read content from a Google Docs document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `documentId` | string | Yes | The ID of the document to read |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Extracted document text content |
| `metadata` | json | Document metadata including ID, title, and URL |
### `google_docs_write`
Write or update content in a Google Docs document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `documentId` | string | Yes | The ID of the document to write to |
| `content` | string | Yes | The content to write to the document |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `updatedContent` | boolean | Indicates if document content was updated successfully |
| `metadata` | json | Updated document metadata including ID, title, and URL |
### `google_docs_create`
Create a new Google Docs document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `title` | string | Yes | The title of the document to create |
| `content` | string | No | The content of the document to create |
| `folderSelector` | string | No | Select the folder to create the document in |
| `folderId` | string | No | The ID of the folder to create the document in \(internal use\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `metadata` | json | Created document metadata including ID, title, and URL |
## Notes
- Category: `tools`
- Type: `google_docs`

View File

@@ -1,145 +0,0 @@
---
title: Google Drive
description: Create, upload, and list files
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="google_drive"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
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'
/>
<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'
/>
<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'
/>
<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'
/>
<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'
/>
<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'
/>
</svg>`}
/>
{/* 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 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"
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
- **Organize content**: Create folders, use color coding, and implement naming conventions
- **Share and collaborate**: Control access permissions and work simultaneously on files
- **Search efficiently**: Find files quickly with Google's powerful search technology
- **Access across devices**: Use Google Drive on desktop, mobile, and web platforms
- **Integrate with other services**: Connect with Google Docs, Sheets, Slides, and third-party applications
In Sim, the Google Drive integration enables your agents to interact directly with your cloud storage programmatically. This allows for powerful automation scenarios such as file management, content organization, and document workflows. Your agents can upload new files to specific folders, download existing files to process their contents, and list folder contents to navigate your storage structure. This integration bridges the gap between your AI workflows and your document management system, enabling seamless file operations without manual intervention. By connecting Sim with Google Drive, you can automate file-based workflows, manage documents intelligently, and incorporate cloud storage operations into your agent's capabilities.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
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.
## Tools
### `google_drive_upload`
Upload a file to Google Drive
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `fileName` | string | Yes | The name of the file to upload |
| `content` | string | Yes | The content of the file to upload |
| `mimeType` | string | No | The MIME type of the file to upload |
| `folderSelector` | string | No | Select the folder to upload the file to |
| `folderId` | string | No | The ID of the folder to upload the file to \(internal use\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `file` | json | Uploaded file metadata including ID, name, and links |
### `google_drive_create_folder`
Create a new folder in Google Drive
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `fileName` | string | Yes | Name of the folder to create |
| `folderSelector` | string | No | Select the parent folder to create the folder in |
| `folderId` | string | No | ID of the parent folder \(internal use\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `file` | json | Created folder metadata including ID, name, and parent information |
### `google_drive_list`
List files and folders in Google Drive
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `folderSelector` | string | No | Select the folder to list files from |
| `folderId` | string | No | The ID of the folder to list files from \(internal use\) |
| `query` | string | No | A query to filter the files |
| `pageSize` | number | No | The number of files to return |
| `pageToken` | string | No | The page token to use for pagination |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `files` | json | Array of file metadata objects from the specified folder |
## Notes
- Category: `tools`
- Type: `google_drive`

View File

@@ -1,91 +0,0 @@
---
title: Google Search
description: Search the web
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="google_search"
color="#E0E0E0"
icon={true}
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'
/>
</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 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"
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
- **Get specific results**: Use search operators to refine and target your queries
- **Discover diverse content**: Find text, images, videos, news, and other content types
- **Access knowledge graphs**: Get structured information about people, places, and things
- **Utilize search features**: Take advantage of specialized search tools like calculators, unit converters, and more
In Sim, the Google Search integration enables your agents to search the web programmatically and incorporate search results into their workflows. This allows for powerful automation scenarios such as research, fact-checking, data gathering, and information synthesis. Your agents can formulate search queries, retrieve relevant results, and extract information from those results to make decisions or generate insights. This integration bridges the gap between your AI workflows and the vast information available on the web, enabling your agents to access up-to-date information from across the internet. By connecting Sim with Google Search, you can create agents that stay informed with the latest information, verify facts, conduct research, and provide users with relevant web content - all without leaving your workflow.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Searches the web using the Google Custom Search API, which provides high-quality search results from the entire internet or a specific site defined by a custom search engine ID.
## Tools
### `google_search`
Search the web with the Custom Search API
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | The search query to execute |
| `searchEngineId` | string | Yes | Custom Search Engine ID |
| `num` | string | No | Number of results to return \(default: 10, max: 10\) |
| `apiKey` | string | Yes | Google API key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `items` | array | Array of search results from Google |
## Notes
- Category: `tools`
- Type: `google_search`

View File

@@ -1,202 +0,0 @@
---
title: Google Sheets
description: Read, write, and update data
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="google_sheets"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
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'
/>
<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'
/>
</svg>`}
/>
{/* 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 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"
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 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"
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 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"
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 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"
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
- **Collaborate in real-time**: Work simultaneously with multiple users on the same spreadsheet
- **Analyze data**: Use formulas, functions, and pivot tables to process and understand your data
- **Visualize information**: Create charts, graphs, and conditional formatting to represent data visually
- **Access anywhere**: Use Google Sheets across devices with automatic cloud synchronization
- **Work offline**: Continue working without internet connection with changes syncing when back online
- **Integrate with other services**: Connect with Google Drive, Forms, and third-party applications
In Sim, the Google Sheets integration enables your agents to interact directly with spreadsheet data programmatically. This allows for powerful automation scenarios such as data extraction, analysis, reporting, and management. Your agents can read existing spreadsheets to extract information, write to spreadsheets to update data, and create new spreadsheets from scratch. This integration bridges the gap between your AI workflows and data management, enabling seamless interaction with structured data. By connecting Sim with Google Sheets, you can automate data workflows, generate reports, extract insights from data, and maintain up-to-date information - all through your intelligent agents. The integration supports various data formats and range specifications, making it flexible enough to handle diverse data management needs while maintaining the collaborative and accessible nature of Google Sheets.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Google Sheets functionality to manage spreadsheet data. Read data from specific ranges, write new data, update existing cells, and append data to the end of sheets using OAuth authentication. Supports various input and output formats for flexible data handling.
## Tools
### `google_sheets_read`
Read data from a Google Sheets spreadsheet
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to read from |
| `range` | string | No | The range of cells to read from |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `data` | json | Sheet data including range and cell values |
| `metadata` | json | Spreadsheet metadata including ID and URL |
### `google_sheets_write`
Write data to a Google Sheets spreadsheet
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `updatedRange` | string | Range of cells that were updated |
| `updatedRows` | number | Number of rows updated |
| `updatedColumns` | number | Number of columns updated |
| `updatedCells` | number | Number of cells updated |
| `metadata` | json | Spreadsheet metadata including ID and URL |
### `google_sheets_update`
Update data in a Google Sheets spreadsheet
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to update |
| `range` | string | No | The range of cells to update |
| `values` | array | Yes | The data to update in the spreadsheet |
| `valueInputOption` | string | No | The format of the data to update |
| `includeValuesInResponse` | boolean | No | Whether to include the updated values in the response |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `updatedRange` | string | Range of cells that were updated |
| `updatedRows` | number | Number of rows updated |
| `updatedColumns` | number | Number of columns updated |
| `updatedCells` | number | Number of cells updated |
| `metadata` | json | Spreadsheet metadata including ID and URL |
### `google_sheets_append`
Append data to the end of a Google Sheets spreadsheet
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to append to |
| `range` | string | No | The range of cells to append after |
| `values` | array | Yes | The data to append to the spreadsheet |
| `valueInputOption` | string | No | The format of the data to append |
| `insertDataOption` | string | No | How to insert the data \(OVERWRITE or INSERT_ROWS\) |
| `includeValuesInResponse` | boolean | No | Whether to include the appended values in the response |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `tableRange` | string | Range of the table where data was appended |
| `updatedRange` | string | Range of cells that were updated |
| `updatedRows` | number | Number of rows updated |
| `updatedColumns` | number | Number of columns updated |
| `updatedCells` | number | Number of cells updated |
| `metadata` | json | Spreadsheet metadata including ID and URL |
## Notes
- Category: `tools`
- Type: `google_sheets`

File diff suppressed because one or more lines are too long

View File

@@ -1,211 +0,0 @@
---
title: Hunter io
description: Find and verify professional email addresses
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="hunter"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
viewBox='0 0 20 19'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<path
d='M12.0671 8.43455C11.6625 8.55094 11.2164 8.55288 10.7992 8.53525C10.3141 8.51472 9.80024 8.45339 9.35223 8.25426C8.98359 8.09047 8.68787 7.79493 8.84262 7.36805C8.95175 7.06699 9.19361 6.79803 9.47319 6.64644C9.78751 6.4759 10.1329 6.50361 10.4474 6.65774C10.8005 6.83082 11.0942 7.11235 11.3604 7.3964C11.5 7.54536 11.6332 7.70002 11.7646 7.85617C11.8252 7.92801 12.2364 8.33865 12.0671 8.43455ZM18.7923 8.58131C18.17 8.43655 17.4348 8.4884 16.811 8.38867C15.8284 8.23146 14.3648 7.08576 13.5714 5.92122C13.0201 5.11202 12.757 4.28785 12.3356 3.28356C12.0415 2.58257 11.4001 0.365389 10.5032 1.40318C10.1339 1.83057 9.7204 3.23752 9.41837 3.2177C9.19467 3.26971 9.15818 2.83371 9.08739 2.64738C8.95886 2.30903 8.89071 1.9176 8.7185 1.59854C8.58086 1.34353 8.40014 1.03806 8.12337 0.91412C7.63027 0.660572 7.03575 1.42476 6.74072 2.33095C6.61457 2.81687 5.76653 3.75879 5.39721 3.9866C3.71684 5.02352 0.344233 6.11595 0.000262184 9.75358C-0.00114142 9.76867 0.000262182 9.81455 0.0573714 9.77323C0.459591 9.48197 5.02183 6.19605 2.09392 12.5476C0.300195 16.439 8.96062 18.917 9.40582 18.9271C9.46582 18.9284 9.46144 18.9011 9.46347 18.8832C10.1546 12.6724 16.9819 13.3262 18.5718 11.8387C20.1474 10.3649 20.1796 8.93816 18.7923 8.58131Z'
fill='#FA5320'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Hunter.io](https://hunter.io/) is a leading platform for finding and verifying professional email addresses, discovering companies, and enriching contact data. Hunter.io provides robust APIs for domain search, email finding, verification, and company discovery, making it an essential tool for sales, recruiting, and business development.
With Hunter.io, you can:
- **Find email addresses by domain:** Search for all publicly available email addresses associated with a specific company domain.
- **Discover companies:** Use advanced filters and AI-powered search to find companies matching your criteria.
- **Find a specific email address:** Locate the most likely email address for a person at a company using their name and domain.
- **Verify email addresses:** Check the deliverability and validity of any email address.
- **Enrich company data:** Retrieve detailed information about companies, including size, technologies used, and more.
In Sim, the Hunter.io integration enables your agents to programmatically search for and verify email addresses, discover companies, and enrich contact data using Hunter.ios API. This allows you to automate lead generation, contact enrichment, and email verification directly within your workflows. Your agents can leverage Hunter.ios tools to streamline outreach, keep your CRM up-to-date, and power intelligent automation scenarios for sales, recruiting, and more.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Search for email addresses, verify their deliverability, discover companies, and enrich contact data using Hunter.io's powerful email finding capabilities.
## Tools
### `hunter_discover`
Returns companies matching a set of criteria using Hunter.io AI-powered search.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | No | Natural language search query for companies |
| `domain` | string | No | Company domain names to filter by |
| `headcount` | string | No | Company size filter \(e.g., "1-10", "11-50"\) |
| `company_type` | string | No | Type of organization |
| `technology` | string | No | Technology used by companies |
| `apiKey` | string | Yes | Hunter.io API Key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `results` | array | Array of companies matching the search criteria, each containing domain, name, headcount, technologies, and email_count |
### `hunter_domain_search`
Returns all the email addresses found using one given domain name, with sources.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Domain name to search for email addresses |
| `limit` | number | No | Maximum email addresses to return \(default: 10\) |
| `offset` | number | No | Number of email addresses to skip |
| `type` | string | No | Filter for personal or generic emails |
| `seniority` | string | No | Filter by seniority level: junior, senior, or executive |
| `department` | string | No | Filter by specific departments \(e.g., sales, marketing\) |
| `apiKey` | string | Yes | Hunter.io API Key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `domain` | string | The searched domain name |
| `disposable` | boolean | Whether the domain accepts disposable email addresses |
| `webmail` | boolean | Whether the domain is a webmail provider |
| `accept_all` | boolean | Whether the domain accepts all email addresses |
| `pattern` | string | The email pattern used by the organization |
| `organization` | string | The organization name |
| `description` | string | Description of the organization |
| `industry` | string | Industry of the organization |
| `twitter` | string | Twitter profile of the organization |
| `facebook` | string | Facebook profile of the organization |
| `linkedin` | string | LinkedIn profile of the organization |
| `instagram` | string | Instagram profile of the organization |
| `youtube` | string | YouTube channel of the organization |
| `technologies` | array | Array of technologies used by the organization |
| `country` | string | Country where the organization is located |
| `state` | string | State where the organization is located |
| `city` | string | City where the organization is located |
| `postal_code` | string | Postal code of the organization |
| `street` | string | Street address of the organization |
| `emails` | array | Array of email addresses found for the domain, each containing value, type, confidence, sources, and person details |
### `hunter_email_finder`
Finds the most likely email address for a person given their name and company domain.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Company domain name |
| `first_name` | string | Yes | Person's first name |
| `last_name` | string | Yes | Person's last name |
| `company` | string | No | Company name |
| `apiKey` | string | Yes | Hunter.io API Key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `email` | string | The found email address |
| `score` | number | Confidence score for the found email address |
| `sources` | array | Array of sources where the email was found, each containing domain, uri, extracted_on, last_seen_on, and still_on_page |
| `verification` | object | Verification information containing date and status |
### `hunter_email_verifier`
Verifies the deliverability of an email address and provides detailed verification status.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `email` | string | Yes | The email address to verify |
| `apiKey` | string | Yes | Hunter.io API Key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `result` | string | Deliverability result: deliverable, undeliverable, or risky |
| `score` | number | Confidence score for the verification result |
| `email` | string | The verified email address |
| `regexp` | boolean | Whether the email follows a valid regex pattern |
| `gibberish` | boolean | Whether the email appears to be gibberish |
| `disposable` | boolean | Whether the email is from a disposable email provider |
| `webmail` | boolean | Whether the email is from a webmail provider |
| `mx_records` | boolean | Whether MX records exist for the domain |
| `smtp_server` | boolean | Whether the SMTP server is reachable |
| `smtp_check` | boolean | Whether the SMTP check was successful |
| `accept_all` | boolean | Whether the domain accepts all email addresses |
| `block` | boolean | Whether the email is blocked |
| `status` | string | Verification status: valid, invalid, accept_all, webmail, disposable, or unknown |
| `sources` | array | Array of sources where the email was found |
### `hunter_companies_find`
Enriches company data using domain name.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Domain to find company data for |
| `apiKey` | string | Yes | Hunter.io API Key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `person` | object | Person information \(undefined for companies_find tool\) |
| `company` | object | Company information including name, domain, industry, size, country, linkedin, and twitter |
### `hunter_email_count`
Returns the total number of email addresses found for a domain or company.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | No | Domain to count emails for \(required if company not provided\) |
| `company` | string | No | Company name to count emails for \(required if domain not provided\) |
| `type` | string | No | Filter for personal or generic emails only |
| `apiKey` | string | Yes | Hunter.io API Key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `total` | number | Total number of email addresses found |
| `personal_emails` | number | Number of personal email addresses found |
| `generic_emails` | number | Number of generic email addresses found |
| `department` | object | Breakdown of email addresses by department \(executive, it, finance, management, sales, legal, support, hr, marketing, communication\) |
| `seniority` | object | Breakdown of email addresses by seniority level \(junior, senior, executive\) |
## Notes
- Category: `tools`
- Type: `hunter`

View File

@@ -1,84 +0,0 @@
---
title: Image Generator
description: Generate images
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="image_generator"
color="#4D5FFF"
icon={true}
iconSvg={`<svg className="block-icon"
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' />
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[DALL-E](https://openai.com/dall-e-3) is OpenAI's advanced AI system designed to generate realistic images and art from natural language descriptions. As a state-of-the-art image generation model, DALL-E can create detailed and creative visuals based on text prompts, allowing users to transform their ideas into visual content without requiring artistic skills.
With DALL-E, you can:
- **Generate realistic images**: Create photorealistic visuals from textual descriptions
- **Design conceptual art**: Transform abstract ideas into visual representations
- **Produce variations**: Generate multiple interpretations of the same prompt
- **Control artistic style**: Specify artistic styles, mediums, and visual aesthetics
- **Create detailed scenes**: Describe complex scenes with multiple elements and relationships
- **Visualize products**: Generate product mockups and design concepts
- **Illustrate ideas**: Turn written concepts into visual illustrations
In Sim, the DALL-E integration enables your agents to generate images programmatically as part of their workflows. This allows for powerful automation scenarios such as content creation, visual design, and creative ideation. Your agents can formulate detailed prompts, generate corresponding images, and incorporate these visuals into their outputs or downstream processes. This integration bridges the gap between natural language processing and visual content creation, enabling your agents to communicate not just through text but also through compelling imagery. By connecting Sim with DALL-E, you can create agents that produce visual content on demand, illustrate concepts, generate design assets, and enhance user experiences with rich visual elements - all without requiring human intervention in the creative process.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Create high-quality images using OpenAI's image generation models. Configure resolution, quality, style, and other parameters to get exactly the image you need.
## Tools
### `openai_image`
Generate images using OpenAI
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `model` | string | Yes | The model to use \(gpt-image-1 or dall-e-3\) |
| `prompt` | string | Yes | A text description of the desired image |
| `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 |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Generated image data |
## Notes
- Category: `tools`
- Type: `image_generator`

View File

@@ -1,77 +0,0 @@
---
title: Tools
description: Powerful tools to enhance your agentic workflows
---
import { Card, Cards } from "fumadocs-ui/components/card";
import { Step, Steps } from "fumadocs-ui/components/steps";
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
Tools are powerful components in Sim 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.
## What is a Tool?
A tool is a specialized component that provides a specific functionality or integration with external services. Tools can be used to search the web, interact with databases, process images, generate text or images, communicate via messaging platforms, and much more.
## Using Tools in Workflows
There are two primary ways to use tools in your Sim 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.
</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.
</Step>
</Steps>
## Tool Configuration
Each tool requires specific configuration to function properly. Common configuration elements include:
- **API Keys**: Many tools require authentication through API keys
- **Connection Parameters**: Endpoints, database identifiers, etc.
- **Input Formatting**: How data should be structured for the tool
- **Output Handling**: How to process the results from the tool
## Available Tools
Sim provides a diverse collection of tools for various purposes, including:
- **AI and Language Processing**: OpenAI, ElevenLabs, Translation services
- **Search and Research**: Google Search, Tavily, Exa, Perplexity
- **Document Manipulation**: Google Docs, Google Sheets, Notion, Confluence
- **Media Processing**: Vision, Image Generator
- **Communication**: Slack, WhatsApp, Twilio SMS, Gmail
- **Data Storage**: Pinecone, Supabase, Airtable
- **Development**: GitHub
Each tool has its own dedicated documentation page with detailed instructions on configuration and usage.
## Tool Outputs
Tools typically return structured data that can be processed by subsequent blocks in your workflow. The format of this data varies depending on the tool and operation but generally includes:
- The main content or result
- Metadata about the operation
- Status information
Refer to each tool's specific documentation to understand its exact output format.
## YAML Configuration
For detailed YAML workflow configuration and syntax, see the [YAML Workflow Reference](/yaml) documentation. This includes comprehensive guides for:
- **Block Reference Syntax**: How to connect and reference data between blocks
- **Tool Configuration**: Using tools in both standalone blocks and agent configurations
- **Environment Variables**: Secure handling of API keys and credentials
- **Complete Examples**: Real-world workflow patterns and configurations
For specific tool parameters and configuration options, refer to each tool's individual documentation page.

View File

@@ -1,145 +0,0 @@
---
title: Jira
description: Interact with Jira
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="jira"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 30 30'
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'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Jira](https://www.atlassian.com/jira) is a leading project management and issue tracking platform that helps teams plan, track, and manage agile software development projects effectively. As part of the Atlassian suite, Jira has become the industry standard for software development teams and project management professionals worldwide.
Jira provides a comprehensive set of tools for managing complex projects through its flexible and customizable workflow system. With its robust API and integration capabilities, Jira enables teams to streamline their development processes and maintain clear visibility of project progress.
Key features of Jira 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: JQL (Jira Query Language) for complex issue filtering and reporting
In Sim, the Jira 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 create, retrieve, and update Jira issues programmatically, facilitating automated project management tasks and ensuring that important information is properly tracked and documented. By connecting Sim with Jira, 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
Connect to Jira workspaces to read, write, and update issues. Access content, metadata, and integrate Jira documentation into your workflows.
## Tools
### `jira_retrieve`
Retrieve detailed information about a specific Jira issue
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
| `projectId` | string | No | Jira project ID to retrieve issues from. If not provided, all issues will be retrieved. |
| `issueKey` | string | Yes | Jira issue key to retrieve \(e.g., PROJ-123\) |
| `cloudId` | string | No | Jira Cloud ID for the instance. If not provided, it will be fetched using the domain. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Jira issue details with issue key, summary, description, created and updated timestamps |
### `jira_update`
Update a Jira issue
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
| `projectId` | string | No | Jira project ID to update issues in. If not provided, all issues will be retrieved. |
| `issueKey` | string | Yes | Jira issue key to update |
| `summary` | string | No | New summary for the issue |
| `description` | string | No | New description for the issue |
| `status` | string | No | New status for the issue |
| `priority` | string | No | New priority for the issue |
| `assignee` | string | No | New assignee for the issue |
| `cloudId` | string | No | Jira Cloud ID for the instance. If not provided, it will be fetched using the domain. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Updated Jira issue details with timestamp, issue key, summary, and success status |
### `jira_write`
Write a Jira issue
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
| `projectId` | string | Yes | Project ID for the issue |
| `summary` | string | Yes | Summary for the issue |
| `description` | string | No | Description for the issue |
| `priority` | string | No | Priority for the issue |
| `assignee` | string | No | Assignee for the issue |
| `cloudId` | string | No | Jira Cloud ID for the instance. If not provided, it will be fetched using the domain. |
| `issueType` | string | Yes | Type of issue to create \(e.g., Task, Story\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Created Jira issue details with timestamp, issue key, summary, success status, and URL |
### `jira_bulk_read`
Retrieve multiple Jira issues in bulk
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
| `projectId` | string | Yes | Jira project ID |
| `cloudId` | string | No | Jira cloud ID |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | array | Array of Jira issues with summary, description, created and updated timestamps |
## Notes
- Category: `tools`
- Type: `jira`

View File

@@ -1,126 +0,0 @@
---
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'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, 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 knowledge bases, upload individual chunks to existing documents, or create new documents from text content. Uses advanced AI embeddings to understand meaning and context for search operations.
## Tools
### `knowledge_search`
Search for similar content in a knowledge base using vector similarity
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `knowledgeBaseId` | string | Yes | ID of the knowledge base to search in |
| `query` | string | No | Search query text \(optional when using tag filters\) |
| `topK` | number | No | Number of most similar results to return \(1-100\) |
| `tagFilters` | any | No | Array of tag filters with tagName and tagValue properties |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `results` | array | Array of search results from the knowledge base |
### `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 | Description |
| --------- | ---- | ----------- |
| `data` | object | Information about the uploaded chunk |
### `knowledge_create_document`
Create a new document in a knowledge base
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `knowledgeBaseId` | string | Yes | ID of the knowledge base containing the document |
| `name` | string | Yes | Name of the document |
| `content` | string | Yes | Content of the document |
| `tag1` | string | No | Tag 1 value for the document |
| `tag2` | string | No | Tag 2 value for the document |
| `tag3` | string | No | Tag 3 value for the document |
| `tag4` | string | No | Tag 4 value for the document |
| `tag5` | string | No | Tag 5 value for the document |
| `tag6` | string | No | Tag 6 value for the document |
| `tag7` | string | No | Tag 7 value for the document |
| `documentTagsData` | array | No | Structured tag data with names, types, and values |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `data` | object | Information about the created document |
## Notes
- Category: `blocks`
- Type: `knowledge`

View File

@@ -1,92 +0,0 @@
---
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, 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 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 | Description |
| --------- | ---- | ----------- |
| `issues` | array | Array of issues from the specified Linear team and project, each containing id, title, description, state, teamId, and projectId |
### `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 | Description |
| --------- | ---- | ----------- |
| `issue` | object | The created issue containing id, title, description, state, teamId, and projectId |
## Notes
- Category: `tools`
- Type: `linear`

View File

@@ -1,77 +0,0 @@
---
title: Linkup
description: Search the web with Linkup
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="linkup"
color="#D6D3C7"
icon={true}
iconSvg={`<svg className="block-icon"
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 24 24'
fill='none'
>
<path
d='M20.2 14.1c-.4-.3-1.6-.4-2.9-.2.5-1.4 1.3-3.9.1-5-.6-.5-1.5-.7-2.6-.5-.3 0-.6.1-1 .2-1.1-1.6-2.4-2.5-3.8-2.5-1.6 0-3.1 1-4.1 2.9-1.2 2.1-1.9 5.1-1.9 8.8v.03l.4.3c3-.9 7.5-2.3 10.7-2.9 0 .9.1 1.9.1 2.8v.03l.4.3c.1 0 5.4-1.7 5.3-3.3 0-.2-.1-.5-.3-.7zM19.9 14.7c.03.4-1.7 1.4-4 2.3.5-.7 1-1.6 1.3-2.5 1.4-.1 2.4-.1 2.7.2zM16.4 14.6c-.3.7-.7 1.4-1.2 2-.02-.6-.1-1.2-.2-1.8.4-.1.9-.1 1.4-.2zM16.5 9.4c.8.7.9 2.4.1 5.1-.5.1-1 .1-1.5.2-.3-2-.9-3.8-1.7-5.3.3-.1.6-.2.8-.2.9-.1 1.7.05 2.3.2zM9.5 6.8c1.2 0 2.3.7 3.2 2.1-2.8 1.1-5.9 3.4-8.4 7.8.2-5.1 1.9-9.9 5.2-9.9zM4.7 17c3.4-4.9 6.4-6.8 8.4-7.8.7 1.3 1.2 2.9 1.5 4.8-3.2.6-7.3 1.8-9.9 3z'
fill='currentColor'
stroke='currentColor'
strokeWidth='0.5'
strokeLinejoin='round'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Linkup](https://linkup.so) is a powerful web search tool that integrates seamlessly with Sim, allowing your AI agents to access up-to-date information from the web with proper source attribution.
Linkup enhances your AI agents by providing them with the ability to search the web for current information. When integrated into your agent's toolkit:
- **Real-time Information Access**: Agents can retrieve the latest information from the web, keeping responses current and relevant.
- **Source Attribution**: All information comes with proper citations, ensuring transparency and credibility.
- **Simple Implementation**: Add Linkup to your agents toolset with minimal configuration.
- **Contextual Awareness**: Agents can use web information while maintaining their personality and conversational style.
To implement Linkup in your agent, simply add the tool to your agent's configuration. Your agent will then be able to search the web whenever they need to answer questions requiring current information.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Linkup Search allows you to search and retrieve up-to-date information from the web with source attribution.
## Tools
### `linkup_search`
Search the web for information using Linkup
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `q` | string | Yes | The search query |
| `depth` | string | Yes | Search depth \(has to either be "standard" or "deep"\) |
| `outputType` | string | Yes | Type of output to return \(has to either be "sourcedAnswer" or "searchResults"\) |
| `apiKey` | string | Yes | Enter your Linkup API key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `answer` | string | The sourced answer to the search query |
| `sources` | array | Array of sources used to compile the answer, each containing name, url, and snippet |
## Notes
- Category: `tools`
- Type: `linkup`

File diff suppressed because one or more lines are too long

View File

@@ -1,124 +0,0 @@
---
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 | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the memory was added successfully |
| `memories` | array | Array of memory objects including the new or updated memory |
| `error` | string | Error message if operation failed |
### `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 | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the memory was retrieved successfully |
| `memories` | array | Array of memory data for the requested ID |
| `message` | string | Success or error message |
| `error` | string | Error message if operation failed |
### `memory_get_all`
Retrieve all memories from the database
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether all memories were retrieved successfully |
| `memories` | array | Array of all memory objects with keys, types, and data |
| `message` | string | Success or error message |
| `error` | string | Error message if operation failed |
### `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 | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the memory was deleted successfully |
| `message` | string | Success or error message |
| `error` | string | Error message if operation failed |
## Notes
- Category: `blocks`
- Type: `memory`

View File

@@ -1,66 +0,0 @@
{
"items": [
"index",
"airtable",
"arxiv",
"browser_use",
"clay",
"confluence",
"discord",
"elevenlabs",
"exa",
"file",
"firecrawl",
"generic_webhook",
"github",
"gmail",
"google_calendar",
"google_docs",
"google_drive",
"google_search",
"google_sheets",
"huggingface",
"hunter",
"image_generator",
"jina",
"jira",
"knowledge",
"linear",
"linkup",
"mem0",
"memory",
"microsoft_excel",
"microsoft_planner",
"microsoft_teams",
"mistral_parse",
"notion",
"onedrive",
"openai",
"outlook",
"perplexity",
"pinecone",
"qdrant",
"reddit",
"s3",
"schedule",
"serper",
"sharepoint",
"slack",
"stagehand",
"stagehand_agent",
"supabase",
"tavily",
"telegram",
"thinking",
"translate",
"twilio_sms",
"typeform",
"vision",
"wealthbox",
"webhook",
"whatsapp",
"wikipedia",
"x",
"youtube"
]
}

View File

@@ -1,166 +0,0 @@
---
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, 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, 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 |
| --------- | ---- | -------- | ----------- |
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to read from |
| `range` | string | No | The range of cells to read from |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Excel spreadsheet data and metadata |
### `microsoft_excel_write`
Write data to a Microsoft Excel spreadsheet
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Write operation results and metadata |
### `microsoft_excel_table_add`
Add new rows to a Microsoft Excel table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Table add operation results and metadata |
## Notes
- Category: `tools`
- Type: `microsoft_excel`

View File

@@ -1,178 +0,0 @@
---
title: Microsoft Planner
description: Read and create tasks in Microsoft Planner
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="microsoft_planner"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon" fill='currentColor' viewBox='-1 -1 27 27' xmlns='http://www.w3.org/2000/svg'>
<defs>
<linearGradient
id='paint0_linear_3984_11038'
x1='6.38724'
y1='3.74167'
x2='2.15779'
y2='12.777'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#8752E0' />
<stop offset='1' stopColor='#541278' />
</linearGradient>
<linearGradient
id='paint1_linear_3984_11038'
x1='8.38032'
y1='11.0696'
x2='4.94062'
y2='7.69244'
gradientUnits='userSpaceOnUse'
>
<stop offset='0.12172' stopColor='#3D0D59' />
<stop offset='1' stopColor='#7034B0' stopOpacity='0' />
</linearGradient>
<linearGradient
id='paint2_linear_3984_11038'
x1='18.3701'
y1='-3.33385e-05'
x2='9.85717'
y2='20.4192'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#DB45E0' />
<stop offset='1' stopColor='#6C0F71' />
</linearGradient>
<linearGradient
id='paint3_linear_3984_11038'
x1='18.3701'
y1='-3.33385e-05'
x2='9.85717'
y2='20.4192'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#DB45E0' />
<stop offset='0.677403' stopColor='#A829AE' />
<stop offset='1' stopColor='#8F28B3' />
</linearGradient>
<linearGradient
id='paint4_linear_3984_11038'
x1='18.0002'
y1='7.49958'
x2='14.0004'
y2='23.9988'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#3DCBFF' />
<stop offset='1' stopColor='#00479E' />
</linearGradient>
<linearGradient
id='paint5_linear_3984_11038'
x1='18.2164'
y1='7.92626'
x2='10.5237'
y2='22.9363'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#3DCBFF' />
<stop offset='1' stopColor='#4A40D4' />
</linearGradient>
</defs>
<path
d='M8.25809 15.7412C7.22488 16.7744 5.54971 16.7744 4.5165 15.7412L0.774909 11.9996C-0.258303 10.9664 -0.258303 9.29129 0.774908 8.25809L4.5165 4.51655C5.54971 3.48335 7.22488 3.48335 8.25809 4.51655L11.9997 8.2581C13.0329 9.29129 13.0329 10.9664 11.9997 11.9996L8.25809 15.7412Z'
fill='url(#paint0_linear_3984_11038)'
/>
<path
d='M8.25809 15.7412C7.22488 16.7744 5.54971 16.7744 4.5165 15.7412L0.774909 11.9996C-0.258303 10.9664 -0.258303 9.29129 0.774908 8.25809L4.5165 4.51655C5.54971 3.48335 7.22488 3.48335 8.25809 4.51655L11.9997 8.2581C13.0329 9.29129 13.0329 10.9664 11.9997 11.9996L8.25809 15.7412Z'
fill='url(#paint1_linear_3984_11038)'
/>
<path
d='M0.774857 11.9999C1.80809 13.0331 3.48331 13.0331 4.51655 11.9999L15.7417 0.774926C16.7749 -0.258304 18.4501 -0.258309 19.4834 0.774914L23.225 4.51655C24.2583 5.54977 24.2583 7.22496 23.225 8.25819L11.9999 19.4832C10.9667 20.5164 9.29146 20.5164 8.25822 19.4832L0.774857 11.9999Z'
fill='url(#paint2_linear_3984_11038)'
/>
<path
d='M0.774857 11.9999C1.80809 13.0331 3.48331 13.0331 4.51655 11.9999L15.7417 0.774926C16.7749 -0.258304 18.4501 -0.258309 19.4834 0.774914L23.225 4.51655C24.2583 5.54977 24.2583 7.22496 23.225 8.25819L11.9999 19.4832C10.9667 20.5164 9.29146 20.5164 8.25822 19.4832L0.774857 11.9999Z'
fill='url(#paint3_linear_3984_11038)'
/>
<path
d='M4.51642 15.7413C5.54966 16.7746 7.22487 16.7746 8.25812 15.7413L15.7415 8.25803C16.7748 7.2248 18.45 7.2248 19.4832 8.25803L23.2249 11.9997C24.2582 13.0329 24.2582 14.7081 23.2249 15.7413L15.7415 23.2246C14.7083 24.2579 13.033 24.2579 11.9998 23.2246L4.51642 15.7413Z'
fill='url(#paint4_linear_3984_11038)'
/>
<path
d='M4.51642 15.7413C5.54966 16.7746 7.22487 16.7746 8.25812 15.7413L15.7415 8.25803C16.7748 7.2248 18.45 7.2248 19.4832 8.25803L23.2249 11.9997C24.2582 13.0329 24.2582 14.7081 23.2249 15.7413L15.7415 23.2246C14.7083 24.2579 13.033 24.2579 11.9998 23.2246L4.51642 15.7413Z'
fill='url(#paint5_linear_3984_11038)'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Microsoft Planner](https://www.microsoft.com/en-us/microsoft-365/planner) is a task management tool that helps teams organize work visually using boards, tasks, and buckets. Integrated with Microsoft 365, it offers a simple, intuitive way to manage team projects, assign responsibilities, and track progress.
With Microsoft Planner, you can:
- **Create and manage tasks**: Add new tasks with due dates, priorities, and assigned users
- **Organize with buckets**: Group tasks by phase, status, or category to reflect your teams workflow
- **Visualize project status**: Use boards, charts, and filters to monitor workload and track progress
- **Stay integrated with Microsoft 365**: Seamlessly connect tasks with Teams, Outlook, and other Microsoft tools
In Sim, the Microsoft Planner integration allows your agents to programmatically create, read, and manage tasks as part of their workflows. Agents can generate new tasks based on incoming requests, retrieve task details to drive decisions, and track status across projects — all without human intervention. Whether you're building workflows for client onboarding, internal project tracking, or follow-up task generation, integrating Microsoft Planner with Sim gives your agents a structured way to coordinate work, automate task creation, and keep teams aligned.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Microsoft Planner functionality to manage tasks. Read all user tasks, tasks from specific plans, individual tasks, or create new tasks with various properties like title, description, due date, and assignees using OAuth authentication.
## Tools
### `microsoft_planner_read_task`
Read tasks from Microsoft Planner - get all user tasks or all tasks from a specific plan
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `planId` | string | No | The ID of the plan to get tasks from \(if not provided, gets all user tasks\) |
| `taskId` | string | No | The ID of the task to get |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether tasks were retrieved successfully |
| `tasks` | array | Array of task objects with filtered properties |
| `metadata` | object | Metadata including planId, userId, and planUrl |
### `microsoft_planner_create_task`
Create a new task in Microsoft Planner
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `planId` | string | Yes | The ID of the plan where the task will be created |
| `title` | string | Yes | The title of the task |
| `description` | string | No | The description of the task |
| `dueDateTime` | string | No | The due date and time for the task \(ISO 8601 format\) |
| `assigneeUserId` | string | No | The user ID to assign the task to |
| `bucketId` | string | No | The bucket ID to place the task in |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the task was created successfully |
| `task` | object | The created task object with all properties |
| `metadata` | object | Metadata including planId, taskId, and taskUrl |
## Notes
- Category: `tools`
- Type: `microsoft_planner`

View File

@@ -1,204 +0,0 @@
---
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, 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 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 |
| --------- | ---- | -------- | ----------- |
| `chatId` | string | Yes | The ID of the chat to read from |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Teams chat read operation success status |
| `messageCount` | number | Number of messages retrieved from chat |
| `chatId` | string | ID of the chat that was read from |
| `messages` | array | Array of chat message objects |
| `attachmentCount` | number | Total number of attachments found |
| `attachmentTypes` | array | Types of attachments found |
| `content` | string | Formatted content of chat messages |
### `microsoft_teams_write_chat`
Write or update content in a Microsoft Teams chat
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `chatId` | string | Yes | The ID of the chat to write to |
| `content` | string | Yes | The content to write to the message |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Teams chat message send success status |
| `messageId` | string | Unique identifier for the sent message |
| `chatId` | string | ID of the chat where message was sent |
| `createdTime` | string | Timestamp when message was created |
| `url` | string | Web URL to the message |
| `updatedContent` | boolean | Whether content was successfully updated |
### `microsoft_teams_read_channel`
Read content from a Microsoft Teams channel
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Teams channel read operation success status |
| `messageCount` | number | Number of messages retrieved from channel |
| `teamId` | string | ID of the team that was read from |
| `channelId` | string | ID of the channel that was read from |
| `messages` | array | Array of channel message objects |
| `attachmentCount` | number | Total number of attachments found |
| `attachmentTypes` | array | Types of attachments found |
| `content` | string | Formatted content of channel messages |
### `microsoft_teams_write_channel`
Write or send a message to a Microsoft Teams channel
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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 | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Teams channel message send success status |
| `messageId` | string | Unique identifier for the sent message |
| `teamId` | string | ID of the team where message was sent |
| `channelId` | string | ID of the channel where message was sent |
| `createdTime` | string | Timestamp when message was created |
| `url` | string | Web URL to the message |
| `updatedContent` | boolean | Whether content was successfully updated |
## Notes
- Category: `tools`
- Type: `microsoft_teams`

View File

@@ -1,118 +0,0 @@
---
title: Mistral Parser
description: Extract text from PDF documents
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="mistral_parse"
color="#000000"
icon={true}
iconSvg={`<svg className="block-icon"
viewBox='1 0.5 24 22'
fill='none'
xmlns='http://www.w3.org/2000/svg'
preserveAspectRatio='xMidYMid meet'
>
<g clipPath='url(#clip0_1621_58)'>
<path d='M17.4541 0H21.8177V4.39481H17.4541V0Z' fill='black' />
<path d='M19.6367 0H24.0003V4.39481H19.6367V0Z' fill='#F7D046' />
<path
d='M0 0H4.36359V4.39481H0V0ZM0 4.39481H4.36359V8.78961H0V4.39481ZM0 8.78971H4.36359V13.1845H0V8.78971ZM0 13.1845H4.36359V17.5793H0V13.1845ZM0 17.5794H4.36359V21.9742H0V17.5794Z'
fill='black'
/>
<path d='M2.18164 0H6.54523V4.39481H2.18164V0Z' fill='#F7D046' />
<path
d='M19.6362 4.39478H23.9998V8.78958H19.6362V4.39478ZM2.18164 4.39478H6.54523V8.78958H2.18164V4.39478Z'
fill='#F2A73B'
/>
<path d='M13.0908 4.39478H17.4544V8.78958H13.0908V4.39478Z' fill='black' />
<path
d='M15.2732 4.39478H19.6368V8.78958H15.2732V4.39478ZM6.5459 4.39478H10.9095V8.78958H6.5459V4.39478Z'
fill='#F2A73B'
/>
<path
d='M10.9096 8.78979H15.2732V13.1846H10.9096V8.78979ZM15.2732 8.78979H19.6368V13.1846H15.2732V8.78979ZM6.5459 8.78979H10.9096V13.1846H6.5459V8.78979Z'
fill='#EE792F'
/>
<path d='M8.72754 13.1846H13.0911V17.5794H8.72754V13.1846Z' fill='black' />
<path d='M10.9092 13.1846H15.2728V17.5794H10.9092V13.1846Z' fill='#EB5829' />
<path
d='M19.6362 8.78979H23.9998V13.1846H19.6362V8.78979ZM2.18164 8.78979H6.54523V13.1846H2.18164V8.78979Z'
fill='#EE792F'
/>
<path d='M17.4541 13.1846H21.8177V17.5794H17.4541V13.1846Z' fill='black' />
<path d='M19.6367 13.1846H24.0003V17.5794H19.6367V13.1846Z' fill='#EB5829' />
<path d='M17.4541 17.5793H21.8177V21.9742H17.4541V17.5793Z' fill='black' />
<path d='M2.18164 13.1846H6.54523V17.5794H2.18164V13.1846Z' fill='#EB5829' />
<path
d='M19.6362 17.5793H23.9998V21.9742H19.6362V17.5793ZM2.18164 17.5793H6.54523V21.9742H2.18164V17.5793Z'
fill='#EA3326'
/>
</g>
<defs>
<clipPath id='clip0_1621_58'>
<rect fill='white' />
</clipPath>
</defs>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
The Mistral Parse tool provides a powerful way to extract and process content from PDF documents using [Mistral's OCR API](https://mistral.ai/). This tool leverages advanced optical character recognition to accurately extract text and structure from PDF files, making it easy to incorporate document data into your agent workflows.
With the Mistral Parse tool, you can:
- **Extract text from PDFs**: Accurately convert PDF content to text, markdown, or JSON formats
- **Process PDFs from URLs**: Directly extract content from PDFs hosted online by providing their URLs
- **Maintain document structure**: Preserve formatting, tables, and layout from the original PDFs
- **Extract images**: Optionally include embedded images from the PDFs
- **Select specific pages**: Process only the pages you need from multi-page documents
The Mistral Parse tool is particularly useful for scenarios where your agents need to work with PDF content, such as analyzing reports, extracting data from forms, or processing text from scanned documents. It simplifies the process of making PDF content available to your agents, allowing them to work with information stored in PDFs just as easily as with direct text input.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Extract text and structure from PDF documents using Mistral's OCR API. Either enter a URL to a PDF document or upload a PDF file directly. Configure processing options and get the content in your preferred format. For URLs, they must be publicly accessible and point to a valid PDF file. Note: Google Drive, Dropbox, and other cloud storage links are not supported; use a direct download URL from a web server instead.
## Tools
### `mistral_parser`
Parse PDF documents using Mistral OCR API
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `filePath` | string | Yes | URL to a PDF document to be processed |
| `fileUpload` | object | No | File upload data from file-upload component |
| `resultType` | string | No | Type of parsed result \(markdown, text, or json\). Defaults to markdown. |
| `includeImageBase64` | boolean | No | Include base64-encoded images in the response |
| `pages` | array | No | Specific pages to process \(array of page numbers, starting from 0\) |
| `imageLimit` | number | No | Maximum number of images to extract from the PDF |
| `imageMinSize` | number | No | Minimum height and width of images to extract from the PDF |
| `apiKey` | string | Yes | Mistral API key \(MISTRAL_API_KEY\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the PDF was parsed successfully |
| `content` | string | Extracted content in the requested format \(markdown, text, or JSON\) |
| `metadata` | object | Processing metadata including jobId, fileType, pageCount, and usage info |
## Notes
- Category: `tools`
- Type: `mistral_parse`

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