mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 23:17:59 -05:00
fix(i18n): add additional youtube tools, sync i18n pipeline, remove dated docs (#1632)
This commit is contained in:
251
apps/docs/content/docs/de/blocks/guardrails.mdx
Normal file
251
apps/docs/content/docs/de/blocks/guardrails.mdx
Normal file
@@ -0,0 +1,251 @@
|
||||
---
|
||||
title: Guardrails
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { Image } from '@/components/ui/image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/guardrails.png"
|
||||
alt="Guardrails Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Overview
|
||||
|
||||
The Guardrails block enables you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Validation Types
|
||||
|
||||
### JSON Validation
|
||||
|
||||
Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate JSON responses from Agent blocks before parsing
|
||||
- Ensure API payloads are properly formatted
|
||||
- Check structured data integrity
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if valid JSON, `false` otherwise
|
||||
- `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...")
|
||||
|
||||
### Regex Validation
|
||||
|
||||
Checks if content matches a specified regular expression pattern.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate email addresses
|
||||
- Check phone number formats
|
||||
- Verify URLs or custom identifiers
|
||||
- Enforce specific text patterns
|
||||
|
||||
**Configuration:**
|
||||
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if content matches pattern, `false` otherwise
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
### Hallucination Detection
|
||||
|
||||
Uses Retrieval-Augmented Generation (RAG) with LLM scoring to detect when AI-generated content contradicts or isn't grounded in your knowledge base.
|
||||
|
||||
**How It Works:**
|
||||
1. Queries your knowledge base for relevant context
|
||||
2. Sends both the AI output and retrieved context to an LLM
|
||||
3. LLM assigns a confidence score (0-10 scale)
|
||||
- **0** = Full hallucination (completely ungrounded)
|
||||
- **10** = Fully grounded (completely supported by knowledge base)
|
||||
4. Validation passes if score ≥ threshold (default: 3)
|
||||
|
||||
**Configuration:**
|
||||
- **Knowledge Base**: Select from your existing knowledge bases
|
||||
- **Model**: Choose LLM for scoring (requires strong reasoning - GPT-4o, Claude 3.7 Sonnet recommended)
|
||||
- **API Key**: Authentication for selected LLM provider (auto-hidden for hosted/Ollama models)
|
||||
- **Confidence Threshold**: Minimum score to pass (0-10, default: 3)
|
||||
- **Top K** (Advanced): Number of knowledge base chunks to retrieve (default: 10)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if confidence score ≥ threshold
|
||||
- `score`: Confidence score (0-10)
|
||||
- `reasoning`: LLM's explanation for the score
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Validate Agent responses against documentation
|
||||
- Ensure customer support answers are factually accurate
|
||||
- Verify generated content matches source material
|
||||
- Quality control for RAG applications
|
||||
|
||||
### PII Detection
|
||||
|
||||
Detects personally identifiable information using Microsoft Presidio. Supports 40+ entity types across multiple countries and languages.
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
**How It Works:**
|
||||
1. Scans content for PII entities using pattern matching and NLP
|
||||
2. Returns detected entities with locations and confidence scores
|
||||
3. Optionally masks detected PII in the output
|
||||
|
||||
**Configuration:**
|
||||
- **PII Types to Detect**: Select from grouped categories via modal selector
|
||||
- **Common**: Person name, Email, Phone, Credit card, IP address, etc.
|
||||
- **USA**: SSN, Driver's license, Passport, etc.
|
||||
- **UK**: NHS number, National insurance number
|
||||
- **Spain**: NIF, NIE, CIF
|
||||
- **Italy**: Fiscal code, Driver's license, VAT code
|
||||
- **Poland**: PESEL, NIP, REGON
|
||||
- **Singapore**: NRIC/FIN, UEN
|
||||
- **Australia**: ABN, ACN, TFN, Medicare
|
||||
- **India**: Aadhaar, PAN, Passport, Voter number
|
||||
- **Mode**:
|
||||
- **Detect**: Only identify PII (default)
|
||||
- **Mask**: Replace detected PII with masked values
|
||||
- **Language**: Detection language (default: English)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `false` if any selected PII types are detected
|
||||
- `detectedEntities`: Array of detected PII with type, location, and confidence
|
||||
- `maskedText`: Content with PII masked (only if mode = "Mask")
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Block content containing sensitive personal information
|
||||
- Mask PII before logging or storing data
|
||||
- Compliance with GDPR, HIPAA, and other privacy regulations
|
||||
- Sanitize user inputs before processing
|
||||
|
||||
## Configuration
|
||||
|
||||
### Content to Validate
|
||||
|
||||
The input content to validate. This typically comes from:
|
||||
- Agent block outputs: `<agent.content>`
|
||||
- Function block results: `<function.output>`
|
||||
- API responses: `<api.output>`
|
||||
- Any other block output
|
||||
|
||||
### Validation Type
|
||||
|
||||
Choose from four validation types:
|
||||
- **Valid JSON**: Check if content is properly formatted JSON
|
||||
- **Regex Match**: Verify content matches a regex pattern
|
||||
- **Hallucination Check**: Validate against knowledge base with LLM scoring
|
||||
- **PII Detection**: Detect and optionally mask personally identifiable information
|
||||
|
||||
## Outputs
|
||||
|
||||
All validation types return:
|
||||
|
||||
- **`<guardrails.passed>`**: Boolean indicating if validation passed
|
||||
- **`<guardrails.validationType>`**: The type of validation performed
|
||||
- **`<guardrails.input>`**: The original input that was validated
|
||||
- **`<guardrails.error>`**: Error message if validation failed (optional)
|
||||
|
||||
Additional outputs by type:
|
||||
|
||||
**Hallucination Check:**
|
||||
- **`<guardrails.score>`**: Confidence score (0-10)
|
||||
- **`<guardrails.reasoning>`**: LLM's explanation
|
||||
|
||||
**PII Detection:**
|
||||
- **`<guardrails.detectedEntities>`**: Array of detected PII entities
|
||||
- **`<guardrails.maskedText>`**: Content with PII masked (if mode = "Mask")
|
||||
|
||||
## Example Use Cases
|
||||
|
||||
### Validate JSON Before Parsing
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Ensure Agent output is valid JSON</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates structured JSON response</li>
|
||||
<li>Guardrails validates JSON format</li>
|
||||
<li>Condition block checks `<guardrails.passed>`</li>
|
||||
<li>If passed → Parse and use data, If failed → Retry or handle error</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Prevent Hallucinations
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Validate customer support responses</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates response to customer question</li>
|
||||
<li>Guardrails checks against support documentation knowledge base</li>
|
||||
<li>If confidence score ≥ 3 → Send response</li>
|
||||
<li>If confidence score \< 3 → Flag for human review</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Block PII in User Inputs
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Sanitize user-submitted content</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>User submits form with text content</li>
|
||||
<li>Guardrails detects PII (emails, phone numbers, SSN, etc.)</li>
|
||||
<li>If PII detected → Reject submission or mask sensitive data</li>
|
||||
<li>If no PII → Process normally</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails-example.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
### Validate Email Format
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Check email address format</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent extracts email from text</li>
|
||||
<li>Guardrails validates with regex pattern</li>
|
||||
<li>If valid → Use email for notification</li>
|
||||
<li>If invalid → Request correction</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Chain with Condition blocks**: Use `<guardrails.passed>` to branch workflow logic based on validation results
|
||||
- **Use JSON validation before parsing**: Always validate JSON structure before attempting to parse LLM outputs
|
||||
- **Choose appropriate PII types**: Only select the PII entity types relevant to your use case for better performance
|
||||
- **Set reasonable confidence thresholds**: For hallucination detection, adjust threshold based on your accuracy requirements (higher = stricter)
|
||||
- **Use strong models for hallucination detection**: GPT-4o or Claude 3.7 Sonnet provide more accurate confidence scoring
|
||||
- **Mask PII for logging**: Use "Mask" mode when you need to log or store content that may contain PII
|
||||
- **Test regex patterns**: Validate your regex patterns thoroughly before deploying to production
|
||||
- **Monitor validation failures**: Track `<guardrails.error>` messages to identify common validation issues
|
||||
|
||||
<Callout type="info">
|
||||
Guardrails validation happens synchronously in your workflow. For hallucination detection, choose faster models (like GPT-4o-mini) if latency is critical.
|
||||
</Callout>
|
||||
|
||||
@@ -183,4 +183,39 @@ Verschiedene Abonnementpläne haben unterschiedliche Nutzungslimits:
|
||||
- Überprüfen Sie Ihre aktuelle Nutzung unter [Einstellungen → Abonnement](https://sim.ai/settings/subscription)
|
||||
- Erfahren Sie mehr über [Logging](/execution/logging), um Ausführungsdetails zu verfolgen
|
||||
- Erkunden Sie die [Externe API](/execution/api) für programmatische Kostenüberwachung
|
||||
- Sehen Sie sich [Workflow-Optimierungstechniken](/blocks) an, um Kosten zu reduzieren
|
||||
- Sehen Sie sich [Workflow-Optimierungstechniken](/blocks) an, um Kosten zu reduzieren
|
||||
|
||||
**Team-Plan (40 $/Sitz/Monat):**
|
||||
- Gemeinsame Nutzung für alle Teammitglieder
|
||||
- Überschreitung wird anhand der Gesamtnutzung des Teams berechnet
|
||||
- Organisationsinhaber erhält eine Rechnung
|
||||
|
||||
**Enterprise-Pläne:**
|
||||
- Fester monatlicher Preis, keine Überschreitungen
|
||||
- Benutzerdefinierte Nutzungslimits gemäß Vereinbarung
|
||||
|
||||
### Schwellenwertabrechnung
|
||||
|
||||
Wenn die nicht abgerechnete Überschreitung 50 $ erreicht, berechnet Sim automatisch den gesamten nicht abgerechneten Betrag.
|
||||
|
||||
**Beispiel:**
|
||||
- Tag 10: 70 $ Überschreitung → Sofortige Abrechnung von 70 $
|
||||
- Tag 15: Zusätzliche Nutzung von 35 $ (insgesamt 105 $) → Bereits abgerechnet, keine Aktion
|
||||
- Tag 20: Weitere Nutzung von 50 $ (insgesamt 155 $, 85 $ nicht abgerechnet) → Sofortige Abrechnung von 85 $
|
||||
|
||||
Dies verteilt hohe Überschreitungsgebühren über den Monat, anstatt eine große Rechnung am Ende des Abrechnungszeitraums zu stellen.
|
||||
|
||||
## Best Practices für Kostenmanagement
|
||||
|
||||
1. **Regelmäßige Überwachung**: Überprüfen Sie Ihr Nutzungs-Dashboard häufig, um Überraschungen zu vermeiden
|
||||
2. **Budgets festlegen**: Nutzen Sie Planlimits als Leitplanken für Ihre Ausgaben
|
||||
3. **Workflows optimieren**: Überprüfen Sie kostenintensive Ausführungen und optimieren Sie Prompts oder Modellauswahl
|
||||
4. **Geeignete Modelle verwenden**: Passen Sie die Modellkomplexität an die Aufgabenanforderungen an
|
||||
5. **Ähnliche Aufgaben bündeln**: Kombinieren Sie wenn möglich mehrere Anfragen, um den Overhead zu reduzieren
|
||||
|
||||
## Nächste Schritte
|
||||
|
||||
- Überprüfen Sie Ihre aktuelle Nutzung unter [Einstellungen → Abonnement](https://sim.ai/settings/subscription)
|
||||
- Erfahren Sie mehr über [Protokollierung](/execution/logging), um Ausführungsdetails zu verfolgen
|
||||
- Erkunden Sie die [externe API](/execution/api) für programmatische Kostenüberwachung
|
||||
- Sehen Sie sich [Workflow-Optimierungstechniken](/blocks) zur Kostenreduzierung an
|
||||
@@ -957,34 +957,6 @@ function StreamingWorkflow() {
|
||||
- Node.js 16+
|
||||
- TypeScript 5.0+ (for TypeScript projects)
|
||||
|
||||
## TypeScript Support
|
||||
|
||||
The SDK is written in TypeScript and provides full type safety:
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SimStudioClient,
|
||||
WorkflowExecutionResult,
|
||||
WorkflowStatus,
|
||||
SimStudioError
|
||||
} from 'simstudio-ts-sdk';
|
||||
|
||||
// Typsichere Client-Initialisierung
|
||||
const client: SimStudioClient = new SimStudioClient({
|
||||
apiKey: process.env.SIM_API_KEY!
|
||||
});
|
||||
|
||||
// Typsichere Workflow-Ausführung
|
||||
const result: WorkflowExecutionResult = await client.executeWorkflow('workflow-id', {
|
||||
input: {
|
||||
message: 'Hello, TypeScript!'
|
||||
}
|
||||
});
|
||||
|
||||
// Typsichere Statusprüfung
|
||||
const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
226
apps/docs/content/docs/de/tools/clay.mdx
Normal file
226
apps/docs/content/docs/de/tools/clay.mdx
Normal file
@@ -0,0 +1,226 @@
|
||||
---
|
||||
title: Clay
|
||||
description: Populate Clay workbook
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="clay"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'>
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#41B9FD'
|
||||
d=' M225.000000,1.000000 C227.042313,1.000000 229.084641,1.000000 231.903046,1.237045
|
||||
C233.981308,1.648251 235.283447,1.974177 236.585678,1.974532 C276.426849,1.985374 316.268005,1.964254 356.349304,2.036658
|
||||
C356.713806,2.242061 356.838165,2.358902 357.013062,2.696568 C357.361633,3.243123 357.659729,3.568854 358.029053,3.919451
|
||||
C358.100250,3.944317 358.064270,4.090822 358.043335,4.397895 C358.300018,5.454089 358.577637,6.203210 358.919647,7.420082
|
||||
C358.919891,27.877140 358.855774,47.866444 358.406097,67.910400 C355.200592,68.111740 352.380737,68.384270 349.560669,68.386124
|
||||
C311.434967,68.411194 273.308777,68.303810 235.184082,68.495499 C229.321579,68.524979 223.465759,69.888084 217.280884,70.633224
|
||||
C216.309952,70.742836 215.664993,70.853645 214.722351,70.824722 C211.834686,71.349052 209.244675,72.013123 206.377716,72.681381
|
||||
C205.743713,72.776283 205.386673,72.866997 204.740524,72.831818 C198.868668,74.719879 193.285919,76.733833 187.518951,78.776100
|
||||
C187.334747,78.804405 187.002716,78.975388 186.619080,78.955429 C183.339905,80.398605 180.444336,81.861732 177.450043,83.356339
|
||||
C177.351318,83.387817 177.199478,83.528885 176.863098,83.476791 C174.940445,84.544197 173.354172,85.663696 171.490601,86.873726
|
||||
C170.873749,87.151909 170.534180,87.339554 169.900208,87.480209 C169.065109,87.950676 168.524414,88.468132 167.772736,89.059799
|
||||
C167.561722,89.134003 167.180191,89.367592 166.874084,89.344360 C166.036011,89.874809 165.504074,90.428497 164.768677,91.071411
|
||||
C164.565247,91.160652 164.195068,91.406326 163.886719,91.361374 C162.847015,91.962418 162.115631,92.608421 161.328308,93.267891
|
||||
C161.272369,93.281357 161.208405,93.377022 160.867157,93.365463 C158.692642,94.907082 156.859375,96.460266 154.780716,98.176086
|
||||
C154.099411,98.731529 153.663513,99.124352 153.029877,99.558502 C152.562164,99.788048 152.505905,100.026695 152.411484,100.477333
|
||||
C151.745850,101.065102 151.332077,101.491318 150.666687,101.980057 C150.244827,102.329651 150.074554,102.616714 149.702332,103.025635
|
||||
C149.247330,103.342041 149.041901,103.578056 148.626404,103.921570 C148.191071,104.281303 148.013428,104.574989 147.660767,104.971512
|
||||
C147.485733,105.074348 147.185501,105.347694 146.854645,105.346924 C145.509140,106.645203 144.494507,107.944252 143.328308,109.398895
|
||||
C143.176773,109.554497 142.944397,109.921532 142.688324,109.990189 C142.263062,110.355179 142.093887,110.651512 141.672485,111.133896
|
||||
C140.733337,112.108200 140.046402,112.896461 139.056610,113.710732 C138.269180,114.554047 137.784592,115.371346 137.263580,116.208557
|
||||
C137.227158,116.228470 137.222885,116.311386 136.910522,116.418571 C134.917343,118.573212 133.067978,120.505791 131.581848,122.685951
|
||||
C117.236908,143.729858 109.909592,167.062012 108.797867,192.458298 C106.874710,236.390839 120.176277,274.069336 154.210175,303.200592
|
||||
C157.543198,306.053497 161.524918,308.148560 165.395065,310.715118 C165.584625,310.834839 166.004089,310.993286 166.112747,311.305908
|
||||
C169.421280,313.480804 172.621170,315.343109 176.067993,317.436401 C196.154831,328.754059 217.585236,333.047546 240.138840,332.968475
|
||||
C276.608368,332.840607 313.078613,332.912872 349.548553,332.932007 C352.369659,332.933472 355.190643,333.181519 358.042847,333.756317
|
||||
C358.105377,352.504913 358.140625,370.812134 358.166443,389.119385 C358.179047,398.047455 357.157593,399.080383 348.101379,399.081543
|
||||
C309.488556,399.086456 270.875702,399.088837 232.262939,399.034698 C229.118195,399.030304 225.976639,398.454163 222.828934,398.396088
|
||||
C219.876633,398.341614 216.918152,398.621979 213.655640,398.750488 C212.946808,398.674561 212.544739,398.603149 211.932861,398.249359
|
||||
C205.139450,396.920532 198.555878,395.874084 191.660583,394.785370 C190.959366,394.590973 190.569855,394.438812 189.976242,394.044556
|
||||
C188.751892,393.631897 187.731628,393.461365 186.520462,393.271667 C186.329559,393.252502 185.966660,393.127686 185.711517,392.875610
|
||||
C179.817810,390.901337 174.179230,389.179169 168.376038,387.422913 C168.211411,387.388824 167.919205,387.222443 167.713623,386.935791
|
||||
C163.177170,384.926636 158.846298,383.204132 154.354828,381.442505 C154.194229,381.403320 153.913010,381.229431 153.720596,380.940063
|
||||
C150.958603,379.507599 148.389023,378.364502 145.862350,377.112976 C145.905273,377.004486 145.834991,377.222992 145.696899,376.907410
|
||||
C143.278778,375.470276 140.998734,374.348724 138.546249,373.152405 C138.373810,373.077606 138.071228,372.854553 137.964508,372.539856
|
||||
C136.491272,371.591217 135.124771,370.957306 133.835419,370.230103 C133.912552,370.136810 133.731659,370.297668 133.638489,369.968719
|
||||
C130.257477,367.557678 126.969620,365.475616 123.676697,363.365906 C123.671616,363.338226 123.618034,363.355438 123.527176,363.037048
|
||||
C122.530983,362.219849 121.625641,361.721039 120.554291,361.141144 C120.388283,361.060028 120.099663,360.829254 120.012115,360.507904
|
||||
C116.854935,357.864441 113.785301,355.542328 110.448624,353.088013 C109.480820,352.261383 108.780060,351.566956 108.005241,350.545807
|
||||
C106.569366,349.183838 105.207550,348.148560 103.618164,346.953125 C102.887856,346.250793 102.385124,345.708649 101.851944,344.819275
|
||||
C99.227608,341.972198 96.633736,339.472412 93.829559,336.814728 C93.315529,336.231140 93.011803,335.805389 92.626633,335.113678
|
||||
C92.241318,334.653351 91.937447,334.458984 91.470352,334.116333 C91.113121,333.744141 90.954285,333.497589 90.815475,332.884094
|
||||
C89.432999,331.125000 88.065689,329.710205 86.750458,328.261658 C86.802551,328.227905 86.679573,328.244812 86.625587,328.004700
|
||||
C86.408173,327.453064 86.154968,327.258301 85.840820,327.092529 C85.869644,327.004852 85.792236,327.175934 85.788193,326.847412
|
||||
C85.086029,325.775726 84.387909,325.032593 83.748154,324.192444 C83.806519,324.095428 83.656967,324.265442 83.677109,323.924805
|
||||
C82.691200,322.493195 81.685143,321.402222 80.701370,320.271667 C80.723648,320.232025 80.638077,320.262756 80.664627,319.911865
|
||||
C79.348137,317.824493 78.005081,316.088074 76.632942,314.335297 C76.603851,314.318970 76.610863,314.252594 76.569603,314.015747
|
||||
C76.383919,313.466492 76.145622,313.265167 75.849998,313.133301 C75.886536,313.091675 75.786301,313.138794 75.787926,312.843567
|
||||
C75.413757,312.136780 75.037964,311.725281 74.650452,311.296570 C74.638725,311.279388 74.605232,311.254669 74.648026,310.925659
|
||||
C74.042847,309.802277 73.394867,309.007935 72.848984,308.101166 C72.951088,307.988739 72.736649,308.207153 72.749344,307.902405
|
||||
C72.247162,307.034119 71.732277,306.470612 71.116684,305.727478 C71.015976,305.547882 70.879890,305.159210 70.904739,304.782593
|
||||
C66.198082,293.805145 61.429871,283.220459 56.753250,272.595459 C54.901436,268.388306 53.253181,264.091522 51.402115,259.538025
|
||||
C51.225922,258.823547 51.159870,258.406525 51.280235,257.681335 C50.130058,252.530197 48.793461,247.687271 47.372990,242.549011
|
||||
C47.250717,241.846664 47.212318,241.439667 47.345688,240.702484 C46.854862,237.196991 46.192276,234.021698 45.439560,230.551788
|
||||
C45.308647,229.849213 45.267864,229.441223 45.399055,228.679535 C45.646000,226.680176 45.810993,225.032898 45.781715,223.389099
|
||||
C45.543224,209.998566 45.243523,196.609085 45.021889,183.218307 C44.965343,179.801880 45.121227,176.381912 45.183868,172.656006
|
||||
C45.260223,171.945328 45.332214,171.542252 45.692661,170.944855 C46.379547,167.156143 46.777977,163.561768 47.196243,159.658173
|
||||
C47.326954,158.952240 47.437832,158.555511 47.816860,157.951569 C48.405701,156.819183 48.802628,155.912750 49.035774,154.966003
|
||||
C53.321564,137.562775 58.709690,120.561356 67.075592,104.614586 C68.431061,102.030846 69.442665,99.266708 70.700943,96.329689
|
||||
C70.963600,95.758194 71.138519,95.442963 71.626465,95.023987 C72.881813,93.185463 73.824142,91.450684 74.833984,89.540924
|
||||
C74.901497,89.365936 75.115746,89.058022 75.414856,88.950439 C76.055374,88.124435 76.396790,87.406006 76.808441,86.516800
|
||||
C76.878685,86.346008 77.099190,86.049721 77.426208,85.968033 C78.773079,84.202591 79.792938,82.518845 80.906425,80.889481
|
||||
C81.000053,80.943871 80.811523,80.846413 81.112083,80.718071 C81.899254,79.675362 82.385872,78.760994 82.980141,77.647797
|
||||
C83.256111,77.193130 83.468399,76.981361 83.972061,76.695953 C84.379341,76.259384 84.539192,75.940521 84.777573,75.467239
|
||||
C84.856110,75.312813 85.091125,75.058212 85.387177,74.957954 C86.071411,74.171829 86.459602,73.485962 86.959831,72.547165
|
||||
C87.574921,71.763893 88.077972,71.233551 88.917511,70.614960 C90.438446,68.934166 91.622894,67.341637 92.892502,65.577087
|
||||
C92.977646,65.405067 93.223930,65.110596 93.540451,65.035034 C94.925735,63.668842 95.994484,62.378204 97.037460,61.053047
|
||||
C97.011688,61.018532 97.086418,61.061367 97.418701,60.997078 C100.387512,58.135143 103.024048,55.337498 105.840828,52.291214
|
||||
C107.274651,50.972633 108.528229,49.902691 110.120842,48.821507 C111.324287,47.898228 112.188705,46.986183 113.028954,46.039188
|
||||
C113.004784,46.004234 113.069771,46.059036 113.418266,46.038719 C115.379044,44.556744 116.991333,43.095085 118.618896,41.600952
|
||||
C118.634186,41.568470 118.705971,41.569565 118.943619,41.531807 C119.496582,41.345333 119.686287,41.099613 119.875092,40.861622
|
||||
C119.999825,40.966347 119.751175,40.750431 120.085175,40.695145 C121.552383,39.660774 122.685600,38.681686 123.971207,37.539024
|
||||
C124.353516,37.180477 124.609665,37.030270 125.248093,36.934944 C127.105858,35.720867 128.607605,34.496674 130.284821,33.157169
|
||||
C130.460281,33.041859 130.850082,32.885620 131.191956,32.879478 C132.720169,31.979248 133.906525,31.085161 135.242615,30.070633
|
||||
C135.392365,29.950191 135.742935,29.792681 136.116943,29.797058 C144.044449,25.665834 151.597931,21.530237 159.443359,17.267967
|
||||
C160.335373,16.929420 160.935471,16.717543 161.932648,16.610218 C166.284805,15.022083 170.239853,13.329394 174.481018,11.497526
|
||||
C175.179947,11.265512 175.592758,11.172676 176.284058,11.232684 C181.045059,9.931384 185.527557,8.477241 190.283020,6.942632
|
||||
C190.929428,6.798172 191.302902,6.734176 192.106628,6.758037 C200.661499,5.630559 208.799301,4.494970 216.903397,3.155535
|
||||
C219.646088,2.702227 222.303574,1.733297 225.000000,1.000000 z'
|
||||
/>
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#CF207F'
|
||||
d=' M139.359467,113.684723 C140.046402,112.896461 140.733337,112.108200 141.935272,111.074768
|
||||
C142.614975,110.526917 142.779678,110.224220 142.944397,109.921524 C142.944397,109.921532 143.176773,109.554497 143.635193,109.340279
|
||||
C145.124252,107.866608 146.154877,106.607147 147.185501,105.347694 C147.185501,105.347694 147.485733,105.074348 147.925735,104.915680
|
||||
C148.538528,104.456520 148.711319,104.156021 148.884109,103.855530 C149.041901,103.578056 149.247330,103.342041 149.974884,103.098984
|
||||
C150.636948,103.055161 150.824478,103.059845 151.047058,103.134651 C151.082077,103.204781 151.296890,103.193550 151.296890,103.193550
|
||||
C151.296890,103.193550 151.065384,103.011589 151.060242,102.733826 C151.009506,102.276550 150.963913,102.097046 150.918304,101.917534
|
||||
C151.332077,101.491318 151.745850,101.065102 152.635773,100.460251 C153.111908,100.281609 153.497894,100.049179 153.789368,100.038872
|
||||
C154.772659,99.452271 155.464478,98.875984 156.408234,98.117584 C157.490311,97.320854 158.320465,96.706223 159.411987,96.018272
|
||||
C160.091385,95.613731 160.509415,95.282509 161.005707,94.693756 C161.125443,94.083160 161.166931,93.730095 161.208405,93.377022
|
||||
C161.208405,93.377022 161.272369,93.281357 161.637833,93.283844 C162.733887,92.659668 163.464478,92.032997 164.195068,91.406326
|
||||
C164.195068,91.406326 164.565247,91.160652 165.074371,91.083725 C166.115738,90.460403 166.647964,89.913994 167.180191,89.367592
|
||||
C167.180191,89.367592 167.561722,89.134003 168.067535,89.083694 C169.113785,88.531319 169.654205,88.029266 170.194611,87.527206
|
||||
C170.534180,87.339554 170.873749,87.151909 171.836243,86.913345 C174.039276,85.751251 175.619370,84.640068 177.199478,83.528885
|
||||
C177.199478,83.528885 177.351318,83.387817 177.799438,83.385483 C179.820572,82.883362 181.393585,82.383591 183.170273,81.808777
|
||||
C183.633362,81.599014 183.861649,81.423775 184.373871,81.123398 C185.491287,80.703987 186.293686,80.369202 187.361908,79.991440
|
||||
C188.096588,79.696411 188.565445,79.444366 189.280243,79.140625 C189.689667,79.052353 189.853149,79.015762 190.210281,78.900085
|
||||
C190.651642,78.688210 190.867310,78.515427 191.369507,78.235207 C192.110519,78.067825 192.532990,77.967896 193.244263,77.853729
|
||||
C194.045349,77.588539 194.557632,77.337585 195.404114,77.018097 C196.821823,76.607903 197.905350,76.266235 199.266159,75.907867
|
||||
C200.036407,75.656876 200.529373,75.422592 201.364365,75.106812 C202.827423,74.692017 203.948425,74.358734 205.380356,74.019363
|
||||
C206.468277,73.766235 207.245285,73.519203 208.389984,73.226074 C209.493317,73.091133 210.228912,73.002289 211.290283,72.935577
|
||||
C212.412201,72.683113 213.208344,72.408524 214.267502,72.100060 C214.705307,72.039871 214.880112,72.013565 215.424881,71.999588
|
||||
C217.201248,71.734070 218.607666,71.456200 220.413910,71.153488 C221.880417,71.070969 222.947083,71.013298 224.279190,71.170303
|
||||
C226.068039,70.992416 227.591461,70.599854 229.423401,70.196625 C230.143173,70.169228 230.554443,70.152512 231.313034,70.332619
|
||||
C235.115021,70.382599 238.569687,70.235756 242.491425,70.087082 C280.953430,70.102844 318.948334,70.120430 357.053223,70.529343
|
||||
C357.455536,73.045441 357.992554,75.169182 358.001373,77.295113 C358.070374,93.940338 358.043671,110.585976 358.034363,127.231491
|
||||
C358.030548,134.046967 358.016937,134.057816 351.099701,134.059860 C310.817535,134.071823 270.534180,133.934753 230.254730,134.268967
|
||||
C225.246338,134.310516 220.258575,136.842316 215.230850,138.283905 C215.200439,138.347610 215.065262,138.306870 214.806305,138.286804
|
||||
C214.115921,138.505325 213.684479,138.743896 213.009598,139.115082 C212.583405,139.275208 212.400635,139.302734 211.833679,139.280731
|
||||
C208.407166,140.913559 205.364853,142.595886 202.282257,144.308472 C202.241974,144.338730 202.168381,144.269897 201.973877,144.345428
|
||||
C201.529541,144.568588 201.364868,144.781921 201.061798,145.322937 C200.647766,145.713150 200.457306,145.841385 199.948059,145.977448
|
||||
C197.417572,147.954681 195.205872,149.924103 192.993881,151.942596 C192.993607,151.991669 192.895477,151.990555 192.549149,152.015503
|
||||
C187.409988,154.769379 184.238312,158.680161 183.252487,164.111267 C183.188980,163.991821 183.294250,164.239044 182.950150,164.345627
|
||||
C180.427338,169.367905 177.154861,174.103409 176.308884,179.238663 C174.781265,188.511490 174.320831,198.014923 174.115677,207.437317
|
||||
C173.843521,219.937164 178.269516,231.196472 184.901489,241.604797 C185.796005,243.008667 187.567444,243.853790 188.990707,244.966980
|
||||
C189.048599,244.976334 189.032700,245.092545 189.039658,245.443787 C189.760330,247.068161 190.225784,248.594147 191.225662,249.575775
|
||||
C202.884888,261.022064 217.215424,267.483948 233.244598,267.746521 C272.873535,268.395599 312.520477,268.025818 352.159454,267.873199
|
||||
C356.777344,267.855408 358.164368,269.300385 358.106323,273.876007 C357.865570,292.859802 357.967224,311.847900 357.480347,330.882874
|
||||
C338.906525,330.962463 320.795410,331.052429 302.684601,331.010834 C276.765686,330.951324 250.846970,330.795715 224.637268,330.524200
|
||||
C223.236160,330.268494 222.125992,330.169708 220.602966,330.058136 C219.095612,329.927734 218.001114,329.810120 216.705780,329.546783
|
||||
C216.025055,329.282104 215.545151,329.163147 214.711487,329.008087 C213.887634,328.910431 213.417526,328.848877 212.660461,328.610291
|
||||
C211.246506,328.304504 210.119537,328.175751 208.744629,328.011780 C208.333069,327.943604 208.169434,327.910645 207.938263,327.637787
|
||||
C207.248444,327.303284 206.626129,327.208649 205.594803,327.076263 C204.102722,326.877716 203.019669,326.716858 201.800995,326.447266
|
||||
C201.471100,326.205719 201.260620,326.107544 200.685684,325.968201 C199.212677,325.508331 198.087952,325.124298 196.745544,324.584839
|
||||
C196.008286,324.314789 195.488724,324.200195 194.630951,324.040466 C193.850174,323.890259 193.407623,323.785156 192.841400,323.544250
|
||||
C192.535934,323.239014 192.330688,323.105682 192.067078,322.987274 C192.032166,322.966125 191.968018,322.915680 191.729294,322.721558
|
||||
C190.699036,322.352661 189.907501,322.177887 188.818344,321.917145 C188.322571,321.773010 188.124420,321.714844 187.806183,321.529083
|
||||
C187.508530,321.243896 187.309464,321.121094 186.809235,320.966248 C186.343460,320.853546 186.157333,320.807709 185.820770,320.618958
|
||||
C185.449020,320.300232 185.201187,320.178223 184.579239,320.017242 C183.123337,319.463867 182.015015,319.003296 180.807480,318.445465
|
||||
C180.565079,318.228424 180.407501,318.132172 179.911469,317.900696 C178.706055,317.357391 177.824753,316.972839 176.813736,316.472290
|
||||
C176.496887,316.208344 176.292038,316.091339 175.768234,315.863037 C174.296906,315.078705 173.126801,314.436676 171.834732,313.642029
|
||||
C171.530289,313.298096 171.319397,313.146332 170.800644,312.938660 C170.334427,312.781097 170.147659,312.718903 169.839874,312.529358
|
||||
C169.543640,312.242981 169.349289,312.112366 168.837830,311.854187 C167.694580,311.463196 166.849335,311.228241 166.004089,310.993286
|
||||
C166.004089,310.993286 165.584625,310.834839 165.340561,310.390503 C163.548645,308.481201 162.131165,306.841003 160.433350,305.577545
|
||||
C135.450775,286.986084 120.418205,262.047058 113.761909,231.918289 C110.147652,215.558807 109.790779,198.967697 111.782127,182.339249
|
||||
C113.832611,165.216965 118.597160,148.944382 127.160858,133.886154 C130.497955,128.018265 133.867905,122.169083 137.222885,116.311386
|
||||
C137.222885,116.311386 137.227158,116.228470 137.540863,116.214661 C138.211945,116.106445 138.569351,116.012032 139.062988,115.851028
|
||||
C139.427094,115.546883 139.469406,115.275383 139.372986,114.756676 C139.495758,114.250427 139.475632,113.964195 139.359467,113.684723 z'
|
||||
/>
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#FFC947'
|
||||
d=' M200.266830,145.969620 C200.457306,145.841385 200.647766,145.713150 201.270264,145.275589
|
||||
C201.994553,144.826004 202.149918,144.593887 202.168381,144.269897 C202.168381,144.269897 202.241974,144.338730 202.627762,144.274597
|
||||
C206.081650,142.583710 209.149765,140.956970 212.217880,139.330231 C212.400635,139.302734 212.583405,139.275208 213.260132,139.131683
|
||||
C214.191147,138.779388 214.628204,138.543121 215.065262,138.306854 C215.065262,138.306870 215.200439,138.347610 215.615753,138.262543
|
||||
C222.236084,137.117767 228.435684,135.178802 234.646988,135.140549 C276.033936,134.885590 317.423431,135.036758 358.812073,135.055969
|
||||
C358.822845,178.409409 358.833618,221.762833 358.350433,265.618347 C317.222778,266.132172 276.588776,266.228516 235.955917,266.054840
|
||||
C230.533264,266.031647 225.031219,265.015839 219.714111,263.807587 C207.453613,261.021515 197.827393,253.684341 189.032700,245.092545
|
||||
C189.032700,245.092545 189.048599,244.976334 188.932205,244.635071 C178.652054,231.033371 175.024597,215.782471 175.030136,199.385284
|
||||
C175.034317,187.007950 178.389404,175.448639 183.294250,164.239044 C183.294250,164.239044 183.188980,163.991821 183.536774,163.962189
|
||||
C186.888184,159.951889 189.891830,155.971222 192.895477,151.990555 C192.895477,151.990555 192.993607,151.991669 193.307098,151.842606
|
||||
C195.835999,149.785568 198.051407,147.877594 200.266830,145.969620 z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Clay](https://www.clay.com/) is a data enrichment and workflow automation platform that helps teams streamline lead generation, research, and data operations through powerful integrations and flexible inputs.
|
||||
|
||||
Learn how to use the Clay Tool in Sim to seamlessly insert data into a Clay workbook through webhook triggers. This tutorial walks you through setting up a webhook, configuring data mapping, and automating real-time updates to your Clay workbooks. Perfect for streamlining lead generation and data enrichment directly from your workflow!
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/cx_75X5sI_s"
|
||||
title="Clay Integration with Sim"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
With Clay, you can:
|
||||
|
||||
- **Enrich agent outputs**: Automatically feed your Sim agent data into Clay tables for structured tracking and analysis
|
||||
- **Trigger workflows via webhooks**: Use Clay’s webhook support to initiate Sim agent tasks from within Clay
|
||||
- **Leverage data loops**: Seamlessly iterate over enriched data rows with agents that operate across dynamic datasets
|
||||
|
||||
In Sim, the Clay integration allows your agents to push structured data into Clay tables via webhooks. This makes it easy to collect, enrich, and manage dynamic outputs such as leads, research summaries, or action items—all in a collaborative, spreadsheet-like interface. Your agents can populate rows in real time, enabling asynchronous workflows where AI-generated insights are captured, reviewed, and used by your team. Whether you're automating research, enriching CRM data, or tracking operational outcomes, Clay becomes a living data layer that interacts intelligently with your agents. By connecting Sim with Clay, you gain a powerful way to operationalize agent results, loop over datasets with precision, and maintain a clean, auditable record of AI-driven work.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Clay into the workflow. Can populate a table with data.
|
||||
|
||||
## Tools
|
||||
|
||||
### `clay_populate`
|
||||
|
||||
Populate Clay with data from a JSON file. Enables direct communication and notifications with timestamp tracking and channel confirmation.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookURL` | string | Yes | The webhook URL to populate |
|
||||
| `data` | json | Yes | The data to populate |
|
||||
| `authToken` | string | Yes | Auth token for Clay webhook authentication |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | json | Clay populate operation results including response data from Clay webhook |
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `clay`
|
||||
98
apps/docs/content/docs/de/tools/huggingface.mdx
Normal file
98
apps/docs/content/docs/de/tools/huggingface.mdx
Normal file
File diff suppressed because one or more lines are too long
@@ -60,10 +60,10 @@ Suche nach ähnlichen Inhalten in einer Wissensdatenbank mittels Vektorähnlichk
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `knowledgeBaseId` | string | Ja | ID der zu durchsuchenden Wissensdatenbank |
|
||||
| `knowledgeBaseId` | string | Ja | ID der Wissensdatenbank, in der gesucht werden soll |
|
||||
| `query` | string | Nein | Suchanfragentext \(optional bei Verwendung von Tag-Filtern\) |
|
||||
| `topK` | number | Nein | Anzahl der ähnlichsten Ergebnisse, die zurückgegeben werden sollen \(1-100\) |
|
||||
| `tagFilters` | any | Nein | Array von Tag-Filtern mit tagName- und tagValue-Eigenschaften |
|
||||
| `tagFilters` | array | Nein | Array von Tag-Filtern mit tagName- und tagValue-Eigenschaften |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
|
||||
219
apps/docs/content/docs/de/tools/stagehand.mdx
Normal file
219
apps/docs/content/docs/de/tools/stagehand.mdx
Normal file
@@ -0,0 +1,219 @@
|
||||
---
|
||||
title: Stagehand Extract
|
||||
description: Extract data from websites
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="stagehand"
|
||||
color="#FFC83C"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 108 159'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d='M15 26C22.8234 31.822 23.619 41.405 25.3125 50.3867C25.8461 53.1914 26.4211 55.9689 27.0625 58.75C27.7987 61.9868 28.4177 65.2319 29 68.5C29.332 70.3336 29.6653 72.1669 30 74C30.1418 74.7863 30.2836 75.5727 30.4297 76.3828C31.8011 83.2882 33.3851 90.5397 39.4375 94.75C40.3405 95.3069 40.3405 95.3069 41.2617 95.875C43.8517 97.5512 45.826 99.826 48 102C50.6705 102.89 52.3407 103.143 55.0898 103.211C55.8742 103.239 56.6586 103.268 57.4668 103.297C59.1098 103.349 60.7531 103.393 62.3965 103.43C65.8896 103.567 68.4123 103.705 71.5664 105.289C73 107 73 107 73 111C73.66 111 74.32 111 75 111C74.0759 106.912 74.0759 106.912 71.4766 103.828C67.0509 102.348 62.3634 102.64 57.7305 102.609C52.3632 102.449 49.2783 101.537 45 98C41.8212 94.0795 41.5303 90.9791 42 86C44.9846 83.0154 48.2994 83.6556 52.3047 83.6289C53.139 83.6199 53.9734 83.6108 54.833 83.6015C56.6067 83.587 58.3805 83.5782 60.1543 83.5745C62.8304 83.5627 65.5041 83.5137 68.1797 83.4629C81.1788 83.34 91.8042 85.3227 102 94C106.37 100.042 105.483 106.273 104.754 113.406C103.821 119.026 101.968 124.375 100.125 129.75C99.8806 130.471 99.6361 131.193 99.3843 131.936C97.7783 136.447 95.9466 140.206 93 144C92.34 144 91.68 144 91 144C91 144.66 91 145.32 91 146C79.0816 156.115 63.9798 156.979 49 156C36.6394 154.226 26.7567 148.879 19 139C11.0548 125.712 11.6846 105.465 11.3782 90.4719C11.0579 77.4745 8.03411 64.8142 5.4536 52.1135C5.04373 50.0912 4.64233 48.0673 4.24218 46.043C4.00354 44.8573 3.7649 43.6716 3.51903 42.45C2.14425 33.3121 2.14425 33.3121 4.87499 29.125C8.18297 25.817 10.3605 25.4542 15 26Z'
|
||||
fill='#FDFDFD'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.8466 2.96604 96.2332 5.08365 97.6091 9.03564C99.203 14.0664 99.4412 18.7459 99.4414 23.9922C99.4538 24.9285 99.4663 25.8647 99.4791 26.8294C99.5049 28.8198 99.5247 30.8103 99.539 32.8008C99.5785 37.9693 99.6682 43.1369 99.7578 48.3047C99.7747 49.3188 99.7917 50.3328 99.8091 51.3776C99.9603 59.6066 100.323 67.7921 100.937 76C101.012 77.0582 101.087 78.1163 101.164 79.2065C101.646 85.1097 102.203 90.3442 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C25.0719 148.361 24.1437 147.721 23.1875 147.062C8.32968 133.054 9.60387 109.231 8.73413 90.3208C8.32766 81.776 7.51814 73.4295 5.99999 65C5.82831 64.0338 5.65662 63.0675 5.47973 62.072C4.98196 59.3363 4.46395 56.6053 3.93749 53.875C3.76412 52.9572 3.59074 52.0394 3.4121 51.0938C2.75101 47.6388 2.11387 44.3416 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C4.91881 25.5668 6.78357 24.117 11.25 23.6875C15.8364 24.0697 17.5999 24.9021 21 28C24.7763 34.3881 26.047 41.2626 27.1875 48.5C27.5111 50.4693 27.8377 52.4381 28.168 54.4062C28.3733 55.695 28.3733 55.695 28.5828 57.0098C28.8087 58.991 28.8087 58.991 30 60C30.3171 59.4947 30.6342 58.9894 30.9609 58.4688C33.1122 55.4736 34.7097 53.3284 38.3789 52.3945C44.352 52.203 48.1389 53.6183 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C54.4089 51.8676 55.9015 50.8075 59 49C63.8651 48.104 66.9348 48.3122 71.1487 51.0332C72.0896 51.6822 73.0305 52.3313 74 53C73.9686 51.2986 73.9686 51.2986 73.9365 49.5627C73.8636 45.3192 73.818 41.0758 73.7803 36.8318C73.7603 35.0016 73.733 33.1715 73.6982 31.3415C73.6492 28.6976 73.6269 26.0545 73.6094 23.4102C73.5887 22.6035 73.5681 21.7969 73.5468 20.9658C73.5441 13.8444 75.5121 7.83341 80.25 2.4375C83.9645 0.495841 86.8954 0.209055 91 0.999996ZM3.99999 30C1.56925 34.8615 3.215 40.9393 4.24218 46.043C4.37061 46.6927 4.49905 47.3424 4.63137 48.0118C5.03968 50.0717 5.45687 52.1296 5.87499 54.1875C11.1768 80.6177 11.1768 80.6177 11.4375 93.375C11.7542 120.78 11.7542 120.78 23.5625 144.375C28.5565 149.002 33.5798 151.815 40 154C40.6922 154.244 41.3844 154.487 42.0977 154.738C55.6463 158.576 72.4909 156.79 84.8086 150.316C87.0103 148.994 89.0458 147.669 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C97.1202 138.98 99.3206 133.053 101.25 126.937C101.505 126.174 101.76 125.41 102.023 124.623C104.94 115.65 107.293 104.629 103.625 95.625C96.3369 88.3369 86.5231 83.6919 76.1988 83.6088C74.9905 83.6226 74.9905 83.6226 73.7578 83.6367C72.9082 83.6362 72.0586 83.6357 71.1833 83.6352C69.4034 83.6375 67.6235 83.6472 65.8437 83.6638C63.1117 83.6876 60.3806 83.6843 57.6484 83.6777C55.9141 83.6833 54.1797 83.6904 52.4453 83.6992C51.6277 83.6983 50.81 83.6974 49.9676 83.6964C45.5122 83.571 45.5122 83.571 42 86C41.517 90.1855 41.733 92.4858 43.6875 96.25C46.4096 99.4871 48.6807 101.674 53.0105 102.282C55.3425 102.411 57.6645 102.473 60 102.5C69.8847 102.612 69.8847 102.612 74 106C74.8125 108.687 74.8125 108.688 75 111C74.34 111 73.68 111 73 111C72.8969 110.216 72.7937 109.432 72.6875 108.625C72.224 105.67 72.224 105.67 69 104C65.2788 103.745 61.5953 103.634 57.8672 103.609C51.1596 103.409 46.859 101.691 41.875 97C41.2562 96.34 40.6375 95.68 40 95C39.175 94.4637 38.35 93.9275 37.5 93.375C30.9449 87.1477 30.3616 77.9789 29.4922 69.418C29.1557 66.1103 29.1557 66.1103 28.0352 63.625C26.5234 59.7915 26.1286 55.8785 25.5625 51.8125C23.9233 38.3 23.9233 38.3 17 27C11.7018 24.3509 7.9915 26.1225 3.99999 30Z'
|
||||
fill='#1F1F1F'
|
||||
/>
|
||||
<path
|
||||
d='M89.0976 2.53906C91 3 91 3 93.4375 5.3125C96.1586 9.99276 96.178 14.1126 96.2461 19.3828C96.2778 21.1137 96.3098 22.8446 96.342 24.5754C96.3574 25.4822 96.3728 26.3889 96.3887 27.3232C96.6322 41.3036 96.9728 55.2117 98.3396 69.1353C98.9824 75.7746 99.0977 82.3308 99 89C96.5041 88.0049 94.0126 87.0053 91.5351 85.9648C90.3112 85.4563 90.3112 85.4563 89.0625 84.9375C87.8424 84.4251 87.8424 84.4251 86.5976 83.9023C83.7463 82.9119 80.9774 82.4654 78 82C76.7702 65.9379 75.7895 49.8907 75.7004 33.7775C75.6919 32.3138 75.6783 30.8501 75.6594 29.3865C75.5553 20.4082 75.6056 12.1544 80.6875 4.4375C83.6031 2.62508 85.7 2.37456 89.0976 2.53906Z'
|
||||
fill='#FBFBFB'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.99 13.495 97.99 13.495 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.646 85.1082 102.203 90.3434 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C24.6078 148.041 24.6078 148.041 23.1875 147.062C13.5484 137.974 10.832 124.805 9.99999 112C9.91815 101.992 10.4358 91.9898 11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C28.854 148.273 33.89 150.868 40 153C40.6935 153.245 41.387 153.49 42.1016 153.742C56.9033 157.914 73.8284 155.325 87 148C88.3301 147.327 89.6624 146.658 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C100.044 130.286 105.786 114.602 104 99C102.157 94.9722 100.121 93.0631 96.3125 90.875C95.5042 90.398 94.696 89.9211 93.8633 89.4297C85.199 85.1035 78.1558 84.4842 68.5 84.3125C67.2006 84.2783 65.9012 84.2442 64.5625 84.209C61.3751 84.127 58.1879 84.0577 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.8637 87.6094 98.8637 87.6094 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#262114'
|
||||
/>
|
||||
<path
|
||||
d='M68 51C72.86 54.06 74.644 56.5072 76 62C76.249 65.2763 76.2347 68.5285 76.1875 71.8125C76.1868 72.6833 76.1862 73.554 76.1855 74.4512C76.1406 80.8594 76.1406 80.8594 75 82C73.5113 82.0867 72.0185 82.107 70.5273 82.0976C69.6282 82.0944 68.7291 82.0912 67.8027 82.0879C66.8572 82.0795 65.9117 82.0711 64.9375 82.0625C63.9881 82.058 63.0387 82.0535 62.0605 82.0488C59.707 82.037 57.3535 82.0205 55 82C53.6352 77.2188 53.738 72.5029 53.6875 67.5625C53.6585 66.6208 53.6295 65.6792 53.5996 64.709C53.5591 60.2932 53.5488 57.7378 55.8945 53.9023C59.5767 50.5754 63.1766 50.211 68 51Z'
|
||||
fill='#F8F8F8'
|
||||
/>
|
||||
<path
|
||||
d='M46 55C48.7557 57.1816 50.4359 58.8718 52 62C52.0837 63.5215 52.1073 65.0466 52.0977 66.5703C52.0944 67.4662 52.0912 68.3621 52.0879 69.2852C52.0795 70.2223 52.0711 71.1595 52.0625 72.125C52.058 73.0699 52.0535 74.0148 52.0488 74.9883C52.037 77.3256 52.0206 79.6628 52 82C50.9346 82.1992 50.9346 82.1992 49.8477 82.4023C48.9286 82.5789 48.0094 82.7555 47.0625 82.9375C46.146 83.1115 45.2294 83.2855 44.2852 83.4648C42.0471 83.7771 42.0471 83.7771 41 85C40.7692 86.3475 40.5885 87.7038 40.4375 89.0625C40.2931 90.3619 40.1487 91.6613 40 93C37 92 37 92 35.8672 90.1094C35.5398 89.3308 35.2123 88.5522 34.875 87.75C34.5424 86.9817 34.2098 86.2134 33.8672 85.4219C31.9715 80.1277 31.7884 75.065 31.75 69.5C31.7294 68.7536 31.7087 68.0073 31.6875 67.2383C31.6551 62.6607 32.0474 59.7266 35 56C38.4726 54.2637 42.2119 54.3981 46 55Z'
|
||||
fill='#FAFAFA'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.66 13.33 98.32 13.66 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.566 84.1265 102.275 88.3364 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C75.0451 84.5473 73.8012 84.5086 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C66.6624 84.317 66.6624 84.317 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9091 88.0729 98.8182 87.1458 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#423B28'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C88.074 3.7122 85.8483 3.51695 83 4C79.1128 7.37574 78.178 11.0991 77 16C76.8329 18.5621 76.7615 21.1317 76.7695 23.6992C76.77 24.4155 76.7704 25.1318 76.7709 25.8698C76.7739 27.3783 76.7817 28.8868 76.7942 30.3953C76.8123 32.664 76.8147 34.9324 76.8144 37.2012C76.8329 44.6001 77.0765 51.888 77.7795 59.259C78.1413 63.7564 78.1068 68.2413 78.0625 72.75C78.058 73.6498 78.0535 74.5495 78.0488 75.4766C78.0373 77.6511 78.0193 79.8255 78 82C78.99 82.495 78.99 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.495 83.01 46.495 83.01 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.0544 77.9997 75.0939 75.0005 75.125 72C75.1418 71.1608 75.1585 70.3216 75.1758 69.457C75.2185 63.9475 74.555 59.2895 73 54C73.66 54 74.32 54 75 54C74.9314 53.2211 74.8629 52.4422 74.7922 51.6396C74.1158 43.5036 73.7568 35.4131 73.6875 27.25C73.644 25.5194 73.644 25.5194 73.5996 23.7539C73.5376 15.3866 74.6189 8.85069 80.25 2.4375C83.9433 0.506911 86.9162 0.173322 91 0.999996Z'
|
||||
fill='#131311'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.97965 28.9369 5.97965 28.9369 3.99999 32C3.67226 36.9682 4.31774 41.4911 5.27733 46.3594C5.40814 47.0304 5.53894 47.7015 5.67371 48.3929C5.94892 49.7985 6.22723 51.2035 6.50854 52.6079C6.93887 54.7569 7.35989 56.9075 7.77929 59.0586C9.09359 66.104 9.09359 66.104 11 73C11.0836 75.2109 11.1073 77.4243 11.0976 79.6367C11.0944 80.9354 11.0912 82.2342 11.0879 83.5723C11.0795 84.944 11.0711 86.3158 11.0625 87.6875C11.0575 89.071 11.0529 90.4544 11.0488 91.8379C11.037 95.2253 11.0206 98.6126 11 102C8.54975 99.5498 8.73228 98.8194 8.65624 95.4492C8.62812 94.53 8.60001 93.6108 8.57104 92.6638C8.54759 91.6816 8.52415 90.6994 8.49999 89.6875C8.20265 81.3063 7.58164 73.2485 5.99999 65C5.67135 63.2175 5.34327 61.435 5.01562 59.6523C4.31985 55.9098 3.62013 52.1681 2.90233 48.4297C2.75272 47.6484 2.60311 46.867 2.44897 46.062C1.99909 43.8187 1.99909 43.8187 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C6.06003 24.1839 8.81126 23.4843 15 24Z'
|
||||
fill='#2A2311'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C30.0569 149.404 36.9894 152.617 45 154C42 156 42 156 39.4375 156C29.964 153.244 20.8381 146.677 16 138C8.26993 120.062 9.92611 101.014 11 82Z'
|
||||
fill='#272214'
|
||||
/>
|
||||
<path
|
||||
d='M68 49C70.3478 50.1116 71.9703 51.3346 74 53C73.34 53.66 72.68 54.32 72 55C71.505 54.505 71.01 54.01 70.5 53.5C67.6718 51.8031 65.3662 51.5622 62.0976 51.4062C58.4026 52.4521 57.1992 53.8264 55 57C54.3826 61.2861 54.5302 65.4938 54.6875 69.8125C54.7101 70.9823 54.7326 72.1521 54.7559 73.3574C54.8147 76.2396 54.8968 79.1191 55 82C54.01 82 53.02 82 52 82C51.9854 81.4203 51.9708 80.8407 51.9558 80.2434C51.881 77.5991 51.7845 74.9561 51.6875 72.3125C51.6649 71.4005 51.6424 70.4885 51.6191 69.5488C51.4223 64.6292 51.2621 60.9548 48 57C45.6603 55.8302 44.1661 55.8339 41.5625 55.8125C40.78 55.7983 39.9976 55.7841 39.1914 55.7695C36.7079 55.8591 36.7079 55.8591 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C55.6091 48.544 61.7788 47.8649 68 49Z'
|
||||
fill='#1F1A0F'
|
||||
/>
|
||||
<path
|
||||
d='M99 60C99.33 60 99.66 60 100 60C100.05 60.7865 100.1 61.573 100.152 62.3833C100.385 65.9645 100.63 69.5447 100.875 73.125C100.954 74.3625 101.032 75.6 101.113 76.875C101.197 78.0738 101.281 79.2727 101.367 80.5078C101.44 81.6075 101.514 82.7073 101.589 83.8403C102.013 87.1 102.94 89.8988 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C74.4231 84.5279 74.4231 84.5279 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C67.3166 84.3363 66.0082 84.2977 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9162 87.912 98.8324 86.8241 98.7461 85.7031C98.1266 77.012 97.9127 68.6814 99 60Z'
|
||||
fill='#332E22'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.2818 29.7267 4.15499 31.2727 3.18749 35.8125C3.12562 36.8644 3.06374 37.9163 2.99999 39C2.33999 39 1.67999 39 0.999992 39C0.330349 31.2321 0.330349 31.2321 3.37499 27.5625C7.31431 23.717 9.51597 23.543 15 24Z'
|
||||
fill='#1D180A'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C85.4345 3.33492 85.4345 3.33491 80.6875 5.75C78.5543 9.85841 77.6475 13.9354 76.7109 18.4531C76.4763 19.2936 76.2417 20.1341 76 21C75.34 21.33 74.68 21.66 74 22C73.5207 15.4102 74.5846 10.6998 78 5C81.755 0.723465 85.5463 -0.103998 91 0.999996Z'
|
||||
fill='#16130D'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C42.5569 93.7631 43.1137 94.5263 43.6875 95.3125C46.4238 98.4926 48.7165 100.679 53.0105 101.282C55.3425 101.411 57.6646 101.473 60 101.5C70.6207 101.621 70.6207 101.621 75 106C75.0406 107.666 75.0427 109.334 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C65.3044 104.833 61.615 104.703 57.916 104.658C52.1631 104.454 48.7484 103.292 44 100C41.5625 97.25 41.5625 97.25 40 95C40.66 95 41.32 95 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#2B2B2B'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.1682 86.6079 12.3287 91.216 12.4822 95.8245C12.5354 97.3909 12.5907 98.9574 12.6482 100.524C12.7306 102.78 12.8055 105.036 12.8789 107.293C12.9059 107.989 12.933 108.685 12.9608 109.402C13.0731 113.092 12.9015 116.415 12 120C11.67 120 11.34 120 11 120C9.63778 112.17 10.1119 104.4 10.4375 96.5C10.4908 95.0912 10.5436 93.6823 10.5957 92.2734C10.7247 88.8487 10.8596 85.4243 11 82Z'
|
||||
fill='#4D483B'
|
||||
/>
|
||||
<path
|
||||
d='M43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C52 59 52 59 50 60C49.5256 59.34 49.0512 58.68 48.5625 58C45.2656 55.4268 43.184 55.5955 39.1211 55.6641C36.7043 55.8955 36.7043 55.8955 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586Z'
|
||||
fill='#221F16'
|
||||
/>
|
||||
<path
|
||||
d='M76 73C76.33 73 76.66 73 77 73C77 75.97 77 78.94 77 82C78.485 82.495 78.485 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.33 83.34 46.66 82.68 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.33 78.36 75.66 75.72 76 73Z'
|
||||
fill='#040404'
|
||||
/>
|
||||
<path
|
||||
d='M27 54C27.33 54 27.66 54 28 54C28.33 56.97 28.66 59.94 29 63C29.99 63 30.98 63 32 63C32 66.96 32 70.92 32 75C31.01 74.67 30.02 74.34 29 74C28.8672 73.2523 28.7344 72.5047 28.5977 71.7344C28.421 70.7495 28.2444 69.7647 28.0625 68.75C27.8885 67.7755 27.7144 66.8009 27.5352 65.7969C27.0533 63.087 27.0533 63.087 26.4062 60.8125C25.8547 58.3515 26.3956 56.4176 27 54Z'
|
||||
fill='#434039'
|
||||
/>
|
||||
<path
|
||||
d='M78 5C78.99 5.33 79.98 5.66 81 6C80.3194 6.92812 80.3194 6.92812 79.625 7.875C77.7233 11.532 77.1555 14.8461 76.5273 18.8906C76.3533 19.5867 76.1793 20.2828 76 21C75.34 21.33 74.68 21.66 74 22C73.5126 15.2987 74.9229 10.9344 78 5Z'
|
||||
fill='#2A2313'
|
||||
/>
|
||||
<path
|
||||
d='M12 115C12.99 115.495 12.99 115.495 14 116C14.5334 118.483 14.9326 120.864 15.25 123.375C15.3531 124.061 15.4562 124.747 15.5625 125.453C16.0763 129.337 16.2441 130.634 14 134C12.6761 127.57 11.752 121.571 12 115Z'
|
||||
fill='#2F2C22'
|
||||
/>
|
||||
<path
|
||||
d='M104 95C107 98 107 98 107.363 101.031C107.347 102.176 107.33 103.321 107.312 104.5C107.309 105.645 107.305 106.789 107.301 107.969C107 111 107 111 105 114C104.67 107.73 104.34 101.46 104 95Z'
|
||||
fill='#120F05'
|
||||
/>
|
||||
<path
|
||||
d='M56 103C58.6048 102.919 61.2071 102.86 63.8125 102.812C64.5505 102.787 65.2885 102.762 66.0488 102.736C71.4975 102.662 71.4975 102.662 74 104.344C75.374 106.619 75.2112 108.396 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C66.7956 104.77 64.5861 104.589 62.375 104.438C61.1865 104.354 59.998 104.27 58.7734 104.184C57.4006 104.093 57.4006 104.093 56 104C56 103.67 56 103.34 56 103Z'
|
||||
fill='#101010'
|
||||
/>
|
||||
<path
|
||||
d='M23 40C23.66 40 24.32 40 25 40C27.3084 46.3482 27.1982 52.2948 27 59C26.67 59 26.34 59 26 59C25.01 52.73 24.02 46.46 23 40Z'
|
||||
fill='#191409'
|
||||
/>
|
||||
<path
|
||||
d='M47 83C46.3606 83.3094 45.7212 83.6187 45.0625 83.9375C41.9023 87.0977 42.181 90.6833 42 95C41.01 94.67 40.02 94.34 39 94C39.3463 85.7409 39.3463 85.7409 41.875 82.875C44 82 44 82 47 83Z'
|
||||
fill='#171717'
|
||||
/>
|
||||
<path
|
||||
d='M53 61C53.33 61 53.66 61 54 61C54.33 67.93 54.66 74.86 55 82C54.01 82 53.02 82 52 82C52.33 75.07 52.66 68.14 53 61Z'
|
||||
fill='#444444'
|
||||
/>
|
||||
<path
|
||||
d='M81 154C78.6696 156.33 77.8129 156.39 74.625 156.75C73.4687 156.897 73.4687 156.897 72.2891 157.047C69.6838 156.994 68.2195 156.317 66 155C67.7478 154.635 69.4984 154.284 71.25 153.938C72.7118 153.642 72.7118 153.642 74.2031 153.34C76.8681 153.016 78.4887 153.145 81 154Z'
|
||||
fill='#332F23'
|
||||
/>
|
||||
<path
|
||||
d='M19 28C19.66 28 20.32 28 21 28C21.6735 29.4343 22.3386 30.8726 23 32.3125C23.5569 33.5133 23.5569 33.5133 24.125 34.7383C25 37 25 37 25 40C22 39 22 39 21.0508 37.2578C20.8071 36.554 20.5635 35.8502 20.3125 35.125C20.0611 34.4263 19.8098 33.7277 19.5508 33.0078C19 31 19 31 19 28Z'
|
||||
fill='#282213'
|
||||
/>
|
||||
<path
|
||||
d='M102 87C104.429 93.2857 104.429 93.2857 103 97C100.437 94.75 100.437 94.75 98 92C98.0625 89.75 98.0625 89.75 99 88C101 87 101 87 102 87Z'
|
||||
fill='#37301F'
|
||||
/>
|
||||
<path
|
||||
d='M53 56C53.33 56 53.66 56 54 56C53.67 62.27 53.34 68.54 53 75C52.67 75 52.34 75 52 75C51.7788 72.2088 51.5726 69.4179 51.375 66.625C51.3105 65.8309 51.2461 65.0369 51.1797 64.2188C51.0394 62.1497 51.0124 60.0737 51 58C51.66 57.34 52.32 56.68 53 56Z'
|
||||
fill='#030303'
|
||||
/>
|
||||
<path
|
||||
d='M100 129C100.33 129 100.66 129 101 129C100.532 133.776 99.7567 137.045 97 141C96.34 140.67 95.68 140.34 95 140C96.65 136.37 98.3 132.74 100 129Z'
|
||||
fill='#1E1A12'
|
||||
/>
|
||||
<path
|
||||
d='M15 131C17.7061 132.353 17.9618 133.81 19.125 136.562C19.4782 137.389 19.8314 138.215 20.1953 139.066C20.4609 139.704 20.7264 140.343 21 141C20.01 141 19.02 141 18 141C15.9656 137.27 15 135.331 15 131Z'
|
||||
fill='#1C1912'
|
||||
/>
|
||||
<path
|
||||
d='M63 49C69.4 49.4923 69.4 49.4923 72.4375 52.0625C73.2109 53.0216 73.2109 53.0216 74 54C70.8039 54 69.5828 53.4533 66.8125 52C66.0971 51.6288 65.3816 51.2575 64.6445 50.875C64.1018 50.5863 63.5591 50.2975 63 50C63 49.67 63 49.34 63 49Z'
|
||||
fill='#13110C'
|
||||
/>
|
||||
<path
|
||||
d='M0.999992 39C1.98999 39 2.97999 39 3.99999 39C5.24999 46.625 5.24999 46.625 2.99999 50C2.33999 46.37 1.67999 42.74 0.999992 39Z'
|
||||
fill='#312C1E'
|
||||
/>
|
||||
<path
|
||||
d='M94 5C94.66 5 95.32 5 96 5C97.8041 7.75924 98.0127 8.88972 97.625 12.25C97.4187 13.1575 97.2125 14.065 97 15C95.1161 11.7345 94.5071 8.71888 94 5Z'
|
||||
fill='#292417'
|
||||
/>
|
||||
<path
|
||||
d='M20 141C23.3672 142.393 24.9859 143.979 27 147C24.625 146.812 24.625 146.812 22 146C20.6875 143.438 20.6875 143.438 20 141Z'
|
||||
fill='#373328'
|
||||
/>
|
||||
<path
|
||||
d='M86 83C86.33 83.99 86.66 84.98 87 86C83.37 85.34 79.74 84.68 76 84C80.3553 81.8223 81.4663 81.9696 86 83Z'
|
||||
fill='#2F2F2F'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C46 97.625 46 97.625 46 101C44.02 99.35 42.04 97.7 40 96C40.66 95.67 41.32 95.34 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#232323'
|
||||
/>
|
||||
<path
|
||||
d='M34 55C34.66 55.33 35.32 55.66 36 56C35.5256 56.7838 35.0512 57.5675 34.5625 58.375C33.661 59.8895 32.7882 61.4236 32 63C31.34 63 30.68 63 30 63C30.4983 59.3125 31.1007 57.3951 34 55Z'
|
||||
fill='#110F0A'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Stagehand](https://stagehand.com) is a tool that allows you to extract structured data from webpages using Browserbase and OpenAI.
|
||||
|
||||
With Stagehand, you can:
|
||||
|
||||
- **Extract structured data**: Extract structured data from webpages using Browserbase and OpenAI
|
||||
- **Save data to a database**: Save the extracted data to a database
|
||||
- **Automate workflows**: Automate workflows to extract data from webpages
|
||||
|
||||
In Sim, the Stagehand integration enables your agents to extract structured data from webpages using Browserbase and OpenAI. This allows for powerful automation scenarios such as data extraction, data analysis, and data integration. Your agents can extract structured data from webpages, save the extracted data to a database, and automate workflows to extract data from webpages. This integration bridges the gap between your AI workflows and your data management system, enabling seamless data extraction and integration. By connecting Sim with Stagehand, you can automate data extraction processes, maintain up-to-date information repositories, generate reports, and organize information intelligently - all through your intelligent agents.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Stagehand into the workflow. Can extract structured data from webpages.
|
||||
|
||||
## Tools
|
||||
|
||||
### `stagehand_extract`
|
||||
|
||||
Extract structured data from a webpage using Stagehand
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `url` | string | Yes | URL of the webpage to extract data from |
|
||||
| `instruction` | string | Yes | Instructions for extraction |
|
||||
| `apiKey` | string | Yes | OpenAI API key for extraction \(required by Stagehand\) |
|
||||
| `schema` | json | Yes | JSON schema defining the structure of the data to extract |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | object | Extracted structured data matching the provided schema |
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `stagehand`
|
||||
225
apps/docs/content/docs/de/tools/stagehand_agent.mdx
Normal file
225
apps/docs/content/docs/de/tools/stagehand_agent.mdx
Normal file
@@ -0,0 +1,225 @@
|
||||
---
|
||||
title: Stagehand Agent
|
||||
description: Autonomous web browsing agent
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="stagehand_agent"
|
||||
color="#FFC83C"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 108 159'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d='M15 26C22.8234 31.822 23.619 41.405 25.3125 50.3867C25.8461 53.1914 26.4211 55.9689 27.0625 58.75C27.7987 61.9868 28.4177 65.2319 29 68.5C29.332 70.3336 29.6653 72.1669 30 74C30.1418 74.7863 30.2836 75.5727 30.4297 76.3828C31.8011 83.2882 33.3851 90.5397 39.4375 94.75C40.3405 95.3069 40.3405 95.3069 41.2617 95.875C43.8517 97.5512 45.826 99.826 48 102C50.6705 102.89 52.3407 103.143 55.0898 103.211C55.8742 103.239 56.6586 103.268 57.4668 103.297C59.1098 103.349 60.7531 103.393 62.3965 103.43C65.8896 103.567 68.4123 103.705 71.5664 105.289C73 107 73 107 73 111C73.66 111 74.32 111 75 111C74.0759 106.912 74.0759 106.912 71.4766 103.828C67.0509 102.348 62.3634 102.64 57.7305 102.609C52.3632 102.449 49.2783 101.537 45 98C41.8212 94.0795 41.5303 90.9791 42 86C44.9846 83.0154 48.2994 83.6556 52.3047 83.6289C53.139 83.6199 53.9734 83.6108 54.833 83.6015C56.6067 83.587 58.3805 83.5782 60.1543 83.5745C62.8304 83.5627 65.5041 83.5137 68.1797 83.4629C81.1788 83.34 91.8042 85.3227 102 94C106.37 100.042 105.483 106.273 104.754 113.406C103.821 119.026 101.968 124.375 100.125 129.75C99.8806 130.471 99.6361 131.193 99.3843 131.936C97.7783 136.447 95.9466 140.206 93 144C92.34 144 91.68 144 91 144C91 144.66 91 145.32 91 146C79.0816 156.115 63.9798 156.979 49 156C36.6394 154.226 26.7567 148.879 19 139C11.0548 125.712 11.6846 105.465 11.3782 90.4719C11.0579 77.4745 8.03411 64.8142 5.4536 52.1135C5.04373 50.0912 4.64233 48.0673 4.24218 46.043C4.00354 44.8573 3.7649 43.6716 3.51903 42.45C2.14425 33.3121 2.14425 33.3121 4.87499 29.125C8.18297 25.817 10.3605 25.4542 15 26Z'
|
||||
fill='#FDFDFD'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.8466 2.96604 96.2332 5.08365 97.6091 9.03564C99.203 14.0664 99.4412 18.7459 99.4414 23.9922C99.4538 24.9285 99.4663 25.8647 99.4791 26.8294C99.5049 28.8198 99.5247 30.8103 99.539 32.8008C99.5785 37.9693 99.6682 43.1369 99.7578 48.3047C99.7747 49.3188 99.7917 50.3328 99.8091 51.3776C99.9603 59.6066 100.323 67.7921 100.937 76C101.012 77.0582 101.087 78.1163 101.164 79.2065C101.646 85.1097 102.203 90.3442 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C25.0719 148.361 24.1437 147.721 23.1875 147.062C8.32968 133.054 9.60387 109.231 8.73413 90.3208C8.32766 81.776 7.51814 73.4295 5.99999 65C5.82831 64.0338 5.65662 63.0675 5.47973 62.072C4.98196 59.3363 4.46395 56.6053 3.93749 53.875C3.76412 52.9572 3.59074 52.0394 3.4121 51.0938C2.75101 47.6388 2.11387 44.3416 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C4.91881 25.5668 6.78357 24.117 11.25 23.6875C15.8364 24.0697 17.5999 24.9021 21 28C24.7763 34.3881 26.047 41.2626 27.1875 48.5C27.5111 50.4693 27.8377 52.4381 28.168 54.4062C28.3733 55.695 28.3733 55.695 28.5828 57.0098C28.8087 58.991 28.8087 58.991 30 60C30.3171 59.4947 30.6342 58.9894 30.9609 58.4688C33.1122 55.4736 34.7097 53.3284 38.3789 52.3945C44.352 52.203 48.1389 53.6183 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C54.4089 51.8676 55.9015 50.8075 59 49C63.8651 48.104 66.9348 48.3122 71.1487 51.0332C72.0896 51.6822 73.0305 52.3313 74 53C73.9686 51.2986 73.9686 51.2986 73.9365 49.5627C73.8636 45.3192 73.818 41.0758 73.7803 36.8318C73.7603 35.0016 73.733 33.1715 73.6982 31.3415C73.6492 28.6976 73.6269 26.0545 73.6094 23.4102C73.5887 22.6035 73.5681 21.7969 73.5468 20.9658C73.5441 13.8444 75.5121 7.83341 80.25 2.4375C83.9645 0.495841 86.8954 0.209055 91 0.999996ZM3.99999 30C1.56925 34.8615 3.215 40.9393 4.24218 46.043C4.37061 46.6927 4.49905 47.3424 4.63137 48.0118C5.03968 50.0717 5.45687 52.1296 5.87499 54.1875C11.1768 80.6177 11.1768 80.6177 11.4375 93.375C11.7542 120.78 11.7542 120.78 23.5625 144.375C28.5565 149.002 33.5798 151.815 40 154C40.6922 154.244 41.3844 154.487 42.0977 154.738C55.6463 158.576 72.4909 156.79 84.8086 150.316C87.0103 148.994 89.0458 147.669 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C97.1202 138.98 99.3206 133.053 101.25 126.937C101.505 126.174 101.76 125.41 102.023 124.623C104.94 115.65 107.293 104.629 103.625 95.625C96.3369 88.3369 86.5231 83.6919 76.1988 83.6088C74.9905 83.6226 74.9905 83.6226 73.7578 83.6367C72.9082 83.6362 72.0586 83.6357 71.1833 83.6352C69.4034 83.6375 67.6235 83.6472 65.8437 83.6638C63.1117 83.6876 60.3806 83.6843 57.6484 83.6777C55.9141 83.6833 54.1797 83.6904 52.4453 83.6992C51.6277 83.6983 50.81 83.6974 49.9676 83.6964C45.5122 83.571 45.5122 83.571 42 86C41.517 90.1855 41.733 92.4858 43.6875 96.25C46.4096 99.4871 48.6807 101.674 53.0105 102.282C55.3425 102.411 57.6645 102.473 60 102.5C69.8847 102.612 69.8847 102.612 74 106C74.8125 108.687 74.8125 108.688 75 111C74.34 111 73.68 111 73 111C72.8969 110.216 72.7937 109.432 72.6875 108.625C72.224 105.67 72.224 105.67 69 104C65.2788 103.745 61.5953 103.634 57.8672 103.609C51.1596 103.409 46.859 101.691 41.875 97C41.2562 96.34 40.6375 95.68 40 95C39.175 94.4637 38.35 93.9275 37.5 93.375C30.9449 87.1477 30.3616 77.9789 29.4922 69.418C29.1557 66.1103 29.1557 66.1103 28.0352 63.625C26.5234 59.7915 26.1286 55.8785 25.5625 51.8125C23.9233 38.3 23.9233 38.3 17 27C11.7018 24.3509 7.9915 26.1225 3.99999 30Z'
|
||||
fill='#1F1F1F'
|
||||
/>
|
||||
<path
|
||||
d='M89.0976 2.53906C91 3 91 3 93.4375 5.3125C96.1586 9.99276 96.178 14.1126 96.2461 19.3828C96.2778 21.1137 96.3098 22.8446 96.342 24.5754C96.3574 25.4822 96.3728 26.3889 96.3887 27.3232C96.6322 41.3036 96.9728 55.2117 98.3396 69.1353C98.9824 75.7746 99.0977 82.3308 99 89C96.5041 88.0049 94.0126 87.0053 91.5351 85.9648C90.3112 85.4563 90.3112 85.4563 89.0625 84.9375C87.8424 84.4251 87.8424 84.4251 86.5976 83.9023C83.7463 82.9119 80.9774 82.4654 78 82C76.7702 65.9379 75.7895 49.8907 75.7004 33.7775C75.6919 32.3138 75.6783 30.8501 75.6594 29.3865C75.5553 20.4082 75.6056 12.1544 80.6875 4.4375C83.6031 2.62508 85.7 2.37456 89.0976 2.53906Z'
|
||||
fill='#FBFBFB'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.99 13.495 97.99 13.495 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.646 85.1082 102.203 90.3434 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C24.6078 148.041 24.6078 148.041 23.1875 147.062C13.5484 137.974 10.832 124.805 9.99999 112C9.91815 101.992 10.4358 91.9898 11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C28.854 148.273 33.89 150.868 40 153C40.6935 153.245 41.387 153.49 42.1016 153.742C56.9033 157.914 73.8284 155.325 87 148C88.3301 147.327 89.6624 146.658 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C100.044 130.286 105.786 114.602 104 99C102.157 94.9722 100.121 93.0631 96.3125 90.875C95.5042 90.398 94.696 89.9211 93.8633 89.4297C85.199 85.1035 78.1558 84.4842 68.5 84.3125C67.2006 84.2783 65.9012 84.2442 64.5625 84.209C61.3751 84.127 58.1879 84.0577 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.8637 87.6094 98.8637 87.6094 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#262114'
|
||||
/>
|
||||
<path
|
||||
d='M68 51C72.86 54.06 74.644 56.5072 76 62C76.249 65.2763 76.2347 68.5285 76.1875 71.8125C76.1868 72.6833 76.1862 73.554 76.1855 74.4512C76.1406 80.8594 76.1406 80.8594 75 82C73.5113 82.0867 72.0185 82.107 70.5273 82.0976C69.6282 82.0944 68.7291 82.0912 67.8027 82.0879C66.8572 82.0795 65.9117 82.0711 64.9375 82.0625C63.9881 82.058 63.0387 82.0535 62.0605 82.0488C59.707 82.037 57.3535 82.0205 55 82C53.6352 77.2188 53.738 72.5029 53.6875 67.5625C53.6585 66.6208 53.6295 65.6792 53.5996 64.709C53.5591 60.2932 53.5488 57.7378 55.8945 53.9023C59.5767 50.5754 63.1766 50.211 68 51Z'
|
||||
fill='#F8F8F8'
|
||||
/>
|
||||
<path
|
||||
d='M46 55C48.7557 57.1816 50.4359 58.8718 52 62C52.0837 63.5215 52.1073 65.0466 52.0977 66.5703C52.0944 67.4662 52.0912 68.3621 52.0879 69.2852C52.0795 70.2223 52.0711 71.1595 52.0625 72.125C52.058 73.0699 52.0535 74.0148 52.0488 74.9883C52.037 77.3256 52.0206 79.6628 52 82C50.9346 82.1992 50.9346 82.1992 49.8477 82.4023C48.9286 82.5789 48.0094 82.7555 47.0625 82.9375C46.146 83.1115 45.2294 83.2855 44.2852 83.4648C42.0471 83.7771 42.0471 83.7771 41 85C40.7692 86.3475 40.5885 87.7038 40.4375 89.0625C40.2931 90.3619 40.1487 91.6613 40 93C37 92 37 92 35.8672 90.1094C35.5398 89.3308 35.2123 88.5522 34.875 87.75C34.5424 86.9817 34.2098 86.2134 33.8672 85.4219C31.9715 80.1277 31.7884 75.065 31.75 69.5C31.7294 68.7536 31.7087 68.0073 31.6875 67.2383C31.6551 62.6607 32.0474 59.7266 35 56C38.4726 54.2637 42.2119 54.3981 46 55Z'
|
||||
fill='#FAFAFA'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.66 13.33 98.32 13.66 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.566 84.1265 102.275 88.3364 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C75.0451 84.5473 73.8012 84.5086 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C66.6624 84.317 66.6624 84.317 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9091 88.0729 98.8182 87.1458 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#423B28'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C88.074 3.7122 85.8483 3.51695 83 4C79.1128 7.37574 78.178 11.0991 77 16C76.8329 18.5621 76.7615 21.1317 76.7695 23.6992C76.77 24.4155 76.7704 25.1318 76.7709 25.8698C76.7739 27.3783 76.7817 28.8868 76.7942 30.3953C76.8123 32.664 76.8147 34.9324 76.8144 37.2012C76.8329 44.6001 77.0765 51.888 77.7795 59.259C78.1413 63.7564 78.1068 68.2413 78.0625 72.75C78.058 73.6498 78.0535 74.5495 78.0488 75.4766C78.0373 77.6511 78.0193 79.8255 78 82C78.99 82.495 78.99 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.495 83.01 46.495 83.01 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.0544 77.9997 75.0939 75.0005 75.125 72C75.1418 71.1608 75.1585 70.3216 75.1758 69.457C75.2185 63.9475 74.555 59.2895 73 54C73.66 54 74.32 54 75 54C74.9314 53.2211 74.8629 52.4422 74.7922 51.6396C74.1158 43.5036 73.7568 35.4131 73.6875 27.25C73.644 25.5194 73.644 25.5194 73.5996 23.7539C73.5376 15.3866 74.6189 8.85069 80.25 2.4375C83.9433 0.506911 86.9162 0.173322 91 0.999996Z'
|
||||
fill='#131311'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.97965 28.9369 5.97965 28.9369 3.99999 32C3.67226 36.9682 4.31774 41.4911 5.27733 46.3594C5.40814 47.0304 5.53894 47.7015 5.67371 48.3929C5.94892 49.7985 6.22723 51.2035 6.50854 52.6079C6.93887 54.7569 7.35989 56.9075 7.77929 59.0586C9.09359 66.104 9.09359 66.104 11 73C11.0836 75.2109 11.1073 77.4243 11.0976 79.6367C11.0944 80.9354 11.0912 82.2342 11.0879 83.5723C11.0795 84.944 11.0711 86.3158 11.0625 87.6875C11.0575 89.071 11.0529 90.4544 11.0488 91.8379C11.037 95.2253 11.0206 98.6126 11 102C8.54975 99.5498 8.73228 98.8194 8.65624 95.4492C8.62812 94.53 8.60001 93.6108 8.57104 92.6638C8.54759 91.6816 8.52415 90.6994 8.49999 89.6875C8.20265 81.3063 7.58164 73.2485 5.99999 65C5.67135 63.2175 5.34327 61.435 5.01562 59.6523C4.31985 55.9098 3.62013 52.1681 2.90233 48.4297C2.75272 47.6484 2.60311 46.867 2.44897 46.062C1.99909 43.8187 1.99909 43.8187 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C6.06003 24.1839 8.81126 23.4843 15 24Z'
|
||||
fill='#2A2311'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C30.0569 149.404 36.9894 152.617 45 154C42 156 42 156 39.4375 156C29.964 153.244 20.8381 146.677 16 138C8.26993 120.062 9.92611 101.014 11 82Z'
|
||||
fill='#272214'
|
||||
/>
|
||||
<path
|
||||
d='M68 49C70.3478 50.1116 71.9703 51.3346 74 53C73.34 53.66 72.68 54.32 72 55C71.505 54.505 71.01 54.01 70.5 53.5C67.6718 51.8031 65.3662 51.5622 62.0976 51.4062C58.4026 52.4521 57.1992 53.8264 55 57C54.3826 61.2861 54.5302 65.4938 54.6875 69.8125C54.7101 70.9823 54.7326 72.1521 54.7559 73.3574C54.8147 76.2396 54.8968 79.1191 55 82C54.01 82 53.02 82 52 82C51.9854 81.4203 51.9708 80.8407 51.9558 80.2434C51.881 77.5991 51.7845 74.9561 51.6875 72.3125C51.6649 71.4005 51.6424 70.4885 51.6191 69.5488C51.4223 64.6292 51.2621 60.9548 48 57C45.6603 55.8302 44.1661 55.8339 41.5625 55.8125C40.78 55.7983 39.9976 55.7841 39.1914 55.7695C36.7079 55.8591 36.7079 55.8591 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C55.6091 48.544 61.7788 47.8649 68 49Z'
|
||||
fill='#1F1A0F'
|
||||
/>
|
||||
<path
|
||||
d='M99 60C99.33 60 99.66 60 100 60C100.05 60.7865 100.1 61.573 100.152 62.3833C100.385 65.9645 100.63 69.5447 100.875 73.125C100.954 74.3625 101.032 75.6 101.113 76.875C101.197 78.0738 101.281 79.2727 101.367 80.5078C101.44 81.6075 101.514 82.7073 101.589 83.8403C102.013 87.1 102.94 89.8988 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C74.4231 84.5279 74.4231 84.5279 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C67.3166 84.3363 66.0082 84.2977 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9162 87.912 98.8324 86.8241 98.7461 85.7031C98.1266 77.012 97.9127 68.6814 99 60Z'
|
||||
fill='#332E22'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.2818 29.7267 4.15499 31.2727 3.18749 35.8125C3.12562 36.8644 3.06374 37.9163 2.99999 39C2.33999 39 1.67999 39 0.999992 39C0.330349 31.2321 0.330349 31.2321 3.37499 27.5625C7.31431 23.717 9.51597 23.543 15 24Z'
|
||||
fill='#1D180A'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C85.4345 3.33492 85.4345 3.33491 80.6875 5.75C78.5543 9.85841 77.6475 13.9354 76.7109 18.4531C76.4763 19.2936 76.2417 20.1341 76 21C75.34 21.33 74.68 21.66 74 22C73.5207 15.4102 74.5846 10.6998 78 5C81.755 0.723465 85.5463 -0.103998 91 0.999996Z'
|
||||
fill='#16130D'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C42.5569 93.7631 43.1137 94.5263 43.6875 95.3125C46.4238 98.4926 48.7165 100.679 53.0105 101.282C55.3425 101.411 57.6646 101.473 60 101.5C70.6207 101.621 70.6207 101.621 75 106C75.0406 107.666 75.0427 109.334 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C65.3044 104.833 61.615 104.703 57.916 104.658C52.1631 104.454 48.7484 103.292 44 100C41.5625 97.25 41.5625 97.25 40 95C40.66 95 41.32 95 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#2B2B2B'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.1682 86.6079 12.3287 91.216 12.4822 95.8245C12.5354 97.3909 12.5907 98.9574 12.6482 100.524C12.7306 102.78 12.8055 105.036 12.8789 107.293C12.9059 107.989 12.933 108.685 12.9608 109.402C13.0731 113.092 12.9015 116.415 12 120C11.67 120 11.34 120 11 120C9.63778 112.17 10.1119 104.4 10.4375 96.5C10.4908 95.0912 10.5436 93.6823 10.5957 92.2734C10.7247 88.8487 10.8596 85.4243 11 82Z'
|
||||
fill='#4D483B'
|
||||
/>
|
||||
<path
|
||||
d='M43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C52 59 52 59 50 60C49.5256 59.34 49.0512 58.68 48.5625 58C45.2656 55.4268 43.184 55.5955 39.1211 55.6641C36.7043 55.8955 36.7043 55.8955 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586Z'
|
||||
fill='#221F16'
|
||||
/>
|
||||
<path
|
||||
d='M76 73C76.33 73 76.66 73 77 73C77 75.97 77 78.94 77 82C78.485 82.495 78.485 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.33 83.34 46.66 82.68 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.33 78.36 75.66 75.72 76 73Z'
|
||||
fill='#040404'
|
||||
/>
|
||||
<path
|
||||
d='M27 54C27.33 54 27.66 54 28 54C28.33 56.97 28.66 59.94 29 63C29.99 63 30.98 63 32 63C32 66.96 32 70.92 32 75C31.01 74.67 30.02 74.34 29 74C28.8672 73.2523 28.7344 72.5047 28.5977 71.7344C28.421 70.7495 28.2444 69.7647 28.0625 68.75C27.8885 67.7755 27.7144 66.8009 27.5352 65.7969C27.0533 63.087 27.0533 63.087 26.4062 60.8125C25.8547 58.3515 26.3956 56.4176 27 54Z'
|
||||
fill='#434039'
|
||||
/>
|
||||
<path
|
||||
d='M78 5C78.99 5.33 79.98 5.66 81 6C80.3194 6.92812 80.3194 6.92812 79.625 7.875C77.7233 11.532 77.1555 14.8461 76.5273 18.8906C76.3533 19.5867 76.1793 20.2828 76 21C75.34 21.33 74.68 21.66 74 22C73.5126 15.2987 74.9229 10.9344 78 5Z'
|
||||
fill='#2A2313'
|
||||
/>
|
||||
<path
|
||||
d='M12 115C12.99 115.495 12.99 115.495 14 116C14.5334 118.483 14.9326 120.864 15.25 123.375C15.3531 124.061 15.4562 124.747 15.5625 125.453C16.0763 129.337 16.2441 130.634 14 134C12.6761 127.57 11.752 121.571 12 115Z'
|
||||
fill='#2F2C22'
|
||||
/>
|
||||
<path
|
||||
d='M104 95C107 98 107 98 107.363 101.031C107.347 102.176 107.33 103.321 107.312 104.5C107.309 105.645 107.305 106.789 107.301 107.969C107 111 107 111 105 114C104.67 107.73 104.34 101.46 104 95Z'
|
||||
fill='#120F05'
|
||||
/>
|
||||
<path
|
||||
d='M56 103C58.6048 102.919 61.2071 102.86 63.8125 102.812C64.5505 102.787 65.2885 102.762 66.0488 102.736C71.4975 102.662 71.4975 102.662 74 104.344C75.374 106.619 75.2112 108.396 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C66.7956 104.77 64.5861 104.589 62.375 104.438C61.1865 104.354 59.998 104.27 58.7734 104.184C57.4006 104.093 57.4006 104.093 56 104C56 103.67 56 103.34 56 103Z'
|
||||
fill='#101010'
|
||||
/>
|
||||
<path
|
||||
d='M23 40C23.66 40 24.32 40 25 40C27.3084 46.3482 27.1982 52.2948 27 59C26.67 59 26.34 59 26 59C25.01 52.73 24.02 46.46 23 40Z'
|
||||
fill='#191409'
|
||||
/>
|
||||
<path
|
||||
d='M47 83C46.3606 83.3094 45.7212 83.6187 45.0625 83.9375C41.9023 87.0977 42.181 90.6833 42 95C41.01 94.67 40.02 94.34 39 94C39.3463 85.7409 39.3463 85.7409 41.875 82.875C44 82 44 82 47 83Z'
|
||||
fill='#171717'
|
||||
/>
|
||||
<path
|
||||
d='M53 61C53.33 61 53.66 61 54 61C54.33 67.93 54.66 74.86 55 82C54.01 82 53.02 82 52 82C52.33 75.07 52.66 68.14 53 61Z'
|
||||
fill='#444444'
|
||||
/>
|
||||
<path
|
||||
d='M81 154C78.6696 156.33 77.8129 156.39 74.625 156.75C73.4687 156.897 73.4687 156.897 72.2891 157.047C69.6838 156.994 68.2195 156.317 66 155C67.7478 154.635 69.4984 154.284 71.25 153.938C72.7118 153.642 72.7118 153.642 74.2031 153.34C76.8681 153.016 78.4887 153.145 81 154Z'
|
||||
fill='#332F23'
|
||||
/>
|
||||
<path
|
||||
d='M19 28C19.66 28 20.32 28 21 28C21.6735 29.4343 22.3386 30.8726 23 32.3125C23.5569 33.5133 23.5569 33.5133 24.125 34.7383C25 37 25 37 25 40C22 39 22 39 21.0508 37.2578C20.8071 36.554 20.5635 35.8502 20.3125 35.125C20.0611 34.4263 19.8098 33.7277 19.5508 33.0078C19 31 19 31 19 28Z'
|
||||
fill='#282213'
|
||||
/>
|
||||
<path
|
||||
d='M102 87C104.429 93.2857 104.429 93.2857 103 97C100.437 94.75 100.437 94.75 98 92C98.0625 89.75 98.0625 89.75 99 88C101 87 101 87 102 87Z'
|
||||
fill='#37301F'
|
||||
/>
|
||||
<path
|
||||
d='M53 56C53.33 56 53.66 56 54 56C53.67 62.27 53.34 68.54 53 75C52.67 75 52.34 75 52 75C51.7788 72.2088 51.5726 69.4179 51.375 66.625C51.3105 65.8309 51.2461 65.0369 51.1797 64.2188C51.0394 62.1497 51.0124 60.0737 51 58C51.66 57.34 52.32 56.68 53 56Z'
|
||||
fill='#030303'
|
||||
/>
|
||||
<path
|
||||
d='M100 129C100.33 129 100.66 129 101 129C100.532 133.776 99.7567 137.045 97 141C96.34 140.67 95.68 140.34 95 140C96.65 136.37 98.3 132.74 100 129Z'
|
||||
fill='#1E1A12'
|
||||
/>
|
||||
<path
|
||||
d='M15 131C17.7061 132.353 17.9618 133.81 19.125 136.562C19.4782 137.389 19.8314 138.215 20.1953 139.066C20.4609 139.704 20.7264 140.343 21 141C20.01 141 19.02 141 18 141C15.9656 137.27 15 135.331 15 131Z'
|
||||
fill='#1C1912'
|
||||
/>
|
||||
<path
|
||||
d='M63 49C69.4 49.4923 69.4 49.4923 72.4375 52.0625C73.2109 53.0216 73.2109 53.0216 74 54C70.8039 54 69.5828 53.4533 66.8125 52C66.0971 51.6288 65.3816 51.2575 64.6445 50.875C64.1018 50.5863 63.5591 50.2975 63 50C63 49.67 63 49.34 63 49Z'
|
||||
fill='#13110C'
|
||||
/>
|
||||
<path
|
||||
d='M0.999992 39C1.98999 39 2.97999 39 3.99999 39C5.24999 46.625 5.24999 46.625 2.99999 50C2.33999 46.37 1.67999 42.74 0.999992 39Z'
|
||||
fill='#312C1E'
|
||||
/>
|
||||
<path
|
||||
d='M94 5C94.66 5 95.32 5 96 5C97.8041 7.75924 98.0127 8.88972 97.625 12.25C97.4187 13.1575 97.2125 14.065 97 15C95.1161 11.7345 94.5071 8.71888 94 5Z'
|
||||
fill='#292417'
|
||||
/>
|
||||
<path
|
||||
d='M20 141C23.3672 142.393 24.9859 143.979 27 147C24.625 146.812 24.625 146.812 22 146C20.6875 143.438 20.6875 143.438 20 141Z'
|
||||
fill='#373328'
|
||||
/>
|
||||
<path
|
||||
d='M86 83C86.33 83.99 86.66 84.98 87 86C83.37 85.34 79.74 84.68 76 84C80.3553 81.8223 81.4663 81.9696 86 83Z'
|
||||
fill='#2F2F2F'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C46 97.625 46 97.625 46 101C44.02 99.35 42.04 97.7 40 96C40.66 95.67 41.32 95.34 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#232323'
|
||||
/>
|
||||
<path
|
||||
d='M34 55C34.66 55.33 35.32 55.66 36 56C35.5256 56.7838 35.0512 57.5675 34.5625 58.375C33.661 59.8895 32.7882 61.4236 32 63C31.34 63 30.68 63 30 63C30.4983 59.3125 31.1007 57.3951 34 55Z'
|
||||
fill='#110F0A'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Stagehand](https://www.stagehand.dev/) is an autonomous web agent platform that enables AI systems to navigate and interact with websites just like a human would. It provides a powerful solution for automating complex web tasks without requiring custom code or browser automation scripts.
|
||||
|
||||
With Stagehand, you can:
|
||||
|
||||
- **Automate web navigation**: Enable AI to browse websites, click links, fill forms, and interact with web elements
|
||||
- **Extract structured data**: Collect specific information from websites in a structured, usable format
|
||||
- **Complete complex workflows**: Perform multi-step tasks across different websites and web applications
|
||||
- **Handle authentication**: Navigate login processes and maintain sessions across websites
|
||||
- **Process dynamic content**: Interact with JavaScript-heavy sites and single-page applications
|
||||
- **Maintain context awareness**: Keep track of the current state and history while navigating
|
||||
- **Generate detailed reports**: Receive comprehensive logs of actions taken and data collected
|
||||
|
||||
In Sim, the Stagehand integration enables your agents to seamlessly interact with web-based systems as part of their workflows. This allows for sophisticated automation scenarios that bridge the gap between your AI agents and the vast information and functionality available on the web. Your agents can search for information, interact with web applications, extract data from websites, and incorporate these capabilities into their decision-making processes. By connecting Sim with Stagehand, you can create agents that extend beyond API-based integrations to navigate the web just as a human would - filling forms, clicking buttons, reading content, and extracting valuable information to complete their tasks more effectively.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Stagehand Agent into the workflow. Can navigate the web and perform tasks.
|
||||
|
||||
## Tools
|
||||
|
||||
### `stagehand_agent`
|
||||
|
||||
Run an autonomous web agent to complete tasks and extract structured data
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `startUrl` | string | Yes | URL of the webpage to start the agent on |
|
||||
| `task` | string | Yes | The task to complete or goal to achieve on the website |
|
||||
| `variables` | json | No | Optional variables to substitute in the task \(format: \{key: value\}\). Reference in task using %key% |
|
||||
| `format` | string | No | No description |
|
||||
| `apiKey` | string | Yes | OpenAI API key for agent execution \(required by Stagehand\) |
|
||||
| `outputSchema` | json | No | Optional JSON schema defining the structure of data the agent should return |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `agentResult` | object | Result from the Stagehand agent execution |
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `stagehand_agent`
|
||||
@@ -109,10 +109,10 @@ Daten in eine Supabase-Tabelle einfügen
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID (z.B. jdrkgepadsdopsntdlom) |
|
||||
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID \(z.B. jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Ja | Der Name der Supabase-Tabelle, in die Daten eingefügt werden sollen |
|
||||
| `data` | any | Ja | Die einzufügenden Daten |
|
||||
| `apiKey` | string | Ja | Ihr Supabase Service-Role-Secret-Key |
|
||||
| `data` | array | Ja | Die einzufügenden Daten \(Array von Objekten oder ein einzelnes Objekt\) |
|
||||
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
@@ -191,8 +191,8 @@ Daten in eine Supabase-Tabelle einfügen oder aktualisieren (Upsert-Operation)
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID \(z.B. jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Ja | Der Name der Supabase-Tabelle, in die Daten eingefügt werden sollen |
|
||||
| `data` | any | Ja | Die Daten, die eingefügt oder aktualisiert werden sollen \(Upsert\) |
|
||||
| `table` | string | Ja | Der Name der Supabase-Tabelle, in die Daten upsertet werden sollen |
|
||||
| `data` | array | Ja | Die zu upsertenden Daten \(einfügen oder aktualisieren\) - Array von Objekten oder ein einzelnes Objekt |
|
||||
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
@@ -87,12 +87,108 @@ Sendet Nachrichten an Telegram-Kanäle oder Benutzer über die Telegram Bot API.
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Erfolgsstatus der Telegram-Nachrichtensendung |
|
||||
| `messageId` | number | Eindeutige Telegram-Nachrichtenkennung |
|
||||
| `chatId` | string | Ziel-Chat-ID, wohin die Nachricht gesendet wurde |
|
||||
| `text` | string | Textinhalt der gesendeten Nachricht |
|
||||
| `timestamp` | number | Unix-Zeitstempel, wann die Nachricht gesendet wurde |
|
||||
| `from` | object | Informationen über den Bot, der die Nachricht gesendet hat |
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Telegram-Nachrichtendaten |
|
||||
|
||||
## Hinweise
|
||||
|
||||
- Kategorie: `tools`
|
||||
- Typ: `telegram`
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Ja | Ihr Telegram Bot API-Token |
|
||||
| `chatId` | string | Ja | Ziel-Telegram-Chat-ID |
|
||||
| `messageId` | string | Ja | Nachrichten-ID zum Löschen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Ergebnis des Löschvorgangs |
|
||||
|
||||
### `telegram_send_photo`
|
||||
|
||||
Senden Sie Fotos an Telegram-Kanäle oder Benutzer über die Telegram Bot API.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Ja | Ihr Telegram Bot API-Token |
|
||||
| `chatId` | string | Ja | Ziel-Telegram-Chat-ID |
|
||||
| `photo` | string | Ja | Zu sendendes Foto. Übergeben Sie eine file_id oder HTTP-URL |
|
||||
| `caption` | string | Nein | Fotobeschreibung (optional) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Telegram-Nachrichtendaten einschließlich optionaler Foto(s) |
|
||||
|
||||
### `telegram_send_video`
|
||||
|
||||
Senden Sie Videos an Telegram-Kanäle oder Benutzer über die Telegram Bot API.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Ja | Ihr Telegram Bot API-Token |
|
||||
| `chatId` | string | Ja | Ziel-Telegram-Chat-ID |
|
||||
| `video` | string | Ja | Zu sendendes Video. Übergeben Sie eine file_id oder HTTP-URL |
|
||||
| `caption` | string | Nein | Videobeschreibung (optional) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Telegram-Nachrichtendaten einschließlich optionaler Medien |
|
||||
|
||||
### `telegram_send_audio`
|
||||
|
||||
Senden Sie Audiodateien an Telegram-Kanäle oder Benutzer über die Telegram Bot API.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Ja | Ihr Telegram Bot API-Token |
|
||||
| `chatId` | string | Ja | Ziel-Telegram-Chat-ID |
|
||||
| `audio` | string | Ja | Zu sendende Audiodatei. Übergeben Sie eine file_id oder HTTP-URL |
|
||||
| `caption` | string | Nein | Audio-Beschriftung \(optional\) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Telegram-Nachrichtendaten einschließlich Sprach-/Audioinformationen |
|
||||
|
||||
### `telegram_send_animation`
|
||||
|
||||
Senden Sie Animationen (GIFs) an Telegram-Kanäle oder Benutzer über die Telegram Bot API.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Ja | Ihr Telegram Bot API-Token |
|
||||
| `chatId` | string | Ja | Ziel-Telegram-Chat-ID |
|
||||
| `animation` | string | Ja | Zu sendende Animation. Übergeben Sie eine file_id oder HTTP-URL |
|
||||
| `caption` | string | Nein | Animations-Beschriftung \(optional\) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Telegram-Nachrichtendaten einschließlich optionaler Medien |
|
||||
|
||||
## Hinweise
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: YouTube
|
||||
description: Suche nach Videos auf YouTube
|
||||
description: Interagiere mit YouTube-Videos, Kanälen und Playlists
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -39,7 +39,7 @@ In Sim ermöglicht die YouTube-Integration Ihren Agenten, YouTube-Inhalte progra
|
||||
|
||||
## Gebrauchsanweisung
|
||||
|
||||
Integriert YouTube in den Workflow. Kann nach Videos suchen. Benötigt API-Schlüssel.
|
||||
Integriere YouTube in den Workflow. Kann nach Videos suchen, Videodetails abrufen, Kanalinformationen abrufen, Playlist-Elemente abrufen und Videokommentare abrufen.
|
||||
|
||||
## Tools
|
||||
|
||||
@@ -61,6 +61,99 @@ Suche nach Videos auf YouTube mit der YouTube Data API.
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array von YouTube-Videos, die der Suchanfrage entsprechen |
|
||||
|
||||
### `youtube_video_details`
|
||||
|
||||
Erhalte detaillierte Informationen über ein bestimmtes YouTube-Video.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `videoId` | string | Ja | YouTube-Video-ID |
|
||||
| `apiKey` | string | Ja | YouTube API-Schlüssel |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `videoId` | string | YouTube-Video-ID |
|
||||
| `title` | string | Videotitel |
|
||||
| `description` | string | Videobeschreibung |
|
||||
| `channelId` | string | Kanal-ID |
|
||||
| `channelTitle` | string | Kanalname |
|
||||
| `publishedAt` | string | Veröffentlichungsdatum und -uhrzeit |
|
||||
| `duration` | string | Videodauer im ISO 8601-Format |
|
||||
| `viewCount` | number | Anzahl der Aufrufe |
|
||||
| `likeCount` | number | Anzahl der Likes |
|
||||
| `commentCount` | number | Anzahl der Kommentare |
|
||||
| `thumbnail` | string | Video-Thumbnail-URL |
|
||||
| `tags` | array | Video-Tags |
|
||||
|
||||
### `youtube_channel_info`
|
||||
|
||||
Erhalte detaillierte Informationen über einen YouTube-Kanal.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `channelId` | string | Nein | YouTube-Kanal-ID \(verwende entweder channelId oder username\) |
|
||||
| `username` | string | Nein | YouTube-Kanalbenutzername \(verwende entweder channelId oder username\) |
|
||||
| `apiKey` | string | Ja | YouTube API-Schlüssel |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `channelId` | string | YouTube-Kanal-ID |
|
||||
| `title` | string | Kanalname |
|
||||
| `description` | string | Kanalbeschreibung |
|
||||
| `subscriberCount` | number | Anzahl der Abonnenten |
|
||||
| `videoCount` | number | Anzahl der Videos |
|
||||
| `viewCount` | number | Gesamtaufrufe des Kanals |
|
||||
| `publishedAt` | string | Erstellungsdatum des Kanals |
|
||||
| `thumbnail` | string | URL des Kanal-Thumbnails |
|
||||
| `customUrl` | string | Benutzerdefinierte Kanal-URL |
|
||||
|
||||
### `youtube_playlist_items`
|
||||
|
||||
Videos aus einer YouTube-Playlist abrufen.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `playlistId` | string | Ja | YouTube-Playlist-ID |
|
||||
| `maxResults` | number | Nein | Maximale Anzahl der zurückzugebenden Videos |
|
||||
| `pageToken` | string | Nein | Page-Token für Paginierung |
|
||||
| `apiKey` | string | Ja | YouTube API-Schlüssel |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array von Videos in der Playlist |
|
||||
|
||||
### `youtube_comments`
|
||||
|
||||
Kommentare von einem YouTube-Video abrufen.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `videoId` | string | Ja | YouTube-Video-ID |
|
||||
| `maxResults` | number | Nein | Maximale Anzahl der zurückzugebenden Kommentare |
|
||||
| `order` | string | Nein | Reihenfolge der Kommentare: time oder relevance |
|
||||
| `pageToken` | string | Nein | Page-Token für Paginierung |
|
||||
| `apiKey` | string | Ja | YouTube API-Schlüssel |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array von Kommentaren zum Video |
|
||||
|
||||
## Hinweise
|
||||
|
||||
- Kategorie: `tools`
|
||||
|
||||
@@ -128,3 +128,60 @@ Wenn kein Eingabeformat definiert ist, stellt der Executor das rohe JSON nur unt
|
||||
<Callout type="warning">
|
||||
Ein Workflow kann nur einen API-Trigger enthalten. Veröffentlichen Sie nach Änderungen eine neue Bereitstellung, damit der Endpunkt aktuell bleibt.
|
||||
</Callout>
|
||||
|
||||
### Datei-Upload-Format
|
||||
|
||||
Die API akzeptiert Dateien in zwei Formaten:
|
||||
|
||||
**1. Base64-kodierte Dateien** (empfohlen für SDKs):
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "file",
|
||||
"data": "data:application/pdf;base64,JVBERi0xLjQK...",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- Maximale Dateigröße: 20MB pro Datei
|
||||
- Dateien werden in den Cloud-Speicher hochgeladen und in UserFile-Objekte mit allen Eigenschaften umgewandelt
|
||||
|
||||
**2. Direkte URL-Referenzen**:
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "url",
|
||||
"data": "https://example.com/document.pdf",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- Die Datei wird nicht hochgeladen, die URL wird direkt weitergegeben
|
||||
- Nützlich für die Referenzierung bestehender Dateien
|
||||
|
||||
### Dateieigenschaften
|
||||
|
||||
Für Dateien können alle Eigenschaften abgerufen werden:
|
||||
|
||||
| Eigenschaft | Beschreibung | Typ |
|
||||
|----------|-------------|------|
|
||||
| `<api.fieldName[0].url>` | Signierte Download-URL | string |
|
||||
| `<api.fieldName[0].name>` | Ursprünglicher Dateiname | string |
|
||||
| `<api.fieldName[0].size>` | Dateigröße in Bytes | number |
|
||||
| `<api.fieldName[0].type>` | MIME-Typ | string |
|
||||
| `<api.fieldName[0].uploadedAt>` | Upload-Zeitstempel (ISO 8601) | string |
|
||||
| `<api.fieldName[0].expiresAt>` | URL-Ablaufzeitstempel (ISO 8601) | string |
|
||||
|
||||
Für URL-referenzierte Dateien sind dieselben Eigenschaften verfügbar, außer `uploadedAt` und `expiresAt`, da die Datei nicht in unseren Speicher hochgeladen wird.
|
||||
|
||||
Wenn kein Eingabeformat definiert ist, stellt der Executor das rohe JSON nur unter `<api.input>` zur Verfügung.
|
||||
|
||||
<Callout type="warning">
|
||||
Ein Workflow kann nur einen API-Trigger enthalten. Veröffentlichen Sie nach Änderungen eine neue Bereitstellung, damit der Endpunkt aktuell bleibt.
|
||||
</Callout>
|
||||
|
||||
@@ -41,3 +41,11 @@ Dateien enthalten `name`, `mimeType` und einen signierten Download `url`.
|
||||
<Callout type="info">
|
||||
Der Builder blockiert mehrere Chat-Auslöser-Blöcke im selben Workflow.
|
||||
</Callout>
|
||||
|
||||
1. Fügen Sie einen Chat-Trigger-Block pro Workflow hinzu.
|
||||
2. Stellen Sie den Workflow im Chat-Modus bereit.
|
||||
3. Teilen Sie den Bereitstellungslink – jede Antwort verwendet die Konversations-ID wieder, damit der Workflow den Kontext beibehalten kann.
|
||||
|
||||
<Callout type="info">
|
||||
Der Builder blockiert mehrere Chat-Trigger-Blöcke im selben Workflow.
|
||||
</Callout>
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
---
|
||||
title: Block-Referenz-Syntax
|
||||
description: Wie man Daten zwischen Blöcken in YAML-Workflows referenziert
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
Block-Referenzen sind die Grundlage des Datenflusses in Sim-Workflows. Das Verständnis, wie man Ausgaben von einem Block korrekt als Eingaben für einen anderen referenziert, ist essenziell für den Aufbau funktionaler Workflows.
|
||||
|
||||
## Grundlegende Referenzregeln
|
||||
|
||||
### 1. Verwende Blocknamen, nicht 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. Namen in Referenzformat umwandeln
|
||||
|
||||
Um eine Block-Referenz zu erstellen:
|
||||
|
||||
1. **Nimm den Blocknamen**: "Email Generator"
|
||||
2. **Konvertiere zu Kleinbuchstaben**: "email generator"
|
||||
3. **Entferne Leerzeichen und Sonderzeichen**: "emailgenerator"
|
||||
4. **Füge Eigenschaft hinzu**: `<emailgenerator.content>`
|
||||
|
||||
### 3. Verwende die richtigen Eigenschaften
|
||||
|
||||
Verschiedene Blocktypen stellen unterschiedliche Eigenschaften bereit:
|
||||
|
||||
- **Agent-Blöcke**: `.content` (die KI-Antwort)
|
||||
- **Funktionsblöcke**: `.output` (der Rückgabewert)
|
||||
- **API-Blöcke**: `.output` (die Antwortdaten)
|
||||
- **Tool-Blöcke**: `.output` (das Tool-Ergebnis)
|
||||
|
||||
## Referenzbeispiele
|
||||
|
||||
### Häufige Block-Referenzen
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Blocknamen mit mehreren Wörtern
|
||||
|
||||
```yaml
|
||||
# Block name: "Data Processor 2"
|
||||
<dataprocessor2.output>
|
||||
|
||||
# Block name: "Email Validation Service"
|
||||
<emailvalidationservice.output>
|
||||
|
||||
# Block name: "Customer Info Agent"
|
||||
<customerinfoagent.content>
|
||||
```
|
||||
|
||||
## Spezielle Referenzfälle
|
||||
|
||||
### Starter-Block
|
||||
|
||||
<Callout type="warning">
|
||||
Der Starter-Block wird immer als `<start.input>` referenziert, unabhängig von seinem tatsächlichen Namen.
|
||||
</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
|
||||
```
|
||||
|
||||
### Schleifenvariablen
|
||||
|
||||
Innerhalb von Schleifenblöcken sind spezielle Variablen verfügbar:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
### Parallele Variablen
|
||||
|
||||
Innerhalb von parallelen Blöcken sind spezielle Variablen verfügbar:
|
||||
|
||||
```yaml
|
||||
# Available in parallel child blocks
|
||||
<parallel.index> # Instance number (0-based)
|
||||
<parallel.currentItem> # Item for this instance
|
||||
<parallel.items> # Full collection
|
||||
```
|
||||
|
||||
## Komplexe Referenzbeispiele
|
||||
|
||||
### Zugriff auf verschachtelte Daten
|
||||
|
||||
Bei der Referenzierung komplexer Objekte wird die Punktnotation verwendet:
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Mehrere Referenzen im 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>
|
||||
```
|
||||
|
||||
### Referenzen in Codeblöcken
|
||||
|
||||
Bei der Verwendung von Referenzen in Funktionsblöcken werden diese als JavaScript-Werte ersetzt:
|
||||
|
||||
```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
|
||||
};
|
||||
```
|
||||
|
||||
## Referenzvalidierung
|
||||
|
||||
Sim validiert alle Referenzen beim Importieren von YAML:
|
||||
|
||||
### Gültige Referenzen
|
||||
- Block existiert im Workflow
|
||||
- Eigenschaft ist für den Blocktyp geeignet
|
||||
- Keine zirkulären Abhängigkeiten
|
||||
- Korrekte Syntaxformatierung
|
||||
|
||||
### Häufige Fehler
|
||||
- **Block nicht gefunden**: Referenzierter Block existiert nicht
|
||||
- **Falsche Eigenschaft**: Verwendung von `.content` in einem Funktionsblock
|
||||
- **Tippfehler**: Falsch geschriebene Blocknamen oder Eigenschaften
|
||||
- **Zirkuläre Referenzen**: Block referenziert sich direkt oder indirekt selbst
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Verwende beschreibende Blocknamen**: Macht Referenzen lesbarer
|
||||
2. **Sei konsistent**: Verwende die gleiche Namenskonvention durchgängig
|
||||
3. **Überprüfe Referenzen**: Stelle sicher, dass alle referenzierten Blöcke existieren
|
||||
4. **Vermeide tiefe Verschachtelungen**: Halte Referenzketten überschaubar
|
||||
5. **Dokumentiere komplexe Abläufe**: Füge Kommentare hinzu, um Referenzbeziehungen zu erklären
|
||||
@@ -1,218 +0,0 @@
|
||||
---
|
||||
title: Agent Block YAML Schema
|
||||
description: YAML-Konfigurationsreferenz für Agent-Blöcke
|
||||
---
|
||||
|
||||
## 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-Konfiguration
|
||||
|
||||
Tools werden als Array definiert, wobei jedes Tool diese Struktur hat:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Verbindungen definieren, wohin der Workflow basierend auf Ausführungsergebnissen geht:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Einfacher 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 mit 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
|
||||
```
|
||||
|
||||
### Strukturierte Ausgabe
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,429 +0,0 @@
|
||||
---
|
||||
title: API Block YAML Schema
|
||||
description: YAML-Konfigurationsreferenz für API-Blöcke
|
||||
---
|
||||
|
||||
## 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
|
||||
params:
|
||||
type: array
|
||||
description: Query parameters as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the parameter entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Parameter name
|
||||
Value:
|
||||
type: string
|
||||
description: Parameter value
|
||||
headers:
|
||||
type: array
|
||||
description: HTTP headers as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Verbindungen definieren, wohin der Workflow basierend auf Anfrageergebnissen geht:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful requests
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Einfache GET-Anfrage
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
- id: header-2-uuid-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
connections:
|
||||
success: process-user-data
|
||||
error: handle-api-error
|
||||
```
|
||||
|
||||
### POST-Anfrage mit Body
|
||||
|
||||
```yaml
|
||||
create-ticket:
|
||||
type: api
|
||||
name: "Create Support Ticket"
|
||||
inputs:
|
||||
url: "https://api.support.com/tickets"
|
||||
method: POST
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{SUPPORT_API_KEY}}"
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"title": "<agent.title>",
|
||||
"description": "<agent.description>",
|
||||
"priority": "high"
|
||||
}
|
||||
connections:
|
||||
success: ticket-created
|
||||
error: ticket-error
|
||||
```
|
||||
|
||||
### Dynamische URL mit Abfrageparametern
|
||||
|
||||
```yaml
|
||||
search-api:
|
||||
type: api
|
||||
name: "Search Products"
|
||||
inputs:
|
||||
url: "https://api.store.com/products"
|
||||
method: GET
|
||||
params:
|
||||
- id: search-param-uuid
|
||||
cells:
|
||||
Key: "q"
|
||||
Value: <start.searchTerm>
|
||||
- id: limit-param-uuid
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
- id: category-param-uuid
|
||||
cells:
|
||||
Key: "category"
|
||||
Value: <filter.category>
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{STORE_API_KEY}}"
|
||||
connections:
|
||||
success: display-results
|
||||
```
|
||||
|
||||
## Parameterformat
|
||||
|
||||
Header und Parameter (Abfrageparameter) verwenden das Tabellenformat mit folgender Struktur:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: another-unique-identifier
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
|
||||
params:
|
||||
- id: param-identifier-here
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
```
|
||||
|
||||
**Strukturdetails:**
|
||||
- `id`: Eindeutige Kennung zur Verfolgung der Tabellenzeile
|
||||
- `cells.Key`: Der Parameter-/Header-Name
|
||||
- `cells.Value`: Der Parameter-/Header-Wert
|
||||
- Dieses Format ermöglicht eine ordnungsgemäße Tabellenverwaltung und Beibehaltung des UI-Status
|
||||
|
||||
## Ausgabereferenzen
|
||||
|
||||
Nach der Ausführung eines API-Blocks können Sie auf seine Ausgaben in nachfolgenden Blöcken verweisen. Der API-Block bietet drei Hauptausgaben:
|
||||
|
||||
### Verfügbare Ausgaben
|
||||
|
||||
| Ausgabe | Typ | Beschreibung |
|
||||
|--------|------|-------------|
|
||||
| `data` | any | Der Antworttext/die Nutzlast von der API |
|
||||
| `status` | number | HTTP-Statuscode (200, 404, 500, usw.) |
|
||||
| `headers` | object | Vom Server zurückgegebene Antwort-Header |
|
||||
|
||||
### Verwendungsbeispiele
|
||||
|
||||
```yaml
|
||||
# Reference API response data
|
||||
process-data:
|
||||
type: function
|
||||
name: "Process API Data"
|
||||
inputs:
|
||||
code: |
|
||||
const responseData = <fetchuserdata.data>;
|
||||
const statusCode = <fetchuserdata.status>;
|
||||
const responseHeaders = <fetchuserdata.headers>;
|
||||
|
||||
if (statusCode === 200) {
|
||||
return {
|
||||
success: true,
|
||||
user: responseData,
|
||||
contentType: responseHeaders['content-type']
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
error: `API call failed with status ${statusCode}`
|
||||
};
|
||||
}
|
||||
|
||||
# Use API data in an agent block
|
||||
analyze-response:
|
||||
type: agent
|
||||
name: "Analyze Response"
|
||||
inputs:
|
||||
userPrompt: |
|
||||
Analyze this API response:
|
||||
|
||||
Status: <fetchuserdata.status>
|
||||
Data: <fetchuserdata.data>
|
||||
|
||||
Provide insights about the response.
|
||||
|
||||
# Conditional logic based on status
|
||||
check-status:
|
||||
type: condition
|
||||
name: "Check API Status"
|
||||
inputs:
|
||||
condition: <fetchuserdata.status> === 200
|
||||
connections:
|
||||
true: success-handler
|
||||
false: error-handler
|
||||
```
|
||||
|
||||
### Praktisches Beispiel
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
connections:
|
||||
success: process-response
|
||||
|
||||
process-response:
|
||||
type: function
|
||||
name: "Process Response"
|
||||
inputs:
|
||||
code: |
|
||||
const user = <fetchuserdata.data>;
|
||||
const status = <fetchuserdata.status>;
|
||||
|
||||
console.log(`API returned status: ${status}`);
|
||||
console.log(`User data:`, user);
|
||||
|
||||
return {
|
||||
userId: user.id,
|
||||
email: user.email,
|
||||
isActive: status === 200
|
||||
};
|
||||
```
|
||||
|
||||
### Fehlerbehandlung
|
||||
|
||||
```yaml
|
||||
api-with-error-handling:
|
||||
type: api
|
||||
name: "API Call"
|
||||
inputs:
|
||||
url: "https://api.example.com/data"
|
||||
method: GET
|
||||
connections:
|
||||
success: check-response
|
||||
error: handle-error
|
||||
|
||||
check-response:
|
||||
type: condition
|
||||
name: "Check Response Status"
|
||||
inputs:
|
||||
condition: <apicall.status> >= 200 && <apicall.status> < 300
|
||||
connections:
|
||||
true: process-success
|
||||
false: handle-api-error
|
||||
|
||||
process-success:
|
||||
type: function
|
||||
name: "Process Success"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: true,
|
||||
data: <apicall.data>,
|
||||
message: "API call successful"
|
||||
};
|
||||
|
||||
handle-api-error:
|
||||
type: function
|
||||
name: "Handle API Error"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: false,
|
||||
status: <apicall.status>,
|
||||
error: "API call failed",
|
||||
data: <apicall.data>
|
||||
};
|
||||
```
|
||||
|
||||
## YAML-String-Escaping
|
||||
|
||||
Beim Schreiben von YAML müssen bestimmte Strings in Anführungszeichen gesetzt werden, um korrekt geparst zu werden:
|
||||
|
||||
### Strings, die in Anführungszeichen gesetzt werden müssen
|
||||
|
||||
```yaml
|
||||
# URLs with hyphens, colons, special characters
|
||||
url: "https://api.example.com/users/123"
|
||||
url: "https://my-api.example.com/data"
|
||||
|
||||
# Header values with hyphens or special characters
|
||||
headers:
|
||||
- id: header-uuid
|
||||
cells:
|
||||
Key: "User-Agent"
|
||||
Value: "My-Application/1.0"
|
||||
- id: auth-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer my-token-123"
|
||||
|
||||
# Parameter values with hyphens
|
||||
params:
|
||||
- id: param-uuid
|
||||
cells:
|
||||
Key: "sort-by"
|
||||
Value: "created-at"
|
||||
```
|
||||
|
||||
### Wann Anführungszeichen verwendet werden sollten
|
||||
|
||||
- ✅ **Immer in Anführungszeichen setzen**: URLs, Tokens, Werte mit Bindestrichen, Doppelpunkten oder Sonderzeichen
|
||||
- ✅ **Immer in Anführungszeichen setzen**: Werte, die mit Zahlen beginnen, aber Strings sein sollen
|
||||
- ✅ **Immer in Anführungszeichen setzen**: Boolean-ähnliche Strings, die als Strings erhalten bleiben sollen
|
||||
- ❌ **Nicht in Anführungszeichen setzen**: Einfache alphanumerische Strings ohne Sonderzeichen
|
||||
|
||||
### Beispiele
|
||||
|
||||
```yaml
|
||||
# ✅ Correct
|
||||
url: "https://api.stripe.com/v1/charges"
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer sk-test-123456789"
|
||||
|
||||
# ❌ Incorrect (may cause parsing errors)
|
||||
url: https://api.stripe.com/v1/charges
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: Authorization
|
||||
Value: Bearer sk-test-123456789
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Umgebungsvariablen für API-Schlüssel verwenden: `{{API_KEY_NAME}}`
|
||||
- Fehlerbehandlung mit Fehlerverbindungen einbeziehen
|
||||
- Angemessene Timeouts für deinen Anwendungsfall festlegen
|
||||
- Statuscode der Antwort in nachfolgenden Blöcken validieren
|
||||
- Aussagekräftige Blocknamen für einfachere Referenzierung verwenden
|
||||
- **Strings mit Sonderzeichen, URLs und Tokens immer in Anführungszeichen setzen**
|
||||
@@ -1,165 +0,0 @@
|
||||
---
|
||||
title: Bedingungsblock YAML-Schema
|
||||
description: YAML-Konfigurationsreferenz für Bedingungsblöcke
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Im Gegensatz zu anderen Blöcken verwenden Bedingungen verzweigte Verbindungen basierend auf Bedingungsergebnissen:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Einfaches 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
|
||||
```
|
||||
|
||||
### Mehrere Bedingungen
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Numerische Vergleiche
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Komplexe Logik
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,255 +0,0 @@
|
||||
---
|
||||
title: Evaluator Block YAML Schema
|
||||
description: YAML-Konfigurationsreferenz für Evaluator-Blöcke
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Verbindungen definieren, wohin der Workflow basierend auf den Evaluierungsergebnissen geht:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful evaluation
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Bewertung der Inhaltsqualität
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Bewertung der Kundenantwort
|
||||
|
||||
```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-Test-Evaluierung
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Mehrdimensionale Inhaltsbewertung
|
||||
|
||||
```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-Referenzen
|
||||
|
||||
Nach der Ausführung eines Evaluator-Blocks können Sie auf seine Ausgaben verweisen:
|
||||
|
||||
```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
|
||||
|
||||
- Definieren Sie klare, spezifische Bewertungskriterien
|
||||
- Verwenden Sie angemessene Bewertungsbereiche für Ihren Anwendungsfall
|
||||
- Wählen Sie Modelle mit starken Argumentationsfähigkeiten
|
||||
- Verwenden Sie niedrigere Temperaturwerte für konsistente Bewertungen
|
||||
- Fügen Sie detaillierte Metrikbeschreibungen hinzu
|
||||
- Testen Sie mit verschiedenen Inhaltstypen
|
||||
- Erwägen Sie mehrere Evaluatoren für komplexe Bewertungen
|
||||
@@ -1,162 +0,0 @@
|
||||
---
|
||||
title: Funktionsblock YAML-Schema
|
||||
description: YAML-Konfigurationsreferenz für Funktionsblöcke
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Verbindungen definieren, wohin der Workflow basierend auf den Ausführungsergebnissen geht:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Einfache Validierung
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Datenverarbeitung
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Berechnungen
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,151 +0,0 @@
|
||||
---
|
||||
title: Block-Schemas
|
||||
description: Vollständige YAML-Schema-Referenz für alle Sim-Blöcke
|
||||
---
|
||||
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
|
||||
Dieser Abschnitt enthält die vollständigen YAML-Schema-Definitionen für alle verfügbaren Blocktypen in Sim. Jeder Blocktyp hat spezifische Konfigurationsanforderungen und Ausgabeformate.
|
||||
|
||||
## Kernblöcke
|
||||
|
||||
Dies sind die wesentlichen Bausteine für die Erstellung von Workflows:
|
||||
|
||||
<Cards>
|
||||
<Card title="Starter-Block" href="/yaml/blocks/starter">
|
||||
Workflow-Einstiegspunkt mit Unterstützung für manuelle Auslöser, Webhooks und Zeitpläne
|
||||
</Card>
|
||||
<Card title="Agent-Block" href="/yaml/blocks/agent">
|
||||
KI-gestützte Verarbeitung mit LLM-Integration und Tool-Unterstützung
|
||||
</Card>
|
||||
<Card title="Funktions-Block" href="/yaml/blocks/function">
|
||||
Ausführungsumgebung für benutzerdefinierten JavaScript/TypeScript-Code
|
||||
</Card>
|
||||
<Card title="Antwort-Block" href="/yaml/blocks/response">
|
||||
Formatierung und Rückgabe der endgültigen Workflow-Ergebnisse
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Logik & Kontrollfluss
|
||||
|
||||
Blöcke zur Implementierung von bedingter Logik und Kontrollfluss:
|
||||
|
||||
<Cards>
|
||||
<Card title="Bedingungsblock" href="/yaml/blocks/condition">
|
||||
Bedingte Verzweigung basierend auf booleschen Ausdrücken
|
||||
</Card>
|
||||
<Card title="Router-Block" href="/yaml/blocks/router">
|
||||
KI-gestützte intelligente Weiterleitung zu mehreren Pfaden
|
||||
</Card>
|
||||
<Card title="Schleifenblock" href="/yaml/blocks/loop">
|
||||
Iterative Verarbeitung mit for- und forEach-Schleifen
|
||||
</Card>
|
||||
<Card title="Parallel-Block" href="/yaml/blocks/parallel">
|
||||
Gleichzeitige Ausführung über mehrere Instanzen
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Integrationsblöcke
|
||||
|
||||
Blöcke zur Verbindung mit externen Diensten und Systemen:
|
||||
|
||||
<Cards>
|
||||
<Card title="API-Block" href="/yaml/blocks/api">
|
||||
HTTP-Anfragen an externe REST-APIs
|
||||
</Card>
|
||||
<Card title="Webhook-Block" href="/yaml/blocks/webhook">
|
||||
Webhook-Auslöser für externe Integrationen
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Erweiterte Blöcke
|
||||
|
||||
Spezialisierte Blöcke für komplexe Workflow-Muster:
|
||||
|
||||
<Cards>
|
||||
<Card title="Evaluator-Block" href="/yaml/blocks/evaluator">
|
||||
Validierung von Ausgaben anhand definierter Kriterien und Metriken
|
||||
</Card>
|
||||
<Card title="Workflow-Block" href="/yaml/blocks/workflow">
|
||||
Ausführung anderer Workflows als wiederverwendbare Komponenten
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Gemeinsame Schema-Elemente
|
||||
|
||||
Alle Blöcke teilen diese gemeinsamen Elemente:
|
||||
|
||||
### Grundstruktur
|
||||
|
||||
```yaml
|
||||
block-id:
|
||||
type: <block-type>
|
||||
name: <display-name>
|
||||
inputs:
|
||||
# Block-specific configuration
|
||||
connections:
|
||||
# Connection definitions
|
||||
```
|
||||
|
||||
### Verbindungstypen
|
||||
|
||||
- **success**: Zielblock für erfolgreiche Ausführung
|
||||
- **error**: Zielblock für Fehlerbehandlung (optional)
|
||||
- **conditions**: Mehrere Pfade für bedingte Blöcke
|
||||
|
||||
### Umgebungsvariablen
|
||||
|
||||
Verwende doppelte geschweifte Klammern für Umgebungsvariablen:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{API_KEY_NAME}}'
|
||||
endpoint: '{{SERVICE_ENDPOINT}}'
|
||||
```
|
||||
|
||||
### Blockreferenzen
|
||||
|
||||
Referenziere andere Blockausgaben mit dem Blocknamen in Kleinbuchstaben:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
userPrompt: <blockname.content>
|
||||
data: <functionblock.output>
|
||||
originalInput: <start.input>
|
||||
```
|
||||
|
||||
## Validierungsregeln
|
||||
|
||||
Alle YAML-Blöcke werden anhand ihrer Schemas validiert:
|
||||
|
||||
1. **Pflichtfelder**: Müssen vorhanden sein
|
||||
2. **Typvalidierung**: Werte müssen den erwarteten Typen entsprechen
|
||||
3. **Enum-Validierung**: Zeichenkettenwerte müssen aus erlaubten Listen stammen
|
||||
4. **Bereichsvalidierung**: Zahlen müssen innerhalb festgelegter Bereiche liegen
|
||||
5. **Mustervalidierung**: Zeichenketten müssen Regex-Mustern entsprechen (wo anwendbar)
|
||||
|
||||
## Kurzreferenz
|
||||
|
||||
### Blocktypen und Eigenschaften
|
||||
|
||||
| Blocktyp | Primäre Ausgabe | Häufige Anwendungsfälle |
|
||||
|------------|----------------|------------------|
|
||||
| starter | `.input` | Workflow-Einstiegspunkt |
|
||||
| agent | `.content` | KI-Verarbeitung, Texterstellung |
|
||||
| function | `.output` | Datentransformation, Berechnungen |
|
||||
| api | `.output` | Integration externer Dienste |
|
||||
| condition | N/A (Verzweigung) | Bedingte Logik |
|
||||
| router | N/A (Verzweigung) | Intelligentes Routing |
|
||||
| response | N/A (Terminal) | Formatierung der Endausgabe |
|
||||
| loop | `.results` | Iterative Verarbeitung |
|
||||
| parallel | `.results` | Gleichzeitige Verarbeitung |
|
||||
| webhook | `.payload` | Externe Auslöser |
|
||||
| evaluator | `.score` | Ausgabevalidierung, Qualitätsbewertung |
|
||||
| workflow | `.output` | Ausführung von Unterworkflows, Modularität |
|
||||
|
||||
### Erforderlich vs. Optional
|
||||
|
||||
- **Immer erforderlich**: `type`, `name`
|
||||
- **Normalerweise erforderlich**: `inputs`, `connections`
|
||||
- **Kontextabhängig**: Spezifische Eingabefelder variieren je nach Blocktyp
|
||||
- **Immer optional**: `error`Verbindungen, UI-spezifische Felder
|
||||
@@ -1,312 +0,0 @@
|
||||
---
|
||||
title: Parallel Block YAML Schema
|
||||
description: YAML-Konfigurationsreferenz für Parallel-Blöcke
|
||||
---
|
||||
|
||||
## 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)
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Parallel-Blöcke verwenden ein spezielles Verbindungsformat mit einem `parallel` Abschnitt:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Konfiguration von untergeordneten Blöcken
|
||||
|
||||
Blöcke innerhalb eines Parallel-Blocks müssen ihre `parentId` auf die Parallel-Block-ID setzen:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Anzahlbasierte Parallelverarbeitung
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Sammlungsbasierte Parallelverarbeitung
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Komplexe parallele Verarbeitungspipeline
|
||||
|
||||
```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>
|
||||
};
|
||||
```
|
||||
|
||||
### Gleichzeitige KI-Analyse
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Parallele Variablen
|
||||
|
||||
Innerhalb von untergeordneten Parallel-Blöcken sind diese speziellen Variablen verfügbar:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Ausgabereferenzen
|
||||
|
||||
Nach Abschluss eines Parallel-Blocks können Sie auf seine aggregierten Ergebnisse verweisen:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Bewährte Praktiken
|
||||
|
||||
- Verwenden Sie angemessene maxConcurrency, um APIs nicht zu überlasten
|
||||
- Stellen Sie sicher, dass Operationen unabhängig sind und nicht voneinander abhängen
|
||||
- Implementieren Sie Fehlerbehandlung für robuste parallele Ausführung
|
||||
- Testen Sie zuerst mit kleinen Sammlungen
|
||||
- Überwachen Sie Ratenbegrenzungen für externe APIs
|
||||
- Verwenden Sie den Collection-Typ zur Verteilung von Arbeit, den Count-Typ für feste Instanzen
|
||||
- Berücksichtigen Sie den Speicherverbrauch bei großen Sammlungen
|
||||
@@ -1,239 +0,0 @@
|
||||
---
|
||||
title: Response Block YAML Schema
|
||||
description: YAML-Konfigurationsreferenz für Response-Blöcke
|
||||
---
|
||||
|
||||
## 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 table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Response-Blöcke sind Endblöcke (keine ausgehenden Verbindungen) und definieren die endgültige Ausgabe:
|
||||
|
||||
```yaml
|
||||
# No connections object needed - Response blocks are always terminal
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Einfache Antwort
|
||||
|
||||
```yaml
|
||||
simple-response:
|
||||
type: response
|
||||
name: "Simple Response"
|
||||
inputs:
|
||||
data:
|
||||
message: "Hello World"
|
||||
timestamp: <function.timestamp>
|
||||
status: 200
|
||||
```
|
||||
|
||||
### Erfolgreiche Antwort
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
### Antwort mit vollständigem Tabellenkopfformat
|
||||
|
||||
Wenn Header über die UI-Tabellenschnittstelle erstellt werden, enthält das YAML zusätzliche Metadaten:
|
||||
|
||||
```yaml
|
||||
api-response:
|
||||
type: response
|
||||
name: "API Response"
|
||||
inputs:
|
||||
data:
|
||||
message: "Request processed successfully"
|
||||
id: <agent.request_id>
|
||||
status: 200
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: header-2-uuid-here
|
||||
key: "Cache-Control"
|
||||
value: "no-cache"
|
||||
cells:
|
||||
Key: "Cache-Control"
|
||||
Value: "no-cache"
|
||||
- id: header-3-uuid-here
|
||||
key: "X-API-Version"
|
||||
value: "2.1"
|
||||
cells:
|
||||
Key: "X-API-Version"
|
||||
Value: "2.1"
|
||||
```
|
||||
|
||||
### Fehlerantwort
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
### Paginierte Antwort
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
## Tabellenparameterformate
|
||||
|
||||
Der Response-Block unterstützt zwei Formate für Header:
|
||||
|
||||
### Vereinfachtes Format (manuelles YAML)
|
||||
|
||||
Beim manuellen Schreiben von YAML können Sie das vereinfachte Format verwenden:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
- key: "Cache-Control"
|
||||
value: "no-cache"
|
||||
```
|
||||
|
||||
### Vollständiges Tabellenformat (UI-generiert)
|
||||
|
||||
Wenn Header über die UI-Tabellenschnittstelle erstellt werden, enthält das YAML zusätzliche Metadaten:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
```
|
||||
|
||||
**Wesentliche Unterschiede:**
|
||||
- `id`: Eindeutiger Identifikator zur Verfolgung der Tabellenzeile
|
||||
- `cells`: Anzeigewerte, die von der UI-Tabellenschnittstelle verwendet werden
|
||||
- Beide Formate sind für die Workflow-Ausführung funktional gleichwertig
|
||||
- Das vollständige Format bewahrt den UI-Status beim Importieren/Exportieren von Workflows
|
||||
|
||||
**Wichtig:** Setzen Sie Header-Namen und Werte, die Sonderzeichen enthalten, immer in Anführungszeichen:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: cache-control-uuid
|
||||
cells:
|
||||
Key: "Cache-Control"
|
||||
Value: "no-cache"
|
||||
```
|
||||
|
||||
```
|
||||
@@ -1,200 +0,0 @@
|
||||
---
|
||||
title: Router Block YAML Schema
|
||||
description: YAML-Konfigurationsreferenz für Router-Blöcke
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Router-Blöcke verwenden ein success-Array, das alle möglichen Routing-Ziele enthält:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
### Prioritäts-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
|
||||
```
|
||||
|
||||
### Abteilungs-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
|
||||
```
|
||||
|
||||
## Erweiterte Konfiguration
|
||||
|
||||
### Multi-Modell-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-Referenzen
|
||||
|
||||
Router-Blöcke erzeugen keine direkten Outputs, sondern steuern den Workflow-Pfad:
|
||||
|
||||
```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
|
||||
|
||||
- Klare Routing-Kriterien im Prompt angeben
|
||||
- Spezifische, beschreibende Namen für Zielblöcke verwenden
|
||||
- Beispiele für Inhalte für jeden Routing-Pfad einschließen
|
||||
- Niedrigere Temperaturwerte für konsistentes Routing verwenden
|
||||
- Mit verschiedenen Eingabetypen testen, um genaues Routing sicherzustellen
|
||||
- Fallback-Pfade für Sonderfälle berücksichtigen
|
||||
@@ -1,183 +0,0 @@
|
||||
---
|
||||
title: YAML-Schema für Starter-Block
|
||||
description: YAML-Konfigurationsreferenz für Starter-Blöcke
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Der Starter-Block hat nur eine Erfolgsverbindung, da er der Einstiegspunkt ist:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID to execute when workflow starts
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Manueller Start
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: next-block
|
||||
```
|
||||
|
||||
### Manueller Start mit Eingabeformat
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Täglicher Zeitplan
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: daily
|
||||
dailyTime: "09:00"
|
||||
timezone: "America/New_York"
|
||||
connections:
|
||||
success: daily-task
|
||||
```
|
||||
|
||||
### Wöchentlicher Zeitplan
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: weekly
|
||||
weeklyDay: MON
|
||||
weeklyTime: "08:30"
|
||||
timezone: UTC
|
||||
connections:
|
||||
success: weekly-report
|
||||
```
|
||||
|
||||
### Webhook-Auslöser
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: webhook
|
||||
webhookProvider: slack
|
||||
webhookConfig:
|
||||
# Provider-specific configuration
|
||||
connections:
|
||||
success: process-webhook
|
||||
```
|
||||
@@ -1,403 +0,0 @@
|
||||
---
|
||||
title: Webhook-Block YAML-Schema
|
||||
description: YAML-Konfigurationsreferenz für Webhook-Blöcke
|
||||
---
|
||||
|
||||
## 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 as table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Expected header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
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 as table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Verbindungen definieren, wohin der Workflow basierend auf der Webhook-Verarbeitung geht:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful processing
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Einfacher Webhook-Auslöser
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Zahlungs-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
|
||||
```
|
||||
|
||||
### Webhook mit vollständigem Tabellenkopfformat
|
||||
|
||||
Wenn Header über die UI-Tabellenschnittstelle erstellt werden, enthält das YAML zusätzliche Metadaten:
|
||||
|
||||
```yaml
|
||||
api-webhook-complete:
|
||||
type: webhook
|
||||
name: "API Webhook with Table Headers"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
methods: [POST]
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
key: "Authorization"
|
||||
value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
- id: header-2-uuid-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
responseConfig:
|
||||
status: 200
|
||||
headers:
|
||||
- id: response-header-1-uuid
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: response-header-2-uuid
|
||||
key: "X-Webhook-Response"
|
||||
value: "processed"
|
||||
cells:
|
||||
Key: "X-Webhook-Response"
|
||||
Value: "processed"
|
||||
body: |
|
||||
{
|
||||
"status": "received",
|
||||
"timestamp": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-webhook-complete
|
||||
```
|
||||
|
||||
### Generischer 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"
|
||||
body: |
|
||||
{
|
||||
"status": "accepted",
|
||||
"id": "{{Math.random().toString(36).substr(2, 9)}}",
|
||||
"received_at": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-webhook-data
|
||||
```
|
||||
|
||||
### Multi-Methoden-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
|
||||
```
|
||||
|
||||
## Tabellenparameterformate
|
||||
|
||||
Der Webhook-Block unterstützt zwei Formate für Header (sowohl Validierungs-Header als auch Antwort-Header):
|
||||
|
||||
### Vereinfachtes Format (manuelles YAML)
|
||||
|
||||
Beim manuellen Schreiben von YAML können Sie das vereinfachte Format verwenden:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
```
|
||||
|
||||
### Vollständiges Tabellenformat (UI-generiert)
|
||||
|
||||
Wenn Header über die UI-Tabellenschnittstelle erstellt werden, enthält das YAML zusätzliche Metadaten:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
```
|
||||
|
||||
**Wesentliche Unterschiede:**
|
||||
- `id`: Eindeutige Kennung zur Verfolgung der Tabellenzeile
|
||||
- `cells`: Anzeigewerte, die von der UI-Tabellenschnittstelle verwendet werden
|
||||
- Beide Formate sind für die Webhook-Verarbeitung funktional gleichwertig
|
||||
- Das vollständige Format bewahrt den UI-Status beim Importieren/Exportieren von Workflows
|
||||
|
||||
**Wichtig:** Setzen Sie Headernamen und Werte, die Sonderzeichen enthalten, immer in Anführungszeichen:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
```
|
||||
|
||||
## Webhook-Variablen
|
||||
|
||||
In Webhook-ausgelösten Workflows sind diese speziellen Variablen verfügbar:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Ausgabereferenzen
|
||||
|
||||
Nachdem ein Webhook eine Anfrage verarbeitet hat, können Sie auf seine Daten verweisen:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Sicherheits-Best-Practices
|
||||
|
||||
- Verwenden Sie immer Webhook-Geheimnisse zur Verifizierung
|
||||
- Validieren Sie erwartete Header und Methoden
|
||||
- Implementieren Sie angemessene Fehlerbehandlung
|
||||
- Verwenden Sie HTTPS-Endpunkte in der Produktion
|
||||
- Überwachen Sie Webhook-Aktivitäten und -Fehler
|
||||
- Setzen Sie angemessene Antwort-Timeouts
|
||||
- Validieren Sie die Payload-Struktur vor der Verarbeitung
|
||||
@@ -1,299 +0,0 @@
|
||||
---
|
||||
title: YAML-Schema für Workflow-Blöcke
|
||||
description: YAML-Konfigurationsreferenz für Workflow-Blöcke
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Verbindungskonfiguration
|
||||
|
||||
Verbindungen definieren, wohin der Workflow basierend auf den Ergebnissen des Unter-Workflows geht:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful completion
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Beispiele
|
||||
|
||||
### Einfache Workflow-Ausführung
|
||||
|
||||
```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-Generierungs-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
|
||||
```
|
||||
|
||||
### Mehrstufiger Analyse-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
|
||||
```
|
||||
|
||||
### Bedingte Workflow-Ausführung
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Parallele Workflow-Ausführung
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Workflow zur Fehlerbehandlung
|
||||
|
||||
```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
|
||||
|
||||
Daten vom übergeordneten Workflow zum Unter-Workflow zuordnen:
|
||||
|
||||
```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-Referenzen
|
||||
|
||||
Nach Abschluss eines Workflow-Blocks können Sie auf dessen Ausgaben verweisen:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Bewährte Praktiken
|
||||
|
||||
- Verwenden Sie aussagekräftige Workflow-IDs für mehr Klarheit
|
||||
- Übertragen Sie nur notwendige Daten an Sub-Workflows
|
||||
- Setzen Sie angemessene Timeouts entsprechend der Workflow-Komplexität
|
||||
- Integrieren Sie Fehlerbehandlung für robuste Ausführung
|
||||
- Übergeben Sie Umgebungsvariablen sicher
|
||||
- Testen Sie Sub-Workflows zuerst unabhängig voneinander
|
||||
- Überwachen Sie die Leistung verschachtelter Workflows
|
||||
- Verwenden Sie versionierte Workflow-IDs für Stabilität
|
||||
@@ -1,273 +0,0 @@
|
||||
---
|
||||
title: YAML Workflow Beispiele
|
||||
description: Beispiele vollständiger YAML-Workflows
|
||||
---
|
||||
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
## Multi-Agent-Ketten-Workflow
|
||||
|
||||
Ein Workflow, bei dem mehrere KI-Agenten Informationen sequentiell verarbeiten:
|
||||
|
||||
```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-basierter bedingter Workflow
|
||||
|
||||
Ein Workflow, der Routing-Logik verwendet, um Daten basierend auf Bedingungen an verschiedene Agenten zu senden:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Websuche mit strukturierter Ausgabe
|
||||
|
||||
Ein Workflow, der das Web mit Tools durchsucht und strukturierte Daten zurückgibt:
|
||||
|
||||
```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"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Schleifenverarbeitung mit Sammlung
|
||||
|
||||
Ein Workflow, der jedes Element in einer Sammlung mithilfe einer Schleife verarbeitet:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## E-Mail-Klassifizierung und -Antwort
|
||||
|
||||
Ein Workflow, der E-Mails klassifiziert und passende Antworten generiert:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
@@ -1,159 +0,0 @@
|
||||
---
|
||||
title: YAML Workflow Referenz
|
||||
description: Vollständiger Leitfaden zum Schreiben von YAML-Workflows in Sim
|
||||
---
|
||||
|
||||
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 bieten eine leistungsstarke Möglichkeit, Workflow-Konfigurationen in Sim zu definieren, zu versionieren und zu teilen. Dieser Referenzleitfaden behandelt die vollständige YAML-Syntax, Block-Schemas und Best Practices für die Erstellung robuster Workflows.
|
||||
|
||||
## Schnellstart
|
||||
|
||||
Jeder Sim-Workflow folgt dieser grundlegenden Struktur:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Kernkonzepte
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Versionsdeklaration</strong>: Muss genau `version: '1.0'` (mit Anführungszeichen) sein
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Blockstruktur</strong>: Alle Workflow-Blöcke werden unter dem Schlüssel `blocks` definiert
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Block-Referenzen</strong>: Verwenden Sie Blocknamen in Kleinbuchstaben ohne Leerzeichen (z.B. `<aiassistant.content>`)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Umgebungsvariablen</strong>: Referenzierung mit doppelten geschweiften Klammern `{{VARIABLE_NAME}}`
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Blocktypen
|
||||
|
||||
Sim unterstützt mehrere Kern-Blocktypen, jeder mit spezifischen YAML-Schemas:
|
||||
|
||||
<Cards>
|
||||
<Card title="Starter-Block" href="/yaml/blocks/starter">
|
||||
Workflow-Einstiegspunkt mit Unterstützung für manuelle, Webhook- und geplante Trigger
|
||||
</Card>
|
||||
<Card title="Agent-Block" href="/yaml/blocks/agent">
|
||||
KI-gestützte Verarbeitung mit Unterstützung für Tools und strukturierte Ausgabe
|
||||
</Card>
|
||||
<Card title="Function-Block" href="/yaml/blocks/function">
|
||||
Ausführung von benutzerdefiniertem JavaScript/TypeScript-Code
|
||||
</Card>
|
||||
<Card title="API-Block" href="/yaml/blocks/api">
|
||||
HTTP-Anfragen an externe Dienste
|
||||
</Card>
|
||||
<Card title="Condition-Block" href="/yaml/blocks/condition">
|
||||
Bedingte Verzweigung basierend auf booleschen Ausdrücken
|
||||
</Card>
|
||||
<Card title="Router-Block" href="/yaml/blocks/router">
|
||||
KI-gestützte intelligente Weiterleitung zu mehreren Pfaden
|
||||
</Card>
|
||||
<Card title="Loop-Block" href="/yaml/blocks/loop">
|
||||
Iterative Verarbeitung mit for- und forEach-Schleifen
|
||||
</Card>
|
||||
<Card title="Parallel-Block" href="/yaml/blocks/parallel">
|
||||
Gleichzeitige Ausführung über mehrere Instanzen
|
||||
</Card>
|
||||
<Card title="Webhook-Block" href="/yaml/blocks/webhook">
|
||||
Webhook-Trigger für externe Integrationen
|
||||
</Card>
|
||||
<Card title="Evaluator-Block" href="/yaml/blocks/evaluator">
|
||||
Validierung von Ausgaben anhand definierter Kriterien und Metriken
|
||||
</Card>
|
||||
<Card title="Workflow-Block" href="/yaml/blocks/workflow">
|
||||
Ausführung anderer Workflows als wiederverwendbare Komponenten
|
||||
</Card>
|
||||
<Card title="Response-Block" href="/yaml/blocks/response">
|
||||
Formatierung der endgültigen Workflow-Ausgabe
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Block-Referenz-Syntax
|
||||
|
||||
Der wichtigste Aspekt von YAML-Workflows ist das Verständnis, wie man Daten zwischen Blöcken referenziert:
|
||||
|
||||
### Grundregeln
|
||||
|
||||
1. **Verwende den Blocknamen** (nicht die Block-ID), umgewandelt in Kleinbuchstaben ohne Leerzeichen
|
||||
2. **Füge die entsprechende Eigenschaft hinzu** (.content für Agenten, .output für Tools)
|
||||
3. **Bei Verwendung von Chat, referenziere den Starter-Block** als `<start.input>`
|
||||
|
||||
### Beispiele
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Sonderfälle
|
||||
|
||||
- **Schleifenvariablen**: `<loop.index>`, `<loop.currentItem>`, `<loop.items>`
|
||||
- **Parallele Variablen**: `<parallel.index>`, `<parallel.currentItem>`
|
||||
|
||||
## Umgebungsvariablen
|
||||
|
||||
Verwende Umgebungsvariablen für sensible Daten wie API-Schlüssel:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
database: '{{DATABASE_URL}}'
|
||||
token: '{{SLACK_BOT_TOKEN}}'
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Halte Blocknamen benutzerfreundlich**: "Email Processor" für die UI-Anzeige
|
||||
- **Referenziere Umgebungsvariablen**: Niemals API-Schlüssel fest codieren
|
||||
- **Strukturiere für Lesbarkeit**: Gruppiere zusammengehörige Blöcke logisch
|
||||
- **Teste schrittweise**: Baue Workflows Schritt für Schritt auf
|
||||
|
||||
## Nächste Schritte
|
||||
|
||||
- [Block-Referenz-Syntax](/yaml/block-reference) - Detaillierte Referenzregeln
|
||||
- [Vollständige Block-Schemas](/yaml/blocks) - Alle verfügbaren Blocktypen
|
||||
- [Workflow-Beispiele](/yaml/examples) - Praxisnahe Workflow-Muster
|
||||
@@ -1039,34 +1039,6 @@ function StreamingWorkflow() {
|
||||
- Node.js 16+
|
||||
- TypeScript 5.0+ (for TypeScript projects)
|
||||
|
||||
## TypeScript Support
|
||||
|
||||
The SDK is written in TypeScript and provides full type safety:
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SimStudioClient,
|
||||
WorkflowExecutionResult,
|
||||
WorkflowStatus,
|
||||
SimStudioError
|
||||
} from 'simstudio-ts-sdk';
|
||||
|
||||
// Type-safe client initialization
|
||||
const client: SimStudioClient = new SimStudioClient({
|
||||
apiKey: process.env.SIM_API_KEY!
|
||||
});
|
||||
|
||||
// Type-safe workflow execution
|
||||
const result: WorkflowExecutionResult = await client.executeWorkflow('workflow-id', {
|
||||
input: {
|
||||
message: 'Hello, TypeScript!'
|
||||
}
|
||||
});
|
||||
|
||||
// Type-safe status checking
|
||||
const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
|
||||
@@ -66,7 +66,7 @@ Search for similar content in a knowledge base using vector similarity
|
||||
| `knowledgeBaseId` | string | Yes | ID of the knowledge base to search in |
|
||||
| `query` | string | No | Search query text \(optional when using tag filters\) |
|
||||
| `topK` | number | No | Number of most similar results to return \(1-100\) |
|
||||
| `tagFilters` | any | No | Array of tag filters with tagName and tagValue properties |
|
||||
| `tagFilters` | array | No | Array of tag filters with tagName and tagValue properties |
|
||||
|
||||
#### Output
|
||||
|
||||
|
||||
@@ -114,7 +114,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 |
|
||||
| `data` | array | Yes | The data to insert \(array of objects or a single object\) |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
@@ -195,7 +195,7 @@ Insert or update data in a Supabase table (upsert operation)
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to upsert data into |
|
||||
| `data` | any | Yes | The data to upsert \(insert or update\) |
|
||||
| `data` | array | Yes | The data to upsert \(insert or update\) - array of objects or a single object |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
@@ -89,12 +89,8 @@ Send messages to Telegram channels or users through the Telegram Bot API. Enable
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Telegram message send success status |
|
||||
| `messageId` | number | Unique Telegram message identifier |
|
||||
| `chatId` | string | Target chat ID where message was sent |
|
||||
| `text` | string | Text content of the sent message |
|
||||
| `timestamp` | number | Unix timestamp when message was sent |
|
||||
| `from` | object | Information about the bot that sent the message |
|
||||
| `message` | string | Success or error message |
|
||||
| `data` | object | Telegram message data |
|
||||
|
||||
### `telegram_delete_message`
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: YouTube
|
||||
description: Search for videos on YouTube
|
||||
description: Interact with YouTube videos, channels, and playlists
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -40,7 +40,7 @@ In Sim, the YouTube integration enables your agents to programmatically search a
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate YouTube into the workflow. Can search for videos.
|
||||
Integrate YouTube into the workflow. Can search for videos, get video details, get channel information, get playlist items, and get video comments.
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,99 @@ Search for videos on YouTube using the YouTube Data API.
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array of YouTube videos matching the search query |
|
||||
|
||||
### `youtube_video_details`
|
||||
|
||||
Get detailed information about a specific YouTube video.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `videoId` | string | Yes | YouTube video ID |
|
||||
| `apiKey` | string | Yes | YouTube API Key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `videoId` | string | YouTube video ID |
|
||||
| `title` | string | Video title |
|
||||
| `description` | string | Video description |
|
||||
| `channelId` | string | Channel ID |
|
||||
| `channelTitle` | string | Channel name |
|
||||
| `publishedAt` | string | Published date and time |
|
||||
| `duration` | string | Video duration in ISO 8601 format |
|
||||
| `viewCount` | number | Number of views |
|
||||
| `likeCount` | number | Number of likes |
|
||||
| `commentCount` | number | Number of comments |
|
||||
| `thumbnail` | string | Video thumbnail URL |
|
||||
| `tags` | array | Video tags |
|
||||
|
||||
### `youtube_channel_info`
|
||||
|
||||
Get detailed information about a YouTube channel.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `channelId` | string | No | YouTube channel ID \(use either channelId or username\) |
|
||||
| `username` | string | No | YouTube channel username \(use either channelId or username\) |
|
||||
| `apiKey` | string | Yes | YouTube API Key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `channelId` | string | YouTube channel ID |
|
||||
| `title` | string | Channel name |
|
||||
| `description` | string | Channel description |
|
||||
| `subscriberCount` | number | Number of subscribers |
|
||||
| `videoCount` | number | Number of videos |
|
||||
| `viewCount` | number | Total channel views |
|
||||
| `publishedAt` | string | Channel creation date |
|
||||
| `thumbnail` | string | Channel thumbnail URL |
|
||||
| `customUrl` | string | Channel custom URL |
|
||||
|
||||
### `youtube_playlist_items`
|
||||
|
||||
Get videos from a YouTube playlist.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `playlistId` | string | Yes | YouTube playlist ID |
|
||||
| `maxResults` | number | No | Maximum number of videos to return |
|
||||
| `pageToken` | string | No | Page token for pagination |
|
||||
| `apiKey` | string | Yes | YouTube API Key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array of videos in the playlist |
|
||||
|
||||
### `youtube_comments`
|
||||
|
||||
Get comments from a YouTube video.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `videoId` | string | Yes | YouTube video ID |
|
||||
| `maxResults` | number | No | Maximum number of comments to return |
|
||||
| `order` | string | No | Order of comments: time or relevance |
|
||||
| `pageToken` | string | No | Page token for pagination |
|
||||
| `apiKey` | string | Yes | YouTube API Key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array of comments from the video |
|
||||
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
251
apps/docs/content/docs/es/blocks/guardrails.mdx
Normal file
251
apps/docs/content/docs/es/blocks/guardrails.mdx
Normal file
@@ -0,0 +1,251 @@
|
||||
---
|
||||
title: Guardrails
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { Image } from '@/components/ui/image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/guardrails.png"
|
||||
alt="Guardrails Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Overview
|
||||
|
||||
The Guardrails block enables you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Validation Types
|
||||
|
||||
### JSON Validation
|
||||
|
||||
Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate JSON responses from Agent blocks before parsing
|
||||
- Ensure API payloads are properly formatted
|
||||
- Check structured data integrity
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if valid JSON, `false` otherwise
|
||||
- `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...")
|
||||
|
||||
### Regex Validation
|
||||
|
||||
Checks if content matches a specified regular expression pattern.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate email addresses
|
||||
- Check phone number formats
|
||||
- Verify URLs or custom identifiers
|
||||
- Enforce specific text patterns
|
||||
|
||||
**Configuration:**
|
||||
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if content matches pattern, `false` otherwise
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
### Hallucination Detection
|
||||
|
||||
Uses Retrieval-Augmented Generation (RAG) with LLM scoring to detect when AI-generated content contradicts or isn't grounded in your knowledge base.
|
||||
|
||||
**How It Works:**
|
||||
1. Queries your knowledge base for relevant context
|
||||
2. Sends both the AI output and retrieved context to an LLM
|
||||
3. LLM assigns a confidence score (0-10 scale)
|
||||
- **0** = Full hallucination (completely ungrounded)
|
||||
- **10** = Fully grounded (completely supported by knowledge base)
|
||||
4. Validation passes if score ≥ threshold (default: 3)
|
||||
|
||||
**Configuration:**
|
||||
- **Knowledge Base**: Select from your existing knowledge bases
|
||||
- **Model**: Choose LLM for scoring (requires strong reasoning - GPT-4o, Claude 3.7 Sonnet recommended)
|
||||
- **API Key**: Authentication for selected LLM provider (auto-hidden for hosted/Ollama models)
|
||||
- **Confidence Threshold**: Minimum score to pass (0-10, default: 3)
|
||||
- **Top K** (Advanced): Number of knowledge base chunks to retrieve (default: 10)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if confidence score ≥ threshold
|
||||
- `score`: Confidence score (0-10)
|
||||
- `reasoning`: LLM's explanation for the score
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Validate Agent responses against documentation
|
||||
- Ensure customer support answers are factually accurate
|
||||
- Verify generated content matches source material
|
||||
- Quality control for RAG applications
|
||||
|
||||
### PII Detection
|
||||
|
||||
Detects personally identifiable information using Microsoft Presidio. Supports 40+ entity types across multiple countries and languages.
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
**How It Works:**
|
||||
1. Scans content for PII entities using pattern matching and NLP
|
||||
2. Returns detected entities with locations and confidence scores
|
||||
3. Optionally masks detected PII in the output
|
||||
|
||||
**Configuration:**
|
||||
- **PII Types to Detect**: Select from grouped categories via modal selector
|
||||
- **Common**: Person name, Email, Phone, Credit card, IP address, etc.
|
||||
- **USA**: SSN, Driver's license, Passport, etc.
|
||||
- **UK**: NHS number, National insurance number
|
||||
- **Spain**: NIF, NIE, CIF
|
||||
- **Italy**: Fiscal code, Driver's license, VAT code
|
||||
- **Poland**: PESEL, NIP, REGON
|
||||
- **Singapore**: NRIC/FIN, UEN
|
||||
- **Australia**: ABN, ACN, TFN, Medicare
|
||||
- **India**: Aadhaar, PAN, Passport, Voter number
|
||||
- **Mode**:
|
||||
- **Detect**: Only identify PII (default)
|
||||
- **Mask**: Replace detected PII with masked values
|
||||
- **Language**: Detection language (default: English)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `false` if any selected PII types are detected
|
||||
- `detectedEntities`: Array of detected PII with type, location, and confidence
|
||||
- `maskedText`: Content with PII masked (only if mode = "Mask")
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Block content containing sensitive personal information
|
||||
- Mask PII before logging or storing data
|
||||
- Compliance with GDPR, HIPAA, and other privacy regulations
|
||||
- Sanitize user inputs before processing
|
||||
|
||||
## Configuration
|
||||
|
||||
### Content to Validate
|
||||
|
||||
The input content to validate. This typically comes from:
|
||||
- Agent block outputs: `<agent.content>`
|
||||
- Function block results: `<function.output>`
|
||||
- API responses: `<api.output>`
|
||||
- Any other block output
|
||||
|
||||
### Validation Type
|
||||
|
||||
Choose from four validation types:
|
||||
- **Valid JSON**: Check if content is properly formatted JSON
|
||||
- **Regex Match**: Verify content matches a regex pattern
|
||||
- **Hallucination Check**: Validate against knowledge base with LLM scoring
|
||||
- **PII Detection**: Detect and optionally mask personally identifiable information
|
||||
|
||||
## Outputs
|
||||
|
||||
All validation types return:
|
||||
|
||||
- **`<guardrails.passed>`**: Boolean indicating if validation passed
|
||||
- **`<guardrails.validationType>`**: The type of validation performed
|
||||
- **`<guardrails.input>`**: The original input that was validated
|
||||
- **`<guardrails.error>`**: Error message if validation failed (optional)
|
||||
|
||||
Additional outputs by type:
|
||||
|
||||
**Hallucination Check:**
|
||||
- **`<guardrails.score>`**: Confidence score (0-10)
|
||||
- **`<guardrails.reasoning>`**: LLM's explanation
|
||||
|
||||
**PII Detection:**
|
||||
- **`<guardrails.detectedEntities>`**: Array of detected PII entities
|
||||
- **`<guardrails.maskedText>`**: Content with PII masked (if mode = "Mask")
|
||||
|
||||
## Example Use Cases
|
||||
|
||||
### Validate JSON Before Parsing
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Ensure Agent output is valid JSON</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates structured JSON response</li>
|
||||
<li>Guardrails validates JSON format</li>
|
||||
<li>Condition block checks `<guardrails.passed>`</li>
|
||||
<li>If passed → Parse and use data, If failed → Retry or handle error</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Prevent Hallucinations
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Validate customer support responses</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates response to customer question</li>
|
||||
<li>Guardrails checks against support documentation knowledge base</li>
|
||||
<li>If confidence score ≥ 3 → Send response</li>
|
||||
<li>If confidence score \< 3 → Flag for human review</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Block PII in User Inputs
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Sanitize user-submitted content</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>User submits form with text content</li>
|
||||
<li>Guardrails detects PII (emails, phone numbers, SSN, etc.)</li>
|
||||
<li>If PII detected → Reject submission or mask sensitive data</li>
|
||||
<li>If no PII → Process normally</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails-example.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
### Validate Email Format
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Check email address format</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent extracts email from text</li>
|
||||
<li>Guardrails validates with regex pattern</li>
|
||||
<li>If valid → Use email for notification</li>
|
||||
<li>If invalid → Request correction</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Chain with Condition blocks**: Use `<guardrails.passed>` to branch workflow logic based on validation results
|
||||
- **Use JSON validation before parsing**: Always validate JSON structure before attempting to parse LLM outputs
|
||||
- **Choose appropriate PII types**: Only select the PII entity types relevant to your use case for better performance
|
||||
- **Set reasonable confidence thresholds**: For hallucination detection, adjust threshold based on your accuracy requirements (higher = stricter)
|
||||
- **Use strong models for hallucination detection**: GPT-4o or Claude 3.7 Sonnet provide more accurate confidence scoring
|
||||
- **Mask PII for logging**: Use "Mask" mode when you need to log or store content that may contain PII
|
||||
- **Test regex patterns**: Validate your regex patterns thoroughly before deploying to production
|
||||
- **Monitor validation failures**: Track `<guardrails.error>` messages to identify common validation issues
|
||||
|
||||
<Callout type="info">
|
||||
Guardrails validation happens synchronously in your workflow. For hallucination detection, choose faster models (like GPT-4o-mini) if latency is critical.
|
||||
</Callout>
|
||||
|
||||
@@ -180,6 +180,41 @@ Los diferentes planes de suscripción tienen diferentes límites de uso:
|
||||
|
||||
## Próximos pasos
|
||||
|
||||
- Revisa tu uso actual en [Configuración → Suscripción](https://sim.ai/settings/subscription)
|
||||
- Aprende sobre [Registro](/execution/logging) para seguir los detalles de ejecución
|
||||
- Explora la [API externa](/execution/api) para monitoreo programático de costos
|
||||
- Consulta las [técnicas de optimización de flujo de trabajo](/blocks) para reducir costos
|
||||
|
||||
**Plan de equipo (40$/asiento/mes):**
|
||||
- Uso compartido entre todos los miembros del equipo
|
||||
- Exceso calculado del uso total del equipo
|
||||
- El propietario de la organización recibe una sola factura
|
||||
|
||||
**Planes empresariales:**
|
||||
- Precio mensual fijo, sin excesos
|
||||
- Límites de uso personalizados según acuerdo
|
||||
|
||||
### Facturación por umbral
|
||||
|
||||
Cuando el exceso no facturado alcanza los 50$, Sim factura automáticamente el monto total no facturado.
|
||||
|
||||
**Ejemplo:**
|
||||
- Día 10: 70$ de exceso → Facturar 70$ inmediatamente
|
||||
- Día 15: 35$ adicionales de uso (105$ en total) → Ya facturado, sin acción
|
||||
- Día 20: Otros 50$ de uso (155$ en total, 85$ sin facturar) → Facturar 85$ inmediatamente
|
||||
|
||||
Esto distribuye los cargos grandes por exceso a lo largo del mes en lugar de una factura grande al final del período.
|
||||
|
||||
## Mejores prácticas de gestión de costos
|
||||
|
||||
1. **Monitorear regularmente**: Revisa tu panel de uso con frecuencia para evitar sorpresas
|
||||
2. **Establecer presupuestos**: Usa los límites del plan como guía para tus gastos
|
||||
3. **Optimizar flujos de trabajo**: Revisa las ejecuciones de alto costo y optimiza los prompts o la selección de modelos
|
||||
4. **Usar modelos apropiados**: Ajusta la complejidad del modelo a los requisitos de la tarea
|
||||
5. **Agrupar tareas similares**: Combina múltiples solicitudes cuando sea posible para reducir la sobrecarga
|
||||
|
||||
## Próximos pasos
|
||||
|
||||
- Revisa tu uso actual en [Configuración → Suscripción](https://sim.ai/settings/subscription)
|
||||
- Aprende sobre [Registro](/execution/logging) para seguir los detalles de ejecución
|
||||
- Explora la [API externa](/execution/api) para monitoreo programático de costos
|
||||
|
||||
@@ -814,12 +814,28 @@ async function checkUsage() {
|
||||
console.log(' Resets at:', limits.rateLimit.async.resetAt);
|
||||
console.log(' Is limited:', limits.rateLimit.async.isLimited);
|
||||
|
||||
console.log('\n=== Usage ===');
|
||||
console.log('Current period cost:
|
||||
console.log('\n=== Uso ===');
|
||||
console.log('Costo del período actual: $' + limits.usage.currentPeriodCost.toFixed(2));
|
||||
console.log('Límite: $' + limits.usage.limit.toFixed(2));
|
||||
console.log('Plan:', limits.usage.plan);
|
||||
|
||||
### Streaming Workflow Execution
|
||||
const percentUsed = (limits.usage.currentPeriodCost / limits.usage.limit) * 100;
|
||||
console.log('Uso: ' + percentUsed.toFixed(1) + '%');
|
||||
|
||||
Execute workflows with real-time streaming responses:
|
||||
if (percentUsed > 80) {
|
||||
console.warn('⚠️ Advertencia: ¡Estás acercándote a tu límite de uso!');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error al verificar el uso:', error);
|
||||
}
|
||||
}
|
||||
|
||||
checkUsage();
|
||||
```
|
||||
|
||||
### Ejecución de flujo de trabajo con streaming
|
||||
|
||||
Ejecuta flujos de trabajo con respuestas en streaming en tiempo real:
|
||||
|
||||
```typescript
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
@@ -842,11 +858,13 @@ async function executeWithStreaming() {
|
||||
console.error('Error:', error);
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
The streaming response follows the Server-Sent Events (SSE) format:
|
||||
|
||||
```
|
||||
|
||||
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":"One"}
|
||||
|
||||
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", dos"}
|
||||
@@ -854,11 +872,14 @@ data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", dos"}
|
||||
data: {"event":"done","success":true,"output":{},"metadata":{"duration":610}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
```
|
||||
|
||||
**React Streaming Example:**
|
||||
|
||||
```typescript
|
||||
```
|
||||
|
||||
typescript
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
function StreamingWorkflow() {
|
||||
@@ -926,6 +947,7 @@ function StreamingWorkflow() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Getting Your API Key
|
||||
@@ -957,35 +979,6 @@ function StreamingWorkflow() {
|
||||
- Node.js 16+
|
||||
- TypeScript 5.0+ (for TypeScript projects)
|
||||
|
||||
## TypeScript Support
|
||||
|
||||
The SDK is written in TypeScript and provides full type safety:
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SimStudioClient,
|
||||
WorkflowExecutionResult,
|
||||
WorkflowStatus,
|
||||
SimStudioError
|
||||
} from 'simstudio-ts-sdk';
|
||||
|
||||
// Type-safe client initialization
|
||||
const client: SimStudioClient = new SimStudioClient({
|
||||
apiKey: process.env.SIM_API_KEY!
|
||||
});
|
||||
|
||||
// Type-safe workflow execution
|
||||
const result: WorkflowExecutionResult = await client.executeWorkflow('workflow-id', {
|
||||
input: {
|
||||
message: '¡Hola, TypeScript!'
|
||||
}
|
||||
});
|
||||
|
||||
// Type-safe status checking
|
||||
const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Apache-2.0
|
||||
Apache-2.0
|
||||
@@ -59,11 +59,11 @@ Busca contenido similar en una base de conocimiento utilizando similitud vectori
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `knowledgeBaseId` | string | Sí | ID de la base de conocimiento en la que buscar |
|
||||
| `query` | string | No | Texto de consulta de búsqueda \(opcional cuando se usan filtros de etiquetas\) |
|
||||
| `query` | string | No | Texto de consulta de búsqueda \(opcional cuando se utilizan filtros de etiquetas\) |
|
||||
| `topK` | number | No | Número de resultados más similares a devolver \(1-100\) |
|
||||
| `tagFilters` | any | No | Array de filtros de etiquetas con propiedades tagName y tagValue |
|
||||
| `tagFilters` | array | No | Array de filtros de etiquetas con propiedades tagName y tagValue |
|
||||
|
||||
#### Salida
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@ Insertar datos en una tabla de Supabase
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Sí | ID de tu proyecto de Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Sí | Nombre de la tabla de Supabase donde insertar los datos |
|
||||
| `data` | any | Sí | Los datos a insertar |
|
||||
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Sí | Nombre de la tabla Supabase donde insertar datos |
|
||||
| `data` | array | Sí | Los datos a insertar \(array de objetos o un solo objeto\) |
|
||||
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
|
||||
|
||||
#### Salida
|
||||
@@ -189,10 +189,10 @@ Insertar o actualizar datos en una tabla de Supabase (operación upsert)
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `projectId` | string | Sí | El ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Sí | El nombre de la tabla de Supabase donde insertar o actualizar datos |
|
||||
| `data` | any | Sí | Los datos a insertar o actualizar \(upsert\) |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Sí | Nombre de la tabla Supabase donde hacer upsert de datos |
|
||||
| `data` | array | Sí | Los datos para upsert \(insertar o actualizar\) - array de objetos o un solo objeto |
|
||||
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
|
||||
|
||||
#### Salida
|
||||
|
||||
@@ -87,12 +87,108 @@ Envía mensajes a canales o usuarios de Telegram a través de la API de Bot de T
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Estado de éxito del envío del mensaje de Telegram |
|
||||
| `messageId` | number | Identificador único del mensaje de Telegram |
|
||||
| `chatId` | string | ID del chat de destino donde se envió el mensaje |
|
||||
| `text` | string | Contenido de texto del mensaje enviado |
|
||||
| `timestamp` | number | Marca de tiempo Unix cuando se envió el mensaje |
|
||||
| `from` | object | Información sobre el bot que envió el mensaje |
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Datos del mensaje de Telegram |
|
||||
|
||||
## Notas
|
||||
|
||||
- Categoría: `tools`
|
||||
- Tipo: `telegram`
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | string | Sí | Tu token de API de Bot de Telegram |
|
||||
| `chatId` | string | Sí | ID del chat de Telegram objetivo |
|
||||
| `messageId` | string | Sí | ID del mensaje a eliminar |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Resultado de la operación de eliminación |
|
||||
|
||||
### `telegram_send_photo`
|
||||
|
||||
Envía fotos a canales o usuarios de Telegram a través de la API de Bot de Telegram.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | string | Sí | Tu token de API de Bot de Telegram |
|
||||
| `chatId` | string | Sí | ID del chat de Telegram objetivo |
|
||||
| `photo` | string | Sí | Foto a enviar. Proporciona un file_id o URL HTTP |
|
||||
| `caption` | string | No | Pie de foto (opcional) |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Datos del mensaje de Telegram incluyendo foto(s) opcional(es) |
|
||||
|
||||
### `telegram_send_video`
|
||||
|
||||
Envía videos a canales o usuarios de Telegram a través de la API de Bot de Telegram.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | string | Sí | Tu token de API de Bot de Telegram |
|
||||
| `chatId` | string | Sí | ID del chat de Telegram objetivo |
|
||||
| `video` | string | Sí | Video a enviar. Proporciona un file_id o URL HTTP |
|
||||
| `caption` | string | No | Pie de video (opcional) |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Datos del mensaje de Telegram incluyendo medios opcionales |
|
||||
|
||||
### `telegram_send_audio`
|
||||
|
||||
Envía archivos de audio a canales o usuarios de Telegram a través de la API de Bot de Telegram.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | string | Sí | Tu token de API de Bot de Telegram |
|
||||
| `chatId` | string | Sí | ID del chat de Telegram objetivo |
|
||||
| `audio` | string | Sí | Archivo de audio para enviar. Proporciona un file_id o URL HTTP |
|
||||
| `caption` | string | No | Leyenda del audio \(opcional\) |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Datos del mensaje de Telegram incluyendo información de voz/audio |
|
||||
|
||||
### `telegram_send_animation`
|
||||
|
||||
Envía animaciones (GIFs) a canales o usuarios de Telegram a través de la API de Bot de Telegram.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | string | Sí | Tu token de API de Bot de Telegram |
|
||||
| `chatId` | string | Sí | ID del chat de Telegram objetivo |
|
||||
| `animation` | string | Sí | Animación para enviar. Proporciona un file_id o URL HTTP |
|
||||
| `caption` | string | No | Leyenda de la animación \(opcional\) |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Datos del mensaje de Telegram incluyendo medios opcionales |
|
||||
|
||||
## Notas
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: YouTube
|
||||
description: Buscar videos en YouTube
|
||||
description: Interactúa con videos, canales y listas de reproducción de YouTube
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -39,7 +39,7 @@ En Sim, la integración con YouTube permite a tus agentes buscar y analizar prog
|
||||
|
||||
## Instrucciones de uso
|
||||
|
||||
Integra YouTube en el flujo de trabajo. Puede buscar videos. Requiere clave API.
|
||||
Integra YouTube en el flujo de trabajo. Puede buscar videos, obtener detalles de videos, obtener información de canales, obtener elementos de listas de reproducción y obtener comentarios de videos.
|
||||
|
||||
## Herramientas
|
||||
|
||||
@@ -61,6 +61,99 @@ Busca videos en YouTube utilizando la API de datos de YouTube.
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array de videos de YouTube que coinciden con la consulta de búsqueda |
|
||||
|
||||
### `youtube_video_details`
|
||||
|
||||
Obtén información detallada sobre un video específico de YouTube.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `videoId` | string | Sí | ID del video de YouTube |
|
||||
| `apiKey` | string | Sí | Clave API de YouTube |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `videoId` | string | ID del video de YouTube |
|
||||
| `title` | string | Título del video |
|
||||
| `description` | string | Descripción del video |
|
||||
| `channelId` | string | ID del canal |
|
||||
| `channelTitle` | string | Nombre del canal |
|
||||
| `publishedAt` | string | Fecha y hora de publicación |
|
||||
| `duration` | string | Duración del video en formato ISO 8601 |
|
||||
| `viewCount` | number | Número de visualizaciones |
|
||||
| `likeCount` | number | Número de me gusta |
|
||||
| `commentCount` | number | Número de comentarios |
|
||||
| `thumbnail` | string | URL de la miniatura del video |
|
||||
| `tags` | array | Etiquetas del video |
|
||||
|
||||
### `youtube_channel_info`
|
||||
|
||||
Obtén información detallada sobre un canal de YouTube.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `channelId` | string | No | ID del canal de YouTube \(usa channelId o username\) |
|
||||
| `username` | string | No | Nombre de usuario del canal de YouTube \(usa channelId o username\) |
|
||||
| `apiKey` | string | Sí | Clave API de YouTube |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `channelId` | string | ID del canal de YouTube |
|
||||
| `title` | string | Nombre del canal |
|
||||
| `description` | string | Descripción del canal |
|
||||
| `subscriberCount` | number | Número de suscriptores |
|
||||
| `videoCount` | number | Número de videos |
|
||||
| `viewCount` | number | Vistas totales del canal |
|
||||
| `publishedAt` | string | Fecha de creación del canal |
|
||||
| `thumbnail` | string | URL de la miniatura del canal |
|
||||
| `customUrl` | string | URL personalizada del canal |
|
||||
|
||||
### `youtube_playlist_items`
|
||||
|
||||
Obtener videos de una lista de reproducción de YouTube.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `playlistId` | string | Sí | ID de la lista de reproducción de YouTube |
|
||||
| `maxResults` | number | No | Número máximo de videos a devolver |
|
||||
| `pageToken` | string | No | Token de página para paginación |
|
||||
| `apiKey` | string | Sí | Clave API de YouTube |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array de videos en la lista de reproducción |
|
||||
|
||||
### `youtube_comments`
|
||||
|
||||
Obtener comentarios de un video de YouTube.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `videoId` | string | Sí | ID del video de YouTube |
|
||||
| `maxResults` | number | No | Número máximo de comentarios a devolver |
|
||||
| `order` | string | No | Orden de los comentarios: time (tiempo) o relevance (relevancia) |
|
||||
| `pageToken` | string | No | Token de página para paginación |
|
||||
| `apiKey` | string | Sí | Clave API de YouTube |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | Array de comentarios del video |
|
||||
|
||||
## Notas
|
||||
|
||||
- Categoría: `tools`
|
||||
|
||||
@@ -128,3 +128,60 @@ Si no se define un formato de entrada, el ejecutor expone el JSON sin procesar s
|
||||
<Callout type="warning">
|
||||
Un flujo de trabajo puede contener solo un disparador de API. Publica una nueva implementación después de los cambios para que el endpoint se mantenga actualizado.
|
||||
</Callout>
|
||||
|
||||
### Formato de carga de archivos
|
||||
|
||||
La API acepta archivos en dos formatos:
|
||||
|
||||
**1. Archivos codificados en Base64** (recomendado para SDKs):
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "file",
|
||||
"data": "data:application/pdf;base64,JVBERi0xLjQK...",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- Tamaño máximo de archivo: 20MB por archivo
|
||||
- Los archivos se suben al almacenamiento en la nube y se convierten en objetos UserFile con todas las propiedades
|
||||
|
||||
**2. Referencias directas de URL**:
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "url",
|
||||
"data": "https://example.com/document.pdf",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- El archivo no se sube, la URL se pasa directamente
|
||||
- Útil para referenciar archivos existentes
|
||||
|
||||
### Propiedades de archivos
|
||||
|
||||
Para archivos, accede a todas las propiedades:
|
||||
|
||||
| Propiedad | Descripción | Tipo |
|
||||
|----------|-------------|------|
|
||||
| `<api.fieldName[0].url>` | URL de descarga firmada | string |
|
||||
| `<api.fieldName[0].name>` | Nombre original del archivo | string |
|
||||
| `<api.fieldName[0].size>` | Tamaño del archivo en bytes | number |
|
||||
| `<api.fieldName[0].type>` | Tipo MIME | string |
|
||||
| `<api.fieldName[0].uploadedAt>` | Marca de tiempo de subida (ISO 8601) | string |
|
||||
| `<api.fieldName[0].expiresAt>` | Marca de tiempo de caducidad de URL (ISO 8601) | string |
|
||||
|
||||
Para archivos referenciados por URL, las mismas propiedades están disponibles excepto `uploadedAt` y `expiresAt` ya que el archivo no se sube a nuestro almacenamiento.
|
||||
|
||||
Si no se define un formato de entrada, el ejecutor expone solo el JSON sin procesar en `<api.input>`.
|
||||
|
||||
<Callout type="warning">
|
||||
Un flujo de trabajo puede contener solo un disparador de API. Publica una nueva implementación después de los cambios para que el punto de conexión se mantenga actualizado.
|
||||
</Callout>
|
||||
|
||||
@@ -41,3 +41,11 @@ Los archivos incluyen `name`, `mimeType`, y una descarga firmada `url`.
|
||||
<Callout type="info">
|
||||
El constructor bloquea múltiples bloques de Disparador de Chat en el mismo flujo de trabajo.
|
||||
</Callout>
|
||||
|
||||
1. Añade un bloque de Disparador de Chat por flujo de trabajo.
|
||||
2. Despliega el flujo de trabajo en modo chat.
|
||||
3. Comparte el enlace de despliegue—cada respuesta reutiliza el ID de conversación para que el flujo de trabajo pueda mantener el contexto.
|
||||
|
||||
<Callout type="info">
|
||||
El constructor bloquea múltiples bloques de Disparador de Chat en el mismo flujo de trabajo.
|
||||
</Callout>
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
---
|
||||
title: Sintaxis de referencia de bloques
|
||||
description: Cómo referenciar datos entre bloques en flujos de trabajo YAML
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
Las referencias de bloques son la base del flujo de datos en los flujos de trabajo de Sim. Entender cómo referenciar correctamente las salidas de un bloque como entradas para otro es esencial para construir flujos de trabajo funcionales.
|
||||
|
||||
## Reglas básicas de referencia
|
||||
|
||||
### 1. Usa nombres de bloques, no IDs de bloques
|
||||
|
||||
<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. Convierte nombres al formato de referencia
|
||||
|
||||
Para crear una referencia de bloque:
|
||||
|
||||
1. **Toma el nombre del bloque**: "Email Generator"
|
||||
2. **Conviértelo a minúsculas**: "email generator"
|
||||
3. **Elimina espacios y caracteres especiales**: "emailgenerator"
|
||||
4. **Añade la propiedad**: `<emailgenerator.content>`
|
||||
|
||||
### 3. Usa las propiedades correctas
|
||||
|
||||
Diferentes tipos de bloques exponen diferentes propiedades:
|
||||
|
||||
- **Bloques de agente**: `.content` (la respuesta de la IA)
|
||||
- **Bloques de función**: `.output` (el valor de retorno)
|
||||
- **Bloques de API**: `.output` (los datos de respuesta)
|
||||
- **Bloques de herramientas**: `.output` (el resultado de la herramienta)
|
||||
|
||||
## Ejemplos de referencias
|
||||
|
||||
### Referencias de bloques comunes
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Nombres de bloques con múltiples palabras
|
||||
|
||||
```yaml
|
||||
# Block name: "Data Processor 2"
|
||||
<dataprocessor2.output>
|
||||
|
||||
# Block name: "Email Validation Service"
|
||||
<emailvalidationservice.output>
|
||||
|
||||
# Block name: "Customer Info Agent"
|
||||
<customerinfoagent.content>
|
||||
```
|
||||
|
||||
## Casos especiales de referencia
|
||||
|
||||
### Bloque inicial
|
||||
|
||||
<Callout type="warning">
|
||||
El bloque inicial siempre se referencia como `<start.input>` independientemente de su nombre real.
|
||||
</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
|
||||
```
|
||||
|
||||
### Variables de bucle
|
||||
|
||||
Dentro de los bloques de bucle, hay variables especiales disponibles:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
### Variables paralelas
|
||||
|
||||
Dentro de los bloques paralelos, hay variables especiales disponibles:
|
||||
|
||||
```yaml
|
||||
# Available in parallel child blocks
|
||||
<parallel.index> # Instance number (0-based)
|
||||
<parallel.currentItem> # Item for this instance
|
||||
<parallel.items> # Full collection
|
||||
```
|
||||
|
||||
## Ejemplos de referencias complejas
|
||||
|
||||
### Acceso a datos anidados
|
||||
|
||||
Cuando se hace referencia a objetos complejos, utiliza la notación de punto:
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Múltiples referencias en texto
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Referencias en bloques de código
|
||||
|
||||
Cuando se utilizan referencias en bloques de función, se reemplazan como valores de JavaScript:
|
||||
|
||||
```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
|
||||
};
|
||||
```
|
||||
|
||||
## Validación de referencias
|
||||
|
||||
Sim valida todas las referencias al importar YAML:
|
||||
|
||||
### Referencias válidas
|
||||
- El bloque existe en el flujo de trabajo
|
||||
- La propiedad es apropiada para el tipo de bloque
|
||||
- No hay dependencias circulares
|
||||
- Formato de sintaxis adecuado
|
||||
|
||||
### Errores comunes
|
||||
- **Bloque no encontrado**: El bloque referenciado no existe
|
||||
- **Propiedad incorrecta**: Usar `.content` en un bloque de función
|
||||
- **Errores tipográficos**: Nombres de bloques o propiedades mal escritos
|
||||
- **Referencias circulares**: El bloque se referencia a sí mismo directa o indirectamente
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
1. **Usar nombres descriptivos para los bloques**: Hace que las referencias sean más legibles
|
||||
2. **Ser consistente**: Utilizar la misma convención de nomenclatura en todo el documento
|
||||
3. **Verificar referencias**: Asegurarse de que todos los bloques referenciados existan
|
||||
4. **Evitar anidamiento profundo**: Mantener las cadenas de referencia manejables
|
||||
5. **Documentar flujos complejos**: Añadir comentarios para explicar las relaciones de referencia
|
||||
@@ -1,218 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML de bloques de agente
|
||||
description: Referencia de configuración YAML para bloques de agente
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración de herramientas
|
||||
|
||||
Las herramientas se definen como un array donde cada herramienta tiene esta estructura:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Configuración de conexiones
|
||||
|
||||
Las conexiones definen hacia dónde va el flujo de trabajo según los resultados de la ejecución:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Agente básico
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Agente con herramientas
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Salida estructurada
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,429 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque API
|
||||
description: Referencia de configuración YAML para bloques API
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
params:
|
||||
type: array
|
||||
description: Query parameters as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the parameter entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Parameter name
|
||||
Value:
|
||||
type: string
|
||||
description: Parameter value
|
||||
headers:
|
||||
type: array
|
||||
description: HTTP headers as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
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
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
Las conexiones definen hacia dónde va el flujo de trabajo según los resultados de la solicitud:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful requests
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Solicitud GET simple
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
- id: header-2-uuid-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
connections:
|
||||
success: process-user-data
|
||||
error: handle-api-error
|
||||
```
|
||||
|
||||
### Solicitud POST con cuerpo
|
||||
|
||||
```yaml
|
||||
create-ticket:
|
||||
type: api
|
||||
name: "Create Support Ticket"
|
||||
inputs:
|
||||
url: "https://api.support.com/tickets"
|
||||
method: POST
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{SUPPORT_API_KEY}}"
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"title": "<agent.title>",
|
||||
"description": "<agent.description>",
|
||||
"priority": "high"
|
||||
}
|
||||
connections:
|
||||
success: ticket-created
|
||||
error: ticket-error
|
||||
```
|
||||
|
||||
### URL dinámica con parámetros de consulta
|
||||
|
||||
```yaml
|
||||
search-api:
|
||||
type: api
|
||||
name: "Search Products"
|
||||
inputs:
|
||||
url: "https://api.store.com/products"
|
||||
method: GET
|
||||
params:
|
||||
- id: search-param-uuid
|
||||
cells:
|
||||
Key: "q"
|
||||
Value: <start.searchTerm>
|
||||
- id: limit-param-uuid
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
- id: category-param-uuid
|
||||
cells:
|
||||
Key: "category"
|
||||
Value: <filter.category>
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{STORE_API_KEY}}"
|
||||
connections:
|
||||
success: display-results
|
||||
```
|
||||
|
||||
## Formato de parámetros
|
||||
|
||||
Los encabezados y parámetros (parámetros de consulta) utilizan el formato de tabla con la siguiente estructura:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: another-unique-identifier
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
|
||||
params:
|
||||
- id: param-identifier-here
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
```
|
||||
|
||||
**Detalles de la estructura:**
|
||||
- `id`: Identificador único para rastrear la fila de la tabla
|
||||
- `cells.Key`: El nombre del parámetro/encabezado
|
||||
- `cells.Value`: El valor del parámetro/encabezado
|
||||
- Este formato permite una gestión adecuada de la tabla y la preservación del estado de la interfaz de usuario
|
||||
|
||||
## Referencias de salida
|
||||
|
||||
Después de que un bloque API se ejecuta, puedes hacer referencia a sus salidas en bloques posteriores. El bloque API proporciona tres salidas principales:
|
||||
|
||||
### Salidas disponibles
|
||||
|
||||
| Salida | Tipo | Descripción |
|
||||
|--------|------|-------------|
|
||||
| `data` | cualquiera | El cuerpo/carga de respuesta de la API |
|
||||
| `status` | número | Código de estado HTTP (200, 404, 500, etc.) |
|
||||
| `headers` | objeto | Encabezados de respuesta devueltos por el servidor |
|
||||
|
||||
### Ejemplos de uso
|
||||
|
||||
```yaml
|
||||
# Reference API response data
|
||||
process-data:
|
||||
type: function
|
||||
name: "Process API Data"
|
||||
inputs:
|
||||
code: |
|
||||
const responseData = <fetchuserdata.data>;
|
||||
const statusCode = <fetchuserdata.status>;
|
||||
const responseHeaders = <fetchuserdata.headers>;
|
||||
|
||||
if (statusCode === 200) {
|
||||
return {
|
||||
success: true,
|
||||
user: responseData,
|
||||
contentType: responseHeaders['content-type']
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
error: `API call failed with status ${statusCode}`
|
||||
};
|
||||
}
|
||||
|
||||
# Use API data in an agent block
|
||||
analyze-response:
|
||||
type: agent
|
||||
name: "Analyze Response"
|
||||
inputs:
|
||||
userPrompt: |
|
||||
Analyze this API response:
|
||||
|
||||
Status: <fetchuserdata.status>
|
||||
Data: <fetchuserdata.data>
|
||||
|
||||
Provide insights about the response.
|
||||
|
||||
# Conditional logic based on status
|
||||
check-status:
|
||||
type: condition
|
||||
name: "Check API Status"
|
||||
inputs:
|
||||
condition: <fetchuserdata.status> === 200
|
||||
connections:
|
||||
true: success-handler
|
||||
false: error-handler
|
||||
```
|
||||
|
||||
### Ejemplo práctico
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
connections:
|
||||
success: process-response
|
||||
|
||||
process-response:
|
||||
type: function
|
||||
name: "Process Response"
|
||||
inputs:
|
||||
code: |
|
||||
const user = <fetchuserdata.data>;
|
||||
const status = <fetchuserdata.status>;
|
||||
|
||||
console.log(`API returned status: ${status}`);
|
||||
console.log(`User data:`, user);
|
||||
|
||||
return {
|
||||
userId: user.id,
|
||||
email: user.email,
|
||||
isActive: status === 200
|
||||
};
|
||||
```
|
||||
|
||||
### Manejo de errores
|
||||
|
||||
```yaml
|
||||
api-with-error-handling:
|
||||
type: api
|
||||
name: "API Call"
|
||||
inputs:
|
||||
url: "https://api.example.com/data"
|
||||
method: GET
|
||||
connections:
|
||||
success: check-response
|
||||
error: handle-error
|
||||
|
||||
check-response:
|
||||
type: condition
|
||||
name: "Check Response Status"
|
||||
inputs:
|
||||
condition: <apicall.status> >= 200 && <apicall.status> < 300
|
||||
connections:
|
||||
true: process-success
|
||||
false: handle-api-error
|
||||
|
||||
process-success:
|
||||
type: function
|
||||
name: "Process Success"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: true,
|
||||
data: <apicall.data>,
|
||||
message: "API call successful"
|
||||
};
|
||||
|
||||
handle-api-error:
|
||||
type: function
|
||||
name: "Handle API Error"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: false,
|
||||
status: <apicall.status>,
|
||||
error: "API call failed",
|
||||
data: <apicall.data>
|
||||
};
|
||||
```
|
||||
|
||||
## Escape de cadenas en YAML
|
||||
|
||||
Al escribir YAML, ciertas cadenas deben estar entre comillas para ser analizadas correctamente:
|
||||
|
||||
### Cadenas que deben estar entre comillas
|
||||
|
||||
```yaml
|
||||
# URLs with hyphens, colons, special characters
|
||||
url: "https://api.example.com/users/123"
|
||||
url: "https://my-api.example.com/data"
|
||||
|
||||
# Header values with hyphens or special characters
|
||||
headers:
|
||||
- id: header-uuid
|
||||
cells:
|
||||
Key: "User-Agent"
|
||||
Value: "My-Application/1.0"
|
||||
- id: auth-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer my-token-123"
|
||||
|
||||
# Parameter values with hyphens
|
||||
params:
|
||||
- id: param-uuid
|
||||
cells:
|
||||
Key: "sort-by"
|
||||
Value: "created-at"
|
||||
```
|
||||
|
||||
### Cuándo usar comillas
|
||||
|
||||
- ✅ **Siempre usar comillas para**: URLs, tokens, valores con guiones, dos puntos o caracteres especiales
|
||||
- ✅ **Siempre usar comillas para**: Valores que comienzan con números pero deben ser cadenas
|
||||
- ✅ **Siempre usar comillas para**: Cadenas que parecen booleanos pero deben permanecer como cadenas
|
||||
- ❌ **No usar comillas para**: Cadenas alfanuméricas simples sin caracteres especiales
|
||||
|
||||
### Ejemplos
|
||||
|
||||
```yaml
|
||||
# ✅ Correct
|
||||
url: "https://api.stripe.com/v1/charges"
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer sk-test-123456789"
|
||||
|
||||
# ❌ Incorrect (may cause parsing errors)
|
||||
url: https://api.stripe.com/v1/charges
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: Authorization
|
||||
Value: Bearer sk-test-123456789
|
||||
```
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- Usar variables de entorno para claves API: `{{API_KEY_NAME}}`
|
||||
- Incluir manejo de errores con conexiones de error
|
||||
- Establecer tiempos de espera apropiados para tu caso de uso
|
||||
- Validar códigos de estado de respuesta en bloques subsiguientes
|
||||
- Usar nombres de bloque significativos para facilitar la referencia
|
||||
- **Siempre poner entre comillas las cadenas con caracteres especiales, URLs y tokens**
|
||||
@@ -1,165 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque de condición
|
||||
description: Referencia de configuración YAML para bloques de condición
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
A diferencia de otros bloques, las condiciones utilizan conexiones ramificadas basadas en los resultados de la condición:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### If-Else simple
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Múltiples condiciones
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Comparaciones numéricas
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Lógica compleja
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,255 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque evaluador
|
||||
description: Referencia de configuración YAML para bloques evaluadores
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración de conexiones
|
||||
|
||||
Las conexiones definen hacia dónde va el flujo de trabajo según los resultados de la evaluación:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful evaluation
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Evaluación de calidad de contenido
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Evaluación de respuesta al cliente
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Evaluación de pruebas A/B
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Puntuación multidimensional de contenido
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Referencias de salida
|
||||
|
||||
Después de que un bloque evaluador se ejecuta, puedes hacer referencia a sus salidas:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- Define criterios de evaluación claros y específicos
|
||||
- Utiliza rangos de puntuación apropiados para tu caso de uso
|
||||
- Elige modelos con fuertes capacidades de razonamiento
|
||||
- Usa temperatura más baja para puntuaciones consistentes
|
||||
- Incluye descripciones detalladas de métricas
|
||||
- Prueba con diversos tipos de contenido
|
||||
- Considera múltiples evaluadores para evaluaciones complejas
|
||||
@@ -1,162 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML de bloque de función
|
||||
description: Referencia de configuración YAML para bloques de función
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
Las conexiones definen hacia dónde va el flujo de trabajo según los resultados de la ejecución:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Validación simple
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Procesamiento de datos
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Integración de API
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Cálculos
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,151 +0,0 @@
|
||||
---
|
||||
title: Esquemas de bloques
|
||||
description: Referencia completa del esquema YAML para todos los bloques de Sim
|
||||
---
|
||||
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
|
||||
Esta sección contiene las definiciones completas del esquema YAML para todos los tipos de bloques disponibles en Sim. Cada tipo de bloque tiene requisitos de configuración específicos y formatos de salida.
|
||||
|
||||
## Bloques principales
|
||||
|
||||
Estos son los bloques esenciales para crear flujos de trabajo:
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloque de inicio" href="/yaml/blocks/starter">
|
||||
Punto de entrada del flujo de trabajo que admite activadores manuales, webhooks y programaciones
|
||||
</Card>
|
||||
<Card title="Bloque de agente" href="/yaml/blocks/agent">
|
||||
Procesamiento impulsado por IA con integración de LLM y soporte de herramientas
|
||||
</Card>
|
||||
<Card title="Bloque de función" href="/yaml/blocks/function">
|
||||
Entorno de ejecución de código JavaScript/TypeScript personalizado
|
||||
</Card>
|
||||
<Card title="Bloque de respuesta" href="/yaml/blocks/response">
|
||||
Formatear y devolver los resultados finales del flujo de trabajo
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Lógica y flujo de control
|
||||
|
||||
Bloques para implementar lógica condicional y flujo de control:
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloque de condición" href="/yaml/blocks/condition">
|
||||
Ramificación condicional basada en expresiones booleanas
|
||||
</Card>
|
||||
<Card title="Bloque de enrutador" href="/yaml/blocks/router">
|
||||
Enrutamiento inteligente impulsado por IA a múltiples rutas
|
||||
</Card>
|
||||
<Card title="Bloque de bucle" href="/yaml/blocks/loop">
|
||||
Procesamiento iterativo con bucles for y forEach
|
||||
</Card>
|
||||
<Card title="Bloque paralelo" href="/yaml/blocks/parallel">
|
||||
Ejecución concurrente en múltiples instancias
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Bloques de integración
|
||||
|
||||
Bloques para conectar con servicios y sistemas externos:
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloque de API" href="/yaml/blocks/api">
|
||||
Solicitudes HTTP a APIs REST externas
|
||||
</Card>
|
||||
<Card title="Bloque de webhook" href="/yaml/blocks/webhook">
|
||||
Activadores de webhook para integraciones externas
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Bloques avanzados
|
||||
|
||||
Bloques especializados para patrones de flujo de trabajo complejos:
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloque evaluador" href="/yaml/blocks/evaluator">
|
||||
Validar salidas según criterios y métricas definidos
|
||||
</Card>
|
||||
<Card title="Bloque de flujo de trabajo" href="/yaml/blocks/workflow">
|
||||
Ejecutar otros flujos de trabajo como componentes reutilizables
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Elementos comunes del esquema
|
||||
|
||||
Todos los bloques comparten estos elementos comunes:
|
||||
|
||||
### Estructura básica
|
||||
|
||||
```yaml
|
||||
block-id:
|
||||
type: <block-type>
|
||||
name: <display-name>
|
||||
inputs:
|
||||
# Block-specific configuration
|
||||
connections:
|
||||
# Connection definitions
|
||||
```
|
||||
|
||||
### Tipos de conexión
|
||||
|
||||
- **success**: Bloque objetivo para ejecución exitosa
|
||||
- **error**: Bloque objetivo para manejo de errores (opcional)
|
||||
- **conditions**: Múltiples rutas para bloques condicionales
|
||||
|
||||
### Variables de entorno
|
||||
|
||||
Usa dobles llaves para las variables de entorno:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{API_KEY_NAME}}'
|
||||
endpoint: '{{SERVICE_ENDPOINT}}'
|
||||
```
|
||||
|
||||
### Referencias de bloque
|
||||
|
||||
Referencia las salidas de otros bloques usando el nombre del bloque en minúsculas:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
userPrompt: <blockname.content>
|
||||
data: <functionblock.output>
|
||||
originalInput: <start.input>
|
||||
```
|
||||
|
||||
## Reglas de validación
|
||||
|
||||
Todos los bloques YAML se validan contra sus esquemas:
|
||||
|
||||
1. **Campos obligatorios**: Deben estar presentes
|
||||
2. **Validación de tipo**: Los valores deben coincidir con los tipos esperados
|
||||
3. **Validación de enumeración**: Los valores de cadena deben ser de las listas permitidas
|
||||
4. **Validación de rango**: Los números deben estar dentro de los rangos especificados
|
||||
5. **Validación de patrón**: Las cadenas deben coincidir con patrones regex (cuando corresponda)
|
||||
|
||||
## Referencia rápida
|
||||
|
||||
### Tipos de bloques y propiedades
|
||||
|
||||
| Tipo de bloque | Salida principal | Casos de uso comunes |
|
||||
|------------|----------------|------------------|
|
||||
| starter | `.input` | Punto de entrada del flujo de trabajo |
|
||||
| agent | `.content` | Procesamiento de IA, generación de texto |
|
||||
| function | `.output` | Transformación de datos, cálculos |
|
||||
| api | `.output` | Integración con servicios externos |
|
||||
| condition | N/A (ramificación) | Lógica condicional |
|
||||
| router | N/A (ramificación) | Enrutamiento inteligente |
|
||||
| response | N/A (terminal) | Formateo de salida final |
|
||||
| loop | `.results` | Procesamiento iterativo |
|
||||
| parallel | `.results` | Procesamiento concurrente |
|
||||
| webhook | `.payload` | Disparadores externos |
|
||||
| evaluator | `.score` | Validación de salida, evaluación de calidad |
|
||||
| workflow | `.output` | Ejecución de subflujos de trabajo, modularidad |
|
||||
|
||||
### Obligatorio vs opcional
|
||||
|
||||
- **Siempre obligatorio**: `type`, `name`
|
||||
- **Generalmente obligatorio**: `inputs`, `connections`
|
||||
- **Dependiente del contexto**: Los campos de entrada específicos varían según el tipo de bloque
|
||||
- **Siempre opcional**: Conexiones `error`, campos específicos de la interfaz de usuario
|
||||
@@ -1,312 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML de bloque paralelo
|
||||
description: Referencia de configuración YAML para bloques paralelos
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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)
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
Los bloques paralelos utilizan un formato de conexión especial con una sección `parallel`:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Configuración de bloques secundarios
|
||||
|
||||
Los bloques dentro de un bloque paralelo deben tener su `parentId` configurado con el ID del bloque paralelo:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Procesamiento paralelo basado en conteo
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Procesamiento paralelo basado en colecciones
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Pipeline de procesamiento paralelo complejo
|
||||
|
||||
```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>
|
||||
};
|
||||
```
|
||||
|
||||
### Análisis de IA concurrente
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Variables paralelas
|
||||
|
||||
Dentro de los bloques secundarios paralelos, estas variables especiales están disponibles:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Referencias de salida
|
||||
|
||||
Después de que un bloque paralelo se completa, puedes hacer referencia a sus resultados agregados:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- Utiliza un maxConcurrency apropiado para evitar sobrecargar las APIs
|
||||
- Asegúrate de que las operaciones sean independientes y no dependan entre sí
|
||||
- Incluye manejo de errores para una ejecución paralela robusta
|
||||
- Prueba primero con colecciones pequeñas
|
||||
- Monitorea los límites de frecuencia para APIs externas
|
||||
- Usa el tipo collection para distribuir trabajo, tipo count para instancias fijas
|
||||
- Considera el uso de memoria con colecciones grandes
|
||||
@@ -1,239 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque de respuesta
|
||||
description: Referencia de configuración YAML para bloques de respuesta
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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 table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
Los bloques de respuesta son bloques terminales (sin conexiones salientes) y definen la salida final:
|
||||
|
||||
```yaml
|
||||
# No connections object needed - Response blocks are always terminal
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Respuesta simple
|
||||
|
||||
```yaml
|
||||
simple-response:
|
||||
type: response
|
||||
name: "Simple Response"
|
||||
inputs:
|
||||
data:
|
||||
message: "Hello World"
|
||||
timestamp: <function.timestamp>
|
||||
status: 200
|
||||
```
|
||||
|
||||
### Respuesta exitosa
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
### Respuesta con formato completo de encabezado de tabla
|
||||
|
||||
Cuando los encabezados se crean a través de la interfaz de tabla de la UI, el YAML incluye metadatos adicionales:
|
||||
|
||||
```yaml
|
||||
api-response:
|
||||
type: response
|
||||
name: "API Response"
|
||||
inputs:
|
||||
data:
|
||||
message: "Request processed successfully"
|
||||
id: <agent.request_id>
|
||||
status: 200
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: header-2-uuid-here
|
||||
key: "Cache-Control"
|
||||
value: "no-cache"
|
||||
cells:
|
||||
Key: "Cache-Control"
|
||||
Value: "no-cache"
|
||||
- id: header-3-uuid-here
|
||||
key: "X-API-Version"
|
||||
value: "2.1"
|
||||
cells:
|
||||
Key: "X-API-Version"
|
||||
Value: "2.1"
|
||||
```
|
||||
|
||||
### Respuesta de error
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
### Respuesta paginada
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
## Formatos de parámetros de tabla
|
||||
|
||||
El bloque de respuesta admite dos formatos para encabezados:
|
||||
|
||||
### Formato simplificado (YAML manual)
|
||||
|
||||
Al escribir YAML manualmente, puedes usar el formato simplificado:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
- key: "Cache-Control"
|
||||
value: "no-cache"
|
||||
```
|
||||
|
||||
### Formato de tabla completo (generado por la UI)
|
||||
|
||||
Cuando los encabezados se crean a través de la interfaz de tabla de la UI, el YAML incluye metadatos adicionales:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
```
|
||||
|
||||
**Diferencias clave:**
|
||||
- `id`: Identificador único para rastrear la fila de la tabla
|
||||
- `cells`: Valores de visualización utilizados por la interfaz de tabla de la UI
|
||||
- Ambos formatos son funcionalmente equivalentes para la ejecución del flujo de trabajo
|
||||
- El formato completo preserva el estado de la UI al importar/exportar flujos de trabajo
|
||||
|
||||
**Importante:** Siempre coloca entre comillas los nombres de encabezados y valores que contengan caracteres especiales:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: cache-control-uuid
|
||||
cells:
|
||||
Key: "Cache-Control"
|
||||
Value: "no-cache"
|
||||
```
|
||||
|
||||
```
|
||||
@@ -1,200 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque Router
|
||||
description: Referencia de configuración YAML para bloques Router
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
Los bloques Router utilizan un array de éxito que contiene todos los posibles destinos de enrutamiento:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Router de tipo de contenido
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Router de prioridad
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Router de departamento
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración avanzada
|
||||
|
||||
### Router de múltiples modelos
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Referencias de salida
|
||||
|
||||
Los bloques Router no producen salidas directas, sino que controlan la ruta del flujo de trabajo:
|
||||
|
||||
```yaml
|
||||
# Router decisions affect which subsequent blocks execute
|
||||
# Access the routed block's outputs normally:
|
||||
final-step:
|
||||
inputs:
|
||||
routed-result: <routed-block-name.content>
|
||||
```
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- Proporcionar criterios de enrutamiento claros en el prompt
|
||||
- Usar nombres de bloques de destino específicos y descriptivos
|
||||
- Incluir ejemplos de contenido para cada ruta de enrutamiento
|
||||
- Utilizar valores de temperatura más bajos para un enrutamiento consistente
|
||||
- Probar con diversos tipos de entrada para garantizar un enrutamiento preciso
|
||||
- Considerar rutas alternativas para casos excepcionales
|
||||
@@ -1,183 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque de inicio
|
||||
description: Referencia de configuración YAML para bloques de inicio
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
El bloque de inicio solo tiene una conexión de éxito ya que es el punto de entrada:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID to execute when workflow starts
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Inicio manual
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: next-block
|
||||
```
|
||||
|
||||
### Inicio manual con formato de entrada
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Programación diaria
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: daily
|
||||
dailyTime: "09:00"
|
||||
timezone: "America/New_York"
|
||||
connections:
|
||||
success: daily-task
|
||||
```
|
||||
|
||||
### Programación semanal
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: weekly
|
||||
weeklyDay: MON
|
||||
weeklyTime: "08:30"
|
||||
timezone: UTC
|
||||
connections:
|
||||
success: weekly-report
|
||||
```
|
||||
|
||||
### Disparador de webhook
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: webhook
|
||||
webhookProvider: slack
|
||||
webhookConfig:
|
||||
# Provider-specific configuration
|
||||
connections:
|
||||
success: process-webhook
|
||||
```
|
||||
@@ -1,403 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque Webhook
|
||||
description: Referencia de configuración YAML para bloques Webhook
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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 as table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Expected header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
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 as table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
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
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
Las conexiones definen hacia dónde va el flujo de trabajo basado en el procesamiento del webhook:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful processing
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Disparador básico de Webhook
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Webhook de eventos de Slack
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Webhook de pago (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
|
||||
```
|
||||
|
||||
### Webhook con formato completo de encabezado de tabla
|
||||
|
||||
Cuando los encabezados se crean a través de la interfaz de tabla UI, el YAML incluye metadatos adicionales:
|
||||
|
||||
```yaml
|
||||
api-webhook-complete:
|
||||
type: webhook
|
||||
name: "API Webhook with Table Headers"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
methods: [POST]
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
key: "Authorization"
|
||||
value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
- id: header-2-uuid-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
responseConfig:
|
||||
status: 200
|
||||
headers:
|
||||
- id: response-header-1-uuid
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: response-header-2-uuid
|
||||
key: "X-Webhook-Response"
|
||||
value: "processed"
|
||||
cells:
|
||||
Key: "X-Webhook-Response"
|
||||
Value: "processed"
|
||||
body: |
|
||||
{
|
||||
"status": "received",
|
||||
"timestamp": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-webhook-complete
|
||||
```
|
||||
|
||||
### Webhook de API genérica
|
||||
|
||||
```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"
|
||||
body: |
|
||||
{
|
||||
"status": "accepted",
|
||||
"id": "{{Math.random().toString(36).substr(2, 9)}}",
|
||||
"received_at": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-webhook-data
|
||||
```
|
||||
|
||||
### Webhook multi-método
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Formatos de parámetros de tabla
|
||||
|
||||
El bloque Webhook admite dos formatos para encabezados (tanto encabezados de validación como encabezados de respuesta):
|
||||
|
||||
### Formato simplificado (YAML manual)
|
||||
|
||||
Cuando escribes YAML manualmente, puedes usar el formato simplificado:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
```
|
||||
|
||||
### Formato completo de tabla (generado por la interfaz de usuario)
|
||||
|
||||
Cuando los encabezados se crean a través de la interfaz de tabla de la UI, el YAML incluye metadatos adicionales:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
```
|
||||
|
||||
**Diferencias clave:**
|
||||
- `id`: Identificador único para rastrear la fila de la tabla
|
||||
- `cells`: Valores de visualización utilizados por la interfaz de tabla de la UI
|
||||
- Ambos formatos son funcionalmente equivalentes para el procesamiento de webhooks
|
||||
- El formato completo preserva el estado de la UI al importar/exportar flujos de trabajo
|
||||
|
||||
**Importante:** Siempre coloca entre comillas los nombres de encabezados y valores que contengan caracteres especiales:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
```
|
||||
|
||||
## Variables de webhook
|
||||
|
||||
Dentro de los flujos de trabajo activados por webhook, estas variables especiales están disponibles:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Referencias de salida
|
||||
|
||||
Después de que un webhook procesa una solicitud, puedes hacer referencia a sus datos:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Mejores prácticas de seguridad
|
||||
|
||||
- Utiliza siempre secretos de webhook para verificación
|
||||
- Valida los encabezados y métodos esperados
|
||||
- Implementa un manejo adecuado de errores
|
||||
- Usa endpoints HTTPS en producción
|
||||
- Monitorea la actividad y fallos de los webhooks
|
||||
- Establece tiempos de espera de respuesta apropiados
|
||||
- Valida la estructura de la carga útil antes de procesarla
|
||||
@@ -1,299 +0,0 @@
|
||||
---
|
||||
title: Esquema YAML del bloque de flujo de trabajo
|
||||
description: Referencia de configuración YAML para bloques de flujo de trabajo
|
||||
---
|
||||
|
||||
## Definición del esquema
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuración de conexión
|
||||
|
||||
Las conexiones definen hacia dónde va el flujo de trabajo según los resultados del subflujo de trabajo:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful completion
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Ejemplos
|
||||
|
||||
### Ejecución simple de flujo de trabajo
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Pipeline de generación de contenido
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Flujo de trabajo de análisis de múltiples pasos
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Ejecución condicional de flujo de trabajo
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Ejecución paralela de flujo de trabajo
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Flujo de trabajo de manejo de errores
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Mapeo de entrada
|
||||
|
||||
Mapea datos desde el flujo de trabajo principal al subflujo de trabajo:
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
## Referencias de salida
|
||||
|
||||
Después de que un bloque de flujo de trabajo se completa, puedes hacer referencia a sus salidas:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- Utiliza identificadores descriptivos para los flujos de trabajo para mayor claridad
|
||||
- Mapea solo los datos necesarios a los subflujos de trabajo
|
||||
- Establece tiempos de espera apropiados según la complejidad del flujo de trabajo
|
||||
- Incluye manejo de errores para una ejecución robusta
|
||||
- Pasa las variables de entorno de forma segura
|
||||
- Prueba los subflujos de trabajo de forma independiente primero
|
||||
- Monitorea el rendimiento de los flujos de trabajo anidados
|
||||
- Utiliza identificadores de flujos de trabajo versionados para mayor estabilidad
|
||||
@@ -1,273 +0,0 @@
|
||||
---
|
||||
title: Ejemplos de flujos de trabajo YAML
|
||||
description: Ejemplos de flujos de trabajo YAML completos
|
||||
---
|
||||
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
## Flujo de trabajo de cadena multi-agente
|
||||
|
||||
Un flujo de trabajo donde múltiples agentes de IA procesan información secuencialmente:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Flujo de trabajo condicional basado en enrutador
|
||||
|
||||
Un flujo de trabajo que utiliza lógica de enrutamiento para enviar datos a diferentes agentes según las condiciones:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Búsqueda web con salida estructurada
|
||||
|
||||
Un flujo de trabajo que busca en la web utilizando herramientas y devuelve datos estructurados:
|
||||
|
||||
```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"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Procesamiento en bucle con colección
|
||||
|
||||
Un flujo de trabajo que procesa cada elemento en una colección utilizando un bucle:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Clasificación y respuesta de correos electrónicos
|
||||
|
||||
Un flujo de trabajo que clasifica correos electrónicos y genera respuestas apropiadas:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
@@ -1,159 +0,0 @@
|
||||
---
|
||||
title: Referencia de flujos de trabajo YAML
|
||||
description: Guía completa para escribir flujos de trabajo YAML en Sim
|
||||
---
|
||||
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
|
||||
|
||||
Los flujos de trabajo YAML proporcionan una forma potente de definir, versionar y compartir configuraciones de flujos de trabajo en Sim. Esta guía de referencia cubre la sintaxis completa de YAML, esquemas de bloques y mejores prácticas para crear flujos de trabajo robustos.
|
||||
|
||||
## Inicio rápido
|
||||
|
||||
Cada flujo de trabajo de Sim sigue esta estructura básica:
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Conceptos fundamentales
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Declaración de versión</strong>: Debe ser exactamente `version: '1.0'` (con comillas)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Estructura de bloques</strong>: Todos los bloques del flujo de trabajo se definen bajo la clave `blocks`
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Referencias de bloques</strong>: Usa nombres de bloques en minúsculas sin espacios (por ejemplo, `<aiassistant.content>`)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Variables de entorno</strong>: Referencia con dobles llaves `{{VARIABLE_NAME}}`
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Tipos de bloques
|
||||
|
||||
Sim admite varios tipos de bloques principales, cada uno con esquemas YAML específicos:
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloque de inicio" href="/yaml/blocks/starter">
|
||||
Punto de entrada del flujo de trabajo con soporte para activadores manuales, webhooks y programados
|
||||
</Card>
|
||||
<Card title="Bloque de agente" href="/yaml/blocks/agent">
|
||||
Procesamiento impulsado por IA con soporte para herramientas y salida estructurada
|
||||
</Card>
|
||||
<Card title="Bloque de función" href="/yaml/blocks/function">
|
||||
Ejecución de código JavaScript/TypeScript personalizado
|
||||
</Card>
|
||||
<Card title="Bloque de API" href="/yaml/blocks/api">
|
||||
Solicitudes HTTP a servicios externos
|
||||
</Card>
|
||||
<Card title="Bloque de condición" href="/yaml/blocks/condition">
|
||||
Ramificación condicional basada en expresiones booleanas
|
||||
</Card>
|
||||
<Card title="Bloque de enrutador" href="/yaml/blocks/router">
|
||||
Enrutamiento inteligente impulsado por IA a múltiples rutas
|
||||
</Card>
|
||||
<Card title="Bloque de bucle" href="/yaml/blocks/loop">
|
||||
Procesamiento iterativo con bucles for y forEach
|
||||
</Card>
|
||||
<Card title="Bloque paralelo" href="/yaml/blocks/parallel">
|
||||
Ejecución concurrente en múltiples instancias
|
||||
</Card>
|
||||
<Card title="Bloque de webhook" href="/yaml/blocks/webhook">
|
||||
Activadores de webhook para integraciones externas
|
||||
</Card>
|
||||
<Card title="Bloque evaluador" href="/yaml/blocks/evaluator">
|
||||
Validación de salidas según criterios y métricas definidos
|
||||
</Card>
|
||||
<Card title="Bloque de flujo de trabajo" href="/yaml/blocks/workflow">
|
||||
Ejecuta otros flujos de trabajo como componentes reutilizables
|
||||
</Card>
|
||||
<Card title="Bloque de respuesta" href="/yaml/blocks/response">
|
||||
Formateo de salida final del flujo de trabajo
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Sintaxis de referencia de bloques
|
||||
|
||||
El aspecto más crítico de los flujos de trabajo YAML es entender cómo referenciar datos entre bloques:
|
||||
|
||||
### Reglas básicas
|
||||
|
||||
1. **Usa el nombre del bloque** (no el ID del bloque) convertido a minúsculas con espacios eliminados
|
||||
2. **Añade la propiedad apropiada** (.content para agentes, .output para herramientas)
|
||||
3. **Cuando uses chat, referencia el bloque inicial** como `<start.input>`
|
||||
|
||||
### Ejemplos
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Casos especiales
|
||||
|
||||
- **Variables de bucle**: `<loop.index>`, `<loop.currentItem>`, `<loop.items>`
|
||||
- **Variables paralelas**: `<parallel.index>`, `<parallel.currentItem>`
|
||||
|
||||
## Variables de entorno
|
||||
|
||||
Usa variables de entorno para datos sensibles como claves API:
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
database: '{{DATABASE_URL}}'
|
||||
token: '{{SLACK_BOT_TOKEN}}'
|
||||
```
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- **Mantén los nombres de bloques legibles**: "Procesador de correo" para mostrar en la interfaz
|
||||
- **Referencia variables de entorno**: Nunca codifiques claves API directamente
|
||||
- **Estructura para legibilidad**: Agrupa bloques relacionados de manera lógica
|
||||
- **Prueba incrementalmente**: Construye flujos de trabajo paso a paso
|
||||
|
||||
## Próximos pasos
|
||||
|
||||
- [Sintaxis de referencia de bloques](/yaml/block-reference) - Reglas de referencia detalladas
|
||||
- [Esquemas completos de bloques](/yaml/blocks) - Todos los tipos de bloques disponibles
|
||||
- [Ejemplos de flujos de trabajo](/yaml/examples) - Patrones de flujos de trabajo del mundo real
|
||||
251
apps/docs/content/docs/fr/blocks/guardrails.mdx
Normal file
251
apps/docs/content/docs/fr/blocks/guardrails.mdx
Normal file
@@ -0,0 +1,251 @@
|
||||
---
|
||||
title: Guardrails
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { Image } from '@/components/ui/image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/guardrails.png"
|
||||
alt="Guardrails Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Overview
|
||||
|
||||
The Guardrails block enables you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Validation Types
|
||||
|
||||
### JSON Validation
|
||||
|
||||
Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate JSON responses from Agent blocks before parsing
|
||||
- Ensure API payloads are properly formatted
|
||||
- Check structured data integrity
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if valid JSON, `false` otherwise
|
||||
- `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...")
|
||||
|
||||
### Regex Validation
|
||||
|
||||
Checks if content matches a specified regular expression pattern.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate email addresses
|
||||
- Check phone number formats
|
||||
- Verify URLs or custom identifiers
|
||||
- Enforce specific text patterns
|
||||
|
||||
**Configuration:**
|
||||
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if content matches pattern, `false` otherwise
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
### Hallucination Detection
|
||||
|
||||
Uses Retrieval-Augmented Generation (RAG) with LLM scoring to detect when AI-generated content contradicts or isn't grounded in your knowledge base.
|
||||
|
||||
**How It Works:**
|
||||
1. Queries your knowledge base for relevant context
|
||||
2. Sends both the AI output and retrieved context to an LLM
|
||||
3. LLM assigns a confidence score (0-10 scale)
|
||||
- **0** = Full hallucination (completely ungrounded)
|
||||
- **10** = Fully grounded (completely supported by knowledge base)
|
||||
4. Validation passes if score ≥ threshold (default: 3)
|
||||
|
||||
**Configuration:**
|
||||
- **Knowledge Base**: Select from your existing knowledge bases
|
||||
- **Model**: Choose LLM for scoring (requires strong reasoning - GPT-4o, Claude 3.7 Sonnet recommended)
|
||||
- **API Key**: Authentication for selected LLM provider (auto-hidden for hosted/Ollama models)
|
||||
- **Confidence Threshold**: Minimum score to pass (0-10, default: 3)
|
||||
- **Top K** (Advanced): Number of knowledge base chunks to retrieve (default: 10)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if confidence score ≥ threshold
|
||||
- `score`: Confidence score (0-10)
|
||||
- `reasoning`: LLM's explanation for the score
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Validate Agent responses against documentation
|
||||
- Ensure customer support answers are factually accurate
|
||||
- Verify generated content matches source material
|
||||
- Quality control for RAG applications
|
||||
|
||||
### PII Detection
|
||||
|
||||
Detects personally identifiable information using Microsoft Presidio. Supports 40+ entity types across multiple countries and languages.
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
**How It Works:**
|
||||
1. Scans content for PII entities using pattern matching and NLP
|
||||
2. Returns detected entities with locations and confidence scores
|
||||
3. Optionally masks detected PII in the output
|
||||
|
||||
**Configuration:**
|
||||
- **PII Types to Detect**: Select from grouped categories via modal selector
|
||||
- **Common**: Person name, Email, Phone, Credit card, IP address, etc.
|
||||
- **USA**: SSN, Driver's license, Passport, etc.
|
||||
- **UK**: NHS number, National insurance number
|
||||
- **Spain**: NIF, NIE, CIF
|
||||
- **Italy**: Fiscal code, Driver's license, VAT code
|
||||
- **Poland**: PESEL, NIP, REGON
|
||||
- **Singapore**: NRIC/FIN, UEN
|
||||
- **Australia**: ABN, ACN, TFN, Medicare
|
||||
- **India**: Aadhaar, PAN, Passport, Voter number
|
||||
- **Mode**:
|
||||
- **Detect**: Only identify PII (default)
|
||||
- **Mask**: Replace detected PII with masked values
|
||||
- **Language**: Detection language (default: English)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `false` if any selected PII types are detected
|
||||
- `detectedEntities`: Array of detected PII with type, location, and confidence
|
||||
- `maskedText`: Content with PII masked (only if mode = "Mask")
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Block content containing sensitive personal information
|
||||
- Mask PII before logging or storing data
|
||||
- Compliance with GDPR, HIPAA, and other privacy regulations
|
||||
- Sanitize user inputs before processing
|
||||
|
||||
## Configuration
|
||||
|
||||
### Content to Validate
|
||||
|
||||
The input content to validate. This typically comes from:
|
||||
- Agent block outputs: `<agent.content>`
|
||||
- Function block results: `<function.output>`
|
||||
- API responses: `<api.output>`
|
||||
- Any other block output
|
||||
|
||||
### Validation Type
|
||||
|
||||
Choose from four validation types:
|
||||
- **Valid JSON**: Check if content is properly formatted JSON
|
||||
- **Regex Match**: Verify content matches a regex pattern
|
||||
- **Hallucination Check**: Validate against knowledge base with LLM scoring
|
||||
- **PII Detection**: Detect and optionally mask personally identifiable information
|
||||
|
||||
## Outputs
|
||||
|
||||
All validation types return:
|
||||
|
||||
- **`<guardrails.passed>`**: Boolean indicating if validation passed
|
||||
- **`<guardrails.validationType>`**: The type of validation performed
|
||||
- **`<guardrails.input>`**: The original input that was validated
|
||||
- **`<guardrails.error>`**: Error message if validation failed (optional)
|
||||
|
||||
Additional outputs by type:
|
||||
|
||||
**Hallucination Check:**
|
||||
- **`<guardrails.score>`**: Confidence score (0-10)
|
||||
- **`<guardrails.reasoning>`**: LLM's explanation
|
||||
|
||||
**PII Detection:**
|
||||
- **`<guardrails.detectedEntities>`**: Array of detected PII entities
|
||||
- **`<guardrails.maskedText>`**: Content with PII masked (if mode = "Mask")
|
||||
|
||||
## Example Use Cases
|
||||
|
||||
### Validate JSON Before Parsing
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Ensure Agent output is valid JSON</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates structured JSON response</li>
|
||||
<li>Guardrails validates JSON format</li>
|
||||
<li>Condition block checks `<guardrails.passed>`</li>
|
||||
<li>If passed → Parse and use data, If failed → Retry or handle error</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Prevent Hallucinations
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Validate customer support responses</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates response to customer question</li>
|
||||
<li>Guardrails checks against support documentation knowledge base</li>
|
||||
<li>If confidence score ≥ 3 → Send response</li>
|
||||
<li>If confidence score \< 3 → Flag for human review</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Block PII in User Inputs
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Sanitize user-submitted content</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>User submits form with text content</li>
|
||||
<li>Guardrails detects PII (emails, phone numbers, SSN, etc.)</li>
|
||||
<li>If PII detected → Reject submission or mask sensitive data</li>
|
||||
<li>If no PII → Process normally</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails-example.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
### Validate Email Format
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Check email address format</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent extracts email from text</li>
|
||||
<li>Guardrails validates with regex pattern</li>
|
||||
<li>If valid → Use email for notification</li>
|
||||
<li>If invalid → Request correction</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Chain with Condition blocks**: Use `<guardrails.passed>` to branch workflow logic based on validation results
|
||||
- **Use JSON validation before parsing**: Always validate JSON structure before attempting to parse LLM outputs
|
||||
- **Choose appropriate PII types**: Only select the PII entity types relevant to your use case for better performance
|
||||
- **Set reasonable confidence thresholds**: For hallucination detection, adjust threshold based on your accuracy requirements (higher = stricter)
|
||||
- **Use strong models for hallucination detection**: GPT-4o or Claude 3.7 Sonnet provide more accurate confidence scoring
|
||||
- **Mask PII for logging**: Use "Mask" mode when you need to log or store content that may contain PII
|
||||
- **Test regex patterns**: Validate your regex patterns thoroughly before deploying to production
|
||||
- **Monitor validation failures**: Track `<guardrails.error>` messages to identify common validation issues
|
||||
|
||||
<Callout type="info">
|
||||
Guardrails validation happens synchronously in your workflow. For hallucination detection, choose faster models (like GPT-4o-mini) if latency is critical.
|
||||
</Callout>
|
||||
|
||||
@@ -183,4 +183,39 @@ Les différents forfaits d'abonnement ont des limites d'utilisation différentes
|
||||
- Examinez votre utilisation actuelle dans [Paramètres → Abonnement](https://sim.ai/settings/subscription)
|
||||
- Apprenez-en plus sur la [Journalisation](/execution/logging) pour suivre les détails d'exécution
|
||||
- Explorez l'[API externe](/execution/api) pour la surveillance programmatique des coûts
|
||||
- Découvrez les [techniques d'optimisation de flux de travail](/blocks) pour réduire les coûts
|
||||
- Découvrez les [techniques d'optimisation de flux de travail](/blocks) pour réduire les coûts
|
||||
|
||||
**Forfait Équipe (40 $/siège/mois) :**
|
||||
- Utilisation mutualisée entre tous les membres de l'équipe
|
||||
- Dépassement calculé sur l'utilisation totale de l'équipe
|
||||
- Le propriétaire de l'organisation reçoit une seule facture
|
||||
|
||||
**Forfaits Entreprise :**
|
||||
- Prix mensuel fixe, sans dépassements
|
||||
- Limites d'utilisation personnalisées selon l'accord
|
||||
|
||||
### Facturation par seuil
|
||||
|
||||
Lorsque le dépassement non facturé atteint 50 $, Sim facture automatiquement le montant total non facturé.
|
||||
|
||||
**Exemple :**
|
||||
- Jour 10 : 70 $ de dépassement → Facturation immédiate de 70 $
|
||||
- Jour 15 : 35 $ d'utilisation supplémentaire (105 $ au total) → Déjà facturé, aucune action
|
||||
- Jour 20 : 50 $ d'utilisation supplémentaire (155 $ au total, 85 $ non facturés) → Facturation immédiate de 85 $
|
||||
|
||||
Cela répartit les frais de dépassement importants tout au long du mois au lieu d'une seule grosse facture en fin de période.
|
||||
|
||||
## Bonnes pratiques de gestion des coûts
|
||||
|
||||
1. **Surveillance régulière** : vérifiez fréquemment votre tableau de bord d'utilisation pour éviter les surprises
|
||||
2. **Définir des budgets** : utilisez les limites du forfait comme garde-fous pour vos dépenses
|
||||
3. **Optimiser les flux de travail** : examinez les exécutions à coût élevé et optimisez les prompts ou la sélection de modèles
|
||||
4. **Utiliser des modèles appropriés** : adaptez la complexité du modèle aux exigences de la tâche
|
||||
5. **Regrouper les tâches similaires** : combinez plusieurs requêtes lorsque c'est possible pour réduire les frais généraux
|
||||
|
||||
## Prochaines étapes
|
||||
|
||||
- Consultez votre utilisation actuelle dans [Paramètres → Abonnement](https://sim.ai/settings/subscription)
|
||||
- Découvrez la [Journalisation](/execution/logging) pour suivre les détails d'exécution
|
||||
- Explorez l'[API externe](/execution/api) pour la surveillance programmatique des coûts
|
||||
- Consultez les [techniques d'optimisation des flux de travail](/blocks) pour réduire les coûts
|
||||
@@ -814,12 +814,28 @@ async function checkUsage() {
|
||||
console.log(' Resets at:', limits.rateLimit.async.resetAt);
|
||||
console.log(' Is limited:', limits.rateLimit.async.isLimited);
|
||||
|
||||
console.log('\n=== Usage ===');
|
||||
console.log('Current period cost:
|
||||
console.log('\n=== Utilisation ===');
|
||||
console.log('Coût de la période actuelle : ' + limits.usage.currentPeriodCost.toFixed(2) + ' $');
|
||||
console.log('Limite : ' + limits.usage.limit.toFixed(2) + ' $');
|
||||
console.log('Forfait :', limits.usage.plan);
|
||||
|
||||
### Streaming Workflow Execution
|
||||
const percentUsed = (limits.usage.currentPeriodCost / limits.usage.limit) * 100;
|
||||
console.log('Utilisation : ' + percentUsed.toFixed(1) + ' %');
|
||||
|
||||
Execute workflows with real-time streaming responses:
|
||||
if (percentUsed > 80) {
|
||||
console.warn('⚠️ Attention : vous approchez de votre limite d\'utilisation !');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Erreur lors de la vérification de l\'utilisation :', error);
|
||||
}
|
||||
}
|
||||
|
||||
checkUsage();
|
||||
```
|
||||
|
||||
### Exécution de flux de travail avec streaming
|
||||
|
||||
Exécutez des flux de travail avec des réponses en streaming en temps réel :
|
||||
|
||||
```typescript
|
||||
import { SimStudioClient } from 'simstudio-ts-sdk';
|
||||
@@ -842,11 +858,13 @@ async function executeWithStreaming() {
|
||||
console.error('Erreur :', error);
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
The streaming response follows the Server-Sent Events (SSE) format:
|
||||
|
||||
```
|
||||
|
||||
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":"One"}
|
||||
|
||||
data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", deux"}
|
||||
@@ -854,11 +872,14 @@ data: {"blockId":"7b7735b9-19e5-4bd6-818b-46aae2596e9f","chunk":", deux"}
|
||||
data: {"event":"done","success":true,"output":{},"metadata":{"duration":610}}
|
||||
|
||||
data: [DONE]
|
||||
|
||||
```
|
||||
|
||||
**React Streaming Example:**
|
||||
|
||||
```typescript
|
||||
```
|
||||
|
||||
typescript
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
function StreamingWorkflow() {
|
||||
@@ -926,6 +947,7 @@ function StreamingWorkflow() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Getting Your API Key
|
||||
@@ -957,35 +979,6 @@ function StreamingWorkflow() {
|
||||
- Node.js 16+
|
||||
- TypeScript 5.0+ (for TypeScript projects)
|
||||
|
||||
## TypeScript Support
|
||||
|
||||
The SDK is written in TypeScript and provides full type safety:
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SimStudioClient,
|
||||
WorkflowExecutionResult,
|
||||
WorkflowStatus,
|
||||
SimStudioError
|
||||
} from 'simstudio-ts-sdk';
|
||||
|
||||
// Type-safe client initialization
|
||||
const client: SimStudioClient = new SimStudioClient({
|
||||
apiKey: process.env.SIM_API_KEY!
|
||||
});
|
||||
|
||||
// Type-safe workflow execution
|
||||
const result: WorkflowExecutionResult = await client.executeWorkflow('workflow-id', {
|
||||
input: {
|
||||
message: 'Bonjour, TypeScript !'
|
||||
}
|
||||
});
|
||||
|
||||
// Type-safe status checking
|
||||
const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Apache-2.0
|
||||
|
||||
@@ -61,9 +61,9 @@ Rechercher du contenu similaire dans une base de connaissances en utilisant la s
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `knowledgeBaseId` | chaîne | Oui | ID de la base de connaissances dans laquelle effectuer la recherche |
|
||||
| `query` | chaîne | Non | Texte de la requête de recherche \(facultatif lors de l'utilisation de filtres par tags\) |
|
||||
| `query` | chaîne | Non | Texte de la requête de recherche \(facultatif lors de l'utilisation de filtres de tags\) |
|
||||
| `topK` | nombre | Non | Nombre de résultats les plus similaires à retourner \(1-100\) |
|
||||
| `tagFilters` | quelconque | Non | Tableau de filtres de tags avec les propriétés tagName et tagValue |
|
||||
| `tagFilters` | tableau | Non | Tableau de filtres de tags avec les propriétés tagName et tagValue |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ Insérer des données dans une table Supabase
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `projectId` | string | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
|
||||
| `table` | string | Oui | Le nom de la table Supabase dans laquelle insérer les données |
|
||||
| `data` | any | Oui | Les données à insérer |
|
||||
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
|
||||
| `projectId` | chaîne | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
|
||||
| `table` | chaîne | Oui | Le nom de la table Supabase dans laquelle insérer des données |
|
||||
| `data` | tableau | Oui | Les données à insérer (tableau d'objets ou un seul objet) |
|
||||
| `apiKey` | chaîne | Oui | Votre clé secrète de rôle de service Supabase |
|
||||
|
||||
#### Sortie
|
||||
|
||||
@@ -190,10 +190,10 @@ Insérer ou mettre à jour des données dans une table Supabase (opération upse
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Oui | Le nom de la table Supabase dans laquelle insérer ou mettre à jour des données |
|
||||
| `data` | any | Oui | Les données à insérer ou mettre à jour \(upsert\) |
|
||||
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
|
||||
| `projectId` | chaîne | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
|
||||
| `table` | chaîne | Oui | Le nom de la table Supabase dans laquelle upserter des données |
|
||||
| `data` | tableau | Oui | Les données à upserter (insérer ou mettre à jour) - tableau d'objets ou un seul objet |
|
||||
| `apiKey` | chaîne | Oui | Votre clé secrète de rôle de service Supabase |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -87,12 +87,108 @@ Envoyez des messages aux canaux ou utilisateurs Telegram via l'API Bot Telegram.
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Statut de succès d'envoi du message Telegram |
|
||||
| `messageId` | number | Identifiant unique du message Telegram |
|
||||
| `chatId` | string | ID du chat cible où le message a été envoyé |
|
||||
| `text` | string | Contenu textuel du message envoyé |
|
||||
| `timestamp` | number | Horodatage Unix lorsque le message a été envoyé |
|
||||
| `from` | object | Informations sur le bot qui a envoyé le message |
|
||||
| `message` | chaîne | Message de succès ou d'erreur |
|
||||
| `data` | objet | Données du message Telegram |
|
||||
|
||||
## Notes
|
||||
|
||||
- Catégorie : `tools`
|
||||
- Type : `telegram`
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | chaîne | Oui | Votre jeton d'API Bot Telegram |
|
||||
| `chatId` | chaîne | Oui | ID du chat Telegram cible |
|
||||
| `messageId` | chaîne | Oui | ID du message à supprimer |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | chaîne | Message de succès ou d'erreur |
|
||||
| `data` | objet | Résultat de l'opération de suppression |
|
||||
|
||||
### `telegram_send_photo`
|
||||
|
||||
Envoyez des photos aux canaux ou utilisateurs Telegram via l'API Bot Telegram.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | chaîne | Oui | Votre jeton d'API Bot Telegram |
|
||||
| `chatId` | chaîne | Oui | ID du chat Telegram cible |
|
||||
| `photo` | chaîne | Oui | Photo à envoyer. Passez un file_id ou une URL HTTP |
|
||||
| `caption` | chaîne | Non | Légende de la photo \(facultatif\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | chaîne | Message de succès ou d'erreur |
|
||||
| `data` | objet | Données du message Telegram incluant la/les photo(s) facultative(s) |
|
||||
|
||||
### `telegram_send_video`
|
||||
|
||||
Envoyez des vidéos aux canaux ou utilisateurs Telegram via l'API Bot Telegram.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | chaîne | Oui | Votre jeton d'API Bot Telegram |
|
||||
| `chatId` | chaîne | Oui | ID du chat Telegram cible |
|
||||
| `video` | chaîne | Oui | Vidéo à envoyer. Passez un file_id ou une URL HTTP |
|
||||
| `caption` | chaîne | Non | Légende de la vidéo \(facultatif\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Message de succès ou d'erreur |
|
||||
| `data` | object | Données du message Telegram incluant les médias optionnels |
|
||||
|
||||
### `telegram_send_audio`
|
||||
|
||||
Envoyez des fichiers audio aux canaux ou utilisateurs Telegram via l'API Bot Telegram.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | chaîne | Oui | Votre jeton d'API Bot Telegram |
|
||||
| `chatId` | chaîne | Oui | ID du chat Telegram cible |
|
||||
| `audio` | chaîne | Oui | Fichier audio à envoyer. Passez un file_id ou une URL HTTP |
|
||||
| `caption` | chaîne | Non | Légende audio \(facultatif\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Message de succès ou d'erreur |
|
||||
| `data` | object | Données du message Telegram incluant les informations vocales/audio |
|
||||
|
||||
### `telegram_send_animation`
|
||||
|
||||
Envoyez des animations (GIF) aux canaux ou utilisateurs Telegram via l'API Bot Telegram.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | chaîne | Oui | Votre jeton d'API Bot Telegram |
|
||||
| `chatId` | chaîne | Oui | ID du chat Telegram cible |
|
||||
| `animation` | chaîne | Oui | Animation à envoyer. Passez un file_id ou une URL HTTP |
|
||||
| `caption` | chaîne | Non | Légende de l'animation \(facultatif\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | chaîne | Message de succès ou d'erreur |
|
||||
| `data` | objet | Données du message Telegram incluant les médias optionnels |
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: YouTube
|
||||
description: Rechercher des vidéos sur YouTube
|
||||
description: Interagir avec les vidéos, chaînes et playlists YouTube
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -39,7 +39,7 @@ Dans Sim, l'intégration YouTube permet à vos agents de rechercher et d'analyse
|
||||
|
||||
## Instructions d'utilisation
|
||||
|
||||
Intégrer YouTube dans le flux de travail. Peut rechercher des vidéos. Nécessite une clé API.
|
||||
Intégrez YouTube dans le flux de travail. Permet de rechercher des vidéos, obtenir les détails d'une vidéo, obtenir des informations sur une chaîne, obtenir les éléments d'une playlist et obtenir les commentaires d'une vidéo.
|
||||
|
||||
## Outils
|
||||
|
||||
@@ -61,6 +61,99 @@ Recherchez des vidéos sur YouTube en utilisant l'API YouTube Data.
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | tableau | Tableau de vidéos YouTube correspondant à la requête de recherche |
|
||||
|
||||
### `youtube_video_details`
|
||||
|
||||
Obtenir des informations détaillées sur une vidéo YouTube spécifique.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `videoId` | chaîne | Oui | ID de la vidéo YouTube |
|
||||
| `apiKey` | chaîne | Oui | Clé API YouTube |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `videoId` | chaîne | ID de la vidéo YouTube |
|
||||
| `title` | chaîne | Titre de la vidéo |
|
||||
| `description` | chaîne | Description de la vidéo |
|
||||
| `channelId` | chaîne | ID de la chaîne |
|
||||
| `channelTitle` | chaîne | Nom de la chaîne |
|
||||
| `publishedAt` | chaîne | Date et heure de publication |
|
||||
| `duration` | chaîne | Durée de la vidéo au format ISO 8601 |
|
||||
| `viewCount` | nombre | Nombre de vues |
|
||||
| `likeCount` | nombre | Nombre de j'aime |
|
||||
| `commentCount` | nombre | Nombre de commentaires |
|
||||
| `thumbnail` | chaîne | URL de la miniature de la vidéo |
|
||||
| `tags` | tableau | Tags de la vidéo |
|
||||
|
||||
### `youtube_channel_info`
|
||||
|
||||
Obtenir des informations détaillées sur une chaîne YouTube.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `channelId` | chaîne | Non | ID de la chaîne YouTube \(utilisez soit channelId soit username\) |
|
||||
| `username` | chaîne | Non | Nom d'utilisateur de la chaîne YouTube \(utilisez soit channelId soit username\) |
|
||||
| `apiKey` | chaîne | Oui | Clé API YouTube |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `channelId` | chaîne | ID de la chaîne YouTube |
|
||||
| `title` | chaîne | Nom de la chaîne |
|
||||
| `description` | chaîne | Description de la chaîne |
|
||||
| `subscriberCount` | nombre | Nombre d'abonnés |
|
||||
| `videoCount` | nombre | Nombre de vidéos |
|
||||
| `viewCount` | nombre | Nombre total de vues de la chaîne |
|
||||
| `publishedAt` | chaîne | Date de création de la chaîne |
|
||||
| `thumbnail` | chaîne | URL de la miniature de la chaîne |
|
||||
| `customUrl` | chaîne | URL personnalisée de la chaîne |
|
||||
|
||||
### `youtube_playlist_items`
|
||||
|
||||
Obtenir des vidéos d'une playlist YouTube.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `playlistId` | chaîne | Oui | ID de la playlist YouTube |
|
||||
| `maxResults` | nombre | Non | Nombre maximum de vidéos à retourner |
|
||||
| `pageToken` | chaîne | Non | Jeton de page pour la pagination |
|
||||
| `apiKey` | chaîne | Oui | Clé API YouTube |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | tableau | Tableau de vidéos dans la playlist |
|
||||
|
||||
### `youtube_comments`
|
||||
|
||||
Obtenir les commentaires d'une vidéo YouTube.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `videoId` | chaîne | Oui | ID de la vidéo YouTube |
|
||||
| `maxResults` | nombre | Non | Nombre maximum de commentaires à retourner |
|
||||
| `order` | chaîne | Non | Ordre des commentaires : time (chronologique) ou relevance (pertinence) |
|
||||
| `pageToken` | chaîne | Non | Jeton de page pour la pagination |
|
||||
| `apiKey` | chaîne | Oui | Clé API YouTube |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | tableau | Tableau de commentaires de la vidéo |
|
||||
|
||||
## Notes
|
||||
|
||||
- Catégorie : `tools`
|
||||
|
||||
@@ -128,3 +128,60 @@ Si aucun format d'entrée n'est défini, l'exécuteur expose uniquement le JSON
|
||||
<Callout type="warning">
|
||||
Un workflow ne peut contenir qu'un seul déclencheur API. Publiez un nouveau déploiement après les modifications pour que le point de terminaison reste à jour.
|
||||
</Callout>
|
||||
|
||||
### Format de téléchargement de fichiers
|
||||
|
||||
L'API accepte les fichiers dans deux formats :
|
||||
|
||||
**1. Fichiers encodés en Base64** (recommandé pour les SDK) :
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "file",
|
||||
"data": "data:application/pdf;base64,JVBERi0xLjQK...",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- Taille maximale de fichier : 20 Mo par fichier
|
||||
- Les fichiers sont téléchargés vers le stockage cloud et convertis en objets UserFile avec toutes les propriétés
|
||||
|
||||
**2. Références URL directes** :
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "url",
|
||||
"data": "https://example.com/document.pdf",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- Le fichier n'est pas téléchargé, l'URL est transmise directement
|
||||
- Utile pour référencer des fichiers existants
|
||||
|
||||
### Propriétés des fichiers
|
||||
|
||||
Pour les fichiers, accédez à toutes les propriétés :
|
||||
|
||||
| Propriété | Description | Type |
|
||||
|----------|-------------|------|
|
||||
| `<api.fieldName[0].url>` | URL de téléchargement signée | chaîne |
|
||||
| `<api.fieldName[0].name>` | Nom de fichier original | chaîne |
|
||||
| `<api.fieldName[0].size>` | Taille du fichier en octets | nombre |
|
||||
| `<api.fieldName[0].type>` | Type MIME | chaîne |
|
||||
| `<api.fieldName[0].uploadedAt>` | Horodatage du téléchargement (ISO 8601) | chaîne |
|
||||
| `<api.fieldName[0].expiresAt>` | Horodatage d'expiration de l'URL (ISO 8601) | chaîne |
|
||||
|
||||
Pour les fichiers référencés par URL, les mêmes propriétés sont disponibles à l'exception de `uploadedAt` et `expiresAt` puisque le fichier n'est pas téléchargé vers notre stockage.
|
||||
|
||||
Si aucun format d'entrée n'est défini, l'exécuteur expose uniquement le JSON brut à `<api.input>`.
|
||||
|
||||
<Callout type="warning">
|
||||
Un flux de travail ne peut contenir qu'un seul déclencheur API. Publiez un nouveau déploiement après les modifications pour que le point de terminaison reste à jour.
|
||||
</Callout>
|
||||
|
||||
@@ -41,3 +41,11 @@ Les fichiers incluent `name`, `mimeType`, et un `url` signé.
|
||||
<Callout type="info">
|
||||
Le constructeur bloque plusieurs blocs Déclencheur de chat dans le même flux de travail.
|
||||
</Callout>
|
||||
|
||||
1. Ajoutez un bloc Déclencheur de Chat par workflow.
|
||||
2. Déployez le workflow en mode chat.
|
||||
3. Partagez le lien de déploiement—chaque réponse réutilise l'ID de conversation pour que le workflow puisse conserver le contexte.
|
||||
|
||||
<Callout type="info">
|
||||
Le constructeur bloque plusieurs blocs Déclencheur de Chat dans le même workflow.
|
||||
</Callout>
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
---
|
||||
title: Syntaxe de référence de bloc
|
||||
description: Comment référencer des données entre les blocs dans les workflows YAML
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
Les références de bloc sont le fondement du flux de données dans les workflows Sim. Comprendre comment référencer correctement les sorties d'un bloc comme entrées d'un autre est essentiel pour créer des workflows fonctionnels.
|
||||
|
||||
## Règles de référence de base
|
||||
|
||||
### 1. Utilisez les noms de bloc, pas les identifiants de bloc
|
||||
|
||||
<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. Convertir les noms au format de référence
|
||||
|
||||
Pour créer une référence de bloc :
|
||||
|
||||
1. **Prenez le nom du bloc** : « Email Generator »
|
||||
2. **Convertissez en minuscules** : « email generator »
|
||||
3. **Supprimez les espaces et les caractères spéciaux** : « emailgenerator »
|
||||
4. **Ajoutez la propriété** : `<emailgenerator.content>`
|
||||
|
||||
### 3. Utilisez les propriétés correctes
|
||||
|
||||
Différents types de blocs exposent différentes propriétés :
|
||||
|
||||
- **Blocs d'agent** : `.content` (la réponse de l'IA)
|
||||
- **Blocs de fonction** : `.output` (la valeur de retour)
|
||||
- **Blocs d'API** : `.output` (les données de réponse)
|
||||
- **Blocs d'outil** : `.output` (le résultat de l'outil)
|
||||
|
||||
## Exemples de référence
|
||||
|
||||
### Références de bloc courantes
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Noms de bloc à plusieurs mots
|
||||
|
||||
```yaml
|
||||
# Block name: "Data Processor 2"
|
||||
<dataprocessor2.output>
|
||||
|
||||
# Block name: "Email Validation Service"
|
||||
<emailvalidationservice.output>
|
||||
|
||||
# Block name: "Customer Info Agent"
|
||||
<customerinfoagent.content>
|
||||
```
|
||||
|
||||
## Cas de référence spéciaux
|
||||
|
||||
### Bloc de démarrage
|
||||
|
||||
<Callout type="warning">
|
||||
Le bloc de démarrage est toujours référencé comme `<start.input>` quel que soit son nom réel.
|
||||
</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
|
||||
```
|
||||
|
||||
### Variables de boucle
|
||||
|
||||
À l'intérieur des blocs de boucle, des variables spéciales sont disponibles :
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
### Variables parallèles
|
||||
|
||||
À l'intérieur des blocs parallèles, des variables spéciales sont disponibles :
|
||||
|
||||
```yaml
|
||||
# Available in parallel child blocks
|
||||
<parallel.index> # Instance number (0-based)
|
||||
<parallel.currentItem> # Item for this instance
|
||||
<parallel.items> # Full collection
|
||||
```
|
||||
|
||||
## Exemples de références complexes
|
||||
|
||||
### Accès aux données imbriquées
|
||||
|
||||
Lors de la référence à des objets complexes, utilisez la notation par points :
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Références multiples dans le texte
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Références dans les blocs de code
|
||||
|
||||
Lorsque vous utilisez des références dans des blocs de fonction, elles sont remplacées par des valeurs JavaScript :
|
||||
|
||||
```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
|
||||
};
|
||||
```
|
||||
|
||||
## Validation des références
|
||||
|
||||
Sim valide toutes les références lors de l'importation de YAML :
|
||||
|
||||
### Références valides
|
||||
- Le bloc existe dans le flux de travail
|
||||
- La propriété est appropriée pour le type de bloc
|
||||
- Pas de dépendances circulaires
|
||||
- Formatage syntaxique correct
|
||||
|
||||
### Erreurs courantes
|
||||
- **Bloc introuvable** : le bloc référencé n'existe pas
|
||||
- **Propriété incorrecte** : utilisation de `.content` sur un bloc de fonction
|
||||
- **Fautes de frappe** : noms de blocs ou propriétés mal orthographiés
|
||||
- **Références circulaires** : un bloc se référence lui-même directement ou indirectement
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
1. **Utilisez des noms de blocs descriptifs** : rend les références plus lisibles
|
||||
2. **Soyez cohérent** : utilisez la même convention de nommage partout
|
||||
3. **Vérifiez les références** : assurez-vous que tous les blocs référencés existent
|
||||
4. **Évitez l'imbrication profonde** : gardez les chaînes de référence gérables
|
||||
5. **Documentez les flux complexes** : ajoutez des commentaires pour expliquer les relations entre références
|
||||
@@ -1,218 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML des blocs Agent
|
||||
description: Référence de configuration YAML pour les blocs Agent
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration des outils
|
||||
|
||||
Les outils sont définis comme un tableau où chaque outil a cette 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)
|
||||
```
|
||||
|
||||
## Configuration des connexions
|
||||
|
||||
Les connexions définissent où le flux de travail se dirige en fonction des résultats d'exécution :
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Agent basique
|
||||
|
||||
```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 avec outils
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Sortie structurée
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,429 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc API
|
||||
description: Référence de configuration YAML pour les blocs API
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
params:
|
||||
type: array
|
||||
description: Query parameters as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the parameter entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Parameter name
|
||||
Value:
|
||||
type: string
|
||||
description: Parameter value
|
||||
headers:
|
||||
type: array
|
||||
description: HTTP headers as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
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
|
||||
```
|
||||
|
||||
## Configuration de connexion
|
||||
|
||||
Les connexions définissent où le flux de travail se dirige en fonction des résultats de la requête :
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful requests
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Requête GET simple
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
- id: header-2-uuid-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
connections:
|
||||
success: process-user-data
|
||||
error: handle-api-error
|
||||
```
|
||||
|
||||
### Requête POST avec corps
|
||||
|
||||
```yaml
|
||||
create-ticket:
|
||||
type: api
|
||||
name: "Create Support Ticket"
|
||||
inputs:
|
||||
url: "https://api.support.com/tickets"
|
||||
method: POST
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{SUPPORT_API_KEY}}"
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"title": "<agent.title>",
|
||||
"description": "<agent.description>",
|
||||
"priority": "high"
|
||||
}
|
||||
connections:
|
||||
success: ticket-created
|
||||
error: ticket-error
|
||||
```
|
||||
|
||||
### URL dynamique avec paramètres de requête
|
||||
|
||||
```yaml
|
||||
search-api:
|
||||
type: api
|
||||
name: "Search Products"
|
||||
inputs:
|
||||
url: "https://api.store.com/products"
|
||||
method: GET
|
||||
params:
|
||||
- id: search-param-uuid
|
||||
cells:
|
||||
Key: "q"
|
||||
Value: <start.searchTerm>
|
||||
- id: limit-param-uuid
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
- id: category-param-uuid
|
||||
cells:
|
||||
Key: "category"
|
||||
Value: <filter.category>
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{STORE_API_KEY}}"
|
||||
connections:
|
||||
success: display-results
|
||||
```
|
||||
|
||||
## Format des paramètres
|
||||
|
||||
Les en-têtes et les paramètres (paramètres de requête) utilisent le format de tableau avec la structure suivante :
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: another-unique-identifier
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
|
||||
params:
|
||||
- id: param-identifier-here
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
```
|
||||
|
||||
**Détails de la structure :**
|
||||
- `id` : identifiant unique pour suivre la ligne du tableau
|
||||
- `cells.Key` : le nom du paramètre/en-tête
|
||||
- `cells.Value` : la valeur du paramètre/en-tête
|
||||
- Ce format permet une gestion appropriée des tableaux et la préservation de l'état de l'interface utilisateur
|
||||
|
||||
## Références de sortie
|
||||
|
||||
Après l'exécution d'un bloc API, vous pouvez référencer ses sorties dans les blocs suivants. Le bloc API fournit trois sorties principales :
|
||||
|
||||
### Sorties disponibles
|
||||
|
||||
| Sortie | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `data` | any | Le corps/charge utile de la réponse de l'API |
|
||||
| `status` | number | Code de statut HTTP (200, 404, 500, etc.) |
|
||||
| `headers` | object | En-têtes de réponse renvoyés par le serveur |
|
||||
|
||||
### Exemples d'utilisation
|
||||
|
||||
```yaml
|
||||
# Reference API response data
|
||||
process-data:
|
||||
type: function
|
||||
name: "Process API Data"
|
||||
inputs:
|
||||
code: |
|
||||
const responseData = <fetchuserdata.data>;
|
||||
const statusCode = <fetchuserdata.status>;
|
||||
const responseHeaders = <fetchuserdata.headers>;
|
||||
|
||||
if (statusCode === 200) {
|
||||
return {
|
||||
success: true,
|
||||
user: responseData,
|
||||
contentType: responseHeaders['content-type']
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
error: `API call failed with status ${statusCode}`
|
||||
};
|
||||
}
|
||||
|
||||
# Use API data in an agent block
|
||||
analyze-response:
|
||||
type: agent
|
||||
name: "Analyze Response"
|
||||
inputs:
|
||||
userPrompt: |
|
||||
Analyze this API response:
|
||||
|
||||
Status: <fetchuserdata.status>
|
||||
Data: <fetchuserdata.data>
|
||||
|
||||
Provide insights about the response.
|
||||
|
||||
# Conditional logic based on status
|
||||
check-status:
|
||||
type: condition
|
||||
name: "Check API Status"
|
||||
inputs:
|
||||
condition: <fetchuserdata.status> === 200
|
||||
connections:
|
||||
true: success-handler
|
||||
false: error-handler
|
||||
```
|
||||
|
||||
### Exemple pratique
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
connections:
|
||||
success: process-response
|
||||
|
||||
process-response:
|
||||
type: function
|
||||
name: "Process Response"
|
||||
inputs:
|
||||
code: |
|
||||
const user = <fetchuserdata.data>;
|
||||
const status = <fetchuserdata.status>;
|
||||
|
||||
console.log(`API returned status: ${status}`);
|
||||
console.log(`User data:`, user);
|
||||
|
||||
return {
|
||||
userId: user.id,
|
||||
email: user.email,
|
||||
isActive: status === 200
|
||||
};
|
||||
```
|
||||
|
||||
### Gestion des erreurs
|
||||
|
||||
```yaml
|
||||
api-with-error-handling:
|
||||
type: api
|
||||
name: "API Call"
|
||||
inputs:
|
||||
url: "https://api.example.com/data"
|
||||
method: GET
|
||||
connections:
|
||||
success: check-response
|
||||
error: handle-error
|
||||
|
||||
check-response:
|
||||
type: condition
|
||||
name: "Check Response Status"
|
||||
inputs:
|
||||
condition: <apicall.status> >= 200 && <apicall.status> < 300
|
||||
connections:
|
||||
true: process-success
|
||||
false: handle-api-error
|
||||
|
||||
process-success:
|
||||
type: function
|
||||
name: "Process Success"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: true,
|
||||
data: <apicall.data>,
|
||||
message: "API call successful"
|
||||
};
|
||||
|
||||
handle-api-error:
|
||||
type: function
|
||||
name: "Handle API Error"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: false,
|
||||
status: <apicall.status>,
|
||||
error: "API call failed",
|
||||
data: <apicall.data>
|
||||
};
|
||||
```
|
||||
|
||||
## Échappement des chaînes YAML
|
||||
|
||||
Lors de l'écriture en YAML, certaines chaînes doivent être entre guillemets pour être correctement analysées :
|
||||
|
||||
### Chaînes qui doivent être entre guillemets
|
||||
|
||||
```yaml
|
||||
# URLs with hyphens, colons, special characters
|
||||
url: "https://api.example.com/users/123"
|
||||
url: "https://my-api.example.com/data"
|
||||
|
||||
# Header values with hyphens or special characters
|
||||
headers:
|
||||
- id: header-uuid
|
||||
cells:
|
||||
Key: "User-Agent"
|
||||
Value: "My-Application/1.0"
|
||||
- id: auth-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer my-token-123"
|
||||
|
||||
# Parameter values with hyphens
|
||||
params:
|
||||
- id: param-uuid
|
||||
cells:
|
||||
Key: "sort-by"
|
||||
Value: "created-at"
|
||||
```
|
||||
|
||||
### Quand utiliser les guillemets
|
||||
|
||||
- ✅ **Toujours mettre entre guillemets** : URLs, tokens, valeurs avec des traits d'union, des deux-points ou des caractères spéciaux
|
||||
- ✅ **Toujours mettre entre guillemets** : Valeurs qui commencent par des chiffres mais qui doivent rester des chaînes
|
||||
- ✅ **Toujours mettre entre guillemets** : Chaînes ressemblant à des booléens mais qui doivent rester des chaînes
|
||||
- ❌ **Ne pas mettre entre guillemets** : Chaînes alphanumériques simples sans caractères spéciaux
|
||||
|
||||
### Exemples
|
||||
|
||||
```yaml
|
||||
# ✅ Correct
|
||||
url: "https://api.stripe.com/v1/charges"
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer sk-test-123456789"
|
||||
|
||||
# ❌ Incorrect (may cause parsing errors)
|
||||
url: https://api.stripe.com/v1/charges
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: Authorization
|
||||
Value: Bearer sk-test-123456789
|
||||
```
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- Utilisez des variables d'environnement pour les clés API : `{{API_KEY_NAME}}`
|
||||
- Incluez la gestion des erreurs avec les connexions d'erreur
|
||||
- Définissez des délais d'attente appropriés pour votre cas d'utilisation
|
||||
- Validez les codes d'état de réponse dans les blocs suivants
|
||||
- Utilisez des noms de blocs significatifs pour faciliter les références
|
||||
- **Mettez toujours entre guillemets les chaînes avec des caractères spéciaux, les URLs et les tokens**
|
||||
@@ -1,165 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc de condition
|
||||
description: Référence de configuration YAML pour les blocs de condition
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration des connexions
|
||||
|
||||
Contrairement aux autres blocs, les conditions utilisent des connexions ramifiées basées sur les résultats des conditions :
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Simple Si-Sinon
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Conditions multiples
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Comparaisons numériques
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Logique complexe
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,255 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc évaluateur
|
||||
description: Référence de configuration YAML pour les blocs évaluateurs
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration des connexions
|
||||
|
||||
Les connexions définissent où le flux de travail se dirige en fonction des résultats d'évaluation :
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful evaluation
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Évaluation de la qualité du contenu
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Évaluation de la réponse client
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Évaluation par test A/B
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Notation multidimensionnelle du contenu
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Références de sortie
|
||||
|
||||
Après l'exécution d'un bloc évaluateur, vous pouvez référencer ses sorties :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- Définir des critères d'évaluation clairs et spécifiques
|
||||
- Utiliser des plages de notation appropriées pour votre cas d'utilisation
|
||||
- Choisir des modèles avec de solides capacités de raisonnement
|
||||
- Utiliser une température plus basse pour une notation cohérente
|
||||
- Inclure des descriptions détaillées des métriques
|
||||
- Tester avec divers types de contenu
|
||||
- Envisager plusieurs évaluateurs pour des évaluations complexes
|
||||
@@ -1,162 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc de fonction
|
||||
description: Référence de configuration YAML pour les blocs de fonction
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration des connexions
|
||||
|
||||
Les connexions définissent où le flux de travail se dirige en fonction des résultats d'exécution :
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Validation simple
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Traitement des données
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Intégration d'API
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Calculs
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,151 +0,0 @@
|
||||
---
|
||||
title: Schémas de blocs
|
||||
description: Référence complète du schéma YAML pour tous les blocs Sim
|
||||
---
|
||||
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
|
||||
Cette section contient les définitions complètes du schéma YAML pour tous les types de blocs disponibles dans Sim. Chaque type de bloc a des exigences de configuration spécifiques et des formats de sortie.
|
||||
|
||||
## Blocs fondamentaux
|
||||
|
||||
Voici les éléments essentiels pour créer des flux de travail :
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloc de démarrage" href="/yaml/blocks/starter">
|
||||
Point d'entrée du flux de travail prenant en charge les déclencheurs manuels, les webhooks et les planifications
|
||||
</Card>
|
||||
<Card title="Bloc Agent" href="/yaml/blocks/agent">
|
||||
Traitement alimenté par l'IA avec intégration LLM et prise en charge d'outils
|
||||
</Card>
|
||||
<Card title="Bloc Fonction" href="/yaml/blocks/function">
|
||||
Environnement d'exécution de code JavaScript/TypeScript personnalisé
|
||||
</Card>
|
||||
<Card title="Bloc Réponse" href="/yaml/blocks/response">
|
||||
Formatage et renvoi des résultats finaux du flux de travail
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Logique et flux de contrôle
|
||||
|
||||
Blocs pour implémenter la logique conditionnelle et le flux de contrôle :
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloc Condition" href="/yaml/blocks/condition">
|
||||
Branchement conditionnel basé sur des expressions booléennes
|
||||
</Card>
|
||||
<Card title="Bloc Routeur" href="/yaml/blocks/router">
|
||||
Routage intelligent alimenté par l'IA vers plusieurs chemins
|
||||
</Card>
|
||||
<Card title="Bloc Boucle" href="/yaml/blocks/loop">
|
||||
Traitement itératif avec des boucles for et forEach
|
||||
</Card>
|
||||
<Card title="Bloc Parallèle" href="/yaml/blocks/parallel">
|
||||
Exécution simultanée sur plusieurs instances
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Blocs d'intégration
|
||||
|
||||
Blocs pour se connecter à des services et systèmes externes :
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloc API" href="/yaml/blocks/api">
|
||||
Requêtes HTTP vers des API REST externes
|
||||
</Card>
|
||||
<Card title="Bloc Webhook" href="/yaml/blocks/webhook">
|
||||
Déclencheurs webhook pour intégrations externes
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Blocs avancés
|
||||
|
||||
Blocs spécialisés pour des modèles de flux de travail complexes :
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloc Évaluateur" href="/yaml/blocks/evaluator">
|
||||
Valider les sorties selon des critères et métriques définis
|
||||
</Card>
|
||||
<Card title="Bloc Flux de travail" href="/yaml/blocks/workflow">
|
||||
Exécuter d'autres flux de travail comme composants réutilisables
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Éléments de schéma communs
|
||||
|
||||
Tous les blocs partagent ces éléments communs :
|
||||
|
||||
### Structure de base
|
||||
|
||||
```yaml
|
||||
block-id:
|
||||
type: <block-type>
|
||||
name: <display-name>
|
||||
inputs:
|
||||
# Block-specific configuration
|
||||
connections:
|
||||
# Connection definitions
|
||||
```
|
||||
|
||||
### Types de connexion
|
||||
|
||||
- **success** : Bloc cible pour une exécution réussie
|
||||
- **error** : Bloc cible pour la gestion des erreurs (facultatif)
|
||||
- **conditions** : Chemins multiples pour les blocs conditionnels
|
||||
|
||||
### Variables d'environnement
|
||||
|
||||
Utilisez des doubles accolades pour les variables d'environnement :
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{API_KEY_NAME}}'
|
||||
endpoint: '{{SERVICE_ENDPOINT}}'
|
||||
```
|
||||
|
||||
### Références de bloc
|
||||
|
||||
Référencez les sorties d'autres blocs en utilisant le nom du bloc en minuscules :
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
userPrompt: <blockname.content>
|
||||
data: <functionblock.output>
|
||||
originalInput: <start.input>
|
||||
```
|
||||
|
||||
## Règles de validation
|
||||
|
||||
Tous les blocs YAML sont validés par rapport à leurs schémas :
|
||||
|
||||
1. **Champs obligatoires** : doivent être présents
|
||||
2. **Validation de type** : les valeurs doivent correspondre aux types attendus
|
||||
3. **Validation d'énumération** : les valeurs de chaîne doivent provenir des listes autorisées
|
||||
4. **Validation de plage** : les nombres doivent être dans les plages spécifiées
|
||||
5. **Validation de modèle** : les chaînes doivent correspondre aux modèles regex (le cas échéant)
|
||||
|
||||
## Référence rapide
|
||||
|
||||
### Types de blocs et propriétés
|
||||
|
||||
| Type de bloc | Sortie principale | Cas d'utilisation courants |
|
||||
|------------|----------------|------------------|
|
||||
| starter | `.input` | Point d'entrée du workflow |
|
||||
| agent | `.content` | Traitement IA, génération de texte |
|
||||
| function | `.output` | Transformation de données, calculs |
|
||||
| api | `.output` | Intégration de services externes |
|
||||
| condition | N/A (branchement) | Logique conditionnelle |
|
||||
| router | N/A (branchement) | Routage intelligent |
|
||||
| response | N/A (terminal) | Formatage de sortie finale |
|
||||
| loop | `.results` | Traitement itératif |
|
||||
| parallel | `.results` | Traitement concurrent |
|
||||
| webhook | `.payload` | Déclencheurs externes |
|
||||
| evaluator | `.score` | Validation de sortie, évaluation de qualité |
|
||||
| workflow | `.output` | Exécution de sous-workflow, modularité |
|
||||
|
||||
### Obligatoire vs optionnel
|
||||
|
||||
- **Toujours obligatoire** : `type`, `name`
|
||||
- **Généralement obligatoire** : `inputs`, `connections`
|
||||
- **Dépendant du contexte** : les champs d'entrée spécifiques varient selon le type de bloc
|
||||
- **Toujours optionnel** : connexions `error`, champs spécifiques à l'interface utilisateur
|
||||
@@ -1,312 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML des blocs parallèles
|
||||
description: Référence de configuration YAML pour les blocs parallèles
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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)
|
||||
error:
|
||||
type: string
|
||||
description: Target block ID for error handling
|
||||
```
|
||||
|
||||
## Configuration de connexion
|
||||
|
||||
Les blocs parallèles utilisent un format de connexion spécial avec une section `parallel` :
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Configuration des blocs enfants
|
||||
|
||||
Les blocs à l'intérieur d'un bloc parallèle doivent avoir leur `parentId` défini sur l'ID du bloc parallèle :
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Traitement parallèle basé sur le comptage
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Traitement parallèle basé sur les collections
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Pipeline de traitement parallèle complexe
|
||||
|
||||
```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>
|
||||
};
|
||||
```
|
||||
|
||||
### Analyse IA concurrente
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Variables parallèles
|
||||
|
||||
À l'intérieur des blocs enfants parallèles, ces variables spéciales sont disponibles :
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Références de sortie
|
||||
|
||||
Une fois qu'un bloc parallèle est terminé, vous pouvez référencer ses résultats agrégés :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- Utilisez un maxConcurrency approprié pour éviter de surcharger les API
|
||||
- Assurez-vous que les opérations sont indépendantes et ne dépendent pas les unes des autres
|
||||
- Incluez une gestion des erreurs pour une exécution parallèle robuste
|
||||
- Testez d'abord avec de petites collections
|
||||
- Surveillez les limites de taux pour les API externes
|
||||
- Utilisez le type collection pour distribuer le travail, le type count pour les instances fixes
|
||||
- Tenez compte de l'utilisation de la mémoire avec de grandes collections
|
||||
@@ -1,239 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc de réponse
|
||||
description: Référence de configuration YAML pour les blocs de réponse
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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 table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
```
|
||||
|
||||
## Configuration de connexion
|
||||
|
||||
Les blocs de réponse sont des blocs terminaux (sans connexions sortantes) et définissent la sortie finale :
|
||||
|
||||
```yaml
|
||||
# No connections object needed - Response blocks are always terminal
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Réponse simple
|
||||
|
||||
```yaml
|
||||
simple-response:
|
||||
type: response
|
||||
name: "Simple Response"
|
||||
inputs:
|
||||
data:
|
||||
message: "Hello World"
|
||||
timestamp: <function.timestamp>
|
||||
status: 200
|
||||
```
|
||||
|
||||
### Réponse de succès
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
### Réponse avec format complet d'en-tête de tableau
|
||||
|
||||
Lorsque les en-têtes sont créés via l'interface utilisateur du tableau, le YAML inclut des métadonnées supplémentaires :
|
||||
|
||||
```yaml
|
||||
api-response:
|
||||
type: response
|
||||
name: "API Response"
|
||||
inputs:
|
||||
data:
|
||||
message: "Request processed successfully"
|
||||
id: <agent.request_id>
|
||||
status: 200
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: header-2-uuid-here
|
||||
key: "Cache-Control"
|
||||
value: "no-cache"
|
||||
cells:
|
||||
Key: "Cache-Control"
|
||||
Value: "no-cache"
|
||||
- id: header-3-uuid-here
|
||||
key: "X-API-Version"
|
||||
value: "2.1"
|
||||
cells:
|
||||
Key: "X-API-Version"
|
||||
Value: "2.1"
|
||||
```
|
||||
|
||||
### Réponse d'erreur
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
### Réponse paginée
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
## Formats de paramètres de tableau
|
||||
|
||||
Le bloc de réponse prend en charge deux formats pour les en-têtes :
|
||||
|
||||
### Format simplifié (YAML manuel)
|
||||
|
||||
Lors de l'écriture manuelle du YAML, vous pouvez utiliser le format simplifié :
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
- key: "Cache-Control"
|
||||
value: "no-cache"
|
||||
```
|
||||
|
||||
### Format de tableau complet (généré par l'interface utilisateur)
|
||||
|
||||
Lorsque les en-têtes sont créés via l'interface utilisateur du tableau, le YAML inclut des métadonnées supplémentaires :
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
```
|
||||
|
||||
**Différences clés :**
|
||||
- `id` : Identifiant unique pour suivre la ligne du tableau
|
||||
- `cells` : Valeurs d'affichage utilisées par l'interface utilisateur du tableau
|
||||
- Les deux formats sont fonctionnellement équivalents pour l'exécution du workflow
|
||||
- Le format complet préserve l'état de l'interface utilisateur lors de l'importation/exportation des workflows
|
||||
|
||||
**Important :** Mettez toujours entre guillemets les noms d'en-têtes et les valeurs qui contiennent des caractères spéciaux :
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: cache-control-uuid
|
||||
cells:
|
||||
Key: "Cache-Control"
|
||||
Value: "no-cache"
|
||||
```
|
||||
|
||||
```
|
||||
@@ -1,200 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc routeur
|
||||
description: Référence de configuration YAML pour les blocs routeur
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration de connexion
|
||||
|
||||
Les blocs routeur utilisent un tableau success contenant toutes les destinations de routage possibles :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Routeur par type de contenu
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Routeur par priorité
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Routeur par département
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration avancée
|
||||
|
||||
### Routeur multi-modèles
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Références de sortie
|
||||
|
||||
Les blocs routeur ne produisent pas de sorties directes mais contrôlent le chemin du flux de travail :
|
||||
|
||||
```yaml
|
||||
# Router decisions affect which subsequent blocks execute
|
||||
# Access the routed block's outputs normally:
|
||||
final-step:
|
||||
inputs:
|
||||
routed-result: <routed-block-name.content>
|
||||
```
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- Fournir des critères de routage clairs dans le prompt
|
||||
- Utiliser des noms de blocs cibles spécifiques et descriptifs
|
||||
- Inclure des exemples de contenu pour chaque chemin de routage
|
||||
- Utiliser des valeurs de température plus basses pour un routage cohérent
|
||||
- Tester avec divers types d'entrées pour assurer un routage précis
|
||||
- Envisager des chemins de repli pour les cas particuliers
|
||||
@@ -1,183 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc de démarrage
|
||||
description: Référence de configuration YAML pour les blocs de démarrage
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration de connexion
|
||||
|
||||
Le bloc de démarrage n'a qu'une connexion de succès puisqu'il s'agit du point d'entrée :
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID to execute when workflow starts
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Démarrage manuel
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: manual
|
||||
connections:
|
||||
success: next-block
|
||||
```
|
||||
|
||||
### Démarrage manuel avec format d'entrée
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Planification quotidienne
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: daily
|
||||
dailyTime: "09:00"
|
||||
timezone: "America/New_York"
|
||||
connections:
|
||||
success: daily-task
|
||||
```
|
||||
|
||||
### Planification hebdomadaire
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: schedule
|
||||
scheduleType: weekly
|
||||
weeklyDay: MON
|
||||
weeklyTime: "08:30"
|
||||
timezone: UTC
|
||||
connections:
|
||||
success: weekly-report
|
||||
```
|
||||
|
||||
### Déclencheur webhook
|
||||
|
||||
```yaml
|
||||
start:
|
||||
type: starter
|
||||
name: Start
|
||||
inputs:
|
||||
startWorkflow: webhook
|
||||
webhookProvider: slack
|
||||
webhookConfig:
|
||||
# Provider-specific configuration
|
||||
connections:
|
||||
success: process-webhook
|
||||
```
|
||||
@@ -1,403 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML du bloc Webhook
|
||||
description: Référence de configuration YAML pour les blocs Webhook
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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 as table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Expected header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
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 as table entries
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
key:
|
||||
type: string
|
||||
description: Header name
|
||||
value:
|
||||
type: string
|
||||
description: Header value
|
||||
cells:
|
||||
type: object
|
||||
description: Cell display values for the table interface
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Display value for the key column
|
||||
Value:
|
||||
type: string
|
||||
description: Display value for the value column
|
||||
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
|
||||
```
|
||||
|
||||
## Configuration de connexion
|
||||
|
||||
Les connexions définissent où le flux de travail se dirige en fonction du traitement du webhook :
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful processing
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Déclencheur Webhook basique
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Webhook d'événement Slack
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Webhook de paiement (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
|
||||
```
|
||||
|
||||
### Webhook avec format complet d'en-tête de tableau
|
||||
|
||||
Lorsque les en-têtes sont créés via l'interface utilisateur du tableau, le YAML inclut des métadonnées supplémentaires :
|
||||
|
||||
```yaml
|
||||
api-webhook-complete:
|
||||
type: webhook
|
||||
name: "API Webhook with Table Headers"
|
||||
inputs:
|
||||
webhookConfig:
|
||||
enabled: true
|
||||
methods: [POST]
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
key: "Authorization"
|
||||
value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
- id: header-2-uuid-here
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
responseConfig:
|
||||
status: 200
|
||||
headers:
|
||||
- id: response-header-1-uuid
|
||||
key: "Content-Type"
|
||||
value: "application/json"
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: response-header-2-uuid
|
||||
key: "X-Webhook-Response"
|
||||
value: "processed"
|
||||
cells:
|
||||
Key: "X-Webhook-Response"
|
||||
Value: "processed"
|
||||
body: |
|
||||
{
|
||||
"status": "received",
|
||||
"timestamp": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-webhook-complete
|
||||
```
|
||||
|
||||
### Webhook API générique
|
||||
|
||||
```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"
|
||||
body: |
|
||||
{
|
||||
"status": "accepted",
|
||||
"id": "{{Math.random().toString(36).substr(2, 9)}}",
|
||||
"received_at": "{{new Date().toISOString()}}"
|
||||
}
|
||||
connections:
|
||||
success: process-webhook-data
|
||||
```
|
||||
|
||||
### Webhook multi-méthodes
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Formats de paramètres de tableau
|
||||
|
||||
Le bloc Webhook prend en charge deux formats pour les en-têtes (à la fois les en-têtes de validation et les en-têtes de réponse) :
|
||||
|
||||
### Format simplifié (YAML manuel)
|
||||
|
||||
Lors de la rédaction manuelle du YAML, vous pouvez utiliser le format simplifié :
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
- key: "Content-Type"
|
||||
value: "application/json"
|
||||
```
|
||||
|
||||
### Format de tableau complet (généré par l'interface utilisateur)
|
||||
|
||||
Lorsque les en-têtes sont créés via l'interface utilisateur du tableau, le YAML inclut des métadonnées supplémentaires :
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
key: "Authorization"
|
||||
value: "Bearer {{API_TOKEN}}"
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
```
|
||||
|
||||
**Différences clés :**
|
||||
- `id` : Identifiant unique pour suivre la ligne du tableau
|
||||
- `cells` : Valeurs d'affichage utilisées par l'interface utilisateur du tableau
|
||||
- Les deux formats sont fonctionnellement équivalents pour le traitement des webhooks
|
||||
- Le format complet préserve l'état de l'interface utilisateur lors de l'importation/exportation des workflows
|
||||
|
||||
**Important :** mettez toujours entre guillemets les noms d'en-têtes et les valeurs qui contiennent des caractères spéciaux :
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{WEBHOOK_API_KEY}}"
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
```
|
||||
|
||||
## Variables de webhook
|
||||
|
||||
Dans les workflows déclenchés par webhook, ces variables spéciales sont disponibles :
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## Références de sortie
|
||||
|
||||
Après qu'un webhook a traité une requête, vous pouvez référencer ses données :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Bonnes pratiques de sécurité
|
||||
|
||||
- Utilisez toujours des secrets de webhook pour la vérification
|
||||
- Validez les en-têtes et méthodes attendus
|
||||
- Implémentez une gestion d'erreurs appropriée
|
||||
- Utilisez des points de terminaison HTTPS en production
|
||||
- Surveillez l'activité des webhooks et les échecs
|
||||
- Définissez des délais d'attente de réponse appropriés
|
||||
- Validez la structure de la charge utile avant le traitement
|
||||
@@ -1,299 +0,0 @@
|
||||
---
|
||||
title: Schéma YAML des blocs de flux de travail
|
||||
description: Référence de configuration YAML pour les blocs de flux de travail
|
||||
---
|
||||
|
||||
## Définition du schéma
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Configuration des connexions
|
||||
|
||||
Les connexions définissent où le flux de travail se dirige en fonction des résultats des sous-flux de travail :
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful completion
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
||||
### Exécution simple d'un flux de travail
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Pipeline de génération de contenu
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Flux de travail d'analyse en plusieurs étapes
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Exécution conditionnelle de flux de travail
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Exécution parallèle de flux de travail
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Flux de travail de gestion d'erreurs
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Mappage des entrées
|
||||
|
||||
Mappez les données du flux de travail parent vers le sous-flux de travail :
|
||||
|
||||
```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"
|
||||
```
|
||||
|
||||
## Références des sorties
|
||||
|
||||
Une fois qu'un bloc de flux de travail est terminé, vous pouvez référencer ses sorties :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- Utilisez des identifiants de workflow descriptifs pour plus de clarté
|
||||
- Ne mappez que les données nécessaires aux sous-workflows
|
||||
- Définissez des délais d'expiration appropriés selon la complexité du workflow
|
||||
- Incluez une gestion des erreurs pour une exécution robuste
|
||||
- Transmettez les variables d'environnement de manière sécurisée
|
||||
- Testez d'abord les sous-workflows indépendamment
|
||||
- Surveillez les performances des workflows imbriqués
|
||||
- Utilisez des identifiants de workflow versionnés pour la stabilité
|
||||
@@ -1,273 +0,0 @@
|
||||
---
|
||||
title: Exemples de flux de travail YAML
|
||||
description: Exemples de flux de travail YAML complets
|
||||
---
|
||||
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
## Flux de travail en chaîne multi-agents
|
||||
|
||||
Un flux de travail où plusieurs agents IA traitent l'information séquentiellement :
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Flux de travail conditionnel basé sur un routeur
|
||||
|
||||
Un flux de travail qui utilise une logique de routage pour envoyer des données à différents agents selon les 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}}'
|
||||
```
|
||||
|
||||
## Recherche web avec sortie structurée
|
||||
|
||||
Un flux de travail qui effectue des recherches sur le web à l'aide d'outils et renvoie des données structurées :
|
||||
|
||||
```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"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Traitement en boucle avec collection
|
||||
|
||||
Un flux de travail qui traite chaque élément d'une collection à l'aide d'une boucle :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## Classification et réponse aux e-mails
|
||||
|
||||
Un flux de travail qui classe les e-mails et génère des réponses appropriées :
|
||||
|
||||
```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}}'
|
||||
```
|
||||
@@ -1,159 +0,0 @@
|
||||
---
|
||||
title: Référence du flux de travail YAML
|
||||
description: Guide complet pour écrire des flux de travail YAML dans Sim
|
||||
---
|
||||
|
||||
import { Card, Cards } from "fumadocs-ui/components/card";
|
||||
import { Step, Steps } from "fumadocs-ui/components/steps";
|
||||
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
|
||||
|
||||
Les flux de travail YAML offrent un moyen puissant de définir, versionner et partager des configurations de flux de travail dans Sim. Ce guide de référence couvre la syntaxe YAML complète, les schémas de blocs et les meilleures pratiques pour créer des flux de travail robustes.
|
||||
|
||||
## Démarrage rapide
|
||||
|
||||
Chaque flux de travail Sim suit cette structure de base :
|
||||
|
||||
```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}}'
|
||||
```
|
||||
|
||||
## Concepts fondamentaux
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Déclaration de version</strong> : Doit être exactement `version: '1.0'` (avec guillemets)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Structure des blocs</strong> : Tous les blocs de flux de travail sont définis sous la clé `blocks`
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Références de bloc</strong> : Utilisez les noms de blocs en minuscules sans espaces (par ex., `<aiassistant.content>`)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Variables d'environnement</strong> : Référencez avec des doubles accolades `{{VARIABLE_NAME}}`
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Types de blocs
|
||||
|
||||
Sim prend en charge plusieurs types de blocs principaux, chacun avec des schémas YAML spécifiques :
|
||||
|
||||
<Cards>
|
||||
<Card title="Bloc de démarrage" href="/yaml/blocks/starter">
|
||||
Point d'entrée du flux de travail avec prise en charge des déclencheurs manuels, webhooks et planifiés
|
||||
</Card>
|
||||
<Card title="Bloc d'agent" href="/yaml/blocks/agent">
|
||||
Traitement alimenté par l'IA avec prise en charge d'outils et de sorties structurées
|
||||
</Card>
|
||||
<Card title="Bloc de fonction" href="/yaml/blocks/function">
|
||||
Exécution de code JavaScript/TypeScript personnalisé
|
||||
</Card>
|
||||
<Card title="Bloc API" href="/yaml/blocks/api">
|
||||
Requêtes HTTP vers des services externes
|
||||
</Card>
|
||||
<Card title="Bloc de condition" href="/yaml/blocks/condition">
|
||||
Branchement conditionnel basé sur des expressions booléennes
|
||||
</Card>
|
||||
<Card title="Bloc de routeur" href="/yaml/blocks/router">
|
||||
Routage intelligent alimenté par l'IA vers plusieurs chemins
|
||||
</Card>
|
||||
<Card title="Bloc de boucle" href="/yaml/blocks/loop">
|
||||
Traitement itératif avec des boucles for et forEach
|
||||
</Card>
|
||||
<Card title="Bloc parallèle" href="/yaml/blocks/parallel">
|
||||
Exécution simultanée sur plusieurs instances
|
||||
</Card>
|
||||
<Card title="Bloc webhook" href="/yaml/blocks/webhook">
|
||||
Déclencheurs webhook pour les intégrations externes
|
||||
</Card>
|
||||
<Card title="Bloc d'évaluateur" href="/yaml/blocks/evaluator">
|
||||
Validation des sorties selon des critères et métriques définis
|
||||
</Card>
|
||||
<Card title="Bloc de flux de travail" href="/yaml/blocks/workflow">
|
||||
Exécution d'autres flux de travail comme composants réutilisables
|
||||
</Card>
|
||||
<Card title="Bloc de réponse" href="/yaml/blocks/response">
|
||||
Formatage de sortie finale du flux de travail
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
## Syntaxe de référence des blocs
|
||||
|
||||
L'aspect le plus critique des workflows YAML est de comprendre comment référencer les données entre les blocs :
|
||||
|
||||
### Règles de base
|
||||
|
||||
1. **Utilisez le nom du bloc** (pas l'ID du bloc) converti en minuscules avec les espaces supprimés
|
||||
2. **Ajoutez la propriété appropriée** (.content pour les agents, .output pour les outils)
|
||||
3. **Lors de l'utilisation du chat, référencez le bloc de départ** comme `<start.input>`
|
||||
|
||||
### Exemples
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### Cas particuliers
|
||||
|
||||
- **Variables de boucle** : `<loop.index>`, `<loop.currentItem>`, `<loop.items>`
|
||||
- **Variables parallèles** : `<parallel.index>`, `<parallel.currentItem>`
|
||||
|
||||
## Variables d'environnement
|
||||
|
||||
Utilisez des variables d'environnement pour les données sensibles comme les clés API :
|
||||
|
||||
```yaml
|
||||
inputs:
|
||||
apiKey: '{{OPENAI_API_KEY}}'
|
||||
database: '{{DATABASE_URL}}'
|
||||
token: '{{SLACK_BOT_TOKEN}}'
|
||||
```
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- **Gardez les noms de blocs lisibles** : « Email Processor » pour l'affichage dans l'interface
|
||||
- **Référencez les variables d'environnement** : ne codez jamais en dur les clés API
|
||||
- **Structurez pour la lisibilité** : regroupez logiquement les blocs liés
|
||||
- **Testez progressivement** : construisez les workflows étape par étape
|
||||
|
||||
## Prochaines étapes
|
||||
|
||||
- [Syntaxe de référence des blocs](/yaml/block-reference) - Règles de référence détaillées
|
||||
- [Schémas complets des blocs](/yaml/blocks) - Tous les types de blocs disponibles
|
||||
- [Exemples de workflow](/yaml/examples) - Modèles de workflow réels
|
||||
251
apps/docs/content/docs/ja/blocks/guardrails.mdx
Normal file
251
apps/docs/content/docs/ja/blocks/guardrails.mdx
Normal file
@@ -0,0 +1,251 @@
|
||||
---
|
||||
title: Guardrails
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
import { Image } from '@/components/ui/image'
|
||||
import { Video } from '@/components/ui/video'
|
||||
|
||||
The Guardrails block validates and protects your AI workflows by checking content against multiple validation types. Ensure data quality, prevent hallucinations, detect PII, and enforce format requirements before content moves through your workflow.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/guardrails.png"
|
||||
alt="Guardrails Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Overview
|
||||
|
||||
The Guardrails block enables you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Validate JSON Structure</strong>: Ensure LLM outputs are valid JSON before parsing
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Match Regex Patterns</strong>: Verify content matches specific formats (emails, phone numbers, URLs, etc.)
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect Hallucinations</strong>: Use RAG + LLM scoring to validate AI outputs against knowledge base content
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Detect PII</strong>: Identify and optionally mask personally identifiable information across 40+ entity types
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Validation Types
|
||||
|
||||
### JSON Validation
|
||||
|
||||
Validates that content is properly formatted JSON. Perfect for ensuring structured LLM outputs can be safely parsed.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate JSON responses from Agent blocks before parsing
|
||||
- Ensure API payloads are properly formatted
|
||||
- Check structured data integrity
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if valid JSON, `false` otherwise
|
||||
- `error`: Error message if validation fails (e.g., "Invalid JSON: Unexpected token...")
|
||||
|
||||
### Regex Validation
|
||||
|
||||
Checks if content matches a specified regular expression pattern.
|
||||
|
||||
**Use Cases:**
|
||||
- Validate email addresses
|
||||
- Check phone number formats
|
||||
- Verify URLs or custom identifiers
|
||||
- Enforce specific text patterns
|
||||
|
||||
**Configuration:**
|
||||
- **Regex Pattern**: The regular expression to match against (e.g., `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` for emails)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if content matches pattern, `false` otherwise
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
### Hallucination Detection
|
||||
|
||||
Uses Retrieval-Augmented Generation (RAG) with LLM scoring to detect when AI-generated content contradicts or isn't grounded in your knowledge base.
|
||||
|
||||
**How It Works:**
|
||||
1. Queries your knowledge base for relevant context
|
||||
2. Sends both the AI output and retrieved context to an LLM
|
||||
3. LLM assigns a confidence score (0-10 scale)
|
||||
- **0** = Full hallucination (completely ungrounded)
|
||||
- **10** = Fully grounded (completely supported by knowledge base)
|
||||
4. Validation passes if score ≥ threshold (default: 3)
|
||||
|
||||
**Configuration:**
|
||||
- **Knowledge Base**: Select from your existing knowledge bases
|
||||
- **Model**: Choose LLM for scoring (requires strong reasoning - GPT-4o, Claude 3.7 Sonnet recommended)
|
||||
- **API Key**: Authentication for selected LLM provider (auto-hidden for hosted/Ollama models)
|
||||
- **Confidence Threshold**: Minimum score to pass (0-10, default: 3)
|
||||
- **Top K** (Advanced): Number of knowledge base chunks to retrieve (default: 10)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `true` if confidence score ≥ threshold
|
||||
- `score`: Confidence score (0-10)
|
||||
- `reasoning`: LLM's explanation for the score
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Validate Agent responses against documentation
|
||||
- Ensure customer support answers are factually accurate
|
||||
- Verify generated content matches source material
|
||||
- Quality control for RAG applications
|
||||
|
||||
### PII Detection
|
||||
|
||||
Detects personally identifiable information using Microsoft Presidio. Supports 40+ entity types across multiple countries and languages.
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
**How It Works:**
|
||||
1. Scans content for PII entities using pattern matching and NLP
|
||||
2. Returns detected entities with locations and confidence scores
|
||||
3. Optionally masks detected PII in the output
|
||||
|
||||
**Configuration:**
|
||||
- **PII Types to Detect**: Select from grouped categories via modal selector
|
||||
- **Common**: Person name, Email, Phone, Credit card, IP address, etc.
|
||||
- **USA**: SSN, Driver's license, Passport, etc.
|
||||
- **UK**: NHS number, National insurance number
|
||||
- **Spain**: NIF, NIE, CIF
|
||||
- **Italy**: Fiscal code, Driver's license, VAT code
|
||||
- **Poland**: PESEL, NIP, REGON
|
||||
- **Singapore**: NRIC/FIN, UEN
|
||||
- **Australia**: ABN, ACN, TFN, Medicare
|
||||
- **India**: Aadhaar, PAN, Passport, Voter number
|
||||
- **Mode**:
|
||||
- **Detect**: Only identify PII (default)
|
||||
- **Mask**: Replace detected PII with masked values
|
||||
- **Language**: Detection language (default: English)
|
||||
|
||||
**Output:**
|
||||
- `passed`: `false` if any selected PII types are detected
|
||||
- `detectedEntities`: Array of detected PII with type, location, and confidence
|
||||
- `maskedText`: Content with PII masked (only if mode = "Mask")
|
||||
- `error`: Error message if validation fails
|
||||
|
||||
**Use Cases:**
|
||||
- Block content containing sensitive personal information
|
||||
- Mask PII before logging or storing data
|
||||
- Compliance with GDPR, HIPAA, and other privacy regulations
|
||||
- Sanitize user inputs before processing
|
||||
|
||||
## Configuration
|
||||
|
||||
### Content to Validate
|
||||
|
||||
The input content to validate. This typically comes from:
|
||||
- Agent block outputs: `<agent.content>`
|
||||
- Function block results: `<function.output>`
|
||||
- API responses: `<api.output>`
|
||||
- Any other block output
|
||||
|
||||
### Validation Type
|
||||
|
||||
Choose from four validation types:
|
||||
- **Valid JSON**: Check if content is properly formatted JSON
|
||||
- **Regex Match**: Verify content matches a regex pattern
|
||||
- **Hallucination Check**: Validate against knowledge base with LLM scoring
|
||||
- **PII Detection**: Detect and optionally mask personally identifiable information
|
||||
|
||||
## Outputs
|
||||
|
||||
All validation types return:
|
||||
|
||||
- **`<guardrails.passed>`**: Boolean indicating if validation passed
|
||||
- **`<guardrails.validationType>`**: The type of validation performed
|
||||
- **`<guardrails.input>`**: The original input that was validated
|
||||
- **`<guardrails.error>`**: Error message if validation failed (optional)
|
||||
|
||||
Additional outputs by type:
|
||||
|
||||
**Hallucination Check:**
|
||||
- **`<guardrails.score>`**: Confidence score (0-10)
|
||||
- **`<guardrails.reasoning>`**: LLM's explanation
|
||||
|
||||
**PII Detection:**
|
||||
- **`<guardrails.detectedEntities>`**: Array of detected PII entities
|
||||
- **`<guardrails.maskedText>`**: Content with PII masked (if mode = "Mask")
|
||||
|
||||
## Example Use Cases
|
||||
|
||||
### Validate JSON Before Parsing
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Ensure Agent output is valid JSON</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates structured JSON response</li>
|
||||
<li>Guardrails validates JSON format</li>
|
||||
<li>Condition block checks `<guardrails.passed>`</li>
|
||||
<li>If passed → Parse and use data, If failed → Retry or handle error</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Prevent Hallucinations
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Validate customer support responses</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent generates response to customer question</li>
|
||||
<li>Guardrails checks against support documentation knowledge base</li>
|
||||
<li>If confidence score ≥ 3 → Send response</li>
|
||||
<li>If confidence score \< 3 → Flag for human review</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Block PII in User Inputs
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Sanitize user-submitted content</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>User submits form with text content</li>
|
||||
<li>Guardrails detects PII (emails, phone numbers, SSN, etc.)</li>
|
||||
<li>If PII detected → Reject submission or mask sensitive data</li>
|
||||
<li>If no PII → Process normally</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
|
||||
<Video src="guardrails-example.mp4" width={500} height={350} />
|
||||
</div>
|
||||
|
||||
### Validate Email Format
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Check email address format</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Agent extracts email from text</li>
|
||||
<li>Guardrails validates with regex pattern</li>
|
||||
<li>If valid → Use email for notification</li>
|
||||
<li>If invalid → Request correction</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Chain with Condition blocks**: Use `<guardrails.passed>` to branch workflow logic based on validation results
|
||||
- **Use JSON validation before parsing**: Always validate JSON structure before attempting to parse LLM outputs
|
||||
- **Choose appropriate PII types**: Only select the PII entity types relevant to your use case for better performance
|
||||
- **Set reasonable confidence thresholds**: For hallucination detection, adjust threshold based on your accuracy requirements (higher = stricter)
|
||||
- **Use strong models for hallucination detection**: GPT-4o or Claude 3.7 Sonnet provide more accurate confidence scoring
|
||||
- **Mask PII for logging**: Use "Mask" mode when you need to log or store content that may contain PII
|
||||
- **Test regex patterns**: Validate your regex patterns thoroughly before deploying to production
|
||||
- **Monitor validation failures**: Track `<guardrails.error>` messages to identify common validation issues
|
||||
|
||||
<Callout type="info">
|
||||
Guardrails validation happens synchronously in your workflow. For hallucination detection, choose faster models (like GPT-4o-mini) if latency is critical.
|
||||
</Callout>
|
||||
|
||||
@@ -183,4 +183,39 @@ curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" htt
|
||||
- [設定 → サブスクリプション](https://sim.ai/settings/subscription)で現在の使用状況を確認する
|
||||
- 実行詳細を追跡するための[ロギング](/execution/logging)について学ぶ
|
||||
- プログラムによるコスト監視のための[外部API](/execution/api)を探索する
|
||||
- コスト削減のための[ワークフロー最適化テクニック](/blocks)をチェックする
|
||||
- コスト削減のための[ワークフロー最適化テクニック](/blocks)をチェックする
|
||||
|
||||
**チームプラン($40/シート/月):**
|
||||
- チームメンバー全体でのプール使用量
|
||||
- 超過料金はチーム全体の使用量から計算
|
||||
- 組織のオーナーが一括で請求書を受け取る
|
||||
|
||||
**エンタープライズプラン:**
|
||||
- 固定月額料金、超過料金なし
|
||||
- 契約に基づくカスタム使用制限
|
||||
|
||||
### 閾値請求
|
||||
|
||||
未請求の超過料金が$50に達すると、Simは自動的に未請求の全額を請求します。
|
||||
|
||||
**例:**
|
||||
- 10日目:$70の超過料金 → 即時に$70を請求
|
||||
- 15日目:追加$35の使用(合計$105) → すでに請求済み、アクションなし
|
||||
- 20日目:さらに$50の使用(合計$155、未請求$85) → 即時に$85を請求
|
||||
|
||||
これにより、期間終了時に一度に大きな請求が発生する代わりに、月を通じて大きな超過料金が分散されます。
|
||||
|
||||
## コスト管理のベストプラクティス
|
||||
|
||||
1. **定期的な監視**:予想外の事態を避けるため、使用量ダッシュボードを頻繁にチェック
|
||||
2. **予算設定**:プランの制限を支出のガードレールとして使用
|
||||
3. **ワークフローの最適化**:高コストの実行を見直し、プロンプトやモデル選択を最適化
|
||||
4. **適切なモデルの使用**:タスク要件にモデルの複雑さを合わせる
|
||||
5. **類似タスクのバッチ処理**:オーバーヘッドを減らすために可能な場合は複数のリクエストを組み合わせる
|
||||
|
||||
## 次のステップ
|
||||
|
||||
- [設定 → サブスクリプション](https://sim.ai/settings/subscription)で現在の使用状況を確認
|
||||
- 実行詳細を追跡するための[ロギング](/execution/logging)について学ぶ
|
||||
- プログラムによるコスト監視のための[外部API](/execution/api)を探索
|
||||
- コスト削減のための[ワークフロー最適化テクニック](/blocks)をチェック
|
||||
@@ -957,34 +957,6 @@ function StreamingWorkflow() {
|
||||
- Node.js 16+
|
||||
- TypeScript 5.0+ (for TypeScript projects)
|
||||
|
||||
## TypeScript Support
|
||||
|
||||
The SDK is written in TypeScript and provides full type safety:
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SimStudioClient,
|
||||
WorkflowExecutionResult,
|
||||
WorkflowStatus,
|
||||
SimStudioError
|
||||
} from 'simstudio-ts-sdk';
|
||||
|
||||
// Type-safe client initialization
|
||||
const client: SimStudioClient = new SimStudioClient({
|
||||
apiKey: process.env.SIM_API_KEY!
|
||||
});
|
||||
|
||||
// Type-safe workflow execution
|
||||
const result: WorkflowExecutionResult = await client.executeWorkflow('workflow-id', {
|
||||
input: {
|
||||
message: 'Hello, TypeScript!'
|
||||
}
|
||||
});
|
||||
|
||||
// Type-safe status checking
|
||||
const status: WorkflowStatus = await client.getWorkflowStatus('workflow-id');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
||||
|
||||
226
apps/docs/content/docs/ja/tools/clay.mdx
Normal file
226
apps/docs/content/docs/ja/tools/clay.mdx
Normal file
@@ -0,0 +1,226 @@
|
||||
---
|
||||
title: Clay
|
||||
description: Populate Clay workbook
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="clay"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'>
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#41B9FD'
|
||||
d=' M225.000000,1.000000 C227.042313,1.000000 229.084641,1.000000 231.903046,1.237045
|
||||
C233.981308,1.648251 235.283447,1.974177 236.585678,1.974532 C276.426849,1.985374 316.268005,1.964254 356.349304,2.036658
|
||||
C356.713806,2.242061 356.838165,2.358902 357.013062,2.696568 C357.361633,3.243123 357.659729,3.568854 358.029053,3.919451
|
||||
C358.100250,3.944317 358.064270,4.090822 358.043335,4.397895 C358.300018,5.454089 358.577637,6.203210 358.919647,7.420082
|
||||
C358.919891,27.877140 358.855774,47.866444 358.406097,67.910400 C355.200592,68.111740 352.380737,68.384270 349.560669,68.386124
|
||||
C311.434967,68.411194 273.308777,68.303810 235.184082,68.495499 C229.321579,68.524979 223.465759,69.888084 217.280884,70.633224
|
||||
C216.309952,70.742836 215.664993,70.853645 214.722351,70.824722 C211.834686,71.349052 209.244675,72.013123 206.377716,72.681381
|
||||
C205.743713,72.776283 205.386673,72.866997 204.740524,72.831818 C198.868668,74.719879 193.285919,76.733833 187.518951,78.776100
|
||||
C187.334747,78.804405 187.002716,78.975388 186.619080,78.955429 C183.339905,80.398605 180.444336,81.861732 177.450043,83.356339
|
||||
C177.351318,83.387817 177.199478,83.528885 176.863098,83.476791 C174.940445,84.544197 173.354172,85.663696 171.490601,86.873726
|
||||
C170.873749,87.151909 170.534180,87.339554 169.900208,87.480209 C169.065109,87.950676 168.524414,88.468132 167.772736,89.059799
|
||||
C167.561722,89.134003 167.180191,89.367592 166.874084,89.344360 C166.036011,89.874809 165.504074,90.428497 164.768677,91.071411
|
||||
C164.565247,91.160652 164.195068,91.406326 163.886719,91.361374 C162.847015,91.962418 162.115631,92.608421 161.328308,93.267891
|
||||
C161.272369,93.281357 161.208405,93.377022 160.867157,93.365463 C158.692642,94.907082 156.859375,96.460266 154.780716,98.176086
|
||||
C154.099411,98.731529 153.663513,99.124352 153.029877,99.558502 C152.562164,99.788048 152.505905,100.026695 152.411484,100.477333
|
||||
C151.745850,101.065102 151.332077,101.491318 150.666687,101.980057 C150.244827,102.329651 150.074554,102.616714 149.702332,103.025635
|
||||
C149.247330,103.342041 149.041901,103.578056 148.626404,103.921570 C148.191071,104.281303 148.013428,104.574989 147.660767,104.971512
|
||||
C147.485733,105.074348 147.185501,105.347694 146.854645,105.346924 C145.509140,106.645203 144.494507,107.944252 143.328308,109.398895
|
||||
C143.176773,109.554497 142.944397,109.921532 142.688324,109.990189 C142.263062,110.355179 142.093887,110.651512 141.672485,111.133896
|
||||
C140.733337,112.108200 140.046402,112.896461 139.056610,113.710732 C138.269180,114.554047 137.784592,115.371346 137.263580,116.208557
|
||||
C137.227158,116.228470 137.222885,116.311386 136.910522,116.418571 C134.917343,118.573212 133.067978,120.505791 131.581848,122.685951
|
||||
C117.236908,143.729858 109.909592,167.062012 108.797867,192.458298 C106.874710,236.390839 120.176277,274.069336 154.210175,303.200592
|
||||
C157.543198,306.053497 161.524918,308.148560 165.395065,310.715118 C165.584625,310.834839 166.004089,310.993286 166.112747,311.305908
|
||||
C169.421280,313.480804 172.621170,315.343109 176.067993,317.436401 C196.154831,328.754059 217.585236,333.047546 240.138840,332.968475
|
||||
C276.608368,332.840607 313.078613,332.912872 349.548553,332.932007 C352.369659,332.933472 355.190643,333.181519 358.042847,333.756317
|
||||
C358.105377,352.504913 358.140625,370.812134 358.166443,389.119385 C358.179047,398.047455 357.157593,399.080383 348.101379,399.081543
|
||||
C309.488556,399.086456 270.875702,399.088837 232.262939,399.034698 C229.118195,399.030304 225.976639,398.454163 222.828934,398.396088
|
||||
C219.876633,398.341614 216.918152,398.621979 213.655640,398.750488 C212.946808,398.674561 212.544739,398.603149 211.932861,398.249359
|
||||
C205.139450,396.920532 198.555878,395.874084 191.660583,394.785370 C190.959366,394.590973 190.569855,394.438812 189.976242,394.044556
|
||||
C188.751892,393.631897 187.731628,393.461365 186.520462,393.271667 C186.329559,393.252502 185.966660,393.127686 185.711517,392.875610
|
||||
C179.817810,390.901337 174.179230,389.179169 168.376038,387.422913 C168.211411,387.388824 167.919205,387.222443 167.713623,386.935791
|
||||
C163.177170,384.926636 158.846298,383.204132 154.354828,381.442505 C154.194229,381.403320 153.913010,381.229431 153.720596,380.940063
|
||||
C150.958603,379.507599 148.389023,378.364502 145.862350,377.112976 C145.905273,377.004486 145.834991,377.222992 145.696899,376.907410
|
||||
C143.278778,375.470276 140.998734,374.348724 138.546249,373.152405 C138.373810,373.077606 138.071228,372.854553 137.964508,372.539856
|
||||
C136.491272,371.591217 135.124771,370.957306 133.835419,370.230103 C133.912552,370.136810 133.731659,370.297668 133.638489,369.968719
|
||||
C130.257477,367.557678 126.969620,365.475616 123.676697,363.365906 C123.671616,363.338226 123.618034,363.355438 123.527176,363.037048
|
||||
C122.530983,362.219849 121.625641,361.721039 120.554291,361.141144 C120.388283,361.060028 120.099663,360.829254 120.012115,360.507904
|
||||
C116.854935,357.864441 113.785301,355.542328 110.448624,353.088013 C109.480820,352.261383 108.780060,351.566956 108.005241,350.545807
|
||||
C106.569366,349.183838 105.207550,348.148560 103.618164,346.953125 C102.887856,346.250793 102.385124,345.708649 101.851944,344.819275
|
||||
C99.227608,341.972198 96.633736,339.472412 93.829559,336.814728 C93.315529,336.231140 93.011803,335.805389 92.626633,335.113678
|
||||
C92.241318,334.653351 91.937447,334.458984 91.470352,334.116333 C91.113121,333.744141 90.954285,333.497589 90.815475,332.884094
|
||||
C89.432999,331.125000 88.065689,329.710205 86.750458,328.261658 C86.802551,328.227905 86.679573,328.244812 86.625587,328.004700
|
||||
C86.408173,327.453064 86.154968,327.258301 85.840820,327.092529 C85.869644,327.004852 85.792236,327.175934 85.788193,326.847412
|
||||
C85.086029,325.775726 84.387909,325.032593 83.748154,324.192444 C83.806519,324.095428 83.656967,324.265442 83.677109,323.924805
|
||||
C82.691200,322.493195 81.685143,321.402222 80.701370,320.271667 C80.723648,320.232025 80.638077,320.262756 80.664627,319.911865
|
||||
C79.348137,317.824493 78.005081,316.088074 76.632942,314.335297 C76.603851,314.318970 76.610863,314.252594 76.569603,314.015747
|
||||
C76.383919,313.466492 76.145622,313.265167 75.849998,313.133301 C75.886536,313.091675 75.786301,313.138794 75.787926,312.843567
|
||||
C75.413757,312.136780 75.037964,311.725281 74.650452,311.296570 C74.638725,311.279388 74.605232,311.254669 74.648026,310.925659
|
||||
C74.042847,309.802277 73.394867,309.007935 72.848984,308.101166 C72.951088,307.988739 72.736649,308.207153 72.749344,307.902405
|
||||
C72.247162,307.034119 71.732277,306.470612 71.116684,305.727478 C71.015976,305.547882 70.879890,305.159210 70.904739,304.782593
|
||||
C66.198082,293.805145 61.429871,283.220459 56.753250,272.595459 C54.901436,268.388306 53.253181,264.091522 51.402115,259.538025
|
||||
C51.225922,258.823547 51.159870,258.406525 51.280235,257.681335 C50.130058,252.530197 48.793461,247.687271 47.372990,242.549011
|
||||
C47.250717,241.846664 47.212318,241.439667 47.345688,240.702484 C46.854862,237.196991 46.192276,234.021698 45.439560,230.551788
|
||||
C45.308647,229.849213 45.267864,229.441223 45.399055,228.679535 C45.646000,226.680176 45.810993,225.032898 45.781715,223.389099
|
||||
C45.543224,209.998566 45.243523,196.609085 45.021889,183.218307 C44.965343,179.801880 45.121227,176.381912 45.183868,172.656006
|
||||
C45.260223,171.945328 45.332214,171.542252 45.692661,170.944855 C46.379547,167.156143 46.777977,163.561768 47.196243,159.658173
|
||||
C47.326954,158.952240 47.437832,158.555511 47.816860,157.951569 C48.405701,156.819183 48.802628,155.912750 49.035774,154.966003
|
||||
C53.321564,137.562775 58.709690,120.561356 67.075592,104.614586 C68.431061,102.030846 69.442665,99.266708 70.700943,96.329689
|
||||
C70.963600,95.758194 71.138519,95.442963 71.626465,95.023987 C72.881813,93.185463 73.824142,91.450684 74.833984,89.540924
|
||||
C74.901497,89.365936 75.115746,89.058022 75.414856,88.950439 C76.055374,88.124435 76.396790,87.406006 76.808441,86.516800
|
||||
C76.878685,86.346008 77.099190,86.049721 77.426208,85.968033 C78.773079,84.202591 79.792938,82.518845 80.906425,80.889481
|
||||
C81.000053,80.943871 80.811523,80.846413 81.112083,80.718071 C81.899254,79.675362 82.385872,78.760994 82.980141,77.647797
|
||||
C83.256111,77.193130 83.468399,76.981361 83.972061,76.695953 C84.379341,76.259384 84.539192,75.940521 84.777573,75.467239
|
||||
C84.856110,75.312813 85.091125,75.058212 85.387177,74.957954 C86.071411,74.171829 86.459602,73.485962 86.959831,72.547165
|
||||
C87.574921,71.763893 88.077972,71.233551 88.917511,70.614960 C90.438446,68.934166 91.622894,67.341637 92.892502,65.577087
|
||||
C92.977646,65.405067 93.223930,65.110596 93.540451,65.035034 C94.925735,63.668842 95.994484,62.378204 97.037460,61.053047
|
||||
C97.011688,61.018532 97.086418,61.061367 97.418701,60.997078 C100.387512,58.135143 103.024048,55.337498 105.840828,52.291214
|
||||
C107.274651,50.972633 108.528229,49.902691 110.120842,48.821507 C111.324287,47.898228 112.188705,46.986183 113.028954,46.039188
|
||||
C113.004784,46.004234 113.069771,46.059036 113.418266,46.038719 C115.379044,44.556744 116.991333,43.095085 118.618896,41.600952
|
||||
C118.634186,41.568470 118.705971,41.569565 118.943619,41.531807 C119.496582,41.345333 119.686287,41.099613 119.875092,40.861622
|
||||
C119.999825,40.966347 119.751175,40.750431 120.085175,40.695145 C121.552383,39.660774 122.685600,38.681686 123.971207,37.539024
|
||||
C124.353516,37.180477 124.609665,37.030270 125.248093,36.934944 C127.105858,35.720867 128.607605,34.496674 130.284821,33.157169
|
||||
C130.460281,33.041859 130.850082,32.885620 131.191956,32.879478 C132.720169,31.979248 133.906525,31.085161 135.242615,30.070633
|
||||
C135.392365,29.950191 135.742935,29.792681 136.116943,29.797058 C144.044449,25.665834 151.597931,21.530237 159.443359,17.267967
|
||||
C160.335373,16.929420 160.935471,16.717543 161.932648,16.610218 C166.284805,15.022083 170.239853,13.329394 174.481018,11.497526
|
||||
C175.179947,11.265512 175.592758,11.172676 176.284058,11.232684 C181.045059,9.931384 185.527557,8.477241 190.283020,6.942632
|
||||
C190.929428,6.798172 191.302902,6.734176 192.106628,6.758037 C200.661499,5.630559 208.799301,4.494970 216.903397,3.155535
|
||||
C219.646088,2.702227 222.303574,1.733297 225.000000,1.000000 z'
|
||||
/>
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#CF207F'
|
||||
d=' M139.359467,113.684723 C140.046402,112.896461 140.733337,112.108200 141.935272,111.074768
|
||||
C142.614975,110.526917 142.779678,110.224220 142.944397,109.921524 C142.944397,109.921532 143.176773,109.554497 143.635193,109.340279
|
||||
C145.124252,107.866608 146.154877,106.607147 147.185501,105.347694 C147.185501,105.347694 147.485733,105.074348 147.925735,104.915680
|
||||
C148.538528,104.456520 148.711319,104.156021 148.884109,103.855530 C149.041901,103.578056 149.247330,103.342041 149.974884,103.098984
|
||||
C150.636948,103.055161 150.824478,103.059845 151.047058,103.134651 C151.082077,103.204781 151.296890,103.193550 151.296890,103.193550
|
||||
C151.296890,103.193550 151.065384,103.011589 151.060242,102.733826 C151.009506,102.276550 150.963913,102.097046 150.918304,101.917534
|
||||
C151.332077,101.491318 151.745850,101.065102 152.635773,100.460251 C153.111908,100.281609 153.497894,100.049179 153.789368,100.038872
|
||||
C154.772659,99.452271 155.464478,98.875984 156.408234,98.117584 C157.490311,97.320854 158.320465,96.706223 159.411987,96.018272
|
||||
C160.091385,95.613731 160.509415,95.282509 161.005707,94.693756 C161.125443,94.083160 161.166931,93.730095 161.208405,93.377022
|
||||
C161.208405,93.377022 161.272369,93.281357 161.637833,93.283844 C162.733887,92.659668 163.464478,92.032997 164.195068,91.406326
|
||||
C164.195068,91.406326 164.565247,91.160652 165.074371,91.083725 C166.115738,90.460403 166.647964,89.913994 167.180191,89.367592
|
||||
C167.180191,89.367592 167.561722,89.134003 168.067535,89.083694 C169.113785,88.531319 169.654205,88.029266 170.194611,87.527206
|
||||
C170.534180,87.339554 170.873749,87.151909 171.836243,86.913345 C174.039276,85.751251 175.619370,84.640068 177.199478,83.528885
|
||||
C177.199478,83.528885 177.351318,83.387817 177.799438,83.385483 C179.820572,82.883362 181.393585,82.383591 183.170273,81.808777
|
||||
C183.633362,81.599014 183.861649,81.423775 184.373871,81.123398 C185.491287,80.703987 186.293686,80.369202 187.361908,79.991440
|
||||
C188.096588,79.696411 188.565445,79.444366 189.280243,79.140625 C189.689667,79.052353 189.853149,79.015762 190.210281,78.900085
|
||||
C190.651642,78.688210 190.867310,78.515427 191.369507,78.235207 C192.110519,78.067825 192.532990,77.967896 193.244263,77.853729
|
||||
C194.045349,77.588539 194.557632,77.337585 195.404114,77.018097 C196.821823,76.607903 197.905350,76.266235 199.266159,75.907867
|
||||
C200.036407,75.656876 200.529373,75.422592 201.364365,75.106812 C202.827423,74.692017 203.948425,74.358734 205.380356,74.019363
|
||||
C206.468277,73.766235 207.245285,73.519203 208.389984,73.226074 C209.493317,73.091133 210.228912,73.002289 211.290283,72.935577
|
||||
C212.412201,72.683113 213.208344,72.408524 214.267502,72.100060 C214.705307,72.039871 214.880112,72.013565 215.424881,71.999588
|
||||
C217.201248,71.734070 218.607666,71.456200 220.413910,71.153488 C221.880417,71.070969 222.947083,71.013298 224.279190,71.170303
|
||||
C226.068039,70.992416 227.591461,70.599854 229.423401,70.196625 C230.143173,70.169228 230.554443,70.152512 231.313034,70.332619
|
||||
C235.115021,70.382599 238.569687,70.235756 242.491425,70.087082 C280.953430,70.102844 318.948334,70.120430 357.053223,70.529343
|
||||
C357.455536,73.045441 357.992554,75.169182 358.001373,77.295113 C358.070374,93.940338 358.043671,110.585976 358.034363,127.231491
|
||||
C358.030548,134.046967 358.016937,134.057816 351.099701,134.059860 C310.817535,134.071823 270.534180,133.934753 230.254730,134.268967
|
||||
C225.246338,134.310516 220.258575,136.842316 215.230850,138.283905 C215.200439,138.347610 215.065262,138.306870 214.806305,138.286804
|
||||
C214.115921,138.505325 213.684479,138.743896 213.009598,139.115082 C212.583405,139.275208 212.400635,139.302734 211.833679,139.280731
|
||||
C208.407166,140.913559 205.364853,142.595886 202.282257,144.308472 C202.241974,144.338730 202.168381,144.269897 201.973877,144.345428
|
||||
C201.529541,144.568588 201.364868,144.781921 201.061798,145.322937 C200.647766,145.713150 200.457306,145.841385 199.948059,145.977448
|
||||
C197.417572,147.954681 195.205872,149.924103 192.993881,151.942596 C192.993607,151.991669 192.895477,151.990555 192.549149,152.015503
|
||||
C187.409988,154.769379 184.238312,158.680161 183.252487,164.111267 C183.188980,163.991821 183.294250,164.239044 182.950150,164.345627
|
||||
C180.427338,169.367905 177.154861,174.103409 176.308884,179.238663 C174.781265,188.511490 174.320831,198.014923 174.115677,207.437317
|
||||
C173.843521,219.937164 178.269516,231.196472 184.901489,241.604797 C185.796005,243.008667 187.567444,243.853790 188.990707,244.966980
|
||||
C189.048599,244.976334 189.032700,245.092545 189.039658,245.443787 C189.760330,247.068161 190.225784,248.594147 191.225662,249.575775
|
||||
C202.884888,261.022064 217.215424,267.483948 233.244598,267.746521 C272.873535,268.395599 312.520477,268.025818 352.159454,267.873199
|
||||
C356.777344,267.855408 358.164368,269.300385 358.106323,273.876007 C357.865570,292.859802 357.967224,311.847900 357.480347,330.882874
|
||||
C338.906525,330.962463 320.795410,331.052429 302.684601,331.010834 C276.765686,330.951324 250.846970,330.795715 224.637268,330.524200
|
||||
C223.236160,330.268494 222.125992,330.169708 220.602966,330.058136 C219.095612,329.927734 218.001114,329.810120 216.705780,329.546783
|
||||
C216.025055,329.282104 215.545151,329.163147 214.711487,329.008087 C213.887634,328.910431 213.417526,328.848877 212.660461,328.610291
|
||||
C211.246506,328.304504 210.119537,328.175751 208.744629,328.011780 C208.333069,327.943604 208.169434,327.910645 207.938263,327.637787
|
||||
C207.248444,327.303284 206.626129,327.208649 205.594803,327.076263 C204.102722,326.877716 203.019669,326.716858 201.800995,326.447266
|
||||
C201.471100,326.205719 201.260620,326.107544 200.685684,325.968201 C199.212677,325.508331 198.087952,325.124298 196.745544,324.584839
|
||||
C196.008286,324.314789 195.488724,324.200195 194.630951,324.040466 C193.850174,323.890259 193.407623,323.785156 192.841400,323.544250
|
||||
C192.535934,323.239014 192.330688,323.105682 192.067078,322.987274 C192.032166,322.966125 191.968018,322.915680 191.729294,322.721558
|
||||
C190.699036,322.352661 189.907501,322.177887 188.818344,321.917145 C188.322571,321.773010 188.124420,321.714844 187.806183,321.529083
|
||||
C187.508530,321.243896 187.309464,321.121094 186.809235,320.966248 C186.343460,320.853546 186.157333,320.807709 185.820770,320.618958
|
||||
C185.449020,320.300232 185.201187,320.178223 184.579239,320.017242 C183.123337,319.463867 182.015015,319.003296 180.807480,318.445465
|
||||
C180.565079,318.228424 180.407501,318.132172 179.911469,317.900696 C178.706055,317.357391 177.824753,316.972839 176.813736,316.472290
|
||||
C176.496887,316.208344 176.292038,316.091339 175.768234,315.863037 C174.296906,315.078705 173.126801,314.436676 171.834732,313.642029
|
||||
C171.530289,313.298096 171.319397,313.146332 170.800644,312.938660 C170.334427,312.781097 170.147659,312.718903 169.839874,312.529358
|
||||
C169.543640,312.242981 169.349289,312.112366 168.837830,311.854187 C167.694580,311.463196 166.849335,311.228241 166.004089,310.993286
|
||||
C166.004089,310.993286 165.584625,310.834839 165.340561,310.390503 C163.548645,308.481201 162.131165,306.841003 160.433350,305.577545
|
||||
C135.450775,286.986084 120.418205,262.047058 113.761909,231.918289 C110.147652,215.558807 109.790779,198.967697 111.782127,182.339249
|
||||
C113.832611,165.216965 118.597160,148.944382 127.160858,133.886154 C130.497955,128.018265 133.867905,122.169083 137.222885,116.311386
|
||||
C137.222885,116.311386 137.227158,116.228470 137.540863,116.214661 C138.211945,116.106445 138.569351,116.012032 139.062988,115.851028
|
||||
C139.427094,115.546883 139.469406,115.275383 139.372986,114.756676 C139.495758,114.250427 139.475632,113.964195 139.359467,113.684723 z'
|
||||
/>
|
||||
<path
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
fill='#FFC947'
|
||||
d=' M200.266830,145.969620 C200.457306,145.841385 200.647766,145.713150 201.270264,145.275589
|
||||
C201.994553,144.826004 202.149918,144.593887 202.168381,144.269897 C202.168381,144.269897 202.241974,144.338730 202.627762,144.274597
|
||||
C206.081650,142.583710 209.149765,140.956970 212.217880,139.330231 C212.400635,139.302734 212.583405,139.275208 213.260132,139.131683
|
||||
C214.191147,138.779388 214.628204,138.543121 215.065262,138.306854 C215.065262,138.306870 215.200439,138.347610 215.615753,138.262543
|
||||
C222.236084,137.117767 228.435684,135.178802 234.646988,135.140549 C276.033936,134.885590 317.423431,135.036758 358.812073,135.055969
|
||||
C358.822845,178.409409 358.833618,221.762833 358.350433,265.618347 C317.222778,266.132172 276.588776,266.228516 235.955917,266.054840
|
||||
C230.533264,266.031647 225.031219,265.015839 219.714111,263.807587 C207.453613,261.021515 197.827393,253.684341 189.032700,245.092545
|
||||
C189.032700,245.092545 189.048599,244.976334 188.932205,244.635071 C178.652054,231.033371 175.024597,215.782471 175.030136,199.385284
|
||||
C175.034317,187.007950 178.389404,175.448639 183.294250,164.239044 C183.294250,164.239044 183.188980,163.991821 183.536774,163.962189
|
||||
C186.888184,159.951889 189.891830,155.971222 192.895477,151.990555 C192.895477,151.990555 192.993607,151.991669 193.307098,151.842606
|
||||
C195.835999,149.785568 198.051407,147.877594 200.266830,145.969620 z'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Clay](https://www.clay.com/) is a data enrichment and workflow automation platform that helps teams streamline lead generation, research, and data operations through powerful integrations and flexible inputs.
|
||||
|
||||
Learn how to use the Clay Tool in Sim to seamlessly insert data into a Clay workbook through webhook triggers. This tutorial walks you through setting up a webhook, configuring data mapping, and automating real-time updates to your Clay workbooks. Perfect for streamlining lead generation and data enrichment directly from your workflow!
|
||||
|
||||
<iframe
|
||||
width="100%"
|
||||
height="400"
|
||||
src="https://www.youtube.com/embed/cx_75X5sI_s"
|
||||
title="Clay Integration with Sim"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
With Clay, you can:
|
||||
|
||||
- **Enrich agent outputs**: Automatically feed your Sim agent data into Clay tables for structured tracking and analysis
|
||||
- **Trigger workflows via webhooks**: Use Clay’s webhook support to initiate Sim agent tasks from within Clay
|
||||
- **Leverage data loops**: Seamlessly iterate over enriched data rows with agents that operate across dynamic datasets
|
||||
|
||||
In Sim, the Clay integration allows your agents to push structured data into Clay tables via webhooks. This makes it easy to collect, enrich, and manage dynamic outputs such as leads, research summaries, or action items—all in a collaborative, spreadsheet-like interface. Your agents can populate rows in real time, enabling asynchronous workflows where AI-generated insights are captured, reviewed, and used by your team. Whether you're automating research, enriching CRM data, or tracking operational outcomes, Clay becomes a living data layer that interacts intelligently with your agents. By connecting Sim with Clay, you gain a powerful way to operationalize agent results, loop over datasets with precision, and maintain a clean, auditable record of AI-driven work.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Clay into the workflow. Can populate a table with data.
|
||||
|
||||
## Tools
|
||||
|
||||
### `clay_populate`
|
||||
|
||||
Populate Clay with data from a JSON file. Enables direct communication and notifications with timestamp tracking and channel confirmation.
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookURL` | string | Yes | The webhook URL to populate |
|
||||
| `data` | json | Yes | The data to populate |
|
||||
| `authToken` | string | Yes | Auth token for Clay webhook authentication |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | json | Clay populate operation results including response data from Clay webhook |
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `clay`
|
||||
98
apps/docs/content/docs/ja/tools/huggingface.mdx
Normal file
98
apps/docs/content/docs/ja/tools/huggingface.mdx
Normal file
File diff suppressed because one or more lines are too long
@@ -60,10 +60,10 @@ Simでは、ナレッジベースブロックによってエージェントが
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `knowledgeBaseId` | string | はい | 検索対象のナレッジベースID |
|
||||
| `query` | string | いいえ | 検索クエリテキスト(タグフィルターを使用する場合はオプション) |
|
||||
| `knowledgeBaseId` | string | はい | 検索対象のナレッジベースのID |
|
||||
| `query` | string | いいえ | 検索クエリテキスト(タグフィルターを使用する場合は省略可能) |
|
||||
| `topK` | number | いいえ | 返す最も類似した結果の数(1-100) |
|
||||
| `tagFilters` | any | いいえ | tagNameとtagValueプロパティを持つタグフィルターの配列 |
|
||||
| `tagFilters` | array | いいえ | tagNameとtagValueプロパティを持つタグフィルターの配列 |
|
||||
|
||||
#### 出力
|
||||
|
||||
|
||||
219
apps/docs/content/docs/ja/tools/stagehand.mdx
Normal file
219
apps/docs/content/docs/ja/tools/stagehand.mdx
Normal file
@@ -0,0 +1,219 @@
|
||||
---
|
||||
title: Stagehand Extract
|
||||
description: Extract data from websites
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="stagehand"
|
||||
color="#FFC83C"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 108 159'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d='M15 26C22.8234 31.822 23.619 41.405 25.3125 50.3867C25.8461 53.1914 26.4211 55.9689 27.0625 58.75C27.7987 61.9868 28.4177 65.2319 29 68.5C29.332 70.3336 29.6653 72.1669 30 74C30.1418 74.7863 30.2836 75.5727 30.4297 76.3828C31.8011 83.2882 33.3851 90.5397 39.4375 94.75C40.3405 95.3069 40.3405 95.3069 41.2617 95.875C43.8517 97.5512 45.826 99.826 48 102C50.6705 102.89 52.3407 103.143 55.0898 103.211C55.8742 103.239 56.6586 103.268 57.4668 103.297C59.1098 103.349 60.7531 103.393 62.3965 103.43C65.8896 103.567 68.4123 103.705 71.5664 105.289C73 107 73 107 73 111C73.66 111 74.32 111 75 111C74.0759 106.912 74.0759 106.912 71.4766 103.828C67.0509 102.348 62.3634 102.64 57.7305 102.609C52.3632 102.449 49.2783 101.537 45 98C41.8212 94.0795 41.5303 90.9791 42 86C44.9846 83.0154 48.2994 83.6556 52.3047 83.6289C53.139 83.6199 53.9734 83.6108 54.833 83.6015C56.6067 83.587 58.3805 83.5782 60.1543 83.5745C62.8304 83.5627 65.5041 83.5137 68.1797 83.4629C81.1788 83.34 91.8042 85.3227 102 94C106.37 100.042 105.483 106.273 104.754 113.406C103.821 119.026 101.968 124.375 100.125 129.75C99.8806 130.471 99.6361 131.193 99.3843 131.936C97.7783 136.447 95.9466 140.206 93 144C92.34 144 91.68 144 91 144C91 144.66 91 145.32 91 146C79.0816 156.115 63.9798 156.979 49 156C36.6394 154.226 26.7567 148.879 19 139C11.0548 125.712 11.6846 105.465 11.3782 90.4719C11.0579 77.4745 8.03411 64.8142 5.4536 52.1135C5.04373 50.0912 4.64233 48.0673 4.24218 46.043C4.00354 44.8573 3.7649 43.6716 3.51903 42.45C2.14425 33.3121 2.14425 33.3121 4.87499 29.125C8.18297 25.817 10.3605 25.4542 15 26Z'
|
||||
fill='#FDFDFD'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.8466 2.96604 96.2332 5.08365 97.6091 9.03564C99.203 14.0664 99.4412 18.7459 99.4414 23.9922C99.4538 24.9285 99.4663 25.8647 99.4791 26.8294C99.5049 28.8198 99.5247 30.8103 99.539 32.8008C99.5785 37.9693 99.6682 43.1369 99.7578 48.3047C99.7747 49.3188 99.7917 50.3328 99.8091 51.3776C99.9603 59.6066 100.323 67.7921 100.937 76C101.012 77.0582 101.087 78.1163 101.164 79.2065C101.646 85.1097 102.203 90.3442 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C25.0719 148.361 24.1437 147.721 23.1875 147.062C8.32968 133.054 9.60387 109.231 8.73413 90.3208C8.32766 81.776 7.51814 73.4295 5.99999 65C5.82831 64.0338 5.65662 63.0675 5.47973 62.072C4.98196 59.3363 4.46395 56.6053 3.93749 53.875C3.76412 52.9572 3.59074 52.0394 3.4121 51.0938C2.75101 47.6388 2.11387 44.3416 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C4.91881 25.5668 6.78357 24.117 11.25 23.6875C15.8364 24.0697 17.5999 24.9021 21 28C24.7763 34.3881 26.047 41.2626 27.1875 48.5C27.5111 50.4693 27.8377 52.4381 28.168 54.4062C28.3733 55.695 28.3733 55.695 28.5828 57.0098C28.8087 58.991 28.8087 58.991 30 60C30.3171 59.4947 30.6342 58.9894 30.9609 58.4688C33.1122 55.4736 34.7097 53.3284 38.3789 52.3945C44.352 52.203 48.1389 53.6183 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C54.4089 51.8676 55.9015 50.8075 59 49C63.8651 48.104 66.9348 48.3122 71.1487 51.0332C72.0896 51.6822 73.0305 52.3313 74 53C73.9686 51.2986 73.9686 51.2986 73.9365 49.5627C73.8636 45.3192 73.818 41.0758 73.7803 36.8318C73.7603 35.0016 73.733 33.1715 73.6982 31.3415C73.6492 28.6976 73.6269 26.0545 73.6094 23.4102C73.5887 22.6035 73.5681 21.7969 73.5468 20.9658C73.5441 13.8444 75.5121 7.83341 80.25 2.4375C83.9645 0.495841 86.8954 0.209055 91 0.999996ZM3.99999 30C1.56925 34.8615 3.215 40.9393 4.24218 46.043C4.37061 46.6927 4.49905 47.3424 4.63137 48.0118C5.03968 50.0717 5.45687 52.1296 5.87499 54.1875C11.1768 80.6177 11.1768 80.6177 11.4375 93.375C11.7542 120.78 11.7542 120.78 23.5625 144.375C28.5565 149.002 33.5798 151.815 40 154C40.6922 154.244 41.3844 154.487 42.0977 154.738C55.6463 158.576 72.4909 156.79 84.8086 150.316C87.0103 148.994 89.0458 147.669 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C97.1202 138.98 99.3206 133.053 101.25 126.937C101.505 126.174 101.76 125.41 102.023 124.623C104.94 115.65 107.293 104.629 103.625 95.625C96.3369 88.3369 86.5231 83.6919 76.1988 83.6088C74.9905 83.6226 74.9905 83.6226 73.7578 83.6367C72.9082 83.6362 72.0586 83.6357 71.1833 83.6352C69.4034 83.6375 67.6235 83.6472 65.8437 83.6638C63.1117 83.6876 60.3806 83.6843 57.6484 83.6777C55.9141 83.6833 54.1797 83.6904 52.4453 83.6992C51.6277 83.6983 50.81 83.6974 49.9676 83.6964C45.5122 83.571 45.5122 83.571 42 86C41.517 90.1855 41.733 92.4858 43.6875 96.25C46.4096 99.4871 48.6807 101.674 53.0105 102.282C55.3425 102.411 57.6645 102.473 60 102.5C69.8847 102.612 69.8847 102.612 74 106C74.8125 108.687 74.8125 108.688 75 111C74.34 111 73.68 111 73 111C72.8969 110.216 72.7937 109.432 72.6875 108.625C72.224 105.67 72.224 105.67 69 104C65.2788 103.745 61.5953 103.634 57.8672 103.609C51.1596 103.409 46.859 101.691 41.875 97C41.2562 96.34 40.6375 95.68 40 95C39.175 94.4637 38.35 93.9275 37.5 93.375C30.9449 87.1477 30.3616 77.9789 29.4922 69.418C29.1557 66.1103 29.1557 66.1103 28.0352 63.625C26.5234 59.7915 26.1286 55.8785 25.5625 51.8125C23.9233 38.3 23.9233 38.3 17 27C11.7018 24.3509 7.9915 26.1225 3.99999 30Z'
|
||||
fill='#1F1F1F'
|
||||
/>
|
||||
<path
|
||||
d='M89.0976 2.53906C91 3 91 3 93.4375 5.3125C96.1586 9.99276 96.178 14.1126 96.2461 19.3828C96.2778 21.1137 96.3098 22.8446 96.342 24.5754C96.3574 25.4822 96.3728 26.3889 96.3887 27.3232C96.6322 41.3036 96.9728 55.2117 98.3396 69.1353C98.9824 75.7746 99.0977 82.3308 99 89C96.5041 88.0049 94.0126 87.0053 91.5351 85.9648C90.3112 85.4563 90.3112 85.4563 89.0625 84.9375C87.8424 84.4251 87.8424 84.4251 86.5976 83.9023C83.7463 82.9119 80.9774 82.4654 78 82C76.7702 65.9379 75.7895 49.8907 75.7004 33.7775C75.6919 32.3138 75.6783 30.8501 75.6594 29.3865C75.5553 20.4082 75.6056 12.1544 80.6875 4.4375C83.6031 2.62508 85.7 2.37456 89.0976 2.53906Z'
|
||||
fill='#FBFBFB'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.99 13.495 97.99 13.495 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.646 85.1082 102.203 90.3434 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C24.6078 148.041 24.6078 148.041 23.1875 147.062C13.5484 137.974 10.832 124.805 9.99999 112C9.91815 101.992 10.4358 91.9898 11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C28.854 148.273 33.89 150.868 40 153C40.6935 153.245 41.387 153.49 42.1016 153.742C56.9033 157.914 73.8284 155.325 87 148C88.3301 147.327 89.6624 146.658 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C100.044 130.286 105.786 114.602 104 99C102.157 94.9722 100.121 93.0631 96.3125 90.875C95.5042 90.398 94.696 89.9211 93.8633 89.4297C85.199 85.1035 78.1558 84.4842 68.5 84.3125C67.2006 84.2783 65.9012 84.2442 64.5625 84.209C61.3751 84.127 58.1879 84.0577 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.8637 87.6094 98.8637 87.6094 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#262114'
|
||||
/>
|
||||
<path
|
||||
d='M68 51C72.86 54.06 74.644 56.5072 76 62C76.249 65.2763 76.2347 68.5285 76.1875 71.8125C76.1868 72.6833 76.1862 73.554 76.1855 74.4512C76.1406 80.8594 76.1406 80.8594 75 82C73.5113 82.0867 72.0185 82.107 70.5273 82.0976C69.6282 82.0944 68.7291 82.0912 67.8027 82.0879C66.8572 82.0795 65.9117 82.0711 64.9375 82.0625C63.9881 82.058 63.0387 82.0535 62.0605 82.0488C59.707 82.037 57.3535 82.0205 55 82C53.6352 77.2188 53.738 72.5029 53.6875 67.5625C53.6585 66.6208 53.6295 65.6792 53.5996 64.709C53.5591 60.2932 53.5488 57.7378 55.8945 53.9023C59.5767 50.5754 63.1766 50.211 68 51Z'
|
||||
fill='#F8F8F8'
|
||||
/>
|
||||
<path
|
||||
d='M46 55C48.7557 57.1816 50.4359 58.8718 52 62C52.0837 63.5215 52.1073 65.0466 52.0977 66.5703C52.0944 67.4662 52.0912 68.3621 52.0879 69.2852C52.0795 70.2223 52.0711 71.1595 52.0625 72.125C52.058 73.0699 52.0535 74.0148 52.0488 74.9883C52.037 77.3256 52.0206 79.6628 52 82C50.9346 82.1992 50.9346 82.1992 49.8477 82.4023C48.9286 82.5789 48.0094 82.7555 47.0625 82.9375C46.146 83.1115 45.2294 83.2855 44.2852 83.4648C42.0471 83.7771 42.0471 83.7771 41 85C40.7692 86.3475 40.5885 87.7038 40.4375 89.0625C40.2931 90.3619 40.1487 91.6613 40 93C37 92 37 92 35.8672 90.1094C35.5398 89.3308 35.2123 88.5522 34.875 87.75C34.5424 86.9817 34.2098 86.2134 33.8672 85.4219C31.9715 80.1277 31.7884 75.065 31.75 69.5C31.7294 68.7536 31.7087 68.0073 31.6875 67.2383C31.6551 62.6607 32.0474 59.7266 35 56C38.4726 54.2637 42.2119 54.3981 46 55Z'
|
||||
fill='#FAFAFA'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.66 13.33 98.32 13.66 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.566 84.1265 102.275 88.3364 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C75.0451 84.5473 73.8012 84.5086 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C66.6624 84.317 66.6624 84.317 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9091 88.0729 98.8182 87.1458 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#423B28'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C88.074 3.7122 85.8483 3.51695 83 4C79.1128 7.37574 78.178 11.0991 77 16C76.8329 18.5621 76.7615 21.1317 76.7695 23.6992C76.77 24.4155 76.7704 25.1318 76.7709 25.8698C76.7739 27.3783 76.7817 28.8868 76.7942 30.3953C76.8123 32.664 76.8147 34.9324 76.8144 37.2012C76.8329 44.6001 77.0765 51.888 77.7795 59.259C78.1413 63.7564 78.1068 68.2413 78.0625 72.75C78.058 73.6498 78.0535 74.5495 78.0488 75.4766C78.0373 77.6511 78.0193 79.8255 78 82C78.99 82.495 78.99 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.495 83.01 46.495 83.01 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.0544 77.9997 75.0939 75.0005 75.125 72C75.1418 71.1608 75.1585 70.3216 75.1758 69.457C75.2185 63.9475 74.555 59.2895 73 54C73.66 54 74.32 54 75 54C74.9314 53.2211 74.8629 52.4422 74.7922 51.6396C74.1158 43.5036 73.7568 35.4131 73.6875 27.25C73.644 25.5194 73.644 25.5194 73.5996 23.7539C73.5376 15.3866 74.6189 8.85069 80.25 2.4375C83.9433 0.506911 86.9162 0.173322 91 0.999996Z'
|
||||
fill='#131311'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.97965 28.9369 5.97965 28.9369 3.99999 32C3.67226 36.9682 4.31774 41.4911 5.27733 46.3594C5.40814 47.0304 5.53894 47.7015 5.67371 48.3929C5.94892 49.7985 6.22723 51.2035 6.50854 52.6079C6.93887 54.7569 7.35989 56.9075 7.77929 59.0586C9.09359 66.104 9.09359 66.104 11 73C11.0836 75.2109 11.1073 77.4243 11.0976 79.6367C11.0944 80.9354 11.0912 82.2342 11.0879 83.5723C11.0795 84.944 11.0711 86.3158 11.0625 87.6875C11.0575 89.071 11.0529 90.4544 11.0488 91.8379C11.037 95.2253 11.0206 98.6126 11 102C8.54975 99.5498 8.73228 98.8194 8.65624 95.4492C8.62812 94.53 8.60001 93.6108 8.57104 92.6638C8.54759 91.6816 8.52415 90.6994 8.49999 89.6875C8.20265 81.3063 7.58164 73.2485 5.99999 65C5.67135 63.2175 5.34327 61.435 5.01562 59.6523C4.31985 55.9098 3.62013 52.1681 2.90233 48.4297C2.75272 47.6484 2.60311 46.867 2.44897 46.062C1.99909 43.8187 1.99909 43.8187 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C6.06003 24.1839 8.81126 23.4843 15 24Z'
|
||||
fill='#2A2311'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C30.0569 149.404 36.9894 152.617 45 154C42 156 42 156 39.4375 156C29.964 153.244 20.8381 146.677 16 138C8.26993 120.062 9.92611 101.014 11 82Z'
|
||||
fill='#272214'
|
||||
/>
|
||||
<path
|
||||
d='M68 49C70.3478 50.1116 71.9703 51.3346 74 53C73.34 53.66 72.68 54.32 72 55C71.505 54.505 71.01 54.01 70.5 53.5C67.6718 51.8031 65.3662 51.5622 62.0976 51.4062C58.4026 52.4521 57.1992 53.8264 55 57C54.3826 61.2861 54.5302 65.4938 54.6875 69.8125C54.7101 70.9823 54.7326 72.1521 54.7559 73.3574C54.8147 76.2396 54.8968 79.1191 55 82C54.01 82 53.02 82 52 82C51.9854 81.4203 51.9708 80.8407 51.9558 80.2434C51.881 77.5991 51.7845 74.9561 51.6875 72.3125C51.6649 71.4005 51.6424 70.4885 51.6191 69.5488C51.4223 64.6292 51.2621 60.9548 48 57C45.6603 55.8302 44.1661 55.8339 41.5625 55.8125C40.78 55.7983 39.9976 55.7841 39.1914 55.7695C36.7079 55.8591 36.7079 55.8591 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C55.6091 48.544 61.7788 47.8649 68 49Z'
|
||||
fill='#1F1A0F'
|
||||
/>
|
||||
<path
|
||||
d='M99 60C99.33 60 99.66 60 100 60C100.05 60.7865 100.1 61.573 100.152 62.3833C100.385 65.9645 100.63 69.5447 100.875 73.125C100.954 74.3625 101.032 75.6 101.113 76.875C101.197 78.0738 101.281 79.2727 101.367 80.5078C101.44 81.6075 101.514 82.7073 101.589 83.8403C102.013 87.1 102.94 89.8988 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C74.4231 84.5279 74.4231 84.5279 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C67.3166 84.3363 66.0082 84.2977 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9162 87.912 98.8324 86.8241 98.7461 85.7031C98.1266 77.012 97.9127 68.6814 99 60Z'
|
||||
fill='#332E22'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.2818 29.7267 4.15499 31.2727 3.18749 35.8125C3.12562 36.8644 3.06374 37.9163 2.99999 39C2.33999 39 1.67999 39 0.999992 39C0.330349 31.2321 0.330349 31.2321 3.37499 27.5625C7.31431 23.717 9.51597 23.543 15 24Z'
|
||||
fill='#1D180A'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C85.4345 3.33492 85.4345 3.33491 80.6875 5.75C78.5543 9.85841 77.6475 13.9354 76.7109 18.4531C76.4763 19.2936 76.2417 20.1341 76 21C75.34 21.33 74.68 21.66 74 22C73.5207 15.4102 74.5846 10.6998 78 5C81.755 0.723465 85.5463 -0.103998 91 0.999996Z'
|
||||
fill='#16130D'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C42.5569 93.7631 43.1137 94.5263 43.6875 95.3125C46.4238 98.4926 48.7165 100.679 53.0105 101.282C55.3425 101.411 57.6646 101.473 60 101.5C70.6207 101.621 70.6207 101.621 75 106C75.0406 107.666 75.0427 109.334 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C65.3044 104.833 61.615 104.703 57.916 104.658C52.1631 104.454 48.7484 103.292 44 100C41.5625 97.25 41.5625 97.25 40 95C40.66 95 41.32 95 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#2B2B2B'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.1682 86.6079 12.3287 91.216 12.4822 95.8245C12.5354 97.3909 12.5907 98.9574 12.6482 100.524C12.7306 102.78 12.8055 105.036 12.8789 107.293C12.9059 107.989 12.933 108.685 12.9608 109.402C13.0731 113.092 12.9015 116.415 12 120C11.67 120 11.34 120 11 120C9.63778 112.17 10.1119 104.4 10.4375 96.5C10.4908 95.0912 10.5436 93.6823 10.5957 92.2734C10.7247 88.8487 10.8596 85.4243 11 82Z'
|
||||
fill='#4D483B'
|
||||
/>
|
||||
<path
|
||||
d='M43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C52 59 52 59 50 60C49.5256 59.34 49.0512 58.68 48.5625 58C45.2656 55.4268 43.184 55.5955 39.1211 55.6641C36.7043 55.8955 36.7043 55.8955 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586Z'
|
||||
fill='#221F16'
|
||||
/>
|
||||
<path
|
||||
d='M76 73C76.33 73 76.66 73 77 73C77 75.97 77 78.94 77 82C78.485 82.495 78.485 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.33 83.34 46.66 82.68 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.33 78.36 75.66 75.72 76 73Z'
|
||||
fill='#040404'
|
||||
/>
|
||||
<path
|
||||
d='M27 54C27.33 54 27.66 54 28 54C28.33 56.97 28.66 59.94 29 63C29.99 63 30.98 63 32 63C32 66.96 32 70.92 32 75C31.01 74.67 30.02 74.34 29 74C28.8672 73.2523 28.7344 72.5047 28.5977 71.7344C28.421 70.7495 28.2444 69.7647 28.0625 68.75C27.8885 67.7755 27.7144 66.8009 27.5352 65.7969C27.0533 63.087 27.0533 63.087 26.4062 60.8125C25.8547 58.3515 26.3956 56.4176 27 54Z'
|
||||
fill='#434039'
|
||||
/>
|
||||
<path
|
||||
d='M78 5C78.99 5.33 79.98 5.66 81 6C80.3194 6.92812 80.3194 6.92812 79.625 7.875C77.7233 11.532 77.1555 14.8461 76.5273 18.8906C76.3533 19.5867 76.1793 20.2828 76 21C75.34 21.33 74.68 21.66 74 22C73.5126 15.2987 74.9229 10.9344 78 5Z'
|
||||
fill='#2A2313'
|
||||
/>
|
||||
<path
|
||||
d='M12 115C12.99 115.495 12.99 115.495 14 116C14.5334 118.483 14.9326 120.864 15.25 123.375C15.3531 124.061 15.4562 124.747 15.5625 125.453C16.0763 129.337 16.2441 130.634 14 134C12.6761 127.57 11.752 121.571 12 115Z'
|
||||
fill='#2F2C22'
|
||||
/>
|
||||
<path
|
||||
d='M104 95C107 98 107 98 107.363 101.031C107.347 102.176 107.33 103.321 107.312 104.5C107.309 105.645 107.305 106.789 107.301 107.969C107 111 107 111 105 114C104.67 107.73 104.34 101.46 104 95Z'
|
||||
fill='#120F05'
|
||||
/>
|
||||
<path
|
||||
d='M56 103C58.6048 102.919 61.2071 102.86 63.8125 102.812C64.5505 102.787 65.2885 102.762 66.0488 102.736C71.4975 102.662 71.4975 102.662 74 104.344C75.374 106.619 75.2112 108.396 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C66.7956 104.77 64.5861 104.589 62.375 104.438C61.1865 104.354 59.998 104.27 58.7734 104.184C57.4006 104.093 57.4006 104.093 56 104C56 103.67 56 103.34 56 103Z'
|
||||
fill='#101010'
|
||||
/>
|
||||
<path
|
||||
d='M23 40C23.66 40 24.32 40 25 40C27.3084 46.3482 27.1982 52.2948 27 59C26.67 59 26.34 59 26 59C25.01 52.73 24.02 46.46 23 40Z'
|
||||
fill='#191409'
|
||||
/>
|
||||
<path
|
||||
d='M47 83C46.3606 83.3094 45.7212 83.6187 45.0625 83.9375C41.9023 87.0977 42.181 90.6833 42 95C41.01 94.67 40.02 94.34 39 94C39.3463 85.7409 39.3463 85.7409 41.875 82.875C44 82 44 82 47 83Z'
|
||||
fill='#171717'
|
||||
/>
|
||||
<path
|
||||
d='M53 61C53.33 61 53.66 61 54 61C54.33 67.93 54.66 74.86 55 82C54.01 82 53.02 82 52 82C52.33 75.07 52.66 68.14 53 61Z'
|
||||
fill='#444444'
|
||||
/>
|
||||
<path
|
||||
d='M81 154C78.6696 156.33 77.8129 156.39 74.625 156.75C73.4687 156.897 73.4687 156.897 72.2891 157.047C69.6838 156.994 68.2195 156.317 66 155C67.7478 154.635 69.4984 154.284 71.25 153.938C72.7118 153.642 72.7118 153.642 74.2031 153.34C76.8681 153.016 78.4887 153.145 81 154Z'
|
||||
fill='#332F23'
|
||||
/>
|
||||
<path
|
||||
d='M19 28C19.66 28 20.32 28 21 28C21.6735 29.4343 22.3386 30.8726 23 32.3125C23.5569 33.5133 23.5569 33.5133 24.125 34.7383C25 37 25 37 25 40C22 39 22 39 21.0508 37.2578C20.8071 36.554 20.5635 35.8502 20.3125 35.125C20.0611 34.4263 19.8098 33.7277 19.5508 33.0078C19 31 19 31 19 28Z'
|
||||
fill='#282213'
|
||||
/>
|
||||
<path
|
||||
d='M102 87C104.429 93.2857 104.429 93.2857 103 97C100.437 94.75 100.437 94.75 98 92C98.0625 89.75 98.0625 89.75 99 88C101 87 101 87 102 87Z'
|
||||
fill='#37301F'
|
||||
/>
|
||||
<path
|
||||
d='M53 56C53.33 56 53.66 56 54 56C53.67 62.27 53.34 68.54 53 75C52.67 75 52.34 75 52 75C51.7788 72.2088 51.5726 69.4179 51.375 66.625C51.3105 65.8309 51.2461 65.0369 51.1797 64.2188C51.0394 62.1497 51.0124 60.0737 51 58C51.66 57.34 52.32 56.68 53 56Z'
|
||||
fill='#030303'
|
||||
/>
|
||||
<path
|
||||
d='M100 129C100.33 129 100.66 129 101 129C100.532 133.776 99.7567 137.045 97 141C96.34 140.67 95.68 140.34 95 140C96.65 136.37 98.3 132.74 100 129Z'
|
||||
fill='#1E1A12'
|
||||
/>
|
||||
<path
|
||||
d='M15 131C17.7061 132.353 17.9618 133.81 19.125 136.562C19.4782 137.389 19.8314 138.215 20.1953 139.066C20.4609 139.704 20.7264 140.343 21 141C20.01 141 19.02 141 18 141C15.9656 137.27 15 135.331 15 131Z'
|
||||
fill='#1C1912'
|
||||
/>
|
||||
<path
|
||||
d='M63 49C69.4 49.4923 69.4 49.4923 72.4375 52.0625C73.2109 53.0216 73.2109 53.0216 74 54C70.8039 54 69.5828 53.4533 66.8125 52C66.0971 51.6288 65.3816 51.2575 64.6445 50.875C64.1018 50.5863 63.5591 50.2975 63 50C63 49.67 63 49.34 63 49Z'
|
||||
fill='#13110C'
|
||||
/>
|
||||
<path
|
||||
d='M0.999992 39C1.98999 39 2.97999 39 3.99999 39C5.24999 46.625 5.24999 46.625 2.99999 50C2.33999 46.37 1.67999 42.74 0.999992 39Z'
|
||||
fill='#312C1E'
|
||||
/>
|
||||
<path
|
||||
d='M94 5C94.66 5 95.32 5 96 5C97.8041 7.75924 98.0127 8.88972 97.625 12.25C97.4187 13.1575 97.2125 14.065 97 15C95.1161 11.7345 94.5071 8.71888 94 5Z'
|
||||
fill='#292417'
|
||||
/>
|
||||
<path
|
||||
d='M20 141C23.3672 142.393 24.9859 143.979 27 147C24.625 146.812 24.625 146.812 22 146C20.6875 143.438 20.6875 143.438 20 141Z'
|
||||
fill='#373328'
|
||||
/>
|
||||
<path
|
||||
d='M86 83C86.33 83.99 86.66 84.98 87 86C83.37 85.34 79.74 84.68 76 84C80.3553 81.8223 81.4663 81.9696 86 83Z'
|
||||
fill='#2F2F2F'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C46 97.625 46 97.625 46 101C44.02 99.35 42.04 97.7 40 96C40.66 95.67 41.32 95.34 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#232323'
|
||||
/>
|
||||
<path
|
||||
d='M34 55C34.66 55.33 35.32 55.66 36 56C35.5256 56.7838 35.0512 57.5675 34.5625 58.375C33.661 59.8895 32.7882 61.4236 32 63C31.34 63 30.68 63 30 63C30.4983 59.3125 31.1007 57.3951 34 55Z'
|
||||
fill='#110F0A'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Stagehand](https://stagehand.com) is a tool that allows you to extract structured data from webpages using Browserbase and OpenAI.
|
||||
|
||||
With Stagehand, you can:
|
||||
|
||||
- **Extract structured data**: Extract structured data from webpages using Browserbase and OpenAI
|
||||
- **Save data to a database**: Save the extracted data to a database
|
||||
- **Automate workflows**: Automate workflows to extract data from webpages
|
||||
|
||||
In Sim, the Stagehand integration enables your agents to extract structured data from webpages using Browserbase and OpenAI. This allows for powerful automation scenarios such as data extraction, data analysis, and data integration. Your agents can extract structured data from webpages, save the extracted data to a database, and automate workflows to extract data from webpages. This integration bridges the gap between your AI workflows and your data management system, enabling seamless data extraction and integration. By connecting Sim with Stagehand, you can automate data extraction processes, maintain up-to-date information repositories, generate reports, and organize information intelligently - all through your intelligent agents.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Stagehand into the workflow. Can extract structured data from webpages.
|
||||
|
||||
## Tools
|
||||
|
||||
### `stagehand_extract`
|
||||
|
||||
Extract structured data from a webpage using Stagehand
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `url` | string | Yes | URL of the webpage to extract data from |
|
||||
| `instruction` | string | Yes | Instructions for extraction |
|
||||
| `apiKey` | string | Yes | OpenAI API key for extraction \(required by Stagehand\) |
|
||||
| `schema` | json | Yes | JSON schema defining the structure of the data to extract |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | object | Extracted structured data matching the provided schema |
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `stagehand`
|
||||
225
apps/docs/content/docs/ja/tools/stagehand_agent.mdx
Normal file
225
apps/docs/content/docs/ja/tools/stagehand_agent.mdx
Normal file
@@ -0,0 +1,225 @@
|
||||
---
|
||||
title: Stagehand Agent
|
||||
description: Autonomous web browsing agent
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="stagehand_agent"
|
||||
color="#FFC83C"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 108 159'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d='M15 26C22.8234 31.822 23.619 41.405 25.3125 50.3867C25.8461 53.1914 26.4211 55.9689 27.0625 58.75C27.7987 61.9868 28.4177 65.2319 29 68.5C29.332 70.3336 29.6653 72.1669 30 74C30.1418 74.7863 30.2836 75.5727 30.4297 76.3828C31.8011 83.2882 33.3851 90.5397 39.4375 94.75C40.3405 95.3069 40.3405 95.3069 41.2617 95.875C43.8517 97.5512 45.826 99.826 48 102C50.6705 102.89 52.3407 103.143 55.0898 103.211C55.8742 103.239 56.6586 103.268 57.4668 103.297C59.1098 103.349 60.7531 103.393 62.3965 103.43C65.8896 103.567 68.4123 103.705 71.5664 105.289C73 107 73 107 73 111C73.66 111 74.32 111 75 111C74.0759 106.912 74.0759 106.912 71.4766 103.828C67.0509 102.348 62.3634 102.64 57.7305 102.609C52.3632 102.449 49.2783 101.537 45 98C41.8212 94.0795 41.5303 90.9791 42 86C44.9846 83.0154 48.2994 83.6556 52.3047 83.6289C53.139 83.6199 53.9734 83.6108 54.833 83.6015C56.6067 83.587 58.3805 83.5782 60.1543 83.5745C62.8304 83.5627 65.5041 83.5137 68.1797 83.4629C81.1788 83.34 91.8042 85.3227 102 94C106.37 100.042 105.483 106.273 104.754 113.406C103.821 119.026 101.968 124.375 100.125 129.75C99.8806 130.471 99.6361 131.193 99.3843 131.936C97.7783 136.447 95.9466 140.206 93 144C92.34 144 91.68 144 91 144C91 144.66 91 145.32 91 146C79.0816 156.115 63.9798 156.979 49 156C36.6394 154.226 26.7567 148.879 19 139C11.0548 125.712 11.6846 105.465 11.3782 90.4719C11.0579 77.4745 8.03411 64.8142 5.4536 52.1135C5.04373 50.0912 4.64233 48.0673 4.24218 46.043C4.00354 44.8573 3.7649 43.6716 3.51903 42.45C2.14425 33.3121 2.14425 33.3121 4.87499 29.125C8.18297 25.817 10.3605 25.4542 15 26Z'
|
||||
fill='#FDFDFD'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.8466 2.96604 96.2332 5.08365 97.6091 9.03564C99.203 14.0664 99.4412 18.7459 99.4414 23.9922C99.4538 24.9285 99.4663 25.8647 99.4791 26.8294C99.5049 28.8198 99.5247 30.8103 99.539 32.8008C99.5785 37.9693 99.6682 43.1369 99.7578 48.3047C99.7747 49.3188 99.7917 50.3328 99.8091 51.3776C99.9603 59.6066 100.323 67.7921 100.937 76C101.012 77.0582 101.087 78.1163 101.164 79.2065C101.646 85.1097 102.203 90.3442 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C25.0719 148.361 24.1437 147.721 23.1875 147.062C8.32968 133.054 9.60387 109.231 8.73413 90.3208C8.32766 81.776 7.51814 73.4295 5.99999 65C5.82831 64.0338 5.65662 63.0675 5.47973 62.072C4.98196 59.3363 4.46395 56.6053 3.93749 53.875C3.76412 52.9572 3.59074 52.0394 3.4121 51.0938C2.75101 47.6388 2.11387 44.3416 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C4.91881 25.5668 6.78357 24.117 11.25 23.6875C15.8364 24.0697 17.5999 24.9021 21 28C24.7763 34.3881 26.047 41.2626 27.1875 48.5C27.5111 50.4693 27.8377 52.4381 28.168 54.4062C28.3733 55.695 28.3733 55.695 28.5828 57.0098C28.8087 58.991 28.8087 58.991 30 60C30.3171 59.4947 30.6342 58.9894 30.9609 58.4688C33.1122 55.4736 34.7097 53.3284 38.3789 52.3945C44.352 52.203 48.1389 53.6183 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C54.4089 51.8676 55.9015 50.8075 59 49C63.8651 48.104 66.9348 48.3122 71.1487 51.0332C72.0896 51.6822 73.0305 52.3313 74 53C73.9686 51.2986 73.9686 51.2986 73.9365 49.5627C73.8636 45.3192 73.818 41.0758 73.7803 36.8318C73.7603 35.0016 73.733 33.1715 73.6982 31.3415C73.6492 28.6976 73.6269 26.0545 73.6094 23.4102C73.5887 22.6035 73.5681 21.7969 73.5468 20.9658C73.5441 13.8444 75.5121 7.83341 80.25 2.4375C83.9645 0.495841 86.8954 0.209055 91 0.999996ZM3.99999 30C1.56925 34.8615 3.215 40.9393 4.24218 46.043C4.37061 46.6927 4.49905 47.3424 4.63137 48.0118C5.03968 50.0717 5.45687 52.1296 5.87499 54.1875C11.1768 80.6177 11.1768 80.6177 11.4375 93.375C11.7542 120.78 11.7542 120.78 23.5625 144.375C28.5565 149.002 33.5798 151.815 40 154C40.6922 154.244 41.3844 154.487 42.0977 154.738C55.6463 158.576 72.4909 156.79 84.8086 150.316C87.0103 148.994 89.0458 147.669 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C97.1202 138.98 99.3206 133.053 101.25 126.937C101.505 126.174 101.76 125.41 102.023 124.623C104.94 115.65 107.293 104.629 103.625 95.625C96.3369 88.3369 86.5231 83.6919 76.1988 83.6088C74.9905 83.6226 74.9905 83.6226 73.7578 83.6367C72.9082 83.6362 72.0586 83.6357 71.1833 83.6352C69.4034 83.6375 67.6235 83.6472 65.8437 83.6638C63.1117 83.6876 60.3806 83.6843 57.6484 83.6777C55.9141 83.6833 54.1797 83.6904 52.4453 83.6992C51.6277 83.6983 50.81 83.6974 49.9676 83.6964C45.5122 83.571 45.5122 83.571 42 86C41.517 90.1855 41.733 92.4858 43.6875 96.25C46.4096 99.4871 48.6807 101.674 53.0105 102.282C55.3425 102.411 57.6645 102.473 60 102.5C69.8847 102.612 69.8847 102.612 74 106C74.8125 108.687 74.8125 108.688 75 111C74.34 111 73.68 111 73 111C72.8969 110.216 72.7937 109.432 72.6875 108.625C72.224 105.67 72.224 105.67 69 104C65.2788 103.745 61.5953 103.634 57.8672 103.609C51.1596 103.409 46.859 101.691 41.875 97C41.2562 96.34 40.6375 95.68 40 95C39.175 94.4637 38.35 93.9275 37.5 93.375C30.9449 87.1477 30.3616 77.9789 29.4922 69.418C29.1557 66.1103 29.1557 66.1103 28.0352 63.625C26.5234 59.7915 26.1286 55.8785 25.5625 51.8125C23.9233 38.3 23.9233 38.3 17 27C11.7018 24.3509 7.9915 26.1225 3.99999 30Z'
|
||||
fill='#1F1F1F'
|
||||
/>
|
||||
<path
|
||||
d='M89.0976 2.53906C91 3 91 3 93.4375 5.3125C96.1586 9.99276 96.178 14.1126 96.2461 19.3828C96.2778 21.1137 96.3098 22.8446 96.342 24.5754C96.3574 25.4822 96.3728 26.3889 96.3887 27.3232C96.6322 41.3036 96.9728 55.2117 98.3396 69.1353C98.9824 75.7746 99.0977 82.3308 99 89C96.5041 88.0049 94.0126 87.0053 91.5351 85.9648C90.3112 85.4563 90.3112 85.4563 89.0625 84.9375C87.8424 84.4251 87.8424 84.4251 86.5976 83.9023C83.7463 82.9119 80.9774 82.4654 78 82C76.7702 65.9379 75.7895 49.8907 75.7004 33.7775C75.6919 32.3138 75.6783 30.8501 75.6594 29.3865C75.5553 20.4082 75.6056 12.1544 80.6875 4.4375C83.6031 2.62508 85.7 2.37456 89.0976 2.53906Z'
|
||||
fill='#FBFBFB'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.99 13.495 97.99 13.495 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.646 85.1082 102.203 90.3434 105.602 95.3672C107.492 98.9262 107.45 102.194 107.375 106.125C107.366 106.881 107.356 107.638 107.346 108.417C107.18 114.639 106.185 120.152 104 126C103.636 126.996 103.273 127.993 102.898 129.02C98.2182 141.022 92.6784 149.349 80.7891 155.062C67.479 160.366 49.4234 159.559 36 155C32.4272 153.286 29.2162 151.308 26 149C24.6078 148.041 24.6078 148.041 23.1875 147.062C13.5484 137.974 10.832 124.805 9.99999 112C9.91815 101.992 10.4358 91.9898 11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C28.854 148.273 33.89 150.868 40 153C40.6935 153.245 41.387 153.49 42.1016 153.742C56.9033 157.914 73.8284 155.325 87 148C88.3301 147.327 89.6624 146.658 91 146C91 145.34 91 144.68 91 144C91.66 144 92.32 144 93 144C100.044 130.286 105.786 114.602 104 99C102.157 94.9722 100.121 93.0631 96.3125 90.875C95.5042 90.398 94.696 89.9211 93.8633 89.4297C85.199 85.1035 78.1558 84.4842 68.5 84.3125C67.2006 84.2783 65.9012 84.2442 64.5625 84.209C61.3751 84.127 58.1879 84.0577 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.8637 87.6094 98.8637 87.6094 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#262114'
|
||||
/>
|
||||
<path
|
||||
d='M68 51C72.86 54.06 74.644 56.5072 76 62C76.249 65.2763 76.2347 68.5285 76.1875 71.8125C76.1868 72.6833 76.1862 73.554 76.1855 74.4512C76.1406 80.8594 76.1406 80.8594 75 82C73.5113 82.0867 72.0185 82.107 70.5273 82.0976C69.6282 82.0944 68.7291 82.0912 67.8027 82.0879C66.8572 82.0795 65.9117 82.0711 64.9375 82.0625C63.9881 82.058 63.0387 82.0535 62.0605 82.0488C59.707 82.037 57.3535 82.0205 55 82C53.6352 77.2188 53.738 72.5029 53.6875 67.5625C53.6585 66.6208 53.6295 65.6792 53.5996 64.709C53.5591 60.2932 53.5488 57.7378 55.8945 53.9023C59.5767 50.5754 63.1766 50.211 68 51Z'
|
||||
fill='#F8F8F8'
|
||||
/>
|
||||
<path
|
||||
d='M46 55C48.7557 57.1816 50.4359 58.8718 52 62C52.0837 63.5215 52.1073 65.0466 52.0977 66.5703C52.0944 67.4662 52.0912 68.3621 52.0879 69.2852C52.0795 70.2223 52.0711 71.1595 52.0625 72.125C52.058 73.0699 52.0535 74.0148 52.0488 74.9883C52.037 77.3256 52.0206 79.6628 52 82C50.9346 82.1992 50.9346 82.1992 49.8477 82.4023C48.9286 82.5789 48.0094 82.7555 47.0625 82.9375C46.146 83.1115 45.2294 83.2855 44.2852 83.4648C42.0471 83.7771 42.0471 83.7771 41 85C40.7692 86.3475 40.5885 87.7038 40.4375 89.0625C40.2931 90.3619 40.1487 91.6613 40 93C37 92 37 92 35.8672 90.1094C35.5398 89.3308 35.2123 88.5522 34.875 87.75C34.5424 86.9817 34.2098 86.2134 33.8672 85.4219C31.9715 80.1277 31.7884 75.065 31.75 69.5C31.7294 68.7536 31.7087 68.0073 31.6875 67.2383C31.6551 62.6607 32.0474 59.7266 35 56C38.4726 54.2637 42.2119 54.3981 46 55Z'
|
||||
fill='#FAFAFA'
|
||||
/>
|
||||
<path
|
||||
d='M97 13C97.66 13.33 98.32 13.66 99 14C99.0297 15.8781 99.0297 15.8781 99.0601 17.7942C99.4473 46.9184 99.4473 46.9184 100.937 76C101.012 77.0574 101.087 78.1149 101.164 79.2043C101.566 84.1265 102.275 88.3364 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C75.0451 84.5473 73.8012 84.5086 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C66.6624 84.317 66.6624 84.317 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9091 88.0729 98.8182 87.1458 98.7246 86.1907C96.96 67.8915 95.697 49.7051 95.75 31.3125C95.751 30.5016 95.7521 29.6908 95.7532 28.8554C95.7901 15.4198 95.7901 15.4198 97 13Z'
|
||||
fill='#423B28'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C88.074 3.7122 85.8483 3.51695 83 4C79.1128 7.37574 78.178 11.0991 77 16C76.8329 18.5621 76.7615 21.1317 76.7695 23.6992C76.77 24.4155 76.7704 25.1318 76.7709 25.8698C76.7739 27.3783 76.7817 28.8868 76.7942 30.3953C76.8123 32.664 76.8147 34.9324 76.8144 37.2012C76.8329 44.6001 77.0765 51.888 77.7795 59.259C78.1413 63.7564 78.1068 68.2413 78.0625 72.75C78.058 73.6498 78.0535 74.5495 78.0488 75.4766C78.0373 77.6511 78.0193 79.8255 78 82C78.99 82.495 78.99 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.495 83.01 46.495 83.01 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.0544 77.9997 75.0939 75.0005 75.125 72C75.1418 71.1608 75.1585 70.3216 75.1758 69.457C75.2185 63.9475 74.555 59.2895 73 54C73.66 54 74.32 54 75 54C74.9314 53.2211 74.8629 52.4422 74.7922 51.6396C74.1158 43.5036 73.7568 35.4131 73.6875 27.25C73.644 25.5194 73.644 25.5194 73.5996 23.7539C73.5376 15.3866 74.6189 8.85069 80.25 2.4375C83.9433 0.506911 86.9162 0.173322 91 0.999996Z'
|
||||
fill='#131311'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.97965 28.9369 5.97965 28.9369 3.99999 32C3.67226 36.9682 4.31774 41.4911 5.27733 46.3594C5.40814 47.0304 5.53894 47.7015 5.67371 48.3929C5.94892 49.7985 6.22723 51.2035 6.50854 52.6079C6.93887 54.7569 7.35989 56.9075 7.77929 59.0586C9.09359 66.104 9.09359 66.104 11 73C11.0836 75.2109 11.1073 77.4243 11.0976 79.6367C11.0944 80.9354 11.0912 82.2342 11.0879 83.5723C11.0795 84.944 11.0711 86.3158 11.0625 87.6875C11.0575 89.071 11.0529 90.4544 11.0488 91.8379C11.037 95.2253 11.0206 98.6126 11 102C8.54975 99.5498 8.73228 98.8194 8.65624 95.4492C8.62812 94.53 8.60001 93.6108 8.57104 92.6638C8.54759 91.6816 8.52415 90.6994 8.49999 89.6875C8.20265 81.3063 7.58164 73.2485 5.99999 65C5.67135 63.2175 5.34327 61.435 5.01562 59.6523C4.31985 55.9098 3.62013 52.1681 2.90233 48.4297C2.75272 47.6484 2.60311 46.867 2.44897 46.062C1.99909 43.8187 1.99909 43.8187 0.999995 41C0.505898 36.899 0.0476353 32.7768 2.04687 29.0469C6.06003 24.1839 8.81126 23.4843 15 24Z'
|
||||
fill='#2A2311'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.0146 82.6118 12.0292 83.2236 12.0442 83.854C11.5946 115.845 11.5946 115.845 24.0625 143.875C30.0569 149.404 36.9894 152.617 45 154C42 156 42 156 39.4375 156C29.964 153.244 20.8381 146.677 16 138C8.26993 120.062 9.92611 101.014 11 82Z'
|
||||
fill='#272214'
|
||||
/>
|
||||
<path
|
||||
d='M68 49C70.3478 50.1116 71.9703 51.3346 74 53C73.34 53.66 72.68 54.32 72 55C71.505 54.505 71.01 54.01 70.5 53.5C67.6718 51.8031 65.3662 51.5622 62.0976 51.4062C58.4026 52.4521 57.1992 53.8264 55 57C54.3826 61.2861 54.5302 65.4938 54.6875 69.8125C54.7101 70.9823 54.7326 72.1521 54.7559 73.3574C54.8147 76.2396 54.8968 79.1191 55 82C54.01 82 53.02 82 52 82C51.9854 81.4203 51.9708 80.8407 51.9558 80.2434C51.881 77.5991 51.7845 74.9561 51.6875 72.3125C51.6649 71.4005 51.6424 70.4885 51.6191 69.5488C51.4223 64.6292 51.2621 60.9548 48 57C45.6603 55.8302 44.1661 55.8339 41.5625 55.8125C40.78 55.7983 39.9976 55.7841 39.1914 55.7695C36.7079 55.8591 36.7079 55.8591 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C53.0928 56.1338 53.0928 56.1338 53.1875 55.25C55.6091 48.544 61.7788 47.8649 68 49Z'
|
||||
fill='#1F1A0F'
|
||||
/>
|
||||
<path
|
||||
d='M99 60C99.33 60 99.66 60 100 60C100.05 60.7865 100.1 61.573 100.152 62.3833C100.385 65.9645 100.63 69.5447 100.875 73.125C100.954 74.3625 101.032 75.6 101.113 76.875C101.197 78.0738 101.281 79.2727 101.367 80.5078C101.44 81.6075 101.514 82.7073 101.589 83.8403C102.013 87.1 102.94 89.8988 104 93C103.625 95.375 103.625 95.375 103 97C102.361 96.2781 101.721 95.5563 101.062 94.8125C94.4402 88.1902 85.5236 84.8401 76.2891 84.5859C74.4231 84.5279 74.4231 84.5279 72.5195 84.4688C71.2343 84.4378 69.9491 84.4069 68.625 84.375C67.3166 84.3363 66.0082 84.2977 64.6601 84.2578C61.4402 84.1638 58.2203 84.0781 55 84C55 83.67 55 83.34 55 83C58.9087 82.7294 62.8179 82.4974 66.7309 82.2981C68.7007 82.1902 70.6688 82.0535 72.6367 81.916C82.854 81.4233 90.4653 83.3102 99 89C98.9162 87.912 98.8324 86.8241 98.7461 85.7031C98.1266 77.012 97.9127 68.6814 99 60Z'
|
||||
fill='#332E22'
|
||||
/>
|
||||
<path
|
||||
d='M15 24C20.2332 26.3601 22.1726 29.3732 24.1875 34.5195C26.8667 42.6988 27.2651 50.4282 27 59C26.67 59 26.34 59 26 59C25.8945 58.436 25.7891 57.8721 25.6804 57.291C25.1901 54.6926 24.6889 52.0963 24.1875 49.5C24.0218 48.6131 23.8562 47.7262 23.6855 46.8125C21.7568 35.5689 21.7568 35.5689 15 27C12.0431 26.2498 12.0431 26.2498 8.99999 27C5.2818 29.7267 4.15499 31.2727 3.18749 35.8125C3.12562 36.8644 3.06374 37.9163 2.99999 39C2.33999 39 1.67999 39 0.999992 39C0.330349 31.2321 0.330349 31.2321 3.37499 27.5625C7.31431 23.717 9.51597 23.543 15 24Z'
|
||||
fill='#1D180A'
|
||||
/>
|
||||
<path
|
||||
d='M91 0.999996C94.3999 3.06951 96.8587 5.11957 98 9C97.625 12.25 97.625 12.25 97 15C95.804 12.6081 94.6146 10.2139 93.4375 7.8125C92.265 5.16236 92.265 5.16236 91 4C85.4345 3.33492 85.4345 3.33491 80.6875 5.75C78.5543 9.85841 77.6475 13.9354 76.7109 18.4531C76.4763 19.2936 76.2417 20.1341 76 21C75.34 21.33 74.68 21.66 74 22C73.5207 15.4102 74.5846 10.6998 78 5C81.755 0.723465 85.5463 -0.103998 91 0.999996Z'
|
||||
fill='#16130D'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C42.5569 93.7631 43.1137 94.5263 43.6875 95.3125C46.4238 98.4926 48.7165 100.679 53.0105 101.282C55.3425 101.411 57.6646 101.473 60 101.5C70.6207 101.621 70.6207 101.621 75 106C75.0406 107.666 75.0427 109.334 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C65.3044 104.833 61.615 104.703 57.916 104.658C52.1631 104.454 48.7484 103.292 44 100C41.5625 97.25 41.5625 97.25 40 95C40.66 95 41.32 95 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#2B2B2B'
|
||||
/>
|
||||
<path
|
||||
d='M11 82C11.33 82 11.66 82 12 82C12.1682 86.6079 12.3287 91.216 12.4822 95.8245C12.5354 97.3909 12.5907 98.9574 12.6482 100.524C12.7306 102.78 12.8055 105.036 12.8789 107.293C12.9059 107.989 12.933 108.685 12.9608 109.402C13.0731 113.092 12.9015 116.415 12 120C11.67 120 11.34 120 11 120C9.63778 112.17 10.1119 104.4 10.4375 96.5C10.4908 95.0912 10.5436 93.6823 10.5957 92.2734C10.7247 88.8487 10.8596 85.4243 11 82Z'
|
||||
fill='#4D483B'
|
||||
/>
|
||||
<path
|
||||
d='M43.4844 52.5586C47.3251 53.2325 49.8148 54.7842 53 57C52 59 52 59 50 60C49.5256 59.34 49.0512 58.68 48.5625 58C45.2656 55.4268 43.184 55.5955 39.1211 55.6641C36.7043 55.8955 36.7043 55.8955 34 58C32.7955 60.5518 32.7955 60.5518 32 63C31.34 63 30.68 63 30 63C30.2839 59.6879 31.0332 57.9518 32.9375 55.1875C36.7018 52.4987 38.9555 52.3484 43.4844 52.5586Z'
|
||||
fill='#221F16'
|
||||
/>
|
||||
<path
|
||||
d='M76 73C76.33 73 76.66 73 77 73C77 75.97 77 78.94 77 82C78.485 82.495 78.485 82.495 80 83C68.78 83.33 57.56 83.66 46 84C46.33 83.34 46.66 82.68 47 82C52.9349 80.7196 58.8909 80.8838 64.9375 80.9375C65.9075 80.942 66.8775 80.9465 67.8769 80.9512C70.2514 80.9629 72.6256 80.9793 75 81C75.33 78.36 75.66 75.72 76 73Z'
|
||||
fill='#040404'
|
||||
/>
|
||||
<path
|
||||
d='M27 54C27.33 54 27.66 54 28 54C28.33 56.97 28.66 59.94 29 63C29.99 63 30.98 63 32 63C32 66.96 32 70.92 32 75C31.01 74.67 30.02 74.34 29 74C28.8672 73.2523 28.7344 72.5047 28.5977 71.7344C28.421 70.7495 28.2444 69.7647 28.0625 68.75C27.8885 67.7755 27.7144 66.8009 27.5352 65.7969C27.0533 63.087 27.0533 63.087 26.4062 60.8125C25.8547 58.3515 26.3956 56.4176 27 54Z'
|
||||
fill='#434039'
|
||||
/>
|
||||
<path
|
||||
d='M78 5C78.99 5.33 79.98 5.66 81 6C80.3194 6.92812 80.3194 6.92812 79.625 7.875C77.7233 11.532 77.1555 14.8461 76.5273 18.8906C76.3533 19.5867 76.1793 20.2828 76 21C75.34 21.33 74.68 21.66 74 22C73.5126 15.2987 74.9229 10.9344 78 5Z'
|
||||
fill='#2A2313'
|
||||
/>
|
||||
<path
|
||||
d='M12 115C12.99 115.495 12.99 115.495 14 116C14.5334 118.483 14.9326 120.864 15.25 123.375C15.3531 124.061 15.4562 124.747 15.5625 125.453C16.0763 129.337 16.2441 130.634 14 134C12.6761 127.57 11.752 121.571 12 115Z'
|
||||
fill='#2F2C22'
|
||||
/>
|
||||
<path
|
||||
d='M104 95C107 98 107 98 107.363 101.031C107.347 102.176 107.33 103.321 107.312 104.5C107.309 105.645 107.305 106.789 107.301 107.969C107 111 107 111 105 114C104.67 107.73 104.34 101.46 104 95Z'
|
||||
fill='#120F05'
|
||||
/>
|
||||
<path
|
||||
d='M56 103C58.6048 102.919 61.2071 102.86 63.8125 102.812C64.5505 102.787 65.2885 102.762 66.0488 102.736C71.4975 102.662 71.4975 102.662 74 104.344C75.374 106.619 75.2112 108.396 75 111C74.34 111 73.68 111 73 111C72.7112 110.196 72.4225 109.391 72.125 108.562C71.2674 105.867 71.2674 105.867 69 105C66.7956 104.77 64.5861 104.589 62.375 104.438C61.1865 104.354 59.998 104.27 58.7734 104.184C57.4006 104.093 57.4006 104.093 56 104C56 103.67 56 103.34 56 103Z'
|
||||
fill='#101010'
|
||||
/>
|
||||
<path
|
||||
d='M23 40C23.66 40 24.32 40 25 40C27.3084 46.3482 27.1982 52.2948 27 59C26.67 59 26.34 59 26 59C25.01 52.73 24.02 46.46 23 40Z'
|
||||
fill='#191409'
|
||||
/>
|
||||
<path
|
||||
d='M47 83C46.3606 83.3094 45.7212 83.6187 45.0625 83.9375C41.9023 87.0977 42.181 90.6833 42 95C41.01 94.67 40.02 94.34 39 94C39.3463 85.7409 39.3463 85.7409 41.875 82.875C44 82 44 82 47 83Z'
|
||||
fill='#171717'
|
||||
/>
|
||||
<path
|
||||
d='M53 61C53.33 61 53.66 61 54 61C54.33 67.93 54.66 74.86 55 82C54.01 82 53.02 82 52 82C52.33 75.07 52.66 68.14 53 61Z'
|
||||
fill='#444444'
|
||||
/>
|
||||
<path
|
||||
d='M81 154C78.6696 156.33 77.8129 156.39 74.625 156.75C73.4687 156.897 73.4687 156.897 72.2891 157.047C69.6838 156.994 68.2195 156.317 66 155C67.7478 154.635 69.4984 154.284 71.25 153.938C72.7118 153.642 72.7118 153.642 74.2031 153.34C76.8681 153.016 78.4887 153.145 81 154Z'
|
||||
fill='#332F23'
|
||||
/>
|
||||
<path
|
||||
d='M19 28C19.66 28 20.32 28 21 28C21.6735 29.4343 22.3386 30.8726 23 32.3125C23.5569 33.5133 23.5569 33.5133 24.125 34.7383C25 37 25 37 25 40C22 39 22 39 21.0508 37.2578C20.8071 36.554 20.5635 35.8502 20.3125 35.125C20.0611 34.4263 19.8098 33.7277 19.5508 33.0078C19 31 19 31 19 28Z'
|
||||
fill='#282213'
|
||||
/>
|
||||
<path
|
||||
d='M102 87C104.429 93.2857 104.429 93.2857 103 97C100.437 94.75 100.437 94.75 98 92C98.0625 89.75 98.0625 89.75 99 88C101 87 101 87 102 87Z'
|
||||
fill='#37301F'
|
||||
/>
|
||||
<path
|
||||
d='M53 56C53.33 56 53.66 56 54 56C53.67 62.27 53.34 68.54 53 75C52.67 75 52.34 75 52 75C51.7788 72.2088 51.5726 69.4179 51.375 66.625C51.3105 65.8309 51.2461 65.0369 51.1797 64.2188C51.0394 62.1497 51.0124 60.0737 51 58C51.66 57.34 52.32 56.68 53 56Z'
|
||||
fill='#030303'
|
||||
/>
|
||||
<path
|
||||
d='M100 129C100.33 129 100.66 129 101 129C100.532 133.776 99.7567 137.045 97 141C96.34 140.67 95.68 140.34 95 140C96.65 136.37 98.3 132.74 100 129Z'
|
||||
fill='#1E1A12'
|
||||
/>
|
||||
<path
|
||||
d='M15 131C17.7061 132.353 17.9618 133.81 19.125 136.562C19.4782 137.389 19.8314 138.215 20.1953 139.066C20.4609 139.704 20.7264 140.343 21 141C20.01 141 19.02 141 18 141C15.9656 137.27 15 135.331 15 131Z'
|
||||
fill='#1C1912'
|
||||
/>
|
||||
<path
|
||||
d='M63 49C69.4 49.4923 69.4 49.4923 72.4375 52.0625C73.2109 53.0216 73.2109 53.0216 74 54C70.8039 54 69.5828 53.4533 66.8125 52C66.0971 51.6288 65.3816 51.2575 64.6445 50.875C64.1018 50.5863 63.5591 50.2975 63 50C63 49.67 63 49.34 63 49Z'
|
||||
fill='#13110C'
|
||||
/>
|
||||
<path
|
||||
d='M0.999992 39C1.98999 39 2.97999 39 3.99999 39C5.24999 46.625 5.24999 46.625 2.99999 50C2.33999 46.37 1.67999 42.74 0.999992 39Z'
|
||||
fill='#312C1E'
|
||||
/>
|
||||
<path
|
||||
d='M94 5C94.66 5 95.32 5 96 5C97.8041 7.75924 98.0127 8.88972 97.625 12.25C97.4187 13.1575 97.2125 14.065 97 15C95.1161 11.7345 94.5071 8.71888 94 5Z'
|
||||
fill='#292417'
|
||||
/>
|
||||
<path
|
||||
d='M20 141C23.3672 142.393 24.9859 143.979 27 147C24.625 146.812 24.625 146.812 22 146C20.6875 143.438 20.6875 143.438 20 141Z'
|
||||
fill='#373328'
|
||||
/>
|
||||
<path
|
||||
d='M86 83C86.33 83.99 86.66 84.98 87 86C83.37 85.34 79.74 84.68 76 84C80.3553 81.8223 81.4663 81.9696 86 83Z'
|
||||
fill='#2F2F2F'
|
||||
/>
|
||||
<path
|
||||
d='M42 93C46 97.625 46 97.625 46 101C44.02 99.35 42.04 97.7 40 96C40.66 95.67 41.32 95.34 42 95C42 94.34 42 93.68 42 93Z'
|
||||
fill='#232323'
|
||||
/>
|
||||
<path
|
||||
d='M34 55C34.66 55.33 35.32 55.66 36 56C35.5256 56.7838 35.0512 57.5675 34.5625 58.375C33.661 59.8895 32.7882 61.4236 32 63C31.34 63 30.68 63 30 63C30.4983 59.3125 31.1007 57.3951 34 55Z'
|
||||
fill='#110F0A'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Stagehand](https://www.stagehand.dev/) is an autonomous web agent platform that enables AI systems to navigate and interact with websites just like a human would. It provides a powerful solution for automating complex web tasks without requiring custom code or browser automation scripts.
|
||||
|
||||
With Stagehand, you can:
|
||||
|
||||
- **Automate web navigation**: Enable AI to browse websites, click links, fill forms, and interact with web elements
|
||||
- **Extract structured data**: Collect specific information from websites in a structured, usable format
|
||||
- **Complete complex workflows**: Perform multi-step tasks across different websites and web applications
|
||||
- **Handle authentication**: Navigate login processes and maintain sessions across websites
|
||||
- **Process dynamic content**: Interact with JavaScript-heavy sites and single-page applications
|
||||
- **Maintain context awareness**: Keep track of the current state and history while navigating
|
||||
- **Generate detailed reports**: Receive comprehensive logs of actions taken and data collected
|
||||
|
||||
In Sim, the Stagehand integration enables your agents to seamlessly interact with web-based systems as part of their workflows. This allows for sophisticated automation scenarios that bridge the gap between your AI agents and the vast information and functionality available on the web. Your agents can search for information, interact with web applications, extract data from websites, and incorporate these capabilities into their decision-making processes. By connecting Sim with Stagehand, you can create agents that extend beyond API-based integrations to navigate the web just as a human would - filling forms, clicking buttons, reading content, and extracting valuable information to complete their tasks more effectively.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Stagehand Agent into the workflow. Can navigate the web and perform tasks.
|
||||
|
||||
## Tools
|
||||
|
||||
### `stagehand_agent`
|
||||
|
||||
Run an autonomous web agent to complete tasks and extract structured data
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `startUrl` | string | Yes | URL of the webpage to start the agent on |
|
||||
| `task` | string | Yes | The task to complete or goal to achieve on the website |
|
||||
| `variables` | json | No | Optional variables to substitute in the task \(format: \{key: value\}\). Reference in task using %key% |
|
||||
| `format` | string | No | No description |
|
||||
| `apiKey` | string | Yes | OpenAI API key for agent execution \(required by Stagehand\) |
|
||||
| `outputSchema` | json | No | Optional JSON schema defining the structure of data the agent should return |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `agentResult` | object | Result from the Stagehand agent execution |
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `stagehand_agent`
|
||||
@@ -109,10 +109,10 @@ Supabaseテーブルにデータを挿入する
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | はい | SupabaseプロジェクトID(例:jdrkgepadsdopsntdlom) |
|
||||
| `projectId` | string | はい | あなたのSupabaseプロジェクトID(例:jdrkgepadsdopsntdlom) |
|
||||
| `table` | string | はい | データを挿入するSupabaseテーブルの名前 |
|
||||
| `data` | any | はい | 挿入するデータ |
|
||||
| `apiKey` | string | はい | Supabaseサービスロールのシークレットキー |
|
||||
| `data` | array | はい | 挿入するデータ(オブジェクトの配列または単一のオブジェクト) |
|
||||
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
|
||||
|
||||
#### 出力
|
||||
|
||||
@@ -190,10 +190,10 @@ Supabaseテーブルにデータを挿入または更新する(アップサー
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | はい | SupabaseプロジェクトID(例:jdrkgepadsdopsntdlom) |
|
||||
| `projectId` | string | はい | あなたのSupabaseプロジェクトID(例:jdrkgepadsdopsntdlom) |
|
||||
| `table` | string | はい | データをアップサートするSupabaseテーブルの名前 |
|
||||
| `data` | any | はい | アップサート(挿入または更新)するデータ |
|
||||
| `apiKey` | string | はい | Supabaseサービスロールのシークレットキー |
|
||||
| `data` | array | はい | アップサート(挿入または更新)するデータ - オブジェクトの配列または単一のオブジェクト |
|
||||
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
|
||||
|
||||
#### 出力
|
||||
|
||||
|
||||
@@ -86,12 +86,108 @@ Telegram Bot APIを通じてTelegramチャンネルまたはユーザーにメ
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Telegramメッセージ送信成功ステータス |
|
||||
| `messageId` | number | 一意のTelegramメッセージ識別子 |
|
||||
| `chatId` | string | メッセージが送信された対象チャットID |
|
||||
| `text` | string | 送信されたメッセージのテキスト内容 |
|
||||
| `timestamp` | number | メッセージが送信されたUnixタイムスタンプ |
|
||||
| `from` | object | メッセージを送信したボットに関する情報 |
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | Telegramメッセージデータ |
|
||||
|
||||
## 注意事項
|
||||
|
||||
- カテゴリー: `tools`
|
||||
- タイプ: `telegram`
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | はい | あなたのTelegram Bot APIトークン |
|
||||
| `chatId` | string | はい | 対象のTelegramチャットID |
|
||||
| `messageId` | string | はい | 削除するメッセージID |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | 削除操作の結果 |
|
||||
|
||||
### `telegram_send_photo`
|
||||
|
||||
Telegram Bot APIを通じてTelegramチャンネルまたはユーザーに写真を送信します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | はい | あなたのTelegram Bot APIトークン |
|
||||
| `chatId` | string | はい | 対象のTelegramチャットID |
|
||||
| `photo` | string | はい | 送信する写真。file_idまたはHTTP URLを指定 |
|
||||
| `caption` | string | いいえ | 写真のキャプション(任意) |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | 写真(任意)を含むTelegramメッセージデータ |
|
||||
|
||||
### `telegram_send_video`
|
||||
|
||||
Telegram Bot APIを通じてTelegramチャンネルまたはユーザーに動画を送信します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | はい | あなたのTelegram Bot APIトークン |
|
||||
| `chatId` | string | はい | 対象のTelegramチャットID |
|
||||
| `video` | string | はい | 送信する動画。file_idまたはHTTP URLを指定 |
|
||||
| `caption` | string | いいえ | 動画のキャプション(任意) |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | オプションのメディアを含むTelegramメッセージデータ |
|
||||
|
||||
### `telegram_send_audio`
|
||||
|
||||
Telegram Bot APIを通じてTelegramチャンネルまたはユーザーに音声ファイルを送信します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | はい | あなたのTelegram Bot APIトークン |
|
||||
| `chatId` | string | はい | 対象のTelegramチャットID |
|
||||
| `audio` | string | はい | 送信する音声ファイル。file_idまたはHTTP URLを渡してください |
|
||||
| `caption` | string | いいえ | 音声のキャプション(オプション) |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | 音声/オーディオ情報を含むTelegramメッセージデータ |
|
||||
|
||||
### `telegram_send_animation`
|
||||
|
||||
Telegram Bot APIを通じてTelegramチャンネルまたはユーザーにアニメーション(GIF)を送信します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | はい | あなたのTelegram Bot APIトークン |
|
||||
| `chatId` | string | はい | 対象のTelegramチャットID |
|
||||
| `animation` | string | はい | 送信するアニメーション。file_idまたはHTTP URLを渡してください |
|
||||
| `caption` | string | いいえ | アニメーションのキャプション(オプション) |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | オプションのメディアを含むTelegramメッセージデータ |
|
||||
|
||||
## 注意事項
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: YouTube
|
||||
description: YouTubeで動画を検索
|
||||
description: YouTubeの動画、チャンネル、プレイリストとやり取りする
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -39,7 +39,7 @@ Simでは、YouTube統合によりエージェントがワークフローの一
|
||||
|
||||
## 使用方法
|
||||
|
||||
YouTubeをワークフローに統合します。動画を検索できます。APIキーが必要です。
|
||||
YouTubeをワークフローに統合します。動画の検索、動画の詳細取得、チャンネル情報の取得、プレイリスト項目の取得、動画コメントの取得が可能です。
|
||||
|
||||
## ツール
|
||||
|
||||
@@ -61,7 +61,100 @@ YouTube Data APIを使用してYouTubeで動画を検索します。
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | 検索クエリに一致するYouTube動画の配列 |
|
||||
|
||||
### `youtube_video_details`
|
||||
|
||||
特定のYouTube動画に関する詳細情報を取得します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `videoId` | string | はい | YouTube動画ID |
|
||||
| `apiKey` | string | はい | YouTube APIキー |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `videoId` | string | YouTube動画ID |
|
||||
| `title` | string | 動画タイトル |
|
||||
| `description` | string | 動画の説明 |
|
||||
| `channelId` | string | チャンネルID |
|
||||
| `channelTitle` | string | チャンネル名 |
|
||||
| `publishedAt` | string | 公開日時 |
|
||||
| `duration` | string | ISO 8601形式の動画の長さ |
|
||||
| `viewCount` | number | 視聴回数 |
|
||||
| `likeCount` | number | 高評価数 |
|
||||
| `commentCount` | number | コメント数 |
|
||||
| `thumbnail` | string | 動画サムネイルURL |
|
||||
| `tags` | array | 動画タグ |
|
||||
|
||||
### `youtube_channel_info`
|
||||
|
||||
YouTubeチャンネルに関する詳細情報を取得します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `channelId` | string | いいえ | YouTubeチャンネルID(channelIdまたはusernameのいずれかを使用) |
|
||||
| `username` | string | いいえ | YouTubeチャンネルのユーザー名(channelIdまたはusernameのいずれかを使用) |
|
||||
| `apiKey` | string | はい | YouTube APIキー |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `channelId` | string | YouTubeチャンネルID |
|
||||
| `title` | string | チャンネル名 |
|
||||
| `description` | string | チャンネルの説明 |
|
||||
| `subscriberCount` | number | 登録者数 |
|
||||
| `videoCount` | number | 動画数 |
|
||||
| `viewCount` | number | チャンネル総再生回数 |
|
||||
| `publishedAt` | string | チャンネル作成日 |
|
||||
| `thumbnail` | string | チャンネルサムネイルURL |
|
||||
| `customUrl` | string | チャンネルカスタムURL |
|
||||
|
||||
### `youtube_playlist_items`
|
||||
|
||||
YouTubeプレイリストから動画を取得します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `playlistId` | string | はい | YouTubeプレイリストID |
|
||||
| `maxResults` | number | いいえ | 返す動画の最大数 |
|
||||
| `pageToken` | string | いいえ | ページネーション用のページトークン |
|
||||
| `apiKey` | string | はい | YouTube APIキー |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | プレイリスト内の動画の配列 |
|
||||
|
||||
### `youtube_comments`
|
||||
|
||||
YouTube動画からコメントを取得します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `videoId` | string | はい | YouTube動画ID |
|
||||
| `maxResults` | number | いいえ | 返すコメントの最大数 |
|
||||
| `order` | string | いいえ | コメントの並び順:time(時間順)またはrelevance(関連性順) |
|
||||
| `pageToken` | string | いいえ | ページネーション用のページトークン |
|
||||
| `apiKey` | string | はい | YouTube APIキー |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | array | 動画からのコメントの配列 |
|
||||
|
||||
## 注意事項
|
||||
|
||||
- カテゴリ: `tools`
|
||||
- カテゴリー: `tools`
|
||||
- タイプ: `youtube`
|
||||
|
||||
@@ -128,3 +128,60 @@ data: {"blockId":"agent1-uuid","chunk":" complete"}
|
||||
<Callout type="warning">
|
||||
ワークフローには1つのAPIトリガーのみ含めることができます。変更後は新しいデプロイメントを公開して、エンドポイントを最新の状態に保ってください。
|
||||
</Callout>
|
||||
|
||||
### ファイルアップロードフォーマット
|
||||
|
||||
APIは2つのフォーマットでファイルを受け付けます:
|
||||
|
||||
**1. Base64エンコードされたファイル**(SDKでの使用推奨):
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "file",
|
||||
"data": "data:application/pdf;base64,JVBERi0xLjQK...",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- 最大ファイルサイズ:ファイルあたり20MB
|
||||
- ファイルはクラウドストレージにアップロードされ、すべてのプロパティを持つUserFileオブジェクトに変換されます
|
||||
|
||||
**2. 直接URLリファレンス**:
|
||||
|
||||
```json
|
||||
{
|
||||
"documents": [{
|
||||
"type": "url",
|
||||
"data": "https://example.com/document.pdf",
|
||||
"name": "document.pdf",
|
||||
"mime": "application/pdf"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
- ファイルはアップロードされず、URLが直接渡されます
|
||||
- 既存のファイルを参照する場合に便利です
|
||||
|
||||
### ファイルプロパティ
|
||||
|
||||
ファイルについては、すべてのプロパティにアクセスできます:
|
||||
|
||||
| プロパティ | 説明 | 型 |
|
||||
|----------|-------------|------|
|
||||
| `<api.fieldName[0].url>` | 署名付きダウンロードURL | string |
|
||||
| `<api.fieldName[0].name>` | 元のファイル名 | string |
|
||||
| `<api.fieldName[0].size>` | ファイルサイズ(バイト) | number |
|
||||
| `<api.fieldName[0].type>` | MIMEタイプ | string |
|
||||
| `<api.fieldName[0].uploadedAt>` | アップロードタイムスタンプ(ISO 8601) | string |
|
||||
| `<api.fieldName[0].expiresAt>` | URL有効期限タイムスタンプ(ISO 8601) | string |
|
||||
|
||||
URL参照ファイルの場合、ファイルは当社のストレージにアップロードされないため、`uploadedAt`と`expiresAt`を除く同じプロパティが利用可能です。
|
||||
|
||||
入力フォーマットが定義されていない場合、エグゼキューターは`<api.input>`でのみ生のJSONを公開します。
|
||||
|
||||
<Callout type="warning">
|
||||
ワークフローには1つのAPIトリガーしか含めることができません。変更後は新しいデプロイメントを公開して、エンドポイントを最新の状態に保ってください。
|
||||
</Callout>
|
||||
|
||||
@@ -41,3 +41,11 @@ import { Image } from '@/components/ui/image'
|
||||
<Callout type="info">
|
||||
ビルダーは同じワークフロー内の複数のチャットトリガーブロックをブロックします。
|
||||
</Callout>
|
||||
|
||||
1. ワークフローごとに1つのチャットトリガーブロックを追加します。
|
||||
2. チャットモードでワークフローをデプロイします。
|
||||
3. デプロイメントリンクを共有します—すべての返信は同じ会話IDを再利用するため、ワークフローはコンテキストを保持できます。
|
||||
|
||||
<Callout type="info">
|
||||
ビルダーは同じワークフロー内に複数のチャットトリガーブロックを配置することを防止します。
|
||||
</Callout>
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
---
|
||||
title: ブロック参照構文
|
||||
description: YAMLワークフローでブロック間のデータを参照する方法
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
||||
|
||||
ブロック参照はSimワークフローにおけるデータフローの基盤です。あるブロックの出力を別のブロックの入力として正しく参照する方法を理解することは、機能的なワークフローを構築するために不可欠です。
|
||||
|
||||
## 基本的な参照ルール
|
||||
|
||||
### 1. ブロックIDではなくブロック名を使用する
|
||||
|
||||
<Tabs items={['正しい例', '間違った例']}>
|
||||
<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. 名前を参照形式に変換する
|
||||
|
||||
ブロック参照を作成するには:
|
||||
|
||||
1. **ブロック名を取得する**:「Email Generator」
|
||||
2. **小文字に変換する**:「email generator」
|
||||
3. **スペースと特殊文字を削除する**:「emailgenerator」
|
||||
4. **プロパティを追加する**:`<emailgenerator.content>`
|
||||
|
||||
### 3. 正しいプロパティを使用する
|
||||
|
||||
ブロックタイプによって異なるプロパティが公開されます:
|
||||
|
||||
- **エージェントブロック**:`.content` (AI応答)
|
||||
- **関数ブロック**:`.output` (戻り値)
|
||||
- **APIブロック**:`.output` (レスポンスデータ)
|
||||
- **ツールブロック**:`.output` (ツール結果)
|
||||
|
||||
## 参照例
|
||||
|
||||
### 一般的なブロック参照
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### 複数単語のブロック名
|
||||
|
||||
```yaml
|
||||
# Block name: "Data Processor 2"
|
||||
<dataprocessor2.output>
|
||||
|
||||
# Block name: "Email Validation Service"
|
||||
<emailvalidationservice.output>
|
||||
|
||||
# Block name: "Customer Info Agent"
|
||||
<customerinfoagent.content>
|
||||
```
|
||||
|
||||
## 特殊な参照ケース
|
||||
|
||||
### スタータブロック
|
||||
|
||||
<Callout type="warning">
|
||||
スタータブロックは、実際の名前に関係なく、常に `<start.input>` として参照されます。
|
||||
</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
|
||||
```
|
||||
|
||||
### ループ変数
|
||||
|
||||
ループブロック内では、特別な変数が利用できます:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
### 並列処理変数
|
||||
|
||||
並列ブロック内では、特別な変数が利用できます:
|
||||
|
||||
```yaml
|
||||
# Available in parallel child blocks
|
||||
<parallel.index> # Instance number (0-based)
|
||||
<parallel.currentItem> # Item for this instance
|
||||
<parallel.items> # Full collection
|
||||
```
|
||||
|
||||
## 複雑な参照例
|
||||
|
||||
### ネストされたデータアクセス
|
||||
|
||||
複雑なオブジェクトを参照する場合は、ドット表記を使用します:
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### テキスト内の複数参照
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
### コードブロック内の参照
|
||||
|
||||
関数ブロック内で参照を使用すると、JavaScript値として置き換えられます:
|
||||
|
||||
```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
|
||||
};
|
||||
```
|
||||
|
||||
## 参照の検証
|
||||
|
||||
SimはYAMLをインポートする際にすべての参照を検証します:
|
||||
|
||||
### 有効な参照
|
||||
- ブロックがワークフロー内に存在する
|
||||
- プロパティがブロックタイプに適している
|
||||
- 循環依存関係がない
|
||||
- 適切な構文フォーマット
|
||||
|
||||
### 一般的なエラー
|
||||
- **ブロックが見つからない**:参照されたブロックが存在しない
|
||||
- **プロパティの誤り**:関数ブロックで `.content` を使用
|
||||
- **タイプミス**:ブロック名やプロパティのスペルミス
|
||||
- **循環参照**:ブロックが直接または間接的に自身を参照している
|
||||
|
||||
## ベストプラクティス
|
||||
|
||||
1. **説明的なブロック名を使用する**:参照をより読みやすくする
|
||||
2. **一貫性を保つ**:同じ命名規則をすべてに適用する
|
||||
3. **参照をチェックする**:参照されるすべてのブロックが存在することを確認する
|
||||
4. **深いネストを避ける**:参照チェーンを管理しやすく保つ
|
||||
5. **複雑なフローを文書化する**:参照関係を説明するコメントを追加する
|
||||
@@ -1,218 +0,0 @@
|
||||
---
|
||||
title: エージェントブロックYAMLスキーマ
|
||||
description: エージェントブロックのYAML設定リファレンス
|
||||
---
|
||||
|
||||
## スキーマ定義
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## ツール設定
|
||||
|
||||
ツールは以下の構造を持つ配列として定義されます:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## 接続設定
|
||||
|
||||
接続は実行結果に基づいてワークフローの進行先を定義します:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## 例
|
||||
|
||||
### 基本的なエージェント
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### ツールを持つエージェント
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### 構造化された出力
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,429 +0,0 @@
|
||||
---
|
||||
title: API ブロック YAML スキーマ
|
||||
description: API ブロックの YAML 設定リファレンス
|
||||
---
|
||||
|
||||
## スキーマ定義
|
||||
|
||||
```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
|
||||
params:
|
||||
type: array
|
||||
description: Query parameters as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the parameter entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
properties:
|
||||
Key:
|
||||
type: string
|
||||
description: Parameter name
|
||||
Value:
|
||||
type: string
|
||||
description: Parameter value
|
||||
headers:
|
||||
type: array
|
||||
description: HTTP headers as table entries
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- cells
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the header entry
|
||||
cells:
|
||||
type: object
|
||||
required:
|
||||
- Key
|
||||
- Value
|
||||
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
|
||||
```
|
||||
|
||||
## 接続設定
|
||||
|
||||
接続はリクエスト結果に基づいてワークフローの進行先を定義します:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful requests
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## 例
|
||||
|
||||
### シンプルな GET リクエスト
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
headers:
|
||||
- id: header-1-uuid-here
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
- id: header-2-uuid-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
connections:
|
||||
success: process-user-data
|
||||
error: handle-api-error
|
||||
```
|
||||
|
||||
### ボディを含む POST リクエスト
|
||||
|
||||
```yaml
|
||||
create-ticket:
|
||||
type: api
|
||||
name: "Create Support Ticket"
|
||||
inputs:
|
||||
url: "https://api.support.com/tickets"
|
||||
method: POST
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{SUPPORT_API_KEY}}"
|
||||
- id: content-type-uuid
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
body: |
|
||||
{
|
||||
"title": "<agent.title>",
|
||||
"description": "<agent.description>",
|
||||
"priority": "high"
|
||||
}
|
||||
connections:
|
||||
success: ticket-created
|
||||
error: ticket-error
|
||||
```
|
||||
|
||||
### 動的 URL とクエリパラメータ
|
||||
|
||||
```yaml
|
||||
search-api:
|
||||
type: api
|
||||
name: "Search Products"
|
||||
inputs:
|
||||
url: "https://api.store.com/products"
|
||||
method: GET
|
||||
params:
|
||||
- id: search-param-uuid
|
||||
cells:
|
||||
Key: "q"
|
||||
Value: <start.searchTerm>
|
||||
- id: limit-param-uuid
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
- id: category-param-uuid
|
||||
cells:
|
||||
Key: "category"
|
||||
Value: <filter.category>
|
||||
headers:
|
||||
- id: auth-header-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{STORE_API_KEY}}"
|
||||
connections:
|
||||
success: display-results
|
||||
```
|
||||
|
||||
## パラメータ形式
|
||||
|
||||
ヘッダーとパラメータ(クエリパラメータ)は以下の構造のテーブル形式を使用します:
|
||||
|
||||
```yaml
|
||||
headers:
|
||||
- id: unique-identifier-here
|
||||
cells:
|
||||
Key: "Content-Type"
|
||||
Value: "application/json"
|
||||
- id: another-unique-identifier
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer {{API_TOKEN}}"
|
||||
|
||||
params:
|
||||
- id: param-identifier-here
|
||||
cells:
|
||||
Key: "limit"
|
||||
Value: "10"
|
||||
```
|
||||
|
||||
**構造の詳細:**
|
||||
- `id`: テーブル行を追跡するための一意の識別子
|
||||
- `cells.Key`: パラメータ/ヘッダー名
|
||||
- `cells.Value`: パラメータ/ヘッダーの値
|
||||
- この形式により、適切なテーブル管理とUI状態の保持が可能になります
|
||||
|
||||
## 出力参照
|
||||
|
||||
API ブロックが実行された後、後続のブロックでその出力を参照できます。API ブロックは主に3つの出力を提供します:
|
||||
|
||||
### 利用可能な出力
|
||||
|
||||
| 出力 | 型 | 説明 |
|
||||
|--------|------|-------------|
|
||||
| `data` | any | API からのレスポンスボディ/ペイロード |
|
||||
| `status` | number | HTTP ステータスコード(200、404、500など) |
|
||||
| `headers` | object | サーバーから返されたレスポンスヘッダー |
|
||||
|
||||
### 使用例
|
||||
|
||||
```yaml
|
||||
# Reference API response data
|
||||
process-data:
|
||||
type: function
|
||||
name: "Process API Data"
|
||||
inputs:
|
||||
code: |
|
||||
const responseData = <fetchuserdata.data>;
|
||||
const statusCode = <fetchuserdata.status>;
|
||||
const responseHeaders = <fetchuserdata.headers>;
|
||||
|
||||
if (statusCode === 200) {
|
||||
return {
|
||||
success: true,
|
||||
user: responseData,
|
||||
contentType: responseHeaders['content-type']
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
error: `API call failed with status ${statusCode}`
|
||||
};
|
||||
}
|
||||
|
||||
# Use API data in an agent block
|
||||
analyze-response:
|
||||
type: agent
|
||||
name: "Analyze Response"
|
||||
inputs:
|
||||
userPrompt: |
|
||||
Analyze this API response:
|
||||
|
||||
Status: <fetchuserdata.status>
|
||||
Data: <fetchuserdata.data>
|
||||
|
||||
Provide insights about the response.
|
||||
|
||||
# Conditional logic based on status
|
||||
check-status:
|
||||
type: condition
|
||||
name: "Check API Status"
|
||||
inputs:
|
||||
condition: <fetchuserdata.status> === 200
|
||||
connections:
|
||||
true: success-handler
|
||||
false: error-handler
|
||||
```
|
||||
|
||||
### 実用的な例
|
||||
|
||||
```yaml
|
||||
user-api:
|
||||
type: api
|
||||
name: "Fetch User Data"
|
||||
inputs:
|
||||
url: "https://api.example.com/users/123"
|
||||
method: GET
|
||||
connections:
|
||||
success: process-response
|
||||
|
||||
process-response:
|
||||
type: function
|
||||
name: "Process Response"
|
||||
inputs:
|
||||
code: |
|
||||
const user = <fetchuserdata.data>;
|
||||
const status = <fetchuserdata.status>;
|
||||
|
||||
console.log(`API returned status: ${status}`);
|
||||
console.log(`User data:`, user);
|
||||
|
||||
return {
|
||||
userId: user.id,
|
||||
email: user.email,
|
||||
isActive: status === 200
|
||||
};
|
||||
```
|
||||
|
||||
### エラー処理
|
||||
|
||||
```yaml
|
||||
api-with-error-handling:
|
||||
type: api
|
||||
name: "API Call"
|
||||
inputs:
|
||||
url: "https://api.example.com/data"
|
||||
method: GET
|
||||
connections:
|
||||
success: check-response
|
||||
error: handle-error
|
||||
|
||||
check-response:
|
||||
type: condition
|
||||
name: "Check Response Status"
|
||||
inputs:
|
||||
condition: <apicall.status> >= 200 && <apicall.status> < 300
|
||||
connections:
|
||||
true: process-success
|
||||
false: handle-api-error
|
||||
|
||||
process-success:
|
||||
type: function
|
||||
name: "Process Success"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: true,
|
||||
data: <apicall.data>,
|
||||
message: "API call successful"
|
||||
};
|
||||
|
||||
handle-api-error:
|
||||
type: function
|
||||
name: "Handle API Error"
|
||||
inputs:
|
||||
code: |
|
||||
return {
|
||||
success: false,
|
||||
status: <apicall.status>,
|
||||
error: "API call failed",
|
||||
data: <apicall.data>
|
||||
};
|
||||
```
|
||||
|
||||
## YAMLの文字列エスケープ
|
||||
|
||||
YAMLを記述する際、適切に解析されるために引用符で囲む必要がある文字列があります:
|
||||
|
||||
### 引用符で囲む必要がある文字列
|
||||
|
||||
```yaml
|
||||
# URLs with hyphens, colons, special characters
|
||||
url: "https://api.example.com/users/123"
|
||||
url: "https://my-api.example.com/data"
|
||||
|
||||
# Header values with hyphens or special characters
|
||||
headers:
|
||||
- id: header-uuid
|
||||
cells:
|
||||
Key: "User-Agent"
|
||||
Value: "My-Application/1.0"
|
||||
- id: auth-uuid
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer my-token-123"
|
||||
|
||||
# Parameter values with hyphens
|
||||
params:
|
||||
- id: param-uuid
|
||||
cells:
|
||||
Key: "sort-by"
|
||||
Value: "created-at"
|
||||
```
|
||||
|
||||
### 引用符を使用するタイミング
|
||||
|
||||
- ✅ **常に引用符で囲む**: URL、トークン、ハイフン、コロン、特殊文字を含む値
|
||||
- ✅ **常に引用符で囲む**: 文字列として扱うべき数字で始まる値
|
||||
- ✅ **常に引用符で囲む**: 文字列として維持すべきブール値のように見える文字列
|
||||
- ❌ **引用符で囲まない**: 特殊文字を含まない単純な英数字の文字列
|
||||
|
||||
### 例
|
||||
|
||||
```yaml
|
||||
# ✅ Correct
|
||||
url: "https://api.stripe.com/v1/charges"
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: "Authorization"
|
||||
Value: "Bearer sk-test-123456789"
|
||||
|
||||
# ❌ Incorrect (may cause parsing errors)
|
||||
url: https://api.stripe.com/v1/charges
|
||||
headers:
|
||||
- id: auth-header
|
||||
cells:
|
||||
Key: Authorization
|
||||
Value: Bearer sk-test-123456789
|
||||
```
|
||||
|
||||
## ベストプラクティス
|
||||
|
||||
- APIキーには環境変数を使用する: `{{API_KEY_NAME}}`
|
||||
- エラー接続でエラー処理を含める
|
||||
- ユースケースに適したタイムアウトを設定する
|
||||
- 後続のブロックでレスポンスステータスコードを検証する
|
||||
- 参照しやすいように意味のあるブロック名を使用する
|
||||
- **特殊文字、URL、トークンを含む文字列は常に引用符で囲む**
|
||||
@@ -1,165 +0,0 @@
|
||||
---
|
||||
title: 条件ブロックYAMLスキーマ
|
||||
description: 条件ブロックのYAML設定リファレンス
|
||||
---
|
||||
|
||||
## スキーマ定義
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## 接続設定
|
||||
|
||||
他のブロックとは異なり、条件ブロックは条件の結果に基づいて分岐する接続を使用します:
|
||||
|
||||
```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)
|
||||
```
|
||||
|
||||
## 例
|
||||
|
||||
### 単純な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
|
||||
```
|
||||
|
||||
### 複数の条件
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### 数値比較
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### 複雑なロジック
|
||||
|
||||
```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
|
||||
```
|
||||
@@ -1,255 +0,0 @@
|
||||
---
|
||||
title: 評価ブロックYAMLスキーマ
|
||||
description: 評価ブロックのYAML設定リファレンス
|
||||
---
|
||||
|
||||
## スキーマ定義
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## 接続設定
|
||||
|
||||
接続は評価結果に基づいてワークフローの進行先を定義します:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful evaluation
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## 例
|
||||
|
||||
### コンテンツ品質評価
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### カスタマーレスポンス評価
|
||||
|
||||
```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テスト評価
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### 多次元コンテンツスコアリング
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## 出力リファレンス
|
||||
|
||||
評価ブロックが実行された後、その出力を参照できます:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## ベストプラクティス
|
||||
|
||||
- 明確で具体的な評価基準を定義する
|
||||
- ユースケースに適したスコアリング範囲を使用する
|
||||
- 強力な推論能力を持つモデルを選択する
|
||||
- 一貫したスコアリングのために低い温度設定を使用する
|
||||
- 詳細な評価指標の説明を含める
|
||||
- 多様なコンテンツタイプでテストする
|
||||
- 複雑な評価には複数の評価者を検討する
|
||||
@@ -1,162 +0,0 @@
|
||||
---
|
||||
title: ファンクションブロックYAMLスキーマ
|
||||
description: ファンクションブロックのYAML設定リファレンス
|
||||
---
|
||||
|
||||
## スキーマ定義
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## 接続設定
|
||||
|
||||
接続は実行結果に基づいてワークフローの進行先を定義します:
|
||||
|
||||
```yaml
|
||||
connections:
|
||||
success: <string> # Target block ID for successful execution
|
||||
error: <string> # Target block ID for error handling (optional)
|
||||
```
|
||||
|
||||
## 例
|
||||
|
||||
### 単純な検証
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### データ処理
|
||||
|
||||
```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連携
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### 計算処理
|
||||
|
||||
```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
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user