Compare commits
98 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95a8d6410c | ||
|
|
08720d926c | ||
|
|
308f39e8b9 | ||
|
|
5b1f948686 | ||
|
|
cb17691c01 | ||
|
|
c00b18594e | ||
|
|
95efae9035 | ||
|
|
b12e415fea | ||
|
|
510ce4b7da | ||
|
|
abed816afd | ||
|
|
6f390c0d1d | ||
|
|
9c12ddf491 | ||
|
|
27ef45f717 | ||
|
|
0414aa5f6d | ||
|
|
93f68a9092 | ||
|
|
727e5e8763 | ||
|
|
4964495abb | ||
|
|
40d3ce5e10 | ||
|
|
a251122601 | ||
|
|
9e8d2f7c7d | ||
|
|
eeb1a340b2 | ||
|
|
c91c132e88 | ||
|
|
5028930b9f | ||
|
|
b565babe1f | ||
|
|
2f57d8a884 | ||
|
|
a173f6a7ab | ||
|
|
af1c7dc39d | ||
|
|
17e493b3b5 | ||
|
|
a84c55772d | ||
|
|
5ddfe1b709 | ||
|
|
022a61b77a | ||
|
|
386644e9f9 | ||
|
|
14e1c179dc | ||
|
|
67b0b1258c | ||
|
|
258419ddc4 | ||
|
|
dc69ea522b | ||
|
|
8b35cf5558 | ||
|
|
4197e50d78 | ||
|
|
0dd7735251 | ||
|
|
8ddc1d8eda | ||
|
|
e90138a651 | ||
|
|
d783ba6fb7 | ||
|
|
a599d3ae0a | ||
|
|
ca468dcbcd | ||
|
|
fe82166ebc | ||
|
|
4433100a47 | ||
|
|
92a998df0e | ||
|
|
a7c8f5dfe9 | ||
|
|
e392ca43aa | ||
|
|
a217daca3c | ||
|
|
21ffa5048b | ||
|
|
78f45a587a | ||
|
|
d8a7aaaf88 | ||
|
|
5158a00b54 | ||
|
|
31d909bb82 | ||
|
|
8417a98be0 | ||
|
|
f5a64f400e | ||
|
|
2ae9cbc17f | ||
|
|
919cf0b58e | ||
|
|
560d184c31 | ||
|
|
e4fbb67833 | ||
|
|
7f0f902204 | ||
|
|
7739917941 | ||
|
|
d94bfd9a91 | ||
|
|
d919073bea | ||
|
|
80076012c6 | ||
|
|
f2b1c7332d | ||
|
|
b923c247ca | ||
|
|
cdfb2fcd4c | ||
|
|
5ee66252ed | ||
|
|
7b73dfb462 | ||
|
|
d7a2c0747c | ||
|
|
24c22537bb | ||
|
|
ddefbaab38 | ||
|
|
b05a9b1493 | ||
|
|
11264edc2c | ||
|
|
fb5d5d9e64 | ||
|
|
732df0494e | ||
|
|
06b1d82781 | ||
|
|
3d5d7474ed | ||
|
|
27794e59b3 | ||
|
|
88668fed84 | ||
|
|
fe5402a6d7 | ||
|
|
c436c2e378 | ||
|
|
60e905c520 | ||
|
|
1e55a0e044 | ||
|
|
e142753d64 | ||
|
|
61deb02959 | ||
|
|
e52862166d | ||
|
|
8f71684dcb | ||
|
|
92fe353f44 | ||
|
|
4c6c7272c5 | ||
|
|
55a9adfdda | ||
|
|
bdfe7e9b99 | ||
|
|
27c248a70c | ||
|
|
19ca9c78b4 | ||
|
|
b13f339327 | ||
|
|
aade4bf3ae |
123
.github/workflows/build.yml
vendored
@@ -7,17 +7,43 @@ on:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# AMD64 builds on x86 runners
|
||||
- dockerfile: ./docker/app.Dockerfile
|
||||
image: ghcr.io/simstudioai/simstudio
|
||||
platform: linux/amd64
|
||||
arch: amd64
|
||||
runner: linux-x64-8-core
|
||||
- dockerfile: ./docker/db.Dockerfile
|
||||
image: ghcr.io/simstudioai/migrations
|
||||
platform: linux/amd64
|
||||
arch: amd64
|
||||
runner: linux-x64-8-core
|
||||
- dockerfile: ./docker/realtime.Dockerfile
|
||||
image: ghcr.io/simstudioai/realtime
|
||||
platform: linux/amd64
|
||||
arch: amd64
|
||||
runner: linux-x64-8-core
|
||||
# ARM64 builds on native ARM64 runners
|
||||
- dockerfile: ./docker/app.Dockerfile
|
||||
image: ghcr.io/simstudioai/simstudio
|
||||
platform: linux/arm64
|
||||
arch: arm64
|
||||
runner: linux-arm64-8-core
|
||||
- dockerfile: ./docker/db.Dockerfile
|
||||
image: ghcr.io/simstudioai/migrations
|
||||
platform: linux/arm64
|
||||
arch: arm64
|
||||
runner: linux-arm64-8-core
|
||||
- dockerfile: ./docker/realtime.Dockerfile
|
||||
image: ghcr.io/simstudioai/realtime
|
||||
platform: linux/arm64
|
||||
arch: arm64
|
||||
runner: linux-arm64-8-core
|
||||
runs-on: ${{ matrix.runner }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
@@ -26,9 +52,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
@@ -41,6 +64,55 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ matrix.image }}
|
||||
tags: |
|
||||
type=raw,value=latest-${{ matrix.arch }},enable=${{ github.ref == 'refs/heads/main' }}
|
||||
type=ref,event=pr,suffix=-${{ matrix.arch }}
|
||||
type=semver,pattern={{version}},suffix=-${{ matrix.arch }}
|
||||
type=semver,pattern={{major}}.{{minor}},suffix=-${{ matrix.arch }}
|
||||
type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-${{ matrix.arch }}
|
||||
type=sha,format=long,suffix=-${{ matrix.arch }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha,scope=build-v2
|
||||
cache-to: type=gha,mode=max,scope=build-v2
|
||||
provenance: false
|
||||
sbom: false
|
||||
|
||||
create-manifests:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-and-push
|
||||
if: github.event_name != 'pull_request'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- image: ghcr.io/simstudioai/simstudio
|
||||
- image: ghcr.io/simstudioai/migrations
|
||||
- image: ghcr.io/simstudioai/realtime
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata for manifest
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
@@ -53,14 +125,35 @@ jobs:
|
||||
type=semver,pattern={{major}}.{{minor}}.{{patch}}
|
||||
type=sha,format=long
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Create and push manifest
|
||||
run: |
|
||||
# Extract the tags from metadata (these are the final manifest tags we want)
|
||||
MANIFEST_TAGS="${{ steps.meta.outputs.tags }}"
|
||||
|
||||
# Create manifest for each tag
|
||||
for manifest_tag in $MANIFEST_TAGS; do
|
||||
echo "Creating manifest for $manifest_tag"
|
||||
|
||||
# The architecture-specific images have -amd64 and -arm64 suffixes
|
||||
amd64_image="${manifest_tag}-amd64"
|
||||
arm64_image="${manifest_tag}-arm64"
|
||||
|
||||
echo "Looking for images: $amd64_image and $arm64_image"
|
||||
|
||||
# Check if both architecture images exist
|
||||
if docker manifest inspect "$amd64_image" >/dev/null 2>&1 && docker manifest inspect "$arm64_image" >/dev/null 2>&1; then
|
||||
echo "Both images found, creating manifest..."
|
||||
docker manifest create "$manifest_tag" \
|
||||
"$amd64_image" \
|
||||
"$arm64_image"
|
||||
docker manifest push "$manifest_tag"
|
||||
echo "Successfully created and pushed manifest for $manifest_tag"
|
||||
else
|
||||
echo "Error: One or both architecture images not found"
|
||||
echo "Checking AMD64 image: $amd64_image"
|
||||
docker manifest inspect "$amd64_image" || echo "AMD64 image not found"
|
||||
echo "Checking ARM64 image: $arm64_image"
|
||||
docker manifest inspect "$arm64_image" || echo "ARM64 image not found"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
2
.github/workflows/ci.yml
vendored
@@ -74,4 +74,4 @@ jobs:
|
||||
working-directory: ./apps/sim
|
||||
env:
|
||||
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
|
||||
run: bunx drizzle-kit push
|
||||
run: bunx drizzle-kit migrate
|
||||
|
||||
5
.gitignore
vendored
@@ -65,4 +65,7 @@ start-collector.sh
|
||||
.turbo
|
||||
|
||||
# VSCode
|
||||
.vscode
|
||||
.vscode
|
||||
|
||||
## Helm Chart Tests
|
||||
helm/sim/test
|
||||
40
README.md
@@ -91,6 +91,12 @@ docker compose -f docker-compose.prod.yml up -d
|
||||
|
||||
### Option 4: Manual Setup
|
||||
|
||||
**Requirements:**
|
||||
- [Bun](https://bun.sh/) runtime
|
||||
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
|
||||
|
||||
**Note:** Sim Studio uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
|
||||
|
||||
1. Clone and install dependencies:
|
||||
|
||||
```bash
|
||||
@@ -99,20 +105,43 @@ cd sim
|
||||
bun install
|
||||
```
|
||||
|
||||
2. Set up environment:
|
||||
2. Set up PostgreSQL with pgvector:
|
||||
|
||||
You need PostgreSQL with the `vector` extension for embedding support. Choose one option:
|
||||
|
||||
**Option A: Using Docker (Recommended)**
|
||||
```bash
|
||||
# Start PostgreSQL with pgvector extension
|
||||
docker run --name simstudio-db \
|
||||
-e POSTGRES_PASSWORD=your_password \
|
||||
-e POSTGRES_DB=simstudio \
|
||||
-p 5432:5432 -d \
|
||||
pgvector/pgvector:pg17
|
||||
```
|
||||
|
||||
**Option B: Manual Installation**
|
||||
- Install PostgreSQL 12+ and the pgvector extension
|
||||
- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation)
|
||||
|
||||
3. Set up environment:
|
||||
|
||||
```bash
|
||||
cd apps/sim
|
||||
cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
|
||||
```
|
||||
|
||||
3. Set up the database:
|
||||
|
||||
Update your `.env` file with the database URL:
|
||||
```bash
|
||||
bunx drizzle-kit push
|
||||
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
|
||||
```
|
||||
|
||||
4. Start the development servers:
|
||||
4. Set up the database:
|
||||
|
||||
```bash
|
||||
bunx drizzle-kit migrate
|
||||
```
|
||||
|
||||
5. Start the development servers:
|
||||
|
||||
**Recommended approach - run both servers together (from project root):**
|
||||
|
||||
@@ -147,6 +176,7 @@ bun run dev:sockets
|
||||
- **Docs**: [Fumadocs](https://fumadocs.vercel.app/)
|
||||
- **Monorepo**: [Turborepo](https://turborepo.org/)
|
||||
- **Realtime**: [Socket.io](https://socket.io/)
|
||||
- **Background Jobs**: [Trigger.dev](https://trigger.dev/)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { cn } from '@/lib/utils'
|
||||
import {
|
||||
AgentIcon,
|
||||
ApiIcon,
|
||||
@@ -7,7 +6,8 @@ import {
|
||||
ConditionalIcon,
|
||||
ConnectIcon,
|
||||
ResponseIcon,
|
||||
} from '../icons'
|
||||
} from '@/components/icons'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
// Custom Feature component specifically for BlockTypes to handle the 6-item layout
|
||||
const BlockFeature = ({
|
||||
|
||||
30
apps/docs/components/ui/video.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { getVideoUrl } from '@/lib/utils'
|
||||
|
||||
interface VideoProps {
|
||||
src: string
|
||||
className?: string
|
||||
autoPlay?: boolean
|
||||
loop?: boolean
|
||||
muted?: boolean
|
||||
playsInline?: boolean
|
||||
}
|
||||
|
||||
export function Video({
|
||||
src,
|
||||
className = 'w-full -mb-2 rounded-lg',
|
||||
autoPlay = true,
|
||||
loop = true,
|
||||
muted = true,
|
||||
playsInline = true,
|
||||
}: VideoProps) {
|
||||
return (
|
||||
<video
|
||||
autoPlay={autoPlay}
|
||||
loop={loop}
|
||||
muted={muted}
|
||||
playsInline={playsInline}
|
||||
className={className}
|
||||
src={getVideoUrl(src)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
The Evaluator block uses AI to score and assess content quality based on metrics you define. Perfect for quality control, A/B testing, and ensuring your AI outputs meet specific standards.
|
||||
|
||||
@@ -63,7 +64,7 @@ Choose an AI model to perform the evaluation:
|
||||
**Local Models**: Any model running on Ollama
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/models.mp4"></video>
|
||||
<Video src="models.mp4" />
|
||||
</div>
|
||||
|
||||
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate evaluations.
|
||||
|
||||
@@ -7,11 +7,12 @@ import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { BlockTypes } from '@/components/ui/block-types'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
Blocks are the building components you connect together to create AI workflows. Think of them as specialized modules that each handle a specific task—from chatting with AI models to making API calls or processing data.
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
|
||||
<Video src="connections.mp4" />
|
||||
</div>
|
||||
|
||||
## Core Block Types
|
||||
@@ -62,7 +63,7 @@ You create workflows by connecting blocks together. The output of one block beco
|
||||
- **Branching paths**: Some blocks can route to different paths based on conditions
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
|
||||
<Video src="connections.mp4" />
|
||||
</div>
|
||||
|
||||
## Common Patterns
|
||||
|
||||
@@ -172,4 +172,4 @@ After a loop completes, you can access aggregated results:
|
||||
|
||||
- **Set reasonable limits**: Keep iteration counts reasonable to avoid long execution times
|
||||
- **Use ForEach for collections**: When processing arrays or objects, use ForEach instead of For loops
|
||||
- **Handle errors gracefully**: Consider adding error handling inside loops for robust workflows
|
||||
- **Handle errors gracefully**: Consider adding error handling inside loops for robust workflows
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"agent",
|
||||
"api",
|
||||
"condition",
|
||||
"function",
|
||||
"evaluator",
|
||||
"router",
|
||||
"response",
|
||||
"workflow",
|
||||
"function",
|
||||
"loop",
|
||||
"parallel"
|
||||
"parallel",
|
||||
"response",
|
||||
"router",
|
||||
"workflow"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -207,4 +207,4 @@ Understanding when to use each:
|
||||
|
||||
- **Independent operations only**: Ensure operations don't depend on each other
|
||||
- **Handle rate limits**: Add delays or throttling for API-heavy workflows
|
||||
- **Error handling**: Each instance should handle its own errors gracefully
|
||||
- **Error handling**: Each instance should handle its own errors gracefully
|
||||
|
||||
@@ -182,4 +182,5 @@ headers:
|
||||
- **Structure your responses consistently**: Maintain a consistent JSON structure across all your API endpoints for better developer experience
|
||||
- **Include relevant metadata**: Add timestamps and version information to help with debugging and monitoring
|
||||
- **Handle errors gracefully**: Use conditional logic in your workflow to set appropriate error responses with descriptive messages
|
||||
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes
|
||||
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
The Router block uses AI to intelligently decide which path your workflow should take next. Unlike Condition blocks that use simple rules, Router blocks can understand context and make smart routing decisions based on content analysis.
|
||||
|
||||
@@ -103,7 +104,7 @@ Choose an AI model to power the routing decision:
|
||||
**Local Models**: Any model running on Ollama
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/router-model-dropdown.mp4"></video>
|
||||
<Video src="router-model-dropdown.mp4" />
|
||||
</div>
|
||||
|
||||
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate routing decisions.
|
||||
|
||||
@@ -256,4 +256,4 @@ return {
|
||||
- **Document dependencies**: Clearly document which workflows depend on others and maintain dependency maps
|
||||
- **Test independently**: Ensure child workflows can be tested and validated independently from parent workflows
|
||||
- **Monitor performance**: Be aware that nested workflows can impact overall execution time and resource usage
|
||||
- **Use semantic naming**: Give workflows descriptive names that clearly indicate their purpose and functionality
|
||||
- **Use semantic naming**: Give workflows descriptive names that clearly indicate their purpose and functionality
|
||||
|
||||
@@ -6,6 +6,7 @@ description: Connect your blocks to one another.
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Card, Cards } from 'fumadocs-ui/components/card'
|
||||
import { ConnectIcon } from '@/components/icons'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
Connections are the pathways that allow data to flow between blocks in your workflow. They define how information is passed from one block to another, enabling you to create sophisticated, multi-step processes.
|
||||
|
||||
@@ -15,7 +16,7 @@ Connections are the pathways that allow data to flow between blocks in your work
|
||||
</Callout>
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
|
||||
<Video src="connections.mp4" />
|
||||
</div>
|
||||
|
||||
## Connection Types
|
||||
|
||||
@@ -4,11 +4,12 @@ description: Using connection tags to reference data between blocks
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
Connection tags are visual representations of the data available from connected blocks. They provide an easy way to reference outputs from previous blocks in your workflow.
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/connections.mp4"></video>
|
||||
<Video src="connections.mp4" />
|
||||
</div>
|
||||
|
||||
### What Are Connection Tags?
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
LoopIcon,
|
||||
ParallelIcon,
|
||||
} from '@/components/icons'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
When you run a workflow in Sim Studio, the execution engine follows a systematic process to ensure blocks are executed in the correct order with proper data flow.
|
||||
|
||||
@@ -161,13 +162,9 @@ Run workflows on-demand through the Sim Studio interface by clicking the "Run" b
|
||||
- One-off tasks
|
||||
- Workflows that need human supervision
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/manual-execution-light.png"
|
||||
darkSrc="/static/dark/manual-execution-dark.png"
|
||||
alt="Manual Execution"
|
||||
width={600}
|
||||
height={400}
|
||||
/>
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="input-format.mp4" />
|
||||
</div>
|
||||
|
||||
### Scheduled Execution
|
||||
|
||||
@@ -178,13 +175,9 @@ Configure workflows to run automatically on a specified schedule:
|
||||
- Configure timezone settings
|
||||
- Set minimum and maximum execution intervals
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/scheduled-execution-light.png"
|
||||
darkSrc="/static/dark/scheduled-execution-dark.png"
|
||||
alt="Scheduled Execution"
|
||||
width={600}
|
||||
height={400}
|
||||
/>
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="configure-schedule.mp4" />
|
||||
</div>
|
||||
|
||||
### API Endpoints
|
||||
|
||||
@@ -195,13 +188,19 @@ Each workflow can be exposed as an API endpoint:
|
||||
- Send custom inputs via POST requests
|
||||
- Receive execution results as JSON responses
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/api-execution-light.png"
|
||||
darkSrc="/static/dark/api-execution-dark.png"
|
||||
alt="API Execution"
|
||||
width={600}
|
||||
height={400}
|
||||
/>
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="api-deployment.mp4" />
|
||||
</div>
|
||||
|
||||
#### Viewing Deployed APIs
|
||||
|
||||
Monitor your deployed workflow APIs and their current state:
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="api-redeployment.mp4" />
|
||||
</div>
|
||||
|
||||
This shows how to view the deployed state and compare with the original deployed API configuration.
|
||||
|
||||
### Webhooks
|
||||
|
||||
@@ -212,13 +211,9 @@ Configure workflows to execute in response to external events:
|
||||
- Configure webhook security settings
|
||||
- Support for specialized webhooks (GitHub, Stripe, etc.)
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/webhook-execution-light.png"
|
||||
darkSrc="/static/dark/webhook-execution-dark.png"
|
||||
alt="Webhook Execution"
|
||||
width={600}
|
||||
height={400}
|
||||
/>
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="webhooks.mp4" />
|
||||
</div>
|
||||
|
||||
<Callout type="info">
|
||||
The execution method you choose depends on your workflow's purpose. Manual execution is great for
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
PerplexityIcon,
|
||||
SlackIcon,
|
||||
} from '@/components/icons'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
This tutorial will guide you through building your first AI workflow in Sim Studio. We'll create a people research agent that can find information about individuals using state-of-the-art LLM-Search tools.
|
||||
|
||||
@@ -63,7 +64,7 @@ A people research agent that:
|
||||
- **User Prompt**: Drag the connection from the Start block's output into this field (this connects `<start.input>` to the user prompt)
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-2.mp4"></video>
|
||||
<Video src="examples/started-2.mp4" />
|
||||
</div>
|
||||
</Step>
|
||||
|
||||
@@ -77,7 +78,7 @@ A people research agent that:
|
||||
- Add your API keys for both tools (this allows the agent to search the web and access additional information)
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-3.mp4"></video>
|
||||
<Video src="examples/started-3.mp4" />
|
||||
</div>
|
||||
</Step>
|
||||
|
||||
@@ -92,7 +93,7 @@ A people research agent that:
|
||||
You should see the agent's response analyzing the person described in your text.
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-4.mp4"></video>
|
||||
<Video src="examples/started-4.mp4" />
|
||||
</div>
|
||||
</Step>
|
||||
|
||||
@@ -105,7 +106,7 @@ A people research agent that:
|
||||
- The AI will generate a JSON schema for you automatically
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-5.mp4"></video>
|
||||
<Video src="examples/started-5.mp4" />
|
||||
</div>
|
||||
</Step>
|
||||
|
||||
@@ -120,7 +121,7 @@ A people research agent that:
|
||||
You should now see structured JSON output with the person's information organized into location, profession, and education fields.
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/static/examples/started/started-6.mp4"></video>
|
||||
<Video src="examples/started-6.mp4" />
|
||||
</div>
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"./introduction/index",
|
||||
"./getting-started/index",
|
||||
"---Create---",
|
||||
"triggers",
|
||||
"blocks",
|
||||
"tools",
|
||||
"---Connections---",
|
||||
@@ -13,6 +14,7 @@
|
||||
"execution",
|
||||
"---Advanced---",
|
||||
"./variables/index",
|
||||
"yaml",
|
||||
"---SDKs---",
|
||||
"./sdks/python",
|
||||
"./sdks/typescript"
|
||||
|
||||
138
apps/docs/content/docs/tools/arxiv.mdx
Normal file
@@ -0,0 +1,138 @@
|
||||
---
|
||||
title: ArXiv
|
||||
description: Search and retrieve academic papers from ArXiv
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="arxiv"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon" id='logomark' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17.732 24.269'>
|
||||
<g id='tiny'>
|
||||
<path
|
||||
d='M573.549,280.916l2.266,2.738,6.674-7.84c.353-.47.52-.717.353-1.117a1.218,1.218,0,0,0-1.061-.748h0a.953.953,0,0,0-.712.262Z'
|
||||
transform='translate(-566.984 -271.548)'
|
||||
fill='#bdb9b4'
|
||||
/>
|
||||
<path
|
||||
d='M579.525,282.225l-10.606-10.174a1.413,1.413,0,0,0-.834-.5,1.09,1.09,0,0,0-1.027.66c-.167.4-.047.681.319,1.206l8.44,10.242h0l-6.282,7.716a1.336,1.336,0,0,0-.323,1.3,1.114,1.114,0,0,0,1.04.69A.992.992,0,0,0,571,293l8.519-7.92A1.924,1.924,0,0,0,579.525,282.225Z'
|
||||
transform='translate(-566.984 -271.548)'
|
||||
fill='#b31b1b'
|
||||
/>
|
||||
<path
|
||||
d='M584.32,293.912l-8.525-10.275,0,0L573.53,280.9l-1.389,1.254a2.063,2.063,0,0,0,0,2.965l10.812,10.419a.925.925,0,0,0,.742.282,1.039,1.039,0,0,0,.953-.667A1.261,1.261,0,0,0,584.32,293.912Z'
|
||||
transform='translate(-566.984 -271.548)'
|
||||
fill='#bdb9b4'
|
||||
/>
|
||||
</g>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[ArXiv](https://arxiv.org/) is a free, open-access repository of scientific research papers in fields such as physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering, systems science, and economics. ArXiv provides a vast collection of preprints and published articles, making it a primary resource for researchers and practitioners worldwide.
|
||||
|
||||
With ArXiv, you can:
|
||||
|
||||
- **Search for academic papers**: Find research by keywords, author names, titles, categories, and more
|
||||
- **Retrieve paper metadata**: Access abstracts, author lists, publication dates, and other bibliographic information
|
||||
- **Download full-text PDFs**: Obtain the complete text of most papers for in-depth study
|
||||
- **Explore author contributions**: View all papers by a specific author
|
||||
- **Stay up-to-date**: Discover the latest submissions and trending topics in your field
|
||||
|
||||
In Sim Studio, the ArXiv integration enables your agents to programmatically search, retrieve, and analyze scientific papers from ArXiv. This allows you to automate literature reviews, build research assistants, or incorporate up-to-date scientific knowledge into your agentic workflows. Use ArXiv as a dynamic data source for research, discovery, and knowledge extraction within your Sim Studio projects.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Search for academic papers, retrieve metadata, download papers, and access the vast collection of scientific research on ArXiv.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `arxiv_search`
|
||||
|
||||
Search for academic papers on ArXiv by keywords, authors, titles, or other fields.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `query` | string | Yes | The search query to execute |
|
||||
| `searchField` | string | No | Field to search in: all, ti \(title\), au \(author\), abs \(abstract\), co \(comment\), jr \(journal\), cat \(category\), rn \(report number\) |
|
||||
| `maxResults` | number | No | Maximum number of results to return \(default: 10, max: 2000\) |
|
||||
| `sortBy` | string | No | Sort by: relevance, lastUpdatedDate, submittedDate \(default: relevance\) |
|
||||
| `sortOrder` | string | No | Sort order: ascending, descending \(default: descending\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `query` | string |
|
||||
| `papers` | string |
|
||||
| `totalResults` | string |
|
||||
|
||||
### `arxiv_get_paper`
|
||||
|
||||
Get detailed information about a specific ArXiv paper by its ID.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `paperId` | string | Yes | ArXiv paper ID \(e.g., |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `paper` | string |
|
||||
|
||||
### `arxiv_get_author_papers`
|
||||
|
||||
Search for papers by a specific author on ArXiv.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `authorName` | string | Yes | Author name to search for |
|
||||
| `maxResults` | number | No | Maximum number of results to return \(default: 10, max: 2000\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `authorPapers` | string |
|
||||
| `authorName` | string |
|
||||
| `totalResults` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `papers` | json | papers output from the block |
|
||||
| `totalResults` | number | totalResults output from the block |
|
||||
| `paper` | json | paper output from the block |
|
||||
| `authorPapers` | json | authorPapers output from the block |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `arxiv`
|
||||
@@ -26,7 +26,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Exa](https://exa.ai/) is an AI-powered search engine designed specifically for developers and researchers that provides highly relevant and up-to-date information from across the web. It combines advanced semantic search capabilities with AI understanding to deliver more accurate and contextually relevant results than traditional search engines.
|
||||
[Exa](https://exa.ai/) is an AI-powered search engine designed specifically for developers and researchers, providing highly relevant and up-to-date information from across the web. It combines advanced semantic search capabilities with AI understanding to deliver more accurate and contextually relevant results than traditional search engines.
|
||||
|
||||
With Exa, you can:
|
||||
|
||||
@@ -35,14 +35,16 @@ With Exa, you can:
|
||||
- **Access up-to-date information**: Retrieve current information from across the web
|
||||
- **Find similar content**: Discover related resources based on content similarity
|
||||
- **Extract webpage contents**: Retrieve and process the full text of web pages
|
||||
- **Answer questions with citations**: Ask questions and receive direct answers with supporting sources
|
||||
- **Perform research tasks**: Automate multi-step research workflows to gather, synthesize, and summarize information
|
||||
|
||||
In Sim Studio, the Exa integration allows your agents to search the web for information, retrieve content from specific URLs, and find similar resources - all programmatically through API calls. This enables your agents to access real-time information from the internet, enhancing their ability to provide accurate, current, and relevant responses. The integration is particularly valuable for research tasks, information gathering, content discovery, and answering questions that require up-to-date information from across the web.
|
||||
In Sim Studio, the Exa integration allows your agents to search the web for information, retrieve content from specific URLs, find similar resources, answer questions with citations, and conduct research tasks—all programmatically through API calls. This enables your agents to access real-time information from the internet, enhancing their ability to provide accurate, current, and relevant responses. The integration is particularly valuable for research tasks, information gathering, content discovery, and answering questions that require up-to-date information from across the web.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Search the web, retrieve content, find similar links, and answer questions using Exa
|
||||
Search the web, retrieve content, find similar links, and answer questions using Exa's powerful AI search capabilities.
|
||||
|
||||
|
||||
|
||||
@@ -142,6 +144,25 @@ Get an AI-generated answer to a question with citations from the web using Exa A
|
||||
| `url` | string |
|
||||
| `text` | string |
|
||||
|
||||
### `exa_research`
|
||||
|
||||
Perform comprehensive research using AI to generate detailed reports with citations
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `query` | string | Yes | Research query or topic |
|
||||
| `includeText` | boolean | No | Include full text content in results |
|
||||
| `apiKey` | string | Yes | Exa AI API Key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `taskId` | string |
|
||||
| `research` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
@@ -162,6 +183,7 @@ Get an AI-generated answer to a question with citations from the web using Exa A
|
||||
| `similarLinks` | json | similarLinks output from the block |
|
||||
| `answer` | string | answer output from the block |
|
||||
| `citations` | json | citations output from the block |
|
||||
| `research` | json | research output from the block |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
@@ -44,8 +44,16 @@ With Firecrawl in Sim Studio, you can:
|
||||
- **Handle JavaScript-heavy sites**: Process content from modern web applications that rely on JavaScript
|
||||
- **Filter content**: Focus on specific parts of a page using CSS selectors
|
||||
- **Process at scale**: Handle high-volume scraping needs with a reliable API
|
||||
- **Search the web**: Perform intelligent web searches and retrieve structured results
|
||||
- **Crawl entire sites**: Crawl multiple pages from a website and aggregate their content
|
||||
|
||||
The Firecrawl integration allows your agents to access and process web content programmatically without leaving the Sim Studio environment. This enables scenarios like research, content aggregation, data extraction, and information analysis from across the web. Your agents can gather information from websites, extract structured data, and use that information to make decisions or generate insights - all without having to navigate the complexities of raw HTML parsing or browser automation. Simply configure the Firecrawl block with your API key, provide the target URL, and your agents can immediately begin working with web content in a clean, structured format.
|
||||
In Sim Studio, the Firecrawl integration enables your agents to access and process web content programmatically as part of their workflows. Supported operations include:
|
||||
|
||||
- **Scrape**: Extract structured content (Markdown, HTML, metadata) from a single web page.
|
||||
- **Search**: Search the web for information using Firecrawl's intelligent search capabilities.
|
||||
- **Crawl**: Crawl multiple pages from a website, returning structured content and metadata for each page.
|
||||
|
||||
This allows your agents to gather information from websites, extract structured data, and use that information to make decisions or generate insights—all without having to navigate the complexities of raw HTML parsing or browser automation. Simply configure the Firecrawl block with your API key, select the operation (Scrape, Search, or Crawl), and provide the relevant parameters. Your agents can immediately begin working with web content in a clean, structured format.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
@@ -95,6 +103,28 @@ Search for information on the web using Firecrawl
|
||||
| `data` | string |
|
||||
| `warning` | string |
|
||||
|
||||
### `firecrawl_crawl`
|
||||
|
||||
Crawl entire websites and extract structured content from all accessible pages
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `url` | string | Yes | The website URL to crawl |
|
||||
| `limit` | number | No | Maximum number of pages to crawl \(default: 100\) |
|
||||
| `onlyMainContent` | boolean | No | Extract only main content from pages |
|
||||
| `apiKey` | string | Yes | Firecrawl API Key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `jobId` | string |
|
||||
| `pages` | string |
|
||||
| `total` | string |
|
||||
| `creditsUsed` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
@@ -116,6 +146,9 @@ Search for information on the web using Firecrawl
|
||||
| `metadata` | json | metadata output from the block |
|
||||
| `data` | json | data output from the block |
|
||||
| `warning` | any | warning output from the block |
|
||||
| `pages` | json | pages output from the block |
|
||||
| `total` | number | total output from the block |
|
||||
| `creditsUsed` | number | creditsUsed output from the block |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
@@ -90,7 +90,7 @@ In Sim Studio, the Google Calendar integration enables your agents to programmat
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Google Calendar functionality to create, read, update, and list calendar events within your workflow. Automate scheduling, check availability, and manage events using OAuth authentication. Email invitations are sent asynchronously and delivery depends on recipients
|
||||
Integrate Google Calendar functionality to create, read, update, and list calendar events within your workflow. Automate scheduling, check availability, and manage events using OAuth authentication. Email invitations are sent asynchronously and delivery depends on recipients' Google Calendar settings.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ In Sim Studio, the DALL-E integration enables your agents to generate images pro
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Create high-quality images using OpenAI
|
||||
Create high-quality images using OpenAI's image generation models. Configure resolution, quality, style, and other parameters to get exactly the image you need.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,3 +64,14 @@ Tools typically return structured data that can be processed by subsequent block
|
||||
- Status information
|
||||
|
||||
Refer to each tool's specific documentation to understand its exact output format.
|
||||
|
||||
## YAML Configuration
|
||||
|
||||
For detailed YAML workflow configuration and syntax, see the [YAML Workflow Reference](/yaml) documentation. This includes comprehensive guides for:
|
||||
|
||||
- **Block Reference Syntax**: How to connect and reference data between blocks
|
||||
- **Tool Configuration**: Using tools in both standalone blocks and agent configurations
|
||||
- **Environment Variables**: Secure handling of API keys and credentials
|
||||
- **Complete Examples**: Real-world workflow patterns and configurations
|
||||
|
||||
For specific tool parameters and configuration options, refer to each tool's individual documentation page.
|
||||
|
||||
@@ -63,7 +63,7 @@ This integration is particularly valuable for building agents that need to gathe
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Transform web content into clean, readable text using Jina AI
|
||||
Transform web content into clean, readable text using Jina AI's advanced extraction capabilities. Extract meaningful content from websites while preserving important information and optionally gathering links.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"items": [
|
||||
"index",
|
||||
"airtable",
|
||||
"arxiv",
|
||||
"browser_use",
|
||||
"clay",
|
||||
"confluence",
|
||||
@@ -34,8 +35,10 @@
|
||||
"outlook",
|
||||
"perplexity",
|
||||
"pinecone",
|
||||
"qdrant",
|
||||
"reddit",
|
||||
"s3",
|
||||
"schedule",
|
||||
"serper",
|
||||
"slack",
|
||||
"stagehand",
|
||||
@@ -49,7 +52,9 @@
|
||||
"typeform",
|
||||
"vision",
|
||||
"wealthbox",
|
||||
"webhook",
|
||||
"whatsapp",
|
||||
"wikipedia",
|
||||
"x",
|
||||
"youtube"
|
||||
]
|
||||
|
||||
@@ -29,7 +29,17 @@ With Notion, you can:
|
||||
- **Connect information**: Link between pages and databases to create a knowledge network
|
||||
- **Access anywhere**: Use Notion across web, desktop, and mobile platforms with automatic syncing
|
||||
|
||||
In Sim Studio, the Notion integration enables your agents to interact directly with your Notion workspace programmatically. This allows for powerful automation scenarios such as knowledge management, content creation, and information retrieval. Your agents can read existing Notion pages to extract information, write to pages to update content, and create new pages from scratch. This integration bridges the gap between your AI workflows and your knowledge base, enabling seamless documentation and information management. By connecting Sim Studio with Notion, you can automate documentation processes, maintain up-to-date information repositories, generate reports, and organize information intelligently - all through your intelligent agents.
|
||||
In Sim Studio, the Notion integration enables your agents to interact directly with your Notion workspace programmatically. This allows for powerful automation scenarios such as knowledge management, content creation, and information retrieval. Your agents can:
|
||||
|
||||
- **Read Notion pages**: Extract content and metadata from any Notion page.
|
||||
- **Read Notion databases**: Retrieve database structure and information.
|
||||
- **Write to pages**: Append new content to existing Notion pages.
|
||||
- **Create new pages**: Generate new Notion pages under a parent page, with custom titles and content.
|
||||
- **Query databases**: Search and filter database entries using advanced filter and sort criteria.
|
||||
- **Search workspace**: Search across your entire Notion workspace for pages or databases matching specific queries.
|
||||
- **Create new databases**: Programmatically create new databases with custom properties and structure.
|
||||
|
||||
This integration bridges the gap between your AI workflows and your knowledge base, enabling seamless documentation and information management. By connecting Sim Studio with Notion, you can automate documentation processes, maintain up-to-date information repositories, generate reports, and organize information intelligently—all through your intelligent agents.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
@@ -62,6 +72,30 @@ Read content from a Notion page
|
||||
| `createdTime` | string |
|
||||
| `url` | string |
|
||||
|
||||
### `notion_read_database`
|
||||
|
||||
Read database information and structure from Notion
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `databaseId` | string | Yes | The ID of the Notion database to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `metadata` | string |
|
||||
| `url` | string |
|
||||
| `id` | string |
|
||||
| `createdTime` | string |
|
||||
| `lastEditedTime` | string |
|
||||
| `properties` | string |
|
||||
| `content` | string |
|
||||
| `title` | string |
|
||||
|
||||
### `notion_write`
|
||||
|
||||
Append content to a Notion page
|
||||
@@ -89,10 +123,8 @@ Create a new page in Notion
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `parentType` | string | Yes | Type of parent: |
|
||||
| `parentId` | string | Yes | ID of the parent page or database |
|
||||
| `title` | string | No | Title of the page \(required for parent pages, not for databases\) |
|
||||
| `properties` | json | No | JSON object of properties for database pages |
|
||||
| `parentId` | string | Yes | ID of the parent page |
|
||||
| `title` | string | No | Title of the new page |
|
||||
| `content` | string | No | Optional content to add to the page upon creation |
|
||||
|
||||
#### Output
|
||||
@@ -101,6 +133,77 @@ Create a new page in Notion
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
|
||||
### `notion_query_database`
|
||||
|
||||
Query and filter Notion database entries with advanced filtering
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `databaseId` | string | Yes | The ID of the database to query |
|
||||
| `filter` | string | No | Filter conditions as JSON \(optional\) |
|
||||
| `sorts` | string | No | Sort criteria as JSON array \(optional\) |
|
||||
| `pageSize` | number | No | Number of results to return \(default: 100, max: 100\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
| `metadata` | string |
|
||||
| `hasMore` | string |
|
||||
| `nextCursor` | string |
|
||||
| `results` | string |
|
||||
|
||||
### `notion_search`
|
||||
|
||||
Search across all pages and databases in Notion workspace
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `query` | string | No | Search terms \(leave empty to get all pages\) |
|
||||
| `filterType` | string | No | Filter by object type: page, database, or leave empty for all |
|
||||
| `pageSize` | number | No | Number of results to return \(default: 100, max: 100\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
| `metadata` | string |
|
||||
| `hasMore` | string |
|
||||
| `nextCursor` | string |
|
||||
| `results` | string |
|
||||
|
||||
### `notion_create_database`
|
||||
|
||||
Create a new database in Notion with custom properties
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `parentId` | string | Yes | ID of the parent page where the database will be created |
|
||||
| `title` | string | Yes | Title for the new database |
|
||||
| `properties` | string | No | Database properties as JSON object \(optional, will create a default |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `metadata` | string |
|
||||
| `url` | string |
|
||||
| `createdTime` | string |
|
||||
| `properties` | string |
|
||||
| `content` | string |
|
||||
| `title` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
@@ -43,7 +43,7 @@ In Sim Studio, the OpenAI integration enables your agents to leverage these powe
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Convert text into numerical vector representations using OpenAI
|
||||
Convert text into numerical vector representations using OpenAI's embedding models. Transform text data into embeddings for semantic search, clustering, and other vector-based operations.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ In Sim Studio, the Pinecone integration enables your agents to leverage vector s
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Store, search, and retrieve vector embeddings using Pinecone
|
||||
Store, search, and retrieve vector embeddings using Pinecone's specialized vector database. Generate embeddings from text and perform semantic similarity searches with customizable filtering options.
|
||||
|
||||
|
||||
|
||||
|
||||
203
apps/docs/content/docs/tools/qdrant.mdx
Normal file
@@ -0,0 +1,203 @@
|
||||
---
|
||||
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>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Qdrant](https://qdrant.tech) is an open-source vector database designed for efficient storage, management, and retrieval of high-dimensional vector embeddings. Qdrant enables fast and scalable semantic search, making it ideal for AI applications that require similarity search, recommendation systems, and contextual information retrieval.
|
||||
|
||||
With Qdrant, you can:
|
||||
|
||||
- **Store vector embeddings**: Efficiently manage and persist high-dimensional vectors at scale
|
||||
- **Perform semantic similarity search**: Find the most similar vectors to a query vector in real time
|
||||
- **Filter and organize data**: Use advanced filtering to narrow down search results based on metadata or payload
|
||||
- **Fetch specific points**: Retrieve vectors and their associated payloads by ID
|
||||
- **Scale seamlessly**: Handle large collections and high-throughput workloads
|
||||
|
||||
In Sim Studio, the Qdrant integration enables your agents to interact with Qdrant programmatically as part of their workflows. Supported operations include:
|
||||
|
||||
- **Upsert**: Insert or update points (vectors and payloads) in a Qdrant collection
|
||||
- **Search**: Perform similarity search to find vectors most similar to a given query vector, with optional filtering and result customization
|
||||
- **Fetch**: Retrieve specific points from a collection by their IDs, with options to include payloads and vectors
|
||||
|
||||
This integration allows your agents to leverage powerful vector search and management capabilities, enabling advanced automation scenarios such as semantic search, recommendation, and contextual retrieval. By connecting Sim Studio with Qdrant, you can build agents that understand context, retrieve relevant information from large datasets, and deliver more intelligent and personalized responses—all without managing complex infrastructure.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## 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`
|
||||
@@ -26,19 +26,14 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Reddit](https://www.reddit.com/) is a vast social news aggregation, content rating, and discussion platform where registered users submit content such as text posts, images, and links, which are then voted up or down by other members. Known as "the front page of the internet," Reddit is organized into thousands of communities called subreddits, each focused on a specific topic.
|
||||
[Reddit](https://www.reddit.com/) is a social platform where users share and discuss content in topic-based communities called subreddits.
|
||||
|
||||
With Reddit, you can:
|
||||
In Sim Studio, you can use the Reddit integration to:
|
||||
|
||||
- **Access diverse content**: Browse thousands of specialized communities covering virtually every topic
|
||||
- **Stay informed**: Get real-time updates on trending news, discussions, and viral content
|
||||
- **Engage with communities**: Participate in discussions with like-minded individuals
|
||||
- **Discover trending topics**: See what's popular across different interest groups
|
||||
- **Gather insights**: Collect opinions, feedback, and perspectives from diverse user groups
|
||||
- **Monitor public sentiment**: Track reactions and discussions around specific topics or brands
|
||||
- **Research niche topics**: Access specialized knowledge in dedicated communities
|
||||
- **Get Posts**: Retrieve posts from any subreddit, with options to sort (Hot, New, Top, Rising) and filter Top posts by time (Day, Week, Month, Year, All Time).
|
||||
- **Get Comments**: Fetch comments from a specific post, with options to sort and set the number of comments.
|
||||
|
||||
In Sim Studio, the Reddit integration enables your agents to programmatically access and analyze content from Reddit's vast ecosystem. This allows for powerful automation scenarios such as trend monitoring, content aggregation, and sentiment analysis. Your agents can retrieve popular posts from specific subreddits, extract valuable information, and incorporate these insights into their workflows. This integration bridges the gap between social media monitoring and your AI workflows, enabling more informed decision-making based on public discussions and trending topics. By connecting Sim Studio with Reddit, you can create agents that stay on top of relevant conversations, identify emerging trends, gather diverse perspectives, and deliver timely insights - all without requiring manual browsing of countless Reddit threads.
|
||||
These operations let your agents access and analyze Reddit content as part of your automated workflows.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
|
||||
57
apps/docs/content/docs/tools/schedule.mdx
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: Schedule
|
||||
description: Trigger workflow execution on a schedule
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="schedule"
|
||||
color="#7B68EE"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
|
||||
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke='currentColor'
|
||||
strokeWidth='2'
|
||||
strokeLinecap='round'
|
||||
strokeLinejoin='round'
|
||||
>
|
||||
<path d='M8 2v4' />
|
||||
<path d='M16 2v4' />
|
||||
<rect x='3' y='4' rx='2' />
|
||||
<path d='M3 10h18' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Configure automated workflow execution with flexible timing options. Set up recurring workflows that run at specific intervals or times.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `scheduleConfig` | schedule-config | Yes | Schedule Status |
|
||||
| `scheduleType` | dropdown | Yes | Frequency |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
This block does not produce any outputs.
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `triggers`
|
||||
- Type: `schedule`
|
||||
@@ -78,7 +78,7 @@ In Sim Studio, the Serper integration enables your agents to leverage the power
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Access real-time web search results with Serper
|
||||
Access real-time web search results with Serper's Google Search API integration. Retrieve structured search data including web pages, news, images, and places with customizable language and region settings.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -49,14 +49,22 @@ With Slack, you can:
|
||||
- **Automate agent notifications**: Send real-time updates from your Sim Studio agents to any Slack channel
|
||||
- **Create webhook endpoints**: Configure Slack bots as webhooks to trigger Sim Studio workflows from Slack activities
|
||||
- **Enhance agent workflows**: Integrate Slack messaging into your agents to deliver results, alerts, and status updates
|
||||
- **Create and share Slack canvases**: Programmatically generate collaborative documents (canvases) in Slack channels
|
||||
- **Read messages from channels**: Retrieve and process recent messages from any Slack channel for monitoring or workflow triggers
|
||||
|
||||
In Sim Studio, the Slack integration enables your agents to programmatically send messages to any Slack channel or user as part of their workflows. This allows for powerful automation scenarios such as sending notifications, alerts, updates, and reports directly to your team's communication hub. Your agents can deliver timely information, share results from processes they've completed, or alert team members when attention is needed. This integration bridges the gap between your AI workflows and your team's communication, ensuring everyone stays informed without manual intervention. By connecting Sim Studio with Slack, you can create agents that keep your team updated with relevant information at the right time, enhance collaboration by sharing insights automatically, and reduce the need for manual status updates - all while leveraging your existing Slack workspace where your team already communicates.
|
||||
In Sim Studio, the Slack integration enables your agents to programmatically interact with Slack in several ways as part of their workflows:
|
||||
|
||||
- **Send messages**: Agents can send formatted messages to any Slack channel or user, supporting Slack's mrkdwn syntax for rich formatting.
|
||||
- **Create canvases**: Agents can create and share Slack canvases (collaborative documents) directly in channels, enabling richer content sharing and documentation.
|
||||
- **Read messages**: Agents can read recent messages from channels, allowing for monitoring, reporting, or triggering further actions based on channel activity.
|
||||
|
||||
This allows for powerful automation scenarios such as sending notifications, alerts, updates, and reports directly to your team's communication hub, sharing structured documents, or monitoring conversations for workflow triggers. Your agents can deliver timely information, share results from processes they've completed, create collaborative documents, or alert team members when attention is needed. This integration bridges the gap between your AI workflows and your team's communication, ensuring everyone stays informed without manual intervention. By connecting Sim Studio with Slack, you can create agents that keep your team updated with relevant information at the right time, enhance collaboration by sharing insights automatically, and reduce the need for manual status updates—all while leveraging your existing Slack workspace where your team already communicates.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Comprehensive Slack integration with OAuth authentication. Send formatted messages using Slack
|
||||
Comprehensive Slack integration with OAuth authentication. Send formatted messages using Slack's mrkdwn syntax.
|
||||
|
||||
|
||||
|
||||
@@ -83,6 +91,52 @@ Send messages to Slack channels or users through the Slack API. Supports Slack m
|
||||
| `ts` | string |
|
||||
| `channel` | string |
|
||||
|
||||
### `slack_canvas`
|
||||
|
||||
Create and share Slack canvases in channels. Canvases are collaborative documents within Slack.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `authMethod` | string | No | Authentication method: oauth or bot_token |
|
||||
| `botToken` | string | No | Bot token for Custom Bot |
|
||||
| `accessToken` | string | No | OAuth access token or bot token for Slack API |
|
||||
| `channel` | string | Yes | Target Slack channel \(e.g., #general\) |
|
||||
| `title` | string | Yes | Title of the canvas |
|
||||
| `content` | string | Yes | Canvas content in markdown format |
|
||||
| `document_content` | object | No | Structured canvas document content |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `canvas_id` | string |
|
||||
| `channel` | string |
|
||||
| `title` | string |
|
||||
|
||||
### `slack_message_reader`
|
||||
|
||||
Read the latest messages from Slack channels. Retrieve conversation history with filtering options.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `authMethod` | string | No | Authentication method: oauth or bot_token |
|
||||
| `botToken` | string | No | Bot token for Custom Bot |
|
||||
| `accessToken` | string | No | OAuth access token or bot token for Slack API |
|
||||
| `channel` | string | Yes | Slack channel to read messages from \(e.g., #general\) |
|
||||
| `limit` | number | No | Number of messages to retrieve \(default: 10, max: 100\) |
|
||||
| `oldest` | string | No | Start of time range \(timestamp\) |
|
||||
| `latest` | string | No | End of time range \(timestamp\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `messages` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
@@ -101,6 +155,9 @@ Send messages to Slack channels or users through the Slack API. Supports Slack m
|
||||
| ------ | ---- | ----------- |
|
||||
| `ts` | string | ts output from the block |
|
||||
| `channel` | string | channel output from the block |
|
||||
| `canvas_id` | string | canvas_id output from the block |
|
||||
| `title` | string | title output from the block |
|
||||
| `messages` | json | messages output from the block |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
@@ -51,19 +51,26 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Supabase](https://www.supabase.com/) is an open-source Firebase alternative that provides a suite of tools for building modern applications. It offers a PostgreSQL database, authentication, instant APIs, real-time subscriptions, storage, and edge functions, all within a unified platform.
|
||||
[Supabase](https://www.supabase.com/) is a powerful open-source backend-as-a-service platform that provides developers with a suite of tools to build, scale, and manage modern applications. Supabase offers a fully managed [PostgreSQL](https://www.postgresql.org/) database, robust authentication, instant RESTful and GraphQL APIs, real-time subscriptions, file storage, and edge functions—all accessible through a unified and developer-friendly interface. Its open-source nature and compatibility with popular frameworks make it a compelling alternative to Firebase, with the added benefit of SQL flexibility and transparency.
|
||||
|
||||
With Supabase, you can:
|
||||
**Why Supabase?**
|
||||
- **Instant APIs:** Every table and view in your database is instantly available via REST and GraphQL endpoints, making it easy to build data-driven applications without writing custom backend code.
|
||||
- **Real-time Data:** Supabase enables real-time subscriptions, allowing your apps to react instantly to changes in your database.
|
||||
- **Authentication & Authorization:** Built-in user management with support for email, OAuth, SSO, and more, plus row-level security for granular access control.
|
||||
- **Storage:** Securely upload, serve, and manage files with built-in storage that integrates seamlessly with your database.
|
||||
- **Edge Functions:** Deploy serverless functions close to your users for low-latency custom logic.
|
||||
|
||||
- **Manage relational data**: Work with a powerful PostgreSQL database with full SQL capabilities
|
||||
- **Implement authentication**: Add secure user authentication with multiple providers
|
||||
- **Create instant APIs**: Generate RESTful APIs automatically based on your database schema
|
||||
- **Enable real-time updates**: Subscribe to database changes and build reactive applications
|
||||
- **Store files**: Upload, transform, and serve files with storage buckets
|
||||
- **Deploy serverless functions**: Run code in response to database changes or HTTP requests
|
||||
- **Secure your application**: Implement row-level security and manage permissions
|
||||
**Using Supabase in Sim Studio**
|
||||
|
||||
In Sim Studio, the Supabase integration enables your agents to interact with your Supabase projects programmatically. This allows for powerful automation scenarios such as data querying, record creation, user management, and file operations. Your agents can retrieve information from your database, insert new records, update existing data, and leverage Supabase's authentication and storage capabilities as part of their workflows. This integration bridges the gap between your AI workflows and your application's data layer, enabling more sophisticated and data-driven automations. By connecting Sim Studio with Supabase, you can create agents that maintain data consistency across systems, trigger actions based on database changes, perform complex data operations, and build workflows that leverage your application's existing data infrastructure - all without requiring manual intervention or custom code.
|
||||
Sim Studio’s Supabase integration makes it effortless to connect your agentic workflows to your Supabase projects. With just a few configuration fields—your Project ID, Table name, and Service Role Secret—you can securely interact with your database directly from your Sim Studio blocks. The integration abstracts away the complexity of API calls, letting you focus on building logic and automations.
|
||||
|
||||
**Key benefits of using Supabase in Sim Studio:**
|
||||
- **No-code/low-code database operations:** Query, insert, update, and delete rows in your Supabase tables without writing SQL or backend code.
|
||||
- **Flexible querying:** Use [PostgREST filter syntax](https://postgrest.org/en/stable/api.html#operators) to perform advanced queries, including filtering, ordering, and limiting results.
|
||||
- **Seamless integration:** Easily connect Supabase to other tools and services in your workflow, enabling powerful automations such as syncing data, triggering notifications, or enriching records.
|
||||
- **Secure and scalable:** All operations use your Supabase Service Role Secret, ensuring secure access to your data with the scalability of a managed cloud platform.
|
||||
|
||||
Whether you’re building internal tools, automating business processes, or powering production applications, Supabase in Sim Studio provides a fast, reliable, and developer-friendly way to manage your data and backend logic—no infrastructure management required. Simply configure your block, select the operation you need, and let Sim Studio handle the rest.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
@@ -85,8 +92,10 @@ Query data from a Supabase table
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to query |
|
||||
| `filter` | object | No | Filter to apply to the query |
|
||||
| `apiKey` | string | Yes | Your Supabase client anon key |
|
||||
| `filter` | string | No | PostgREST filter \(e.g., |
|
||||
| `orderBy` | string | No | Column to order by \(add DESC for descending\) |
|
||||
| `limit` | number | No | Maximum number of rows to return |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
@@ -106,7 +115,7 @@ Insert data into a Supabase table
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to insert data into |
|
||||
| `data` | any | Yes | The data to insert |
|
||||
| `apiKey` | string | Yes | Your Supabase client anon key |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
@@ -115,6 +124,65 @@ Insert data into a Supabase table
|
||||
| `message` | string |
|
||||
| `results` | string |
|
||||
|
||||
### `supabase_get_row`
|
||||
|
||||
Get a single row from a Supabase table based on filter criteria
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to query |
|
||||
| `filter` | string | Yes | PostgREST filter to find the specific row \(e.g., |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
| `results` | string |
|
||||
|
||||
### `supabase_update`
|
||||
|
||||
Update rows in a Supabase table based on filter criteria
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to update |
|
||||
| `filter` | string | Yes | PostgREST filter to identify rows to update \(e.g., |
|
||||
| `data` | object | Yes | Data to update in the matching rows |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
|
||||
### `supabase_delete`
|
||||
|
||||
Delete rows from a Supabase table based on filter criteria
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to delete from |
|
||||
| `filter` | string | Yes | PostgREST filter to identify rows to delete \(e.g., |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
@@ -58,7 +58,7 @@ In Sim Studio, the Tavily integration enables your agents to search the web and
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Access Tavily
|
||||
Access Tavily's AI-powered search engine to find relevant information from across the web. Extract and process content from specific URLs with customizable depth options.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,30 +11,17 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='-5 0 41 33'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
viewBox='0 0 24 24'
|
||||
|
||||
|
||||
fill='none'
|
||||
>
|
||||
<circle cx='16' cy='16' r='14' fill='url(#paint0_linear_87_7225)' />
|
||||
<circle cx='12' cy='12' r='10' fill='#0088CC' />
|
||||
<path
|
||||
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'
|
||||
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'
|
||||
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>`}
|
||||
/>
|
||||
|
||||
|
||||
@@ -11,15 +11,22 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
version='1.1'
|
||||
id='Layer_1'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
xmlnsXlink='http://www.w3.org/1999/xlink'
|
||||
x='0px'
|
||||
y='0px'
|
||||
viewBox='0 0 122.3 80.3'
|
||||
xmlSpace='preserve'
|
||||
>
|
||||
<g transform='translate(1, 4)'>
|
||||
<rect x='0' y='0' rx='2.5' fill='currentColor' />
|
||||
<rect x='8' y='0' rx='4' fill='currentColor' />
|
||||
<g>
|
||||
<path
|
||||
fill='currentColor'
|
||||
d='M94.3,0H65.4c-26,0-28,11.2-28,26.2l0,27.9c0,15.6,2,26.2,28.1,26.2h28.8c26,0,28-11.2,28-26.1V26.2
|
||||
C122.3,11.2,120.3,0,94.3,0z M0,20.1C0,6.9,5.2,0,14,0c8.8,0,14,6.9,14,20.1v40.1c0,13.2-5.2,20.1-14,20.1c-8.8,0-14-6.9-14-20.1
|
||||
V20.1z'
|
||||
/>
|
||||
</g>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
46
apps/docs/content/docs/tools/webhook.mdx
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Webhook
|
||||
description: Trigger workflow execution from external webhooks
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="webhook"
|
||||
color="#10B981"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
fill='currentColor'
|
||||
|
||||
|
||||
viewBox='0 0 24 24'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path d='M17.974 7A4.967 4.967 0 0 0 18 6.5a5.5 5.5 0 1 0-8.672 4.491L7.18 15.114A2.428 2.428 0 0 0 6.496 15 2.5 2.5 0 1 0 9 17.496a2.36 2.36 0 0 0-.93-1.925l2.576-4.943-.41-.241A4.5 4.5 0 1 1 17 6.5a4.8 4.8 0 0 1-.022.452zM6.503 18.999a1.5 1.5 0 1 1 1.496-1.503A1.518 1.518 0 0 1 6.503 19zM18.5 12a5.735 5.735 0 0 0-1.453.157l-2.744-3.941A2.414 2.414 0 0 0 15 6.5a2.544 2.544 0 1 0-1.518 2.284l3.17 4.557.36-.13A4.267 4.267 0 0 1 18.5 13a4.5 4.5 0 1 1-.008 9h-.006a4.684 4.684 0 0 1-3.12-1.355l-.703.71A5.653 5.653 0 0 0 18.49 23h.011a5.5 5.5 0 0 0 0-11zM11 6.5A1.5 1.5 0 1 1 12.5 8 1.509 1.509 0 0 1 11 6.5zM18.5 20a2.5 2.5 0 1 0-2.447-3h-5.05l-.003.497A4.546 4.546 0 0 1 6.5 22 4.526 4.526 0 0 1 2 17.5a4.596 4.596 0 0 1 3.148-4.37l-.296-.954A5.606 5.606 0 0 0 1 17.5 5.532 5.532 0 0 0 6.5 23a5.573 5.573 0 0 0 5.478-5h4.08a2.487 2.487 0 0 0 2.442 2zm0-4a1.5 1.5 0 1 1-1.5 1.5 1.509 1.509 0 0 1 1.5-1.5z' />
|
||||
<path fill='none' d='M0 0h24v24H0z' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookProvider` | dropdown | Yes | Webhook Provider |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
This block does not produce any outputs.
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `triggers`
|
||||
- Type: `webhook`
|
||||
179
apps/docs/content/docs/tools/wikipedia.mdx
Normal file
@@ -0,0 +1,179 @@
|
||||
---
|
||||
title: Wikipedia
|
||||
description: Search and retrieve content from Wikipedia
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="wikipedia"
|
||||
color="#000000"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
fill='currentColor'
|
||||
version='1.1'
|
||||
id='Capa_1'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
xmlnsXlink='http://www.w3.org/1999/xlink'
|
||||
|
||||
|
||||
viewBox='0 0 98.05 98.05'
|
||||
xmlSpace='preserve'
|
||||
>
|
||||
<g>
|
||||
<path
|
||||
d='M98.023,17.465l-19.584-0.056c-0.004,0.711-0.006,1.563-0.017,2.121c1.664,0.039,5.922,0.822,7.257,4.327L66.92,67.155
|
||||
c-0.919-2.149-9.643-21.528-10.639-24.02l9.072-18.818c1.873-2.863,5.455-4.709,8.918-4.843l-0.01-1.968L55.42,17.489
|
||||
c-0.045,0.499,0.001,1.548-0.068,2.069c5.315,0.144,7.215,1.334,5.941,4.508c-2.102,4.776-6.51,13.824-7.372,15.475
|
||||
c-2.696-5.635-4.41-9.972-7.345-16.064c-1.266-2.823,1.529-3.922,4.485-4.004v-1.981l-21.82-0.067
|
||||
c0.016,0.93-0.021,1.451-0.021,2.131c3.041,0.046,6.988,0.371,8.562,3.019c2.087,4.063,9.044,20.194,11.149,24.514
|
||||
c-2.685,5.153-9.207,17.341-11.544,21.913c-3.348-7.43-15.732-36.689-19.232-44.241c-1.304-3.218,3.732-5.077,6.646-5.213
|
||||
l0.019-2.148L0,17.398c0.005,0.646,0.027,1.71,0.029,2.187c4.025-0.037,9.908,6.573,11.588,10.683
|
||||
c7.244,16.811,14.719,33.524,21.928,50.349c0.002,0.029,2.256,0.059,2.281,0.008c4.717-9.653,10.229-19.797,15.206-29.56
|
||||
L63.588,80.64c0.005,0.004,2.082,0.016,2.093,0.007c7.962-18.196,19.892-46.118,23.794-54.933c1.588-3.767,4.245-6.064,8.543-6.194
|
||||
l0.032-1.956L98.023,17.465z'
|
||||
/>
|
||||
</g>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Wikipedia](https://www.wikipedia.org/) is the world's largest free online encyclopedia, offering millions of articles on a vast range of topics, collaboratively written and maintained by volunteers.
|
||||
|
||||
With Wikipedia, you can:
|
||||
|
||||
- **Search for articles**: Find relevant Wikipedia pages by searching for keywords or topics
|
||||
- **Get article summaries**: Retrieve concise summaries of Wikipedia pages for quick reference
|
||||
- **Access full content**: Obtain the complete content of Wikipedia articles for in-depth information
|
||||
- **Discover random articles**: Explore new topics by retrieving random Wikipedia pages
|
||||
|
||||
In Sim Studio, the Wikipedia integration enables your agents to programmatically access and interact with Wikipedia content as part of their workflows. Agents can search for articles, fetch summaries, retrieve full page content, and discover random articles, empowering your automations with up-to-date, reliable information from the world's largest encyclopedia. This integration is ideal for scenarios such as research, content enrichment, fact-checking, and knowledge discovery, allowing your agents to seamlessly incorporate Wikipedia data into their decision-making and task execution processes.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Access Wikipedia articles, search for pages, get summaries, retrieve full content, and discover random articles from the world's largest encyclopedia.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `wikipedia_summary`
|
||||
|
||||
Get a summary and metadata for a specific Wikipedia page.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `pageTitle` | string | Yes | Title of the Wikipedia page to get summary for |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `summary` | string |
|
||||
| `title` | string |
|
||||
| `displaytitle` | string |
|
||||
| `description` | string |
|
||||
| `extract` | string |
|
||||
| `extract_html` | string |
|
||||
| `thumbnail` | string |
|
||||
| `originalimage` | string |
|
||||
| `content_urls` | string |
|
||||
| `revisions` | string |
|
||||
| `edit` | string |
|
||||
| `talk` | string |
|
||||
|
||||
### `wikipedia_search`
|
||||
|
||||
Search for Wikipedia pages by title or content.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `query` | string | Yes | Search query to find Wikipedia pages |
|
||||
| `searchLimit` | number | No | Maximum number of results to return \(default: 10, max: 50\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `totalHits` | string |
|
||||
| `query` | string |
|
||||
| `searchResults` | string |
|
||||
|
||||
### `wikipedia_content`
|
||||
|
||||
Get the full HTML content of a Wikipedia page.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `pageTitle` | string | Yes | Title of the Wikipedia page to get content for |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `content` | string |
|
||||
| `pageid` | string |
|
||||
| `html` | string |
|
||||
| `revision` | string |
|
||||
| `tid` | string |
|
||||
| `timestamp` | string |
|
||||
| `content_model` | string |
|
||||
| `content_format` | string |
|
||||
|
||||
### `wikipedia_random`
|
||||
|
||||
Get a random Wikipedia page.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `randomPage` | string |
|
||||
| `title` | string |
|
||||
| `displaytitle` | string |
|
||||
| `description` | string |
|
||||
| `extract` | string |
|
||||
| `thumbnail` | string |
|
||||
| `content_urls` | string |
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `operation` | string | Yes | Operation |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `summary` | json | summary output from the block |
|
||||
| `searchResults` | json | searchResults output from the block |
|
||||
| `totalHits` | number | totalHits output from the block |
|
||||
| `content` | json | content output from the block |
|
||||
| `randomPage` | json | randomPage output from the block |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `wikipedia`
|
||||
4
apps/docs/content/docs/triggers/meta.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Triggers",
|
||||
"pages": ["starter", "schedule", "webhook"]
|
||||
}
|
||||
69
apps/docs/content/docs/triggers/schedule.mdx
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
title: Schedule
|
||||
description: Automatically trigger workflows on a recurring schedule
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Schedule block automatically triggers workflow execution at specified intervals or times.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/schedule-light.png"
|
||||
darkSrc="/static/dark/schedule-dark.png"
|
||||
alt="Schedule Block"
|
||||
width={350}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
## Schedule Options
|
||||
|
||||
Configure when your workflow runs using the dropdown options:
|
||||
|
||||
<Tabs items={['Simple Intervals', 'Cron Expressions']}>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-1 pl-6">
|
||||
<li><strong>Every few minutes</strong>: 5, 15, 30 minute intervals</li>
|
||||
<li><strong>Hourly</strong>: Every hour or every few hours</li>
|
||||
<li><strong>Daily</strong>: Once or multiple times per day</li>
|
||||
<li><strong>Weekly</strong>: Specific days of the week</li>
|
||||
<li><strong>Monthly</strong>: Specific days of the month</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<p>Use cron expressions for advanced scheduling:</p>
|
||||
<div className="text-sm space-y-1">
|
||||
<div><code>0 9 * * 1-5</code> - Every weekday at 9 AM</div>
|
||||
<div><code>*/15 * * * *</code> - Every 15 minutes</div>
|
||||
<div><code>0 0 1 * *</code> - First day of each month</div>
|
||||
</div>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Configuring Schedules
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/configure-schedule.mp4"></video>
|
||||
</div>
|
||||
|
||||
When a workflow is scheduled:
|
||||
- The schedule becomes **active** and shows the next execution time
|
||||
- Click the **"Scheduled"** button to deactivate the schedule
|
||||
- Schedules automatically deactivate after **3 consecutive failures**
|
||||
|
||||
## Disabled Schedules
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/schedule-disabled-light.png"
|
||||
darkSrc="/static/dark/schedule-disabled-dark.png"
|
||||
alt="Disabled Schedule"
|
||||
width={500}
|
||||
height={200}
|
||||
/>
|
||||
|
||||
Disabled schedules show when they were last active and can be re-enabled at any time.
|
||||
|
||||
<Callout>
|
||||
Schedule blocks cannot receive incoming connections and serve as pure workflow triggers.
|
||||
</Callout>
|
||||
92
apps/docs/content/docs/triggers/starter.mdx
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
title: Starter
|
||||
description: Manually initiate workflow execution with input parameters
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
|
||||
The Starter block allows manual workflow execution with two input modes: structured parameters or conversational chat.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/starter-light.png"
|
||||
darkSrc="/static/dark/starter-dark.png"
|
||||
alt="Starter Block with Manual and Chat Mode Options"
|
||||
width={350}
|
||||
height={175}
|
||||
/>
|
||||
|
||||
## Execution Modes
|
||||
|
||||
Choose your input method from the dropdown:
|
||||
|
||||
<Tabs items={['Manual Mode', 'Chat Mode']}>
|
||||
<Tab>
|
||||
<div className="space-y-4">
|
||||
<ul className="list-disc space-y-1 pl-6">
|
||||
<li><strong>Structured inputs</strong>: Define specific parameters (text, number, boolean, JSON, file, date)</li>
|
||||
<li><strong>Form interface</strong>: Users fill out a form with predefined fields</li>
|
||||
<li><strong>API friendly</strong>: Perfect for programmatic execution</li>
|
||||
</ul>
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/input-format.mp4"></video>
|
||||
</div>
|
||||
|
||||
<p className="text-sm text-gray-600">Configure input parameters that will be available when deploying as an API endpoint.</p>
|
||||
</div>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<div className="space-y-4">
|
||||
<ul className="list-disc space-y-1 pl-6">
|
||||
<li><strong>Natural language</strong>: Users type questions or requests</li>
|
||||
<li><strong>start.input variable</strong>: Captures all user input as `<start.input>`</li>
|
||||
<li><strong>start.conversationId</strong>: Access conversation ID as `<start.conversationId>`</li>
|
||||
<li><strong>Conversational</strong>: Ideal for AI-powered workflows</li>
|
||||
</ul>
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/chat-input.mp4"></video>
|
||||
</div>
|
||||
|
||||
<p className="text-sm text-gray-600">Chat with your workflow and access both input text and conversation ID for context-aware responses.</p>
|
||||
</div>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Using Chat Variables
|
||||
|
||||
In Chat mode, access user input and conversation context through special variables:
|
||||
|
||||
```yaml
|
||||
# Reference the chat input and conversation ID in your workflow
|
||||
user_message: "<start.input>"
|
||||
conversation_id: "<start.conversationId>"
|
||||
```
|
||||
|
||||
- **`<start.input>`** - Contains the user's message text
|
||||
- **`<start.conversationId>`** - Unique identifier for the conversation thread
|
||||
|
||||
## API Execution
|
||||
|
||||
<Tabs items={['Manual Mode', 'Chat Mode']}>
|
||||
<Tab>
|
||||
```bash
|
||||
curl -X POST "https://api.sim.dev/v1/workflows/{id}/start" \
|
||||
-H "Authorization: Bearer {api-key}" \
|
||||
-d '{"parameters": {"userId": "123", "action": "process"}}'
|
||||
```
|
||||
</Tab>
|
||||
<Tab>
|
||||
```bash
|
||||
curl -X POST "https://api.sim.dev/v1/workflows/{id}/start" \
|
||||
-H "Authorization: Bearer {api-key}" \
|
||||
-d '{"input": "Analyze Q4 sales data"}'
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<Callout>
|
||||
Starter blocks are ideal for testing workflows and user-initiated tasks. For automated execution, use Schedule or Webhook triggers.
|
||||
</Callout>
|
||||
54
apps/docs/content/docs/triggers/webhook.mdx
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
title: Webhooks
|
||||
description: Trigger workflow execution from external webhooks
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
The Webhook block allows external services to automatically trigger your workflow execution through HTTP webhooks.
|
||||
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="webhooks.mp4" />
|
||||
</div>
|
||||
|
||||
## Supported Providers
|
||||
|
||||
Choose from the dropdown to configure your webhook source:
|
||||
|
||||
<Tabs items={['Popular Services', 'Generic']}>
|
||||
<Tab>
|
||||
<ul className="grid grid-cols-2 gap-1 text-sm">
|
||||
<li>**Slack** - Bot events and messages</li>
|
||||
<li>**Gmail** - Email notifications</li>
|
||||
<li>**GitHub** - Repository events</li>
|
||||
<li>**Discord** - Server events</li>
|
||||
<li>**Airtable** - Database changes</li>
|
||||
<li>**Telegram** - Bot messages</li>
|
||||
<li>**WhatsApp** - Messaging events</li>
|
||||
<li>**Stripe** - Payment events</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<p>For custom integrations:</p>
|
||||
<ul className="list-disc space-y-1 pl-6 text-sm">
|
||||
<li><strong>HTTP POST</strong>: Accepts requests from any client</li>
|
||||
<li><strong>Authentication</strong>: Bearer token or custom headers</li>
|
||||
<li><strong>Security</strong>: IP restrictions and rate limiting</li>
|
||||
<li><strong>Deduplication</strong>: Prevents duplicate requests</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **Configure Provider** - Select from dropdown and set up authentication
|
||||
2. **Get Webhook URL** - Automatically generated unique endpoint
|
||||
3. **External Service** - Sends HTTP POST to your webhook URL
|
||||
4. **Workflow Triggers** - Automatically starts when webhook is received
|
||||
|
||||
<Callout>
|
||||
Webhooks cannot receive incoming connections and serve as pure workflow triggers.
|
||||
</Callout>
|
||||
@@ -7,16 +7,13 @@ import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { ThemeImage } from '@/components/ui/theme-image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
Variables in Sim Studio act as a global store for data that can be accessed and modified by any block in your workflow. They provide a powerful way to share information between different parts of your workflow, maintain state, and create more dynamic applications.
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/variables-light.png"
|
||||
darkSrc="/static/dark/variables-dark.png"
|
||||
alt="Variables Panel"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="variables.mp4" />
|
||||
</div>
|
||||
|
||||
<Callout type="info">
|
||||
Variables allow you to store and share data across your entire workflow, making it easy to
|
||||
@@ -60,13 +57,9 @@ Variables can be accessed from any block in your workflow using the variable dro
|
||||
2. Browse the dropdown menu to select from available variables
|
||||
3. Select the variable you want to use
|
||||
|
||||
<ThemeImage
|
||||
lightSrc="/static/light/variabledropdown-light.png"
|
||||
darkSrc="/static/dark/variabledropdown-dark.png"
|
||||
alt="Variable Dropdown"
|
||||
width={300}
|
||||
height={175}
|
||||
/>
|
||||
<div className="mx-auto w-full overflow-hidden rounded-lg">
|
||||
<Video src="variables-dropdown.mp4" />
|
||||
</div>
|
||||
|
||||
<Callout>
|
||||
You can also drag the connection tag into a field to open the variable dropdown and access
|
||||
|
||||
238
apps/docs/content/docs/yaml/block-reference.mdx
Normal file
@@ -0,0 +1,238 @@
|
||||
---
|
||||
title: Block Reference Syntax
|
||||
description: How to reference data between blocks in YAML workflows
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
Block references are the foundation of data flow in Sim Studio workflows. Understanding how to correctly reference outputs from one block as inputs to another is essential for building functional workflows.
|
||||
|
||||
## Basic Reference Rules
|
||||
|
||||
### 1. Use Block Names, Not Block IDs
|
||||
|
||||
<Tabs items={['Correct', 'Incorrect']}>
|
||||
<Tab>
|
||||
```yaml
|
||||
# Block definition
|
||||
email-sender:
|
||||
type: agent
|
||||
name: "Email Generator"
|
||||
# ... configuration
|
||||
|
||||
# Reference the block
|
||||
next-block:
|
||||
inputs:
|
||||
userPrompt: "Process this: <emailgenerator.content>"
|
||||
```
|
||||
</Tab>
|
||||
<Tab>
|
||||
```yaml
|
||||
# Block definition
|
||||
email-sender:
|
||||
type: agent
|
||||
name: "Email Generator"
|
||||
# ... configuration
|
||||
|
||||
# ❌ Don't reference by block ID
|
||||
next-block:
|
||||
inputs:
|
||||
userPrompt: "Process this: <email-sender.content>"
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### 2. Convert Names to Reference Format
|
||||
|
||||
To create a block reference:
|
||||
|
||||
1. **Take the block name**: "Email Generator"
|
||||
2. **Convert to lowercase**: "email generator"
|
||||
3. **Remove spaces and special characters**: "emailgenerator"
|
||||
4. **Add property**: `<emailgenerator.content>`
|
||||
|
||||
### 3. Use Correct Properties
|
||||
|
||||
Different block types expose different properties:
|
||||
|
||||
- **Agent blocks**: `.content` (the AI response)
|
||||
- **Function blocks**: `.output` (the return value)
|
||||
- **API blocks**: `.output` (the response data)
|
||||
- **Tool blocks**: `.output` (the tool result)
|
||||
|
||||
## Reference Examples
|
||||
|
||||
### Common Block References
|
||||
|
||||
```yaml
|
||||
# Agent block outputs
|
||||
<agentname.content> # Primary AI response
|
||||
<agentname.tokens> # Token usage information
|
||||
<agentname.cost> # Estimated cost
|
||||
<agentname.tool_calls> # Tool execution details
|
||||
|
||||
# Function block outputs
|
||||
<functionname.output> # Function return value
|
||||
<functionname.error> # Error information (if any)
|
||||
|
||||
# API block outputs
|
||||
<apiname.output> # Response data
|
||||
<apiname.status> # HTTP status code
|
||||
<apiname.headers> # Response headers
|
||||
|
||||
# Tool block outputs
|
||||
<toolname.output> # Tool execution result
|
||||
```
|
||||
|
||||
### Multi-Word Block Names
|
||||
|
||||
```yaml
|
||||
# Block name: "Data Processor 2"
|
||||
<dataprocessor2.output>
|
||||
|
||||
# Block name: "Email Validation Service"
|
||||
<emailvalidationservice.output>
|
||||
|
||||
# Block name: "Customer Info Agent"
|
||||
<customerinfoagent.content>
|
||||
```
|
||||
|
||||
## Special Reference Cases
|
||||
|
||||
### Starter Block
|
||||
|
||||
<Callout type="warning">
|
||||
The starter block is always referenced as `<start.input>` regardless of its actual name.
|
||||
</Callout>
|
||||
|
||||
```yaml
|
||||
# Starter block definition
|
||||
my-custom-start:
|
||||
type: starter
|
||||
name: "Custom Workflow Start"
|
||||
# ... configuration
|
||||
|
||||
# Always reference as 'start'
|
||||
agent-1:
|
||||
inputs:
|
||||
userPrompt: <start.input> # ✅ Correct
|
||||
# userPrompt: <customworkflowstart.input> # ❌ Wrong
|
||||
```
|
||||
|
||||
### Loop Variables
|
||||
|
||||
Inside loop blocks, special variables are available:
|
||||
|
||||
```yaml
|
||||
# Available in loop child blocks
|
||||
<loop.index> # Current iteration (0-based)
|
||||
<loop.currentItem> # Current item being processed (forEach loops)
|
||||
<loop.items> # Full collection (forEach loops)
|
||||
```
|
||||
|
||||
### Parallel Variables
|
||||
|
||||
Inside parallel blocks, special variables are available:
|
||||
|
||||
```yaml
|
||||
# Available in parallel child blocks
|
||||
<parallel.index> # Instance number (0-based)
|
||||
<parallel.currentItem> # Item for this instance
|
||||
<parallel.items> # Full collection
|
||||
```
|
||||
|
||||
## Complex Reference Examples
|
||||
|
||||
### Nested Data Access
|
||||
|
||||
When referencing complex objects, use dot notation:
|
||||
|
||||
```yaml
|
||||
# If an agent returns structured data
|
||||
data-analyzer:
|
||||
type: agent
|
||||
name: "Data Analyzer"
|
||||
inputs:
|
||||
responseFormat: |
|
||||
{
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis": {"type": "object"},
|
||||
"summary": {"type": "string"},
|
||||
"metrics": {"type": "object"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Reference nested properties
|
||||
next-step:
|
||||
inputs:
|
||||
userPrompt: |
|
||||
Summary: <dataanalyzer.analysis.summary>
|
||||
Score: <dataanalyzer.metrics.score>
|
||||
Full data: <dataanalyzer.content>
|
||||
```
|
||||
|
||||
### Multiple References in Text
|
||||
|
||||
```yaml
|
||||
email-composer:
|
||||
type: agent
|
||||
inputs:
|
||||
userPrompt: |
|
||||
Create an email with the following information:
|
||||
|
||||
Customer: <customeragent.content>
|
||||
Order Details: <orderprocessor.output>
|
||||
Support Ticket: <ticketanalyzer.content>
|
||||
|
||||
Original request: <start.input>
|
||||
```
|
||||
|
||||
### References in Code Blocks
|
||||
|
||||
When using references in function blocks, they're replaced as JavaScript values:
|
||||
|
||||
```yaml
|
||||
data-processor:
|
||||
type: function
|
||||
inputs:
|
||||
code: |
|
||||
// References are replaced with actual values
|
||||
const customerData = <customeragent.content>;
|
||||
const orderInfo = <orderprocessor.output>;
|
||||
const originalInput = <start.input>;
|
||||
|
||||
// Process the data
|
||||
return {
|
||||
customer: customerData.name,
|
||||
orderId: orderInfo.id,
|
||||
processed: true
|
||||
};
|
||||
```
|
||||
|
||||
## Reference Validation
|
||||
|
||||
Sim Studio validates all references when importing YAML:
|
||||
|
||||
### Valid References
|
||||
- Block exists in the workflow
|
||||
- Property is appropriate for block type
|
||||
- No circular dependencies
|
||||
- Proper syntax formatting
|
||||
|
||||
### Common Errors
|
||||
- **Block not found**: Referenced block doesn't exist
|
||||
- **Wrong property**: Using `.content` on a function block
|
||||
- **Typos**: Misspelled block names or properties
|
||||
- **Circular references**: Block references itself directly or indirectly
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Use descriptive block names**: Makes references more readable
|
||||
2. **Be consistent**: Use the same naming convention throughout
|
||||
3. **Check references**: Ensure all referenced blocks exist
|
||||
4. **Avoid deep nesting**: Keep reference chains manageable
|
||||
5. **Document complex flows**: Add comments to explain reference relationships
|
||||
218
apps/docs/content/docs/yaml/blocks/agent.mdx
Normal file
@@ -0,0 +1,218 @@
|
||||
---
|
||||
title: Agent Block YAML Schema
|
||||
description: YAML configuration reference for Agent blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [agent]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this agent block
|
||||
inputs:
|
||||
type: object
|
||||
properties:
|
||||
systemPrompt:
|
||||
type: string
|
||||
description: Instructions that define the agent's role and behavior
|
||||
userPrompt:
|
||||
type: string
|
||||
description: Input content to process (can reference other blocks)
|
||||
model:
|
||||
type: string
|
||||
description: AI model identifier (e.g., gpt-4o, gemini-2.5-pro, deepseek-chat)
|
||||
temperature:
|
||||
type: number
|
||||
minimum: 0
|
||||
maximum: 2
|
||||
description: Response creativity level (varies by model)
|
||||
apiKey:
|
||||
type: string
|
||||
description: API key for the model provider (use {{ENV_VAR}} format)
|
||||
azureEndpoint:
|
||||
type: string
|
||||
description: Azure OpenAI endpoint URL (required for Azure models)
|
||||
azureApiVersion:
|
||||
type: string
|
||||
description: Azure API version (required for Azure models)
|
||||
memories:
|
||||
type: string
|
||||
description: Memory context from memory blocks
|
||||
tools:
|
||||
type: array
|
||||
description: List of external tools the agent can use
|
||||
items:
|
||||
type: object
|
||||
required: [type, title, toolId, operation, usageControl]
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: Tool type identifier
|
||||
title:
|
||||
type: string
|
||||
description: Human-readable display name
|
||||
toolId:
|
||||
type: string
|
||||
description: Internal tool identifier
|
||||
operation:
|
||||
type: string
|
||||
description: Tool operation/method name
|
||||
usageControl:
|
||||
type: string
|
||||
enum: [auto, required, none]
|
||||
description: When AI can use the tool
|
||||
params:
|
||||
type: object
|
||||
description: Tool-specific configuration parameters
|
||||
isExpanded:
|
||||
type: boolean
|
||||
description: UI state
|
||||
default: false
|
||||
responseFormat:
|
||||
type: object
|
||||
description: JSON Schema to enforce structured output
|
||||
required:
|
||||
- model
|
||||
- apiKey
|
||||
connections:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID for successful execution
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Tool Configuration
|
||||
|
||||
Tools are defined as an array where each tool has this structure:
|
||||
|
||||
```yaml
|
||||
tools:
|
||||
- type: <string> # Tool type identifier (exa, gmail, slack, etc.)
|
||||
title: <string> # Human-readable display name
|
||||
toolId: <string> # Internal tool identifier
|
||||
operation: <string> # Tool operation/method name
|
||||
usageControl: <string> # When AI can use it (auto | required | none)
|
||||
params: <object> # Tool-specific configuration parameters
|
||||
isExpanded: <boolean> # UI state (optional, default: false)
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Connections define where the workflow goes based on execution results:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Agent
|
||||
|
||||
```yaml
|
||||
content-agent:
|
||||
type: agent
|
||||
name: "Content Analyzer 1"
|
||||
inputs:
|
||||
systemPrompt: "You are a helpful content analyzer. Be concise and clear."
|
||||
userPrompt: <start.input>
|
||||
model: gpt-4o
|
||||
temperature: 0.3
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: summary-block
|
||||
|
||||
summary-block:
|
||||
type: agent
|
||||
name: "Summary Generator"
|
||||
inputs:
|
||||
systemPrompt: "Create a brief summary of the analysis."
|
||||
userPrompt: "Analyze this: <contentanalyzer1.content>"
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: final-step
|
||||
```
|
||||
|
||||
### Agent with Tools
|
||||
|
||||
```yaml
|
||||
research-agent:
|
||||
type: agent
|
||||
name: "Research Assistant"
|
||||
inputs:
|
||||
systemPrompt: "Research the topic and provide detailed information."
|
||||
userPrompt: <start.input>
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
tools:
|
||||
- type: exa
|
||||
title: "Web Search"
|
||||
toolId: exa_search
|
||||
operation: exa_search
|
||||
usageControl: auto
|
||||
params:
|
||||
apiKey: '{{EXA_API_KEY}}'
|
||||
connections:
|
||||
success: summary-block
|
||||
```
|
||||
|
||||
### Structured Output
|
||||
|
||||
```yaml
|
||||
data-extractor:
|
||||
type: agent
|
||||
name: "Extract Contact Info"
|
||||
inputs:
|
||||
systemPrompt: "Extract contact information from the text."
|
||||
userPrompt: <start.input>
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
responseFormat: |
|
||||
{
|
||||
"name": "contact_extraction",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {"type": "string"},
|
||||
"email": {"type": "string"},
|
||||
"phone": {"type": "string"}
|
||||
},
|
||||
"required": ["name"]
|
||||
},
|
||||
"strict": true
|
||||
}
|
||||
connections:
|
||||
success: save-contact
|
||||
```
|
||||
|
||||
### Azure OpenAI
|
||||
|
||||
```yaml
|
||||
azure-agent:
|
||||
type: agent
|
||||
name: "Azure AI Assistant"
|
||||
inputs:
|
||||
systemPrompt: "You are a helpful assistant."
|
||||
userPrompt: <start.input>
|
||||
model: gpt-4o
|
||||
apiKey: '{{AZURE_OPENAI_API_KEY}}'
|
||||
azureEndpoint: '{{AZURE_OPENAI_ENDPOINT}}'
|
||||
azureApiVersion: "2024-07-01-preview"
|
||||
connections:
|
||||
success: response-block
|
||||
```
|
||||
179
apps/docs/content/docs/yaml/blocks/api.mdx
Normal file
@@ -0,0 +1,179 @@
|
||||
---
|
||||
title: API Block YAML Schema
|
||||
description: YAML configuration reference for API blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [api]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this API block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- url
|
||||
- method
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: The endpoint URL to send the request to
|
||||
method:
|
||||
type: string
|
||||
enum: [GET, POST, PUT, DELETE, PATCH]
|
||||
description: HTTP method for the request
|
||||
default: GET
|
||||
queryParams:
|
||||
type: array
|
||||
description: Query parameters as key-value pairs
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: Parameter name
|
||||
value:
|
||||
type: string
|
||||
description: Parameter value
|
||||
headers:
|
||||
type: array
|
||||
description: HTTP headers as key-value pairs
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
body:
|
||||
type: string
|
||||
description: Request body for POST/PUT/PATCH methods
|
||||
timeout:
|
||||
type: number
|
||||
description: Request timeout in milliseconds
|
||||
default: 30000
|
||||
minimum: 1000
|
||||
maximum: 300000
|
||||
connections:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID for successful requests
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Connections define where the workflow goes based on request results:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful requests
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple GET Request
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
connections:
|
||||
success: process-user-data
|
||||
error: handle-api-error
|
||||
```
|
||||
|
||||
### POST Request with Body
|
||||
|
||||
```yaml
|
||||
create-ticket:
|
||||
type: api
|
||||
name: "Create Support Ticket"
|
||||
inputs:
|
||||
url: "https://api.support.com/tickets"
|
||||
method: POST
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{SUPPORT_API_KEY}}"
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"title": "<agent.title>",
|
||||
"description": "<agent.description>",
|
||||
"priority": "high"
|
||||
}
|
||||
connections:
|
||||
success: ticket-created
|
||||
error: ticket-error
|
||||
```
|
||||
|
||||
### Dynamic URL with Query Parameters
|
||||
|
||||
```yaml
|
||||
search-api:
|
||||
type: api
|
||||
name: "Search Products"
|
||||
inputs:
|
||||
url: "https://api.store.com/products"
|
||||
method: GET
|
||||
queryParams:
|
||||
- key: "q"
|
||||
value: <start.searchTerm>
|
||||
- key: "limit"
|
||||
value: "10"
|
||||
- key: "category"
|
||||
value: <filter.category>
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{STORE_API_KEY}}"
|
||||
connections:
|
||||
success: display-results
|
||||
```
|
||||
|
||||
## Output References
|
||||
|
||||
After an API block executes, you can reference its outputs:
|
||||
|
||||
```yaml
|
||||
# In subsequent blocks
|
||||
next-block:
|
||||
inputs:
|
||||
data: <api-block-name.output> # Response data
|
||||
status: <api-block-name.status> # HTTP status code
|
||||
headers: <api-block-name.headers> # Response headers
|
||||
error: <api-block-name.error> # Error details (if any)
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Use environment variables for API keys: `{{API_KEY_NAME}}`
|
||||
- Include error handling with error connections
|
||||
- Set appropriate timeouts for your use case
|
||||
- Validate response status codes in subsequent blocks
|
||||
- Use meaningful block names for easier reference
|
||||
165
apps/docs/content/docs/yaml/blocks/condition.mdx
Normal file
@@ -0,0 +1,165 @@
|
||||
---
|
||||
title: Condition Block YAML Schema
|
||||
description: YAML configuration reference for Condition blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
- connections
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [condition]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this condition block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- conditions
|
||||
properties:
|
||||
conditions:
|
||||
type: object
|
||||
description: Conditional expressions and their logic
|
||||
properties:
|
||||
if:
|
||||
type: string
|
||||
description: Primary condition expression (boolean)
|
||||
else-if:
|
||||
type: string
|
||||
description: Secondary condition expression (optional)
|
||||
else-if-2:
|
||||
type: string
|
||||
description: Third condition expression (optional)
|
||||
else-if-3:
|
||||
type: string
|
||||
description: Fourth condition expression (optional)
|
||||
# Additional else-if-N conditions can be added as needed
|
||||
else:
|
||||
type: boolean
|
||||
description: Default fallback condition (optional)
|
||||
default: true
|
||||
connections:
|
||||
type: object
|
||||
required:
|
||||
- conditions
|
||||
properties:
|
||||
conditions:
|
||||
type: object
|
||||
description: Target blocks for each condition outcome
|
||||
properties:
|
||||
if:
|
||||
type: string
|
||||
description: Target block ID when 'if' condition is true
|
||||
else-if:
|
||||
type: string
|
||||
description: Target block ID when 'else-if' condition is true
|
||||
else-if-2:
|
||||
type: string
|
||||
description: Target block ID when 'else-if-2' condition is true
|
||||
else-if-3:
|
||||
type: string
|
||||
description: Target block ID when 'else-if-3' condition is true
|
||||
# Additional else-if-N connections can be added as needed
|
||||
else:
|
||||
type: string
|
||||
description: Target block ID when no conditions match
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Unlike other blocks, conditions use branching connections based on condition outcomes:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
conditions:
|
||||
if: <string> # Target block ID when primary condition is true
|
||||
else-if: <string> # Target block ID when secondary condition is true (optional)
|
||||
else-if-2: <string> # Target block ID when third condition is true (optional)
|
||||
else-if-3: <string> # Target block ID when fourth condition is true (optional)
|
||||
# Additional else-if-N connections can be added as needed
|
||||
else: <string> # Target block ID when no conditions match (optional)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple If-Else
|
||||
|
||||
```yaml
|
||||
status-check:
|
||||
type: condition
|
||||
name: "Status Check"
|
||||
inputs:
|
||||
conditions:
|
||||
if: <start.status> === "approved"
|
||||
else: true
|
||||
connections:
|
||||
conditions:
|
||||
if: send-approval-email
|
||||
else: send-rejection-email
|
||||
```
|
||||
|
||||
### Multiple Conditions
|
||||
|
||||
```yaml
|
||||
user-routing:
|
||||
type: condition
|
||||
name: "User Type Router"
|
||||
inputs:
|
||||
conditions:
|
||||
if: <start.user_type> === "admin"
|
||||
else-if: <start.user_type> === "premium"
|
||||
else-if-2: <start.user_type> === "basic"
|
||||
else: true
|
||||
connections:
|
||||
conditions:
|
||||
if: admin-dashboard
|
||||
else-if: premium-features
|
||||
else-if-2: basic-features
|
||||
else: registration-flow
|
||||
```
|
||||
|
||||
### Numeric Comparisons
|
||||
|
||||
```yaml
|
||||
score-evaluation:
|
||||
type: condition
|
||||
name: "Score Evaluation"
|
||||
inputs:
|
||||
conditions:
|
||||
if: <agent.score> >= 90
|
||||
else-if: <agent.score> >= 70
|
||||
else-if-2: <agent.score> >= 50
|
||||
else: true
|
||||
connections:
|
||||
conditions:
|
||||
if: excellent-response
|
||||
else-if: good-response
|
||||
else-if-2: average-response
|
||||
else: poor-response
|
||||
```
|
||||
|
||||
### Complex Logic
|
||||
|
||||
```yaml
|
||||
eligibility-check:
|
||||
type: condition
|
||||
name: "Eligibility Check"
|
||||
inputs:
|
||||
conditions:
|
||||
if: <start.age> >= 18 && <start.verified> === true
|
||||
else-if: <start.age> >= 16 && <start.parent_consent> === true
|
||||
else: true
|
||||
connections:
|
||||
conditions:
|
||||
if: full-access
|
||||
else-if: limited-access
|
||||
else: access-denied
|
||||
```
|
||||
255
apps/docs/content/docs/yaml/blocks/evaluator.mdx
Normal file
@@ -0,0 +1,255 @@
|
||||
---
|
||||
title: Evaluator Block YAML Schema
|
||||
description: YAML configuration reference for Evaluator blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [evaluator]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this evaluator block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- content
|
||||
- metrics
|
||||
- model
|
||||
- apiKey
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
description: Content to evaluate (can reference other blocks)
|
||||
metrics:
|
||||
type: array
|
||||
description: Evaluation criteria and scoring ranges
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Metric identifier
|
||||
description:
|
||||
type: string
|
||||
description: Detailed explanation of what the metric measures
|
||||
range:
|
||||
type: object
|
||||
properties:
|
||||
min:
|
||||
type: number
|
||||
description: Minimum score value
|
||||
max:
|
||||
type: number
|
||||
description: Maximum score value
|
||||
required: [min, max]
|
||||
description: Scoring range with numeric bounds
|
||||
model:
|
||||
type: string
|
||||
description: AI model identifier (e.g., gpt-4o, claude-3-5-sonnet-20241022)
|
||||
apiKey:
|
||||
type: string
|
||||
description: API key for the model provider (use {{ENV_VAR}} format)
|
||||
temperature:
|
||||
type: number
|
||||
minimum: 0
|
||||
maximum: 2
|
||||
description: Model temperature for evaluation
|
||||
default: 0.3
|
||||
azureEndpoint:
|
||||
type: string
|
||||
description: Azure OpenAI endpoint URL (required for Azure models)
|
||||
azureApiVersion:
|
||||
type: string
|
||||
description: Azure API version (required for Azure models)
|
||||
connections:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID for successful evaluation
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Connections define where the workflow goes based on evaluation results:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful evaluation
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Content Quality Evaluation
|
||||
|
||||
```yaml
|
||||
content-evaluator:
|
||||
type: evaluator
|
||||
name: "Content Quality Evaluator"
|
||||
inputs:
|
||||
content: <content-generator.content>
|
||||
metrics:
|
||||
- name: "accuracy"
|
||||
description: "How factually accurate is the content?"
|
||||
range:
|
||||
min: 1
|
||||
max: 5
|
||||
- name: "clarity"
|
||||
description: "How clear and understandable is the content?"
|
||||
range:
|
||||
min: 1
|
||||
max: 5
|
||||
- name: "relevance"
|
||||
description: "How relevant is the content to the original query?"
|
||||
range:
|
||||
min: 1
|
||||
max: 5
|
||||
- name: "completeness"
|
||||
description: "How complete and comprehensive is the content?"
|
||||
range:
|
||||
min: 1
|
||||
max: 5
|
||||
model: gpt-4o
|
||||
temperature: 0.2
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: quality-report
|
||||
error: evaluation-error
|
||||
```
|
||||
|
||||
### Customer Response Evaluation
|
||||
|
||||
```yaml
|
||||
response-evaluator:
|
||||
type: evaluator
|
||||
name: "Customer Response Evaluator"
|
||||
inputs:
|
||||
content: <customer-agent.content>
|
||||
metrics:
|
||||
- name: "helpfulness"
|
||||
description: "How helpful is the response in addressing the customer's needs?"
|
||||
range:
|
||||
min: 1
|
||||
max: 10
|
||||
- name: "tone"
|
||||
description: "How appropriate and professional is the tone?"
|
||||
range:
|
||||
min: 1
|
||||
max: 10
|
||||
- name: "completeness"
|
||||
description: "Does the response fully address all aspects of the inquiry?"
|
||||
range:
|
||||
min: 1
|
||||
max: 10
|
||||
model: claude-3-5-sonnet-20241022
|
||||
apiKey: '{{ANTHROPIC_API_KEY}}'
|
||||
connections:
|
||||
success: response-processor
|
||||
```
|
||||
|
||||
### A/B Testing Evaluation
|
||||
|
||||
```yaml
|
||||
ab-test-evaluator:
|
||||
type: evaluator
|
||||
name: "A/B Test Evaluator"
|
||||
inputs:
|
||||
content: |
|
||||
Version A: <version-a.content>
|
||||
Version B: <version-b.content>
|
||||
|
||||
Compare these two versions for the following criteria.
|
||||
metrics:
|
||||
- name: "engagement"
|
||||
description: "Which version is more likely to engage users?"
|
||||
range: "A, B, or Tie"
|
||||
- name: "clarity"
|
||||
description: "Which version communicates more clearly?"
|
||||
range: "A, B, or Tie"
|
||||
- name: "persuasiveness"
|
||||
description: "Which version is more persuasive?"
|
||||
range: "A, B, or Tie"
|
||||
model: gpt-4o
|
||||
temperature: 0.1
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: test-results
|
||||
```
|
||||
|
||||
### Multi-Dimensional Content Scoring
|
||||
|
||||
```yaml
|
||||
comprehensive-evaluator:
|
||||
type: evaluator
|
||||
name: "Comprehensive Content Evaluator"
|
||||
inputs:
|
||||
content: <ai-writer.content>
|
||||
metrics:
|
||||
- name: "technical_accuracy"
|
||||
description: "How technically accurate and correct is the information?"
|
||||
range:
|
||||
min: 0
|
||||
max: 100
|
||||
- name: "readability"
|
||||
description: "How easy is the content to read and understand?"
|
||||
range:
|
||||
min: 0
|
||||
max: 100
|
||||
- name: "seo_optimization"
|
||||
description: "How well optimized is the content for search engines?"
|
||||
range:
|
||||
min: 0
|
||||
max: 100
|
||||
- name: "user_engagement"
|
||||
description: "How likely is this content to engage and retain readers?"
|
||||
range:
|
||||
min: 0
|
||||
max: 100
|
||||
- name: "brand_alignment"
|
||||
description: "How well does the content align with brand voice and values?"
|
||||
range:
|
||||
min: 0
|
||||
max: 100
|
||||
model: gpt-4o
|
||||
temperature: 0.3
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: content-optimization
|
||||
```
|
||||
|
||||
## Output References
|
||||
|
||||
After an evaluator block executes, you can reference its outputs:
|
||||
|
||||
```yaml
|
||||
# In subsequent blocks
|
||||
next-block:
|
||||
inputs:
|
||||
evaluation: <evaluator-name.content> # Evaluation summary
|
||||
scores: <evaluator-name.scores> # Individual metric scores
|
||||
overall: <evaluator-name.overall> # Overall assessment
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Define clear, specific evaluation criteria
|
||||
- Use appropriate scoring ranges for your use case
|
||||
- Choose models with strong reasoning capabilities
|
||||
- Use lower temperature for consistent scoring
|
||||
- Include detailed metric descriptions
|
||||
- Test with diverse content types
|
||||
- Consider multiple evaluators for complex assessments
|
||||
162
apps/docs/content/docs/yaml/blocks/function.mdx
Normal file
@@ -0,0 +1,162 @@
|
||||
---
|
||||
title: Function Block YAML Schema
|
||||
description: YAML configuration reference for Function blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [function]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this function block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
description: JavaScript/TypeScript code to execute (multiline string)
|
||||
timeout:
|
||||
type: number
|
||||
description: Maximum execution time in milliseconds
|
||||
default: 30000
|
||||
minimum: 1000
|
||||
maximum: 300000
|
||||
connections:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID for successful execution
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Connections define where the workflow goes based on execution results:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple Validation
|
||||
|
||||
```yaml
|
||||
input-validator:
|
||||
type: function
|
||||
name: "Input Validator"
|
||||
inputs:
|
||||
code: |-
|
||||
// Check if input number is greater than 5
|
||||
const inputValue = parseInt(<start.input>, 10);
|
||||
|
||||
if (inputValue > 5) {
|
||||
return {
|
||||
valid: true,
|
||||
value: inputValue,
|
||||
message: "Input is valid"
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
valid: false,
|
||||
value: inputValue,
|
||||
message: "Input must be greater than 5"
|
||||
};
|
||||
}
|
||||
connections:
|
||||
success: next-step
|
||||
error: handle-error
|
||||
```
|
||||
|
||||
### Data Processing
|
||||
|
||||
```yaml
|
||||
data-processor:
|
||||
type: function
|
||||
name: "Data Transformer"
|
||||
inputs:
|
||||
code: |
|
||||
// Transform the input data
|
||||
const rawData = <start.input>;
|
||||
|
||||
// Process and clean the data
|
||||
const processed = rawData
|
||||
.filter(item => item.status === 'active')
|
||||
.map(item => ({
|
||||
id: item.id,
|
||||
name: item.name.trim(),
|
||||
date: new Date(item.created).toISOString()
|
||||
}));
|
||||
|
||||
return processed;
|
||||
connections:
|
||||
success: api-save
|
||||
error: error-handler
|
||||
```
|
||||
|
||||
### API Integration
|
||||
|
||||
```yaml
|
||||
api-formatter:
|
||||
type: function
|
||||
name: "Format API Request"
|
||||
inputs:
|
||||
code: |
|
||||
// Prepare data for API submission
|
||||
const userData = <agent.response>;
|
||||
|
||||
const apiPayload = {
|
||||
timestamp: new Date().toISOString(),
|
||||
data: userData,
|
||||
source: "workflow-automation",
|
||||
version: "1.0"
|
||||
};
|
||||
|
||||
return apiPayload;
|
||||
connections:
|
||||
success: api-call
|
||||
```
|
||||
|
||||
### Calculations
|
||||
|
||||
```yaml
|
||||
calculator:
|
||||
type: function
|
||||
name: "Calculate Results"
|
||||
inputs:
|
||||
code: |
|
||||
// Perform calculations on input data
|
||||
const numbers = <start.input>;
|
||||
|
||||
const sum = numbers.reduce((a, b) => a + b, 0);
|
||||
const average = sum / numbers.length;
|
||||
const max = Math.max(...numbers);
|
||||
const min = Math.min(...numbers);
|
||||
|
||||
return {
|
||||
sum,
|
||||
average,
|
||||
max,
|
||||
min,
|
||||
count: numbers.length
|
||||
};
|
||||
connections:
|
||||
success: results-display
|
||||
```
|
||||
151
apps/docs/content/docs/yaml/blocks/index.mdx
Normal file
@@ -0,0 +1,151 @@
|
||||
---
|
||||
title: Block Schemas
|
||||
description: Complete YAML schema reference for all Sim Studio blocks
|
||||
---
|
||||
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
|
||||
This section contains the complete YAML schema definitions for all available block types in Sim Studio. Each block type has specific configuration requirements and output formats.
|
||||
|
||||
## Core Blocks
|
||||
|
||||
These are the essential building blocks for creating workflows:
|
||||
|
||||
<Cards>
|
||||
<Card title="Starter Block" href="/yaml/blocks/starter">
|
||||
Workflow entry point supporting manual triggers, webhooks, and schedules
|
||||
</Card>
|
||||
<Card title="Agent Block" href="/yaml/blocks/agent">
|
||||
AI-powered processing with LLM integration and tool support
|
||||
</Card>
|
||||
<Card title="Function Block" href="/yaml/blocks/function">
|
||||
Custom JavaScript/TypeScript code execution environment
|
||||
</Card>
|
||||
<Card title="Response Block" href="/yaml/blocks/response">
|
||||
Format and return final workflow results
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Logic & Control Flow
|
||||
|
||||
Blocks for implementing conditional logic and control flow:
|
||||
|
||||
<Cards>
|
||||
<Card title="Condition Block" href="/yaml/blocks/condition">
|
||||
Conditional branching based on boolean expressions
|
||||
</Card>
|
||||
<Card title="Router Block" href="/yaml/blocks/router">
|
||||
AI-powered intelligent routing to multiple paths
|
||||
</Card>
|
||||
<Card title="Loop Block" href="/yaml/blocks/loop">
|
||||
Iterative processing with for and forEach loops
|
||||
</Card>
|
||||
<Card title="Parallel Block" href="/yaml/blocks/parallel">
|
||||
Concurrent execution across multiple instances
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Integration Blocks
|
||||
|
||||
Blocks for connecting to external services and systems:
|
||||
|
||||
<Cards>
|
||||
<Card title="API Block" href="/yaml/blocks/api">
|
||||
HTTP requests to external REST APIs
|
||||
</Card>
|
||||
<Card title="Webhook Block" href="/yaml/blocks/webhook">
|
||||
Webhook triggers for external integrations
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Advanced Blocks
|
||||
|
||||
Specialized blocks for complex workflow patterns:
|
||||
|
||||
<Cards>
|
||||
<Card title="Evaluator Block" href="/yaml/blocks/evaluator">
|
||||
Validate outputs against defined criteria and metrics
|
||||
</Card>
|
||||
<Card title="Workflow Block" href="/yaml/blocks/workflow">
|
||||
Execute other workflows as reusable components
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Common Schema Elements
|
||||
|
||||
All blocks share these common elements:
|
||||
|
||||
### Basic Structure
|
||||
|
||||
```yaml
|
||||
block-id:
|
||||
type: <block-type>
|
||||
name: <display-name>
|
||||
inputs:
|
||||
# Block-specific configuration
|
||||
connections:
|
||||
# Connection definitions
|
||||
```
|
||||
|
||||
### Connection Types
|
||||
|
||||
- **success**: Target block for successful execution
|
||||
- **error**: Target block for error handling (optional)
|
||||
- **conditions**: Multiple paths for conditional blocks
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Use double curly braces for environment variables:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{API_KEY_NAME}}'
|
||||
endpoint: '{{SERVICE_ENDPOINT}}'
|
||||
```
|
||||
|
||||
### Block References
|
||||
|
||||
Reference other block outputs using the block name in lowercase:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
userPrompt: <blockname.content>
|
||||
data: <functionblock.output>
|
||||
originalInput: <start.input>
|
||||
```
|
||||
|
||||
## Validation Rules
|
||||
|
||||
All YAML blocks are validated against their schemas:
|
||||
|
||||
1. **Required fields**: Must be present
|
||||
2. **Type validation**: Values must match expected types
|
||||
3. **Enum validation**: String values must be from allowed lists
|
||||
4. **Range validation**: Numbers must be within specified ranges
|
||||
5. **Pattern validation**: Strings must match regex patterns (where applicable)
|
||||
|
||||
## Quick Reference
|
||||
|
||||
### Block Types and Properties
|
||||
|
||||
| Block Type | Primary Output | Common Use Cases |
|
||||
|------------|----------------|------------------|
|
||||
| starter | `.input` | Workflow entry point |
|
||||
| agent | `.content` | AI processing, text generation |
|
||||
| function | `.output` | Data transformation, calculations |
|
||||
| api | `.output` | External service integration |
|
||||
| condition | N/A (branching) | Conditional logic |
|
||||
| router | N/A (branching) | Intelligent routing |
|
||||
| response | N/A (terminal) | Final output formatting |
|
||||
| loop | `.results` | Iterative processing |
|
||||
| parallel | `.results` | Concurrent processing |
|
||||
| webhook | `.payload` | External triggers |
|
||||
| evaluator | `.score` | Output validation, quality assessment |
|
||||
| workflow | `.output` | Sub-workflow execution, modularity |
|
||||
|
||||
### Required vs Optional
|
||||
|
||||
- **Always required**: `type`, `name`
|
||||
- **Usually required**: `inputs`, `connections`
|
||||
- **Context dependent**: Specific input fields vary by block type
|
||||
- **Always optional**: `error` connections, UI-specific fields
|
||||
305
apps/docs/content/docs/yaml/blocks/loop.mdx
Normal file
@@ -0,0 +1,305 @@
|
||||
---
|
||||
title: Loop Block YAML Schema
|
||||
description: YAML configuration reference for Loop blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
- connections
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [loop]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this loop block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- loopType
|
||||
properties:
|
||||
loopType:
|
||||
type: string
|
||||
enum: [for, forEach]
|
||||
description: Type of loop to execute
|
||||
iterations:
|
||||
type: number
|
||||
description: Number of iterations (for 'for' loops)
|
||||
minimum: 1
|
||||
maximum: 1000
|
||||
collection:
|
||||
type: string
|
||||
description: Collection to iterate over (for 'forEach' loops)
|
||||
maxConcurrency:
|
||||
type: number
|
||||
description: Maximum concurrent executions
|
||||
default: 1
|
||||
minimum: 1
|
||||
maximum: 10
|
||||
connections:
|
||||
type: object
|
||||
required:
|
||||
- loop
|
||||
properties:
|
||||
loop:
|
||||
type: object
|
||||
required:
|
||||
- start
|
||||
properties:
|
||||
start:
|
||||
type: string
|
||||
description: Target block ID to execute inside the loop
|
||||
end:
|
||||
type: string
|
||||
description: Target block ID for loop completion (optional)
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID after loop completion (alternative format)
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Loop blocks use a special connection format with a `loop` section:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
loop:
|
||||
start: <string> # Target block ID to execute inside the loop
|
||||
end: <string> # Target block ID after loop completion (optional)
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
Alternative format (legacy):
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID after loop completion
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Child Block Configuration
|
||||
|
||||
Blocks inside a loop must have their `parentId` set to the loop block ID:
|
||||
|
||||
```yaml
|
||||
loop-1:
|
||||
type: loop
|
||||
name: "Process Items"
|
||||
inputs:
|
||||
loopType: forEach
|
||||
collection: <start.items>
|
||||
connections:
|
||||
loop:
|
||||
start: process-item
|
||||
end: final-results
|
||||
|
||||
# Child block inside the loop
|
||||
process-item:
|
||||
type: agent
|
||||
name: "Process Item"
|
||||
parentId: loop-1 # References the loop block
|
||||
inputs:
|
||||
systemPrompt: "Process this item"
|
||||
userPrompt: <loop.currentItem>
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### For Loop (Fixed Iterations)
|
||||
|
||||
```yaml
|
||||
countdown-loop:
|
||||
type: loop
|
||||
name: "Countdown Loop"
|
||||
inputs:
|
||||
loopType: for
|
||||
iterations: 5
|
||||
connections:
|
||||
loop:
|
||||
start: countdown-agent
|
||||
end: countdown-complete
|
||||
|
||||
countdown-agent:
|
||||
type: agent
|
||||
name: "Countdown Agent"
|
||||
parentId: countdown-loop
|
||||
inputs:
|
||||
systemPrompt: "Generate a countdown message"
|
||||
userPrompt: "Count down from 5. Current number: <loop.index>"
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
|
||||
### ForEach Loop (Collection Processing)
|
||||
|
||||
```yaml
|
||||
email-processor-loop:
|
||||
type: loop
|
||||
name: "Email Processor Loop"
|
||||
inputs:
|
||||
loopType: forEach
|
||||
collection: <start.emails>
|
||||
connections:
|
||||
loop:
|
||||
start: process-single-email
|
||||
end: all-emails-processed
|
||||
|
||||
process-single-email:
|
||||
type: agent
|
||||
name: "Process Single Email"
|
||||
parentId: email-processor-loop
|
||||
inputs:
|
||||
systemPrompt: "Classify and respond to this email"
|
||||
userPrompt: "Email content: <loop.currentItem>"
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
|
||||
### Complex Loop with Multiple Child Blocks
|
||||
|
||||
```yaml
|
||||
data-analysis-loop:
|
||||
type: loop
|
||||
name: "Data Analysis Loop"
|
||||
inputs:
|
||||
loopType: forEach
|
||||
collection: <data-fetcher.records>
|
||||
maxConcurrency: 3
|
||||
connections:
|
||||
loop:
|
||||
start: validate-record
|
||||
end: generate-report
|
||||
error: handle-loop-error
|
||||
|
||||
validate-record:
|
||||
type: function
|
||||
name: "Validate Record"
|
||||
parentId: data-analysis-loop
|
||||
inputs:
|
||||
code: |
|
||||
const record = <loop.currentItem>;
|
||||
const index = <loop.index>;
|
||||
|
||||
// Validate the record
|
||||
if (!record.id || !record.data) {
|
||||
throw new Error(`Invalid record at index ${index}`);
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
recordId: record.id,
|
||||
processedAt: new Date().toISOString()
|
||||
};
|
||||
connections:
|
||||
success: analyze-record
|
||||
error: record-error
|
||||
|
||||
analyze-record:
|
||||
type: agent
|
||||
name: "Analyze Record"
|
||||
parentId: data-analysis-loop
|
||||
inputs:
|
||||
systemPrompt: "Analyze this data record and extract insights"
|
||||
userPrompt: |
|
||||
Record ID: <validaterecord.recordId>
|
||||
Data: <loop.currentItem.data>
|
||||
Position in collection: <loop.index>
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: store-analysis
|
||||
|
||||
store-analysis:
|
||||
type: function
|
||||
name: "Store Analysis"
|
||||
parentId: data-analysis-loop
|
||||
inputs:
|
||||
code: |
|
||||
const analysis = <analyzerecord.content>;
|
||||
const recordId = <validaterecord.recordId>;
|
||||
|
||||
// Store analysis result
|
||||
return {
|
||||
recordId,
|
||||
analysis,
|
||||
completedAt: new Date().toISOString()
|
||||
};
|
||||
```
|
||||
|
||||
### Concurrent Processing Loop
|
||||
|
||||
```yaml
|
||||
parallel-processing-loop:
|
||||
type: loop
|
||||
name: "Parallel Processing Loop"
|
||||
inputs:
|
||||
loopType: forEach
|
||||
collection: <start.tasks>
|
||||
maxConcurrency: 5
|
||||
connections:
|
||||
loop:
|
||||
start: process-task
|
||||
end: aggregate-results
|
||||
|
||||
process-task:
|
||||
type: api
|
||||
name: "Process Task"
|
||||
parentId: parallel-processing-loop
|
||||
inputs:
|
||||
url: "https://api.example.com/process"
|
||||
method: POST
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
body: |
|
||||
{
|
||||
"taskId": "<loop.currentItem.id>",
|
||||
"data": "<loop.currentItem.data>"
|
||||
}
|
||||
connections:
|
||||
success: task-completed
|
||||
```
|
||||
|
||||
## Loop Variables
|
||||
|
||||
Inside loop child blocks, these special variables are available:
|
||||
|
||||
```yaml
|
||||
# Available in all child blocks of the loop
|
||||
<loop.index> # Current iteration number (0-based)
|
||||
<loop.currentItem> # Current item being processed (forEach loops)
|
||||
<loop.items> # Full collection (forEach loops)
|
||||
```
|
||||
|
||||
## Output References
|
||||
|
||||
After a loop completes, you can reference its aggregated results:
|
||||
|
||||
```yaml
|
||||
# In blocks after the loop
|
||||
final-processor:
|
||||
inputs:
|
||||
all-results: <loop-name.results> # Array of all iteration results
|
||||
total-count: <loop-name.count> # Number of iterations completed
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Set reasonable iteration limits to avoid long execution times
|
||||
- Use forEach for collection processing, for loops for fixed iterations
|
||||
- Consider using maxConcurrency for I/O bound operations
|
||||
- Include error handling for robust loop execution
|
||||
- Use descriptive names for loop child blocks
|
||||
- Test with small collections first
|
||||
- Monitor execution time for large collections
|
||||
17
apps/docs/content/docs/yaml/blocks/meta.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"title": "Block Schemas",
|
||||
"pages": [
|
||||
"starter",
|
||||
"agent",
|
||||
"function",
|
||||
"api",
|
||||
"condition",
|
||||
"router",
|
||||
"evaluator",
|
||||
"response",
|
||||
"loop",
|
||||
"parallel",
|
||||
"webhook",
|
||||
"workflow"
|
||||
]
|
||||
}
|
||||
322
apps/docs/content/docs/yaml/blocks/parallel.mdx
Normal file
@@ -0,0 +1,322 @@
|
||||
---
|
||||
title: Parallel Block YAML Schema
|
||||
description: YAML configuration reference for Parallel blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
- connections
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [parallel]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this parallel block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- parallelType
|
||||
properties:
|
||||
parallelType:
|
||||
type: string
|
||||
enum: [count, collection]
|
||||
description: Type of parallel execution
|
||||
count:
|
||||
type: number
|
||||
description: Number of parallel instances (for 'count' type)
|
||||
minimum: 1
|
||||
maximum: 100
|
||||
collection:
|
||||
type: string
|
||||
description: Collection to distribute across instances (for 'collection' type)
|
||||
maxConcurrency:
|
||||
type: number
|
||||
description: Maximum concurrent executions
|
||||
default: 10
|
||||
minimum: 1
|
||||
maximum: 50
|
||||
connections:
|
||||
type: object
|
||||
required:
|
||||
- parallel
|
||||
properties:
|
||||
parallel:
|
||||
type: object
|
||||
required:
|
||||
- start
|
||||
properties:
|
||||
start:
|
||||
type: string
|
||||
description: Target block ID to execute inside each parallel instance
|
||||
end:
|
||||
type: string
|
||||
description: Target block ID after all parallel instances complete (optional)
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID after all instances complete (alternative format)
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Parallel blocks use a special connection format with a `parallel` section:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
parallel:
|
||||
start: <string> # Target block ID to execute inside each parallel instance
|
||||
end: <string> # Target block ID after all instances complete (optional)
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
Alternative format (legacy):
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID after all instances complete
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Child Block Configuration
|
||||
|
||||
Blocks inside a parallel block must have their `parentId` set to the parallel block ID:
|
||||
|
||||
```yaml
|
||||
parallel-1:
|
||||
type: parallel
|
||||
name: "Process Items"
|
||||
inputs:
|
||||
parallelType: collection
|
||||
collection: <start.items>
|
||||
connections:
|
||||
parallel:
|
||||
start: process-item
|
||||
end: aggregate-results
|
||||
|
||||
# Child block inside the parallel
|
||||
process-item:
|
||||
type: agent
|
||||
name: "Process Item"
|
||||
parentId: parallel-1 # References the parallel block
|
||||
inputs:
|
||||
systemPrompt: "Process this item"
|
||||
userPrompt: <parallel.currentItem>
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Count-Based Parallel Processing
|
||||
|
||||
```yaml
|
||||
worker-parallel:
|
||||
type: parallel
|
||||
name: "Worker Parallel"
|
||||
inputs:
|
||||
parallelType: count
|
||||
count: 5
|
||||
maxConcurrency: 3
|
||||
connections:
|
||||
parallel:
|
||||
start: worker-task
|
||||
end: collect-worker-results
|
||||
|
||||
worker-task:
|
||||
type: api
|
||||
name: "Worker Task"
|
||||
parentId: worker-parallel
|
||||
inputs:
|
||||
url: "https://api.worker.com/process"
|
||||
method: POST
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{WORKER_API_KEY}}"
|
||||
body: |
|
||||
{
|
||||
"instanceId": <parallel.index>,
|
||||
"timestamp": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: worker-complete
|
||||
```
|
||||
|
||||
### Collection-Based Parallel Processing
|
||||
|
||||
```yaml
|
||||
api-parallel:
|
||||
type: parallel
|
||||
name: "API Parallel"
|
||||
inputs:
|
||||
parallelType: collection
|
||||
collection: <start.apiEndpoints>
|
||||
maxConcurrency: 10
|
||||
connections:
|
||||
parallel:
|
||||
start: call-api
|
||||
end: merge-api-results
|
||||
|
||||
call-api:
|
||||
type: api
|
||||
name: "Call API"
|
||||
parentId: api-parallel
|
||||
inputs:
|
||||
url: <parallel.currentItem.endpoint>
|
||||
method: <parallel.currentItem.method>
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
connections:
|
||||
success: api-complete
|
||||
```
|
||||
|
||||
### Complex Parallel Processing Pipeline
|
||||
|
||||
```yaml
|
||||
data-processing-parallel:
|
||||
type: parallel
|
||||
name: "Data Processing Parallel"
|
||||
inputs:
|
||||
parallelType: collection
|
||||
collection: <data-loader.records>
|
||||
maxConcurrency: 8
|
||||
connections:
|
||||
parallel:
|
||||
start: validate-data
|
||||
end: final-aggregation
|
||||
error: parallel-error-handler
|
||||
|
||||
validate-data:
|
||||
type: function
|
||||
name: "Validate Data"
|
||||
parentId: data-processing-parallel
|
||||
inputs:
|
||||
code: |
|
||||
const record = <parallel.currentItem>;
|
||||
const index = <parallel.index>;
|
||||
|
||||
// Validate record structure
|
||||
if (!record.id || !record.content) {
|
||||
throw new Error(`Invalid record at index ${index}`);
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
recordId: record.id,
|
||||
validatedAt: new Date().toISOString()
|
||||
};
|
||||
connections:
|
||||
success: process-data
|
||||
error: validation-error
|
||||
|
||||
process-data:
|
||||
type: agent
|
||||
name: "Process Data"
|
||||
parentId: data-processing-parallel
|
||||
inputs:
|
||||
systemPrompt: "Process and analyze this data record"
|
||||
userPrompt: |
|
||||
Record ID: <validatedata.recordId>
|
||||
Content: <parallel.currentItem.content>
|
||||
Instance: <parallel.index>
|
||||
model: gpt-4o
|
||||
temperature: 0.3
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: store-result
|
||||
|
||||
store-result:
|
||||
type: function
|
||||
name: "Store Result"
|
||||
parentId: data-processing-parallel
|
||||
inputs:
|
||||
code: |
|
||||
const processed = <processdata.content>;
|
||||
const recordId = <validatedata.recordId>;
|
||||
|
||||
return {
|
||||
recordId,
|
||||
processed,
|
||||
completedAt: new Date().toISOString(),
|
||||
instanceIndex: <parallel.index>
|
||||
};
|
||||
```
|
||||
|
||||
### Concurrent AI Analysis
|
||||
|
||||
```yaml
|
||||
multi-model-parallel:
|
||||
type: parallel
|
||||
name: "Multi-Model Analysis"
|
||||
inputs:
|
||||
parallelType: collection
|
||||
collection: |
|
||||
[
|
||||
{"model": "gpt-4o", "focus": "technical accuracy"},
|
||||
{"model": "claude-3-5-sonnet-20241022", "focus": "creative quality"},
|
||||
{"model": "gemini-2.0-flash-exp", "focus": "factual verification"}
|
||||
]
|
||||
maxConcurrency: 3
|
||||
connections:
|
||||
parallel:
|
||||
start: analyze-content
|
||||
end: combine-analyses
|
||||
|
||||
analyze-content:
|
||||
type: agent
|
||||
name: "Analyze Content"
|
||||
parentId: multi-model-parallel
|
||||
inputs:
|
||||
systemPrompt: |
|
||||
You are analyzing content with a focus on <parallel.currentItem.focus>.
|
||||
Provide detailed analysis from this perspective.
|
||||
userPrompt: |
|
||||
Content to analyze: <start.content>
|
||||
Analysis focus: <parallel.currentItem.focus>
|
||||
model: <parallel.currentItem.model>
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: analysis-complete
|
||||
```
|
||||
|
||||
## Parallel Variables
|
||||
|
||||
Inside parallel child blocks, these special variables are available:
|
||||
|
||||
```yaml
|
||||
# Available in all child blocks of the parallel
|
||||
<parallel.index> # Instance number (0-based)
|
||||
<parallel.currentItem> # Item for this instance (collection type)
|
||||
<parallel.items> # Full collection (collection type)
|
||||
```
|
||||
|
||||
## Output References
|
||||
|
||||
After a parallel block completes, you can reference its aggregated results:
|
||||
|
||||
```yaml
|
||||
# In blocks after the parallel
|
||||
final-processor:
|
||||
inputs:
|
||||
all-results: <parallel-name.results> # Array of all instance results
|
||||
total-count: <parallel-name.count> # Number of instances completed
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Use appropriate maxConcurrency to avoid overwhelming APIs
|
||||
- Ensure operations are independent and don't rely on each other
|
||||
- Include error handling for robust parallel execution
|
||||
- Test with small collections first
|
||||
- Monitor rate limits for external APIs
|
||||
- Use collection type for distributing work, count type for fixed instances
|
||||
- Consider memory usage with large collections
|
||||
140
apps/docs/content/docs/yaml/blocks/response.mdx
Normal file
@@ -0,0 +1,140 @@
|
||||
---
|
||||
title: Response Block YAML Schema
|
||||
description: YAML configuration reference for Response blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [response]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this response block
|
||||
inputs:
|
||||
type: object
|
||||
properties:
|
||||
dataMode:
|
||||
type: string
|
||||
enum: [structured, json]
|
||||
description: Mode for defining response data structure
|
||||
default: structured
|
||||
builderData:
|
||||
type: object
|
||||
description: Structured response data (when dataMode is 'structured')
|
||||
data:
|
||||
type: object
|
||||
description: JSON response data (when dataMode is 'json')
|
||||
status:
|
||||
type: number
|
||||
description: HTTP status code
|
||||
default: 200
|
||||
minimum: 100
|
||||
maximum: 599
|
||||
headers:
|
||||
type: array
|
||||
description: Response headers as key-value pairs
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Response blocks are terminal blocks (no outgoing connections) and define the final output:
|
||||
|
||||
```yaml
|
||||
# No connections object needed - Response blocks are always terminal
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple Response
|
||||
|
||||
```yaml
|
||||
simple-response:
|
||||
type: response
|
||||
name: "Simple Response"
|
||||
inputs:
|
||||
data:
|
||||
message: "Hello World"
|
||||
timestamp: <function.timestamp>
|
||||
status: 200
|
||||
```
|
||||
|
||||
### Success Response
|
||||
|
||||
```yaml
|
||||
success-response:
|
||||
type: response
|
||||
name: "Success Response"
|
||||
inputs:
|
||||
data:
|
||||
success: true
|
||||
user:
|
||||
id: <agent.user_id>
|
||||
name: <agent.user_name>
|
||||
email: <agent.user_email>
|
||||
created_at: <function.timestamp>
|
||||
status: 201
|
||||
headers:
|
||||
- key: "Location"
|
||||
value: "/api/users/<agent.user_id>"
|
||||
- key: "X-Created-By"
|
||||
value: "workflow-engine"
|
||||
```
|
||||
|
||||
### Error Response
|
||||
|
||||
```yaml
|
||||
error-response:
|
||||
type: response
|
||||
name: "Error Response"
|
||||
inputs:
|
||||
data:
|
||||
error: true
|
||||
message: <agent.error_message>
|
||||
code: "VALIDATION_FAILED"
|
||||
details: <function.validation_errors>
|
||||
status: 400
|
||||
headers:
|
||||
- key: "X-Error-Code"
|
||||
value: "VALIDATION_FAILED"
|
||||
```
|
||||
|
||||
### Paginated Response
|
||||
|
||||
```yaml
|
||||
paginated-response:
|
||||
type: response
|
||||
name: "Paginated Response"
|
||||
inputs:
|
||||
data:
|
||||
data: <agent.results>
|
||||
pagination:
|
||||
page: <start.page>
|
||||
per_page: <start.per_page>
|
||||
total: <function.total_count>
|
||||
total_pages: <function.total_pages>
|
||||
status: 200
|
||||
headers:
|
||||
- key: "X-Total-Count"
|
||||
value: <function.total_count>
|
||||
- key: "Cache-Control"
|
||||
value: "public, max-age=300"
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
```
|
||||
200
apps/docs/content/docs/yaml/blocks/router.mdx
Normal file
@@ -0,0 +1,200 @@
|
||||
---
|
||||
title: Router Block YAML Schema
|
||||
description: YAML configuration reference for Router blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [router]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this router block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- prompt
|
||||
- model
|
||||
- apiKey
|
||||
properties:
|
||||
prompt:
|
||||
type: string
|
||||
description: Instructions for routing decisions and criteria
|
||||
model:
|
||||
type: string
|
||||
description: AI model identifier (e.g., gpt-4o, gemini-2.5-pro, deepseek-chat)
|
||||
apiKey:
|
||||
type: string
|
||||
description: API key for the model provider (use {{ENV_VAR}} format)
|
||||
temperature:
|
||||
type: number
|
||||
minimum: 0
|
||||
maximum: 2
|
||||
description: Model temperature for routing decisions
|
||||
default: 0.3
|
||||
azureEndpoint:
|
||||
type: string
|
||||
description: Azure OpenAI endpoint URL (required for Azure models)
|
||||
azureApiVersion:
|
||||
type: string
|
||||
description: Azure API version (required for Azure models)
|
||||
connections:
|
||||
type: object
|
||||
description: Multiple connection paths for different routing outcomes
|
||||
properties:
|
||||
success:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Array of target block IDs for routing destinations
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Router blocks use a success array containing all possible routing destinations:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success:
|
||||
- <string> # Target block ID option 1
|
||||
- <string> # Target block ID option 2
|
||||
- <string> # Target block ID option 3
|
||||
# Additional target block IDs as needed
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Content Type Router
|
||||
|
||||
```yaml
|
||||
content-router:
|
||||
type: router
|
||||
name: "Content Type Router"
|
||||
inputs:
|
||||
prompt: |
|
||||
Route this content based on its type:
|
||||
- If it's a question, route to question-handler
|
||||
- If it's a complaint, route to complaint-handler
|
||||
- If it's feedback, route to feedback-handler
|
||||
- If it's a request, route to request-handler
|
||||
|
||||
Content: <start.input>
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success:
|
||||
- question-handler
|
||||
- complaint-handler
|
||||
- feedback-handler
|
||||
- request-handler
|
||||
```
|
||||
|
||||
### Priority Router
|
||||
|
||||
```yaml
|
||||
priority-router:
|
||||
type: router
|
||||
name: "Priority Router"
|
||||
inputs:
|
||||
prompt: |
|
||||
Analyze the urgency and route accordingly:
|
||||
- urgent-queue: High priority, needs immediate attention
|
||||
- standard-queue: Normal priority, standard processing
|
||||
- low-queue: Low priority, can be delayed
|
||||
|
||||
Email content: <email-analyzer.content>
|
||||
|
||||
Route based on urgency indicators, deadlines, and tone.
|
||||
model: gpt-4o
|
||||
temperature: 0.2
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success:
|
||||
- urgent-queue
|
||||
- standard-queue
|
||||
- low-queue
|
||||
```
|
||||
|
||||
### Department Router
|
||||
|
||||
```yaml
|
||||
department-router:
|
||||
type: router
|
||||
name: "Department Router"
|
||||
inputs:
|
||||
prompt: |
|
||||
Route this customer inquiry to the appropriate department:
|
||||
|
||||
- sales-team: Sales questions, pricing, demos
|
||||
- support-team: Technical issues, bug reports, how-to questions
|
||||
- billing-team: Payment issues, subscription changes, invoices
|
||||
- general-team: General inquiries, feedback, other topics
|
||||
|
||||
Customer message: <start.input>
|
||||
Customer type: <customer-analyzer.type>
|
||||
model: claude-3-5-sonnet-20241022
|
||||
apiKey: '{{ANTHROPIC_API_KEY}}'
|
||||
connections:
|
||||
success:
|
||||
- sales-team
|
||||
- support-team
|
||||
- billing-team
|
||||
- general-team
|
||||
```
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
### Multiple Models Router
|
||||
|
||||
```yaml
|
||||
model-selector-router:
|
||||
type: router
|
||||
name: "Model Selection Router"
|
||||
inputs:
|
||||
prompt: |
|
||||
Based on the task complexity, route to the appropriate model:
|
||||
- simple-gpt35: Simple questions, basic tasks
|
||||
- advanced-gpt4: Complex analysis, detailed reasoning
|
||||
- specialized-claude: Creative writing, nuanced analysis
|
||||
|
||||
Task: <start.task>
|
||||
Complexity indicators: <analyzer.complexity>
|
||||
model: gpt-4o-mini
|
||||
temperature: 0.1
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success:
|
||||
- simple-gpt35
|
||||
- advanced-gpt4
|
||||
- specialized-claude
|
||||
```
|
||||
|
||||
## Output References
|
||||
|
||||
Router blocks don't produce direct outputs but control workflow path:
|
||||
|
||||
```yaml
|
||||
# Router decisions affect which subsequent blocks execute
|
||||
# Access the routed block's outputs normally:
|
||||
final-step:
|
||||
inputs:
|
||||
routed-result: <routed-block-name.content>
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Provide clear routing criteria in the prompt
|
||||
- Use specific, descriptive target block names
|
||||
- Include examples of content for each routing path
|
||||
- Use lower temperature values for consistent routing
|
||||
- Test with diverse input types to ensure accurate routing
|
||||
- Consider fallback paths for edge cases
|
||||
183
apps/docs/content/docs/yaml/blocks/starter.mdx
Normal file
@@ -0,0 +1,183 @@
|
||||
---
|
||||
title: Starter Block YAML Schema
|
||||
description: YAML configuration reference for Starter blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [starter]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this starter block
|
||||
inputs:
|
||||
type: object
|
||||
properties:
|
||||
startWorkflow:
|
||||
type: string
|
||||
enum: [manual, webhook, schedule]
|
||||
description: How the workflow should be triggered
|
||||
default: manual
|
||||
inputFormat:
|
||||
type: array
|
||||
description: Expected input structure for API calls (manual workflows)
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Field name
|
||||
type:
|
||||
type: string
|
||||
enum: [string, number, boolean, object, array]
|
||||
description: Field type
|
||||
scheduleType:
|
||||
type: string
|
||||
enum: [hourly, daily, weekly, monthly]
|
||||
description: Schedule frequency (schedule workflows only)
|
||||
hourlyMinute:
|
||||
type: number
|
||||
minimum: 0
|
||||
maximum: 59
|
||||
description: Minute of the hour to run (hourly schedules)
|
||||
dailyTime:
|
||||
type: string
|
||||
pattern: "^([01]?[0-9]|2[0-3]):[0-5][0-9]$"
|
||||
description: Time of day to run in HH:MM format (daily schedules)
|
||||
weeklyDay:
|
||||
type: string
|
||||
enum: [MON, TUE, WED, THU, FRI, SAT, SUN]
|
||||
description: Day of week to run (weekly schedules)
|
||||
weeklyTime:
|
||||
type: string
|
||||
pattern: "^([01]?[0-9]|2[0-3]):[0-5][0-9]$"
|
||||
description: Time of day to run in HH:MM format (weekly schedules)
|
||||
monthlyDay:
|
||||
type: number
|
||||
minimum: 1
|
||||
maximum: 28
|
||||
description: Day of month to run (monthly schedules)
|
||||
monthlyTime:
|
||||
type: string
|
||||
pattern: "^([01]?[0-9]|2[0-3]):[0-5][0-9]$"
|
||||
description: Time of day to run in HH:MM format (monthly schedules)
|
||||
timezone:
|
||||
type: string
|
||||
description: Timezone for scheduled workflows
|
||||
default: UTC
|
||||
webhookProvider:
|
||||
type: string
|
||||
enum: [slack, gmail, airtable, telegram, generic, whatsapp, github, discord, stripe]
|
||||
description: Provider for webhook integration (webhook workflows only)
|
||||
webhookConfig:
|
||||
type: object
|
||||
description: Provider-specific webhook configuration
|
||||
connections:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID to execute when workflow starts
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
The starter block only has a success connection since it's the entry point:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID to execute when workflow starts
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Manual Start
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: next-block
|
||||
```
|
||||
|
||||
### Manual Start with Input Format
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
inputFormat:
|
||||
- name: query
|
||||
type: string
|
||||
- name: email
|
||||
type: string
|
||||
- name: age
|
||||
type: number
|
||||
- name: isActive
|
||||
type: boolean
|
||||
- name: preferences
|
||||
type: object
|
||||
- name: tags
|
||||
type: array
|
||||
connections:
|
||||
success: agent-1
|
||||
```
|
||||
|
||||
### Daily Schedule
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: daily
|
||||
dailyTime: "09:00"
|
||||
timezone: "America/New_York"
|
||||
connections:
|
||||
success: daily-task
|
||||
```
|
||||
|
||||
### Weekly Schedule
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: weekly
|
||||
weeklyDay: MON
|
||||
weeklyTime: "08:30"
|
||||
timezone: UTC
|
||||
connections:
|
||||
success: weekly-report
|
||||
```
|
||||
|
||||
### Webhook Trigger
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: webhook
|
||||
webhookProvider: slack
|
||||
webhookConfig:
|
||||
# Provider-specific configuration
|
||||
connections:
|
||||
success: process-webhook
|
||||
```
|
||||
278
apps/docs/content/docs/yaml/blocks/webhook.mdx
Normal file
@@ -0,0 +1,278 @@
|
||||
---
|
||||
title: Webhook Block YAML Schema
|
||||
description: YAML configuration reference for Webhook blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [webhook]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this webhook block
|
||||
inputs:
|
||||
type: object
|
||||
properties:
|
||||
webhookConfig:
|
||||
type: object
|
||||
description: Webhook configuration settings
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Whether the webhook is active
|
||||
default: true
|
||||
secret:
|
||||
type: string
|
||||
description: Secret key for webhook verification
|
||||
headers:
|
||||
type: array
|
||||
description: Expected headers for validation
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Expected header value
|
||||
methods:
|
||||
type: array
|
||||
description: Allowed HTTP methods
|
||||
items:
|
||||
type: string
|
||||
enum: [GET, POST, PUT, DELETE, PATCH]
|
||||
default: [POST]
|
||||
responseConfig:
|
||||
type: object
|
||||
description: Response configuration for the webhook
|
||||
properties:
|
||||
status:
|
||||
type: number
|
||||
description: HTTP status code to return
|
||||
default: 200
|
||||
minimum: 100
|
||||
maximum: 599
|
||||
headers:
|
||||
type: array
|
||||
description: Response headers
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
body:
|
||||
type: string
|
||||
description: Response body content
|
||||
connections:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID for successful webhook processing
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Connections define where the workflow goes based on webhook processing:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful processing
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Webhook Trigger
|
||||
|
||||
```yaml
|
||||
github-webhook:
|
||||
type: webhook
|
||||
name: "GitHub Webhook"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
secret: "{{GITHUB_WEBHOOK_SECRET}}"
|
||||
methods: [POST]
|
||||
headers:
|
||||
- key: "X-GitHub-Event"
|
||||
value: "push"
|
||||
responseConfig:
|
||||
status: 200
|
||||
body: |
|
||||
{
|
||||
"message": "Webhook received successfully",
|
||||
"timestamp": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-github-event
|
||||
error: webhook-error-handler
|
||||
```
|
||||
|
||||
### Slack Event Webhook
|
||||
|
||||
```yaml
|
||||
slack-events:
|
||||
type: webhook
|
||||
name: "Slack Events"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
secret: "{{SLACK_SIGNING_SECRET}}"
|
||||
methods: [POST]
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
responseConfig:
|
||||
status: 200
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"challenge": "<webhook.challenge>"
|
||||
}
|
||||
connections:
|
||||
success: handle-slack-event
|
||||
```
|
||||
|
||||
### Payment Webhook (Stripe)
|
||||
|
||||
```yaml
|
||||
stripe-webhook:
|
||||
type: webhook
|
||||
name: "Stripe Payment Webhook"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
secret: "{{STRIPE_WEBHOOK_SECRET}}"
|
||||
methods: [POST]
|
||||
headers:
|
||||
- key: "Stripe-Signature"
|
||||
value: "*"
|
||||
responseConfig:
|
||||
status: 200
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"received": true
|
||||
}
|
||||
connections:
|
||||
success: process-payment-event
|
||||
error: payment-webhook-error
|
||||
```
|
||||
|
||||
### Generic API Webhook
|
||||
|
||||
```yaml
|
||||
api-webhook:
|
||||
type: webhook
|
||||
name: "API Webhook"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
methods: [POST, PUT]
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
responseConfig:
|
||||
status: 202
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
- key: "X-Processed-By"
|
||||
value: "Sim Studio"
|
||||
body: |
|
||||
{
|
||||
"status": "accepted",
|
||||
"id": "{{Math.random().toString(36).substr(2, 9)}}",
|
||||
"received_at": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-webhook-data
|
||||
```
|
||||
|
||||
### Multi-Method Webhook
|
||||
|
||||
```yaml
|
||||
crud-webhook:
|
||||
type: webhook
|
||||
name: "CRUD Webhook"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
methods: [GET, POST, PUT, DELETE]
|
||||
headers:
|
||||
- key: "X-API-Key"
|
||||
value: "{{CRUD_API_KEY}}"
|
||||
responseConfig:
|
||||
status: 200
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"method": "<webhook.method>",
|
||||
"processed": true,
|
||||
"timestamp": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: route-by-method
|
||||
```
|
||||
|
||||
## Webhook Variables
|
||||
|
||||
Inside webhook-triggered workflows, these special variables are available:
|
||||
|
||||
```yaml
|
||||
# Available in blocks after the webhook
|
||||
<webhook.payload> # Full request payload/body
|
||||
<webhook.headers> # Request headers
|
||||
<webhook.method> # HTTP method used
|
||||
<webhook.query> # Query parameters
|
||||
<webhook.path> # Request path
|
||||
<webhook.challenge> # Challenge parameter (for verification)
|
||||
```
|
||||
|
||||
## Output References
|
||||
|
||||
After a webhook processes a request, you can reference its data:
|
||||
|
||||
```yaml
|
||||
# In subsequent blocks
|
||||
process-webhook:
|
||||
inputs:
|
||||
payload: <webhook-name.payload> # Request payload
|
||||
headers: <webhook-name.headers> # Request headers
|
||||
method: <webhook-name.method> # HTTP method
|
||||
```
|
||||
|
||||
## Security Best Practices
|
||||
|
||||
- Always use webhook secrets for verification
|
||||
- Validate expected headers and methods
|
||||
- Implement proper error handling
|
||||
- Use HTTPS endpoints in production
|
||||
- Monitor webhook activity and failures
|
||||
- Set appropriate response timeouts
|
||||
- Validate payload structure before processing
|
||||
299
apps/docs/content/docs/yaml/blocks/workflow.mdx
Normal file
@@ -0,0 +1,299 @@
|
||||
---
|
||||
title: Workflow Block YAML Schema
|
||||
description: YAML configuration reference for Workflow blocks
|
||||
---
|
||||
|
||||
## Schema Definition
|
||||
|
||||
```yaml
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
- inputs
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [workflow]
|
||||
description: Block type identifier
|
||||
name:
|
||||
type: string
|
||||
description: Display name for this workflow block
|
||||
inputs:
|
||||
type: object
|
||||
required:
|
||||
- workflowId
|
||||
properties:
|
||||
workflowId:
|
||||
type: string
|
||||
description: ID of the workflow to execute
|
||||
inputMapping:
|
||||
type: object
|
||||
description: Map current workflow data to sub-workflow inputs
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Input value or reference to parent workflow data
|
||||
environmentVariables:
|
||||
type: object
|
||||
description: Environment variables to pass to sub-workflow
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Environment variable value
|
||||
timeout:
|
||||
type: number
|
||||
description: Maximum execution time in milliseconds
|
||||
default: 300000
|
||||
minimum: 1000
|
||||
maximum: 1800000
|
||||
connections:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: string
|
||||
description: Target block ID for successful workflow completion
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Connection Configuration
|
||||
|
||||
Connections define where the workflow goes based on sub-workflow results:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful completion
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple Workflow Execution
|
||||
|
||||
```yaml
|
||||
data-processor:
|
||||
type: workflow
|
||||
name: "Data Processing Workflow"
|
||||
inputs:
|
||||
workflowId: "data-processing-v2"
|
||||
inputMapping:
|
||||
rawData: <start.input>
|
||||
userId: <user-validator.userId>
|
||||
environmentVariables:
|
||||
PROCESSING_MODE: "production"
|
||||
LOG_LEVEL: "info"
|
||||
connections:
|
||||
success: process-results
|
||||
error: workflow-error-handler
|
||||
```
|
||||
|
||||
### Content Generation Pipeline
|
||||
|
||||
```yaml
|
||||
content-generator:
|
||||
type: workflow
|
||||
name: "Content Generation Pipeline"
|
||||
inputs:
|
||||
workflowId: "content-generation-v3"
|
||||
inputMapping:
|
||||
topic: <start.topic>
|
||||
style: <style-analyzer.recommendedStyle>
|
||||
targetAudience: <audience-detector.audience>
|
||||
brandGuidelines: <brand-config.guidelines>
|
||||
environmentVariables:
|
||||
CONTENT_API_KEY: "{{CONTENT_API_KEY}}"
|
||||
QUALITY_THRESHOLD: "high"
|
||||
timeout: 120000
|
||||
connections:
|
||||
success: review-content
|
||||
error: content-generation-failed
|
||||
```
|
||||
|
||||
### Multi-Step Analysis Workflow
|
||||
|
||||
```yaml
|
||||
analysis-workflow:
|
||||
type: workflow
|
||||
name: "Analysis Workflow"
|
||||
inputs:
|
||||
workflowId: "comprehensive-analysis"
|
||||
inputMapping:
|
||||
document: <document-processor.content>
|
||||
analysisType: "comprehensive"
|
||||
includeMetrics: true
|
||||
outputFormat: "structured"
|
||||
environmentVariables:
|
||||
ANALYSIS_MODEL: "gpt-4o"
|
||||
OPENAI_API_KEY: "{{OPENAI_API_KEY}}"
|
||||
CLAUDE_API_KEY: "{{CLAUDE_API_KEY}}"
|
||||
connections:
|
||||
success: compile-analysis-report
|
||||
error: analysis-workflow-error
|
||||
```
|
||||
|
||||
### Conditional Workflow Execution
|
||||
|
||||
```yaml
|
||||
customer-workflow-router:
|
||||
type: condition
|
||||
name: "Customer Workflow Router"
|
||||
inputs:
|
||||
conditions:
|
||||
if: <customer-type.type> === "enterprise"
|
||||
else-if: <customer-type.type> === "premium"
|
||||
else: true
|
||||
connections:
|
||||
conditions:
|
||||
if: enterprise-workflow
|
||||
else-if: premium-workflow
|
||||
else: standard-workflow
|
||||
|
||||
enterprise-workflow:
|
||||
type: workflow
|
||||
name: "Enterprise Customer Workflow"
|
||||
inputs:
|
||||
workflowId: "enterprise-customer-processing"
|
||||
inputMapping:
|
||||
customerData: <customer-data.profile>
|
||||
accountManager: <account-assignment.manager>
|
||||
tier: "enterprise"
|
||||
environmentVariables:
|
||||
PRIORITY_LEVEL: "high"
|
||||
SLA_REQUIREMENTS: "strict"
|
||||
connections:
|
||||
success: enterprise-complete
|
||||
|
||||
premium-workflow:
|
||||
type: workflow
|
||||
name: "Premium Customer Workflow"
|
||||
inputs:
|
||||
workflowId: "premium-customer-processing"
|
||||
inputMapping:
|
||||
customerData: <customer-data.profile>
|
||||
supportLevel: "premium"
|
||||
environmentVariables:
|
||||
PRIORITY_LEVEL: "medium"
|
||||
connections:
|
||||
success: premium-complete
|
||||
|
||||
standard-workflow:
|
||||
type: workflow
|
||||
name: "Standard Customer Workflow"
|
||||
inputs:
|
||||
workflowId: "standard-customer-processing"
|
||||
inputMapping:
|
||||
customerData: <customer-data.profile>
|
||||
environmentVariables:
|
||||
PRIORITY_LEVEL: "standard"
|
||||
connections:
|
||||
success: standard-complete
|
||||
```
|
||||
|
||||
### Parallel Workflow Execution
|
||||
|
||||
```yaml
|
||||
parallel-workflows:
|
||||
type: parallel
|
||||
name: "Parallel Workflow Processing"
|
||||
inputs:
|
||||
parallelType: collection
|
||||
collection: |
|
||||
[
|
||||
{"workflowId": "sentiment-analysis", "focus": "sentiment"},
|
||||
{"workflowId": "topic-extraction", "focus": "topics"},
|
||||
{"workflowId": "entity-recognition", "focus": "entities"}
|
||||
]
|
||||
connections:
|
||||
success: merge-workflow-results
|
||||
|
||||
execute-analysis-workflow:
|
||||
type: workflow
|
||||
name: "Execute Analysis Workflow"
|
||||
parentId: parallel-workflows
|
||||
inputs:
|
||||
workflowId: <parallel.currentItem.workflowId>
|
||||
inputMapping:
|
||||
content: <start.content>
|
||||
analysisType: <parallel.currentItem.focus>
|
||||
environmentVariables:
|
||||
ANALYSIS_API_KEY: "{{ANALYSIS_API_KEY}}"
|
||||
connections:
|
||||
success: workflow-complete
|
||||
```
|
||||
|
||||
### Error Handling Workflow
|
||||
|
||||
```yaml
|
||||
main-workflow:
|
||||
type: workflow
|
||||
name: "Main Processing Workflow"
|
||||
inputs:
|
||||
workflowId: "main-processing-v1"
|
||||
inputMapping:
|
||||
data: <start.input>
|
||||
timeout: 180000
|
||||
connections:
|
||||
success: main-complete
|
||||
error: error-recovery-workflow
|
||||
|
||||
error-recovery-workflow:
|
||||
type: workflow
|
||||
name: "Error Recovery Workflow"
|
||||
inputs:
|
||||
workflowId: "error-recovery-v1"
|
||||
inputMapping:
|
||||
originalInput: <start.input>
|
||||
errorDetails: <main-workflow.error>
|
||||
failureTimestamp: "{{new Date().toISOString()}}"
|
||||
environmentVariables:
|
||||
RECOVERY_MODE: "automatic"
|
||||
FALLBACK_ENABLED: "true"
|
||||
connections:
|
||||
success: recovery-complete
|
||||
error: manual-intervention-required
|
||||
```
|
||||
|
||||
## Input Mapping
|
||||
|
||||
Map data from the parent workflow to the sub-workflow:
|
||||
|
||||
```yaml
|
||||
inputMapping:
|
||||
# Static values
|
||||
mode: "production"
|
||||
version: "1.0"
|
||||
|
||||
# References to parent workflow data
|
||||
userData: <user-processor.profile>
|
||||
settings: <config-loader.settings>
|
||||
|
||||
# Complex object mapping
|
||||
requestData:
|
||||
id: <start.requestId>
|
||||
timestamp: "{{new Date().toISOString()}}"
|
||||
source: "parent-workflow"
|
||||
```
|
||||
|
||||
## Output References
|
||||
|
||||
After a workflow block completes, you can reference its outputs:
|
||||
|
||||
```yaml
|
||||
# In subsequent blocks
|
||||
next-block:
|
||||
inputs:
|
||||
workflowResult: <workflow-name.output> # Sub-workflow output
|
||||
executionTime: <workflow-name.duration> # Execution duration
|
||||
status: <workflow-name.status> # Execution status
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Use descriptive workflow IDs for clarity
|
||||
- Map only necessary data to sub-workflows
|
||||
- Set appropriate timeouts for workflow complexity
|
||||
- Include error handling for robust execution
|
||||
- Pass environment variables securely
|
||||
- Test sub-workflows independently first
|
||||
- Monitor nested workflow performance
|
||||
- Use versioned workflow IDs for stability
|
||||
273
apps/docs/content/docs/yaml/examples.mdx
Normal file
@@ -0,0 +1,273 @@
|
||||
---
|
||||
title: YAML Workflow Examples
|
||||
description: Examples of complete YAML workflows
|
||||
---
|
||||
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
## Multi-Agent Chain Workflow
|
||||
|
||||
A workflow where multiple AI agents process information sequentially:
|
||||
|
||||
```yaml
|
||||
version: '1.0'
|
||||
blocks:
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: agent-1-initiator
|
||||
|
||||
agent-1-initiator:
|
||||
type: agent
|
||||
name: Agent 1 Initiator
|
||||
inputs:
|
||||
systemPrompt: You are the first agent in a chain. Your role is to analyze the input and create an initial response that will be passed to the next agent.
|
||||
userPrompt: |-
|
||||
Welcome! I'm the first agent in our chain.
|
||||
|
||||
Input to process: <start.input>
|
||||
|
||||
Please create an initial analysis or greeting that the next agent can build upon. Be creative and set a positive tone for the chain!
|
||||
model: gpt-4o
|
||||
temperature: 0.7
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: agent-2-enhancer
|
||||
|
||||
agent-2-enhancer:
|
||||
type: agent
|
||||
name: Agent 2 Enhancer
|
||||
inputs:
|
||||
systemPrompt: You are the second agent in a chain. Take the output from Agent 1 and enhance it with additional insights or improvements.
|
||||
userPrompt: |-
|
||||
I'm the second agent! Here's what Agent 1 provided:
|
||||
|
||||
<agent1initiator.content>
|
||||
|
||||
Now I'll enhance this with additional details, insights, or improvements. Let me build upon their work!
|
||||
model: gpt-4o
|
||||
temperature: 0.7
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: agent-3-refiner
|
||||
|
||||
agent-3-refiner:
|
||||
type: agent
|
||||
name: Agent 3 Refiner
|
||||
inputs:
|
||||
systemPrompt: You are the third agent in a chain. Take the enhanced output from Agent 2 and refine it further, adding structure or organization.
|
||||
userPrompt: |-
|
||||
I'm the third agent in our chain! Here's the enhanced work from Agent 2:
|
||||
|
||||
<agent2enhancer.content>
|
||||
|
||||
My job is to refine and organize this content. I'll add structure, clarity, and polish to make it even better!
|
||||
model: gpt-4o
|
||||
temperature: 0.6
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: agent-4-finalizer
|
||||
|
||||
agent-4-finalizer:
|
||||
type: agent
|
||||
name: Agent 4 Finalizer
|
||||
inputs:
|
||||
systemPrompt: You are the final agent in a chain of 4. Create a comprehensive summary and conclusion based on all the previous agents' work.
|
||||
userPrompt: |-
|
||||
I'm the final agent! Here's the refined work from Agent 3:
|
||||
|
||||
<agent3refiner.content>
|
||||
|
||||
As the last agent in our chain, I'll create a final, polished summary that brings together all the work from our team of 4 agents. Let me conclude this beautifully!
|
||||
model: gpt-4o
|
||||
temperature: 0.5
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
|
||||
## Router-Based Conditional Workflow
|
||||
|
||||
A workflow that uses routing logic to send data to different agents based on conditions:
|
||||
|
||||
```yaml
|
||||
version: '1.0'
|
||||
blocks:
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: router-1
|
||||
|
||||
router-1:
|
||||
type: router
|
||||
name: Router 1
|
||||
inputs:
|
||||
prompt: go to agent 1 if <start.input> is greater than 5. else agent 2 if greater than 10. else agent 3
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success:
|
||||
- agent-1
|
||||
- agent-2
|
||||
- agent-3
|
||||
|
||||
agent-1:
|
||||
type: agent
|
||||
name: Agent 1
|
||||
inputs:
|
||||
systemPrompt: say 1
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
|
||||
agent-2:
|
||||
type: agent
|
||||
name: Agent 2
|
||||
inputs:
|
||||
systemPrompt: say 2
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
|
||||
agent-3:
|
||||
type: agent
|
||||
name: Agent 3
|
||||
inputs:
|
||||
systemPrompt: say 3
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
|
||||
## Web Search with Structured Output
|
||||
|
||||
A workflow that searches the web using tools and returns structured data:
|
||||
|
||||
```yaml
|
||||
version: '1.0'
|
||||
blocks:
|
||||
59eb07c1-1411-4b28-a274-fa78f55daf72:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: d77c2c98-56c4-432d-9338-9bac54a2d42f
|
||||
d77c2c98-56c4-432d-9338-9bac54a2d42f:
|
||||
type: agent
|
||||
name: Agent 1
|
||||
inputs:
|
||||
systemPrompt: look up the user input. use structured output
|
||||
userPrompt: <start.input>
|
||||
model: claude-sonnet-4-0
|
||||
apiKey: '{{ANTHROPIC_API_KEY}}'
|
||||
tools:
|
||||
- type: exa
|
||||
title: Exa
|
||||
params:
|
||||
type: auto
|
||||
apiKey: '{{EXA_API_KEY}}'
|
||||
numResults: ''
|
||||
toolId: exa_search
|
||||
operation: exa_search
|
||||
isExpanded: true
|
||||
usageControl: auto
|
||||
responseFormat: |-
|
||||
{
|
||||
"name": "output_schema",
|
||||
"description": "Defines the structure for an output object.",
|
||||
"strict": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "The output value"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["output"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Loop Processing with Collection
|
||||
|
||||
A workflow that processes each item in a collection using a loop:
|
||||
|
||||
```yaml
|
||||
version: '1.0'
|
||||
blocks:
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: food-analysis-loop
|
||||
food-analysis-loop:
|
||||
type: loop
|
||||
name: Food Analysis Loop
|
||||
inputs:
|
||||
count: 5
|
||||
loopType: forEach
|
||||
collection: '["apple", "banana", "carrot"]'
|
||||
connections:
|
||||
loop:
|
||||
start: calorie-agent
|
||||
calorie-agent:
|
||||
type: agent
|
||||
name: Calorie Analyzer
|
||||
inputs:
|
||||
systemPrompt: Return the number of calories in the food
|
||||
userPrompt: <loop.currentItem>
|
||||
model: claude-sonnet-4-0
|
||||
apiKey: '{{ANTHROPIC_API_KEY}}'
|
||||
parentId: food-analysis-loop
|
||||
```
|
||||
|
||||
## Email Classification and Response
|
||||
|
||||
A workflow that classifies emails and generates appropriate responses:
|
||||
|
||||
```yaml
|
||||
version: '1.0'
|
||||
blocks:
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: email-classifier
|
||||
|
||||
email-classifier:
|
||||
type: agent
|
||||
name: Email Classifier
|
||||
inputs:
|
||||
systemPrompt: Classify emails into categories and extract key information.
|
||||
userPrompt: |
|
||||
Classify this email: <start.input>
|
||||
|
||||
Categories: support, billing, sales, feedback
|
||||
Extract: urgency level, customer sentiment, main request
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
connections:
|
||||
success: response-generator
|
||||
|
||||
response-generator:
|
||||
type: agent
|
||||
name: Response Generator
|
||||
inputs:
|
||||
systemPrompt: Generate appropriate responses based on email classification.
|
||||
userPrompt: |
|
||||
Email classification: <emailclassifier.content>
|
||||
Original email: <start.input>
|
||||
|
||||
Generate a professional, helpful response addressing the customer's needs.
|
||||
model: gpt-4o
|
||||
temperature: 0.7
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
159
apps/docs/content/docs/yaml/index.mdx
Normal file
@@ -0,0 +1,159 @@
|
||||
---
|
||||
title: YAML Workflow Reference
|
||||
description: Complete guide to writing YAML workflows in Sim Studio
|
||||
---
|
||||
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
|
||||
|
||||
YAML workflows provide a powerful way to define, version, and share workflow configurations in Sim Studio. This reference guide covers the complete YAML syntax, block schemas, and best practices for creating robust workflows.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Every Sim Studio workflow follows this basic structure:
|
||||
|
||||
```yaml
|
||||
version: '1.0'
|
||||
blocks:
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: agent-1
|
||||
|
||||
agent-1:
|
||||
type: agent
|
||||
name: "AI Assistant"
|
||||
inputs:
|
||||
systemPrompt: "You are a helpful assistant."
|
||||
userPrompt: 'Hi'
|
||||
model: gpt-4o
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
```
|
||||
|
||||
## Core Concepts
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Version Declaration</strong>: Must be exactly `version: '1.0'` (with quotes)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Blocks Structure</strong>: All workflow blocks are defined under the `blocks` key
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Block References</strong>: Use block names in lowercase with spaces removed (e.g., `<aiassistant.content>`)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Environment Variables</strong>: Reference with double curly braces `{{VARIABLE_NAME}}`
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Block Types
|
||||
|
||||
Sim Studio supports several core block types, each with specific YAML schemas:
|
||||
|
||||
<Cards>
|
||||
<Card title="Starter Block" href="/yaml/blocks/starter">
|
||||
Workflow entry point with support for manual, webhook, and scheduled triggers
|
||||
</Card>
|
||||
<Card title="Agent Block" href="/yaml/blocks/agent">
|
||||
AI-powered processing with support for tools and structured output
|
||||
</Card>
|
||||
<Card title="Function Block" href="/yaml/blocks/function">
|
||||
Custom JavaScript/TypeScript code execution
|
||||
</Card>
|
||||
<Card title="API Block" href="/yaml/blocks/api">
|
||||
HTTP requests to external services
|
||||
</Card>
|
||||
<Card title="Condition Block" href="/yaml/blocks/condition">
|
||||
Conditional branching based on boolean expressions
|
||||
</Card>
|
||||
<Card title="Router Block" href="/yaml/blocks/router">
|
||||
AI-powered intelligent routing to multiple paths
|
||||
</Card>
|
||||
<Card title="Loop Block" href="/yaml/blocks/loop">
|
||||
Iterative processing with for and forEach loops
|
||||
</Card>
|
||||
<Card title="Parallel Block" href="/yaml/blocks/parallel">
|
||||
Concurrent execution across multiple instances
|
||||
</Card>
|
||||
<Card title="Webhook Block" href="/yaml/blocks/webhook">
|
||||
Webhook triggers for external integrations
|
||||
</Card>
|
||||
<Card title="Evaluator Block" href="/yaml/blocks/evaluator">
|
||||
Validate outputs against defined criteria and metrics
|
||||
</Card>
|
||||
<Card title="Workflow Block" href="/yaml/blocks/workflow">
|
||||
Execute other workflows as reusable components
|
||||
</Card>
|
||||
<Card title="Response Block" href="/yaml/blocks/response">
|
||||
Final workflow output formatting
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Block Reference Syntax
|
||||
|
||||
The most critical aspect of YAML workflows is understanding how to reference data between blocks:
|
||||
|
||||
### Basic Rules
|
||||
|
||||
1. **Use the block name** (not the block ID) converted to lowercase with spaces removed
|
||||
2. **Add the appropriate property** (.content for agents, .output for tools)
|
||||
3. **When using chat, reference the starter block** as `<start.input>`
|
||||
|
||||
### Examples
|
||||
|
||||
```yaml
|
||||
# Block definitions
|
||||
email-processor:
|
||||
type: agent
|
||||
name: "Email Agent"
|
||||
# ... configuration
|
||||
|
||||
data-formatter:
|
||||
type: function
|
||||
name: "Data Agent"
|
||||
# ... configuration
|
||||
|
||||
# Referencing their outputs
|
||||
next-block:
|
||||
type: agent
|
||||
name: "Next Step"
|
||||
inputs:
|
||||
userPrompt: |
|
||||
Process this email: <emailagent.content>
|
||||
Use this formatted data: <dataagent.output>
|
||||
Original input: <start.input>
|
||||
```
|
||||
|
||||
### Special Cases
|
||||
|
||||
- **Loop Variables**: `<loop.index>`, `<loop.currentItem>`, `<loop.items>`
|
||||
- **Parallel Variables**: `<parallel.index>`, `<parallel.currentItem>`
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Use environment variables for sensitive data like API keys:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
database: '{{DATABASE_URL}}'
|
||||
token: '{{SLACK_BOT_TOKEN}}'
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Keep block names human-readable**: "Email Processor" for UI display
|
||||
- **Reference environment variables**: Never hardcode API keys
|
||||
- **Structure for readability**: Group related blocks logically
|
||||
- **Test incrementally**: Build workflows step by step
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [Block Reference Syntax](/yaml/block-reference) - Detailed reference rules
|
||||
- [Complete Block Schemas](/yaml/blocks) - All available block types
|
||||
- [Workflow Examples](/yaml/examples) - Real-world workflow patterns
|
||||
4
apps/docs/content/docs/yaml/meta.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "YAML Reference",
|
||||
"pages": ["index", "block-reference", "blocks", "examples"]
|
||||
}
|
||||
@@ -7,3 +7,25 @@ import { twMerge } from 'tailwind-merge'
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the full URL for an asset stored in Vercel Blob or local fallback
|
||||
* - If CDN is configured (NEXT_PUBLIC_BLOB_BASE_URL), uses CDN URL
|
||||
* - Otherwise falls back to local static assets served from root path
|
||||
*/
|
||||
export function getAssetUrl(filename: string) {
|
||||
const cdnBaseUrl = process.env.NEXT_PUBLIC_BLOB_BASE_URL
|
||||
if (cdnBaseUrl) {
|
||||
return `${cdnBaseUrl}/${filename}`
|
||||
}
|
||||
return `/${filename}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the full URL for a video asset stored in Vercel Blob or local fallback
|
||||
* - If CDN is configured (NEXT_PUBLIC_BLOB_BASE_URL), uses CDN URL
|
||||
* - Otherwise falls back to local static assets served from root path
|
||||
*/
|
||||
export function getVideoUrl(filename: string) {
|
||||
return getAssetUrl(filename)
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 88 KiB |
BIN
apps/docs/public/static/dark/schedule-dark.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
apps/docs/public/static/dark/schedule-disabled-dark.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
apps/docs/public/static/dark/scheduled-dark.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
apps/docs/public/static/dark/starter-dark.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
apps/docs/public/static/dark/webhook-dark.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 102 KiB |
BIN
apps/docs/public/static/light/schedule-disabled-light.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
apps/docs/public/static/light/schedule-light.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
apps/docs/public/static/light/scheduled-light.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
apps/docs/public/static/light/starter-light.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
apps/docs/public/static/light/webhook-light.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
2
apps/sim/.gitignore
vendored
@@ -50,3 +50,5 @@ next-env.d.ts
|
||||
|
||||
# Uploads
|
||||
/uploads
|
||||
|
||||
.trigger
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { GridPattern } from '../(landing)/components/grid-pattern'
|
||||
import { GridPattern } from '@/app/(landing)/components/grid-pattern'
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { client } from '@/lib/auth-client'
|
||||
import LoginPage from './login-form'
|
||||
import LoginPage from '@/app/(auth)/login/login-form'
|
||||
|
||||
vi.mock('next/navigation', () => ({
|
||||
useRouter: vi.fn(),
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { client } from '@/lib/auth-client'
|
||||
import { createLogger } from '@/lib/logs/console-logger'
|
||||
import { createLogger } from '@/lib/logs/console/logger'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { SocialLoginButtons } from '@/app/(auth)/components/social-login-buttons'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getOAuthProviderStatus } from '../components/oauth-provider-checker'
|
||||
import LoginForm from './login-form'
|
||||
import { getOAuthProviderStatus } from '@/app/(auth)/components/oauth-provider-checker'
|
||||
import LoginForm from '@/app/(auth)/login/login-form'
|
||||
|
||||
// Force dynamic rendering to avoid prerender errors with search params
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
@@ -11,8 +11,8 @@ import {
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from '@/components/ui/card'
|
||||
import { createLogger } from '@/lib/logs/console-logger'
|
||||
import { SetNewPasswordForm } from './reset-password-form'
|
||||
import { createLogger } from '@/lib/logs/console/logger'
|
||||
import { SetNewPasswordForm } from '@/app/(auth)/reset-password/reset-password-form'
|
||||
|
||||
const logger = createLogger('ResetPasswordPage')
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { env, isTruthy } from '@/lib/env'
|
||||
import { getOAuthProviderStatus } from '../components/oauth-provider-checker'
|
||||
import SignupForm from './signup-form'
|
||||
import { getOAuthProviderStatus } from '@/app/(auth)/components/oauth-provider-checker'
|
||||
import SignupForm from '@/app/(auth)/signup/signup-form'
|
||||
|
||||
// Force dynamic rendering to avoid prerender errors with search params
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
@@ -6,7 +6,7 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { client } from '@/lib/auth-client'
|
||||
import SignupPage from './signup-form'
|
||||
import SignupPage from '@/app/(auth)/signup/signup-form'
|
||||
|
||||
vi.mock('next/navigation', () => ({
|
||||
useRouter: vi.fn(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { env } from '@/lib/env'
|
||||
import { isProd } from '@/lib/environment'
|
||||
import { getBaseUrl } from '@/lib/urls/utils'
|
||||
import { VerifyContent } from './verify-content'
|
||||
import { VerifyContent } from '@/app/(auth)/verify/verify-content'
|
||||
|
||||
// Force dynamic rendering to avoid prerender errors with search params
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { client } from '@/lib/auth-client'
|
||||
import { env, isTruthy } from '@/lib/env'
|
||||
import { createLogger } from '@/lib/logs/console-logger'
|
||||
import { createLogger } from '@/lib/logs/console/logger'
|
||||
|
||||
const logger = createLogger('useVerification')
|
||||
|
||||
|
||||