Compare commits

..

27 Commits

Author SHA1 Message Date
Siddharth Ganesan
f553667242 Lint 2025-07-08 11:24:14 -07:00
Siddharth Ganesan
0c753c4394 It works? 2025-07-08 11:23:52 -07:00
Siddharth Ganesan
2ac203e233 Lint :( 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
d29692ede4 Add logs 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
f60232fa5b Endpoint deployment 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
4ceec7ff9a Endpoitn checkpoint 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
0ff86a1413 Endpoint stuff v3 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
4886e5aae8 Endpoint deployment v1 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
6274bdcb18 Better logging 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
7064f69520 Make lambda fields required 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
154d8a674a Reorder fields in block 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
a6e144ad93 E2E lambda deployment using agent without tool calls 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
d0514a39a8 Fix switch statement 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
ee66cd262b Abstract timeout and memory 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
5aab24e1ed Abstract timeout and memory 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
689d88fd7e Route updates 2025-07-07 22:19:45 -07:00
Siddharth Ganesan
b1047503b9 Change code input to json 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
ec1eec4546 Add downstream tool options 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
2b3989edd2 Make codefiles visible downstream 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
cb393c1638 Update block 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
c82e5ac3b3 Update fetch 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
67030d9576 Fetch v1 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
8c157083bc Checkpoint 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
6f07c2958e Clean up param validation 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
be100e4f86 Initial version of lambda works 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
46be9e3558 Initial version of lambda creation works 2025-07-07 22:19:44 -07:00
Siddharth Ganesan
abf1ac06ce Add initial aws lambda ui block 2025-07-07 22:19:44 -07:00
1104 changed files with 54897 additions and 143166 deletions

View File

@@ -15,6 +15,8 @@ Thank you for your interest in contributing to Sim Studio! Our goal is to provid
- [Commit Message Guidelines](#commit-message-guidelines)
- [Local Development Setup](#local-development-setup)
- [Adding New Blocks and Tools](#adding-new-blocks-and-tools)
- [Local Storage Mode](#local-storage-mode)
- [Standalone Build](#standalone-build)
- [License](#license)
- [Contributor License Agreement (CLA)](#contributor-license-agreement-cla)
@@ -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.
@@ -207,14 +209,13 @@ Dev Containers provide a consistent and easy-to-use development environment:
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
- Run `bun run dev` in the terminal or use the `sim-start` alias
- All dependencies and configurations are automatically set up
- Your changes will be automatically hot-reloaded
4. **GitHub Codespaces:**
- This setup also works with GitHub Codespaces if you prefer development in the browser
- Just click "Code" → "Codespaces" → "Create codespace on staging"
- Just click "Code" → "Codespaces" → "Create codespace on main"
### Option 4: Manual Setup
@@ -245,11 +246,9 @@ If you prefer not to use Docker or Dev Containers:
4. **Run the Development Server:**
```bash
bun run dev:full
bun 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.**
### Email Template Development
@@ -380,18 +379,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
@@ -441,57 +429,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 Studio implements a sophisticated parameter visibility system that controls how parameters are exposed to users and LLMs in agent workflows. Each parameter can have one of four visibility levels:
| Visibility | User Sees | LLM Sees | How It Gets Set |
|-------------|-----------|----------|--------------------------------|
| `user-only` | ✅ Yes | ❌ No | User provides in UI |
| `user-or-llm` | ✅ Yes | ✅ Yes | User provides OR LLM generates |
| `llm-only` | ❌ No | ✅ Yes | LLM generates only |
| `hidden` | ❌ No | ❌ No | Application injects at runtime |
#### Visibility Guidelines
- **`user-or-llm`**: Use for core parameters that can be provided by users or intelligently filled by the LLM (e.g., search queries, email subjects)
- **`user-only`**: Use for configuration parameters, API keys, and settings that only users should control (e.g., number of results, authentication credentials)
- **`llm-only`**: Use for computed values that the LLM should handle internally (e.g., dynamic calculations, contextual data)
- **`hidden`**: Use for system-level parameters injected at runtime (e.g., OAuth tokens, internal identifiers)
#### Example Implementation
```typescript
params: {
query: {
type: 'string',
required: true,
visibility: 'user-or-llm', // User can provide or LLM can generate
description: 'Search query to execute',
},
apiKey: {
type: 'string',
required: true,
visibility: 'user-only', // Only user provides this
description: 'API key for authentication',
},
internalId: {
type: 'string',
required: false,
visibility: 'hidden', // System provides this at runtime
description: 'Internal tracking identifier',
},
}
```
This visibility system ensures clean user interfaces while maintaining full flexibility for LLM-driven workflows.
### Guidelines & Best Practices
- **Code Style:** Follow the project's ESLint and Prettier configurations. Use meaningful variable names and small, focused functions.
- **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.

View File

@@ -7,7 +7,7 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest-8-cores
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:

View File

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

View File

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

View File

@@ -87,16 +87,9 @@ docker compose -f docker-compose.prod.yml up -d
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 Studio uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
1. Clone and install dependencies:
```bash
@@ -105,65 +98,39 @@ cd sim
bun install
```
2. Set up PostgreSQL with pgvector:
You need PostgreSQL with the `vector` extension for embedding support. Choose one option:
**Option A: Using Docker (Recommended)**
```bash
# Start PostgreSQL with pgvector extension
docker run --name simstudio-db \
-e POSTGRES_PASSWORD=your_password \
-e POSTGRES_DB=simstudio \
-p 5432:5432 -d \
pgvector/pgvector:pg17
```
**Option B: Manual Installation**
- Install PostgreSQL 12+ and the pgvector extension
- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation)
3. Set up environment:
2. Set up environment:
```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:
3. Set up the database:
```bash
bunx drizzle-kit migrate
bunx drizzle-kit push
```
5. Start the development servers:
4. Start the development servers:
**Recommended approach - run both servers together (from project root):**
Next.js app:
```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):
Start the realtime server:
```bash
cd apps/sim
bun run dev:sockets
```
Run both together (recommended):
```bash
bun run dev:full
```
## Tech Stack
- **Framework**: [Next.js](https://nextjs.org/) (App Router)
@@ -176,7 +143,6 @@ bun run dev:sockets
- **Docs**: [Fumadocs](https://fumadocs.vercel.app/)
- **Monorepo**: [Turborepo](https://turborepo.org/)
- **Realtime**: [Socket.io](https://socket.io/)
- **Background Jobs**: [Trigger.dev](https://trigger.dev/)
## Contributing

View File

@@ -1,8 +1,7 @@
@import "tailwindcss";
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
@theme {
:root {
--color-fd-primary: #802fff; /* Purple from control-bar component */
}
@@ -16,9 +15,4 @@
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

@@ -270,26 +270,3 @@ export const ResponseIcon = (props: SVGProps<SVGSVGElement>) => (
<path d='m9 17-5-5 5-5' />
</svg>
)
export const StarterIcon = (props: SVGProps<SVGSVGElement>) => (
<svg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>
<path d='M8 5v14l11-7z' fill='currentColor' />
</svg>
)
export const LoopIcon = (props: SVGProps<SVGSVGElement>) => (
<svg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>
<path
d='M4 12a8 8 0 018-8V2.5L16 6l-4 3.5V8a6 6 0 00-6 6 6 6 0 006 6 6 6 0 006-6h2a8 8 0 01-8 8 8 8 0 01-8-8z'
fill='currentColor'
/>
</svg>
)
export const ParallelIcon = (props: SVGProps<SVGSVGElement>) => (
<svg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>
<rect x='3' y='3' width='18' height='6' rx='1' stroke='currentColor' strokeWidth='2' />
<rect x='3' y='15' width='18' height='6' rx='1' stroke='currentColor' strokeWidth='2' />
<path d='M12 9v6' stroke='currentColor' strokeWidth='2' strokeLinecap='round' />
</svg>
)

View File

@@ -8,40 +8,47 @@ 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.
The Agent block is a fundamental component in Sim Studio that allows you to create powerful AI agents using various LLM providers. These agents can process inputs based on customizable system prompts and utilize integrated tools to enhance their capabilities.
<ThemeImage
lightSrc="/static/light/agent-light.png"
darkSrc="/static/dark/agent-dark.png"
alt="Agent Block Configuration"
width={350}
alt="Agent Block"
width={300}
height={175}
/>
<Callout type="info">
Agent blocks serve as interfaces to Large Language Models, enabling your workflow to leverage
state-of-the-art AI capabilities.
</Callout>
## Overview
The Agent block enables you to:
The Agent block serves as an interface to Large Language Models (LLMs), enabling you to create agents that can:
<Steps>
<Step>
<strong>Process natural language</strong>: Analyze user input and generate contextual responses
<strong>Respond to user inputs</strong>: Generate natural language responses based on provided
inputs
</Step>
<Step>
<strong>Execute AI-powered tasks</strong>: Perform content analysis, generation, and decision-making
<strong>Follow instructions</strong>: Adhere to specific instructions defined in the system
prompt
</Step>
<Step>
<strong>Call external tools</strong>: Access APIs, databases, and services during processing
<strong>Use specialized tools</strong>: Interact with integrated tools to extend capabilities
</Step>
<Step>
<strong>Generate structured output</strong>: Return JSON data that matches your schema requirements
<strong>Structure output</strong>: Generate responses in structured formats when needed
</Step>
</Steps>
</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.
The system prompt defines the agent's behavior, capabilities, and limitations. It's the primary way to instruct the agent on how to respond to inputs.
```markdown
You are a helpful assistant that specializes in financial analysis.
@@ -51,25 +58,22 @@ 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:
The user prompt or context is the specific input or question that the agent should respond to. This can be:
- **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
- Directly provided in the block configuration
- Connected from another block's output
- Dynamically generated during workflow execution
### Model Selection
The Agent block supports multiple LLM providers through a unified inference interface. Available models include:
Choose from a variety of LLM providers:
**OpenAI Models**: 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>
- OpenAI (GPT-4o, o1, o3, o4-mini, gpt-4.1)
- Anthropic (Claude 3.7 Sonnet)
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
- Groq, Cerebras
- Ollama Local Models
- And more
### Temperature
@@ -77,16 +81,22 @@ 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.
<p>
More deterministic, focused responses. Best for factual tasks, customer support, and
situations where accuracy is critical.
</p>
</Tab>
<Tab>
Balanced creativity and focus. Suitable for general purpose applications that require both
accuracy and some creativity.
<p>
Balanced creativity and focus. Suitable for general purpose applications that require both
accuracy and some creativity.
</p>
</Tab>
<Tab>
More creative, varied responses. Ideal for creative writing, brainstorming, and generating
diverse ideas.
<p>
More creative, varied responses. Ideal for creative writing, brainstorming, and generating
diverse ideas.
</p>
</Tab>
</Tabs>
@@ -100,204 +110,103 @@ Your API key for the selected LLM provider. This is securely stored and used for
### 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.
Integrate specialized tools to enhance the agent's capabilities. You can add tools to your agent by:
**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
1. Clicking the Tools section in the Agent configuration
2. Selecting from the tools dropdown menu
3. Choosing an existing tool or creating a new one
<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>
<ThemeImage
lightSrc="/static/light/tooldropdown-light.png"
darkSrc="/static/dark/tooldropdown-dark.png"
alt="Tools Dropdown"
width={150}
height={125}
/>
**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
Available tools include:
**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
- **Confluence**: Access and query Confluence knowledge bases
- **Evaluator**: Use evaluation metrics to assess content
- **GitHub**: Interact with GitHub repositories and issues
- **Gmail**: Process and respond to emails
- **Firecrawl**: Web search and content retrieval
- And many, many more pre-built integrations
<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>
You can also create custom tools to meet specific requirements for your agent's capabilities.
<Callout type="info">
Tools significantly expand what your agent can do, allowing it to access external systems,
retrieve information, and take actions beyond simple text generation.
</Callout>
### Response Format
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
Define a structured format for the agent's response when needed, using JSON or other formats.
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>System Prompt</strong>: Instructions defining agent behavior and role
<strong>User Prompt</strong>: The user's query or context for the agent
</li>
<li>
<strong>User Prompt</strong>: Input text or data to process
<strong>System Prompt</strong>: Instructions for the agent (optional)
</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
<strong>Tools</strong>: Optional tool connections that the agent can use
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>agent.content</strong>: Agent's response text or structured data
<strong>Content</strong>: The agent's response text
</li>
<li>
<strong>agent.tokens</strong>: Token usage statistics object
<strong>Model</strong>: The model used for generation
</li>
<li>
<strong>agent.tool_calls</strong>: Array of tool execution details
<strong>Tokens</strong>: Usage statistics (prompt, completion, total)
</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
<strong>Tool Calls</strong>: Details of any tools used during processing
</li>
<li>
<strong>Metadata</strong>: Usage statistics and execution details
<strong>Cost</strong>: Cost of the response
</li>
<li>
<strong>Access</strong>: Available in blocks after the agent
<strong>Usage</strong>: Usage statistics (prompt, completion, total)
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
## Example Usage
### Customer Support Automation
Here's an example of how an Agent block might be configured for a customer support workflow:
<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>
```yaml
# Example Agent Configuration
systemPrompt: |
You are a customer support agent for TechCorp.
Always maintain a professional, friendly tone.
If you don't know an answer, direct the customer to email support@techcorp.com.
Never make up information about products or policies.
### 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>
model: OpenAI/gpt-4
temperature: 0.2
tools:
- ProductDatabase
- OrderHistory
- SupportTicketCreator
```
## Best Practices
- **Be specific in system prompts**: Clearly define the agent's role, tone, and limitations. The more specific your instructions are, the better the agent will be able to fulfill its intended purpose.
- **Choose the right temperature setting**: Use lower temperature settings (0-0.3) when accuracy is important, or increase temperature (0.7-2.0) for more creative or varied responses
- **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.
- **Combine with Evaluator blocks**: Use Evaluator blocks to assess agent responses and ensure quality. This allows you to create feedback loops and implement quality control measures.
- **Leverage tools effectively**: Integrate tools that complement the agent's purpose and enhance its capabilities. Be selective about which tools you provide to avoid overwhelming the agent.

View File

@@ -14,7 +14,7 @@ The API block enables you to connect your workflow to external services through
lightSrc="/static/light/api-light.png"
darkSrc="/static/dark/api-dark.png"
alt="API Block"
width={350}
width={300}
height={175}
/>
@@ -22,20 +22,11 @@ The API block enables you to connect your workflow to external services through
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>
- Make HTTP requests to external services and APIs
- Process and transform data from external sources
- Send data to external systems
- Integrate with third-party platforms and services
- Create webhooks and callbacks
## Configuration Options
@@ -91,140 +82,42 @@ For methods that support a request body (POST, PUT, PATCH), you can define the d
- 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>
### Inputs
## Example Use Cases
- **URL**: The endpoint to send the request to
- **Method**: The HTTP method to use
- **Query Parameters**: Key-value pairs for URL parameters
- **Headers**: HTTP headers for the request
- **Body**: Data to send with the request (for applicable methods)
### Fetch User Profile Data
### Outputs
<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>
- **Status Code**: The HTTP status code returned by the server
- **Response Body**: The data returned by the server
- **Headers**: Response headers from the server
- **Error**: Any error information if the request fails
### Create Support Ticket
## Example Usage
<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>
Here's an example of how an API block might be configured to fetch weather data:
### 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>
```yaml
# Example API Configuration
url: https://api.weatherapi.com/v1/current.json
method: GET
params:
- key: key
value: your_api_key_here
- key: q
value: London
- key: aqi
value: no
headers:
- key: Accept
value: application/json
```
## Best Practices
@@ -232,3 +125,4 @@ if (<api.status> === 200) {
- **Handle errors gracefully**: Connect error handling logic for failed requests
- **Validate responses**: Check status codes and response formats before processing data
- **Respect rate limits**: Be mindful of API rate limits and implement appropriate throttling
- **Cache responses when appropriate**: For frequently accessed data that doesn't change often

View File

@@ -4,9 +4,9 @@ description: Create conditional logic and branching in your workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { 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.
@@ -15,7 +15,7 @@ The Condition block allows you to branch your workflow execution path based on b
lightSrc="/static/light/condition-light.png"
darkSrc="/static/dark/condition-dark.png"
alt="Condition Block"
width={350}
width={300}
height={175}
/>
@@ -26,31 +26,56 @@ The Condition block allows you to branch your workflow execution path based on b
## Overview
The Condition block enables you to:
The Condition block serves as a decision point in your workflow, enabling:
<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>
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Branching Logic</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Create different execution paths based on specific conditions
</div>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Rule-Based Routing</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Route workflows deterministically without needing an LLM
</div>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Data-Driven Decisions</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Create workflow paths based on structured data values
</div>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">If-Then-Else Logic</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Implement conditional programming paradigms in your workflows
</div>
</div>
</div>
## How It Works
The Condition block operates through a sequential evaluation process:
The Condition block:
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
<Steps>
<Step>
<strong>Evaluate Expression</strong>: Evaluates a boolean expression or condition
</Step>
<Step>
<strong>Determine Result</strong>: Determines whether the condition evaluates to true or false
</Step>
<Step>
<strong>Route Workflow</strong>: Routes the workflow to the appropriate path based on the result
</Step>
<Step>
<strong>Provide Context</strong>: Provides context about the decision made
</Step>
</Steps>
## Configuration Options
@@ -72,165 +97,95 @@ Conditions use JavaScript syntax and can reference input values from previous bl
<Tab>
```javascript
// Check if a score is above a threshold
<agent.score> > 75
input.score > 75
```
</Tab>
<Tab>
```javascript
// Check if a text contains specific keywords
<agent.text>.includes('urgent') || <agent.text>.includes('emergency')
input.text.includes('urgent') || input.text.includes('emergency')
```
</Tab>
<Tab>
```javascript
// Check multiple conditions
<agent.age> >= 18 && <agent.country> === 'US'
input.age >= 18 && input.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']}>
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Conditions</strong>: Array of boolean expressions to evaluate
<strong>Variables</strong>: Values from previous blocks that can be referenced in conditions
</li>
<li>
<strong>Expressions</strong>: JavaScript/TypeScript conditions using block outputs
</li>
<li>
<strong>Routing Paths</strong>: Destination blocks for each condition result
<strong>Conditions</strong>: Boolean expressions to evaluate
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>condition.result</strong>: Boolean result of condition evaluation
<strong>Content</strong>: A description of the evaluation result
</li>
<li>
<strong>condition.matched_condition</strong>: ID of the matched condition
<strong>Condition Result</strong>: The boolean result of the condition evaluation
</li>
<li>
<strong>condition.content</strong>: Description of evaluation result
<strong>Selected Path</strong>: Details of the chosen routing destination
</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
<strong>Selected Condition ID</strong>: Identifier of the condition that was matched
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
## Example Usage
### Customer Support Routing
Here's an example of how a Condition block might be used in a customer satisfaction workflow:
<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>
```yaml
# Example Condition Configuration
conditions:
- id: 'high_satisfaction'
expression: 'input.satisfactionScore >= 8'
description: 'Customer is highly satisfied'
path: 'positive_feedback_block'
### Content Moderation
- id: 'medium_satisfaction'
expression: 'input.satisfactionScore >= 5'
description: 'Customer is moderately satisfied'
path: 'neutral_feedback_block'
<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>
- id: 'default'
expression: 'true'
description: 'Customer is not satisfied'
path: 'improvement_feedback_block'
```
## 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
### Order conditions correctly
Conditions are evaluated in order, so place more specific conditions before general ones. This ensures that more specific logic takes precedence over general fallbacks.
### Include a default condition
Add a catch-all condition (e.g., `true`) as the last condition to handle cases when no other conditions match. This prevents workflow execution from getting stuck.
### Keep expressions simple
Use clear, straightforward boolean expressions for better readability. Complex expressions can be difficult to debug and maintain.
### Document your conditions
Add descriptions to explain the purpose of each condition. This helps other team members understand the logic and makes maintenance easier.
### Test edge cases
Ensure your conditions handle boundary values correctly. Test with values at the edges of your condition ranges to verify correct behavior.

View File

@@ -8,23 +8,24 @@ import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Evaluator block 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.
The Evaluator block allows you to assess the quality of content using customizable evaluation metrics. This is particularly useful for evaluating AI-generated text, ensuring outputs meet specific criteria, and building quality-control mechanisms into your workflows.
<ThemeImage
lightSrc="/static/light/evaluator-light.png"
darkSrc="/static/dark/evaluator-dark.png"
alt="Evaluator Block Configuration"
width={350}
alt="Evaluator Block"
width={300}
height={175}
/>
## What You Can Evaluate
## Overview
**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
The Evaluator block utilizes LLMs to objectively evaluate content based on custom metrics you define. This is especially useful for:
- Assessing the quality of AI-generated content
- Evaluating responses against specific criteria
- Creating scoring frameworks for different types of content
- Building objective feedback loops in your workflows
## Configuration Options
@@ -54,19 +55,16 @@ The content to be evaluated. This can be:
### Model Selection
Choose an AI model to perform the evaluation:
Choose an LLM provider 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
- OpenAI (GPT-4o, o1, o3, , gpt-4.1)
- Anthropic (Claude 3.7 Sonnet)
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
- Groq, Cerebras
- Ollama Local Models
- And more
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/models.mp4"></video>
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate evaluations.
The chosen model should have strong reasoning capabilities to provide accurate evaluations.
### API Key

View File

@@ -8,281 +8,100 @@ 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.
The Function block allows you to write and execute custom JavaScript or TypeScript code directly within your workflow. This powerful feature enables you to implement complex logic, data transformations, and integration with external libraries.
<ThemeImage
lightSrc="/static/light/function-light.png"
darkSrc="/static/dark/function-dark.png"
alt="Function Block with Code Editor"
width={350}
alt="Function Block"
width={300}
height={175}
/>
## Overview
The Function block enables you to:
The Function block brings the full power of JavaScript/TypeScript to your workflows, allowing for:
<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>
- Custom data transformation and manipulation
- Complex conditional logic
- Mathematical calculations and algorithms
- Integration with external libraries
- Creation of reusable utility functions
## How It Works
The Function block runs your code in a secure, isolated environment:
The Function block:
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
1. Takes your custom JavaScript/TypeScript code
2. Executes it in a secure, isolated environment
3. Processes any inputs provided from previous blocks
4. Returns the result for use in subsequent blocks
## Configuration Options
### Code Editor
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`
A full-featured code editor where you can write your JavaScript/TypeScript code. The editor supports:
### Accessing Input Data
- Syntax highlighting
- Code completion
- Error checking
- Multiple lines of code
Use the `input` object to access data from previous blocks:
### Inputs
Your function can access inputs from previous blocks through an `input` object. For example:
```javascript
// Access data from connected blocks
const userData = <agent.userData>;
const orderData = <agent.orderData>;
// Access data from a previous block
const customerName = input.customerData.name;
const orderTotal = input.orderData.total;
// Access specific fields
const customerName = <agent.customer.name>;
const total = <agent.order.total>;
```
// Process the data
const discount = orderTotal > 100 ? 0.1 : 0;
const finalPrice = orderTotal * (1 - discount);
### 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 the result
return {
customerName,
originalTotal: orderTotal,
discount: discount * 100 + '%',
finalPrice
};
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);
## Safety and Limitations
return { subtotal, discount, total };
```
For security and performance reasons, function execution has certain limitations:
**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>
- **Execution Time**: Functions have a maximum execution time to prevent infinite loops
- **Memory Usage**: Memory is limited to prevent excessive resource usage
- **Network Access**: Network calls are restricted to prevent unauthorized access
- **Available APIs**: Only a subset of browser APIs are available
## Inputs and Outputs
<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>
### Inputs
## Example Use Cases
- **Code**: Your JavaScript/TypeScript code to execute
- **Input Data**: Values from previous blocks that can be accessed in your code
### Data Processing Pipeline
### Outputs
<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>
- **Result**: The value returned by your function
- **Standard Output**: Any console output from your function
- **Execution Time**: The time taken to execute your function (in milliseconds)
### Business Logic Implementation
## Example Usage
<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>
Here's an example of a Function block that processes customer data and calculates a loyalty score:
### 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"
```javascript
// Example Function Block Code
// Process customer data and calculate loyalty score
const { purchaseHistory, accountAge, supportTickets } = <agent>;
// Access input from previous blocks
const { purchaseHistory, accountAge, supportTickets } = input;
// Calculate metrics
const totalSpent = purchaseHistory.reduce((sum, purchase) => sum + purchase.amount, 0);
@@ -296,18 +115,23 @@ const supportScore = ticketRatio * 30;
const loyaltyScore = Math.round(spendScore + frequencyScore + supportScore);
// Return results
return {
customer: <agent.name>,
customer: input.name,
loyaltyScore,
loyaltyTier: loyaltyScore >= 80 ? "Platinum" : loyaltyScore >= 60 ? "Gold" : "Silver",
metrics: { spendScore, frequencyScore, supportScore }
loyaltyTier: loyaltyScore >= 80 ? "Platinum" : loyaltyScore >= 60 ? "Gold" : loyaltyScore >= 40 ? "Silver" : "Bronze",
metrics: {
spendScore,
frequencyScore,
supportScore
}
};
```
## Best Practices
- **Keep functions focused**: Write functions that do one thing well 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
- **Keep functions focused**: Write functions that do one thing well
- **Handle errors gracefully**: Use try/catch blocks to handle potential errors
- **Document your code**: Add comments to explain complex logic
- **Test edge cases**: Ensure your code handles unusual inputs correctly
- **Optimize for performance**: Be mindful of computational complexity for large datasets

View File

@@ -1,6 +1,6 @@
---
title: Blocks
description: The building components of your AI workflows
description: Building blocks for your agentic workflows
---
import { Card, Cards } from 'fumadocs-ui/components/card'
@@ -8,121 +8,47 @@ import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { BlockTypes } from '@/components/ui/block-types'
Blocks are the 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.
Blocks are the fundamental building components of Sim Studio workflows. Each block has a specific purpose and can be connected to other blocks to create sophisticated workflows.
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
</div>
## What is a Block?
## Core Block Types
A block is a reusable, configurable component that performs a specific function within your workflow. Blocks have inputs and outputs that allow them to communicate with other blocks. They can process data, make decisions, interact with external systems, or perform computations.
Sim Studio provides seven core block types that handle the essential functions of AI workflows:
## Primary Block Types
### 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
Sim Studio provides six powerful block types that form the foundation of any workflow. Each block is designed to handle specific aspects of your agentic applications, from AI-powered reasoning to conditional logic and external integrations.
<BlockTypes />
## How Blocks Work
## Block Connections
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
Blocks can be connected to form a directed graph representing your workflow. Each connection represents the flow of data from one block to another:
<Steps>
<Step>
<strong>Receive Input</strong>: Block receives data from connected blocks or user input
<strong>Outputs to Inputs</strong>: A block's outputs can be connected to another block's
inputs.
</Step>
<Step>
<strong>Process</strong>: Block processes the input according to its configuration
<strong>Multiple Connections</strong>: A block can have multiple incoming and outgoing
connections.
</Step>
<Step>
<strong>Output Results</strong>: Block produces output data for the next blocks in the workflow
<strong>Conditional Flows</strong>: Some blocks (like Router and Condition) can have multiple
output paths based on conditions.
</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 autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
</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:
Each block type has its own configuration options allowing you to customize its behavior.
**All Blocks**:
- Input/output connections
- Error handling behavior
- Execution timeout settings
### Common Configuration Options
**AI Blocks** (Agent, Router, Evaluator):
- Model selection (OpenAI, Anthropic, Google, local)
- API keys and authentication
- Temperature and other model parameters
- System prompts and instructions
- **Input/output definitions**: Define how data flows in and out of the block
- **Processing instructions**: Configure how the block processes its inputs
- **API keys or authentication details**: Provide necessary credentials for external services
- **Retry policies**: Configure how the block handles failures
- **Error handling behavior**: Define how errors are managed and reported
**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>
See the specific documentation for each block type to learn about its configuration options.

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 Studio 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 +1,4 @@
{
"title": "Blocks",
"pages": [
"agent",
"api",
"condition",
"evaluator",
"function",
"loop",
"parallel",
"response",
"router",
"workflow"
]
"pages": ["agent", "api", "condition", "function", "evaluator", "router", "response", "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 Studio 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

@@ -8,40 +8,38 @@ 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.
The Response block is the final component in API-enabled workflows that transforms your workflow's variables into a structured HTTP response. This block serves as the endpoint that returns data, status codes, and headers back to API callers.
<ThemeImage
lightSrc="/static/light/response-light.png"
darkSrc="/static/dark/response-dark.png"
alt="Response Block Configuration"
width={350}
height={175}
alt="Response Block"
width={430}
height={784}
/>
<Callout type="info">
Response blocks are terminal blocks - they end the workflow execution and cannot connect to other blocks.
Response blocks are terminal blocks - they mark the end of a workflow execution and cannot have further connections.
</Callout>
## When You Need Response Blocks
## Overview
**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
The Response block serves as the final output mechanism for API workflows, enabling you to:
## 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
<Steps>
<Step>
<strong>Return structured data</strong>: Transform workflow variables into JSON responses
</Step>
<Step>
<strong>Set HTTP status codes</strong>: Control the response status (200, 400, 500, etc.)
</Step>
<Step>
<strong>Configure headers</strong>: Add custom HTTP headers to the response
</Step>
<Step>
<strong>Reference variables</strong>: Use workflow variables dynamically in the response
</Step>
</Steps>
## Configuration Options
@@ -117,9 +115,14 @@ Headers are configured as key-value pairs:
</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>
<li>
<strong>response</strong>: Complete response object containing:
<ul className="list-disc space-y-1 pl-6 mt-2">
<li><strong>data</strong>: The response body data</li>
<li><strong>status</strong>: HTTP status code</li>
<li><strong>headers</strong>: Response headers</li>
</ul>
</li>
</ul>
</Tab>
</Tabs>
@@ -182,5 +185,4 @@ headers:
- **Structure your responses consistently**: Maintain a consistent JSON structure across all your API endpoints for better developer experience
- **Include relevant metadata**: Add timestamps and version information to help with debugging and monitoring
- **Handle errors gracefully**: Use conditional logic in your workflow to set appropriate error responses with descriptive messages
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes

View File

@@ -6,73 +6,35 @@ 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'
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.
The Router block is a powerful component in Sim Studio that intelligently routes workflow execution based on content analysis, user input, or predefined conditions. It acts as a decision-making junction in your workflow, directing the flow to different paths based on various criteria.
<ThemeImage
lightSrc="/static/light/router-light.png"
darkSrc="/static/dark/router-dark.png"
alt="Router Block with Multiple Paths"
width={350}
alt="Router Block"
width={300}
height={175}
/>
## Overview
The Router block enables you to:
The Router block uses LLMs to analyze input content and determine the most appropriate next step in your workflow. This allows for:
<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>
- Creating dynamic, adaptable workflows
- Implementing complex decision trees
- Routing user requests to specialized components
- Building conversational systems that can handle diverse inputs
## How It Works
The Router block:
<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>
1. Analyzes the input content using an LLM
2. Evaluates the content against the available target blocks in your workflow
3. Identifies the most appropriate destination based on the content's intent or requirements
4. Routes the workflow execution to the selected block
## Configuration Options
@@ -94,165 +56,65 @@ The possible destination blocks that the Router can select from. The Router will
### Model Selection
Choose an AI model to power the routing decision:
Choose an LLM provider 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
- OpenAI (GPT-4o, o1, o3, o4-mini)
- Anthropic (Claude 3.7 Sonnet)
- Google (Gemini 2.5 Pro, Gemini 2.0 Flash)
- Groq, Cerebras
- Ollama Local Models
- And more
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/router-model-dropdown.mp4"></video>
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate routing decisions.
Select a model with strong reasoning capabilities for more accurate routing decisions.
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
### 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>
### Inputs
## Example Use Cases
- **Content/Prompt**: The text to analyze for routing decisions
- **Target Blocks**: Connected blocks that are potential routing destinations
- **Model Settings**: LLM provider and parameters
### Customer Support Triage
### Outputs
<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**: A summary of the routing decision
- **Model**: The model used for decision-making
- **Tokens**: Usage statistics
- **Selected Path**: Details of the chosen routing destination, including:
- Block ID
- Block Type
- Block Title
### Content Classification
## Example Usage
<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>
Here's an example of how a Router block might be used in a customer support workflow:
### Lead Qualification
```yaml
# Example Router Configuration
prompt: |
Analyze the user query and route to the most appropriate department.
Choose ONE destination based on the query content and intent.
<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>
model: OpenAI/gpt-4
```
In this example, the Router might be connected to:
- A product support block
- A billing inquiries block
- A technical support block
- A general inquiries block
Based on the user's query, the Router would analyze the content and direct it to the most appropriate specialized support block.
## Best Practices
- **Provide clear 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
- **Provide clear descriptions for target blocks**: Help the Router understand when to select each destination
- **Use specific routing criteria**: Define clear conditions for selecting each path
- **Consider fallback paths**: Connect a default destination for when no specific path is appropriate
- **Test with diverse inputs**: Ensure the Router handles various input types correctly
- **Review routing decisions**: Monitor the Router's performance and refine as needed

View File

@@ -71,15 +71,12 @@ Define the data to pass to 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
### Examples of Input References
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
- `<variable.customerData>` - Pass a workflow variable
- `<dataProcessor.result>` - Pass the result from a previous block
- `<start.input>` - Pass the original workflow input
- `<apiCall.data.user>` - Pass a specific field from an API response
### Execution Context
@@ -103,157 +100,132 @@ To prevent infinite recursion and ensure system stability, the Workflow block in
- **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']}>
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow Selection</strong>: Choose which workflow to execute
<strong>Workflow ID</strong>: The identifier of the 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
<strong>Input Variable</strong>: Variable or block reference to pass to the child workflow (e.g., `<variable.name>` or `<block.field>`)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>workflow.response</strong>: Complete output from child workflow
<strong>Response</strong>: The complete output from the child workflow execution
</li>
<li>
<strong>workflow.name</strong>: Name of executed child workflow
<strong>Child Workflow Name</strong>: The name of the executed child workflow
</li>
<li>
<strong>workflow.success</strong>: Boolean indicating completion status
<strong>Success Status</strong>: Boolean indicating whether the child workflow completed successfully
</li>
<li>
<strong>workflow.error</strong>: Error details if workflow failed
<strong>Error Information</strong>: Details about any errors that occurred during execution
</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
<strong>Execution Metadata</strong>: Information about execution time, resource usage, and performance
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
## Example Usage
### Modular Customer Onboarding
Here's an example of how a Workflow block might be used to create a modular customer onboarding process:
<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
}
};
### Parent Workflow: Customer Onboarding
```yaml
# Main customer onboarding workflow
blocks:
- type: workflow
name: "Validate Customer Data"
workflowId: "customer-validation-workflow"
input: "<variable.newCustomer>"
- type: workflow
name: "Setup Customer Account"
workflowId: "account-setup-workflow"
input: "<Validate Customer Data.result>"
- type: workflow
name: "Send Welcome Email"
workflowId: "welcome-email-workflow"
input: "<Setup Customer Account.result.accountDetails>"
```
### Child Workflow: Customer Validation
```yaml
# Reusable customer validation workflow
# Access the input data using: start.input
blocks:
- type: function
name: "Validate Email"
code: |
const customerData = start.input;
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(customerData.email);
- type: api
name: "Check Credit Score"
url: "https://api.creditcheck.com/score"
method: "POST"
body: "<start.input>"
```
### Variable Reference Examples
```yaml
# Using workflow variables
input: "<variable.customerInfo>"
# Using block outputs
input: "<dataProcessor.cleanedData>"
# Using nested object properties
input: "<apiCall.data.user.profile>"
# Using array elements (if supported by the resolver)
input: "<listProcessor.items[0]>"
```
## Access Control and Permissions
The Workflow block respects workspace permissions and access controls:
- **Workspace Membership**: Only workflows within the same workspace can be executed
- **Permission Inheritance**: Child workflows inherit the execution permissions of the parent workflow
- **API Key Access**: Child workflows have access to the same API keys and environment variables as the parent
- **User Context**: The execution maintains the original user context for audit and logging purposes
## Best Practices
- **Keep workflows focused**: Design child workflows to handle specific, well-defined tasks 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
- **Keep workflows focused**: Design child workflows to handle specific, well-defined tasks
- **Minimize nesting depth**: Avoid deeply nested workflow hierarchies for better maintainability
- **Handle errors gracefully**: Implement proper error handling for child workflow failures
- **Document dependencies**: Clearly document which workflows depend on others
- **Version control**: Consider versioning strategies for workflows that are used as components
- **Test independently**: Ensure child workflows can be tested and validated independently
- **Monitor performance**: Be aware that nested workflows can impact overall execution time
## Common Patterns
### Microservice Architecture
Break down complex business processes into smaller, focused workflows that can be developed and maintained independently.
### Reusable Components
Create library workflows for common operations like data validation, email sending, or API integrations that can be reused across multiple projects.
### Conditional Execution
Use workflow blocks within conditional logic to execute different business processes based on runtime conditions.
### Parallel Processing
Combine workflow blocks with parallel execution to run multiple child workflows simultaneously for improved performance.
<Callout type="tip">
When designing modular workflows, think of each workflow as a function with clear inputs, outputs, and a single responsibility.
</Callout>

View File

@@ -71,6 +71,7 @@ Different block types produce different output structures. Here's what you can e
{
"result": "Function return value",
"stdout": "Console output",
"executionTime": 45
}
```
@@ -78,6 +79,7 @@ Different block types produce different output structures. Here's what you can e
- **result**: The return value of the function (can be any type)
- **stdout**: Console output captured during function execution
- **executionTime**: Time taken to execute the function (in milliseconds)
</Tab>
<Tab>

View File

@@ -14,8 +14,8 @@ Connections are the pathways that allow data to flow between blocks in your work
data moves through your system and how blocks interact with each other.
</Callout>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
<div>
<video autoPlay loop muted playsInline className="w-full" src="/connections.mp4"></video>
</div>
## Connection Types

View File

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

View File

@@ -1,208 +1,280 @@
---
title: Logging and Cost Calculation
description: Understanding workflow logs and how execution costs are calculated in Sim Studio
title: Advanced Execution Features
description: Master advanced execution capabilities in Sim Studio
---
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 Studio provides comprehensive logging for workflow executions and automatic cost calculation for AI model usage.
Sim Studio provides several advanced features that give you more control over workflow execution, error handling, and performance optimization.
## Logging System
## Error Handling
Sim Studio offers two complementary logging interfaces:
The execution engine includes built-in error handling mechanisms to make your workflows more robust:
### Real-Time Console (Manual Executions)
### Block-Level Error Handling
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 Studio automatically calculates costs for all AI model usage:
### How Costs Are Calculated
Errors in one block don't necessarily stop the entire workflow execution:
```javascript
cost = (inputTokens × inputPrice + outputTokens × outputPrice) / 1,000,000
// Example of error handling in a Function block
try {
// Potentially risky operation
const result = JSON.parse(input.apiBlock.data);
return { success: true, data: result };
} catch (error) {
// Handle the error gracefully
console.error("Failed to parse JSON:", error.message);
return {
success: false,
error: error.message,
fallbackData: { status: "error", message: "Could not process data" }
};
}
```
### Error Logging
Comprehensive error information is captured in the execution logs:
- **Error Messages**: Clear descriptions of what went wrong
- **Stack Traces**: Detailed information about where errors occurred
- **Context Data**: The inputs that led to the error
- **Timestamps**: When the error occurred
<Callout type="info">
Prices are per million tokens. The calculation divides by 1,000,000 to get the actual cost.
Error logs are invaluable for debugging workflows. Always check the logs first when
troubleshooting execution issues.
</Callout>
### Pricing Options
### Fallback Mechanisms
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
For certain operations, the system provides automatic fallbacks:
- **Function Execution**: Freestyle execution first, then VM execution if needed
- **API Requests**: Automatic retries for transient network errors
- **Model Calls**: Fallback to alternative models if primary model is unavailable
### Recovery Options
Configure blocks to handle failures gracefully:
- **Retry Logic**: Automatically retry failed operations
- **Default Values**: Provide fallback values when operations fail
- **Alternative Paths**: Use conditional blocks to create error handling paths
- **Graceful Degradation**: Continue execution with partial results
## Environment Variables
Environment variables provide a secure way to store and access configuration values:
### Types of Environment Variables
<Tabs items={['API Keys', 'Configuration Values', 'Secrets']}>
<Tab>
**Hosted Models** - Sim Studio 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.*
Store API credentials securely: ``` OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-...
GOOGLE_API_KEY=AIza... ``` These are automatically available to blocks that need them, without
hardcoding sensitive values in your workflow.
</Tab>
<Tab>
Manage environment-specific configuration: ``` MAX_RETRIES=3 DEFAULT_MODEL=gpt-4o LOG_LEVEL=info
BASE_URL=https://api.example.com ``` These values can be referenced in blocks to control behavior
without modifying the workflow itself.
</Tab>
<Tab>
**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*
Store sensitive information securely: ``` DATABASE_PASSWORD=... JWT_SECRET=...
ENCRYPTION_KEY=... ``` These values are encrypted at rest and only decrypted during execution,
providing an extra layer of security.
</Tab>
</Tabs>
### Using Environment Variables
Environment variables can be accessed in different ways depending on the block type:
```javascript
// In Function blocks
const apiKey = process.env.MY_API_KEY
const maxRetries = parseInt(process.env.MAX_RETRIES || '3')
// In API blocks (via connection tags)
// URL: https://api.example.com?key=<env.MY_API_KEY>
// In Agent blocks (via connection tags)
// System prompt: Use the model <env.DEFAULT_MODEL> for this task.
```
<Callout type="warning">
Pricing shown reflects rates as of July 14, 2025. Check provider documentation for current pricing.
Never hardcode sensitive information like API keys directly in your workflows. Always use
environment variables instead.
</Callout>
### Cost Optimization
## Real-Time Monitoring
Sim Studio provides powerful real-time monitoring capabilities:
<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 title="Active Block Indicator">
The currently executing block is highlighted in the workflow editor, making it easy to follow
the execution flow in real-time. This visual indicator helps you understand exactly where in
your workflow the execution is currently happening.
</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 title="Live Logs Panel">
Execution logs appear in real-time in the logs panel on the right side. These logs include
detailed information about each block's execution, including inputs, outputs, execution time, and
any errors that occur. You can use these logs to debug your workflow and understand how data flows
between blocks.
</Accordion>
<Accordion title="Block States">
Each block's state (pending, executing, completed, or error) is visually indicated in the workflow
editor. This helps you quickly identify which blocks have executed successfully and which may have
encountered issues.
</Accordion>
<Accordion title="Performance Metrics">
Detailed timing information shows how long each block takes to execute, helping you identify
performance bottlenecks in your workflow. The execution engine tracks start time, end time, and
total duration for both individual blocks and the entire workflow.
</Accordion>
</Accordions>
## Usage Monitoring
## Performance Optimization
Monitor your usage and billing in Settings → Subscription:
Optimize your workflows for better performance:
- **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
### Block Optimization
- **Break Down Complex Blocks**: Split complex operations into multiple simpler blocks
- **Minimize External Calls**: Batch API requests where possible
- **Cache Results**: Use Memory blocks to store and reuse results
- **Optimize Function Code**: Write efficient JavaScript/TypeScript code
### Data Flow Optimization
- **Filter Data Early**: Process only the data you need as early as possible
- **Minimize Data Transfer**: Pass only necessary fields between blocks
- **Use Appropriate Data Structures**: Choose efficient data structures for your use case
- **Avoid Redundant Computations**: Don't recalculate values that haven't changed
### Execution Configuration
- **Set Appropriate Timeouts**: Configure timeouts based on expected execution time
- **Limit Parallel Executions**: Control how many workflows can run simultaneously
- **Schedule During Off-Peak Hours**: Run resource-intensive workflows when system load is lower
- **Monitor Resource Usage**: Keep an eye on memory and CPU usage
<Callout type="info">
Performance optimization is especially important for workflows that run frequently or process
large amounts of data.
</Callout>
## Advanced Execution Context
The execution context maintains detailed information about the workflow execution:
```javascript
// Example of execution context structure (simplified)
{
// Block states indexed by block ID
blockStates: {
"block-1": { output: { content: "..." }, status: "completed" },
"block-2": { output: { data: { ... } }, status: "completed" },
"block-3": { status: "pending" }
},
// Active execution path
activeExecutionPath: Set(["block-1", "block-2", "block-5"]),
// Routing decisions
decisions: {
router: Map(["router-1" => "block-5"]),
condition: Map(["condition-1" => "condition-true"])
},
// Loop iterations
loopIterations: Map(["loop-1" => 2]),
// Environment variables
env: { "API_KEY": "...", "MAX_RETRIES": "3" },
// Execution logs
logs: [
{ blockId: "block-1", timestamp: "...", status: "completed", duration: 120 },
{ blockId: "block-2", timestamp: "...", status: "completed", duration: 85 }
]
}
```
This context is used internally by the execution engine but understanding its structure can help you debug complex workflows.
## Debugging Techniques
Advanced techniques for debugging workflow execution:
### Console Logging
Add strategic console.log statements in Function blocks:
```javascript
console.log('Input to processData:', JSON.stringify(input, null, 2))
console.log('Processing step 1 complete:', intermediateResult)
console.log('Final result:', finalResult)
```
### State Inspection
Use Function blocks to inspect the current state:
```javascript
function debugState() {
// Log all inputs
console.log('All inputs:', input)
// Return a debug object with relevant information
return {
debug: true,
inputSummary: {
hasUserData: !!input.userBlock,
apiStatus: input.apiBlock?.status,
itemCount: input.dataBlock?.items?.length || 0,
},
timestamp: new Date().toISOString(),
}
}
```
### Execution Tracing
Enable detailed execution tracing for complex workflows:
1. Add a Memory block to accumulate trace information
2. Add trace logging in key Function blocks
3. Review the trace after execution to understand the flow
### Performance Profiling
Identify performance bottlenecks:
```javascript
function profileOperation() {
const start = performance.now()
// Perform the operation
const result = performExpensiveOperation()
const end = performance.now()
console.log(`Operation took ${end - start}ms`)
return {
result,
executionTime: end - start,
}
}
```
By mastering these advanced execution features, you can create more robust, efficient, and sophisticated workflows in Sim Studio.

View File

@@ -7,7 +7,6 @@ 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,
@@ -15,37 +14,44 @@ import {
CodeIcon,
ConditionalIcon,
ConnectIcon,
ResponseIcon,
StarterIcon,
LoopIcon,
ParallelIcon,
} from '@/components/icons'
When you run a workflow in Sim Studio, the execution engine follows a systematic process to ensure blocks are executed in the correct order with proper data flow.
When you run a workflow in Sim Studio, the execution engine follows a systematic process to ensure blocks are executed in the correct order and data flows properly between them.
## Execution Flow
The execution engine runs workflows in layers, processing blocks based on their dependencies:
The execution of a workflow follows these key steps:
<Steps>
<Step>
<strong>Validation</strong>: Ensures the workflow has a starter block with no incoming connections and all blocks are properly connected.
### Validation Before execution begins, the workflow is validated to ensure it has: - An enabled
starter block with no incoming connections - Properly connected blocks with valid configurations
- No circular dependencies (except in intentional loops) - Valid input and output types between
connected blocks
</Step>
<Step>
<strong>Layer-based Execution</strong>: Identifies which blocks can execute next based on completed dependencies and executes them in parallel.
</Step>
<Step>
### Initialization The execution context is created, which includes: - Environment variables for
the workflow - Input values from the starter block - Initial state for all blocks - Execution path
tracking - Loop iteration counters
</Step>
<Step>
### Block Execution Blocks are executed in topological order (based on dependencies): - The system
identifies which blocks can be executed next - Inputs for each block are resolved from previous
block outputs - Each block is executed by its specialized handler - Outputs are stored in the
execution context
</Step>
<Step>
### Path Determination As execution progresses, the system determines which paths to follow: -
Router and conditional blocks make decisions about execution paths - Only blocks on active paths
are executed - The path tracker maintains the current execution state
</Step>
<Step>
<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.
### Result Collection After all blocks have executed: - Final outputs are collected - Execution
logs are compiled - Performance metrics are calculated - Results are presented in the UI
</Step>
</Steps>
@@ -60,7 +66,7 @@ Different block types have different execution behaviors:
<Files>
<File
name="Starter Block"
icon={<StarterIcon className="h-4 w-4" />}
icon={<ConnectIcon className="h-4 w-4" />}
annotation="Initiates workflow execution and provides initial input values. Every workflow must have exactly one starter block."
/>
<File
@@ -73,16 +79,6 @@ Different block types have different execution behaviors:
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>
@@ -106,11 +102,6 @@ Different block types have different execution behaviors:
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>
@@ -124,21 +115,6 @@ Different block types have different execution behaviors:
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" />}
@@ -161,10 +137,6 @@ Run workflows on-demand through the Sim Studio interface by clicking the "Run" b
- One-off tasks
- Workflows that need human supervision
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/input-format.mp4"></video>
</div>
### Scheduled Execution
Configure workflows to run automatically on a specified schedule:
@@ -174,10 +146,6 @@ Configure workflows to run automatically on a specified schedule:
- Configure timezone settings
- Set minimum and maximum execution intervals
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/configure-schedule.mp4"></video>
</div>
### API Endpoints
Each workflow can be exposed as an API endpoint:
@@ -187,20 +155,6 @@ Each workflow can be exposed as an API endpoint:
- Send custom inputs via POST requests
- Receive execution results as JSON responses
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/api-deployment.mp4"></video>
</div>
#### Viewing Deployed APIs
Monitor your deployed workflow APIs and their current state:
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/api-redeployment.mp4"></video>
</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:
@@ -210,10 +164,6 @@ Configure workflows to execute in response to external events:
- Configure webhook security settings
- Support for specialized webhooks (GitHub, Stripe, etc.)
<div className="mx-auto w-full overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/webhooks.mp4"></video>
</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
@@ -222,21 +172,29 @@ Configure workflows to execute in response to external events:
## Execution Context
Each workflow execution maintains a context that tracks:
Each workflow execution maintains a detailed context that includes:
- **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
- **Execution Path**: The active path through the workflow
- **Routing Decisions**: Records of which paths were selected
- **Environment Variables**: Configuration values for the workflow
- **Execution Logs**: Detailed records of each step in the execution
## Real-Time Monitoring
This context is maintained throughout the execution and is used to:
Monitor your workflow execution in real-time:
- Resolve inputs for blocks
- Determine which blocks to execute next
- Track the progress of execution
- Provide debugging information
- Store intermediate results
- **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
## Real-Time Execution Monitoring
These monitoring features help you understand workflow behavior and quickly identify any issues.
As your workflow executes, you can monitor its progress in real-time:
- **Active Block Highlighting**: The currently executing block is highlighted
- **Live Logs**: Execution logs appear in real-time in the logs panel
- **Block States**: Visual indicators show each block's execution state
- **Performance Metrics**: Timing information for each block's execution
These monitoring features help you understand how your workflow is executing and identify any issues that arise.

View File

@@ -3,16 +3,39 @@ title: Execution
description: Understand how workflows are executed in Sim Studio
---
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import {
AgentIcon,
ApiIcon,
ChartBarIcon,
CodeIcon,
ConditionalIcon,
ConnectIcon,
ExaAIIcon,
FirecrawlIcon,
GmailIcon,
NotionIcon,
PerplexityIcon,
SlackIcon,
} from '@/components/icons'
Sim Studio's execution engine brings your workflows to life by processing blocks in the correct order, managing data flow, and handling errors gracefully.
Sim Studio provides a powerful execution engine that brings your workflows to life. Understanding how execution works will help you design more effective workflows and troubleshoot any issues that arise.
<div>
<video autoPlay loop muted playsInline className="w-full" src="/loops.mp4"></video>
</div>
<Callout type="info">
Every workflow execution follows a deterministic path based on your block connections and logic, ensuring predictable and reliable results.
The execution engine handles everything from block execution order to data flow, error handling,
and loop management. It ensures your workflows run efficiently and predictably.
</Callout>
## Documentation Overview
## Execution Documentation
<Cards>
<Card title="Execution Basics" href="/execution/basics">
@@ -20,109 +43,223 @@ Sim Studio's execution engine brings your workflows to life by processing blocks
workflow
</Card>
<Card title="Logging and Cost Calculation" href="/execution/advanced">
Understand workflow logs and how execution costs are calculated in Sim Studio
<Card title="Loops" href="/execution/loops">
Master the powerful loop functionality to create iterative processes and feedback mechanisms
</Card>
<Card title="Advanced Features" href="/execution/advanced">
Discover advanced capabilities like error handling, environment variables, and performance
optimization
</Card>
</Cards>
## Key Concepts
## Key Execution 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.
- **Topological Execution** - Blocks are executed in dependency order, ensuring data flows correctly
- **Path Tracking** - The system tracks active execution paths based on routing decisions
- **Loop Management** - Sophisticated loop handling allows for iterative processing with safeguards
- **Real-time Monitoring** - Watch your workflow execute with detailed logs and visual indicators
- **Error Handling** - Robust error management keeps your workflows resilient
### Path Tracking
The engine actively tracks execution paths through your workflow. Router and Condition blocks dynamically update these paths, ensuring only relevant blocks execute.
Whether you're building simple automations or complex AI workflows, understanding execution is key to creating effective solutions in Sim Studio.
### 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 Flow
### 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
When you execute a workflow in Sim Studio, the system follows a predictable pattern:
## Execution Triggers
<Steps>
<Step>
### Validation The workflow is validated to ensure it has an enabled starter block and proper
connections. This includes checking that: - The starter block has no incoming connections - All
required blocks are present and properly connected - Loop configurations are valid with
appropriate iteration limits
</Step>
Workflows can be executed through multiple channels:
<Step>
### Initialization The execution context is created with environment variables and input values.
This context maintains the state of the workflow throughout execution, including: - Block outputs
and states - Execution path tracking - Routing decisions - Loop iteration counters
</Step>
- **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
<Step>
### Block Execution Blocks are executed in topological order, with each block's outputs feeding
into subsequent blocks. The executor: - Determines the next layer of blocks to execute based on
dependencies - Resolves inputs for each block from previous outputs - Dispatches execution to
specialized handlers for each block type
</Step>
### Deploy as API
<Step>
### Path Determination Router and conditional blocks make routing decisions that determine which
execution paths to follow. The path tracker: - Updates the active execution path based on these
decisions - Ensures that only blocks on active paths are executed - Handles complex branching
logic in your workflow
</Step>
When you deploy a workflow as an API, Sim Studio:
- Creates a unique HTTP endpoint: `https://simstudio.ai/api/workflows/{workflowId}/execute`
- Generates an API key for authentication
- Accepts POST requests with JSON payloads
- Returns workflow execution results as JSON
<Step>
### Result Collection The final output and execution logs are collected and presented in the UI.
You'll see: - Complete execution logs for each block - Performance metrics and timing
information - Any errors that occurred during execution - The final workflow output
</Step>
</Steps>
Example API call:
```bash
curl -X POST https://simstudio.ai/api/workflows/your-workflow-id/execute \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"input": "your data here"}'
```
## Block Types
### Deploy as Chat
Sim Studio has two main categories of blocks in workflows:
Chat deployment creates a conversational interface for your workflow:
- Hosted on a custom subdomain: `https://your-name.simstudio.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
<Tabs items={['Orchestration Blocks', 'Output Blocks']}>
<Tab value="Orchestration Blocks">
<Card>
Orchestration blocks control the flow of execution through your workflow.
<Files>
<File
name="Router Blocks"
icon={<ConnectIcon className="h-4 w-4" />}
annotation="Direct the workflow along specific paths based on dynamic decisions. The router evaluates inputs and selects one of multiple possible paths."
/>
<File
name="Conditional Blocks"
icon={<ConditionalIcon className="h-4 w-4" />}
annotation="Execute different paths based on conditional logic. Conditions are evaluated to true or false, determining which path to follow."
/>
</Files>
</Card>
</Tab>
Each deployment method passes data to your workflow's starter block, beginning the execution flow.
<Tab value="Output Blocks">
<Card>
Output blocks perform operations and generate results that can be used by downstream blocks.
<Files>
<File
name="Agent Block"
icon={<AgentIcon className="h-4 w-4" />}
annotation="Interact with AI models to generate content. Supports various LLM providers with optional tool calling capabilities."
/>
<File
name="Function Blocks"
icon={<CodeIcon className="h-4 w-4" />}
annotation="Execute custom JavaScript/TypeScript code to process data. Runs in a secure sandbox environment with appropriate timeout limits."
/>
<File
name="API Blocks"
icon={<ApiIcon className="h-4 w-4" />}
annotation="Make HTTP requests to external services. Configure headers, body, and authentication for REST API interactions."
/>
<File
name="Evaluator Blocks"
icon={<ChartBarIcon className="h-4 w-4" />}
annotation="Assess outputs against defined criteria with customizable scoring logic."
/>
</Files>
</Card>
</Tab>
</Tabs>
## Programmatic Execution
## Real-Time Monitoring
Execute workflows from your applications using our official SDKs:
As your workflow executes, Sim Studio provides powerful real-time monitoring capabilities:
```bash
# TypeScript/JavaScript
npm install simstudio-ts-sdk
<Accordions>
<Accordion title="Active Block Indicator">
The currently executing block is highlighted in the workflow editor, making it easy to follow
the execution flow in real-time. This visual indicator helps you understand exactly where in
your workflow the execution is currently happening.
</Accordion>
# Python
pip install simstudio-sdk
```
<Accordion title="Live Logs Panel">
Execution logs appear in real-time in the logs panel on the right side. These logs include
detailed information about each block's execution, including inputs, outputs, execution time, and
any errors that occur. You can use these logs to debug your workflow and understand how data flows
between blocks.
</Accordion>
```typescript
// TypeScript Example
import { SimStudioClient } from 'simstudio-ts-sdk';
<Accordion title="Block States">
Each block's state (pending, executing, completed, or error) is visually indicated in the workflow
editor. This helps you quickly identify which blocks have executed successfully and which may have
encountered issues.
</Accordion>
const client = new SimStudioClient({
apiKey: 'your-api-key'
});
<Accordion title="Performance Metrics">
Detailed timing information shows how long each block takes to execute, helping you identify
performance bottlenecks in your workflow. The execution engine tracks start time, end time, and
total duration for both individual blocks and the entire workflow.
</Accordion>
</Accordions>
const result = await client.executeWorkflow('workflow-id', {
input: { message: 'Hello' }
});
```
## Execution Methods
## Best Practices
Sim Studio offers multiple ways to trigger workflow execution:
### Design for Reliability
- Handle errors gracefully with appropriate fallback paths
- Use environment variables for sensitive data
- Add logging to Function blocks for debugging
<Cards>
<Card title="Manual Execution" href="#">
Run workflows on-demand through the Sim Studio interface. This is perfect for testing and
development, allowing you to iteratively refine your workflow with immediate feedback.
</Card>
### Optimize Performance
- Minimize external API calls where possible
- Use parallel execution for independent operations
- Cache results with Memory blocks when appropriate
<Card title="Scheduled Execution" href="#">
Configure workflows to run automatically on a specified schedule using cron expressions. Ideal for
regular data processing, reporting tasks, or any workflow that needs to run periodically without
manual intervention.
</Card>
### Monitor Executions
- Review logs regularly to understand performance patterns
- Track costs for AI model usage
- Use workflow snapshots to debug issues
<Card title="API Endpoints" href="#">
Each workflow can be exposed as an API endpoint with authentication, allowing external systems to
trigger execution with custom inputs. This enables seamless integration with your existing
applications and services.
</Card>
## What's Next?
<Card title="Webhooks" href="#">
Configure workflows to execute in response to external events via webhook triggers. This allows
your workflows to react to events from third-party services like GitHub, Stripe, or any platform
that supports webhooks.
</Card>
</Cards>
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.
## Advanced Execution Features
### Loops
Sim Studio supports sophisticated loop constructs, allowing parts of your workflow to execute repeatedly:
- **Iteration Limits** - Configure maximum iterations (default: 5) to prevent infinite loops and minimum iterations to ensure the loop executes a certain number of times.
- **Conditional Looping** - Continue looping until specific conditions are met, with the loop manager tracking iteration counts.
- **Loop Reset** - Automatically resets block states between iterations, allowing blocks to be re-executed with updated inputs.
- **Feedback Paths** - Create feedback loops where outputs from later blocks feed back into earlier blocks in the workflow.
### Error Handling
The execution engine includes built-in error handling mechanisms:
- **Block-Level Errors** - Errors in one block don't necessarily stop the entire workflow execution.
- **Detailed Error Logs** - Comprehensive error information is captured in the execution logs, including error messages, stack traces, and relevant context.
- **Fallback Mechanisms** - For function execution, the system tries Freestyle execution first, then falls back to VM execution if needed.
- **Recovery Options** - Configure blocks to retry on failure or implement custom error handling logic.
### Environment Variables
Use environment variables to securely store and access sensitive information:
- **API Keys** - Store API credentials securely without hardcoding them in your workflow.
- **Configuration Values** - Manage environment-specific configuration values.
- **Runtime Availability** - All environment variables are available to blocks during execution.
- **Secure Storage** - Values are encrypted at rest and only decrypted during execution.
## Execution Context
Each workflow execution maintains a detailed context that includes:
- **Block States** - Outputs and execution status of each block, indexed by block ID.
- **Execution Path** - The active path through the workflow based on routing decisions.
- **Routing Decisions** - Records which paths were selected by router and conditional blocks.
- **Loop Iterations** - Tracks current iteration count for each loop in the workflow.
- **Environment Variables** - Configuration values available to all blocks during execution.
- **Execution Logs** - A chronological record of block executions with timing information.
## Performance Considerations
- **Block Complexity** - Complex blocks with heavy computation may take longer to execute. Consider breaking complex operations into multiple blocks.
- **External Dependencies** - Blocks that rely on external services may be affected by network latency or service availability.
- **Execution Layers** - The executor processes blocks in layers based on dependencies, which can affect overall execution time.
- **Code Optimization** - For function blocks, optimize your code to reduce execution time and resource usage.
- **Timeout Limits** - Function blocks have configurable timeout limits to prevent long-running operations from blocking execution.
By understanding these execution principles, you can design more efficient and effective workflows in Sim Studio.

View File

@@ -0,0 +1,214 @@
---
title: Loops
description: Creating iterative processes with loops in Sim Studio
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
Loops are a powerful feature in Sim Studio that allow you to create iterative processes, implement feedback mechanisms, and build more sophisticated workflows.
<div>
<video autoPlay loop muted playsInline className="w-full" src="/loops.mp4"></video>
</div>
## What Are Loops?
Loops in Sim Studio allow a group of blocks to execute repeatedly, with each iteration building on the results of the previous one. This enables:
- **Iterative Refinement**: Progressively improve outputs through multiple passes
- **Batch Processing**: Process collections of items one at a time
- **Feedback Mechanisms**: Create systems that learn from their own outputs
- **Conditional Processing**: Continue execution until specific criteria are met
<Callout type="info">
Loops are particularly powerful for AI workflows, allowing you to implement techniques like
chain-of-thought reasoning, recursive refinement, and multi-step problem solving.
</Callout>
## Creating Loops
To create a loop in your workflow:
<Steps>
<Step>
<strong>Select Blocks</strong>: Choose the blocks you want to include in the loop
</Step>
<Step>
<strong>Create Loop</strong>: Use the "Create Loop" option in the editor
</Step>
<Step>
<strong>Configure Loop Settings</strong>: Set iteration limits and conditions
</Step>
<Step>
<strong>Create Feedback Connections</strong>: Connect outputs from later blocks back to earlier
blocks
</Step>
</Steps>
## Loop Configuration
When configuring a loop, you can set several important parameters:
### Iteration Limits
- **Maximum Iterations**: The maximum number of times the loop can execute (default: 5)
- **Minimum Iterations**: The minimum number of times the loop must execute before checking conditions
<Callout type="warning">
Always set a reasonable maximum iteration limit to prevent infinite loops. The default limit of 5
iterations is a good starting point for most workflows.
</Callout>
### Loop Conditions
Loops can continue based on different types of conditions:
<Tabs items={['Conditional Block', 'Function Block', 'Fixed Iterations']}>
<Tab>
Use a Condition block to determine whether the loop should continue:
```javascript
// Example condition in a Condition block
function shouldContinueLoop() {
// Get the current score from an evaluator block
const score = input.evaluatorBlock.score;
// Continue looping if score is below threshold
return score < 0.8;
}
```
The loop will continue executing as long as the condition returns true and the maximum iteration limit hasn't been reached.
</Tab>
<Tab>
Use a Function block to implement complex loop conditions:
```javascript
// Example condition in a Function block
function processAndCheckContinuation() {
// Process data from previous blocks
const currentResult = input.agentBlock.content;
const previousResults = input.memoryBlock.results || [];
// Store results for comparison
const allResults = [...previousResults, currentResult];
// Check if we've converged (results not changing significantly)
const shouldContinue = previousResults.length === 0 ||
currentResult !== previousResults[previousResults.length - 1];
return {
results: allResults,
shouldContinue: shouldContinue
};
}
```
Connect this Function block's output to a Condition block to control the loop.
</Tab>
<Tab>
Execute the loop for a fixed number of iterations:
```
// Set in loop configuration
Minimum Iterations: 3
Maximum Iterations: 3
```
This will run the loop exactly 3 times, regardless of any conditions.
</Tab>
</Tabs>
## Loop Execution
When a workflow with loops executes, the loop manager handles the iteration process:
1. **First Pass**: All blocks in the loop execute normally
2. **Iteration Check**: The system checks if another iteration should occur
3. **State Reset**: If continuing, block states within the loop are reset
4. **Next Iteration**: The loop blocks execute again with updated inputs
5. **Termination**: The loop stops when either:
- The maximum iteration count is reached
- A loop condition evaluates to false (after minimum iterations)
## Loop Use Cases
Loops enable powerful workflow patterns:
### Iterative Refinement
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Example: Content Refinement</h4>
<div className="mb-2 text-sm text-gray-600 dark:text-gray-400">
Create a loop where an Agent block generates content, an Evaluator block assesses it, and a
Function block decides whether to continue refining.
</div>
<ol className="list-decimal pl-5 text-sm">
<li>Agent generates initial content</li>
<li>Evaluator scores the content</li>
<li>Function analyzes score and provides feedback</li>
<li>Loop back to Agent with feedback for improvement</li>
<li>Continue until quality threshold is reached</li>
</ol>
</div>
### Batch Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Example: Data Processing Pipeline</h4>
<div className="mb-2 text-sm text-gray-600 dark:text-gray-400">
Process a collection of items one at a time through a series of blocks.
</div>
<ol className="list-decimal pl-5 text-sm">
<li>Function block extracts the next item from a collection</li>
<li>Processing blocks operate on the single item</li>
<li>Results are accumulated in a Memory block</li>
<li>Loop continues until all items are processed</li>
</ol>
</div>
### Recursive Problem Solving
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Example: Multi-step Reasoning</h4>
<div className="mb-2 text-sm text-gray-600 dark:text-gray-400">
Implement a recursive approach to complex problem solving.
</div>
<ol className="list-decimal pl-5 text-sm">
<li>Agent analyzes the current problem state</li>
<li>Function block implements a step in the solution</li>
<li>Condition block checks if the problem is solved</li>
<li>Loop continues until solution is found or maximum steps reached</li>
</ol>
</div>
## Best Practices for Loops
To use loops effectively in your workflows:
- **Set Appropriate Limits**: Always configure reasonable iteration limits
- **Use Memory Blocks**: Store state between iterations with Memory blocks
- **Include Exit Conditions**: Define clear conditions for when loops should terminate
- **Monitor Performance**: Watch for performance impacts with many iterations
- **Test Thoroughly**: Verify that loops terminate as expected in all scenarios
<Callout type="warning">
Loops with many blocks or complex operations can impact performance. Consider optimizing
individual blocks if your loops need many iterations.
</Callout>
## Loop Debugging
When debugging loops in your workflows:
- **Check Iteration Counts**: Verify the loop is executing the expected number of times
- **Inspect Block Inputs/Outputs**: Look at how data changes between iterations
- **Review Loop Conditions**: Ensure conditions are evaluating as expected
- **Use Console Logging**: Add console.log statements in Function blocks to track loop progress
- **Monitor Memory Usage**: Watch for growing data structures that might cause performance issues
By mastering loops, you can create much more sophisticated and powerful workflows in Sim Studio.

View File

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

View File

@@ -1,6 +1,6 @@
---
title: Getting Started
description: Build your first AI workflow in 5 minutes
description: Build, test, and optimize your agentic workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
@@ -8,7 +8,6 @@ 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,
@@ -24,171 +23,79 @@ import {
SlackIcon,
} from '@/components/icons'
This tutorial will guide you through building your first AI workflow in Sim Studio. We'll create a people research agent that can find information about individuals using state-of-the-art LLM-Search tools.
Sim Studio is a powerful, user-friendly platform for building, testing, and optimizing your agentic workflows. This documentation will help you understand how to use the various components of Sim Studio to create sophisticated agent-based applications.
<Callout type="info">
This tutorial takes about 10 minutes and covers the essential concepts of building workflows in Sim Studio.
This guide will walk you through the essential concepts and help you get started building your
first workflow.
</Callout>
## What We're Building
## Core Components
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
Sim Studio is built around two primary components:
<ThemeImage
lightSrc="/static/examples/started/started-1.png"
darkSrc="/static/examples/started/started-1.png"
alt="Getting Started Example"
width={800}
height={500}
/>
### Blocks
## Step-by-Step Tutorial
<Steps>
<Step title="Create workflow and add AI agent">
Open Sim Studio 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 autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-2.mp4"></video>
</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 autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-3.mp4"></video>
</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 autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-4.mp4"></video>
</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 autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-5.mp4"></video>
</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 autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-6.mp4"></video>
</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
Blocks are the fundamental building elements of your workflows. Each block serves a specific purpose:
<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"
annotation="Create AI agents using any LLM provider"
/>
<File
name="API Block"
icon={<ApiIcon className="h-4 w-4" />}
annotation="Connect to external services and APIs"
/>
<File
name="Condition Block"
icon={<ConditionalIcon className="h-4 w-4" />}
annotation="Add conditional branching to your workflows"
/>
<File
name="Function Block"
icon={<CodeIcon className="h-4 w-4" />}
annotation="Execute custom JavaScript/TypeScript code"
/>
<File
name="Evaluator Block"
icon={<ChartBarIcon className="h-4 w-4" />}
annotation="Assess responses against defined criteria"
/>
<File
name="Router Block"
icon={<ConnectIcon className="h-4 w-4" />}
annotation="Direct workflow execution based on input analysis"
/>
</Files>
### Core Workflow Concepts
### Tools
**Data Flow**: Variables flow between blocks by dragging connections
Tools extend the capabilities of agents. They provide additional functionality for agents by enabling you to interface with your favorite data sources and take action (e.g posting on X, sending an email)
**Chat Interface**: Test workflows in real-time using the chat panel with different output options
<Files>
<File name="Gmail Tool" icon={<GmailIcon className="h-4 w-4" />} />
<File name="Firecrawl Tool" icon={<FirecrawlIcon className="h-4 w-4" />} />
<File name="Perplexity Tool" icon={<PerplexityIcon className="h-4 w-4" />} />
<File name="Notion Tool" icon={<NotionIcon className="h-4 w-4" />} />
<File name="Exa AI Tool" icon={<ExaAIIcon className="h-4 w-4" />} />
<File name="Slack Tool" icon={<SlackIcon className="h-4 w-4" />} />
</Files>
**Tool Integration**: Enhance agent capabilities by adding external tools like Exa and Linkup
## Getting Started
**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.
<Steps>
<Step title="Create a new workflow">
Start by creating a new workflow in the Sim Studio dashboard.
</Step>
<Step title="Add your first block">Drag and drop a block from the sidebar onto the canvas.</Step>
<Step title="Configure the block">
Set up the block's parameters and inputs according to your needs.
</Step>
<Step title="Connect blocks">
Create connections between blocks to define the flow of data and execution.
</Step>
<Step title="Test your workflow">Run your workflow with test inputs to verify its behavior.</Step>
</Steps>

View File

@@ -1,94 +1,84 @@
---
title: Introduction
description: Build AI workflows visually without code
description: The UI for agents
---
import { Card, Cards } from 'fumadocs-ui/components/card'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
import { Features } from '@/components/ui/features'
Sim Studio 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.
Sim Studio is a powerful platform for building, testing, and optimizing agentic workflows. It provides developers with intuitive tools to design sophisticated agent-based applications through a visual interface. Whether you're prototyping a simple AI assistant or building complex multi-agent systems, Sim Studio offers the flexibility and performance needed for modern AI applications.
## What Makes Sim Studio Powerful
## Why Sim Studio?
**Multi-Model AI Support** - Connect to OpenAI, Anthropic, Google, Groq, Cerebras, and local models through Ollama. Switch providers without rebuilding workflows.
Building agentic applications requires extensive coding and integration work. Developers spend more time on infrastructure and plumbing than focusing on core AI logic. Sim Studio changes this with a <span className="text-highlight">comprehensive visual workflow editor</span> that handles complexity while keeping you in control of what matters.
**60+ Pre-Built Tools** - Gmail, Slack, Notion, Google Sheets, Airtable, Supabase, Pinecone, and more. Extensible architecture allows custom tool integration.
## How Sim Studio Differs
**Flexible Execution** - Run workflows via chat interface, REST API, webhooks, scheduled jobs, or trigger from external systems.
Sim Studio takes a fundamentally different approach from existing agent development solutions:
**Production Deployment** - Deploy as APIs, integrate with existing systems using our SDK, or embed as plugins. Built-in monitoring, logging, and error handling.
### Focus on What Matters
**Real-time Collaboration** - Work simultaneously with team members on the same workflow, like Google Docs for AI development.
Developers waste countless hours customizing multi-agent frameworks, writing boilerplate code, creating integrations, and building tooling from scratch. By the time they've configured their environment, precious resources are consumed before any real agent work begins.
Connect multiple AI models, integrate with 60+ services, and deploy production-ready applications through an intuitive visual interface designed specifically for AI development.
Sim Studio eliminates this overhead. We've distilled agent development to its essence, removing boilerplate and infrastructure complexity. With Sim Studio, you can <span className="text-highlight">immediately start designing intelligence</span> rather than wrestling with configuration. Your time is best spent refining agent behaviors, not writing glue code that doesn't improve the end-user experience.
## Core Building Blocks
### Provider-Aligned Interfaces
**Processing Blocks**
Existing frameworks abstract away provider-specific features, forcing developers to navigate layers of abstraction to access specific capabilities. The result: lost functionality, reduced flexibility, and additional code to bridge these gaps.
- **Agent** - Execute AI model inference with any LLM provider
- **API** - Connect to REST endpoints and external services
- **Function** - Run custom JavaScript for data processing
Sim Studio stays <span className="text-highlight">close to provider definitions</span>, directly exposing the parameters that matter:
**Logic Blocks**
<ul className="highlight-markers list-disc space-y-2 pl-6">
<li>System prompts and instructions with native formatting</li>
<li>Tool definitions and access patterns that match provider implementations</li>
<li>Temperature and sampling parameters with their full range of options</li>
<li>Structured output formatting that aligns with provider capabilities</li>
<li>Model selection and configuration with provider-specific optimizations</li>
</ul>
- **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
This approach gives you full control over agent behavior without unnecessary complexity. You leverage each provider's full capabilities without sacrificing the convenience of a unified platform.
**Output Blocks**
### Unified Model Interface
- **Response** - Format and return final workflow results
- **Evaluator** - Validate outputs against defined criteria
Most environments lock you into a specific LLM provider early in development. Changing providers later requires significant refactoring, often affecting your entire application architecture and limiting your ability to leverage advances in model capabilities.
## Built-in Integrations
Our platform provides a <span className="text-highlight">consistent interface across different AI models</span>, letting you switch between OpenAI, Anthropic, Claude, Llama, Gemini and others without rewriting your agent logic. This model-agnostic approach future-proofs your applications and gives you freedom to select the best model for each specific use case—optimize for cost with one agent and performance with another, all within the same workflow.
**AI Models**: OpenAI, Anthropic, Google, Groq, Cerebras, Ollama
### AI-Native Design
**Communication**: Gmail, Slack, Telegram, WhatsApp, Microsoft Teams
Traditional development environments were designed for conventional software and later adapted for AI. These adaptations often feel like afterthoughts, with AI capabilities awkwardly grafted onto existing paradigms.
**Data Sources**: Notion, Google Sheets, Airtable, Supabase, Pinecone
Sim Studio is <span className="text-highlight">built from the ground up as an AI-native application</span>. Every aspect—from the visual workflow editor to testing environments—is designed specifically for agent development. Common AI development patterns are first-class concepts in our platform, not workarounds. Testing prompts, adjusting parameters, or implementing complex tool calling patterns feel natural because they're core to our design philosophy.
**Web Services**: Firecrawl, Google Search, Exa AI, Perplexity
### Local Development Support
**Development**: GitHub, Jira, Linear, browser automation
Many AI platforms force you to develop against cloud APIs, creating dependencies on internet connectivity, increasing costs, and introducing privacy concerns with sensitive data.
## Use Cases
Sim Studio supports <span className="text-highlight">full local development</span> using Ollama integration. Develop with privacy-preserving local models, then seamlessly deploy with cloud providers in production. This hybrid approach gives you the best of both worlds: privacy, cost-efficiency, and reliability during development, with scalability and performance in production.
**AI Assistants** - Build chatbots with web search, calendar access, and email capabilities
### Comprehensive Observability
**Content Generation** - Create blog posts, social media content, and marketing materials
Existing solutions provide limited visibility into agent performance, making it difficult to identify bottlenecks, understand costs, or diagnose failures. Developers build custom instrumentation or operate in the dark.
**Data Processing** - Extract insights from documents, analyze datasets, and generate reports
Sim Studio provides <span className="text-highlight">full visibility into agent performance</span> with integrated observability:
**Process Automation** - Automate business workflows with event-driven triggers
<ul className="highlight-markers list-disc space-y-2 pl-6">
<li>Detailed execution logs capturing every interaction between agents and models</li>
<li>Latency tracing with span visualization to identify performance bottlenecks</li>
<li>Cost tracking and optimization to prevent budget overruns</li>
<li>Error analysis and debugging tools for complex workflows</li>
<li>Performance comparisons across different model configurations</li>
</ul>
**API Orchestration** - Combine multiple services into unified endpoints
This comprehensive observability means less time investigating issues and more time resolving them—faster development cycles and more reliable agent workflows.
## Key Features
## Features
**Multi-Provider AI Support** - Switch between OpenAI, Anthropic, Google, and local models without rebuilding workflows
Sim Studio provides a wide range of features designed to accelerate your development process:
**Real-time Collaboration** - Work simultaneously with team members on the same workflow
<Features />
**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>
Ready to get started? Check out our [Getting Started](/getting-started) guide or explore our [Blocks](/blocks) and [Tools](/tools) in more detail.

View File

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

View File

@@ -182,9 +182,10 @@ Update multiple existing records in an Airtable table
| Output | Type | Description |
| ------ | ---- | ----------- |
| `records` | json | records output from the block |
| `record` | json | record output from the block |
| `metadata` | json | metadata output from the block |
| `response` | object | Output from response |
| `records` | json | records of the response |
| ↳ `record` | json | record of the response |
| ↳ `metadata` | json | metadata of the response |
## Notes

View File

@@ -0,0 +1,187 @@
---
title: Autoblocks
description: Manage and use versioned prompts with Autoblocks
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="autoblocks"
color="#0D2929"
icon={true}
iconSvg={`<svg className="block-icon"
version='1.1'
id='Layer_1'
xmlns='http://www.w3.org/2000/svg'
xmlnsXlink='http://www.w3.org/1999/xlink'
x='0px'
y='0px'
viewBox='0 0 1250 1250'
enableBackground='new 0 0 1250 1250'
xmlSpace='preserve'
>
<path
fill='#FFFFFF'
opacity='1.000000'
stroke='none'
d='
M671.222290,1079.959839
C671.176025,1077.962891 671.089233,1075.965820 671.089111,1073.968872
C671.082825,918.318481 671.062683,762.668091 671.192322,607.017761
C671.195862,602.748474 669.789551,600.693787 666.180847,598.638306
C636.091125,581.500183 606.140991,564.117126 576.145508,546.813599
C556.393311,535.419128 536.677856,523.960449 516.869568,512.664307
C495.246002,500.332977 473.461487,488.282806 451.883911,475.872253
C434.220825,465.713257 416.802856,455.129089 399.195587,444.871857
C379.466736,433.378601 359.648438,422.038818 339.866608,410.636597
C320.229004,399.317505 300.588470,388.003510 280.948822,376.688019
C271.840149,371.440033 262.730530,366.193695 253.057938,360.622070
C267.185272,352.478241 280.655273,344.713531 294.125092,336.948517
C329.023163,316.830566 363.943237,296.750366 398.783295,276.532349
C402.073059,274.623260 404.534790,274.139191 408.118988,276.252319
C435.683502,292.503723 463.371948,308.546082 491.084290,324.545258
C509.340118,335.084839 527.725525,345.399719 546.006958,355.895203
C585.713440,378.690979 625.427124,401.474670 665.069397,424.381744
C705.530884,447.762177 745.895203,471.310669 786.336243,494.726715
C796.959717,500.877930 807.667236,506.888184 818.432190,512.787903
C820.966064,514.176636 821.763611,515.816772 821.762329,518.659241
C821.692932,676.145020 821.688171,833.630737 821.793762,991.116455
C821.795837,994.184937 820.514771,995.521545 818.222412,996.837891
C782.578491,1017.306641 746.954346,1037.809570 711.333679,1058.318848
C698.839661,1065.512573 686.367554,1072.744629 673.219116,1079.994141
C672.109314,1080.006104 671.665771,1079.982910 671.222290,1079.959839
z'
/>
<path
fill='#FFFFFF'
opacity='1.000000'
stroke='none'
d='
M684.421631,400.605865
C600.749390,352.376038 517.388306,304.342010 433.717010,256.129181
C455.858643,243.338989 477.724731,230.689346 499.608948,218.071136
C526.744324,202.425217 553.916504,186.842911 581.002014,171.111252
C583.487793,169.667450 585.282104,169.727783 587.700562,171.126724
C627.018250,193.870560 666.389465,216.521790 705.739136,239.210449
C744.537903,261.581543 783.343262,283.941437 822.113525,306.361786
C854.544006,325.115936 886.886658,344.022156 919.345703,362.726379
C945.337769,377.704102 971.415039,392.534851 997.539551,407.280151
C1001.126465,409.304749 1002.459045,411.581146 1002.455444,415.839966
C1002.322388,571.647339 1002.315430,727.454834 1002.468750,883.262207
C1002.473694,888.329590 1001.184082,891.101135 996.646118,893.690186
C949.437134,920.624695 902.383667,947.831665 855.284607,974.958862
C854.453491,975.437500 853.591980,975.863708 851.884216,976.772095
C851.884216,974.236023 851.884216,972.347290 851.884216,970.458557
C851.884216,814.817688 851.876099,659.176880 851.927551,503.536011
C851.928955,499.372650 851.416870,497.004883 846.802246,494.523651
C829.014954,484.959839 811.879517,474.190002 794.417969,464.012421
C774.549316,452.431854 754.597900,440.993225 734.670959,429.512817
C718.033508,419.927551 701.379517,410.370911 684.421631,400.605865
z'
/>
<path
fill='#FFFFFF'
opacity='1.000000'
stroke='none'
d='
M398.927063,451.754761
C400.510162,450.940521 401.764893,450.328430 403.700867,449.383972
C403.700867,452.154175 403.700897,454.096252 403.700897,456.038330
C403.700897,554.021851 403.720520,652.005371 403.628479,749.988831
C403.624847,753.876892 404.584320,756.067810 408.236908,758.155518
C451.188324,782.705505 493.996735,807.505737 536.834656,832.254150
C575.355164,854.508362 613.866882,876.777893 652.379028,899.046387
C658.236328,902.433167 664.075500,905.851257 670.506531,909.594543
C660.506226,915.396240 650.958069,920.955383 641.391357,926.482483
C602.367798,949.028442 563.293213,971.486938 524.376099,994.215210
C520.155334,996.680237 517.203247,996.930176 512.863708,994.408752
C454.421143,960.451721 395.851410,926.713562 337.314575,892.918823
C319.777893,882.794556 302.245758,872.662292 284.710938,862.534790
C274.721008,856.764954 264.759888,850.944214 254.717163,845.267761
C252.338959,843.923462 251.216995,842.476929 251.219849,839.499817
C251.315567,739.849976 251.312408,640.200073 251.234558,540.550232
C251.232254,537.601685 252.346344,536.241150 254.806610,534.827820
C302.775909,507.271362 350.680695,479.602600 398.927063,451.754761
z'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Autoblocks](https://www.autoblocks.ai/) is a comprehensive platform for managing, monitoring, and optimizing AI applications. It provides robust tools for prompt management that enable teams to collaborate effectively on AI prompts while maintaining version control and type safety.
With Autoblocks, you can:
- **Version and manage prompts**: Track changes, roll back to previous versions, and maintain a history of prompt iterations
- **Collaborate across teams**: Enable product, engineering, and AI teams to work together on prompt development
- **Ensure type safety**: Get autocomplete and validation for prompt variables
- **Monitor prompt performance**: Track metrics and analyze how changes affect outcomes
- **Test prompts**: Compare different versions and evaluate results before deployment
Autoblocks integrates seamlessly with your existing AI workflows in Sim Studio, providing a structured approach to prompt engineering that improves consistency and reduces errors.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Collaborate on prompts with type safety, autocomplete, and backwards-incompatibility protection. Autoblocks prompt management allows product teams to collaborate while maintaining excellent developer experience.
## Tools
### `autoblocks_prompt_manager`
Manage and render prompts using Autoblocks prompt management system
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `promptId` | string | Yes | The ID of the prompt to retrieve |
| `version` | string | Yes | Version strategy \(latest or specific\) |
| `specificVersion` | string | No | Specific version to use \(e.g., |
| `templateParams` | object | No | Parameters to render the template with |
| `apiKey` | string | Yes | Autoblocks API key |
| `enableABTesting` | boolean | No | Whether to enable A/B testing between versions |
| `abTestConfig` | object | No | Configuration for A/B testing between versions |
| `environment` | string | Yes | Environment to use \(production, staging, development\) |
#### Output
| Parameter | Type |
| --------- | ---- |
| `promptId` | string |
| `version` | string |
| `renderedPrompt` | string |
| `templates` | string |
## Block Configuration
### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `promptId` | string | Yes | Prompt ID - Enter the Autoblocks prompt ID |
### Outputs
| Output | Type | Description |
| ------ | ---- | ----------- |
| `response` | object | Output from response |
| ↳ `promptId` | string | promptId of the response |
| ↳ `version` | string | version of the response |
| ↳ `renderedPrompt` | string | renderedPrompt of the response |
| ↳ `templates` | json | templates of the response |
## Notes
- Category: `tools`
- Type: `autoblocks`

View File

@@ -102,10 +102,11 @@ Runs a browser automation task using BrowserUse
| Output | Type | Description |
| ------ | ---- | ----------- |
| `id` | string | id output from the block |
| `success` | boolean | success output from the block |
| `output` | any | output output from the block |
| `steps` | json | steps output from the block |
| `response` | object | Output from response |
| ↳ `id` | string | id of the response |
| ↳ `success` | boolean | success of the response |
| ↳ `output` | any | output of the response |
| ↳ `steps` | json | steps of the response |
## Notes

View File

@@ -214,7 +214,7 @@ Populate Clay with data from a JSON file. Enables direct communication and notif
| --------- | ---- | -------- | ----------- |
| `webhookURL` | string | Yes | The webhook URL to populate |
| `data` | json | Yes | The data to populate |
| `authToken` | string | Yes | Auth token for Clay webhook authentication |
| `authToken` | string | No | Optional auth token for WebhookURL |
#### Output
@@ -238,7 +238,8 @@ Populate Clay with data from a JSON file. Enables direct communication and notif
| Output | Type | Description |
| ------ | ---- | ----------- |
| `data` | any | data output from the block |
| `response` | object | Output from response |
| ↳ `data` | any | data of the response |
## Notes

View File

@@ -113,11 +113,12 @@ Update a Confluence page using the Confluence API.
| Output | Type | Description |
| ------ | ---- | ----------- |
| `ts` | string | ts output from the block |
| `pageId` | string | pageId output from the block |
| `content` | string | content output from the block |
| `title` | string | title output from the block |
| `success` | boolean | success output from the block |
| `response` | object | Output from response |
| ↳ `ts` | string | ts of the response |
| ↳ `pageId` | string | pageId of the response |
| ↳ `content` | string | content of the response |
| ↳ `title` | string | title of the response |
| ↳ `success` | boolean | success of the response |
## Notes

View File

@@ -150,8 +150,9 @@ Retrieve information about a Discord user
| Output | Type | Description |
| ------ | ---- | ----------- |
| `message` | string | message output from the block |
| `data` | any | data output from the block |
| `response` | object | Output from response |
| ↳ `message` | string | message of the response |
| ↳ `data` | any | data of the response |
## Notes

View File

@@ -53,10 +53,10 @@ Convert TTS using ElevenLabs voices
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Your ElevenLabs API key |
| `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
@@ -80,7 +80,8 @@ Convert TTS using ElevenLabs voices
| Output | Type | Description |
| ------ | ---- | ----------- |
| `audioUrl` | string | audioUrl output from the block |
| `response` | object | Output from response |
| ↳ `audioUrl` | string | audioUrl of the response |
## Notes

View File

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

View File

@@ -87,8 +87,9 @@ This tool does not produce any outputs.
| Output | Type | Description |
| ------ | ---- | ----------- |
| `files` | json | files output from the block |
| `combinedContent` | string | combinedContent output from the block |
| `response` | object | Output from response |
| ↳ `files` | json | files of the response |
| ↳ `combinedContent` | string | combinedContent of the response |
## Notes

View File

@@ -65,9 +65,9 @@ Extract structured content from web pages with comprehensive metadata support. C
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Firecrawl API key |
| `url` | string | Yes | The URL to scrape content from |
| `scrapeOptions` | json | No | Options for content scraping |
| `apiKey` | string | Yes | Firecrawl API key |
#### Output
@@ -85,8 +85,8 @@ Search for information on the web using Firecrawl
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | The search query to use |
| `apiKey` | string | Yes | Firecrawl API key |
| `query` | string | Yes | The search query to use |
#### Output
@@ -95,28 +95,6 @@ Search for information on the web using Firecrawl
| `data` | string |
| `warning` | string |
### `firecrawl_crawl`
Crawl entire websites and extract structured content from all accessible pages
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | The website URL to crawl |
| `limit` | number | No | Maximum number of pages to crawl \(default: 100\) |
| `onlyMainContent` | boolean | No | Extract only main content from pages |
| `apiKey` | string | Yes | Firecrawl API Key |
#### Output
| Parameter | Type |
| --------- | ---- |
| `jobId` | string |
| `pages` | string |
| `total` | string |
| `creditsUsed` | string |
## Block Configuration
@@ -133,14 +111,12 @@ Crawl entire websites and extract structured content from all accessible pages
| Output | Type | Description |
| ------ | ---- | ----------- |
| `markdown` | string | markdown output from the block |
| `html` | any | html output from the block |
| `metadata` | json | metadata output from the block |
| `data` | json | data output from the block |
| `warning` | any | warning output from the block |
| `pages` | json | pages output from the block |
| `total` | number | total output from the block |
| `creditsUsed` | number | creditsUsed output from the block |
| `response` | object | Output from response |
| ↳ `markdown` | string | markdown of the response |
| ↳ `html` | any | html of the response |
| ↳ `metadata` | json | metadata of the response |
| ↳ `data` | json | data of the response |
| ↳ `warning` | any | warning of the response |
## Notes

View File

@@ -85,15 +85,15 @@ Create comments on GitHub PRs
| --------- | ---- | -------- | ----------- |
| `owner` | string | Yes | Repository owner |
| `repo` | string | Yes | Repository name |
| `body` | string | Yes | Comment content |
| `pullNumber` | number | Yes | Pull request number |
| `body` | string | Yes | Comment content |
| `path` | string | No | File path for review comment |
| `position` | number | No | Line number for review comment |
| `apiKey` | string | Yes | GitHub API token |
| `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
@@ -174,8 +174,9 @@ Retrieve the latest commit from a GitHub repository
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
## Notes

View File

@@ -79,29 +79,6 @@ Send emails using Gmail
| `threadId` | string |
| `labelIds` | string |
### `gmail_draft`
Draft emails using Gmail
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Access token for Gmail API |
| `to` | string | Yes | Recipient email address |
| `subject` | string | Yes | Email subject |
| `body` | string | Yes | Email body content |
#### Output
| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |
| `message` | string |
| `threadId` | string |
| `labelIds` | string |
### `gmail_read`
Read emails from Gmail
@@ -140,17 +117,12 @@ Search emails in Gmail
| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |
## Block Configuration
### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `operation` | string | Yes | Operation |
No configuration parameters required.
@@ -158,8 +130,9 @@ Search emails in Gmail
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
## Notes

View File

@@ -228,8 +228,9 @@ Invite attendees to an existing Google Calendar event
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
## Notes

View File

@@ -135,8 +135,7 @@ Create a new Google Docs document
| `accessToken` | string | Yes | The access token for the Google Docs API |
| `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\) |
| `folderId` | string | No | The ID of the folder to create the document in |
#### Output
@@ -160,9 +159,10 @@ Create a new Google Docs document
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
| `updatedContent` | boolean | updatedContent output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
| ↳ `updatedContent` | boolean | updatedContent of the response |
## Notes

View File

@@ -91,8 +91,7 @@ Upload a file to Google Drive
| `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\) |
| `folderId` | string | No | The ID of the folder to upload the file to |
#### Output
@@ -118,8 +117,7 @@ Create a new folder in Google Drive
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Google Drive API |
| `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\) |
| `folderId` | string | No | ID of the parent folder \(leave empty for root folder\) |
#### Output
@@ -144,8 +142,7 @@ List files and folders in Google Drive
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Google Drive API |
| `folderSelector` | string | No | Select the folder to list files from |
| `folderId` | string | No | The ID of the folder to list files from \(internal use\) |
| `folderId` | string | No | The ID of the folder to list files from |
| `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 |
@@ -180,8 +177,9 @@ List files and folders in Google Drive
| Output | Type | Description |
| ------ | ---- | ----------- |
| `file` | json | file output from the block |
| `files` | json | files output from the block |
| `response` | object | Output from response |
| `file` | json | file of the response |
| ↳ `files` | json | files of the response |
## Notes

View File

@@ -73,9 +73,9 @@ Search the web with the Custom Search API
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | The search query to execute |
| `apiKey` | string | Yes | Google API key |
| `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
@@ -101,11 +101,7 @@ Search the web with the Custom Search API
### Outputs
| Output | Type | Description |
| ------ | ---- | ----------- |
| `items` | json | items output from the block |
| `searchInformation` | json | searchInformation output from the block |
This block does not produce any outputs.
## Notes

View File

@@ -212,13 +212,14 @@ Append data to the end of a Google Sheets spreadsheet
| Output | Type | Description |
| ------ | ---- | ----------- |
| `data` | json | data output from the block |
| `metadata` | json | metadata output from the block |
| `updatedRange` | string | updatedRange output from the block |
| `updatedRows` | number | updatedRows output from the block |
| `updatedColumns` | number | updatedColumns output from the block |
| `updatedCells` | number | updatedCells output from the block |
| `tableRange` | string | tableRange output from the block |
| `response` | object | Output from response |
| ↳ `data` | json | data of the response |
| ↳ `metadata` | json | metadata of the response |
| `updatedRange` | string | updatedRange of the response |
| `updatedRows` | number | updatedRows of the response |
| `updatedColumns` | number | updatedColumns of the response |
| ↳ `updatedCells` | number | updatedCells of the response |
| ↳ `tableRange` | string | tableRange of the response |
## Notes

View File

@@ -0,0 +1,124 @@
---
title: Guesty
description: Interact with Guesty property management system
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="guesty"
color="#0051F8"
icon={true}
iconSvg={`<svg className="block-icon"
viewBox='0 0 101 100'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<path
d='M56.6019 2.6685C53.2445 0.339792 48.8025 0.308905 45.413 2.5907L44.1323 3.45286C44.1309 3.45379 44.1296 3.45471 44.1282 3.45564L5.37916 29.5416C5.37801 29.5424 5.37687 29.5431 5.37572 29.5439L4.37839 30.2153C1.64126 32.058 0 35.1414 0 38.441V90.0841C0 95.5599 4.4395 100 9.91593 100H67.4737C72.9501 100 77.389 95.5605 77.389 90.0841V49.6765C77.389 46.3038 75.675 43.1622 72.8385 41.3373L56.3027 30.6989C53.0908 28.6325 48.9777 28.5944 45.728 30.6009L28.3986 41.301C25.4732 43.1073 23.6922 46.3001 23.6922 49.7382V75.553H33.3248V51.0025C33.3248 50.1189 33.7823 49.2983 34.5337 48.8337L34.535 48.8329L49.5731 39.5476C50.408 39.0322 51.4645 39.0414 52.29 39.5714L66.5886 48.7705C67.3167 49.24 67.7564 50.0471 67.7564 50.9134V87.8176C67.7564 89.2256 66.6152 90.3674 65.2072 90.3674H12.1824C10.7742 90.3674 9.63262 89.2256 9.63262 87.8176V39.6474C9.63262 38.7995 10.0541 38.0071 10.7571 37.5331L49.5075 11.4463C50.3783 10.8601 51.5192 10.8675 52.3822 11.4646L89.8995 37.4867C89.9007 37.4877 89.9024 37.4886 89.9035 37.4896C90.588 37.9663 90.9959 38.7476 90.9959 39.5819V100H100.629V38.3956C100.629 35.1448 99.0352 32.1005 96.3641 30.2478L95.3969 29.5767C95.3941 29.575 95.3918 29.5733 95.3895 29.5717L56.6019 2.6685Z'
fill='currentColor'
/>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Guesty](https://www.guesty.com) is a comprehensive property management platform designed for short-term and vacation rental property managers. It provides a centralized system to manage listings, reservations, guest communications, and operations across multiple booking channels like Airbnb, Booking.com, and VRBO.
With Guesty, property managers can:
- **Centralize operations**: Manage multiple properties and listings from a single dashboard
- **Automate workflows**: Set up automated messaging, task assignments, and cleaning schedules
- **Synchronize calendars**: Keep availability updated across all booking channels
- **Process payments**: Handle secure payment processing and financial reporting
- **Manage guest communications**: Streamline guest interactions through unified inbox
- **Generate reports**: Access analytics and insights to optimize property performance
In Sim Studio, the Guesty integration enables your agents to interact directly with your property management system programmatically. This allows for powerful automation scenarios such as reservation management, guest communication, and operational workflows. Your agents can retrieve detailed reservation information by ID, including guest details, booking dates, and property information. They can also search for guests by phone number to access their profiles and booking history. This integration bridges the gap between your AI workflows and your property management operations, enabling seamless handling of hospitality tasks without manual intervention. By connecting Sim Studio with Guesty, you can automate guest communications, streamline check-in processes, manage reservation details, and enhance the overall guest experience through intelligent automation.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Access Guesty property management data including reservations and guest information. Retrieve reservation details by ID or search for guests by phone number.
## Tools
### `guesty_reservation`
Fetch reservation details from Guesty by reservation ID
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Your Guesty API token |
| `reservationId` | string | Yes | The ID of the reservation to fetch |
#### Output
| Parameter | Type |
| --------- | ---- |
| `id` | string |
| `guest` | string |
| `email` | string |
| `phone` | string |
### `guesty_guest`
Search for guests in Guesty by phone number
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Your Guesty API token |
| `phoneNumber` | string | Yes | The phone number to search for |
#### Output
| Parameter | Type |
| --------- | ---- |
| `guests` | string |
| `fullName` | string |
| `email` | string |
| `phone` | string |
| `address` | string |
| `city` | string |
| `country` | string |
## Block Configuration
### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `action` | string | Yes | Action |
### Outputs
| Output | Type | Description |
| ------ | ---- | ----------- |
| `response` | object | Output from response |
| ↳ `id` | string | id of the response |
| ↳ `guest` | json | guest of the response |
| ↳ `checkIn` | string | checkIn of the response |
| ↳ `checkOut` | string | checkOut of the response |
| ↳ `status` | string | status of the response |
| ↳ `listing` | json | listing of the response |
| ↳ `money` | json | money of the response |
| ↳ `guests` | json | guests of the response |
## Notes
- Category: `tools`
- Type: `guesty`

View File

@@ -80,13 +80,14 @@ Generate completions using Hugging Face Inference API
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `systemPrompt` | string | No | System prompt to guide the model behavior |
| `content` | string | Yes | The user message content to send to the model |
| `apiKey` | string | Yes | Hugging Face API token |
| `provider` | string | Yes | The provider to use for the API request \(e.g., novita, cerebras, etc.\) |
| `model` | string | Yes | Model to use for chat completions \(e.g., deepseek/deepseek-v3-0324\) |
| `content` | string | Yes | The user message content to send to the model |
| `systemPrompt` | string | No | System prompt to guide the model behavior |
| `maxTokens` | number | No | Maximum number of tokens to generate |
| `temperature` | number | No | Sampling temperature \(0-2\). Higher values make output more random |
| `apiKey` | string | Yes | Hugging Face API token |
| `stream` | boolean | No | Whether to stream the response |
#### Output
@@ -114,9 +115,10 @@ Generate completions using Hugging Face Inference API
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `model` | string | model output from the block |
| `usage` | json | usage output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `model` | string | model of the response |
| ↳ `usage` | json | usage of the response |
## Notes

View File

@@ -60,8 +60,8 @@ Generate images using OpenAI
| 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 |
| `model` | string | Yes | The model to use \(gpt-image-1 or dall-e-3\) |
| `size` | string | Yes | The size of the generated images \(1024x1024, 1024x1792, or 1792x1024\) |
| `quality` | string | No | The quality of the image \(standard or hd\) |
| `style` | string | No | The style of the image \(vivid or natural\) |
@@ -93,9 +93,10 @@ Generate images using OpenAI
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `image` | string | image output from the block |
| `metadata` | json | metadata output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `image` | string | image of the response |
| ↳ `metadata` | json | metadata of the response |
## Notes

View File

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

View File

@@ -78,10 +78,6 @@ Extract and process web content into clean, LLM-friendly text using Jina AI Read
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | The URL to read and convert to markdown |
| `useReaderLMv2` | boolean | No | Whether to use ReaderLM-v2 for better quality |
| `gatherLinks` | boolean | No | Whether to gather all links at the end |
| `jsonResponse` | boolean | No | Whether to return response in JSON format |
| `apiKey` | string | Yes | Your Jina AI API key |
#### Output
@@ -105,7 +101,8 @@ Extract and process web content into clean, LLM-friendly text using Jina AI Read
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
## Notes

View File

@@ -165,14 +165,15 @@ Retrieve multiple Jira issues in bulk
| Output | Type | Description |
| ------ | ---- | ----------- |
| `ts` | string | ts output from the block |
| `issueKey` | string | issueKey output from the block |
| `summary` | string | summary output from the block |
| `description` | string | description output from the block |
| `created` | string | created output from the block |
| `updated` | string | updated output from the block |
| `success` | boolean | success output from the block |
| `url` | string | url output from the block |
| `response` | object | Output from response |
| ↳ `ts` | string | ts of the response |
| ↳ `issueKey` | string | issueKey of the response |
| ↳ `summary` | string | summary of the response |
| ↳ `description` | string | description of the response |
| ↳ `created` | string | created of the response |
| ↳ `updated` | string | updated of the response |
| ↳ `success` | boolean | success of the response |
| ↳ `url` | string | url of the response |
## Notes

View File

@@ -66,13 +66,6 @@ Search for similar content in one or more knowledge bases using vector similarit
| `knowledgeBaseIds` | string | Yes | ID of the knowledge base to search in, or comma-separated IDs for multiple knowledge bases |
| `query` | string | Yes | Search query text |
| `topK` | number | No | Number of most similar results to return \(1-100\) |
| `tag1` | string | No | Filter by tag 1 value |
| `tag2` | string | No | Filter by tag 2 value |
| `tag3` | string | No | Filter by tag 3 value |
| `tag4` | string | No | Filter by tag 4 value |
| `tag5` | string | No | Filter by tag 5 value |
| `tag6` | string | No | Filter by tag 6 value |
| `tag7` | string | No | Filter by tag 7 value |
#### Output
@@ -81,7 +74,6 @@ Search for similar content in one or more knowledge bases using vector similarit
| `results` | string |
| `query` | string |
| `totalResults` | string |
| `cost` | string |
### `knowledge_upload_chunk`
@@ -119,13 +111,6 @@ Create a new document in a knowledge base
| `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 |
#### Output
@@ -150,9 +135,10 @@ Create a new document in a knowledge base
| Output | Type | Description |
| ------ | ---- | ----------- |
| `results` | json | results output from the block |
| `query` | string | query output from the block |
| `totalResults` | number | totalResults output from the block |
| `response` | object | Output from response |
| ↳ `results` | json | results of the response |
| ↳ `query` | string | query of the response |
| ↳ `totalResults` | number | totalResults of the response |
## Notes

View File

@@ -105,8 +105,9 @@ Create a new issue in Linear
| Output | Type | Description |
| ------ | ---- | ----------- |
| `issues` | json | issues output from the block |
| `issue` | json | issue output from the block |
| `response` | object | Output from response |
| `issues` | json | issues of the response |
| ↳ `issue` | json | issue of the response |
## Notes

File diff suppressed because one or more lines are too long

View File

@@ -58,9 +58,9 @@ Add memories to Mem0 for persistent storage and retrieval
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Your Mem0 API key |
| `userId` | string | Yes | User ID associated with the memory |
| `messages` | json | Yes | Array of message objects with role and content |
| `apiKey` | string | Yes | Your Mem0 API key |
#### Output
@@ -76,10 +76,10 @@ Search for memories in Mem0 using semantic search
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Your Mem0 API key |
| `userId` | string | Yes | User ID to search memories for |
| `query` | string | Yes | Search query to find relevant memories |
| `limit` | number | No | Maximum number of results to return |
| `apiKey` | string | Yes | Your Mem0 API key |
#### Output
@@ -96,12 +96,12 @@ Retrieve memories from Mem0 by ID or filter criteria
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Your Mem0 API key |
| `userId` | string | Yes | User ID to retrieve memories for |
| `memoryId` | string | No | Specific memory ID to retrieve |
| `startDate` | string | No | Start date for filtering by created_at \(format: YYYY-MM-DD\) |
| `endDate` | string | No | End date for filtering by created_at \(format: YYYY-MM-DD\) |
| `limit` | number | No | Maximum number of results to return |
| `apiKey` | string | Yes | Your Mem0 API key |
#### Output
@@ -126,9 +126,10 @@ Retrieve memories from Mem0 by ID or filter criteria
| Output | Type | Description |
| ------ | ---- | ----------- |
| `ids` | any | ids output from the block |
| `memories` | any | memories output from the block |
| `searchResults` | any | searchResults output from the block |
| `response` | object | Output from response |
| ↳ `ids` | any | ids of the response |
| ↳ `memories` | any | memories of the response |
| ↳ `searchResults` | any | searchResults of the response |
## Notes

View File

@@ -124,8 +124,9 @@ Delete a specific memory by its ID
| Output | Type | Description |
| ------ | ---- | ----------- |
| `memories` | any | memories output from the block |
| `id` | string | id output from the block |
| `response` | object | Output from response |
| ↳ `memories` | any | memories of the response |
| ↳ `id` | string | id of the response |
## Notes

View File

@@ -2,6 +2,7 @@
"items": [
"index",
"airtable",
"autoblocks",
"browser_use",
"clay",
"confluence",
@@ -17,6 +18,7 @@
"google_drive",
"google_search",
"google_sheets",
"guesty",
"huggingface",
"image_generator",
"jina",
@@ -34,10 +36,8 @@
"outlook",
"perplexity",
"pinecone",
"qdrant",
"reddit",
"s3",
"schedule",
"serper",
"slack",
"stagehand",
@@ -50,8 +50,6 @@
"twilio_sms",
"typeform",
"vision",
"wealthbox",
"webhook",
"whatsapp",
"x",
"youtube"

View File

@@ -180,14 +180,15 @@ Add new rows to a Microsoft Excel table
| Output | Type | Description |
| ------ | ---- | ----------- |
| `data` | json | data output from the block |
| `metadata` | json | metadata output from the block |
| `updatedRange` | string | updatedRange output from the block |
| `updatedRows` | number | updatedRows output from the block |
| `updatedColumns` | number | updatedColumns output from the block |
| `updatedCells` | number | updatedCells output from the block |
| `index` | number | index output from the block |
| `values` | json | values output from the block |
| `response` | object | Output from response |
| ↳ `data` | json | data of the response |
| ↳ `metadata` | json | metadata of the response |
| `updatedRange` | string | updatedRange of the response |
| `updatedRows` | number | updatedRows of the response |
| `updatedColumns` | number | updatedColumns of the response |
| ↳ `updatedCells` | number | updatedCells of the response |
| ↳ `index` | number | index of the response |
| ↳ `values` | json | values of the response |
## Notes

View File

@@ -205,9 +205,10 @@ Write or send a message to a Microsoft Teams channel
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
| `updatedContent` | boolean | updatedContent output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
| ↳ `updatedContent` | boolean | updatedContent of the response |
## Notes

View File

@@ -96,11 +96,11 @@ Parse PDF documents using Mistral OCR API
| `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. |
| `apiKey` | string | Yes | Mistral API key \(MISTRAL_API_KEY\) |
| `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
@@ -122,8 +122,9 @@ This tool does not produce any outputs.
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
## Notes

View File

@@ -49,42 +49,18 @@ Read content from a Notion page
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `pageId` | string | Yes | The ID of the Notion page to read |
#### Output
| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |
| `lastEditedTime` | string |
| `createdTime` | string |
| `url` | string |
### `notion_read_database`
Read database information and structure from Notion
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `databaseId` | string | Yes | The ID of the Notion database to read |
#### Output
| Parameter | Type |
| --------- | ---- |
| `metadata` | string |
| `url` | string |
| `id` | string |
| `createdTime` | string |
| `lastEditedTime` | string |
| `properties` | string |
| `content` | string |
| `title` | string |
| `metadata` | string |
| `lastEditedTime` | string |
| `createdTime` | string |
| `url` | string |
### `notion_write`
@@ -94,9 +70,9 @@ Append content to a Notion page
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `pageId` | string | Yes | The ID of the Notion page to append content to |
| `content` | string | Yes | The content to append to the page |
| `accessToken` | string | Yes | Notion OAuth access token |
#### Output
@@ -112,87 +88,18 @@ Create a new page in Notion
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `parentId` | string | Yes | ID of the parent page |
| `title` | string | No | Title of the new page |
| `parentType` | string | Yes | Type of parent: |
| `parentId` | string | Yes | ID of the parent page or database |
| `title` | string | No | Title of the page \(required for parent pages, not for databases\) |
| `properties` | json | No | JSON object of properties for database pages |
| `content` | string | No | Optional content to add to the page upon creation |
#### Output
| Parameter | Type |
| --------- | ---- |
| `content` | string |
### `notion_query_database`
Query and filter Notion database entries with advanced filtering
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `databaseId` | string | Yes | The ID of the database to query |
| `filter` | string | No | Filter conditions as JSON \(optional\) |
| `sorts` | string | No | Sort criteria as JSON array \(optional\) |
| `pageSize` | number | No | Number of results to return \(default: 100, max: 100\) |
#### Output
| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |
| `hasMore` | string |
| `nextCursor` | string |
| `results` | string |
### `notion_search`
Search across all pages and databases in Notion workspace
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `query` | string | No | Search terms \(leave empty to get all pages\) |
| `filterType` | string | No | Filter by object type: page, database, or leave empty for all |
| `pageSize` | number | No | Number of results to return \(default: 100, max: 100\) |
#### Output
| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |
| `hasMore` | string |
| `nextCursor` | string |
| `results` | string |
### `notion_create_database`
Create a new database in Notion with custom properties
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Notion OAuth access token |
| `parentId` | string | Yes | ID of the parent page where the database will be created |
| `title` | string | Yes | Title for the new database |
| `properties` | string | No | Database properties as JSON object \(optional, will create a default |
#### Output
| Parameter | Type |
| --------- | ---- |
| `metadata` | string |
| `url` | string |
| `createdTime` | string |
| `properties` | string |
| `content` | string |
| `title` | string |
@@ -210,8 +117,9 @@ Create a new database in Notion with custom properties
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `metadata` | any | metadata output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | any | metadata of the response |
## Notes

View File

@@ -57,10 +57,11 @@ Generate embeddings from text using OpenAI
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | OpenAI API key |
| `input` | string | Yes | Text to generate embeddings for |
| `model` | string | No | Model to use for embeddings |
| `encodingFormat` | string | No | The format to return the embeddings in |
| `apiKey` | string | Yes | OpenAI API key |
| `encoding_format` | string | No | The format to return the embeddings in |
| `user` | string | No | A unique identifier for the end-user |
#### Output
@@ -87,9 +88,10 @@ Generate embeddings from text using OpenAI
| Output | Type | Description |
| ------ | ---- | ----------- |
| `embeddings` | json | embeddings output from the block |
| `model` | string | model output from the block |
| `usage` | json | usage output from the block |
| `response` | object | Output from response |
| ↳ `embeddings` | json | embeddings of the response |
| ↳ `model` | string | model of the response |
| ↳ `usage` | json | usage of the response |
## Notes

View File

@@ -225,8 +225,9 @@ Read emails from Outlook
| Output | Type | Description |
| ------ | ---- | ----------- |
| `message` | string | message output from the block |
| `results` | json | results output from the block |
| `response` | object | Output from response |
| ↳ `message` | string | message of the response |
| ↳ `results` | json | results of the response |
## Notes

View File

@@ -51,12 +51,11 @@ Generate completions using Perplexity AI chat models
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `systemPrompt` | string | No | System prompt to guide the model behavior |
| `content` | string | Yes | The user message content to send to the model |
| `apiKey` | string | Yes | Perplexity API key |
| `model` | string | Yes | Model to use for chat completions \(e.g., sonar, mistral\) |
| `messages` | array | Yes | Array of message objects with role and content |
| `max_tokens` | number | No | Maximum number of tokens to generate |
| `temperature` | number | No | Sampling temperature between 0 and 1 |
| `apiKey` | string | Yes | Perplexity API key |
#### Output
@@ -76,7 +75,7 @@ Generate completions using Perplexity AI chat models
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `content` | string | Yes | User Prompt - Enter your prompt here... |
| `prompt` | string | Yes | User Prompt - Enter your prompt here... |
@@ -84,9 +83,10 @@ Generate completions using Perplexity AI chat models
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `model` | string | model output from the block |
| `usage` | json | usage output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `model` | string | model of the response |
| ↳ `usage` | json | usage of the response |
## Notes

View File

@@ -59,9 +59,9 @@ Generate embeddings from text using Pinecone
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Pinecone API key |
| `model` | string | Yes | Model to use for generating embeddings |
| `inputs` | array | Yes | Array of text inputs to generate embeddings for |
| `apiKey` | string | Yes | Pinecone API key |
#### Output
@@ -80,10 +80,10 @@ Insert or update text records in a Pinecone index
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Pinecone API key |
| `indexHost` | string | Yes | Full Pinecone index host URL |
| `namespace` | string | Yes | Namespace to upsert records into |
| `records` | array | Yes | Record or array of records to upsert, each containing _id, text, and optional metadata |
| `apiKey` | string | Yes | Pinecone API key |
#### Output
@@ -99,6 +99,7 @@ Search for similar text in a Pinecone index
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Pinecone API key |
| `indexHost` | string | Yes | Full Pinecone index host URL |
| `namespace` | string | No | Namespace to search in |
| `searchQuery` | string | Yes | Text to search for |
@@ -106,7 +107,6 @@ Search for similar text in a Pinecone index
| `fields` | array | No | Fields to return in the results |
| `filter` | object | No | Filter to apply to the search |
| `rerank` | object | No | Reranking parameters |
| `apiKey` | string | Yes | Pinecone API key |
#### Output
@@ -124,6 +124,7 @@ Search for similar vectors in a Pinecone index
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Pinecone API key |
| `indexHost` | string | Yes | Full Pinecone index host URL |
| `namespace` | string | No | Namespace to search in |
| `vector` | array | Yes | Vector to search for |
@@ -131,7 +132,6 @@ Search for similar vectors in a Pinecone index
| `filter` | object | No | Filter to apply to the search |
| `includeValues` | boolean | No | Include vector values in response |
| `includeMetadata` | boolean | No | Include metadata in response |
| `apiKey` | string | Yes | Pinecone API key |
#### Output
@@ -150,10 +150,10 @@ Fetch vectors by ID from a Pinecone index
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Pinecone API key |
| `indexHost` | string | Yes | Full Pinecone index host URL |
| `ids` | array | Yes | Array of vector IDs to fetch |
| `namespace` | string | No | Namespace to fetch vectors from |
| `apiKey` | string | Yes | Pinecone API key |
#### Output
@@ -181,12 +181,13 @@ Fetch vectors by ID from a Pinecone index
| Output | Type | Description |
| ------ | ---- | ----------- |
| `matches` | any | matches output from the block |
| `upsertedCount` | any | upsertedCount output from the block |
| `data` | any | data output from the block |
| `model` | any | model output from the block |
| `vector_type` | any | vector_type output from the block |
| `usage` | any | usage output from the block |
| `response` | object | Output from response |
| ↳ `matches` | any | matches of the response |
| ↳ `upsertedCount` | any | upsertedCount of the response |
| ↳ `data` | any | data of the response |
| ↳ `model` | any | model of the response |
| ↳ `vector_type` | any | vector_type of the response |
| ↳ `usage` | any | usage of the response |
## Notes

View File

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

View File

@@ -50,6 +50,24 @@ Access Reddit data to retrieve posts and comments from any subreddit. Get post t
## Tools
### `reddit_hot_posts`
Fetch the most popular (hot) posts from a specified subreddit.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `subreddit` | string | Yes | The name of the subreddit to fetch posts from \(without the r/ prefix\) |
| `limit` | number | No | Maximum number of posts to return \(default: 10, max: 100\) |
#### Output
| Parameter | Type |
| --------- | ---- |
| `subreddit` | string |
| `posts` | string |
### `reddit_get_posts`
Fetch posts from a subreddit with different sorting options
@@ -58,7 +76,6 @@ Fetch posts from a subreddit with different sorting options
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Access token for Reddit API |
| `subreddit` | string | Yes | The name of the subreddit to fetch posts from \(without the r/ prefix\) |
| `sort` | string | No | Sort method for posts: |
| `limit` | number | No | Maximum number of posts to return \(default: 10, max: 100\) |
@@ -79,7 +96,6 @@ Fetch comments from a specific Reddit post
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Access token for Reddit API |
| `postId` | string | Yes | The ID of the Reddit post to fetch comments from |
| `subreddit` | string | Yes | The subreddit where the post is located \(without the r/ prefix\) |
| `sort` | string | No | Sort method for comments: |
@@ -105,7 +121,7 @@ Fetch comments from a specific Reddit post
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `operation` | string | Yes | Operation |
| `action` | string | Yes | Action |
@@ -113,10 +129,11 @@ Fetch comments from a specific Reddit post
| Output | Type | Description |
| ------ | ---- | ----------- |
| `subreddit` | string | subreddit output from the block |
| `posts` | json | posts output from the block |
| `post` | json | post output from the block |
| `comments` | json | comments output from the block |
| `response` | object | Output from response |
| ↳ `subreddit` | string | subreddit of the response |
| `posts` | json | posts of the response |
| ↳ `post` | json | post of the response |
| ↳ `comments` | json | comments of the response |
## Notes

View File

@@ -43,23 +43,6 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon S3](https://aws.amazon.com/s3/) is a highly scalable, secure, and durable cloud storage service provided by Amazon Web Services. It's designed to store and retrieve any amount of data from anywhere on the web, making it one of the most widely used cloud storage solutions for businesses of all sizes.
With Amazon S3, you can:
- **Store unlimited data**: Upload files of any size and type with virtually unlimited storage capacity
- **Access from anywhere**: Retrieve your files from anywhere in the world with low-latency access
- **Ensure data durability**: Benefit from 99.999999999% (11 9's) durability with automatic data replication
- **Control access**: Manage permissions and access controls with fine-grained security policies
- **Scale automatically**: Handle varying workloads without manual intervention or capacity planning
- **Integrate seamlessly**: Connect with other AWS services and third-party applications easily
- **Optimize costs**: Choose from multiple storage classes to optimize costs based on access patterns
In Sim Studio, the S3 integration enables your agents to retrieve and access files stored in your Amazon S3 buckets using secure presigned URLs. This allows for powerful automation scenarios such as processing documents, analyzing stored data, retrieving configuration files, and accessing media content as part of your workflows. Your agents can securely fetch files from S3 without exposing your AWS credentials, making it easy to incorporate cloud-stored assets into your automation processes. This integration bridges the gap between your cloud storage and AI workflows, enabling seamless access to your stored data while maintaining security best practices through AWS's robust authentication mechanisms.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Retrieve and view files from Amazon S3 buckets using presigned URLs.
@@ -106,8 +89,9 @@ Retrieve an object from an AWS S3 bucket
| Output | Type | Description |
| ------ | ---- | ----------- |
| `url` | string | url output from the block |
| `metadata` | json | metadata output from the block |
| `response` | object | Output from response |
| ↳ `url` | string | url of the response |
| ↳ `metadata` | json | metadata of the response |
## Notes

View File

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

View File

@@ -93,11 +93,11 @@ A powerful web search tool that provides access to Google search results through
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | The search query |
| `apiKey` | string | Yes | Serper API Key |
| `num` | number | No | Number of results to return |
| `gl` | string | No | Country code for search results |
| `hl` | string | No | Language code for search results |
| `type` | string | No | Type of search to perform |
| `apiKey` | string | Yes | Serper API Key |
#### Output
@@ -121,7 +121,8 @@ A powerful web search tool that provides access to Google search results through
| Output | Type | Description |
| ------ | ---- | ----------- |
| `searchResults` | json | searchResults output from the block |
| `response` | object | Output from response |
| ↳ `searchResults` | json | searchResults of the response |
## Notes

View File

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

View File

@@ -205,10 +205,10 @@ Extract structured data from a webpage using Stagehand
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | Yes | URL of the webpage to extract data from |
| `instruction` | string | Yes | Instructions for extraction |
| `apiKey` | string | Yes | OpenAI API key for extraction \(required by Stagehand\) |
| `schema` | json | Yes | JSON schema defining the structure of the data to extract |
| `apiKey` | string | Yes | OpenAI API key for extraction \(required by Stagehand\) |
| `url` | string | Yes | URL of the webpage to extract data from |
#### Output
@@ -232,7 +232,8 @@ Extract structured data from a webpage using Stagehand
| Output | Type | Description |
| ------ | ---- | ----------- |
| `data` | json | data output from the block |
| `response` | object | Output from response |
| ↳ `data` | json | data of the response |
## Notes

View File

@@ -209,11 +209,11 @@ Run an autonomous web agent to complete tasks and extract structured data
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `startUrl` | string | Yes | URL of the webpage to start the agent on |
| `task` | string | Yes | The task to complete or goal to achieve on the website |
| `startUrl` | string | Yes | URL of the webpage to start the agent on |
| `outputSchema` | json | No | Optional JSON schema defining the structure of data the agent should return |
| `variables` | json | No | Optional variables to substitute in the task \(format: \{key: value\}\). Reference in task using %key% |
| `apiKey` | string | Yes | OpenAI API key for agent execution \(required by Stagehand\) |
| `outputSchema` | json | No | Optional JSON schema defining the structure of data the agent should return |
#### Output
@@ -240,8 +240,9 @@ Run an autonomous web agent to complete tasks and extract structured data
| Output | Type | Description |
| ------ | ---- | ----------- |
| `agentResult` | json | agentResult output from the block |
| `structuredOutput` | any | structuredOutput output from the block |
| `response` | object | Output from response |
| ↳ `agentResult` | json | agentResult of the response |
| ↳ `structuredOutput` | any | structuredOutput of the response |
## Notes

View File

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

View File

@@ -95,8 +95,8 @@ Extract raw content from multiple web pages simultaneously using Tavily
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `urls` | string | Yes | URL or array of URLs to extract content from |
| `extract_depth` | string | No | The depth of extraction \(basic=1 credit/5 URLs, advanced=2 credits/5 URLs\) |
| `apiKey` | string | Yes | Tavily API Key |
| `extract_depth` | string | No | The depth of extraction \(basic=1 credit/5 URLs, advanced=2 credits/5 URLs\) |
#### Output
@@ -121,12 +121,13 @@ Extract raw content from multiple web pages simultaneously using Tavily
| Output | Type | Description |
| ------ | ---- | ----------- |
| `results` | json | results output from the block |
| `answer` | any | answer output from the block |
| `query` | string | query output from the block |
| `content` | string | content output from the block |
| `title` | string | title output from the block |
| `url` | string | url output from the block |
| `response` | object | Output from response |
| ↳ `results` | json | results of the response |
| ↳ `answer` | any | answer of the response |
| ↳ `query` | string | query of the response |
| ↳ `content` | string | content of the response |
| ↳ `title` | string | title of the response |
| ↳ `url` | string | url of the response |
## Notes

View File

@@ -11,17 +11,30 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
icon={true}
iconSvg={`<svg className="block-icon"
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 24 24'
viewBox='-5 0 41 33'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<circle cx='12' cy='12' r='10' fill='#0088CC' />
<circle cx='16' cy='16' r='14' fill='url(#paint0_linear_87_7225)' />
<path
d='M16.7 8.4c.1-.6-.4-1.1-1-.8l-9.8 4.3c-.4.2-.4.8.1.9l2.1.7c.4.1.8.1 1.1-.2l4.5-3.1c.1-.1.3.1.2.2l-3.2 3.5c-.3.3-.2.8.2 1l3.6 2.3c.4.2.9-.1 1-.5l1.2-7.8Z'
d='M22.9866 10.2088C23.1112 9.40332 22.3454 8.76755 21.6292 9.082L7.36482 15.3448C6.85123 15.5703 6.8888 16.3483 7.42147 16.5179L10.3631 17.4547C10.9246 17.6335 11.5325 17.541 12.0228 17.2023L18.655 12.6203C18.855 12.4821 19.073 12.7665 18.9021 12.9426L14.1281 17.8646C13.665 18.3421 13.7569 19.1512 14.314 19.5005L19.659 22.8523C20.2585 23.2282 21.0297 22.8506 21.1418 22.1261L22.9866 10.2088Z'
fill='white'
/>
<defs>
<linearGradient
id='paint0_linear_87_7225'
x1='16'
y1='2'
x2='16'
y2='30'
gradientUnits='userSpaceOnUse'
>
<stop stopColor='#37BBFE' />
<stop offset='1' stopColor='#007DBB' />
</linearGradient>
</defs>
</svg>`}
/>
@@ -108,8 +121,9 @@ Send messages to Telegram channels or users through the Telegram Bot API. Enable
| Output | Type | Description |
| ------ | ---- | ----------- |
| `ok` | boolean | ok output from the block |
| `result` | json | result output from the block |
| `response` | object | Output from response |
| ↳ `ok` | boolean | ok of the response |
| ↳ `result` | json | result of the response |
## Notes

View File

@@ -87,7 +87,8 @@ Processes a provided thought/instruction, making it available for subsequent ste
| Output | Type | Description |
| ------ | ---- | ----------- |
| `acknowledgedThought` | string | acknowledgedThought output from the block |
| `response` | object | Output from response |
| ↳ `acknowledgedThought` | string | acknowledgedThought of the response |
## Notes

View File

@@ -95,9 +95,10 @@ This tool does not produce any outputs.
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `model` | string | model output from the block |
| `tokens` | any | tokens output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `model` | string | model of the response |
| ↳ `tokens` | any | tokens of the response |
## Notes

View File

@@ -78,10 +78,11 @@ Send text messages to single or multiple recipients using the Twilio API.
| Output | Type | Description |
| ------ | ---- | ----------- |
| `success` | boolean | success output from the block |
| `messageId` | any | messageId output from the block |
| `status` | any | status output from the block |
| `error` | any | error output from the block |
| `response` | object | Output from response |
| ↳ `success` | boolean | success of the response |
| ↳ `messageId` | any | messageId of the response |
| ↳ `status` | any | status of the response |
| ↳ `error` | any | error of the response |
## Notes

View File

@@ -11,22 +11,15 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
icon={true}
iconSvg={`<svg className="block-icon"
version='1.1'
id='Layer_1'
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
xmlnsXlink='http://www.w3.org/1999/xlink'
x='0px'
y='0px'
viewBox='0 0 122.3 80.3'
xmlSpace='preserve'
>
<g>
<path
fill='currentColor'
d='M94.3,0H65.4c-26,0-28,11.2-28,26.2l0,27.9c0,15.6,2,26.2,28.1,26.2h28.8c26,0,28-11.2,28-26.1V26.2
C122.3,11.2,120.3,0,94.3,0z M0,20.1C0,6.9,5.2,0,14,0c8.8,0,14,6.9,14,20.1v40.1c0,13.2-5.2,20.1-14,20.1c-8.8,0-14-6.9-14-20.1
V20.1z'
/>
<g transform='translate(1, 4)'>
<rect x='0' y='0' rx='2.5' fill='currentColor' />
<rect x='8' y='0' rx='4' fill='currentColor' />
</g>
</svg>`}
/>
@@ -133,9 +126,10 @@ This tool does not produce any outputs.
| Output | Type | Description |
| ------ | ---- | ----------- |
| `total_items` | number | total_items output from the block |
| `page_count` | number | page_count output from the block |
| `items` | json | items output from the block |
| `response` | object | Output from response |
| ↳ `total_items` | number | total_items of the response |
| ↳ `page_count` | number | page_count of the response |
| ↳ `items` | json | items of the response |
## Notes

View File

@@ -90,9 +90,10 @@ Process and analyze images using advanced vision models. Capable of understandin
| Output | Type | Description |
| ------ | ---- | ----------- |
| `content` | string | content output from the block |
| `model` | any | model output from the block |
| `tokens` | any | tokens output from the block |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `model` | any | model of the response |
| ↳ `tokens` | any | tokens of the response |
## Notes

View File

@@ -1,200 +0,0 @@
---
title: Wealthbox
description: Interact with Wealthbox
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="wealthbox"
color="#E0E0E0"
icon={true}
iconSvg={`<svg className="block-icon"
xmlns='http://www.w3.org/2000/svg'
version='1.0'
viewBox='50 -50 200 200'
>
<g fill='#106ED4' stroke='none' transform='translate(0, 200) scale(0.15, -0.15)'>
<path d='M764 1542 c-110 -64 -230 -134 -266 -156 -42 -24 -71 -49 -78 -65 -7 -19 -10 -126 -8 -334 3 -291 4 -307 23 -326 11 -11 103 -67 205 -126 102 -59 219 -127 261 -151 42 -24 85 -44 96 -44 23 0 527 288 561 320 22 22 22 23 22 340 0 288 -2 320 -17 338 -32 37 -537 322 -569 321 -18 0 -107 -46 -230 -117z m445 -144 c108 -62 206 -123 219 -135 22 -22 22 -26 22 -261 0 -214 -2 -242 -17 -260 -23 -26 -414 -252 -437 -252 -9 0 -70 31 -134 69 -64 37 -161 94 -215 125 l-97 57 2 261 3 261 210 123 c116 67 219 123 229 123 10 1 107 -50 215 -111z' />
<path d='M700 1246 l-55 -32 -3 -211 -2 -211 37 -23 c21 -12 52 -30 69 -40 l30 -18 103 59 c56 33 109 60 117 60 8 0 62 -27 119 -60 l104 -60 63 37 c35 21 66 42 70 48 4 5 8 101 8 212 l0 202 -62 35 -63 35 -3 -197 c-1 -108 -6 -200 -11 -205 -5 -5 -54 17 -114 52 -58 34 -108 61 -111 61 -2 0 -51 -27 -107 -60 -56 -32 -106 -57 -111 -54 -4 3 -8 95 -8 205 0 109 -3 199 -7 199 -5 -1 -33 -16 -63 -34z' />
</g>
</svg>`}
/>
{/* MANUAL-CONTENT-START:intro */}
[Wealthbox](https://www.wealthbox.com/) is a comprehensive CRM platform designed specifically for financial advisors and wealth management professionals. It provides a centralized system for managing client relationships, tracking interactions, and organizing business workflows in the financial services industry.
With Wealthbox, you can:
- **Manage client relationships**: Store detailed contact information, background data, and relationship histories for all your clients
- **Track interactions**: Create and maintain notes about meetings, calls, and other client touchpoints
- **Organize tasks**: Schedule and manage follow-up activities, deadlines, and important action items
- **Document workflows**: Keep comprehensive records of client communications and business processes
- **Access client data**: Retrieve information quickly with organized contact management and search capabilities
- **Automate follow-ups**: Set reminders and schedule tasks to ensure consistent client engagement
In Sim Studio, the Wealthbox integration enables your agents to seamlessly interact with your CRM data through OAuth authentication. This allows for powerful automation scenarios such as automatically creating client notes from meeting transcripts, updating contact information, scheduling follow-up tasks, and retrieving client details for personalized communications. Your agents can read existing notes, contacts, and tasks to understand client history, while also creating new entries to maintain up-to-date records. This integration bridges the gap between your AI workflows and your client relationship management, enabling automated data entry, intelligent client insights, and streamlined administrative processes that free up time for more valuable client-facing activities.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Wealthbox functionality to manage notes, contacts, and tasks. Read content from existing notes, contacts, and tasks and write to them using OAuth authentication. Supports text content manipulation for note creation and editing.
## Tools
### `wealthbox_read_note`
Read content from a Wealthbox note
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Wealthbox API |
| `noteId` | string | No | The ID of the note to read |
#### Output
| Parameter | Type |
| --------- | ---- |
| `note` | string |
| `metadata` | string |
| `noteId` | string |
| `itemType` | string |
### `wealthbox_write_note`
Create or update a Wealthbox note
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Wealthbox API |
| `content` | string | Yes | The main body of the note |
| `contactId` | string | No | ID of contact to link to this note |
#### Output
| Parameter | Type |
| --------- | ---- |
| `data` | json |
### `wealthbox_read_contact`
Read content from a Wealthbox contact
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Wealthbox API |
| `contactId` | string | No | The ID of the contact to read |
#### Output
| Parameter | Type |
| --------- | ---- |
| `contact` | string |
| `metadata` | string |
| `contactId` | string |
| `itemType` | string |
### `wealthbox_write_contact`
Create a new Wealthbox contact
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Wealthbox API |
| `firstName` | string | Yes | The first name of the contact |
| `lastName` | string | Yes | The last name of the contact |
| `emailAddress` | string | No | The email address of the contact |
| `backgroundInformation` | string | No | Background information about the contact |
#### Output
| Parameter | Type |
| --------- | ---- |
| `contact` | string |
| `metadata` | string |
| `itemType` | string |
### `wealthbox_read_task`
Read content from a Wealthbox task
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Wealthbox API |
| `taskId` | string | No | The ID of the task to read |
#### Output
| Parameter | Type |
| --------- | ---- |
| `task` | string |
| `metadata` | string |
| `taskId` | string |
| `itemType` | string |
### `wealthbox_write_task`
Create or update a Wealthbox task
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | The access token for the Wealthbox API |
| `title` | string | Yes | The name/title of the task |
| `dueDate` | string | Yes | The due date and time of the task \(format: |
| `contactId` | string | No | ID of contact to link to this task |
| `description` | string | No | Description or notes about the task |
#### Output
| Parameter | Type |
| --------- | ---- |
| `data` | json |
## Block Configuration
### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `operation` | string | Yes | Operation |
### Outputs
| Output | Type | Description |
| ------ | ---- | ----------- |
| `note` | any | note output from the block |
| `notes` | any | notes output from the block |
| `contact` | any | contact output from the block |
| `contacts` | any | contacts output from the block |
| `task` | any | task output from the block |
| `tasks` | any | tasks output from the block |
| `metadata` | json | metadata output from the block |
| `success` | any | success output from the block |
## Notes
- Category: `tools`
- Type: `wealthbox`

View File

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

View File

@@ -79,9 +79,10 @@ Send WhatsApp messages
| Output | Type | Description |
| ------ | ---- | ----------- |
| `success` | boolean | success output from the block |
| `messageId` | any | messageId output from the block |
| `error` | any | error output from the block |
| `response` | object | Output from response |
| ↳ `success` | boolean | success of the response |
| ↳ `messageId` | any | messageId of the response |
| ↳ `error` | any | error of the response |
## Notes

View File

@@ -145,14 +145,15 @@ Get user profile information
| Output | Type | Description |
| ------ | ---- | ----------- |
| `tweet` | json | tweet output from the block |
| `replies` | any | replies output from the block |
| `context` | any | context output from the block |
| `tweets` | json | tweets output from the block |
| `includes` | any | includes output from the block |
| `meta` | json | meta output from the block |
| `user` | json | user output from the block |
| `recentTweets` | any | recentTweets output from the block |
| `response` | object | Output from response |
| ↳ `tweet` | json | tweet of the response |
| ↳ `replies` | any | replies of the response |
| ↳ `context` | any | context of the response |
| ↳ `tweets` | json | tweets of the response |
| ↳ `includes` | any | includes of the response |
| ↳ `meta` | json | meta of the response |
| ↳ `user` | json | user of the response |
| ↳ `recentTweets` | any | recentTweets of the response |
## Notes

View File

@@ -55,8 +55,8 @@ Search for videos on YouTube using the YouTube Data API.
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | Search query for YouTube videos |
| `maxResults` | number | No | Maximum number of videos to return |
| `apiKey` | string | Yes | YouTube API Key |
| `maxResults` | number | No | Maximum number of videos to return |
#### Output
@@ -82,8 +82,9 @@ Search for videos on YouTube using the YouTube Data API.
| Output | Type | Description |
| ------ | ---- | ----------- |
| `items` | json | items output from the block |
| `totalResults` | number | totalResults output from the block |
| `response` | object | Output from response |
| ↳ `items` | json | items of the response |
| ↳ `totalResults` | number | totalResults of the response |
## Notes

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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