Compare commits

...

44 Commits

Author SHA1 Message Date
Waleed
b304233062 v0.5.43: export logs, circleback, grain, vertex, code hygiene, schedule improvements 2025-12-23 19:19:18 -08:00
Waleed
3a50ce4d99 feat(i18n): update translations (#2568)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 19:03:43 -08:00
Waleed
810d2089cf feat(schedules): remove save button for schedules, couple schedule deployment with workflow deployment (#2566)
* feat(schedules): remove save button for schedules, couple schedule deployment with workflow deployment

* added tests

* ack PR comments

* update turborepo

* cleanup, edge cases

* ack PR comment
2025-12-23 18:53:40 -08:00
Vikhyath Mondreti
8c89507247 improvement(logs): state machine of workflow execution (#2560)
* improvement(logs): state machine of workflow execution

* cleanup more code

* fallback consistency

* fix labels

* backfill in migration correctly

* make streaming stop in chat window correctly
2025-12-23 18:27:19 -08:00
Vikhyath Mondreti
169dd4a503 fix(grafana): tool outputs (#2565)
* fix(grafana): list annotations outputs

* fix more grafana tools
2025-12-23 17:23:12 -08:00
Vikhyath Mondreti
dc4e5d3bdc fix(dropbox): access type param pass through to get refresh token (#2564) 2025-12-23 16:32:58 -08:00
Emir Karabeg
31de55cbdf feat(ux): add expandFolder to auto expand folders on nested folder creation (#2562)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-23 16:27:00 -08:00
Waleed
eaca49037d fix(ui): remove css transition on popover and dropdown items to avoid flicker (#2563) 2025-12-23 15:46:27 -08:00
Waleed
2d26c0cb32 feat(i18n): update translations (#2561)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 15:42:54 -08:00
Waleed
cdf3d759b9 fix(jina): removed conditionally included outputs from jina (#2559)
* fix(jina): removed conditionally included outputs from jina

* ack PR comments
2025-12-23 15:20:10 -08:00
Vikhyath Mondreti
bf8fbebe22 improvement(code-quality): centralize regex checks, normalization (#2554)
* improvement(code-quality): centralize regex checks, normalization

* simplify resolution

* fix(copilot): don't allow duplicate name blocks

* centralize uuid check
2025-12-23 15:12:04 -08:00
Waleed
b23299dae4 feat(i18n): update translations (#2558)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 14:54:44 -08:00
Waleed
6c8f1a81c1 feat(tools): added grain and circleback (#2557)
* feat(tools): added grain and circleback

* oauth to pat and tool fix

* updated docs

* remove remaining oauth references

* cleanup

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-23 14:34:12 -08:00
Waleed
2c36926a4e fix(perplexity): remove deprecated perplexity sonar reasoning model (#2556) 2025-12-23 13:24:18 -08:00
Waleed
89c1085950 improvement(vertex): added vertex to all LLM-based blocks, fixed refresh (#2555)
* improvement(vertex): added vertex to all LLM-based blocks, fixed refresh

* fix build
2025-12-23 13:11:56 -08:00
Waleed
4e09c389e8 improvement(usage): update usage limit in realtime, standardize token output object across providers (#2553)
* improvement(usage-limit): update usage in real time, fix token output object

* updated tokenBreakdown to tokens, standardized input/output/total token object type across providers

* update remaining references

* ack PR comment

* remove singleton query client instance from hooks, leave only in zustand
2025-12-23 13:04:47 -08:00
Vikhyath Mondreti
641ac58017 fix(frozen-canvas): need to fetch the deployment version correctly (#2552) 2025-12-23 11:37:07 -08:00
Waleed
6c1e4ff7d6 improvement(oauth): remove unused scope hints (#2551)
* improvement(oauth): remove unused scope hints

* improvement(oauth): remove scopeHints and extraneous oauth provider data

* cleanup
2025-12-23 11:26:49 -08:00
Waleed
40e30a11e9 improvement(logs): update logs export route to respect filters (#2550) 2025-12-23 10:23:27 -08:00
Vikhyath Mondreti
57e4b49bd6 v0.5.42: fix memory migration 2025-12-23 01:24:54 -08:00
Vikhyath Mondreti
d1ebad912e fix memory migration (#2548) 2025-12-23 01:19:29 -08:00
Vikhyath Mondreti
e12dd204ed v0.5.41: memory fixes, copilot improvements, knowledgebase improvements, LLM providers standardization 2025-12-23 00:15:18 -08:00
Vikhyath Mondreti
621f9a40c7 improvement(landing): free usage limit (#2547) 2025-12-23 00:07:13 -08:00
Siddharth Ganesan
3100daa346 feat(copilot): add tools to access block outputs and upstream references (#2546)
* Add copilot references tools

* Minor fixes

* Omit vars field in block outputs when id is provided
2025-12-23 00:06:24 -08:00
Priyanshu Solanki
c252e885af improvement(logs): fixed logs for parallel and loop execution flow (#2468)
* fixed logs for parallel and loop execution flow

* Fix array check for collection

* fixed for empty loop and paralle blocks and showing input on dashboard

* extracted utility functions

* fixed the refrencing errors and making sure it propogates to the console

* fix parallel

* fix tests'

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-23 00:02:02 -08:00
Waleed
b0748c82f9 fix(search): removed full text param from built-in search, anthropic provider streaming fix (#2542)
* fix(search): removed full text param from built-in search, anthropic provider streaming fix

* rewrite gemini provider with official sdk + add thinking capability

* vertex gemini consolidation

* never silently use different model

* pass oauth client through the googleAuthOptions param directly

* make server side provider registry

* remove comments

* take oauth selector below model selector

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-22 23:57:11 -08:00
Waleed
f5245f3eca fix(billing): add line items for wand (#2543)
* fix(billing): add line items for wand

* ack pr comment
2025-12-22 23:06:14 -08:00
Waleed
f2ef5f0811 feat(i18n): update translations (#2541)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-22 21:17:01 -08:00
Waleed
37443a7b77 improvement(kb): improve chunkers, respect user-specified chunk configurations, added tests (#2539)
* improvement(kb): improve chunkers, respect user-specified chunk configurations, added tests

* ack PR commnets

* updated docs

* cleanup
2025-12-22 20:47:29 -08:00
lif
e0d96e2126 fix(oauth): add User-Agent header to Reddit token refresh (#2517)
Reddit API requires User-Agent header for all requests including OAuth
token refresh. Without it, requests fail with 403 error after the
initial token expires.

Fixes #1822
2025-12-22 20:09:38 -08:00
Waleed
827dd0466f feat(i18n): update translations (#2538)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-22 20:09:03 -08:00
Vikhyath Mondreti
ccd92b9054 improvement(block-metadata): remove references to yaml syntax in best practices (#2537) 2025-12-22 20:07:29 -08:00
Vikhyath Mondreti
6af291ca9f improvement(pricing): increase free user limit to 20 usd (#2536)
* improvement(pricing): increase free user limit to 20 usd

* make gemini pricing accurate

* generate migration for db constant

* update docs

* test notif data
2025-12-22 19:51:22 -08:00
Vikhyath Mondreti
be9ab4c833 fix(dashboard): flash based on loading check (#2535) 2025-12-22 18:49:41 -08:00
Emir Karabeg
ab3a3d12fe improvement(logs): dashboard/logs optimizations and improvements (#2414)
* improvement(logs): dashboard/logs optimizations and improvements

* improvement: addressed comments

* improvement: loading

* cleanup

* ack PR comments

* cleanup more

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-22 16:44:10 -08:00
Waleed
e01d4cb990 feat(i18n): update translations (#2530)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-22 16:11:59 -08:00
Vikhyath Mondreti
8c2c49eb14 fix(models): memory fixes, provider code typing, cost calculation cleanup (#2515)
* improvement(memory): should not be block scoped

* cleanup provider code

* update other providers

* cleanup fallback code

* remove flaky test

* fix memory

* move streaming fix to right level

* cleanup streaming server

* make memories workspace scoped

* update docs

* fix dedup logic

* fix streaming parsing issue for multiple onStream calls for same block

* fix(provieders): support parallel agent tool calls, consolidate utils

* address greptile comments

* remove all comments

* fixed openrouter response format handling, groq & cerebras response formats

* removed duplicate type

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-22 15:59:53 -08:00
Waleed
086982c7a3 improvement(docs): update og image (#2529) 2025-12-22 13:16:39 -08:00
Waleed
2b7807a7de feat(i18n): update translations (#2526)
* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-22 11:20:42 -08:00
Waleed
2d4a660246 feat(intercom): added additional params to intercom tools (#2523) 2025-12-22 10:24:49 -08:00
Siddharth Ganesan
e981b1dc1b improvement(copilot): improve copilot metadata processing and tool output memory (#2516) 2025-12-21 23:24:55 -08:00
Vikhyath Mondreti
3d9d9cbc54 v0.5.40: supabase ops to allow non-public schemas, jira uuid 2025-12-21 22:28:05 -08:00
Adam Gough
58fcb4ed80 fix(jira): added uuid (#2513)
* added uuid param

* revmoed comment

* fixed naming
2025-12-21 22:04:05 -08:00
Vikhyath Mondreti
e4d211c2f0 improvement(supabase): allow non-public schemas (#2511) 2025-12-21 21:20:36 -08:00
435 changed files with 46680 additions and 13713 deletions

View File

@@ -258,8 +258,7 @@ export async function generateMetadata(props: {
const baseUrl = 'https://docs.sim.ai'
const fullUrl = `${baseUrl}${page.url}`
const description = data.description || ''
const ogImageUrl = `${baseUrl}/api/og?title=${encodeURIComponent(data.title)}&category=DOCUMENTATION${description ? `&description=${encodeURIComponent(description)}` : ''}`
const ogImageUrl = `${baseUrl}/api/og?title=${encodeURIComponent(data.title)}`
return {
title: data.title,

View File

@@ -39,12 +39,10 @@ async function loadGoogleFont(font: string, weights: string, text: string): Prom
export async function GET(request: NextRequest) {
const { searchParams } = new URL(request.url)
const title = searchParams.get('title') || 'Documentation'
const category = searchParams.get('category') || 'DOCUMENTATION'
const description = searchParams.get('description') || ''
const baseUrl = new URL(request.url).origin
const allText = `${title}${category}${description}docs.sim.ai`
const allText = `${title}docs.sim.ai`
const fontData = await loadGoogleFont('Geist', '400;500;600', allText)
return new ImageResponse(
@@ -59,7 +57,7 @@ export async function GET(request: NextRequest) {
fontFamily: 'Geist',
}}
>
{/* Base gradient layer - very subtle purple tint across the entire image */}
{/* Base gradient layer - subtle purple tint across the entire image */}
<div
style={{
position: 'absolute',
@@ -114,56 +112,25 @@ export async function GET(request: NextRequest) {
{/* Logo */}
<img src={`${baseUrl}/static/logo.png`} alt='sim' height={32} />
{/* Category + Title + Description */}
<div
{/* Title */}
<span
style={{
display: 'flex',
flexDirection: 'column',
gap: 12,
fontSize: getTitleFontSize(title),
fontWeight: 600,
color: '#ffffff',
lineHeight: 1.1,
letterSpacing: '-0.02em',
}}
>
<span
style={{
fontSize: 15,
fontWeight: 600,
color: '#802fff',
letterSpacing: '0.02em',
}}
>
{category}
</span>
<span
style={{
fontSize: getTitleFontSize(title),
fontWeight: 600,
color: '#ffffff',
lineHeight: 1.1,
letterSpacing: '-0.02em',
}}
>
{title}
</span>
{description && (
<span
style={{
fontSize: 18,
fontWeight: 400,
color: '#a1a1aa',
lineHeight: 1.4,
marginTop: 4,
}}
>
{description.length > 100 ? `${description.slice(0, 100)}...` : description}
</span>
)}
</div>
{title}
</span>
{/* Footer */}
<span
style={{
fontSize: 15,
fontSize: 20,
fontWeight: 500,
color: '#52525b',
color: '#71717a',
}}
>
docs.sim.ai

View File

@@ -58,7 +58,7 @@ export const metadata = {
'Comprehensive documentation for Sim - the visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines.',
images: [
{
url: 'https://docs.sim.ai/api/og?title=Sim%20Documentation&category=DOCUMENTATION',
url: 'https://docs.sim.ai/api/og?title=Sim%20Documentation',
width: 1200,
height: 630,
alt: 'Sim Documentation',
@@ -72,7 +72,7 @@ export const metadata = {
'Comprehensive documentation for Sim - the visual workflow builder for AI applications.',
creator: '@simdotai',
site: '@simdotai',
images: ['https://docs.sim.ai/api/og?title=Sim%20Documentation&category=DOCUMENTATION'],
images: ['https://docs.sim.ai/api/og?title=Sim%20Documentation'],
},
robots: {
index: true,

File diff suppressed because one or more lines are too long

View File

@@ -13,6 +13,7 @@ import {
BrainIcon,
BrowserUseIcon,
CalendlyIcon,
CirclebackIcon,
ClayIcon,
ConfluenceIcon,
CursorIcon,
@@ -40,6 +41,7 @@ import {
GoogleSlidesIcon,
GoogleVaultIcon,
GrafanaIcon,
GrainIcon,
HubspotIcon,
HuggingFaceIcon,
HunterIOIcon,
@@ -128,6 +130,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
asana: AsanaIcon,
browser_use: BrowserUseIcon,
calendly: CalendlyIcon,
circleback: CirclebackIcon,
clay: ClayIcon,
confluence: ConfluenceIcon,
cursor: CursorIcon,
@@ -154,6 +157,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
google_slides: GoogleSlidesIcon,
google_vault: GoogleVaultIcon,
grafana: GrafanaIcon,
grain: GrainIcon,
hubspot: HubspotIcon,
huggingface: HuggingFaceIcon,
hunter: HunterIOIcon,

View File

@@ -49,40 +49,40 @@ Die Modellaufschlüsselung zeigt:
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
<Tab>
**Gehostete Modelle** - Sim stellt API-Schlüssel mit einem 2,5-fachen Preismultiplikator bereit:
**Gehostete Modelle** - Sim stellt API-Schlüssel mit einem 2-fachen Preismultiplikator bereit:
**OpenAI**
| Modell | Basispreis (Eingabe/Ausgabe) | Gehosteter Preis (Eingabe/Ausgabe) |
|-------|---------------------------|----------------------------|
| GPT-5.1 | $1,25 / $10,00 | $3,13 / $25,00 |
| GPT-5 | $1,25 / $10,00 | $3,13 / $25,00 |
| GPT-5 Mini | $0,25 / $2,00 | $0,63 / $5,00 |
| GPT-5 Nano | $0,05 / $0,40 | $0,13 / $1,00 |
| GPT-4o | $2,50 / $10,00 | $6,25 / $25,00 |
| GPT-4.1 | $2,00 / $8,00 | $5,00 / $20,00 |
| GPT-4.1 Mini | $0,40 / $1,60 | $1,00 / $4,00 |
| GPT-4.1 Nano | $0,10 / $0,40 | $0,25 / $1,00 |
| o1 | $15,00 / $60,00 | $37,50 / $150,00 |
| o3 | $2,00 / $8,00 | $5,00 / $20,00 |
| o4 Mini | $1,10 / $4,40 | $2,75 / $11,00 |
| GPT-5.1 | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| GPT-5 | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| GPT-5 Mini | 0,25 $ / 2,00 $ | 0,50 $ / 4,00 $ |
| GPT-5 Nano | 0,05 $ / 0,40 $ | 0,10 $ / 0,80 $ |
| GPT-4o | 2,50 $ / 10,00 $ | 5,00 $ / 20,00 $ |
| GPT-4.1 | 2,00 $ / 8,00 $ | 4,00 $ / 16,00 $ |
| GPT-4.1 Mini | 0,40 $ / 1,60 $ | 0,80 $ / 3,20 $ |
| GPT-4.1 Nano | 0,10 $ / 0,40 $ | 0,20 $ / 0,80 $ |
| o1 | 15,00 $ / 60,00 $ | 30,00 $ / 120,00 $ |
| o3 | 2,00 $ / 8,00 $ | 4,00 $ / 16,00 $ |
| o4 Mini | 1,10 $ / 4,40 $ | 2,20 $ / 8,80 $ |
**Anthropic**
| Modell | Basispreis (Eingabe/Ausgabe) | Gehosteter Preis (Eingabe/Ausgabe) |
|-------|---------------------------|----------------------------|
| Claude Opus 4.5 | $5,00 / $25,00 | $12,50 / $62,50 |
| Claude Opus 4.1 | $15,00 / $75,00 | $37,50 / $187,50 |
| Claude Sonnet 4.5 | $3,00 / $15,00 | $7,50 / $37,50 |
| Claude Sonnet 4.0 | $3,00 / $15,00 | $7,50 / $37,50 |
| Claude Haiku 4.5 | $1,00 / $5,00 | $2,50 / $12,50 |
| Claude Opus 4.5 | 5,00 $ / 25,00 $ | 10,00 $ / 50,00 $ |
| Claude Opus 4.1 | 15,00 $ / 75,00 $ | 30,00 $ / 150,00 $ |
| Claude Sonnet 4.5 | 3,00 $ / 15,00 $ | 6,00 $ / 30,00 $ |
| Claude Sonnet 4.0 | 3,00 $ / 15,00 $ | 6,00 $ / 30,00 $ |
| Claude Haiku 4.5 | 1,00 $ / 5,00 $ | 2,00 $ / 10,00 $ |
**Google**
| Modell | Basispreis (Eingabe/Ausgabe) | Gehosteter Preis (Eingabe/Ausgabe) |
|-------|---------------------------|----------------------------|
| Gemini 3 Pro Preview | $2,00 / $12,00 | $5,00 / $30,00 |
| Gemini 2.5 Pro | $0,15 / $0,60 | $0,38 / $1,50 |
| Gemini 2.5 Flash | $0,15 / $0,60 | $0,38 / $1,50 |
| Gemini 3 Pro Preview | 2,00 $ / 12,00 $ | 4,00 $ / 24,00 $ |
| Gemini 2.5 Pro | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| Gemini 2.5 Flash | 0,30 $ / 2,50 $ | 0,60 $ / 5,00 $ |
*Der 2,5-fache Multiplikator deckt Infrastruktur- und API-Verwaltungskosten ab.*
*Der 2x-Multiplikator deckt Infrastruktur- und API-Verwaltungskosten ab.*
</Tab>
<Tab>
@@ -185,11 +185,11 @@ curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" htt
Verschiedene Abonnementpläne haben unterschiedliche Nutzungslimits:
| Plan | Monatliches Nutzungslimit | Rate-Limits (pro Minute) |
| Plan | Monatliches Nutzungslimit | Ratenlimits (pro Minute) |
|------|-------------------|-------------------------|
| **Free** | $10 | 5 sync, 10 async |
| **Pro** | $100 | 10 sync, 50 async |
| **Team** | $500 (gepoolt) | 50 sync, 100 async |
| **Free** | 20 $ | 5 synchron, 10 asynchron |
| **Pro** | 100 $ | 10 synchron, 50 asynchron |
| **Team** | 500 $ (gepoolt) | 50 synchron, 100 asynchron |
| **Enterprise** | Individuell | Individuell |
## Abrechnungsmodell

View File

@@ -35,81 +35,87 @@ Sobald Ihre Dokumente verarbeitet sind, können Sie die einzelnen Chunks anzeige
<Image src="/static/knowledgebase/knowledgebase.png" alt="Dokumentchunk-Ansicht mit verarbeiteten Inhalten" width={800} height={500} />
### Chunk-Konfiguration
- **Standardgröße der Chunks**: 1.024 Zeichen
- **Konfigurierbarer Bereich**: 100-4.000 Zeichen pro Chunk
- **Intelligente Überlappung**: Standardmäßig 200 Zeichen zur Kontexterhaltung
- **Hierarchische Aufteilung**: Respektiert Dokumentstruktur (Abschnitte, Absätze, Sätze)
### Bearbeitungsfunktionen
Beim Erstellen einer Wissensdatenbank können Sie konfigurieren, wie Dokumente in Chunks aufgeteilt werden:
| Einstellung | Einheit | Standard | Bereich | Beschreibung |
|---------|------|---------|-------|-------------|
| **Maximale Chunk-Größe** | Tokens | 1.024 | 100-4.000 | Maximale Größe jedes Chunks (1 Token ≈ 4 Zeichen) |
| **Minimale Chunk-Größe** | Zeichen | 1 | 1-2.000 | Minimale Chunk-Größe, um winzige Fragmente zu vermeiden |
| **Überlappung** | Zeichen | 200 | 0-500 | Kontextüberlappung zwischen aufeinanderfolgenden Chunks |
- **Hierarchische Aufteilung**: Berücksichtigt die Dokumentstruktur (Abschnitte, Absätze, Sätze)
### Bearbeitungsmöglichkeiten
- **Chunk-Inhalt bearbeiten**: Textinhalt einzelner Chunks ändern
- **Chunk-Grenzen anpassen**: Chunks bei Bedarf zusammenführen oder teilen
- **Chunk-Grenzen anpassen**: Chunks nach Bedarf zusammenführen oder aufteilen
- **Metadaten hinzufügen**: Chunks mit zusätzlichem Kontext anreichern
- **Massenoperationen**: Effiziente Verwaltung mehrerer Chunks
- **Massenoperationen**: Mehrere Chunks effizient verwalten
## Erweiterte PDF-Verarbeitung
Für PDF-Dokumente bietet Sim erweiterte Verarbeitungsfunktionen:
### OCR-Unterstützung
Bei Konfiguration mit Azure oder [Mistral OCR](https://docs.mistral.ai/ocr/):
Wenn mit Azure oder [Mistral OCR](https://docs.mistral.ai/ocr/) konfiguriert:
- **Verarbeitung gescannter Dokumente**: Text aus bildbasierten PDFs extrahieren
- **Umgang mit gemischten Inhalten**: Verarbeitung von PDFs mit Text und Bildern
- **Verarbeitung gemischter Inhalte**: PDFs mit Text und Bildern verarbeiten
- **Hohe Genauigkeit**: Fortschrittliche KI-Modelle gewährleisten präzise Textextraktion
## Verwendung des Wissensblocks in Workflows
## Verwendung des Knowledge-Blocks in Workflows
Sobald Ihre Dokumente verarbeitet sind, können Sie sie in Ihren KI-Workflows über den Wissensblock nutzen. Dies ermöglicht Retrieval-Augmented Generation (RAG), wodurch Ihre KI-Agenten auf Ihre Dokumentinhalte zugreifen und darüber nachdenken können, um genauere, kontextbezogene Antworten zu liefern.
Sobald Ihre Dokumente verarbeitet sind, können Sie sie in Ihren KI-Workflows über den Knowledge-Block verwenden. Dies ermöglicht Retrieval-Augmented Generation (RAG), wodurch Ihre KI-Agenten auf Ihre Dokumentinhalte zugreifen und darüber nachdenken können, um genauere, kontextbezogene Antworten zu liefern.
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="Verwendung des Wissensblocks in Workflows" width={800} height={500} />
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="Verwendung des Knowledge-Blocks in Workflows" width={800} height={500} />
### Funktionen des Wissensblocks
- **Semantische Suche**: Relevante Inhalte mit natürlichsprachlichen Abfragen finden
- **Kontextintegration**: Automatisches Einbinden relevanter Chunks in Agenten-Prompts
- **Dynamischer Abruf**: Suche erfolgt in Echtzeit während der Workflow-Ausführung
- **Relevanzbewertung**: Ergebnisse nach semantischer Ähnlichkeit geordnet
### Knowledge-Block-Funktionen
- **Semantische Suche**: Relevante Inhalte mithilfe natürlichsprachlicher Abfragen finden
- **Kontextintegration**: Relevante Chunks automatisch in Agenten-Prompts einbinden
- **Dynamisches Abrufen**: Suche erfolgt in Echtzeit während der Workflow-Ausführung
- **Relevanz-Bewertung**: Ergebnisse nach semantischer Ähnlichkeit sortiert
### Integrationsoptionen
- **System-Prompts**: Kontext für Ihre KI-Agenten bereitstellen
- **Dynamischer Kontext**: Suche und Einbindung relevanter Informationen während Gesprächen
- **Dokumentübergreifende Suche**: Abfrage über Ihre gesamte Wissensdatenbank
- **Gefilterte Suche**: Kombination mit Tags für präzisen Inhaltsabruf
- **System-Prompts**: Stellen Sie Ihren KI-Agenten Kontext bereit
- **Dynamischer Kontext**: Suchen und fügen Sie relevante Informationen während Konversationen hinzu
- **Multi-Dokument-Suche**: Durchsuchen Sie Ihre gesamte Wissensdatenbank
- **Gefilterte Suche**: Kombinieren Sie mit Tags für präzises Abrufen von Inhalten
## Vektorsuchtechnologie
## Vektor-Suchtechnologie
Sim verwendet Vektorsuche, die von [pgvector](https://github.com/pgvector/pgvector) unterstützt wird, um die Bedeutung und den Kontext Ihrer Inhalte zu verstehen:
### Semantisches Verständnis
- **Kontextuelle Suche**: Findet relevante Inhalte, auch wenn exakte Schlüsselwörter nicht übereinstimmen
- **Konzeptbasierte Abfrage**: Versteht Beziehungen zwischen Ideen
- **Konzeptbasiertes Abrufen**: Versteht Beziehungen zwischen Ideen
- **Mehrsprachige Unterstützung**: Funktioniert über verschiedene Sprachen hinweg
- **Synonymerkennung**: Findet verwandte Begriffe und Konzepte
### Suchfunktionen
- **Natürlichsprachige Abfragen**: Stellen Sie Fragen in natürlicher Sprache
- **Natürlichsprachige Abfragen**: Stellen Sie Fragen in einfachem Deutsch
- **Ähnlichkeitssuche**: Finden Sie konzeptionell ähnliche Inhalte
- **Hybridsuche**: Kombiniert Vektor- und traditionelle Schlüsselwortsuche
- **Konfigurierbare Ergebnisse**: Steuern Sie die Anzahl und den Relevanz-Schwellenwert der Ergebnisse
- **Hybride Suche**: Kombiniert Vektor- und traditionelle Schlüsselwortsuche
- **Konfigurierbare Ergebnisse**: Steuern Sie die Anzahl und Relevanzschwelle der Ergebnisse
## Dokumentenverwaltung
### Organisationsfunktionen
- **Massenupload**: Laden Sie mehrere Dateien gleichzeitig über die asynchrone API hoch
- **Verarbeitungsstatus**: Echtzeit-Updates zum Dokumentenverarbeitungsprozess
- **Suchen und Filtern**: Finden Sie Dokumente schnell in großen Sammlungen
- **Massen-Upload**: Laden Sie mehrere Dateien gleichzeitig über die asynchrone API hoch
- **Verarbeitungsstatus**: Echtzeit-Updates zur Dokumentenverarbeitung
- **Suchen und filtern**: Finden Sie Dokumente schnell in großen Sammlungen
- **Metadaten-Tracking**: Automatische Erfassung von Dateiinformationen und Verarbeitungsdetails
### Sicherheit und Datenschutz
- **Sichere Speicherung**: Dokumente werden mit Sicherheit auf Unternehmensniveau gespeichert
- **Zugriffskontrolle**: Workspace-basierte Berechtigungen
- **Verarbeitungsisolierung**: Jeder Workspace hat eine isolierte Dokumentenverarbeitung
- **Verarbeitungsisolierung**: Jeder Workspace hat isolierte Dokumentenverarbeitung
- **Datenaufbewahrung**: Konfigurieren Sie Richtlinien zur Dokumentenaufbewahrung
## Erste Schritte
1. **Navigieren Sie zu Ihrer Wissensdatenbank**: Zugriff über Ihre Workspace-Seitenleiste
2. **Dokumente hochladen**: Drag & Drop oder wählen Sie Dateien zum Hochladen aus
3. **Verarbeitung überwachen**: Beobachten Sie, wie Dokumente verarbeitet und in Chunks aufgeteilt werden
4. **Chunks erkunden**: Sehen und bearbeiten Sie die verarbeiteten Inhalte
5. **Zu Workflows hinzufügen**: Verwenden Sie den Wissensblock, um ihn in Ihre KI-Agenten zu integrieren
2. **Dokumente hochladen**: Ziehen und ablegen oder Dateien zum Hochladen auswählen
3. **Verarbeitung überwachen**: Beobachten Sie, wie Dokumente verarbeitet und in Abschnitte unterteilt werden
4. **Abschnitte erkunden**: Zeigen Sie die verarbeiteten Inhalte an und bearbeiten Sie sie
5. **Zu Workflows hinzufügen**: Verwenden Sie den Knowledge-Block, um mit Ihren KI-Agenten zu integrieren
Die Wissensdatenbank verwandelt Ihre statischen Dokumente in eine intelligente, durchsuchbare Ressource, die Ihre KI-Workflows für fundiertere und kontextbezogenere Antworten nutzen können.
Die Wissensdatenbank verwandelt Ihre statischen Dokumente in eine intelligente, durchsuchbare Ressource, die Ihre KI-Workflows für fundiertere und kontextbezogene Antworten nutzen können.

View File

@@ -0,0 +1,59 @@
---
title: Circleback
description: KI-gestützte Meeting-Notizen und Aufgaben
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="circleback"
color="linear-gradient(180deg, #E0F7FA 0%, #FFFFFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Circleback](https://circleback.ai/) ist eine KI-gestützte Plattform, die Meeting-Notizen, Aufgaben, Transkripte und Aufzeichnungen für Ihr Team automatisiert. Wenn ein Meeting abgeschlossen ist, verarbeitet Circleback die Konversation und liefert detaillierte Notizen und Aufgaben sowie ein Transkript und eine Aufzeichnung (sofern verfügbar). Dies hilft Teams dabei, Erkenntnisse effizient zu erfassen, Aufgaben zu verteilen und sicherzustellen, dass nichts übersehen wird alles nahtlos in Ihre Workflows integriert.
Mit der Sim Circleback-Integration können Sie:
- **Detaillierte Meeting-Notizen und Aufgaben erhalten**: Sammeln Sie automatisch gut formatierte Meeting-Zusammenfassungen und verfolgen Sie umsetzbare Aufgaben, die während Ihrer Anrufe besprochen wurden.
- **Auf vollständige Meeting-Aufzeichnungen und Transkripte zugreifen**: Erhalten Sie die vollständige Konversation und die zugehörige Aufzeichnung, um wichtige Momente einfach zu überprüfen oder mit Kollegen zu teilen.
- **Teilnehmerinformationen und Meeting-Kontext erfassen**: Teilnehmerlisten, Meeting-Metadaten und Tags helfen dabei, Ihre Daten organisiert und umsetzbar zu halten.
- **Erkenntnisse direkt in Ihre Workflows liefern**: Lösen Sie Automatisierungen aus oder senden Sie Circleback-Daten an andere Systeme, sobald ein Meeting beendet ist, mithilfe der leistungsstarken Webhook-Trigger von Sim.
**So funktioniert es in Sim:**
Circleback verwendet Webhook-Trigger: Sobald ein Meeting verarbeitet wurde, werden die Daten automatisch an Ihren Agenten oder Ihre Automatisierung übertragen. Sie können weitere Automatisierungen basierend auf folgenden Ereignissen erstellen:
- Meeting abgeschlossen (alle verarbeiteten Daten verfügbar)
- Neue Notizen (Notizen sind verfügbar, noch bevor das Meeting vollständig verarbeitet ist)
- Raw-Webhook-Integration für erweiterte Anwendungsfälle
**Die folgenden Informationen sind in der Circleback-Meeting-Webhook-Payload verfügbar:**
| Feld | Typ | Beschreibung |
|----------------|---------|----------------------------------------------------|
| `id` | number | Circleback Meeting-ID |
| `name` | string | Meeting-Titel |
| `url` | string | Virtueller Meeting-Link (Zoom, Meet, Teams usw.) |
| `createdAt` | string | Zeitstempel der Meeting-Erstellung |
| `duration` | number | Dauer in Sekunden |
| `recordingUrl` | string | Aufzeichnungs-URL (24 Stunden gültig) |
| `tags` | json | Array von Tags |
| `icalUid` | string | Kalender-Event-ID |
| `attendees` | json | Array von Teilnehmer-Objekten |
| `notes` | string | Meeting-Notizen in Markdown |
| `actionItems` | json | Array von Aufgaben |
| `transcript` | json | Array von Transkript-Segmenten |
| `insights` | json | Vom Nutzer erstellte Insights |
| `meeting` | json | Vollständige Meeting-Daten |
Egal, ob Sie sofortige Zusammenfassungen verteilen, Aufgaben protokollieren oder benutzerdefinierte Workflows erstellen möchten, die durch neue Meeting-Daten ausgelöst werden Circleback und Sim machen es nahtlos, alles rund um Ihre Meetings automatisch zu verwalten.
{/* MANUAL-CONTENT-END */}
## Nutzungsanleitung
Erhalten Sie Meeting-Notizen, Aufgaben, Transkripte und Aufzeichnungen, wenn Meetings verarbeitet werden. Circleback nutzt Webhooks, um Daten an Ihre Workflows zu übermitteln.
## Hinweise
- Kategorie: `triggers`
- Typ: `circleback`

View File

@@ -0,0 +1,218 @@
---
title: Grain
description: Zugriff auf Meeting-Aufzeichnungen, Transkripte und KI-Zusammenfassungen
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="grain"
color="#F6FAF9"
/>
{/* MANUAL-CONTENT-START:intro */}
[Grain](https://grain.com/) ist eine moderne Plattform zum Erfassen, Speichern und Teilen von Meeting-Aufzeichnungen, Transkripten, Highlights und KI-gestützten Zusammenfassungen. Grain ermöglicht es Teams, Gespräche in umsetzbare Erkenntnisse zu verwandeln und alle über wichtige Momente aus Meetings auf dem Laufenden zu halten.
Mit Grain können Sie:
- **Auf durchsuchbare Aufzeichnungen und Transkripte zugreifen**: Finden und überprüfen Sie jedes Meeting nach Stichwort, Teilnehmer oder Thema.
- **Highlights und Clips teilen**: Erfassen Sie wichtige Momente und teilen Sie kurze Video-/Audio-Highlights in Ihrem Team oder in Workflows.
- **KI-generierte Zusammenfassungen erhalten**: Erstellen Sie automatisch Meeting-Zusammenfassungen, Aktionspunkte und wichtige Erkenntnisse mithilfe der fortschrittlichen KI von Grain.
- **Meetings nach Team oder Typ organisieren**: Taggen und kategorisieren Sie Aufzeichnungen für einfachen Zugriff und Reporting.
Die Sim-Grain-Integration ermöglicht es Ihren Agenten:
- Meeting-Aufzeichnungen und Details nach flexiblen Filtern (Datum/Uhrzeit, Teilnehmer, Team usw.) aufzulisten, zu suchen und abzurufen.
- Auf KI-Zusammenfassungen, Teilnehmer, Highlights und andere Metadaten für Meetings zuzugreifen, um Automatisierungen oder Analysen zu unterstützen.
- Workflows auszulösen, sobald neue Meetings verarbeitet, Zusammenfassungen generiert oder Highlights über Grain-Webhooks erstellt werden.
- Grain-Daten einfach in andere Tools zu überführen oder Teammitglieder zu benachrichtigen, sobald etwas Wichtiges in einem Meeting passiert.
Ob Sie Follow-up-Aktionen automatisieren, wichtige Gespräche dokumentieren oder Erkenntnisse in Ihrer Organisation sichtbar machen möchten Grain und Sim machen es einfach, Meeting-Intelligence mit Ihren Workflows zu verbinden.
{/* MANUAL-CONTENT-END */}
## Nutzungsanweisungen
Integrieren Sie Grain in Ihren Workflow. Greifen Sie auf Meeting-Aufzeichnungen, Transkripte, Highlights und KI-generierte Zusammenfassungen zu. Kann auch Workflows basierend auf Grain-Webhook-Ereignissen auslösen.
## Tools
### `grain_list_recordings`
Aufzeichnungen von Grain mit optionalen Filtern und Paginierung auflisten
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain API-Schlüssel \(Personal Access Token\) |
| `cursor` | string | Nein | Paginierungs-Cursor für nächste Seite |
| `beforeDatetime` | string | Nein | Nur Aufzeichnungen vor diesem ISO8601-Zeitstempel |
| `afterDatetime` | string | Nein | Nur Aufzeichnungen nach diesem ISO8601-Zeitstempel |
| `participantScope` | string | Nein | Filter: "internal" oder "external" |
| `titleSearch` | string | Nein | Suchbegriff zum Filtern nach Aufzeichnungstitel |
| `teamId` | string | Nein | Nach Team-UUID filtern |
| `meetingTypeId` | string | Nein | Nach Meeting-Typ-UUID filtern |
| `includeHighlights` | boolean | Nein | Highlights/Clips in Antwort einschließen |
| `includeParticipants` | boolean | Nein | Teilnehmerliste in Antwort einschließen |
| `includeAiSummary` | boolean | Nein | KI-generierte Zusammenfassung einschließen |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `recordings` | array | Array von Aufzeichnungsobjekten |
### `grain_get_recording`
Details einer einzelnen Aufzeichnung nach ID abrufen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain API-Schlüssel \(Personal Access Token\) |
| `recordingId` | string | Ja | Die Aufzeichnungs-UUID |
| `includeHighlights` | boolean | Nein | Highlights/Clips einschließen |
| `includeParticipants` | boolean | Nein | Teilnehmerliste einschließen |
| `includeAiSummary` | boolean | Nein | KI-Zusammenfassung einschließen |
| `includeCalendarEvent` | boolean | Nein | Kalenderereignisdaten einschließen |
| `includeHubspot` | boolean | Nein | HubSpot-Verknüpfungen einschließen |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `id` | string | Aufnahme-UUID |
| `title` | string | Aufnahmetitel |
| `start_datetime` | string | ISO8601-Startzeitstempel |
| `end_datetime` | string | ISO8601-Endzeitstempel |
| `duration_ms` | number | Dauer in Millisekunden |
| `media_type` | string | audio, transcript oder video |
| `source` | string | Aufnahmequelle \(zoom, meet, teams, etc.\) |
| `url` | string | URL zur Ansicht in Grain |
| `thumbnail_url` | string | Vorschaubild-URL |
| `tags` | array | Array von Tag-Strings |
| `teams` | array | Teams, zu denen die Aufnahme gehört |
| `meeting_type` | object | Meeting-Typ-Informationen \(id, name, scope\) |
| `highlights` | array | Highlights \(falls enthalten\) |
| `participants` | array | Teilnehmer \(falls enthalten\) |
| `ai_summary` | object | KI-Zusammenfassungstext \(falls enthalten\) |
| `calendar_event` | object | Kalenderereignisdaten \(falls enthalten\) |
| `hubspot` | object | HubSpot-Verknüpfungen \(falls enthalten\) |
### `grain_get_transcript`
Vollständiges Transkript einer Aufnahme abrufen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain-API-Schlüssel \(Personal Access Token\) |
| `recordingId` | string | Ja | Die Aufnahme-UUID |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `transcript` | array | Array von Transkriptabschnitten |
### `grain_list_teams`
Alle Teams im Workspace auflisten
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain API-Schlüssel \(Personal Access Token\) |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `teams` | array | Array von Team-Objekten |
### `grain_list_meeting_types`
Alle Meeting-Typen im Workspace auflisten
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain API-Schlüssel \(Personal Access Token\) |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `meeting_types` | array | Array von Meeting-Typ-Objekten |
### `grain_create_hook`
Einen Webhook erstellen, um Aufzeichnungs-Events zu empfangen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain API-Schlüssel \(Personal Access Token\) |
| `hookUrl` | string | Ja | Webhook-Endpunkt-URL \(muss mit 2xx antworten\) |
| `filterBeforeDatetime` | string | Nein | Filter: Aufzeichnungen vor diesem Datum |
| `filterAfterDatetime` | string | Nein | Filter: Aufzeichnungen nach diesem Datum |
| `filterParticipantScope` | string | Nein | Filter: "internal" oder "external" |
| `filterTeamId` | string | Nein | Filter: spezifische Team-UUID |
| `filterMeetingTypeId` | string | Nein | Filter: spezifischer Meeting-Typ |
| `includeHighlights` | boolean | Nein | Highlights in Webhook-Payload einschließen |
| `includeParticipants` | boolean | Nein | Teilnehmer in Webhook-Payload einschließen |
| `includeAiSummary` | boolean | Nein | KI-Zusammenfassung in Webhook-Payload einschließen |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `id` | string | Hook-UUID |
| `enabled` | boolean | Ob der Hook aktiv ist |
| `hook_url` | string | Die Webhook-URL |
| `filter` | object | Angewendete Filter |
| `include` | object | Enthaltene Felder |
| `inserted_at` | string | ISO8601-Erstellungszeitstempel |
### `grain_list_hooks`
Alle Webhooks für das Konto auflisten
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain-API-Schlüssel \(Personal Access Token\) |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `hooks` | array | Array von Hook-Objekten |
### `grain_delete_hook`
Einen Webhook anhand der ID löschen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Ja | Grain-API-Schlüssel \(Personal Access Token\) |
| `hookId` | string | Ja | Die zu löschende Hook-UUID |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | True, wenn der Webhook erfolgreich gelöscht wurde |
## Hinweise
- Kategorie: `tools`
- Typ: `grain`

View File

@@ -38,6 +38,7 @@ Erstellen Sie einen neuen Kontakt in Intercom mit E-Mail, external_id oder Rolle
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `role` | string | Nein | Die Rolle des Kontakts. Akzeptiert 'user' oder 'lead'. Standardmäßig 'lead', wenn nicht angegeben. |
| `email` | string | Nein | Die E-Mail-Adresse des Kontakts |
| `external_id` | string | Nein | Eine eindeutige Kennung für den Kontakt, die vom Client bereitgestellt wird |
| `phone` | string | Nein | Die Telefonnummer des Kontakts |
@@ -45,9 +46,10 @@ Erstellen Sie einen neuen Kontakt in Intercom mit E-Mail, external_id oder Rolle
| `avatar` | string | Nein | Eine Avatar-Bild-URL für den Kontakt |
| `signed_up_at` | number | Nein | Der Zeitpunkt der Registrierung des Benutzers als Unix-Zeitstempel |
| `last_seen_at` | number | Nein | Der Zeitpunkt, zu dem der Benutzer zuletzt gesehen wurde, als Unix-Zeitstempel |
| `owner_id` | string | Nein | Die ID eines Administrators, dem die Kontoinhaberschaft des Kontakts zugewiesen wurde |
| `unsubscribed_from_emails` | boolean | Nein | Ob der Kontakt E-Mails abbestellt hat |
| `custom_attributes` | string | Nein | Benutzerdefinierte Attribute als JSON-Objekt \(z.B. \{"attribute_name": "value"\}\) |
| `owner_id` | string | Nein | Die ID eines Administrators, dem die Kontoverantwortung für den Kontakt zugewiesen wurde |
| `unsubscribed_from_emails` | boolean | Nein | Ob der Kontakt von E-Mails abgemeldet ist |
| `custom_attributes` | string | Nein | Benutzerdefinierte Attribute als JSON-Objekt \(z. B. \{"attribute_name": "value"\}\) |
| `company_id` | string | Nein | Unternehmens-ID, mit der der Kontakt bei der Erstellung verknüpft werden soll |
#### Ausgabe
@@ -81,16 +83,19 @@ Einen bestehenden Kontakt in Intercom aktualisieren
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `contactId` | string | Ja | Zu aktualisierende Kontakt-ID |
| `contactId` | string | Ja | Kontakt-ID, die aktualisiert werden soll |
| `role` | string | Nein | Die Rolle des Kontakts. Akzeptiert 'user' oder 'lead'. |
| `external_id` | string | Nein | Eine eindeutige Kennung für den Kontakt, die vom Client bereitgestellt wird |
| `email` | string | Nein | Die E-Mail-Adresse des Kontakts |
| `phone` | string | Nein | Die Telefonnummer des Kontakts |
| `name` | string | Nein | Der Name des Kontakts |
| `avatar` | string | Nein | Eine Avatar-Bild-URL für den Kontakt |
| `signed_up_at` | number | Nein | Der Zeitpunkt der Registrierung des Benutzers als Unix-Timestamp |
| `last_seen_at` | number | Nein | Der Zeitpunkt, zu dem der Benutzer zuletzt gesehen wurde, als Unix-Timestamp |
| `owner_id` | string | Nein | Die ID eines Administrators, dem die Kontoeigentümerschaft des Kontakts zugewiesen wurde |
| `unsubscribed_from_emails` | boolean | Nein | Ob der Kontakt E-Mails abbestellt hat |
| `custom_attributes` | string | Nein | Benutzerdefinierte Attribute als JSON-Objekt \(z.B. \{"attribut_name": "wert"\}\) |
| `signed_up_at` | number | Nein | Der Zeitpunkt der Registrierung des Benutzers als Unix-Zeitstempel |
| `last_seen_at` | number | Nein | Der Zeitpunkt, zu dem der Benutzer zuletzt gesehen wurde, als Unix-Zeitstempel |
| `owner_id` | string | Nein | Die ID eines Administrators, dem die Kontoverantwortung für den Kontakt zugewiesen wurde |
| `unsubscribed_from_emails` | boolean | Nein | Ob der Kontakt von E-Mails abgemeldet ist |
| `custom_attributes` | string | Nein | Benutzerdefinierte Attribute als JSON-Objekt \(z. B. \{"attribute_name": "value"\}\) |
| `company_id` | string | Nein | Unternehmens-ID, mit der der Kontakt verknüpft werden soll |
#### Output
@@ -125,9 +130,11 @@ Suche nach Kontakten in Intercom mit einer Abfrage
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `query` | string | Ja | Suchabfrage (z.B., \{"field":"email","operator":"=","value":"user@example.com"\}) |
| `query` | string | Ja | Suchabfrage (z. B. \{"field":"email","operator":"=","value":"user@example.com"\}) |
| `per_page` | number | Nein | Anzahl der Ergebnisse pro Seite (max: 150) |
| `starting_after` | string | Nein | Cursor für Paginierung |
| `sort_field` | string | Nein | Feld zum Sortieren (z. B. "name", "created_at", "last_seen_at") |
| `sort_order` | string | Nein | Sortierreihenfolge: "ascending" oder "descending" |
#### Ausgabe
@@ -163,12 +170,13 @@ Ein Unternehmen in Intercom erstellen oder aktualisieren
| --------- | ---- | -------- | ----------- |
| `company_id` | string | Ja | Ihre eindeutige Kennung für das Unternehmen |
| `name` | string | Nein | Der Name des Unternehmens |
| `website` | string | Nein | Die Unternehmenswebsite |
| `plan` | string | Nein | Der Unternehmensplan |
| `website` | string | Nein | Die Website des Unternehmens |
| `plan` | string | Nein | Der Name des Unternehmensplans |
| `size` | number | Nein | Die Anzahl der Mitarbeiter im Unternehmen |
| `industry` | string | Nein | Die Branche, in der das Unternehmen tätig ist |
| `monthly_spend` | number | Nein | Wie viel Umsatz das Unternehmen für Ihr Geschäft generiert. Hinweis: Dieses Feld kürzt Dezimalzahlen auf ganze Zahlen \(z.B. wird aus 155,98 die Zahl 155\) |
| `monthly_spend` | number | Nein | Wie viel Umsatz das Unternehmen für Ihr Geschäft generiert. Hinweis: Dieses Feld rundet Dezimalzahlen auf ganze Zahlen ab (z. B. wird 155,98 zu 155) |
| `custom_attributes` | string | Nein | Benutzerdefinierte Attribute als JSON-Objekt |
| `remote_created_at` | number | Nein | Der Zeitpunkt, zu dem das Unternehmen von Ihnen erstellt wurde, als Unix-Zeitstempel |
#### Ausgabe
@@ -204,6 +212,7 @@ Listet alle Unternehmen von Intercom mit Paginierungsunterstützung auf. Hinweis
| --------- | ---- | -------- | ----------- |
| `per_page` | number | Nein | Anzahl der Ergebnisse pro Seite |
| `page` | number | Nein | Seitennummer |
| `starting_after` | string | Nein | Cursor für Paginierung (bevorzugt gegenüber seitenbasierter Paginierung) |
#### Ausgabe
@@ -221,7 +230,8 @@ Eine einzelne Konversation anhand der ID von Intercom abrufen
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Ja | Konversations-ID zum Abrufen |
| `display_as` | string | Nein | Auf "plaintext" setzen, um Nachrichten im Klartext abzurufen |
| `display_as` | string | Nein | Auf "plaintext" setzen, um Nachrichten als reinen Text abzurufen |
| `include_translations` | boolean | Nein | Wenn true, werden Konversationsteile in die erkannte Sprache der Konversation übersetzt |
#### Ausgabe
@@ -238,8 +248,10 @@ Alle Konversationen von Intercom mit Paginierungsunterstützung auflisten
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `per_page` | number | Nein | Anzahl der Ergebnisse pro Seite \(max: 150\) |
| `per_page` | number | Nein | Anzahl der Ergebnisse pro Seite (max: 150) |
| `starting_after` | string | Nein | Cursor für Paginierung |
| `sort` | string | Nein | Feld zum Sortieren (z. B. "waiting_since", "updated_at", "created_at") |
| `order` | string | Nein | Sortierreihenfolge: "asc" (aufsteigend) oder "desc" (absteigend) |
#### Ausgabe
@@ -256,11 +268,12 @@ Als Administrator auf eine Konversation in Intercom antworten
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Ja | Konversations-ID, auf die geantwortet werden soll |
| `conversationId` | string | Ja | Konversations-ID zum Antworten |
| `message_type` | string | Ja | Nachrichtentyp: "comment" oder "note" |
| `body` | string | Ja | Der Textinhalt der Antwort |
| `admin_id` | string | Nein | Die ID des Administrators, der die Antwort verfasst. Wenn nicht angegeben, wird ein Standard-Administrator \(Operator/Fin\) verwendet. |
| `attachment_urls` | string | Nein | Kommagetrennte Liste von Bild-URLs \(max. 10\) |
| `admin_id` | string | Nein | Die ID des Administrators, der die Antwort verfasst. Falls nicht angegeben, wird ein Standard-Administrator (Operator/Fin) verwendet. |
| `attachment_urls` | string | Nein | Kommagetrennte Liste von Bild-URLs (max. 10) |
| `created_at` | number | Nein | Unix-Zeitstempel für den Zeitpunkt der Erstellung der Antwort. Falls nicht angegeben, wird die aktuelle Zeit verwendet. |
#### Ausgabe
@@ -278,8 +291,10 @@ Nach Konversationen in Intercom mit einer Abfrage suchen
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `query` | string | Ja | Suchabfrage als JSON-Objekt |
| `per_page` | number | Nein | Anzahl der Ergebnisse pro Seite (max: 150) |
| `per_page` | number | Nein | Anzahl der Ergebnisse pro Seite \(max: 150\) |
| `starting_after` | string | Nein | Cursor für Paginierung |
| `sort_field` | string | Nein | Feld, nach dem sortiert werden soll \(z. B. "created_at", "updated_at"\) |
| `sort_order` | string | Nein | Sortierreihenfolge: "ascending" oder "descending" |
#### Ausgabe
@@ -297,8 +312,12 @@ Ein neues Ticket in Intercom erstellen
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `ticket_type_id` | string | Ja | Die ID des Ticket-Typs |
| `contacts` | string | Ja | JSON-Array von Kontakt-Identifikatoren (z.B. \{"id": "contact_id"\}) |
| `contacts` | string | Ja | JSON-Array von Kontaktkennungen \(z. B. \[\{"id": "contact_id"\}\]\) |
| `ticket_attributes` | string | Ja | JSON-Objekt mit Ticket-Attributen einschließlich _default_title_ und _default_description_ |
| `company_id` | string | Nein | Unternehmens-ID, mit der das Ticket verknüpft werden soll |
| `created_at` | number | Nein | Unix-Zeitstempel für den Zeitpunkt der Ticket-Erstellung. Wenn nicht angegeben, wird die aktuelle Zeit verwendet. |
| `conversation_to_link_id` | string | Nein | ID einer vorhandenen Konversation, die mit diesem Ticket verknüpft werden soll |
| `disable_notifications` | boolean | Nein | Wenn true, werden Benachrichtigungen bei der Ticket-Erstellung unterdrückt |
#### Output
@@ -330,15 +349,17 @@ Eine neue vom Administrator initiierte Nachricht in Intercom erstellen und sende
#### Input
| Parameter | Type | Erforderlich | Beschreibung |
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `message_type` | string | Ja | Nachrichtentyp: "inapp" oder "email" |
| `message_type` | string | Ja | Nachrichtentyp: "inapp" für In-App-Nachrichten oder "email" für E-Mail-Nachrichten |
| `template` | string | Ja | Nachrichtenvorlagenstil: "plain" für einfachen Text oder "personal" für personalisierten Stil |
| `subject` | string | Nein | Der Betreff der Nachricht \(für E-Mail-Typ\) |
| `body` | string | Ja | Der Inhalt der Nachricht |
| `from_type` | string | Ja | Absendertyp: "admin" |
| `from_id` | string | Ja | Die ID des Administrators, der die Nachricht sendet |
| `to_type` | string | Ja | Empfängertyp: "contact" |
| `to_id` | string | Ja | Die ID des Kontakts, der die Nachricht empfängt |
| `created_at` | number | Nein | Unix-Zeitstempel für den Zeitpunkt der Nachrichtenerstellung. Wenn nicht angegeben, wird die aktuelle Zeit verwendet. |
#### Output

View File

@@ -61,8 +61,6 @@ Extrahieren und verarbeiten Sie Webinhalte in sauberen, LLM-freundlichen Text mi
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `content` | string | Der extrahierte Inhalt von der URL, verarbeitet zu sauberem, LLM-freundlichem Text |
| `links` | array | Liste der auf der Seite gefundenen Links (wenn gatherLinks oder withLinksummary aktiviert ist) |
| `images` | array | Liste der auf der Seite gefundenen Bilder (wenn withImagesummary aktiviert ist) |
### `jina_search`

View File

@@ -10,55 +10,52 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
color="#F64F9E"
/>
## Gebrauchsanweisung
## Nutzungsanweisungen
Memory in den Workflow integrieren. Kann Erinnerungen hinzufügen, eine Erinnerung abrufen, alle Erinnerungen abrufen und Erinnerungen löschen.
Integrieren Sie Memory in den Workflow. Kann Erinnerungen hinzufügen, abrufen, alle Erinnerungen abrufen und Erinnerungen löschen.
## Tools
### `memory_add`
Füge eine neue Erinnerung zur Datenbank hinzu oder ergänze bestehende Erinnerungen mit derselben ID.
Fügen Sie eine neue Erinnerung zur Datenbank hinzu oder hängen Sie sie an eine bestehende Erinnerung mit derselben ID an.
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Nein | Konversationskennung (z.B. user-123, session-abc). Wenn bereits eine Erinnerung mit dieser conversationId für diesen Block existiert, wird die neue Nachricht angehängt. |
| `id` | string | Nein | Legacy-Parameter für die Konversationskennung. Verwenden Sie stattdessen conversationId. r Abwärtskompatibilität bereitgestellt. |
| `role` | string | Ja | Rolle für Agent-Erinnerung (user, assistant oder system) |
| `conversationId` | string | Nein | Konversationskennung \(z. B. user-123, session-abc\). Wenn bereits eine Erinnerung mit dieser conversationId existiert, wird die neue Nachricht an diese angehängt. |
| `id` | string | Nein | Legacy-Parameter für Konversationskennung. Verwenden Sie stattdessen conversationId. Wird aus Gründen der Abwärtskompatibilität bereitgestellt. |
| `role` | string | Ja | Rolle für Agent-Erinnerung \(user, assistant oder system\) |
| `content` | string | Ja | Inhalt für Agent-Erinnerung |
| `blockId` | string | Nein | Optionale Block-ID. Wenn nicht angegeben, wird die aktuelle Block-ID aus dem Ausführungskontext verwendet oder standardmäßig "default" gesetzt. |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Ob der Speicher erfolgreich hinzugefügt wurde |
| `memories` | array | Array von Speicherobjekten einschließlich des neuen oder aktualisierten Speichers |
| `success` | boolean | Ob die Erinnerung erfolgreich hinzugefügt wurde |
| `memories` | array | Array von Erinnerungsobjekten einschließlich der neuen oder aktualisierten Erinnerung |
| `error` | string | Fehlermeldung, falls der Vorgang fehlgeschlagen ist |
### `memory_get`
Erinnerungen nach conversationId, blockId, blockName oder einer Kombination abrufen. Gibt alle übereinstimmenden Erinnerungen zurück.
Erinnerung nach conversationId abrufen. Gibt übereinstimmende Erinnerungen zurück.
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Nein | Konversationskennung (z.B. user-123, session-abc). Wenn allein angegeben, werden alle Erinnerungen für diese Konversation über alle Blöcke hinweg zurückgegeben. |
| `id` | string | Nein | Legacy-Parameter für die Konversationskennung. Verwenden Sie stattdessen conversationId. r Abwärtskompatibilität bereitgestellt. |
| `blockId` | string | Nein | Block-Kennung. Wenn allein angegeben, werden alle Erinnerungen für diesen Block über alle Konversationen hinweg zurückgegeben. Wenn mit conversationId angegeben, werden Erinnerungen für diese spezifische Konversation in diesem Block zurückgegeben. |
| `blockName` | string | Nein | Blockname. Alternative zu blockId. Wenn allein angegeben, werden alle Erinnerungen für Blöcke mit diesem Namen zurückgegeben. Wenn mit conversationId angegeben, werden Erinnerungen für diese Konversation in Blöcken mit diesem Namen zurückgegeben. |
| `conversationId` | string | Nein | Konversationskennung \(z. B. user-123, session-abc\). Gibt Erinnerungen für diese Konversation zurück. |
| `id` | string | Nein | Legacy-Parameter für Konversationskennung. Verwenden Sie stattdessen conversationId. Wird aus Gründen der Abwärtskompatibilität bereitgestellt. |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Ob die Erinnerung erfolgreich abgerufen wurde |
| `memories` | array | Array von Speicherobjekten mit conversationId, blockId, blockName und data-Feldern |
| `success` | boolean | Ob der Speicher erfolgreich abgerufen wurde |
| `memories` | array | Array von Speicherobjekten mit conversationId- und data-Feldern |
| `message` | string | Erfolgs- oder Fehlermeldung |
| `error` | string | Fehlermeldung, wenn der Vorgang fehlgeschlagen ist |
| `error` | string | Fehlermeldung, falls fehlgeschlagen |
### `memory_get_all`
@@ -73,31 +70,29 @@ Alle Speicher aus der Datenbank abrufen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Ob alle Erinnerungen erfolgreich abgerufen wurden |
| `memories` | array | Array aller Speicherobjekte mit key, conversationId, blockId, blockName und data-Feldern |
| `success` | boolean | Ob alle Speicher erfolgreich abgerufen wurden |
| `memories` | array | Array aller Speicherobjekte mit key-, conversationId- und data-Feldern |
| `message` | string | Erfolgs- oder Fehlermeldung |
| `error` | string | Fehlermeldung, wenn der Vorgang fehlgeschlagen ist |
| `error` | string | Fehlermeldung, falls fehlgeschlagen |
### `memory_delete`
Löschen von Erinnerungen nach conversationId, blockId, blockName oder einer Kombination davon. Unterstützt Massenlöschung.
Speicher nach conversationId löschen.
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Nein | Konversationskennung (z.B. user-123, session-abc). Wenn allein angegeben, werden alle Erinnerungen für diese Konversation über alle Blöcke hinweg gelöscht. |
| `id` | string | Nein | Legacy-Parameter für die Konversationskennung. Verwenden Sie stattdessen conversationId. r Abwärtskompatibilität bereitgestellt. |
| `blockId` | string | Nein | Block-Kennung. Wenn allein angegeben, werden alle Erinnerungen für diesen Block über alle Konversationen hinweg gelöscht. Wenn mit conversationId angegeben, werden Erinnerungen für diese spezifische Konversation in diesem Block gelöscht. |
| `blockName` | string | Nein | Blockname. Alternative zu blockId. Wenn allein angegeben, werden alle Erinnerungen für Blöcke mit diesem Namen gelöscht. Wenn mit conversationId angegeben, werden Erinnerungen für diese Konversation in Blöcken mit diesem Namen gelöscht. |
| `conversationId` | string | Nein | Konversationskennung (z. B. user-123, session-abc). Löscht alle Speicher für diese Konversation. |
| `id` | string | Nein | Legacy-Parameter für Konversationskennung. Verwenden Sie stattdessen conversationId. Wird aus Gründen der Abwärtskompatibilität bereitgestellt. |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Ob die Erinnerung erfolgreich gelöscht wurde |
| `success` | boolean | Ob der Speicher erfolgreich gelöscht wurde |
| `message` | string | Erfolgs- oder Fehlermeldung |
| `error` | string | Fehlermeldung, wenn der Vorgang fehlgeschlagen ist |
| `error` | string | Fehlermeldung, falls fehlgeschlagen |
## Hinweise

View File

@@ -47,12 +47,13 @@ Daten aus einer Supabase-Tabelle abfragen
| 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 abzufragenden Supabase-Tabelle |
| `filter` | string | Nein | PostgREST-Filter \(z.B. "id=eq.123"\) |
| `orderBy` | string | Nein | Spalte zum Sortieren \(fügen Sie DESC für absteigend hinzu\) |
| `schema` | string | Nein | Datenbankschema für die Abfrage \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `filter` | string | Nein | PostgREST-Filter \(z. B. "id=eq.123"\) |
| `orderBy` | string | Nein | Spalte zum Sortieren \(fügen Sie DESC für absteigende Sortierung hinzu\) |
| `limit` | number | Nein | Maximale Anzahl der zurückzugebenden Zeilen |
| `apiKey` | string | Ja | Ihr Supabase Service-Rolle-Secret-Schlüssel |
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
#### Ausgabe
@@ -69,8 +70,9 @@ 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 |
| `schema` | string | Nein | Datenbankschema für das Einfügen \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `data` | array | Ja | Die einzufügenden Daten \(Array von Objekten oder ein einzelnes Objekt\) |
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
@@ -89,10 +91,11 @@ Eine einzelne Zeile aus einer Supabase-Tabelle basierend auf Filterkriterien abr
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID (z.B. jdrkgepadsdopsntdlom) |
| `table` | string | Ja | Der Name der Supabase-Tabelle für die Abfrage |
| `filter` | string | Ja | PostgREST-Filter zum Finden der spezifischen Zeile (z.B. "id=eq.123") |
| `apiKey` | string | Ja | Ihr Supabase Service-Role-Secret-Key |
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID \(z. B. jdrkgepadsdopsntdlom\) |
| `table` | string | Ja | Der Name der abzufragenden Supabase-Tabelle |
| `schema` | string | Nein | Datenbankschema für die Abfrage \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `filter` | string | Ja | PostgREST-Filter zum Auffinden der spezifischen Zeile \(z. B. "id=eq.123"\) |
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
#### Ausgabe
@@ -109,9 +112,10 @@ Zeilen in einer Supabase-Tabelle basierend auf Filterkriterien aktualisieren
| 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 zu aktualisierenden Supabase-Tabelle |
| `filter` | string | Ja | PostgREST-Filter zur Identifizierung der zu aktualisierenden Zeilen (z.B. "id=eq.123") |
| `schema` | string | Nein | Datenbankschema für die Aktualisierung \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `filter` | string | Ja | PostgREST-Filter zur Identifizierung der zu aktualisierenden Zeilen \(z.B. "id=eq.123"\) |
| `data` | object | Ja | Daten, die in den übereinstimmenden Zeilen aktualisiert werden sollen |
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
@@ -130,9 +134,10 @@ Zeilen aus einer Supabase-Tabelle basierend auf Filterkriterien löschen
| 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, aus der gelöscht werden soll |
| `filter` | string | Ja | PostgREST-Filter zur Identifizierung der zu löschenden Zeilen (z.B. "id=eq.123") |
| `schema` | string | Nein | Datenbankschema für die Löschung \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `filter` | string | Ja | PostgREST-Filter zur Identifizierung der zu löschenden Zeilen \(z.B. "id=eq.123"\) |
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
#### Ausgabe
@@ -151,8 +156,9 @@ 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 upsertet werden sollen |
| `data` | array | Ja | Die zu upsertenden Daten \(einfügen oder aktualisieren\) - Array von Objekten oder ein einzelnes Objekt |
| `table` | string | Ja | Der Name der Supabase-Tabelle, in die Daten eingefügt oder aktualisiert werden sollen |
| `schema` | string | Nein | Datenbankschema für Upsert \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `data` | array | Ja | Die Daten für Upsert \(Einfügen oder Aktualisieren\) - Array von Objekten oder ein einzelnes Objekt |
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
#### Ausgabe
@@ -171,7 +177,8 @@ Zeilen in einer Supabase-Tabelle zählen
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID \(z.B. jdrkgepadsdopsntdlom\) |
| `table` | string | Ja | Der Name der Supabase-Tabelle, deren Zeilen gezählt werden sollen |
| `table` | string | Ja | Der Name der Supabase-Tabelle, aus der Zeilen gezählt werden sollen |
| `schema` | string | Nein | Datenbankschema zum Zählen \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `filter` | string | Nein | PostgREST-Filter \(z.B. "status=eq.active"\) |
| `countType` | string | Nein | Zähltyp: exact, planned oder estimated \(Standard: exact\) |
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
@@ -192,7 +199,8 @@ Volltextsuche in einer Supabase-Tabelle durchführen
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID \(z.B. jdrkgepadsdopsntdlom\) |
| `table` | string | Ja | Der Name der Supabase-Tabelle für die Suche |
| `table` | string | Ja | Der Name der zu durchsuchenden Supabase-Tabelle |
| `schema` | string | Nein | Datenbankschema zum Durchsuchen \(Standard: public\). Verwenden Sie dies, um auf Tabellen in anderen Schemas zuzugreifen. |
| `column` | string | Ja | Die Spalte, in der gesucht werden soll |
| `query` | string | Ja | Die Suchanfrage |
| `searchType` | string | Nein | Suchtyp: plain, phrase oder websearch \(Standard: websearch\) |

View File

@@ -42,13 +42,14 @@ Senden Sie eine Chat-Completion-Anfrage an jeden unterstützten LLM-Anbieter
| `model` | string | Ja | Das zu verwendende Modell \(z. B. gpt-4o, claude-sonnet-4-5, gemini-2.0-flash\) |
| `systemPrompt` | string | Nein | System-Prompt zur Festlegung des Verhaltens des Assistenten |
| `context` | string | Ja | Die Benutzernachricht oder der Kontext, der an das Modell gesendet werden soll |
| `apiKey` | string | Nein | API-Schlüssel für den Anbieter \(verwendet Plattform-Schlüssel, falls nicht für gehostete Modelle angegeben\) |
| `temperature` | number | Nein | Temperatur für die Antwortgenerierung \(0-2\) |
| `apiKey` | string | Nein | API-Schlüssel für den Anbieter \(verwendet den Plattformschlüssel, falls nicht für gehostete Modelle angegeben\) |
| `temperature` | number | Nein | Temperatur für die Antwortgenerierung \(02\) |
| `maxTokens` | number | Nein | Maximale Anzahl von Tokens in der Antwort |
| `azureEndpoint` | string | Nein | Azure OpenAI-Endpunkt-URL |
| `azureApiVersion` | string | Nein | Azure OpenAI-API-Version |
| `vertexProject` | string | Nein | Google Cloud-Projekt-ID für Vertex AI |
| `vertexLocation` | string | Nein | Google Cloud-Standort für Vertex AI \(Standard: us-central1\) |
| `vertexCredential` | string | Nein | Google Cloud OAuth-Anmeldeinformations-ID für Vertex AI |
#### Ausgabe

View File

@@ -5,7 +5,6 @@ title: Zeitplan
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Der Zeitplan-Block löst Workflows automatisch nach einem wiederkehrenden Zeitplan zu bestimmten Intervallen oder Zeiten aus.
@@ -21,67 +20,58 @@ Der Zeitplan-Block löst Workflows automatisch nach einem wiederkehrenden Zeitpl
## Zeitplan-Optionen
Konfigurieren Sie, wann Ihr Workflow ausgeführt wird, mit den Dropdown-Optionen:
Konfigurieren Sie, wann Ihr Workflow ausgeführt wird:
<Tabs items={['Einfache Intervalle', 'Cron-Ausdrücke']}>
<Tab>
<ul className="list-disc space-y-1 pl-6">
<li><strong>Alle paar Minuten</strong>: 5, 15, 30 Minuten-Intervalle</li>
<li><strong>Stündlich</strong>: Jede Stunde oder alle paar Stunden</li>
<li><strong>Täglich</strong>: Einmal oder mehrmals pro Tag</li>
<li><strong>Wöchentlich</strong>: Bestimmte Wochentage</li>
<li><strong>Monatlich</strong>: Bestimmte Tage des Monats</li>
<li><strong>Alle X Minuten</strong>: Ausführung in Minutenintervallen (1-1440)</li>
<li><strong>Stündlich</strong>: Ausführung zu einer bestimmten Minute jeder Stunde</li>
<li><strong>Täglich</strong>: Ausführung zu einer bestimmten Uhrzeit jeden Tag</li>
<li><strong>Wöchentlich</strong>: Ausführung an einem bestimmten Tag und einer bestimmten Uhrzeit jede Woche</li>
<li><strong>Monatlich</strong>: Ausführung an einem bestimmten Tag und einer bestimmten Uhrzeit jeden Monat</li>
</ul>
</Tab>
<Tab>
<p>Verwenden Sie Cron-Ausdrücke für erweiterte Zeitplanung:</p>
<p>Verwenden Sie Cron-Ausdrücke für erweiterte Planung:</p>
<div className="text-sm space-y-1">
<div><code>0 9 * * 1-5</code> - Jeden Wochentag um 9 Uhr</div>
<div><code>*/15 * * * *</code> - Alle 15 Minuten</div>
<div><code>0 0 1 * *</code> - Am ersten Tag jedes Monats</div>
<div><code>0 0 1 * *</code> - Erster Tag jedes Monats</div>
</div>
</Tab>
</Tabs>
## Zeitpläne konfigurieren
## Aktivierung
Wenn ein Workflow geplant ist:
- Der Zeitplan wird **aktiv** und zeigt die nächste Ausführungszeit an
- Klicken Sie auf die Schaltfläche **"Geplant"**, um den Zeitplan zu deaktivieren
- Zeitpläne werden nach **3 aufeinanderfolgenden Fehlern** automatisch deaktiviert
Zeitpläne sind an die Workflow-Bereitstellung gebunden:
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-2.png"
alt="Aktiver Zeitplan-Block"
width={500}
height={400}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Deaktivierter Zeitplan"
width={500}
height={350}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Deaktivierter Zeitplan"
width={500}
height={400}
className="my-6"
/>
</div>
Deaktivierte Zeitpläne zeigen an, wann sie zuletzt aktiv waren. Klicken Sie auf das **"Deaktiviert"**-Badge, um den Zeitplan wieder zu aktivieren.
- **Workflow bereitstellen** → Zeitplan wird aktiv und beginnt mit der Ausführung
- **Workflow-Bereitstellung aufheben** → Zeitplan wird entfernt
- **Workflow erneut bereitstellen** → Zeitplan wird mit aktueller Konfiguration neu erstellt
<Callout>
Zeitplan-Blöcke können keine eingehenden Verbindungen empfangen und dienen ausschließlich als Workflow-Auslöser.
Sie müssen Ihren Workflow bereitstellen, damit der Zeitplan mit der Ausführung beginnt. Konfigurieren Sie den Zeitplan-Block und stellen Sie ihn dann über die Symbolleiste bereit.
</Callout>
## Automatische Deaktivierung
Zeitpläne werden nach **10 aufeinanderfolgenden Fehlschlägen** automatisch deaktiviert, um unkontrollierte Fehler zu verhindern. Bei Deaktivierung:
- Erscheint ein Warnhinweis auf dem Zeitplan-Block
- Die Ausführung des Zeitplans wird gestoppt
- Klicken Sie auf den Hinweis, um den Zeitplan zu reaktivieren
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Deaktivierter Zeitplan"
width={500}
height={400}
className="my-6"
/>
</div>
<Callout>
Zeitplan-Blöcke können keine eingehenden Verbindungen empfangen und dienen ausschließlich als Workflow-Einstiegspunkte.
</Callout>

View File

@@ -48,40 +48,40 @@ The model breakdown shows:
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
<Tab>
**Hosted Models** - Sim provides API keys with a 2.5x pricing multiplier:
**Hosted Models** - Sim provides API keys with a 2x pricing multiplier:
**OpenAI**
| Model | Base Price (Input/Output) | Hosted Price (Input/Output) |
|-------|---------------------------|----------------------------|
| GPT-5.1 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.63 / $5.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.13 / $1.00 |
| GPT-4o | $2.50 / $10.00 | $6.25 / $25.00 |
| GPT-4.1 | $2.00 / $8.00 | $5.00 / $20.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $1.00 / $4.00 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.25 / $1.00 |
| o1 | $15.00 / $60.00 | $37.50 / $150.00 |
| o3 | $2.00 / $8.00 | $5.00 / $20.00 |
| o4 Mini | $1.10 / $4.40 | $2.75 / $11.00 |
| GPT-5.1 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.50 / $4.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.10 / $0.80 |
| GPT-4o | $2.50 / $10.00 | $5.00 / $20.00 |
| GPT-4.1 | $2.00 / $8.00 | $4.00 / $16.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $0.80 / $3.20 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.20 / $0.80 |
| o1 | $15.00 / $60.00 | $30.00 / $120.00 |
| o3 | $2.00 / $8.00 | $4.00 / $16.00 |
| o4 Mini | $1.10 / $4.40 | $2.20 / $8.80 |
**Anthropic**
| Model | Base Price (Input/Output) | Hosted Price (Input/Output) |
|-------|---------------------------|----------------------------|
| Claude Opus 4.5 | $5.00 / $25.00 | $12.50 / $62.50 |
| Claude Opus 4.1 | $15.00 / $75.00 | $37.50 / $187.50 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.50 / $12.50 |
| Claude Opus 4.5 | $5.00 / $25.00 | $10.00 / $50.00 |
| Claude Opus 4.1 | $15.00 / $75.00 | $30.00 / $150.00 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.00 / $10.00 |
**Google**
| Model | Base Price (Input/Output) | Hosted Price (Input/Output) |
|-------|---------------------------|----------------------------|
| Gemini 3 Pro Preview | $2.00 / $12.00 | $5.00 / $30.00 |
| Gemini 2.5 Pro | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 2.5 Flash | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 3 Pro Preview | $2.00 / $12.00 | $4.00 / $24.00 |
| Gemini 2.5 Pro | $1.25 / $10.00 | $2.50 / $20.00 |
| Gemini 2.5 Flash | $0.30 / $2.50 | $0.60 / $5.00 |
*The 2.5x multiplier covers infrastructure and API management costs.*
*The 2x multiplier covers infrastructure and API management costs.*
</Tab>
<Tab>
@@ -183,7 +183,7 @@ Different subscription plans have different usage limits:
| Plan | Monthly Usage Limit | Rate Limits (per minute) |
|------|-------------------|-------------------------|
| **Free** | $10 | 5 sync, 10 async |
| **Free** | $20 | 5 sync, 10 async |
| **Pro** | $100 | 10 sync, 50 async |
| **Team** | $500 (pooled) | 50 sync, 100 async |
| **Enterprise** | Custom | Custom |

View File

@@ -34,9 +34,15 @@ Once your documents are processed, you can view and edit the individual chunks.
<Image src="/static/knowledgebase/knowledgebase.png" alt="Document chunks view showing processed content" width={800} height={500} />
### Chunk Configuration
- **Default chunk size**: 1,024 characters
- **Configurable range**: 100-4,000 characters per chunk
- **Smart overlap**: 200 characters by default for context preservation
When creating a knowledge base, you can configure how documents are split into chunks:
| Setting | Unit | Default | Range | Description |
|---------|------|---------|-------|-------------|
| **Max Chunk Size** | tokens | 1,024 | 100-4,000 | Maximum size of each chunk (1 token ≈ 4 characters) |
| **Min Chunk Size** | characters | 1 | 1-2,000 | Minimum chunk size to avoid tiny fragments |
| **Overlap** | characters | 200 | 0-500 | Context overlap between consecutive chunks |
- **Hierarchical splitting**: Respects document structure (sections, paragraphs, sentences)
### Editing Capabilities

View File

@@ -0,0 +1,64 @@
---
title: Circleback
description: AI-powered meeting notes and action items
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="circleback"
color="linear-gradient(180deg, #E0F7FA 0%, #FFFFFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Circleback](https://circleback.ai/) is an AI-powered platform that automates meeting notes, action items, transcripts, and recordings for your team. When a meeting is completed, Circleback processes the conversation and provides detailed notes and action items, along with a transcript and a recording (when available). This helps teams efficiently capture insights, distribute action items, and ensure nothing is missed—all seamlessly integrated into your workflows.
With the Sim Circleback integration, you can:
- **Receive detailed meeting notes and action items**: Automatically collect well-formatted meeting summaries and track actionable tasks discussed during your calls.
- **Access complete meeting recordings and transcripts**: Get the full conversation and the associated recording, making it easy to review key moments or share with colleagues.
- **Capture attendee information and meeting context**: Attendee lists, meeting metadata, and tags help keep your data organized and actionable.
- **Deliver insights directly into your workflows**: Trigger automations or send Circleback data to other systems the moment a meeting is done, using Sims powerful webhook triggers.
**How it works in Sim:**
Circleback uses webhook triggers: whenever a meeting is processed, data is pushed automatically to your agent or automation. You can build further automations based on:
- Meeting completed (all processed data available)
- New notes (notes ready even before full meeting is processed)
- Raw webhook integration for advanced use cases
**The following information is available in the Circleback meeting webhook payload:**
| Field | Type | Description |
|----------------|---------|----------------------------------------------------|
| `id` | number | Circleback meeting ID |
| `name` | string | Meeting title |
| `url` | string | Virtual meeting URL (Zoom, Meet, Teams, etc.) |
| `createdAt` | string | Meeting creation timestamp |
| `duration` | number | Duration in seconds |
| `recordingUrl` | string | Recording URL (valid 24 hours) |
| `tags` | json | Array of tags |
| `icalUid` | string | Calendar event ID |
| `attendees` | json | Array of attendee objects |
| `notes` | string | Meeting notes in Markdown |
| `actionItems` | json | Array of action items |
| `transcript` | json | Array of transcript segments |
| `insights` | json | User-created insights |
| `meeting` | json | Full meeting payload |
Whether you want to distribute instant summaries, log action items, or build custom workflows triggered by new meeting data, Circleback and Sim make it seamless to handle everything related to your meetings—automatically.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Receive meeting notes, action items, transcripts, and recordings when meetings are processed. Circleback uses webhooks to push data to your workflows.
## Notes
- Category: `triggers`
- Type: `circleback`

View File

@@ -0,0 +1,223 @@
---
title: Grain
description: Access meeting recordings, transcripts, and AI summaries
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="grain"
color="#F6FAF9"
/>
{/* MANUAL-CONTENT-START:intro */}
[Grain](https://grain.com/) is a modern platform for capturing, storing, and sharing meeting recordings, transcripts, highlights, and AI-powered summaries. Grain enables teams to turn conversations into actionable insights and keep everyone aligned on key moments from meetings.
With Grain, you can:
- **Access searchable recordings and transcripts**: Find and review every meeting by keyword, participant, or topic.
- **Share highlights and clips**: Capture important moments and share short video/audio highlights across your team or workflows.
- **Get AI-generated summaries**: Automatically produce meeting summaries, action items, and key insights using Grains advanced AI.
- **Organize meetings by team or type**: Tag and categorize recordings for easy access and reporting.
The Sim Grain integration empowers your agents to:
- List, search, and retrieve meeting recordings and details by flexible filters (datetime, participant, team, etc).
- Access AI summaries, participants, highlights, and other metadata for meetings to power automations or analysis.
- Trigger workflows whenever new meetings are processed, summaries are generated, or highlights are created via Grain webhooks.
- Easily bridge Grain data into other tools or notify teammates the moment something important happens in a meeting.
Whether you want to automate follow-up actions, keep records of important conversations, or surface insights across your organization, Grain and Sim make it easy to connect meeting intelligence to your workflows.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Grain into your workflow. Access meeting recordings, transcripts, highlights, and AI-generated summaries. Can also trigger workflows based on Grain webhook events.
## Tools
### `grain_list_recordings`
List recordings from Grain with optional filters and pagination
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
| `cursor` | string | No | Pagination cursor for next page |
| `beforeDatetime` | string | No | Only recordings before this ISO8601 timestamp |
| `afterDatetime` | string | No | Only recordings after this ISO8601 timestamp |
| `participantScope` | string | No | Filter: "internal" or "external" |
| `titleSearch` | string | No | Search term to filter by recording title |
| `teamId` | string | No | Filter by team UUID |
| `meetingTypeId` | string | No | Filter by meeting type UUID |
| `includeHighlights` | boolean | No | Include highlights/clips in response |
| `includeParticipants` | boolean | No | Include participant list in response |
| `includeAiSummary` | boolean | No | Include AI-generated summary |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `recordings` | array | Array of recording objects |
### `grain_get_recording`
Get details of a single recording by ID
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
| `recordingId` | string | Yes | The recording UUID |
| `includeHighlights` | boolean | No | Include highlights/clips |
| `includeParticipants` | boolean | No | Include participant list |
| `includeAiSummary` | boolean | No | Include AI summary |
| `includeCalendarEvent` | boolean | No | Include calendar event data |
| `includeHubspot` | boolean | No | Include HubSpot associations |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Recording UUID |
| `title` | string | Recording title |
| `start_datetime` | string | ISO8601 start timestamp |
| `end_datetime` | string | ISO8601 end timestamp |
| `duration_ms` | number | Duration in milliseconds |
| `media_type` | string | audio, transcript, or video |
| `source` | string | Recording source \(zoom, meet, teams, etc.\) |
| `url` | string | URL to view in Grain |
| `thumbnail_url` | string | Thumbnail image URL |
| `tags` | array | Array of tag strings |
| `teams` | array | Teams the recording belongs to |
| `meeting_type` | object | Meeting type info \(id, name, scope\) |
| `highlights` | array | Highlights \(if included\) |
| `participants` | array | Participants \(if included\) |
| `ai_summary` | object | AI summary text \(if included\) |
| `calendar_event` | object | Calendar event data \(if included\) |
| `hubspot` | object | HubSpot associations \(if included\) |
### `grain_get_transcript`
Get the full transcript of a recording
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
| `recordingId` | string | Yes | The recording UUID |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `transcript` | array | Array of transcript sections |
### `grain_list_teams`
List all teams in the workspace
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `teams` | array | Array of team objects |
### `grain_list_meeting_types`
List all meeting types in the workspace
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `meeting_types` | array | Array of meeting type objects |
### `grain_create_hook`
Create a webhook to receive recording events
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
| `hookUrl` | string | Yes | Webhook endpoint URL \(must respond 2xx\) |
| `filterBeforeDatetime` | string | No | Filter: recordings before this date |
| `filterAfterDatetime` | string | No | Filter: recordings after this date |
| `filterParticipantScope` | string | No | Filter: "internal" or "external" |
| `filterTeamId` | string | No | Filter: specific team UUID |
| `filterMeetingTypeId` | string | No | Filter: specific meeting type |
| `includeHighlights` | boolean | No | Include highlights in webhook payload |
| `includeParticipants` | boolean | No | Include participants in webhook payload |
| `includeAiSummary` | boolean | No | Include AI summary in webhook payload |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Hook UUID |
| `enabled` | boolean | Whether hook is active |
| `hook_url` | string | The webhook URL |
| `filter` | object | Applied filters |
| `include` | object | Included fields |
| `inserted_at` | string | ISO8601 creation timestamp |
### `grain_list_hooks`
List all webhooks for the account
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `hooks` | array | Array of hook objects |
### `grain_delete_hook`
Delete a webhook by ID
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Grain API key \(Personal Access Token\) |
| `hookId` | string | Yes | The hook UUID to delete |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | True when webhook was successfully deleted |
## Notes
- Category: `tools`
- Type: `grain`

View File

@@ -41,6 +41,7 @@ Create a new contact in Intercom with email, external_id, or role
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `role` | string | No | The role of the contact. Accepts 'user' or 'lead'. Defaults to 'lead' if not specified. |
| `email` | string | No | The contact's email address |
| `external_id` | string | No | A unique identifier for the contact provided by the client |
| `phone` | string | No | The contact's phone number |
@@ -51,6 +52,7 @@ Create a new contact in Intercom with email, external_id, or role
| `owner_id` | string | No | The id of an admin that has been assigned account ownership of the contact |
| `unsubscribed_from_emails` | boolean | No | Whether the contact is unsubscribed from emails |
| `custom_attributes` | string | No | Custom attributes as JSON object \(e.g., \{"attribute_name": "value"\}\) |
| `company_id` | string | No | Company ID to associate the contact with during creation |
#### Output
@@ -85,6 +87,8 @@ Update an existing contact in Intercom
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `contactId` | string | Yes | Contact ID to update |
| `role` | string | No | The role of the contact. Accepts 'user' or 'lead'. |
| `external_id` | string | No | A unique identifier for the contact provided by the client |
| `email` | string | No | The contact's email address |
| `phone` | string | No | The contact's phone number |
| `name` | string | No | The contact's name |
@@ -94,6 +98,7 @@ Update an existing contact in Intercom
| `owner_id` | string | No | The id of an admin that has been assigned account ownership of the contact |
| `unsubscribed_from_emails` | boolean | No | Whether the contact is unsubscribed from emails |
| `custom_attributes` | string | No | Custom attributes as JSON object \(e.g., \{"attribute_name": "value"\}\) |
| `company_id` | string | No | Company ID to associate the contact with |
#### Output
@@ -131,6 +136,8 @@ Search for contacts in Intercom using a query
| `query` | string | Yes | Search query \(e.g., \{"field":"email","operator":"=","value":"user@example.com"\}\) |
| `per_page` | number | No | Number of results per page \(max: 150\) |
| `starting_after` | string | No | Cursor for pagination |
| `sort_field` | string | No | Field to sort by \(e.g., "name", "created_at", "last_seen_at"\) |
| `sort_order` | string | No | Sort order: "ascending" or "descending" |
#### Output
@@ -172,6 +179,7 @@ Create or update a company in Intercom
| `industry` | string | No | The industry the company operates in |
| `monthly_spend` | number | No | How much revenue the company generates for your business. Note: This field truncates floats to whole integers \(e.g., 155.98 becomes 155\) |
| `custom_attributes` | string | No | Custom attributes as JSON object |
| `remote_created_at` | number | No | The time the company was created by you as a Unix timestamp |
#### Output
@@ -207,6 +215,7 @@ List all companies from Intercom with pagination support. Note: This endpoint ha
| --------- | ---- | -------- | ----------- |
| `per_page` | number | No | Number of results per page |
| `page` | number | No | Page number |
| `starting_after` | string | No | Cursor for pagination \(preferred over page-based pagination\) |
#### Output
@@ -225,6 +234,7 @@ Retrieve a single conversation by ID from Intercom
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Yes | Conversation ID to retrieve |
| `display_as` | string | No | Set to "plaintext" to retrieve messages in plain text |
| `include_translations` | boolean | No | When true, conversation parts will be translated to the detected language of the conversation |
#### Output
@@ -243,6 +253,8 @@ List all conversations from Intercom with pagination support
| --------- | ---- | -------- | ----------- |
| `per_page` | number | No | Number of results per page \(max: 150\) |
| `starting_after` | string | No | Cursor for pagination |
| `sort` | string | No | Field to sort by \(e.g., "waiting_since", "updated_at", "created_at"\) |
| `order` | string | No | Sort order: "asc" \(ascending\) or "desc" \(descending\) |
#### Output
@@ -264,6 +276,7 @@ Reply to a conversation as an admin in Intercom
| `body` | string | Yes | The text body of the reply |
| `admin_id` | string | No | The ID of the admin authoring the reply. If not provided, a default admin \(Operator/Fin\) will be used. |
| `attachment_urls` | string | No | Comma-separated list of image URLs \(max 10\) |
| `created_at` | number | No | Unix timestamp for when the reply was created. If not provided, current time is used. |
#### Output
@@ -283,6 +296,8 @@ Search for conversations in Intercom using a query
| `query` | string | Yes | Search query as JSON object |
| `per_page` | number | No | Number of results per page \(max: 150\) |
| `starting_after` | string | No | Cursor for pagination |
| `sort_field` | string | No | Field to sort by \(e.g., "created_at", "updated_at"\) |
| `sort_order` | string | No | Sort order: "ascending" or "descending" |
#### Output
@@ -302,6 +317,10 @@ Create a new ticket in Intercom
| `ticket_type_id` | string | Yes | The ID of the ticket type |
| `contacts` | string | Yes | JSON array of contact identifiers \(e.g., \[\{"id": "contact_id"\}\]\) |
| `ticket_attributes` | string | Yes | JSON object with ticket attributes including _default_title_ and _default_description_ |
| `company_id` | string | No | Company ID to associate the ticket with |
| `created_at` | number | No | Unix timestamp for when the ticket was created. If not provided, current time is used. |
| `conversation_to_link_id` | string | No | ID of an existing conversation to link to this ticket |
| `disable_notifications` | boolean | No | When true, suppresses notifications when the ticket is created |
#### Output
@@ -335,13 +354,15 @@ Create and send a new admin-initiated message in Intercom
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `message_type` | string | Yes | Message type: "inapp" or "email" |
| `message_type` | string | Yes | Message type: "inapp" for in-app messages or "email" for email messages |
| `template` | string | Yes | Message template style: "plain" for plain text or "personal" for personalized style |
| `subject` | string | No | The subject of the message \(for email type\) |
| `body` | string | Yes | The body of the message |
| `from_type` | string | Yes | Sender type: "admin" |
| `from_id` | string | Yes | The ID of the admin sending the message |
| `to_type` | string | Yes | Recipient type: "contact" |
| `to_id` | string | Yes | The ID of the contact receiving the message |
| `created_at` | number | No | Unix timestamp for when the message was created. If not provided, current time is used. |
#### Output

View File

@@ -64,8 +64,6 @@ Extract and process web content into clean, LLM-friendly text using Jina AI Read
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | The extracted content from the URL, processed into clean, LLM-friendly text |
| `links` | array | List of links found on the page \(when gatherLinks or withLinksummary is enabled\) |
| `images` | array | List of images found on the page \(when withImagesummary is enabled\) |
### `jina_search`

View File

@@ -26,11 +26,10 @@ Add a new memory to the database or append to existing memory with the same ID.
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | No | Conversation identifier \(e.g., user-123, session-abc\). If a memory with this conversationId already exists for this block, the new message will be appended to it. |
| `conversationId` | string | No | Conversation identifier \(e.g., user-123, session-abc\). If a memory with this conversationId already exists, the new message will be appended to it. |
| `id` | string | No | Legacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility. |
| `role` | string | Yes | Role for agent memory \(user, assistant, or system\) |
| `content` | string | Yes | Content for agent memory |
| `blockId` | string | No | Optional block ID. If not provided, uses the current block ID from execution context, or defaults to "default". |
#### Output
@@ -42,23 +41,21 @@ Add a new memory to the database or append to existing memory with the same ID.
### `memory_get`
Retrieve memory by conversationId, blockId, blockName, or a combination. Returns all matching memories.
Retrieve memory by conversationId. Returns matching memories.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | No | Conversation identifier \(e.g., user-123, session-abc\). If provided alone, returns all memories for this conversation across all blocks. |
| `conversationId` | string | No | Conversation identifier \(e.g., user-123, session-abc\). Returns memories for this conversation. |
| `id` | string | No | Legacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility. |
| `blockId` | string | No | Block identifier. If provided alone, returns all memories for this block across all conversations. If provided with conversationId, returns memories for that specific conversation in this block. |
| `blockName` | string | No | Block name. Alternative to blockId. If provided alone, returns all memories for blocks with this name. If provided with conversationId, returns memories for that conversation in blocks with this name. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the memory was retrieved successfully |
| `memories` | array | Array of memory objects with conversationId, blockId, blockName, and data fields |
| `memories` | array | Array of memory objects with conversationId and data fields |
| `message` | string | Success or error message |
| `error` | string | Error message if operation failed |
@@ -76,22 +73,20 @@ Retrieve all memories from the database
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether all memories were retrieved successfully |
| `memories` | array | Array of all memory objects with key, conversationId, blockId, blockName, and data fields |
| `memories` | array | Array of all memory objects with key, conversationId, and data fields |
| `message` | string | Success or error message |
| `error` | string | Error message if operation failed |
### `memory_delete`
Delete memories by conversationId, blockId, blockName, or a combination. Supports bulk deletion.
Delete memories by conversationId.
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | No | Conversation identifier \(e.g., user-123, session-abc\). If provided alone, deletes all memories for this conversation across all blocks. |
| `conversationId` | string | No | Conversation identifier \(e.g., user-123, session-abc\). Deletes all memories for this conversation. |
| `id` | string | No | Legacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility. |
| `blockId` | string | No | Block identifier. If provided alone, deletes all memories for this block across all conversations. If provided with conversationId, deletes memories for that specific conversation in this block. |
| `blockName` | string | No | Block name. Alternative to blockId. If provided alone, deletes all memories for blocks with this name. If provided with conversationId, deletes memories for that conversation in blocks with this name. |
#### Output

View File

@@ -9,6 +9,7 @@
"asana",
"browser_use",
"calendly",
"circleback",
"clay",
"confluence",
"cursor",
@@ -35,6 +36,7 @@
"google_slides",
"google_vault",
"grafana",
"grain",
"hubspot",
"huggingface",
"hunter",

View File

@@ -52,6 +52,7 @@ Query data from a Supabase table
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to query |
| `schema` | string | No | Database schema to query from \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | No | PostgREST filter \(e.g., "id=eq.123"\) |
| `orderBy` | string | No | Column to order by \(add DESC for descending\) |
| `limit` | number | No | Maximum number of rows to return |
@@ -74,6 +75,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 |
| `schema` | string | No | Database schema to insert into \(default: public\). Use this to access tables in other schemas. |
| `data` | array | Yes | The data to insert \(array of objects or a single object\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
@@ -94,6 +96,7 @@ Get a single row from a Supabase table based on filter criteria
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to query |
| `schema` | string | No | Database schema to query from \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | Yes | PostgREST filter to find the specific row \(e.g., "id=eq.123"\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
@@ -114,6 +117,7 @@ Update rows in a Supabase table based on filter criteria
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to update |
| `schema` | string | No | Database schema to update in \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | Yes | PostgREST filter to identify rows to update \(e.g., "id=eq.123"\) |
| `data` | object | Yes | Data to update in the matching rows |
| `apiKey` | string | Yes | Your Supabase service role secret key |
@@ -135,6 +139,7 @@ Delete rows from a Supabase table based on filter criteria
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to delete from |
| `schema` | string | No | Database schema to delete from \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | Yes | PostgREST filter to identify rows to delete \(e.g., "id=eq.123"\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
@@ -155,6 +160,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 |
| `schema` | string | No | Database schema to upsert into \(default: public\). Use this to access tables in other schemas. |
| `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 |
@@ -175,6 +181,7 @@ Count rows in a Supabase table
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to count rows from |
| `schema` | string | No | Database schema to count from \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | No | PostgREST filter \(e.g., "status=eq.active"\) |
| `countType` | string | No | Count type: exact, planned, or estimated \(default: exact\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
@@ -196,6 +203,7 @@ Perform full-text search on a Supabase table
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to search |
| `schema` | string | No | Database schema to search in \(default: public\). Use this to access tables in other schemas. |
| `column` | string | Yes | The column to search in |
| `query` | string | Yes | The search query |
| `searchType` | string | No | Search type: plain, phrase, or websearch \(default: websearch\) |

View File

@@ -52,6 +52,7 @@ Send a chat completion request to any supported LLM provider
| `azureApiVersion` | string | No | Azure OpenAI API version |
| `vertexProject` | string | No | Google Cloud project ID for Vertex AI |
| `vertexLocation` | string | No | Google Cloud location for Vertex AI \(defaults to us-central1\) |
| `vertexCredential` | string | No | Google Cloud OAuth credential ID for Vertex AI |
#### Output

View File

@@ -5,7 +5,6 @@ title: Schedule
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
The Schedule block automatically triggers workflows on a recurring schedule at specified intervals or times.
@@ -21,16 +20,16 @@ The Schedule block automatically triggers workflows on a recurring schedule at s
## Schedule Options
Configure when your workflow runs using the dropdown options:
Configure when your workflow runs:
<Tabs items={['Simple Intervals', 'Cron Expressions']}>
<Tab>
<ul className="list-disc space-y-1 pl-6">
<li><strong>Every few minutes</strong>: 5, 15, 30 minute intervals</li>
<li><strong>Hourly</strong>: Every hour or every few hours</li>
<li><strong>Daily</strong>: Once or multiple times per day</li>
<li><strong>Weekly</strong>: Specific days of the week</li>
<li><strong>Monthly</strong>: Specific days of the month</li>
<li><strong>Every X Minutes</strong>: Run at minute intervals (1-1440)</li>
<li><strong>Hourly</strong>: Run at a specific minute each hour</li>
<li><strong>Daily</strong>: Run at a specific time each day</li>
<li><strong>Weekly</strong>: Run on a specific day and time each week</li>
<li><strong>Monthly</strong>: Run on a specific day and time each month</li>
</ul>
</Tab>
<Tab>
@@ -43,24 +42,25 @@ Configure when your workflow runs using the dropdown options:
</Tab>
</Tabs>
## Configuring Schedules
## Activation
When a workflow is scheduled:
- The schedule becomes **active** and shows the next execution time
- Click the **"Scheduled"** button to deactivate the schedule
- Schedules automatically deactivate after **3 consecutive failures**
Schedules are tied to workflow deployment:
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-2.png"
alt="Active Schedule Block"
width={500}
height={400}
className="my-6"
/>
</div>
- **Deploy workflow** → Schedule becomes active and starts running
- **Undeploy workflow** → Schedule is removed
- **Redeploy workflow** → Schedule is recreated with current configuration
## Disabled Schedules
<Callout>
You must deploy your workflow for the schedule to start running. Configure the schedule block, then deploy from the toolbar.
</Callout>
## Automatic Disabling
Schedules automatically disable after **10 consecutive failures** to prevent runaway errors. When disabled:
- A warning badge appears on the schedule block
- The schedule stops executing
- Click the badge to reactivate the schedule
<div className="flex justify-center">
<Image
@@ -72,8 +72,6 @@ When a workflow is scheduled:
/>
</div>
Disabled schedules show when they were last active. Click the **"Disabled"** badge to reactivate the schedule.
<Callout>
Schedule blocks cannot receive incoming connections and serve as pure workflow triggers.
</Callout>
Schedule blocks cannot receive incoming connections and serve as workflow entry points only.
</Callout>

View File

@@ -47,42 +47,42 @@ El desglose del modelo muestra:
## Opciones de precios
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
<Tabs items={['Modelos alojados', 'Trae tu propia clave API']}>
<Tab>
**Modelos alojados** - Sim proporciona claves API con un multiplicador de precio de 2.5x:
**Modelos alojados** - Sim proporciona claves API con un multiplicador de precio de 2x:
**OpenAI**
| Modelo | Precio base (Entrada/Salida) | Precio alojado (Entrada/Salida) |
| Modelo | Precio base (entrada/salida) | Precio alojado (entrada/salida) |
|-------|---------------------------|----------------------------|
| GPT-5.1 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.63 / $5.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.13 / $1.00 |
| GPT-4o | $2.50 / $10.00 | $6.25 / $25.00 |
| GPT-4.1 | $2.00 / $8.00 | $5.00 / $20.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $1.00 / $4.00 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.25 / $1.00 |
| o1 | $15.00 / $60.00 | $37.50 / $150.00 |
| o3 | $2.00 / $8.00 | $5.00 / $20.00 |
| o4 Mini | $1.10 / $4.40 | $2.75 / $11.00 |
| GPT-5.1 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.50 / $4.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.10 / $0.80 |
| GPT-4o | $2.50 / $10.00 | $5.00 / $20.00 |
| GPT-4.1 | $2.00 / $8.00 | $4.00 / $16.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $0.80 / $3.20 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.20 / $0.80 |
| o1 | $15.00 / $60.00 | $30.00 / $120.00 |
| o3 | $2.00 / $8.00 | $4.00 / $16.00 |
| o4 Mini | $1.10 / $4.40 | $2.20 / $8.80 |
**Anthropic**
| Modelo | Precio base (Entrada/Salida) | Precio alojado (Entrada/Salida) |
| Modelo | Precio base (entrada/salida) | Precio alojado (entrada/salida) |
|-------|---------------------------|----------------------------|
| Claude Opus 4.5 | $5.00 / $25.00 | $12.50 / $62.50 |
| Claude Opus 4.1 | $15.00 / $75.00 | $37.50 / $187.50 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.50 / $12.50 |
| Claude Opus 4.5 | $5.00 / $25.00 | $10.00 / $50.00 |
| Claude Opus 4.1 | $15.00 / $75.00 | $30.00 / $150.00 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.00 / $10.00 |
**Google**
| Modelo | Precio base (Entrada/Salida) | Precio alojado (Entrada/Salida) |
| Modelo | Precio base (entrada/salida) | Precio alojado (entrada/salida) |
|-------|---------------------------|----------------------------|
| Gemini 3 Pro Preview | $2.00 / $12.00 | $5.00 / $30.00 |
| Gemini 2.5 Pro | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 2.5 Flash | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 3 Pro Preview | $2.00 / $12.00 | $4.00 / $24.00 |
| Gemini 2.5 Pro | $1.25 / $10.00 | $2.50 / $20.00 |
| Gemini 2.5 Flash | $0.30 / $2.50 | $0.60 / $5.00 |
*El multiplicador de 2.5x cubre los costos de infraestructura y gestión de API.*
*El multiplicador 2x cubre los costos de infraestructura y gestión de API.*
</Tab>
<Tab>
@@ -187,10 +187,10 @@ Los diferentes planes de suscripción tienen diferentes límites de uso:
| Plan | Límite de uso mensual | Límites de tasa (por minuto) |
|------|-------------------|-------------------------|
| **Gratuito** | $10 | 5 sincrónico, 10 asincrónico |
| **Pro** | $100 | 10 sincrónico, 50 asincrónico |
| **Equipo** | $500 (agrupado) | 50 sincrónico, 100 asincrónico |
| **Empresa** | Personalizado | Personalizado |
| **Gratis** | $20 | 5 síncronas, 10 asíncronas |
| **Pro** | $100 | 10 síncronas, 50 asíncronas |
| **Equipo** | $500 (compartido) | 50 síncronas, 100 asíncronas |
| **Empresarial** | Personalizado | Personalizado |
## Modelo de facturación

View File

@@ -35,81 +35,87 @@ Una vez que tus documentos están procesados, puedes ver y editar los fragmentos
<Image src="/static/knowledgebase/knowledgebase.png" alt="Vista de fragmentos de documentos mostrando contenido procesado" width={800} height={500} />
### Configuración de fragmentos
- **Tamaño predeterminado del fragmento**: 1.024 caracteres
- **Rango configurable**: 100-4.000 caracteres por fragmento
- **Superposición inteligente**: 200 caracteres por defecto para preservar el contexto
- **División jerárquica**: Respeta la estructura del documento (secciones, párrafos, oraciones)
Al crear una base de conocimiento, puedes configurar cómo se dividen los documentos en fragmentos:
| Configuración | Unidad | Predeterminado | Rango | Descripción |
|---------|------|---------|-------|-------------|
| **Tamaño máximo de fragmento** | tokens | 1.024 | 100-4.000 | Tamaño máximo de cada fragmento (1 token ≈ 4 caracteres) |
| **Tamaño mínimo de fragmento** | caracteres | 1 | 1-2.000 | Tamaño mínimo de fragmento para evitar fragmentos diminutos |
| **Superposición** | caracteres | 200 | 0-500 | Superposición de contexto entre fragmentos consecutivos |
- **División jerárquica**: respeta la estructura del documento (secciones, párrafos, oraciones)
### Capacidades de edición
- **Editar contenido de fragmentos**: Modificar el contenido de texto de fragmentos individuales
- **Ajustar límites de fragmentos**: Fusionar o dividir fragmentos según sea necesario
- **Añadir metadatos**: Mejorar fragmentos con contexto adicional
- **Operaciones masivas**: Gestionar múltiples fragmentos de manera eficiente
- **Editar contenido de fragmentos**: modifica el contenido de texto de fragmentos individuales
- **Ajustar límites de fragmentos**: combina o divide fragmentos según sea necesario
- **Añadir metadatos**: mejora los fragmentos con contexto adicional
- **Operaciones masivas**: gestiona múltiples fragmentos de manera eficiente
## Procesamiento avanzado de PDF
Para documentos PDF, Sim ofrece capacidades de procesamiento mejoradas:
### Soporte OCR
### Compatibilidad con OCR
Cuando se configura con Azure o [Mistral OCR](https://docs.mistral.ai/ocr/):
- **Procesamiento de documentos escaneados**: Extraer texto de PDFs basados en imágenes
- **Manejo de contenido mixto**: Procesar PDFs con texto e imágenes
- **Alta precisión**: Modelos avanzados de IA aseguran una extracción precisa del texto
- **Procesamiento de documentos escaneados**: extrae texto de PDF basados en imágenes
- **Manejo de contenido mixto**: procesa PDF con texto e imágenes
- **Alta precisión**: los modelos de IA avanzados garantizan una extracción de texto precisa
## Uso del bloque de conocimiento en flujos de trabajo
Una vez que tus documentos son procesados, puedes utilizarlos en tus flujos de trabajo de IA a través del bloque de Conocimiento. Esto permite la Generación Aumentada por Recuperación (RAG), permitiendo a tus agentes de IA acceder y razonar sobre el contenido de tus documentos para proporcionar respuestas más precisas y contextuales.
Una vez que tus documentos estén procesados, puedes usarlos en tus flujos de trabajo de IA a través del bloque de conocimiento. Esto habilita la generación aumentada por recuperación (RAG), permitiendo que tus agentes de IA accedan y razonen sobre el contenido de tus documentos para proporcionar respuestas más precisas y contextuales.
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="Uso del bloque de conocimiento en flujos de trabajo" width={800} height={500} />
### Características del bloque de conocimiento
- **Búsqueda semántica**: Encontrar contenido relevante usando consultas en lenguaje natural
- **Integración de contexto**: Incluir automáticamente fragmentos relevantes en los prompts del agente
- **Recuperación dinámica**: La búsqueda ocurre en tiempo real durante la ejecución del flujo de trabajo
- **Puntuación de relevancia**: Resultados clasificados por similitud semántica
- **Búsqueda semántica**: encuentra contenido relevante usando consultas en lenguaje natural
- **Integración de contexto**: incluye automáticamente fragmentos relevantes en las indicaciones del agente
- **Recuperación dinámica**: la búsqueda ocurre en tiempo real durante la ejecución del flujo de trabajo
- **Puntuación de relevancia**: resultados clasificados por similitud semántica
### Opciones de integración
- **Prompts del sistema**: Proporcionar contexto a tus agentes de IA
- **Contexto dinámico**: Buscar e incluir información relevante durante las conversaciones
- **Búsqueda multi-documento**: Consultar a través de toda tu base de conocimiento
- **Búsqueda filtrada**: Combinar con etiquetas para una recuperación precisa de contenido
- **Prompts del sistema**: proporciona contexto a tus agentes de IA
- **Contexto dinámico**: busca e incluye información relevante durante las conversaciones
- **Búsqueda multidocumento**: consulta en toda tu base de conocimiento
- **Búsqueda filtrada**: combina con etiquetas para una recuperación precisa de contenido
## Tecnología de búsqueda vectorial
Sim utiliza búsqueda vectorial impulsada por [pgvector](https://github.com/pgvector/pgvector) para entender el significado y contexto de tu contenido:
Sim utiliza búsqueda vectorial impulsada por [pgvector](https://github.com/pgvector/pgvector) para comprender el significado y contexto de tu contenido:
### Comprensión semántica
- **Búsqueda contextual**: Encuentra contenido relevante incluso cuando las palabras clave exactas no coinciden
- **Recuperación basada en conceptos**: Comprende las relaciones entre ideas
- **Soporte multilingüe**: Funciona en diferentes idiomas
- **Reconocimiento de sinónimos**: Encuentra términos y conceptos relacionados
- **Búsqueda contextual**: encuentra contenido relevante incluso cuando las palabras clave exactas no coinciden
- **Recuperación basada en conceptos**: comprende las relaciones entre ideas
- **Soporte multiidioma**: funciona en diferentes idiomas
- **Reconocimiento de sinónimos**: encuentra términos y conceptos relacionados
### Capacidades de búsqueda
- **Consultas en lenguaje natural**: Haz preguntas en español simple
- **Búsqueda por similitud**: Encuentra contenido conceptualmente similar
- **Búsqueda híbrida**: Combina búsqueda vectorial y tradicional por palabras clave
- **Resultados configurables**: Controla el número y umbral de relevancia de los resultados
- **Consultas en lenguaje natural**: haz preguntas en lenguaje cotidiano
- **Búsqueda por similitud**: encuentra contenido conceptualmente similar
- **Búsqueda híbrida**: combina búsqueda vectorial y búsqueda tradicional por palabras clave
- **Resultados configurables**: controla el número y el umbral de relevancia de los resultados
## Gestión de documentos
### Características de organización
- **Carga masiva**: Sube múltiples archivos a la vez mediante la API asíncrona
- **Estado de procesamiento**: Actualizaciones en tiempo real sobre el procesamiento de documentos
- **Búsqueda y filtrado**: Encuentra documentos rápidamente en grandes colecciones
- **Seguimiento de metadatos**: Captura automática de información de archivos y detalles de procesamiento
### Funciones de organización
- **Carga masiva**: sube múltiples archivos a la vez mediante la API asíncrona
- **Estado de procesamiento**: actualizaciones en tiempo real sobre el procesamiento de documentos
- **Búsqueda y filtrado**: encuentra documentos rápidamente en colecciones grandes
- **Seguimiento de metadatos**: captura automática de información de archivos y detalles de procesamiento
### Seguridad y privacidad
- **Almacenamiento seguro**: Documentos almacenados con seguridad de nivel empresarial
- **Control de acceso**: Permisos basados en espacios de trabajo
- **Aislamiento de procesamiento**: Cada espacio de trabajo tiene procesamiento de documentos aislado
- **Retención de datos**: Configura políticas de retención de documentos
- **Almacenamiento seguro**: documentos almacenados con seguridad de nivel empresarial
- **Control de acceso**: permisos basados en el espacio de trabajo
- **Aislamiento de procesamiento**: cada espacio de trabajo tiene procesamiento de documentos aislado
- **Retención de datos**: configura políticas de retención de documentos
## Primeros pasos
1. **Navega a tu base de conocimiento**: Accede desde la barra lateral de tu espacio de trabajo
2. **Sube documentos**: Arrastra y suelta o selecciona archivos para subir
3. **Monitorea el procesamiento**: Observa cómo se procesan y dividen los documentos
4. **Explora fragmentos**: Visualiza y edita el contenido procesado
5. **Añade a flujos de trabajo**: Usa el bloque de Conocimiento para integrarlo con tus agentes de IA
1. **Navega a tu base de conocimiento**: accede desde la barra lateral de tu espacio de trabajo
2. **Sube documentos**: arrastra y suelta o selecciona archivos para subir
3. **Monitorea el procesamiento**: observa cómo se procesan y fragmentan los documentos
4. **Explora fragmentos**: visualiza y edita el contenido procesado
5. **Añade a flujos de trabajo**: utiliza el bloque Knowledge para integrar con tus agentes de IA
La base de conocimiento transforma tus documentos estáticos en un recurso inteligente y consultable que tus flujos de trabajo de IA pueden aprovechar para obtener respuestas más informadas y contextuales.
La base de conocimientos transforma tus documentos estáticos en un recurso inteligente y consultable que tus flujos de trabajo de IA pueden aprovechar para obtener respuestas más informadas y contextuales.

View File

@@ -0,0 +1,59 @@
---
title: Circleback
description: Notas de reuniones e ítems de acción impulsados por IA
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="circleback"
color="linear-gradient(180deg, #E0F7FA 0%, #FFFFFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Circleback](https://circleback.ai/) es una plataforma impulsada por IA que automatiza las notas de reuniones, ítems de acción, transcripciones y grabaciones para tu equipo. Cuando se completa una reunión, Circleback procesa la conversación y proporciona notas detalladas e ítems de acción, junto con una transcripción y una grabación (cuando está disponible). Esto ayuda a los equipos a capturar información de manera eficiente, distribuir ítems de acción y asegurar que no se pierda nada, todo integrado sin problemas en tus flujos de trabajo.
Con la integración de Sim Circleback, puedes:
- **Recibir notas detalladas de reuniones e ítems de acción**: Recopila automáticamente resúmenes de reuniones bien formateados y realiza seguimiento de las tareas accionables discutidas durante tus llamadas.
- **Acceder a grabaciones y transcripciones completas de reuniones**: Obtén la conversación completa y la grabación asociada, facilitando la revisión de momentos clave o compartir con colegas.
- **Capturar información de asistentes y contexto de la reunión**: Las listas de asistentes, metadatos de reuniones y etiquetas ayudan a mantener tus datos organizados y accionables.
- **Entregar información directamente en tus flujos de trabajo**: Activa automatizaciones o envía datos de Circleback a otros sistemas en el momento en que finaliza una reunión, usando los potentes activadores webhook de Sim.
**Cómo funciona en Sim:**
Circleback utiliza activadores webhook: cada vez que se procesa una reunión, los datos se envían automáticamente a tu agente o automatización. Puedes crear más automatizaciones basadas en:
- Reunión completada (todos los datos procesados disponibles)
- Nuevas notas (notas listas incluso antes de que se procese la reunión completa)
- Integración webhook sin procesar para casos de uso avanzados
**La siguiente información está disponible en la carga útil del webhook de reunión de Circleback:**
| Campo | Tipo | Descripción |
|----------------|---------|----------------------------------------------------|
| `id` | number | ID de reunión de Circleback |
| `name` | string | Título de la reunión |
| `url` | string | URL de reunión virtual (Zoom, Meet, Teams, etc.) |
| `createdAt` | string | Marca de tiempo de creación de la reunión |
| `duration` | number | Duración en segundos |
| `recordingUrl` | string | URL de grabación (válida 24 horas) |
| `tags` | json | Array de etiquetas |
| `icalUid` | string | ID de evento de calendario |
| `attendees` | json | Array de objetos de asistentes |
| `notes` | string | Notas de la reunión en Markdown |
| `actionItems` | json | Array de elementos de acción |
| `transcript` | json | Array de segmentos de transcripción |
| `insights` | json | Insights creados por el usuario |
| `meeting` | json | Payload completo de la reunión |
Ya sea que quieras distribuir resúmenes instantáneos, registrar elementos de acción o crear flujos de trabajo personalizados activados por nuevos datos de reuniones, Circleback y Sim hacen que sea sencillo manejar todo lo relacionado con tus reuniones, automáticamente.
{/* MANUAL-CONTENT-END */}
## Instrucciones de uso
Recibe notas de reuniones, elementos de acción, transcripciones y grabaciones cuando se procesen las reuniones. Circleback utiliza webhooks para enviar datos a tus flujos de trabajo.
## Notas
- Categoría: `triggers`
- Tipo: `circleback`

View File

@@ -0,0 +1,218 @@
---
title: Grain
description: Accede a grabaciones de reuniones, transcripciones y resúmenes de IA
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="grain"
color="#F6FAF9"
/>
{/* MANUAL-CONTENT-START:intro */}
[Grain](https://grain.com/) es una plataforma moderna para capturar, almacenar y compartir grabaciones de reuniones, transcripciones, momentos destacados y resúmenes generados por IA. Grain permite a los equipos convertir conversaciones en información procesable y mantener a todos alineados con los momentos clave de las reuniones.
Con Grain, puedes:
- **Acceder a grabaciones y transcripciones con búsqueda**: Encuentra y revisa cada reunión por palabra clave, participante o tema.
- **Compartir momentos destacados y clips**: Captura momentos importantes y comparte fragmentos cortos de video/audio en tu equipo o flujos de trabajo.
- **Obtener resúmenes generados por IA**: Produce automáticamente resúmenes de reuniones, elementos de acción e información clave utilizando la IA avanzada de Grain.
- **Organizar reuniones por equipo o tipo**: Etiqueta y categoriza grabaciones para facilitar el acceso y la generación de informes.
La integración de Sim con Grain permite a tus agentes:
- Listar, buscar y recuperar grabaciones de reuniones y detalles mediante filtros flexibles (fecha y hora, participante, equipo, etc.).
- Acceder a resúmenes de IA, participantes, momentos destacados y otros metadatos de reuniones para impulsar automatizaciones o análisis.
- Activar flujos de trabajo cada vez que se procesen nuevas reuniones, se generen resúmenes o se creen momentos destacados a través de webhooks de Grain.
- Conectar fácilmente los datos de Grain con otras herramientas o notificar a los compañeros de equipo en el momento en que sucede algo importante en una reunión.
Ya sea que desees automatizar acciones de seguimiento, mantener registros de conversaciones importantes o destacar información en toda tu organización, Grain y Sim facilitan la conexión de la inteligencia de reuniones con tus flujos de trabajo.
{/* MANUAL-CONTENT-END */}
## Instrucciones de uso
Integra Grain en tu flujo de trabajo. Accede a grabaciones de reuniones, transcripciones, momentos destacados y resúmenes generados por IA. También puede activar flujos de trabajo basados en eventos de webhook de Grain.
## Herramientas
### `grain_list_recordings`
Lista las grabaciones de Grain con filtros opcionales y paginación
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave API de Grain \(token de acceso personal\) |
| `cursor` | string | No | Cursor de paginación para la siguiente página |
| `beforeDatetime` | string | No | Solo grabaciones anteriores a esta marca de tiempo ISO8601 |
| `afterDatetime` | string | No | Solo grabaciones posteriores a esta marca de tiempo ISO8601 |
| `participantScope` | string | No | Filtro: "internal" o "external" |
| `titleSearch` | string | No | Término de búsqueda para filtrar por título de grabación |
| `teamId` | string | No | Filtrar por UUID de equipo |
| `meetingTypeId` | string | No | Filtrar por UUID de tipo de reunión |
| `includeHighlights` | boolean | No | Incluir destacados/clips en la respuesta |
| `includeParticipants` | boolean | No | Incluir lista de participantes en la respuesta |
| `includeAiSummary` | boolean | No | Incluir resumen generado por IA |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `recordings` | array | Array de objetos de grabación |
### `grain_get_recording`
Obtiene los detalles de una única grabación por ID
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave API de Grain \(token de acceso personal\) |
| `recordingId` | string | Sí | El UUID de la grabación |
| `includeHighlights` | boolean | No | Incluir destacados/clips |
| `includeParticipants` | boolean | No | Incluir lista de participantes |
| `includeAiSummary` | boolean | No | Incluir resumen de IA |
| `includeCalendarEvent` | boolean | No | Incluir datos del evento de calendario |
| `includeHubspot` | boolean | No | Incluir asociaciones de HubSpot |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `id` | string | UUID de la grabación |
| `title` | string | Título de la grabación |
| `start_datetime` | string | Marca de tiempo de inicio ISO8601 |
| `end_datetime` | string | Marca de tiempo de finalización ISO8601 |
| `duration_ms` | number | Duración en milisegundos |
| `media_type` | string | audio, transcript o video |
| `source` | string | Fuente de la grabación \(zoom, meet, teams, etc.\) |
| `url` | string | URL para ver en Grain |
| `thumbnail_url` | string | URL de la imagen en miniatura |
| `tags` | array | Array de cadenas de etiquetas |
| `teams` | array | Equipos a los que pertenece la grabación |
| `meeting_type` | object | Información del tipo de reunión \(id, nombre, alcance\) |
| `highlights` | array | Destacados \(si se incluyen\) |
| `participants` | array | Participantes \(si se incluyen\) |
| `ai_summary` | object | Texto del resumen de IA \(si se incluye\) |
| `calendar_event` | object | Datos del evento de calendario \(si se incluyen\) |
| `hubspot` | object | Asociaciones de HubSpot \(si se incluyen\) |
### `grain_get_transcript`
Obtener la transcripción completa de una grabación
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave de API de Grain \(token de acceso personal\) |
| `recordingId` | string | Sí | El UUID de la grabación |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `transcript` | array | Array de secciones de transcripción |
### `grain_list_teams`
Listar todos los equipos en el espacio de trabajo
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave API de Grain \(token de acceso personal\) |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `teams` | array | Array de objetos de equipo |
### `grain_list_meeting_types`
Listar todos los tipos de reunión en el espacio de trabajo
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave API de Grain \(token de acceso personal\) |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `meeting_types` | array | Array de objetos de tipo de reunión |
### `grain_create_hook`
Crear un webhook para recibir eventos de grabación
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave API de Grain \(token de acceso personal\) |
| `hookUrl` | string | Sí | URL del endpoint del webhook \(debe responder 2xx\) |
| `filterBeforeDatetime` | string | No | Filtro: grabaciones antes de esta fecha |
| `filterAfterDatetime` | string | No | Filtro: grabaciones después de esta fecha |
| `filterParticipantScope` | string | No | Filtro: "internal" o "external" |
| `filterTeamId` | string | No | Filtro: UUID de equipo específico |
| `filterMeetingTypeId` | string | No | Filtro: tipo de reunión específico |
| `includeHighlights` | boolean | No | Incluir destacados en la carga del webhook |
| `includeParticipants` | boolean | No | Incluir participantes en la carga del webhook |
| `includeAiSummary` | boolean | No | Incluir resumen de IA en la carga del webhook |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `id` | string | UUID del hook |
| `enabled` | boolean | Si el hook está activo |
| `hook_url` | string | La URL del webhook |
| `filter` | object | Filtros aplicados |
| `include` | object | Campos incluidos |
| `inserted_at` | string | Marca de tiempo de creación ISO8601 |
### `grain_list_hooks`
Listar todos los webhooks de la cuenta
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave API de Grain \(token de acceso personal\) |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `hooks` | array | Array de objetos hook |
### `grain_delete_hook`
Eliminar un webhook por ID
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Sí | Clave API de Grain \(token de acceso personal\) |
| `hookId` | string | Sí | El UUID del hook a eliminar |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Verdadero cuando el webhook se eliminó correctamente |
## Notas
- Categoría: `tools`
- Tipo: `grain`

View File

@@ -38,16 +38,18 @@ Crear un nuevo contacto en Intercom con email, external_id o rol
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `role` | string | No | El rol del contacto. Acepta 'user' o 'lead'. Por defecto es 'lead' si no se especifica. |
| `email` | string | No | La dirección de correo electrónico del contacto |
| `external_id` | string | No | Un identificador único para el contacto proporcionado por el cliente |
| `phone` | string | No | El número de teléfono del contacto |
| `name` | string | No | El nombre del contacto |
| `avatar` | string | No | Una URL de imagen de avatar para el contacto |
| `signed_up_at` | number | No | El momento en que el usuario se registró como marca de tiempo Unix |
| `last_seen_at` | number | No | El momento en que el usuario fue visto por última vez como marca de tiempo Unix |
| `owner_id` | string | No | El id de un administrador que ha sido asignado como propietario de la cuenta del contacto |
| `signed_up_at` | number | No | La hora en que el usuario se registró como marca de tiempo Unix |
| `last_seen_at` | number | No | La hora en que el usuario fue visto por última vez como marca de tiempo Unix |
| `owner_id` | string | No | El id de un administrador al que se le ha asignado la propiedad de la cuenta del contacto |
| `unsubscribed_from_emails` | boolean | No | Si el contacto está dado de baja de los correos electrónicos |
| `custom_attributes` | string | No | Atributos personalizados como objeto JSON \(p. ej., \{"nombre_atributo": "valor"\}\) |
| `custom_attributes` | string | No | Atributos personalizados como objeto JSON \(ej., \{"attribute_name": "value"\}\) |
| `company_id` | string | No | ID de empresa para asociar el contacto durante la creación |
#### Salida
@@ -82,15 +84,18 @@ Actualizar un contacto existente en Intercom
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `contactId` | string | Sí | ID del contacto a actualizar |
| `email` | string | No | Dirección de correo electrónico del contacto |
| `phone` | string | No | Número de teléfono del contacto |
| `name` | string | No | Nombre del contacto |
| `avatar` | string | No | URL de imagen de avatar para el contacto |
| `signed_up_at` | number | No | El momento en que el usuario se registró como marca de tiempo Unix |
| `last_seen_at` | number | No | El momento en que el usuario fue visto por última vez como marca de tiempo Unix |
| `owner_id` | string | No | El id de un administrador que ha sido asignado como propietario de la cuenta del contacto |
| `role` | string | No | El rol del contacto. Acepta 'user' o 'lead'. |
| `external_id` | string | No | Un identificador único para el contacto proporcionado por el cliente |
| `email` | string | No | La dirección de correo electrónico del contacto |
| `phone` | string | No | El número de teléfono del contacto |
| `name` | string | No | El nombre del contacto |
| `avatar` | string | No | Una URL de imagen de avatar para el contacto |
| `signed_up_at` | number | No | La hora en que el usuario se registró como marca de tiempo Unix |
| `last_seen_at` | number | No | La hora en que el usuario fue visto por última vez como marca de tiempo Unix |
| `owner_id` | string | No | El id de un administrador al que se le ha asignado la propiedad de la cuenta del contacto |
| `unsubscribed_from_emails` | boolean | No | Si el contacto está dado de baja de los correos electrónicos |
| `custom_attributes` | string | No | Atributos personalizados como objeto JSON (p. ej., \{"nombre_atributo": "valor"\}) |
| `custom_attributes` | string | No | Atributos personalizados como objeto JSON \(ej., \{"attribute_name": "value"\}\) |
| `company_id` | string | No | ID de empresa para asociar el contacto |
#### Salida
@@ -125,9 +130,11 @@ Buscar contactos en Intercom usando una consulta
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `query` | string | Sí | Consulta de búsqueda \(p. ej., \{"field":"email","operator":"=","value":"user@example.com"\}\) |
| `query` | string | Sí | Consulta de búsqueda \(ej., \{"field":"email","operator":"=","value":"user@example.com"\}\) |
| `per_page` | number | No | Número de resultados por página \(máx: 150\) |
| `starting_after` | string | No | Cursor para paginación |
| `sort_field` | string | No | Campo por el cual ordenar \(ej., "name", "created_at", "last_seen_at"\) |
| `sort_order` | string | No | Orden de clasificación: "ascending" o "descending" |
#### Salida
@@ -166,9 +173,10 @@ Crear o actualizar una empresa en Intercom
| `website` | string | No | El sitio web de la empresa |
| `plan` | string | No | El nombre del plan de la empresa |
| `size` | number | No | El número de empleados en la empresa |
| `industry` | string | No | El sector en el que opera la empresa |
| `monthly_spend` | number | No | Cuántos ingresos genera la empresa para tu negocio. Nota: Este campo trunca los decimales a números enteros \(por ejemplo, 155.98 se convierte en 155\) |
| `industry` | string | No | La industria en la que opera la empresa |
| `monthly_spend` | number | No | Cuántos ingresos genera la empresa para tu negocio. Nota: Este campo trunca decimales a números enteros \(ej., 155.98 se convierte en 155\) |
| `custom_attributes` | string | No | Atributos personalizados como objeto JSON |
| `remote_created_at` | number | No | La fecha en que creaste la empresa como marca de tiempo Unix |
#### Salida
@@ -204,6 +212,7 @@ Lista todas las empresas de Intercom con soporte de paginación. Nota: Este endp
| --------- | ---- | -------- | ----------- |
| `per_page` | number | No | Número de resultados por página |
| `page` | number | No | Número de página |
| `starting_after` | string | No | Cursor para paginación \(preferido sobre paginación basada en páginas\) |
#### Salida
@@ -221,7 +230,8 @@ Recuperar una sola conversación por ID desde Intercom
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Sí | ID de la conversación a recuperar |
| `display_as` | string | No | Establecer como "plaintext" para recuperar mensajes en texto plano |
| `display_as` | string | No | Establecer en "plaintext" para recuperar mensajes en texto plano |
| `include_translations` | boolean | No | Cuando es true, las partes de la conversación se traducirán al idioma detectado de la conversación |
#### Salida
@@ -240,6 +250,8 @@ Listar todas las conversaciones de Intercom con soporte de paginación
| --------- | ---- | -------- | ----------- |
| `per_page` | number | No | Número de resultados por página \(máx: 150\) |
| `starting_after` | string | No | Cursor para paginación |
| `sort` | string | No | Campo por el que ordenar \(p. ej., "waiting_since", "updated_at", "created_at"\) |
| `order` | string | No | Orden de clasificación: "asc" \(ascendente\) o "desc" \(descendente\) |
#### Salida
@@ -258,9 +270,10 @@ Responder a una conversación como administrador en Intercom
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Sí | ID de la conversación a la que responder |
| `message_type` | string | Sí | Tipo de mensaje: "comment" o "note" |
| `body` | string | Sí | El texto del cuerpo de la respuesta |
| `admin_id` | string | No | El ID del administrador que escribe la respuesta. Si no se proporciona, se utilizará un administrador predeterminado \(Operator/Fin\). |
| `attachment_urls` | string | No | Lista separada por comas de URLs de imágenes \(máximo 10\) |
| `body` | string | Sí | El cuerpo de texto de la respuesta |
| `admin_id` | string | No | El ID del administrador que escribe la respuesta. Si no se proporciona, se usará un administrador predeterminado \(Operator/Fin\). |
| `attachment_urls` | string | No | Lista de URLs de imágenes separadas por comas \(máx 10\) |
| `created_at` | number | No | Marca de tiempo Unix de cuándo se creó la respuesta. Si no se proporciona, se usa la hora actual. |
#### Salida
@@ -278,8 +291,10 @@ Buscar conversaciones en Intercom usando una consulta
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `query` | string | Sí | Consulta de búsqueda como objeto JSON |
| `per_page` | number | No | Número de resultados por página (máx: 150) |
| `per_page` | number | No | Número de resultados por página \(máx: 150\) |
| `starting_after` | string | No | Cursor para paginación |
| `sort_field` | string | No | Campo por el que ordenar \(p. ej., "created_at", "updated_at"\) |
| `sort_order` | string | No | Orden de clasificación: "ascending" o "descending" |
#### Salida
@@ -297,8 +312,12 @@ Crear un nuevo ticket en Intercom
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `ticket_type_id` | string | Sí | El ID del tipo de ticket |
| `contacts` | string | Sí | Array JSON de identificadores de contacto (p. ej., \{"id": "contact_id"\}) |
| `contacts` | string | Sí | Array JSON de identificadores de contacto \(p. ej., \[\{"id": "contact_id"\}\]\) |
| `ticket_attributes` | string | Sí | Objeto JSON con atributos del ticket incluyendo _default_title_ y _default_description_ |
| `company_id` | string | No | ID de la empresa para asociar el ticket |
| `created_at` | number | No | Marca de tiempo Unix de cuándo se creó el ticket. Si no se proporciona, se utiliza la hora actual. |
| `conversation_to_link_id` | string | No | ID de una conversación existente para vincular a este ticket |
| `disable_notifications` | boolean | No | Cuando es true, suprime las notificaciones cuando se crea el ticket |
#### Salida
@@ -332,13 +351,15 @@ Crear y enviar un nuevo mensaje iniciado por el administrador en Intercom
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `message_type` | string | Sí | Tipo de mensaje: "inapp" o "email" |
| `message_type` | string | Sí | Tipo de mensaje: "inapp" para mensajes dentro de la aplicación o "email" para mensajes de correo electrónico |
| `template` | string | Sí | Estilo de plantilla del mensaje: "plain" para texto sin formato o "personal" para estilo personalizado |
| `subject` | string | No | El asunto del mensaje \(para tipo email\) |
| `body` | string | Sí | El cuerpo del mensaje |
| `from_type` | string | Sí | Tipo de remitente: "admin" |
| `from_id` | string | Sí | El ID del administrador que envía el mensaje |
| `to_type` | string | Sí | Tipo de destinatario: "contact" |
| `to_id` | string | Sí | El ID del contacto que recibe el mensaje |
| `created_at` | number | No | Marca de tiempo Unix de cuándo se creó el mensaje. Si no se proporciona, se utiliza la hora actual. |
#### Salida

View File

@@ -61,8 +61,6 @@ Extrae y procesa contenido web en texto limpio y compatible con LLM usando Jina
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `content` | string | El contenido extraído de la URL, procesado en texto limpio y compatible con LLM |
| `links` | array | Lista de enlaces encontrados en la página (cuando gatherLinks o withLinksummary está activado) |
| `images` | array | Lista de imágenes encontradas en la página (cuando withImagesummary está activado) |
### `jina_search`

View File

@@ -12,57 +12,54 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
## Instrucciones de uso
Integra la Memoria en el flujo de trabajo. Puede añadir, obtener una memoria, obtener todas las memorias y eliminar memorias.
Integra memoria en el flujo de trabajo. Puede añadir, obtener una memoria, obtener todas las memorias y eliminar memorias.
## Herramientas
### `memory_add`
Añade una nueva memoria a la base de datos o agrega a una memoria existente con el mismo ID.
Añadir una nueva memoria a la base de datos o agregar a una memoria existente con el mismo ID.
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | ----------- | ----------- |
| `conversationId` | string | No | Identificador de conversación (p. ej., user-123, session-abc). Si ya existe una memoria con este conversationId para este bloque, el nuevo mensaje se añadirá a ella. |
| `id` | string | No | Parámetro heredado para el identificador de conversación. Use conversationId en su lugar. Proporcionado para compatibilidad con versiones anteriores. |
| `role` | string | Sí | Rol para la memoria del agente (user, assistant o system) |
| `conversationId` | string | No | Identificador de conversación \(ej., user-123, session-abc\). Si ya existe una memoria con este conversationId, el nuevo mensaje se agregará a ella. |
| `id` | string | No | Parámetro heredado para identificador de conversación. Usa conversationId en su lugar. Proporcionado para compatibilidad con versiones anteriores. |
| `role` | string | Sí | Rol para la memoria del agente \(user, assistant o system\) |
| `content` | string | Sí | Contenido para la memoria del agente |
| `blockId` | string | No | ID de bloque opcional. Si no se proporciona, utiliza el ID del bloque actual del contexto de ejecución, o por defecto "default". |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Indica si la memoria se añadió correctamente |
| `success` | boolean | Si la memoria se añadió correctamente |
| `memories` | array | Array de objetos de memoria incluyendo la memoria nueva o actualizada |
| `error` | string | Mensaje de error si la operación falló |
### `memory_get`
Recuperar memoria por conversationId, blockId, blockName o una combinación. Devuelve todas las memorias coincidentes.
Recuperar memoria por conversationId. Devuelve las memorias coincidentes.
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | ----------- | ----------- |
| `conversationId` | string | No | Identificador de conversación (p. ej., user-123, session-abc). Si se proporciona solo, devuelve todas las memorias para esta conversación en todos los bloques. |
| `id` | string | No | Parámetro heredado para el identificador de conversación. Use conversationId en su lugar. Proporcionado para compatibilidad con versiones anteriores. |
| `blockId` | string | No | Identificador de bloque. Si se proporciona solo, devuelve todas las memorias para este bloque en todas las conversaciones. Si se proporciona con conversationId, devuelve las memorias para esa conversación específica en este bloque. |
| `blockName` | string | No | Nombre del bloque. Alternativa a blockId. Si se proporciona solo, devuelve todas las memorias para bloques con este nombre. Si se proporciona con conversationId, devuelve las memorias para esa conversación en bloques con este nombre. |
| `conversationId` | string | No | Identificador de conversación \(ej., user-123, session-abc\). Devuelve las memorias para esta conversación. |
| `id` | string | No | Parámetro heredado para identificador de conversación. Usa conversationId en su lugar. Proporcionado para compatibilidad con versiones anteriores. |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Si la memoria fue recuperada con éxito |
| `memories` | array | Array de objetos de memoria con campos conversationId, blockId, blockName y data |
| `success` | boolean | Si la memoria se recuperó exitosamente |
| `memories` | array | Array de objetos de memoria con campos conversationId y data |
| `message` | string | Mensaje de éxito o error |
| `error` | string | Mensaje de error si la operación falló |
### `memory_get_all`
Recuperar todas las memorias de la base de datos
Recupera todas las memorias de la base de datos
#### Entrada
@@ -73,29 +70,27 @@ Recuperar todas las memorias de la base de datos
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Si todas las memorias fueron recuperadas con éxito |
| `memories` | array | Array de todos los objetos de memoria con campos key, conversationId, blockId, blockName y data |
| `success` | boolean | Si todas las memorias se recuperaron exitosamente |
| `memories` | array | Array de todos los objetos de memoria con campos key, conversationId y data |
| `message` | string | Mensaje de éxito o error |
| `error` | string | Mensaje de error si la operación falló |
### `memory_delete`
Eliminar memorias por conversationId, blockId, blockName o una combinación. Admite eliminación masiva.
Elimina memorias por conversationId.
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | ----------- | ----------- |
| `conversationId` | string | No | Identificador de conversación (p. ej., user-123, session-abc). Si se proporciona solo, elimina todas las memorias para esta conversación en todos los bloques. |
| `id` | string | No | Parámetro heredado para el identificador de conversación. Use conversationId en su lugar. Proporcionado para compatibilidad con versiones anteriores. |
| `blockId` | string | No | Identificador de bloque. Si se proporciona solo, elimina todas las memorias para este bloque en todas las conversaciones. Si se proporciona con conversationId, elimina las memorias para esa conversación específica en este bloque. |
| `blockName` | string | No | Nombre del bloque. Alternativa a blockId. Si se proporciona solo, elimina todas las memorias para bloques con este nombre. Si se proporciona con conversationId, elimina las memorias para esa conversación en bloques con este nombre. |
| `conversationId` | string | No | Identificador de conversación (ej., user-123, session-abc). Elimina todas las memorias de esta conversación. |
| `id` | string | No | Parámetro heredado para identificador de conversación. Usa conversationId en su lugar. Proporcionado para compatibilidad con versiones anteriores. |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Si la memoria fue eliminada con éxito |
| `success` | boolean | Si la memoria se eliminó exitosamente |
| `message` | string | Mensaje de éxito o error |
| `error` | string | Mensaje de error si la operación falló |

View File

@@ -47,10 +47,11 @@ Consultar datos de una tabla de Supabase
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | ----------- | ----------- |
| `projectId` | string | Sí | Tu ID de proyecto de Supabase \(ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | El nombre de la tabla de Supabase a consultar |
| `filter` | string | No | Filtro de PostgREST \(ej., "id=eq.123"\) |
| `orderBy` | string | No | Columna para ordenar \(añade DESC para orden descendente\) |
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | Nombre de la tabla Supabase a consultar |
| `schema` | string | No | Esquema de base de datos desde donde consultar \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `filter` | string | No | Filtro PostgREST \(p. ej., "id=eq.123"\) |
| `orderBy` | string | No | Columna para ordenar \(añade DESC para descendente\) |
| `limit` | number | No | Número máximo de filas a devolver |
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
@@ -68,9 +69,10 @@ Insertar datos en una tabla de Supabase
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| --------- | ---- | ----------- | ----------- |
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | Nombre de la tabla Supabase donde insertar datos |
| `schema` | string | No | Esquema de base de datos donde insertar \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `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 |
@@ -88,9 +90,10 @@ Obtener una sola fila de una tabla de Supabase basada en criterios de filtro
#### Entrada
| 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 para consultar |
| --------- | ---- | ----------- | ----------- |
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | Nombre de la tabla Supabase a consultar |
| `schema` | string | No | Esquema de base de datos desde donde consultar \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `filter` | string | Sí | Filtro PostgREST para encontrar la fila específica \(p. ej., "id=eq.123"\) |
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
@@ -111,8 +114,9 @@ Actualizar filas en una tabla de Supabase según criterios de filtro
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | Nombre de la tabla Supabase a actualizar |
| `schema` | string | No | Esquema de base de datos donde actualizar \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `filter` | string | Sí | Filtro PostgREST para identificar las filas a actualizar \(p. ej., "id=eq.123"\) |
| `data` | object | Sí | Datos para actualizar en las filas coincidentes |
| `data` | object | Sí | Datos a actualizar en las filas coincidentes |
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
#### Salida
@@ -132,6 +136,7 @@ Eliminar filas de una tabla de Supabase según criterios de filtro
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | Nombre de la tabla Supabase de la que eliminar |
| `schema` | string | No | Esquema de base de datos del que eliminar \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `filter` | string | Sí | Filtro PostgREST para identificar las filas a eliminar \(p. ej., "id=eq.123"\) |
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
@@ -152,7 +157,8 @@ Insertar o actualizar datos en una tabla de Supabase (operación 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 | | Los datos para upsert \(insertar o actualizar\) - array de objetos o un solo objeto |
| `schema` | string | No | Esquema de base de datos donde hacer upsert \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `data` | array | Sí | Los datos para hacer upsert \(insertar o actualizar\) - array de objetos o un solo objeto |
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
#### Salida
@@ -171,7 +177,8 @@ Contar filas en una tabla de Supabase
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | Nombre de la tabla Supabase de la que contar filas |
| `table` | string | Sí | El nombre de la tabla Supabase de la que contar filas |
| `schema` | string | No | Esquema de base de datos desde el que contar \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `filter` | string | No | Filtro PostgREST \(p. ej., "status=eq.active"\) |
| `countType` | string | No | Tipo de conteo: exact, planned o estimated \(predeterminado: exact\) |
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
@@ -192,7 +199,8 @@ Realizar búsqueda de texto completo en una tabla de Supabase
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
| `table` | string | Sí | Nombre de la tabla Supabase en la que buscar |
| `table` | string | Sí | El nombre de la tabla Supabase donde buscar |
| `schema` | string | No | Esquema de base de datos en el que buscar \(predeterminado: public\). Usa esto para acceder a tablas en otros esquemas. |
| `column` | string | Sí | La columna en la que buscar |
| `query` | string | Sí | La consulta de búsqueda |
| `searchType` | string | No | Tipo de búsqueda: plain, phrase o websearch \(predeterminado: websearch\) |

View File

@@ -38,17 +38,18 @@ Envía una solicitud de completado de chat a cualquier proveedor de LLM compatib
#### Entrada
| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | -------- | ----------- |
| `model` | string | Sí | El modelo a utilizar \(ej., gpt-4o, claude-sonnet-4-5, gemini-2.0-flash\) |
| --------- | ---- | --------- | ----------- |
| `model` | string | Sí | El modelo a utilizar \(por ejemplo, gpt-4o, claude-sonnet-4-5, gemini-2.0-flash\) |
| `systemPrompt` | string | No | Prompt del sistema para establecer el comportamiento del asistente |
| `context` | string | Sí | El mensaje del usuario o contexto a enviar al modelo |
| `apiKey` | string | No | Clave API del proveedor \(usa la clave de la plataforma si no se proporciona para modelos alojados\) |
| `temperature` | number | No | Temperatura para la generación de respuestas \(0-2\) |
| `maxTokens` | number | No | Tokens máximos en la respuesta |
| `maxTokens` | number | No | Máximo de tokens en la respuesta |
| `azureEndpoint` | string | No | URL del endpoint de Azure OpenAI |
| `azureApiVersion` | string | No | Versión de la API de Azure OpenAI |
| `vertexProject` | string | No | ID del proyecto de Google Cloud para Vertex AI |
| `vertexLocation` | string | No | Ubicación de Google Cloud para Vertex AI \(por defecto us-central1\) |
| `vertexCredential` | string | No | ID de credencial OAuth de Google Cloud para Vertex AI |
#### Salida

View File

@@ -5,7 +5,6 @@ title: Programación
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
El bloque de Programación activa automáticamente flujos de trabajo de forma recurrente en intervalos o momentos específicos.
@@ -21,16 +20,16 @@ El bloque de Programación activa automáticamente flujos de trabajo de forma re
## Opciones de programación
Configura cuándo se ejecuta tu flujo de trabajo utilizando las opciones desplegables:
Configura cuándo se ejecuta tu flujo de trabajo:
<Tabs items={['Intervalos simples', 'Expresiones cron']}>
<Tab>
<ul className="list-disc space-y-1 pl-6">
<li><strong>Cada pocos minutos</strong>: intervalos de 5, 15, 30 minutos</li>
<li><strong>Por hora</strong>: Cada hora o cada pocas horas</li>
<li><strong>Diariamente</strong>: Una o varias veces al día</li>
<li><strong>Semanalmente</strong>: Días específicos de la semana</li>
<li><strong>Mensualmente</strong>: Días específicos del mes</li>
<li><strong>Cada X minutos</strong>: ejecutar en intervalos de minutos (1-1440)</li>
<li><strong>Cada hora</strong>: ejecutar en un minuto específico cada hora</li>
<li><strong>Diariamente</strong>: ejecutar a una hora específica cada día</li>
<li><strong>Semanalmente</strong>: ejecutar en un día y hora específicos cada semana</li>
<li><strong>Mensualmente</strong>: ejecutar en un día y hora específicos cada mes</li>
</ul>
</Tab>
<Tab>
@@ -43,45 +42,36 @@ Configura cuándo se ejecuta tu flujo de trabajo utilizando las opciones despleg
</Tab>
</Tabs>
## Configuración de programaciones
## Activación
Cuando un flujo de trabajo está programado:
- La programación se vuelve **activa** y muestra el próximo tiempo de ejecución
- Haz clic en el botón **"Programado"** para desactivar la programación
- Las programaciones se desactivan automáticamente después de **3 fallos consecutivos**
Las programaciones están vinculadas al despliegue del flujo de trabajo:
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-2.png"
alt="Bloque de programación activo"
width={500}
height={400}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Programación desactivada"
width={500}
height={350}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Programación desactivada"
width={500}
height={400}
className="my-6"
/>
</div>
Las programaciones desactivadas muestran cuándo estuvieron activas por última vez. Haz clic en la insignia **"Desactivado"** para reactivar la programación.
- **Desplegar flujo de trabajo** → la programación se activa y comienza a ejecutarse
- **Retirar flujo de trabajo** → la programación se elimina
- **Redesplegar flujo de trabajo** → la programación se recrea con la configuración actual
<Callout>
Los bloques de programación no pueden recibir conexiones entrantes y funcionan exclusivamente como disparadores de flujos de trabajo.
Debes desplegar tu flujo de trabajo para que la programación comience a ejecutarse. Configura el bloque de programación y luego despliega desde la barra de herramientas.
</Callout>
## Desactivación automática
Las programaciones se desactivan automáticamente después de **10 fallos consecutivos** para evitar errores descontrolados. Cuando se desactiva:
- Aparece una insignia de advertencia en el bloque de programación
- La programación deja de ejecutarse
- Haz clic en la insignia para reactivar la programación
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Programación desactivada"
width={500}
height={400}
className="my-6"
/>
</div>
<Callout>
Los bloques de programación no pueden recibir conexiones entrantes y sirven únicamente como puntos de entrada del flujo de trabajo.
</Callout>

View File

@@ -47,42 +47,42 @@ La répartition des modèles montre :
## Options de tarification
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
<Tabs items={['Modèles hébergés', 'Apportez votre propre clé API']}>
<Tab>
**Modèles hébergés** - Sim fournit des clés API avec un multiplicateur de prix de 2,5x :
**Modèles hébergés** - Sim fournit des clés API avec un multiplicateur de prix de 2x :
**OpenAI**
| Modèle | Prix de base (Entrée/Sortie) | Prix hébergé (Entrée/Sortie) |
| Modèle | Prix de base (entrée/sortie) | Prix hébergé (entrée/sortie) |
|-------|---------------------------|----------------------------|
| GPT-5.1 | 1,25 $ / 10,00 $ | 3,13 $ / 25,00 $ |
| GPT-5 | 1,25 $ / 10,00 $ | 3,13 $ / 25,00 $ |
| GPT-5 Mini | 0,25 $ / 2,00 $ | 0,63 $ / 5,00 $ |
| GPT-5 Nano | 0,05 $ / 0,40 $ | 0,13 $ / 1,00 $ |
| GPT-4o | 2,50 $ / 10,00 $ | 6,25 $ / 25,00 $ |
| GPT-4.1 | 2,00 $ / 8,00 $ | 5,00 $ / 20,00 $ |
| GPT-4.1 Mini | 0,40 $ / 1,60 $ | 1,00 $ / 4,00 $ |
| GPT-4.1 Nano | 0,10 $ / 0,40 $ | 0,25 $ / 1,00 $ |
| o1 | 15,00 $ / 60,00 $ | 37,50 $ / 150,00 $ |
| o3 | 2,00 $ / 8,00 $ | 5,00 $ / 20,00 $ |
| o4 Mini | 1,10 $ / 4,40 $ | 2,75 $ / 11,00 $ |
| GPT-5.1 | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| GPT-5 | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| GPT-5 Mini | 0,25 $ / 2,00 $ | 0,50 $ / 4,00 $ |
| GPT-5 Nano | 0,05 $ / 0,40 $ | 0,10 $ / 0,80 $ |
| GPT-4o | 2,50 $ / 10,00 $ | 5,00 $ / 20,00 $ |
| GPT-4.1 | 2,00 $ / 8,00 $ | 4,00 $ / 16,00 $ |
| GPT-4.1 Mini | 0,40 $ / 1,60 $ | 0,80 $ / 3,20 $ |
| GPT-4.1 Nano | 0,10 $ / 0,40 $ | 0,20 $ / 0,80 $ |
| o1 | 15,00 $ / 60,00 $ | 30,00 $ / 120,00 $ |
| o3 | 2,00 $ / 8,00 $ | 4,00 $ / 16,00 $ |
| o4 Mini | 1,10 $ / 4,40 $ | 2,20 $ / 8,80 $ |
**Anthropic**
| Modèle | Prix de base (Entrée/Sortie) | Prix hébergé (Entrée/Sortie) |
| Modèle | Prix de base (entrée/sortie) | Prix hébergé (entrée/sortie) |
|-------|---------------------------|----------------------------|
| Claude Opus 4.5 | 5,00 $ / 25,00 $ | 12,50 $ / 62,50 $ |
| Claude Opus 4.1 | 15,00 $ / 75,00 $ | 37,50 $ / 187,50 $ |
| Claude Sonnet 4.5 | 3,00 $ / 15,00 $ | 7,50 $ / 37,50 $ |
| Claude Sonnet 4.0 | 3,00 $ / 15,00 $ | 7,50 $ / 37,50 $ |
| Claude Haiku 4.5 | 1,00 $ / 5,00 $ | 2,50 $ / 12,50 $ |
| Claude Opus 4.5 | 5,00 $ / 25,00 $ | 10,00 $ / 50,00 $ |
| Claude Opus 4.1 | 15,00 $ / 75,00 $ | 30,00 $ / 150,00 $ |
| Claude Sonnet 4.5 | 3,00 $ / 15,00 $ | 6,00 $ / 30,00 $ |
| Claude Sonnet 4.0 | 3,00 $ / 15,00 $ | 6,00 $ / 30,00 $ |
| Claude Haiku 4.5 | 1,00 $ / 5,00 $ | 2,00 $ / 10,00 $ |
**Google**
| Modèle | Prix de base (Entrée/Sortie) | Prix hébergé (Entrée/Sortie) |
| Modèle | Prix de base (entrée/sortie) | Prix hébergé (entrée/sortie) |
|-------|---------------------------|----------------------------|
| Gemini 3 Pro Preview | 2,00 $ / 12,00 $ | 5,00 $ / 30,00 $ |
| Gemini 2.5 Pro | 0,15 $ / 0,60 $ | 0,38 $ / 1,50 $ |
| Gemini 2.5 Flash | 0,15 $ / 0,60 $ | 0,38 $ / 1,50 $ |
| Gemini 3 Pro Preview | 2,00 $ / 12,00 $ | 4,00 $ / 24,00 $ |
| Gemini 2.5 Pro | 1,25 $ / 10,00 $ | 2,50 $ / 20,00 $ |
| Gemini 2.5 Flash | 0,30 $ / 2,50 $ | 0,60 $ / 5,00 $ |
*Le multiplicateur de 2,5x couvre les coûts d'infrastructure et de gestion des API.*
*Le multiplicateur 2x couvre les coûts d'infrastructure et de gestion des API.*
</Tab>
<Tab>
@@ -187,7 +187,7 @@ Les différents forfaits d'abonnement ont des limites d'utilisation différentes
| Forfait | Limite d'utilisation mensuelle | Limites de débit (par minute) |
|------|-------------------|-------------------------|
| **Gratuit** | 10 $ | 5 sync, 10 async |
| **Gratuit** | 20 $ | 5 sync, 10 async |
| **Pro** | 100 $ | 10 sync, 50 async |
| **Équipe** | 500 $ (mutualisé) | 50 sync, 100 async |
| **Entreprise** | Personnalisé | Personnalisé |

View File

@@ -35,53 +35,59 @@ Une fois vos documents traités, vous pouvez visualiser et modifier les segments
<Image src="/static/knowledgebase/knowledgebase.png" alt="Vue des segments de document montrant le contenu traité" width={800} height={500} />
### Configuration des fragments
- **Taille par défaut des fragments** : 1 024 caractères
- **Plage configurable** : 100 à 4 000 caractères par fragment
- **Chevauchement intelligent** : 200 caractères par défaut pour préserver le contexte
- **Découpage hiérarchique** : respecte la structure du document (sections, paragraphes, phrases)
Lors de la création d'une base de connaissances, vous pouvez configurer la façon dont les documents sont divisés en fragments :
| Paramètre | Unité | Par défaut | Plage | Description |
|---------|------|---------|-------|-------------|
| **Taille max. du fragment** | jetons | 1 024 | 100-4 000 | Taille maximale de chaque fragment (1 jeton ≈ 4 caractères) |
| **Taille min. du fragment** | caractères | 1 | 1-2 000 | Taille minimale du fragment pour éviter les fragments minuscules |
| **Chevauchement** | caractères | 200 | 0-500 | Chevauchement de contexte entre fragments consécutifs |
- **Division hiérarchique** : respecte la structure du document (sections, paragraphes, phrases)
### Capacités d'édition
- **Modifier le contenu des fragments** : modifier le contenu textuel des fragments individuels
- **Ajuster les limites des fragments** : fusionner ou diviser les fragments selon les besoins
- **Ajouter des métadonnées** : enrichir les fragments avec du contexte supplémentaire
- **Opérations en masse** : gérer efficacement plusieurs fragments
- **Modifier le contenu du fragment** : modifiez le contenu textuel des fragments individuels
- **Ajuster les limites du fragment** : fusionnez ou divisez les fragments selon les besoins
- **Ajouter des métadonnées** : enrichissez les fragments avec du contexte supplémentaire
- **Opérations en masse** : gérez plusieurs fragments efficacement
## Traitement avancé des PDF
Pour les documents PDF, Sim offre des capacités de traitement améliorées :
### Support OCR
Lorsque configuré avec Azure ou [Mistral OCR](https://docs.mistral.ai/ocr/) :
- **Traitement de documents numérisés** : extraction de texte à partir de PDF basés sur des images
- **Gestion de contenu mixte** : traitement des PDF contenant à la fois du texte et des images
- **Haute précision** : les modèles d'IA avancés assurent une extraction précise du texte
### Prise en charge de l'OCR
Lorsqu'il est configuré avec Azure ou [Mistral OCR](https://docs.mistral.ai/ocr/) :
- **Traitement de documents numérisés** : extrayez le texte des PDF basés sur des images
- **Gestion de contenu mixte** : traitez les PDF contenant à la fois du texte et des images
- **Haute précision** : les modèles d'IA avancés garantissent une extraction de texte précise
## Utilisation du bloc de connaissances dans les flux de travail
## Utilisation du bloc de connaissances dans les workflows
Une fois vos documents traités, vous pouvez les utiliser dans vos flux de travail d'IA grâce au bloc de connaissances. Cela permet la génération augmentée par récupération (RAG), permettant à vos agents IA d'accéder et de raisonner sur le contenu de vos documents pour fournir des réponses plus précises et contextuelles.
Une fois vos documents traités, vous pouvez les utiliser dans vos workflows d'IA via le bloc de connaissances. Cela active la génération augmentée par récupération (RAG), permettant à vos agents d'IA d'accéder à votre contenu documentaire et de raisonner dessus pour fournir des réponses plus précises et contextuelles.
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="Utilisation du bloc de connaissances dans les flux de travail" width={800} height={500} />
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="Utilisation du bloc de connaissances dans les workflows" width={800} height={500} />
### Fonctionnalités du bloc de connaissances
- **Recherche sémantique** : trouver du contenu pertinent à l'aide de requêtes en langage naturel
- **Intégration du contexte** : inclure automatiquement les fragments pertinents dans les prompts des agents
- **Récupération dynamique** : la recherche s'effectue en temps réel pendant l'exécution du flux de travail
- **Évaluation de la pertinence** : résultats classés par similarité sémantique
- **Recherche sémantique** : trouvez du contenu pertinent à l'aide de requêtes en langage naturel
- **Intégration contextuelle** : incluez automatiquement les fragments pertinents dans les prompts de l'agent
- **Récupération dynamique** : la recherche s'effectue en temps réel pendant l'exécution du workflow
- **Score de pertinence** : résultats classés par similarité sémantique
### Options d'intégration
- **Prompts système** : fournir du contexte à vos agents IA
- **Contexte dynamique** : rechercher et inclure des informations pertinentes pendant les conversations
- **Recherche multi-documents** : interroger l'ensemble de votre base de connaissances
- **Recherche filtrée** : combiner avec des tags pour une récupération précise du contenu
- **Prompts système** : fournissez du contexte à vos agents IA
- **Contexte dynamique** : recherchez et incluez des informations pertinentes pendant les conversations
- **Recherche multi-documents** : interrogez l'ensemble de votre base de connaissances
- **Recherche filtrée** : combinez avec des tags pour une récupération de contenu précise
## Technologie de recherche vectorielle
Sim utilise la recherche vectorielle alimentée par [pgvector](https://github.com/pgvector/pgvector) pour comprendre le sens et le contexte de votre contenu :
Sim utilise la recherche vectorielle propulsée par [pgvector](https://github.com/pgvector/pgvector) pour comprendre le sens et le contexte de votre contenu :
### Compréhension sémantique
- **Recherche contextuelle** : trouve du contenu pertinent même lorsque les mots-clés exacts ne correspondent pas
- **Récupération basée sur les concepts** : comprend les relations entre les idées
- **Prise en charge multilingue** : fonctionne dans différentes langues
- **Support multilingue** : fonctionne dans différentes langues
- **Reconnaissance des synonymes** : trouve des termes et concepts associés
### Capacités de recherche
@@ -90,26 +96,26 @@ Sim utilise la recherche vectorielle alimentée par [pgvector](https://github.co
- **Recherche hybride** : combine la recherche vectorielle et la recherche traditionnelle par mots-clés
- **Résultats configurables** : contrôlez le nombre et le seuil de pertinence des résultats
## Gestion documentaire
## Gestion des documents
### Fonctionnalités d'organisation
- **Téléchargement en masse** : téléchargez plusieurs fichiers à la fois via l'API asynchrone
- **État de traitement** : mises à jour en temps réel sur le traitement des documents
- **Statut de traitement** : mises à jour en temps réel sur le traitement des documents
- **Recherche et filtrage** : trouvez rapidement des documents dans de grandes collections
- **Suivi des métadonnées** : capture automatique des informations de fichier et des détails de traitement
### Sécurité et confidentialité
- **Stockage sécurisé** : documents stockés avec une sécurité de niveau entreprise
- **Contrôle d'accès** : autorisations basées sur l'espace de travail
- **Contrôle d'accès** : permissions basées sur l'espace de travail
- **Isolation du traitement** : chaque espace de travail dispose d'un traitement de documents isolé
- **Conservation des données** : configurez les politiques de conservation des documents
## Premiers pas
1. **Accédez à votre base de connaissances** : accessible depuis la barre latérale de votre espace de travail
1. **Accédez à votre base de connaissances** : accès depuis la barre latérale de votre espace de travail
2. **Téléchargez des documents** : glissez-déposez ou sélectionnez des fichiers à télécharger
3. **Surveillez le traitement** : observez le traitement et le découpage des documents
4. **Explorez les fragments** : visualisez et modifiez le contenu traité
5. **Ajoutez aux flux de travail** : utilisez le bloc Connaissances pour l'intégrer à vos agents IA
3. **Surveillez le traitement** : observez le traitement et la segmentation des documents
4. **Explorez les segments** : visualisez et modifiez le contenu traité
5. **Ajoutez aux workflows** : utilisez le bloc Knowledge pour intégrer avec vos agents IA
La base de connaissances transforme vos documents statiques en une ressource intelligente et consultable que vos flux de travail IA peuvent exploiter pour des réponses plus informées et contextuelles.
La base de connaissances transforme vos documents statiques en une ressource intelligente et consultable que vos workflows IA peuvent exploiter pour des réponses plus éclairées et contextuelles.

View File

@@ -0,0 +1,59 @@
---
title: Circleback
description: Notes de réunion et tâches générées par IA
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="circleback"
color="linear-gradient(180deg, #E0F7FA 0%, #FFFFFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Circleback](https://circleback.ai/) est une plateforme alimentée par IA qui automatise les notes de réunion, les tâches, les transcriptions et les enregistrements pour votre équipe. Lorsqu'une réunion est terminée, Circleback traite la conversation et fournit des notes détaillées et des tâches, accompagnées d'une transcription et d'un enregistrement (lorsque disponible). Cela aide les équipes à capturer efficacement les informations, à distribuer les tâches et à s'assurer que rien n'est oublié, le tout intégré de manière transparente dans vos flux de travail.
Avec l'intégration Sim Circleback, vous pouvez :
- **Recevoir des notes de réunion détaillées et des tâches** : collectez automatiquement des résumés de réunion bien formatés et suivez les tâches discutées lors de vos appels.
- **Accéder aux enregistrements et transcriptions complètes des réunions** : obtenez la conversation complète et l'enregistrement associé, facilitant la révision des moments clés ou le partage avec des collègues.
- **Capturer les informations sur les participants et le contexte de la réunion** : les listes de participants, les métadonnées de réunion et les tags aident à garder vos données organisées et exploitables.
- **Transmettre les informations directement dans vos flux de travail** : déclenchez des automatisations ou envoyez les données Circleback vers d'autres systèmes dès qu'une réunion est terminée, en utilisant les puissants déclencheurs webhook de Sim.
**Comment cela fonctionne dans Sim :**
Circleback utilise des déclencheurs webhook : chaque fois qu'une réunion est traitée, les données sont automatiquement transmises à votre agent ou automatisation. Vous pouvez créer d'autres automatisations basées sur :
- Réunion terminée (toutes les données traitées disponibles)
- Nouvelles notes (notes prêtes avant même que la réunion complète ne soit traitée)
- Intégration webhook brute pour des cas d'usage avancés
**Les informations suivantes sont disponibles dans la charge utile du webhook de réunion Circleback :**
| Champ | Type | Description |
|----------------|---------|----------------------------------------------------|
| `id` | number | ID de réunion Circleback |
| `name` | string | Titre de la réunion |
| `url` | string | URL de réunion virtuelle (Zoom, Meet, Teams, etc.) |
| `createdAt` | string | Horodatage de création de la réunion |
| `duration` | number | Durée en secondes |
| `recordingUrl` | string | URL d'enregistrement (valide 24 heures) |
| `tags` | json | Tableau d'étiquettes |
| `icalUid` | string | ID d'événement de calendrier |
| `attendees` | json | Tableau d'objets participants |
| `notes` | string | Notes de réunion en Markdown |
| `actionItems` | json | Tableau d'éléments d'action |
| `transcript` | json | Tableau de segments de transcription |
| `insights` | json | Informations créées par l'utilisateur |
| `meeting` | json | Charge utile complète de la réunion |
Que vous souhaitiez distribuer des résumés instantanés, enregistrer des éléments d'action ou créer des workflows personnalisés déclenchés par de nouvelles données de réunion, Circleback et Sim facilitent la gestion automatique de tout ce qui concerne vos réunions.
{/* MANUAL-CONTENT-END */}
## Instructions d'utilisation
Recevez les notes de réunion, les éléments d'action, les transcriptions et les enregistrements lorsque les réunions sont traitées. Circleback utilise des webhooks pour transmettre les données à vos workflows.
## Remarques
- Catégorie : `triggers`
- Type : `circleback`

View File

@@ -0,0 +1,218 @@
---
title: Grain
description: Accédez aux enregistrements de réunions, transcriptions et résumés IA
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="grain"
color="#F6FAF9"
/>
{/* MANUAL-CONTENT-START:intro */}
[Grain](https://grain.com/) est une plateforme moderne pour capturer, stocker et partager des enregistrements de réunions, des transcriptions, des moments clés et des résumés générés par IA. Grain permet aux équipes de transformer les conversations en informations exploitables et de maintenir tout le monde aligné sur les moments importants des réunions.
Avec Grain, vous pouvez :
- **Accéder aux enregistrements et transcriptions consultables** : trouvez et consultez chaque réunion par mot-clé, participant ou sujet.
- **Partager des moments clés et des extraits** : capturez les moments importants et partagez de courts extraits vidéo/audio avec votre équipe ou dans vos workflows.
- **Obtenir des résumés générés par IA** : produisez automatiquement des résumés de réunions, des actions à entreprendre et des informations clés grâce à l'IA avancée de Grain.
- **Organiser les réunions par équipe ou par type** : étiquetez et catégorisez les enregistrements pour un accès et un reporting faciles.
L'intégration Sim Grain permet à vos agents de :
- Lister, rechercher et récupérer les enregistrements de réunions et leurs détails selon des filtres flexibles (date/heure, participant, équipe, etc.).
- Accéder aux résumés IA, participants, moments clés et autres métadonnées des réunions pour alimenter des automatisations ou des analyses.
- Déclencher des workflows dès que de nouvelles réunions sont traitées, que des résumés sont générés ou que des moments clés sont créés via les webhooks Grain.
- Connecter facilement les données Grain à d'autres outils ou notifier les membres de l'équipe dès qu'un événement important se produit dans une réunion.
Que vous souhaitiez automatiser les actions de suivi, conserver des traces de conversations importantes ou faire remonter des informations dans toute votre organisation, Grain et Sim facilitent la connexion de l'intelligence des réunions à vos workflows.
{/* MANUAL-CONTENT-END */}
## Instructions d'utilisation
Intégrez Grain dans votre workflow. Accédez aux enregistrements de réunions, transcriptions, moments clés et résumés générés par IA. Peut également déclencher des workflows basés sur les événements webhook de Grain.
## Outils
### `grain_list_recordings`
Liste les enregistrements de Grain avec des filtres optionnels et une pagination
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain (jeton d'accès personnel) |
| `cursor` | string | Non | Curseur de pagination pour la page suivante |
| `beforeDatetime` | string | Non | Uniquement les enregistrements avant cet horodatage ISO8601 |
| `afterDatetime` | string | Non | Uniquement les enregistrements après cet horodatage ISO8601 |
| `participantScope` | string | Non | Filtre : « internal » ou « external » |
| `titleSearch` | string | Non | Terme de recherche pour filtrer par titre d'enregistrement |
| `teamId` | string | Non | Filtrer par UUID d'équipe |
| `meetingTypeId` | string | Non | Filtrer par UUID de type de réunion |
| `includeHighlights` | boolean | Non | Inclure les moments forts/extraits dans la réponse |
| `includeParticipants` | boolean | Non | Inclure la liste des participants dans la réponse |
| `includeAiSummary` | boolean | Non | Inclure le résumé généré par IA |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `recordings` | array | Tableau d'objets d'enregistrement |
### `grain_get_recording`
Obtient les détails d'un seul enregistrement par ID
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain (jeton d'accès personnel) |
| `recordingId` | string | Oui | L'UUID de l'enregistrement |
| `includeHighlights` | boolean | Non | Inclure les moments forts/extraits |
| `includeParticipants` | boolean | Non | Inclure la liste des participants |
| `includeAiSummary` | boolean | Non | Inclure le résumé IA |
| `includeCalendarEvent` | boolean | Non | Inclure les données d'événement de calendrier |
| `includeHubspot` | boolean | Non | Inclure les associations HubSpot |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | UUID de l'enregistrement |
| `title` | string | Titre de l'enregistrement |
| `start_datetime` | string | Horodatage de début ISO8601 |
| `end_datetime` | string | Horodatage de fin ISO8601 |
| `duration_ms` | number | Durée en millisecondes |
| `media_type` | string | audio, transcript ou video |
| `source` | string | Source de l'enregistrement \(zoom, meet, teams, etc.\) |
| `url` | string | URL pour visualiser dans Grain |
| `thumbnail_url` | string | URL de l'image miniature |
| `tags` | array | Tableau de chaînes de tags |
| `teams` | array | Équipes auxquelles appartient l'enregistrement |
| `meeting_type` | object | Informations sur le type de réunion \(id, nom, portée\) |
| `highlights` | array | Points forts \(si inclus\) |
| `participants` | array | Participants \(si inclus\) |
| `ai_summary` | object | Texte du résumé IA \(si inclus\) |
| `calendar_event` | object | Données de l'événement de calendrier \(si incluses\) |
| `hubspot` | object | Associations HubSpot \(si incluses\) |
### `grain_get_transcript`
Obtenir la transcription complète d'un enregistrement
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain \(jeton d'accès personnel\) |
| `recordingId` | string | Oui | UUID de l'enregistrement |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `transcript` | array | Tableau de sections de transcription |
### `grain_list_teams`
Lister toutes les équipes dans l'espace de travail
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain (jeton d'accès personnel) |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `teams` | array | Tableau d'objets équipe |
### `grain_list_meeting_types`
Lister tous les types de réunion dans l'espace de travail
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain (jeton d'accès personnel) |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `meeting_types` | array | Tableau d'objets type de réunion |
### `grain_create_hook`
Créer un webhook pour recevoir les événements d'enregistrement
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain (jeton d'accès personnel) |
| `hookUrl` | string | Oui | URL du point de terminaison webhook (doit répondre 2xx) |
| `filterBeforeDatetime` | string | Non | Filtre : enregistrements avant cette date |
| `filterAfterDatetime` | string | Non | Filtre : enregistrements après cette date |
| `filterParticipantScope` | string | Non | Filtre : « internal » ou « external » |
| `filterTeamId` | string | Non | Filtre : UUID d'équipe spécifique |
| `filterMeetingTypeId` | string | Non | Filtre : type de réunion spécifique |
| `includeHighlights` | boolean | Non | Inclure les moments forts dans la charge utile du webhook |
| `includeParticipants` | boolean | Non | Inclure les participants dans la charge utile du webhook |
| `includeAiSummary` | boolean | Non | Inclure le résumé IA dans la charge utile du webhook |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | UUID du hook |
| `enabled` | boolean | Indique si le hook est actif |
| `hook_url` | string | L'URL du webhook |
| `filter` | object | Filtres appliqués |
| `include` | object | Champs inclus |
| `inserted_at` | string | Horodatage de création ISO8601 |
### `grain_list_hooks`
Lister tous les webhooks du compte
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain \(jeton d'accès personnel\) |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `hooks` | array | Tableau d'objets hook |
### `grain_delete_hook`
Supprimer un webhook par ID
#### Entrée
| Paramètre | Type | Requis | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Oui | Clé API Grain \(jeton d'accès personnel\) |
| `hookId` | string | Oui | L'UUID du hook à supprimer |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Vrai lorsque le webhook a été supprimé avec succès |
## Remarques
- Catégorie : `tools`
- Type : `grain`

View File

@@ -38,17 +38,19 @@ Créer un nouveau contact dans Intercom avec email, external_id ou role
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `email` | string | Non | L'adresse email du contact |
| --------- | ---- | ------------ | ----------- |
| `role` | string | Non | Le rôle du contact. Accepte « user » ou « lead ». Par défaut « lead » si non spécifié. |
| `email` | string | Non | L'adresse e-mail du contact |
| `external_id` | string | Non | Un identifiant unique pour le contact fourni par le client |
| `phone` | string | Non | Le numéro de téléphone du contact |
| `name` | string | Non | Le nom du contact |
| `avatar` | string | Non | Une URL d'image d'avatar pour le contact |
| `signed_up_at` | number | Non | L'heure à laquelle l'utilisateur s'est inscrit sous forme d'horodatage Unix |
| `last_seen_at` | number | Non | L'heure à laquelle l'utilisateur a été vu pour la dernière fois sous forme d'horodatage Unix |
| `owner_id` | string | Non | L'identifiant d'un administrateur qui a été assigné comme propriétaire du compte du contact |
| `unsubscribed_from_emails` | boolean | Non | Indique si le contact est désabonné des emails |
| `custom_attributes` | string | Non | Attributs personnalisés sous forme d'objet JSON (par exemple, \{"nom_attribut": "valeur"\}) |
| `signed_up_at` | number | Non | L'heure d'inscription de l'utilisateur sous forme d'horodatage Unix |
| `last_seen_at` | number | Non | L'heure de dernière activité de l'utilisateur sous forme d'horodatage Unix |
| `owner_id` | string | Non | L'identifiant d'un administrateur auquel la propriété du compte du contact a été attribuée |
| `unsubscribed_from_emails` | boolean | Non | Indique si le contact s'est désabonné des e-mails |
| `custom_attributes` | string | Non | Attributs personnalisés sous forme d'objet JSON (par ex., \{"nom_attribut": "valeur"\}) |
| `company_id` | string | Non | Identifiant de l'entreprise à associer au contact lors de la création |
#### Sortie
@@ -81,17 +83,20 @@ Mettre à jour un contact existant dans Intercom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `contactId` | string | Oui | ID du contact à mettre à jour |
| `email` | string | Non | Adresse e-mail du contact |
| `phone` | string | Non | Numéro de téléphone du contact |
| `name` | string | Non | Nom du contact |
| `avatar` | string | Non | URL de l'image d'avatar pour le contact |
| `signed_up_at` | number | Non | Moment où l'utilisateur s'est inscrit, en timestamp Unix |
| `last_seen_at` | number | Non | Moment où l'utilisateur a été vu pour la dernière fois, en timestamp Unix |
| `owner_id` | string | Non | ID d'un administrateur qui a été assigné comme propriétaire du compte du contact |
| `unsubscribed_from_emails` | boolean | Non | Indique si le contact est désabonné des e-mails |
| `custom_attributes` | string | Non | Attributs personnalisés sous forme d'objet JSON (par exemple, \{"nom_attribut": "valeur"\}) |
| --------- | ---- | ------------ | ----------- |
| `contactId` | string | Oui | Identifiant du contact à mettre à jour |
| `role` | string | Non | Le rôle du contact. Accepte « user » ou « lead ». |
| `external_id` | string | Non | Un identifiant unique pour le contact fourni par le client |
| `email` | string | Non | L'adresse e-mail du contact |
| `phone` | string | Non | Le numéro de téléphone du contact |
| `name` | string | Non | Le nom du contact |
| `avatar` | string | Non | Une URL d'image d'avatar pour le contact |
| `signed_up_at` | number | Non | L'heure d'inscription de l'utilisateur sous forme d'horodatage Unix |
| `last_seen_at` | number | Non | L'heure de dernière activité de l'utilisateur sous forme d'horodatage Unix |
| `owner_id` | string | Non | L'identifiant d'un administrateur auquel la propriété du compte du contact a été attribuée |
| `unsubscribed_from_emails` | boolean | Non | Indique si le contact s'est désabonné des e-mails |
| `custom_attributes` | string | Non | Attributs personnalisés sous forme d'objet JSON (par ex., \{"nom_attribut": "valeur"\}) |
| `company_id` | string | Non | Identifiant de l'entreprise à associer au contact |
#### Sortie
@@ -125,10 +130,12 @@ Rechercher des contacts dans Intercom à l'aide d'une requête
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `query` | chaîne | Oui | Requête de recherche \(ex., \{"field":"email","operator":"=","value":"user@example.com"\}\) |
| `per_page` | nombre | Non | Nombre de résultats par page \(max : 150\) |
| `starting_after` | chaîne | Non | Curseur pour la pagination |
| --------- | ---- | ----------- | ----------- |
| `query` | string | Oui | Requête de recherche \(par ex., \{"field":"email","operator":"=","value":"user@example.com"\}\) |
| `per_page` | number | Non | Nombre de résultats par page \(max : 150\) |
| `starting_after` | string | Non | Curseur pour la pagination |
| `sort_field` | string | Non | Champ de tri \(par ex., "name", "created_at", "last_seen_at"\) |
| `sort_order` | string | Non | Ordre de tri : "ascending" ou "descending" |
#### Sortie
@@ -161,15 +168,16 @@ Créer ou mettre à jour une entreprise dans Intercom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ---------- | ----------- |
| --------- | ---- | ----------- | ----------- |
| `company_id` | string | Oui | Votre identifiant unique pour l'entreprise |
| `name` | string | Non | Le nom de l'entreprise |
| `website` | string | Non | Le site web de l'entreprise |
| `plan` | string | Non | Le nom du forfait de l'entreprise |
| `plan` | string | Non | Le nom du plan de l'entreprise |
| `size` | number | Non | Le nombre d'employés dans l'entreprise |
| `industry` | string | Non | Le secteur d'activité de l'entreprise |
| `monthly_spend` | number | Non | Le montant des revenus que l'entreprise génère pour votre activité. Remarque : ce champ tronque les décimales en nombres entiers (par exemple, 155,98 devient 155) |
| `monthly_spend` | number | Non | Le chiffre d'affaires que l'entreprise génère pour votre activité. Remarque : ce champ tronque les nombres décimaux en entiers \(par ex., 155,98 devient 155\) |
| `custom_attributes` | string | Non | Attributs personnalisés sous forme d'objet JSON |
| `remote_created_at` | number | Non | La date de création de l'entreprise par vous sous forme d'horodatage Unix |
#### Sortie
@@ -205,6 +213,7 @@ Liste toutes les entreprises d'Intercom avec prise en charge de la pagination. R
| --------- | ---- | ----------- | ----------- |
| `per_page` | number | Non | Nombre de résultats par page |
| `page` | number | Non | Numéro de page |
| `starting_after` | string | Non | Curseur pour la pagination \(préféré à la pagination par page\) |
#### Sortie
@@ -220,9 +229,10 @@ Récupérer une seule conversation par ID depuis Intercom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Oui | ID de la conversation à récupérer |
| `display_as` | string | Non | Définir à "plaintext" pour récupérer les messages en texte brut |
| `display_as` | string | Non | Définir sur "plaintext" pour récupérer les messages en texte brut |
| `include_translations` | boolean | Non | Lorsque true, les parties de la conversation seront traduites dans la langue détectée de la conversation |
#### Sortie
@@ -238,9 +248,11 @@ Lister toutes les conversations depuis Intercom avec prise en charge de la pagin
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| --------- | ---- | -------- | ----------- |
| `per_page` | number | Non | Nombre de résultats par page \(max : 150\) |
| `starting_after` | string | Non | Curseur pour la pagination |
| `sort` | string | Non | Champ de tri \(ex., "waiting_since", "updated_at", "created_at"\) |
| `order` | string | Non | Ordre de tri : "asc" \(croissant\) ou "desc" \(décroissant\) |
#### Sortie
@@ -256,12 +268,13 @@ Répondre à une conversation en tant qu'administrateur dans Intercom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ---------- | ----------- |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | Oui | ID de la conversation à laquelle répondre |
| `message_type` | string | Oui | Type de message : "comment" ou "note" |
| `body` | string | Oui | Le corps du texte de la réponse |
| `admin_id` | string | Non | L'ID de l'administrateur qui rédige la réponse. Si non fourni, un administrateur par défaut (Operator/Fin) sera utilisé. |
| `attachment_urls` | string | Non | Liste d'URLs d'images séparées par des virgules (max 10) |
| `body` | string | Oui | Corps du texte de la réponse |
| `admin_id` | string | Non | ID de l'administrateur qui rédige la réponse. Si non fourni, un administrateur par défaut \(Operator/Fin\) sera utilisé. |
| `attachment_urls` | string | Non | Liste d'URL d'images séparées par des virgules \(max 10\) |
| `created_at` | number | Non | Horodatage Unix du moment où la réponse a été créée. Si non fourni, l'heure actuelle est utilisée. |
#### Sortie
@@ -277,10 +290,12 @@ Rechercher des conversations dans Intercom à l'aide d'une requête
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| --------- | ---- | ----------- | ----------- |
| `query` | string | Oui | Requête de recherche sous forme d'objet JSON |
| `per_page` | number | Non | Nombre de résultats par page (max : 150) |
| `per_page` | number | Non | Nombre de résultats par page \(max : 150\) |
| `starting_after` | string | Non | Curseur pour la pagination |
| `sort_field` | string | Non | Champ de tri \(par exemple, "created_at", "updated_at"\) |
| `sort_order` | string | Non | Ordre de tri : "ascending" ou "descending" |
#### Sortie
@@ -296,10 +311,14 @@ Créer un nouveau ticket dans Intercom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| --------- | ---- | ----------- | ----------- |
| `ticket_type_id` | string | Oui | L'ID du type de ticket |
| `contacts` | string | Oui | Tableau JSON d'identifiants de contact (par ex., \[\{"id": "contact_id"\}\]) |
| `contacts` | string | Oui | Tableau JSON d'identifiants de contacts \(par exemple, \[\{"id": "contact_id"\}\]\) |
| `ticket_attributes` | string | Oui | Objet JSON avec les attributs du ticket incluant _default_title_ et _default_description_ |
| `company_id` | string | Non | ID de l'entreprise à associer au ticket |
| `created_at` | number | Non | Horodatage Unix du moment où le ticket a été créé. Si non fourni, l'heure actuelle est utilisée. |
| `conversation_to_link_id` | string | Non | ID d'une conversation existante à lier à ce ticket |
| `disable_notifications` | boolean | Non | Lorsque défini sur true, supprime les notifications lors de la création du ticket |
#### Sortie
@@ -332,14 +351,16 @@ Créer et envoyer un nouveau message initié par l'administrateur dans Intercom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `message_type` | string | Oui | Type de message : "inapp" ou "email" |
| `subject` | string | Non | Objet du message (pour le type email) |
| `body` | string | Oui | Corps du message |
| --------- | ---- | ----------- | ----------- |
| `message_type` | string | Oui | Type de message : "inapp" pour les messages in-app ou "email" pour les messages e-mail |
| `template` | string | Oui | Style du modèle de message : "plain" pour texte brut ou "personal" pour style personnalisé |
| `subject` | string | Non | Le sujet du message \(pour le type e-mail\) |
| `body` | string | Oui | Le corps du message |
| `from_type` | string | Oui | Type d'expéditeur : "admin" |
| `from_id` | string | Oui | ID de l'administrateur qui envoie le message |
| `from_id` | string | Oui | L'ID de l'administrateur qui envoie le message |
| `to_type` | string | Oui | Type de destinataire : "contact" |
| `to_id` | string | Oui | ID du contact qui reçoit le message |
| `to_id` | string | Oui | L'ID du contact qui reçoit le message |
| `created_at` | number | Non | Horodatage Unix du moment où le message a été créé. Si non fourni, l'heure actuelle est utilisée. |
#### Sortie

View File

@@ -61,8 +61,6 @@ Extrayez et traitez le contenu web en texte propre et adapté aux LLM avec Jina
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `content` | string | Le contenu extrait de l'URL, traité en texte propre et adapté aux LLM |
| `links` | array | Liste des liens trouvés sur la page (lorsque gatherLinks ou withLinksummary est activé) |
| `images` | array | Liste des images trouvées sur la page (lorsque withImagesummary est activé) |
### `jina_search`

View File

@@ -1,6 +1,6 @@
---
title: Mémoire
description: Ajouter un stockage de mémoire
description: Ajouter un magasin de mémoire
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
@@ -12,53 +12,50 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
## Instructions d'utilisation
Intégrer la mémoire dans le flux de travail. Peut ajouter, obtenir une mémoire, obtenir toutes les mémoires et supprimer des mémoires.
Intégrer la mémoire dans le flux de travail. Permet d'ajouter, d'obtenir une mémoire, d'obtenir toutes les mémoires et de supprimer des mémoires.
## Outils
### `memory_add`
Ajoutez une nouvelle mémoire à la base de données ou complétez une mémoire existante avec le même ID.
Ajouter une nouvelle mémoire à la base de données ou ajouter à une mémoire existante avec le même ID.
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ---------- | ----------- |
| `conversationId` | chaîne | Non | Identifiant de conversation (par ex., user-123, session-abc). Si une mémoire avec cet identifiant de conversation existe déjà pour ce bloc, le nouveau message y sera ajouté. |
| --------- | ---- | ----------- | ----------- |
| `conversationId` | chaîne | Non | Identifiant de conversation \(par ex., user-123, session-abc\). Si une mémoire avec cet identifiant existe déjà, le nouveau message y sera ajouté. |
| `id` | chaîne | Non | Paramètre hérité pour l'identifiant de conversation. Utilisez conversationId à la place. Fourni pour la rétrocompatibilité. |
| `role` | chaîne | Oui | Rôle pour la mémoire de l'agent (user, assistant, ou system) |
| `role` | chaîne | Oui | Rôle pour la mémoire de l'agent \(user, assistant ou system\) |
| `content` | chaîne | Oui | Contenu pour la mémoire de l'agent |
| `blockId` | chaîne | Non | ID de bloc optionnel. Si non fourni, utilise l'ID du bloc actuel du contexte d'exécution, ou par défaut "default". |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Indique si la mémoire a été ajoutée avec succès |
| `memories` | array | Tableau d'objets de mémoire incluant la nouvelle mémoire ou celle mise à jour |
| `error` | string | Message d'erreur si l'opération a échoué |
| `success` | booléen | Indique si la mémoire a été ajoutée avec succès |
| `memories` | tableau | Tableau d'objets mémoire incluant la mémoire nouvelle ou mise à jour |
| `error` | chaîne | Message d'erreur en cas d'échec de l'opération |
### `memory_get`
Récupérer la mémoire par conversationId, blockId, blockName, ou une combinaison. Renvoie toutes les mémoires correspondantes.
Récupérer la mémoire par conversationId. Renvoie les mémoires correspondantes.
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ---------- | ----------- |
| `conversationId` | chaîne | Non | Identifiant de conversation (par ex., user-123, session-abc). Si fourni seul, renvoie toutes les mémoires pour cette conversation à travers tous les blocs. |
| --------- | ---- | ----------- | ----------- |
| `conversationId` | chaîne | Non | Identifiant de conversation \(par ex., user-123, session-abc\). Renvoie les mémoires pour cette conversation. |
| `id` | chaîne | Non | Paramètre hérité pour l'identifiant de conversation. Utilisez conversationId à la place. Fourni pour la rétrocompatibilité. |
| `blockId` | chaîne | Non | Identifiant de bloc. Si fourni seul, renvoie toutes les mémoires pour ce bloc à travers toutes les conversations. Si fourni avec conversationId, renvoie les mémoires pour cette conversation spécifique dans ce bloc. |
| `blockName` | chaîne | Non | Nom du bloc. Alternative à blockId. Si fourni seul, renvoie toutes les mémoires pour les blocs avec ce nom. Si fourni avec conversationId, renvoie les mémoires pour cette conversation dans les blocs avec ce nom. |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Indique si la mémoire a été récupérée avec succès |
| `memories` | tableau | Tableau d'objets de mémoire avec les champs conversationId, blockId, blockName et data |
| `memories` | tableau | Tableau d'objets mémoire avec les champs conversationId et data |
| `message` | chaîne | Message de succès ou d'erreur |
| `error` | chaîne | Message d'erreur si l'opération a échoué |
| `error` | chaîne | Message d'erreur en cas d'échec |
### `memory_get_all`
@@ -74,30 +71,28 @@ Récupérer toutes les mémoires de la base de données
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Indique si toutes les mémoires ont été récupérées avec succès |
| `memories` | tableau | Tableau de tous les objets de mémoire avec les champs key, conversationId, blockId, blockName et data |
| `memories` | tableau | Tableau de tous les objets mémoire avec les champs key, conversationId et data |
| `message` | chaîne | Message de succès ou d'erreur |
| `error` | chaîne | Message d'erreur si l'opération a échoué |
| `error` | chaîne | Message d'erreur en cas d'échec |
### `memory_delete`
Supprimer des mémoires par conversationId, blockId, blockName, ou une combinaison. Prend en charge la suppression en masse.
Supprimer les mémoires par conversationId.
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `conversationId` | chaîne | Non | Identifiant de conversation \(par exemple, user-123, session-abc\). Si fourni seul, supprime toutes les mémoires pour cette conversation dans tous les blocs. |
| `conversationId` | chaîne | Non | Identifiant de conversation (par ex., user-123, session-abc). Supprime toutes les mémoires pour cette conversation. |
| `id` | chaîne | Non | Paramètre hérité pour l'identifiant de conversation. Utilisez conversationId à la place. Fourni pour la rétrocompatibilité. |
| `blockId` | chaîne | Non | Identifiant de bloc. Si fourni seul, supprime toutes les mémoires pour ce bloc dans toutes les conversations. Si fourni avec conversationId, supprime les mémoires pour cette conversation spécifique dans ce bloc. |
| `blockName` | chaîne | Non | Nom du bloc. Alternative à blockId. Si fourni seul, supprime toutes les mémoires pour les blocs avec ce nom. Si fourni avec conversationId, supprime les mémoires pour cette conversation dans les blocs avec ce nom. |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Indique si le souvenir a été supprimé avec succès |
| `success` | booléen | Indique si la mémoire a été supprimée avec succès |
| `message` | chaîne | Message de succès ou d'erreur |
| `error` | chaîne | Message d'erreur si l'opération a échoué |
| `error` | chaîne | Message d'erreur en cas d'échec |
## Notes

View File

@@ -47,12 +47,13 @@ Interroger des données d'une table Supabase
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `projectId` | chaîne | Oui | Votre ID de projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | chaîne | Oui | Le nom de la table Supabase à interroger |
| `filter` | chaîne | Non | Filtre PostgREST \(ex. : "id=eq.123"\) |
| `orderBy` | chaîne | Non | Colonne pour le tri \(ajoutez DESC pour décroissant\) |
| `limit` | nombre | Non | Nombre maximum de lignes à retourner |
| `apiKey` | chaîne | Oui | Votre clé secrète de rôle de service Supabase |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase à interroger |
| `schema` | string | Non | Schéma de base de données à interroger \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `filter` | string | Non | Filtre PostgREST \(ex. : "id=eq.123"\) |
| `orderBy` | string | Non | Colonne pour le tri \(ajoutez DESC pour l'ordre décroissant\) |
| `limit` | number | Non | Nombre maximum de lignes à retourner |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
#### Sortie
@@ -69,10 +70,11 @@ Insérer des données dans une table Supabase
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `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 |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase dans laquelle insérer des données |
| `schema` | string | Non | Schéma de base de données dans lequel insérer \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `data` | array | Oui | Les données à insérer \(tableau d'objets ou un seul objet\) |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
#### Sortie
@@ -89,9 +91,10 @@ Obtenir une seule ligne d'une table Supabase selon des critères de filtrage
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `projectId` | string | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase à interroger |
| `filter` | string | Oui | Filtre PostgREST pour trouver la ligne spécifique (ex. : "id=eq.123") |
| `schema` | string | Non | Schéma de base de données à interroger \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `filter` | string | Oui | Filtre PostgREST pour trouver la ligne spécifique \(ex. : "id=eq.123"\) |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
#### Sortie
@@ -109,9 +112,10 @@ Mettre à jour des lignes dans une table Supabase selon des critères de filtrag
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `projectId` | string | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase à mettre à jour |
| `filter` | string | Oui | Filtre PostgREST pour identifier les lignes à mettre à jour (ex. : "id=eq.123") |
| `schema` | string | Non | Schéma de base de données dans lequel mettre à jour \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `filter` | string | Oui | Filtre PostgREST pour identifier les lignes à mettre à jour \(ex. : "id=eq.123"\) |
| `data` | object | Oui | Données à mettre à jour dans les lignes correspondantes |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
@@ -130,9 +134,10 @@ Supprimer des lignes d'une table Supabase selon des critères de filtrage
| 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 d'où supprimer des lignes |
| `filter` | string | Oui | Filtre PostgREST pour identifier les lignes à supprimer (ex. : "id=eq.123") |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase à partir de laquelle supprimer |
| `schema` | string | Non | Schéma de base de données à partir duquel supprimer \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `filter` | string | Oui | Filtre PostgREST pour identifier les lignes à supprimer \(ex. : "id=eq.123"\) |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
#### Sortie
@@ -150,10 +155,11 @@ Insérer ou mettre à jour des données dans une table Supabase (opération upse
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `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 |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase dans laquelle effectuer l'upsert |
| `schema` | string | Non | Schéma de base de données dans lequel effectuer l'upsert \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `data` | array | Oui | Les données à insérer ou mettre à jour \(upsert\) - tableau d'objets ou un seul objet |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
#### Sortie
@@ -170,11 +176,12 @@ Compter les lignes dans une table Supabase
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `projectId` | chaîne | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
| `table` | chaîne | Oui | Le nom de la table Supabase dont compter les lignes |
| `filter` | chaîne | Non | Filtre PostgREST (ex. : "status=eq.active") |
| `countType` | chaîne | Non | Type de comptage : exact, planned ou estimated (par défaut : exact) |
| `apiKey` | chaîne | Oui | Votre clé secrète de rôle de service Supabase |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase dont compter les lignes |
| `schema` | string | Non | Schéma de base de données à partir duquel compter \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `filter` | string | Non | Filtre PostgREST \(ex. : "status=eq.active"\) |
| `countType` | string | Non | Type de comptage : exact, planned ou estimated \(par défaut : exact\) |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
#### Sortie
@@ -191,14 +198,15 @@ Effectuer une recherche en texte intégral sur une table Supabase
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| `projectId` | chaîne | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
| `table` | chaîne | Oui | Le nom de la table Supabase à rechercher |
| `column` | chaîne | Oui | La colonne dans laquelle rechercher |
| `query` | chaîne | Oui | La requête de recherche |
| `searchType` | chaîne | Non | Type de recherche : plain, phrase ou websearch (par défaut : websearch) |
| `language` | chaîne | Non | Langue pour la configuration de recherche textuelle (par défaut : english) |
| `limit` | nombre | Non | Nombre maximum de lignes à retourner |
| `apiKey` | chaîne | Oui | Votre clé secrète de rôle de service Supabase |
| `projectId` | string | Oui | L'ID de votre projet Supabase \(ex. : jdrkgepadsdopsntdlom\) |
| `table` | string | Oui | Le nom de la table Supabase à rechercher |
| `schema` | string | Non | Schéma de base de données dans lequel rechercher \(par défaut : public\). Utilisez ceci pour accéder aux tables dans d'autres schémas. |
| `column` | string | Oui | La colonne dans laquelle rechercher |
| `query` | string | Oui | La requête de recherche |
| `searchType` | string | Non | Type de recherche : plain, phrase ou websearch \(par défaut : websearch\) |
| `language` | string | Non | Langue pour la configuration de recherche textuelle \(par défaut : english\) |
| `limit` | number | Non | Nombre maximum de lignes à retourner |
| `apiKey` | string | Oui | Votre clé secrète de rôle de service Supabase |
#### Sortie

View File

@@ -49,6 +49,7 @@ Envoyez une requête de complétion de chat à n'importe quel fournisseur de LLM
| `azureApiVersion` | string | Non | Version de l'API Azure OpenAI |
| `vertexProject` | string | Non | ID du projet Google Cloud pour Vertex AI |
| `vertexLocation` | string | Non | Emplacement Google Cloud pour Vertex AI \(par défaut us-central1\) |
| `vertexCredential` | string | Non | ID des identifiants OAuth Google Cloud pour Vertex AI |
#### Sortie

View File

@@ -5,7 +5,6 @@ title: Planification
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
Le bloc Planification déclenche automatiquement des workflows de manière récurrente à des intervalles ou moments spécifiés.
@@ -21,67 +20,58 @@ Le bloc Planification déclenche automatiquement des workflows de manière récu
## Options de planification
Configurez quand votre workflow s'exécute en utilisant les options du menu déroulant :
Configurez quand votre workflow s'exécute :
<Tabs items={['Intervalles simples', 'Expressions cron']}>
<Tab>
<ul className="list-disc space-y-1 pl-6">
<li><strong>Toutes les quelques minutes</strong> : intervalles de 5, 15, 30 minutes</li>
<li><strong>Toutes les heures</strong> : chaque heure ou toutes les quelques heures</li>
<li><strong>Quotidien</strong> : une ou plusieurs fois par jour</li>
<li><strong>Hebdomadaire</strong> : jours spécifiques de la semaine</li>
<li><strong>Mensuel</strong> : jours spécifiques du mois</li>
<li><strong>Toutes les X minutes</strong> : exécution à intervalles de minutes (1-1440)</li>
<li><strong>Toutes les heures</strong> : exécution à une minute spécifique chaque heure</li>
<li><strong>Quotidien</strong> : exécution à une heure spécifique chaque jour</li>
<li><strong>Hebdomadaire</strong> : exécution un jour et une heure spécifiques chaque semaine</li>
<li><strong>Mensuel</strong> : exécution un jour et une heure spécifiques chaque mois</li>
</ul>
</Tab>
<Tab>
<p>Utilisez des expressions cron pour une planification avancée :</p>
<p>Utilisez les expressions cron pour une planification avancée :</p>
<div className="text-sm space-y-1">
<div><code>0 9 * * 1-5</code> - Chaque jour de semaine à 9h</div>
<div><code>0 9 * * 1-5</code> - Chaque jour de semaine à 9 h</div>
<div><code>*/15 * * * *</code> - Toutes les 15 minutes</div>
<div><code>0 0 1 * *</code> - Premier jour de chaque mois</div>
</div>
</Tab>
</Tabs>
## Configuration des planifications
## Activation
Lorsqu'un workflow est planifié :
- La planification devient **active** et affiche la prochaine heure d'exécution
- Cliquez sur le bouton **"Planifié"** pour désactiver la planification
- Les planifications se désactivent automatiquement après **3 échecs consécutifs**
Les planifications sont liées au déploiement du workflow :
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-2.png"
alt="Bloc de planification actif"
width={500}
height={400}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Planification désactivée"
width={500}
height={350}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Planification désactivée"
width={500}
height={400}
className="my-6"
/>
</div>
Les planifications désactivées indiquent quand elles ont été actives pour la dernière fois. Cliquez sur le badge **"Désactivé"** pour réactiver la planification.
- **Déployer le workflow** → la planification devient active et commence à s'exécuter
- **Annuler le déploiement du workflow** → la planification est supprimée
- **Redéployer le workflow** → la planification est recréée avec la configuration actuelle
<Callout>
Les blocs de planification ne peuvent pas recevoir de connexions entrantes et servent uniquement de déclencheurs de workflow.
Vous devez déployer votre workflow pour que la planification commence à s'exécuter. Configurez le bloc de planification, puis déployez depuis la barre d'outils.
</Callout>
## Désactivation automatique
Les planifications se désactivent automatiquement après **10 échecs consécutifs** pour éviter les erreurs incontrôlées. Lorsqu'elle est désactivée :
- Un badge d'avertissement apparaît sur le bloc de planification
- La planification cesse de s'exécuter
- Cliquez sur le badge pour réactiver la planification
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="Planification désactivée"
width={500}
height={400}
className="my-6"
/>
</div>
<Callout>
Les blocs de planification ne peuvent pas recevoir de connexions entrantes et servent uniquement de points d'entrée de workflow.
</Callout>

View File

@@ -49,40 +49,40 @@ AIブロックを使用するワークフローでは、ログで詳細なコス
<Tabs items={['Hosted Models', 'Bring Your Own API Key']}>
<Tab>
**ホステッドモデル** - Simは2.5倍の価格倍率でAPIキーを提供します
**ホステッドモデル** - Simは2倍の価格乗数でAPIキーを提供します
**OpenAI**
| モデル | 基本価格(入力/出力) | ホステッド価格(入力/出力) |
|-------|---------------------------|----------------------------|
| GPT-5.1 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.63 / $5.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.13 / $1.00 |
| GPT-4o | $2.50 / $10.00 | $6.25 / $25.00 |
| GPT-4.1 | $2.00 / $8.00 | $5.00 / $20.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $1.00 / $4.00 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.25 / $1.00 |
| o1 | $15.00 / $60.00 | $37.50 / $150.00 |
| o3 | $2.00 / $8.00 | $5.00 / $20.00 |
| o4 Mini | $1.10 / $4.40 | $2.75 / $11.00 |
| GPT-5.1 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.50 / $4.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.10 / $0.80 |
| GPT-4o | $2.50 / $10.00 | $5.00 / $20.00 |
| GPT-4.1 | $2.00 / $8.00 | $4.00 / $16.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $0.80 / $3.20 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.20 / $0.80 |
| o1 | $15.00 / $60.00 | $30.00 / $120.00 |
| o3 | $2.00 / $8.00 | $4.00 / $16.00 |
| o4 Mini | $1.10 / $4.40 | $2.20 / $8.80 |
**Anthropic**
| モデル | 基本価格(入力/出力) | ホステッド価格(入力/出力) |
|-------|---------------------------|----------------------------|
| Claude Opus 4.5 | $5.00 / $25.00 | $12.50 / $62.50 |
| Claude Opus 4.1 | $15.00 / $75.00 | $37.50 / $187.50 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.50 / $12.50 |
| Claude Opus 4.5 | $5.00 / $25.00 | $10.00 / $50.00 |
| Claude Opus 4.1 | $15.00 / $75.00 | $30.00 / $150.00 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.00 / $10.00 |
**Google**
| モデル | 基本価格(入力/出力) | ホステッド価格(入力/出力) |
|-------|---------------------------|----------------------------|
| Gemini 3 Pro Preview | $2.00 / $12.00 | $5.00 / $30.00 |
| Gemini 2.5 Pro | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 2.5 Flash | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 3 Pro Preview | $2.00 / $12.00 | $4.00 / $24.00 |
| Gemini 2.5 Pro | $1.25 / $10.00 | $2.50 / $20.00 |
| Gemini 2.5 Flash | $0.30 / $2.50 | $0.60 / $5.00 |
*2.5倍の倍率はインフラストラクチャとAPI管理コストをカバーしています。*
*2倍の乗数は、インフラストラクチャとAPI管理コストをカバーします。*
</Tab>
<Tab>
@@ -185,12 +185,12 @@ curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" htt
サブスクリプションプランによって使用制限が異なります:
| プラン | 月間使用制限 | レート制限(分あたり |
| プラン | 月間使用制限 | レート制限(分) |
|------|-------------------|-------------------------|
| **無料** | $10 | 5同期、10非同期 |
| **プロ** | $100 | 10同期、50非同期 |
| **チーム** | $500プール | 50同期100非同期 |
| **エンタープライズ** | カスタム | カスタム |
| **Free** | $20 | 同期5、非同期10 |
| **Pro** | $100 | 同期10、非同期50 |
| **Team** | $500プール | 同期50、非同期100 |
| **Enterprise** | カスタム | カスタム |
## 課金モデル

View File

@@ -34,81 +34,87 @@ SimはPDF、WordDOC/DOCX、プレーンテキストTXT、Markdown
<Image src="/static/knowledgebase/knowledgebase.png" alt="処理されたコンテンツを表示するドキュメントチャンクビュー" width={800} height={500} />
### チャンク設定
- **デフォルトチャンクサイズ**: 1,024文字
- **設定可能範囲**: チャンクあたり100〜4,000文字
- **スマートオーバーラップ**: コンテキスト保持のためデフォルトで200文字
- **階層的分割**: 文書構造(セクション、段落、文)を尊重
ナレッジベースを作成する際、ドキュメントをチャンクに分割する方法を設定できます。
| 設定 | 単位 | デフォルト | 範囲 | 説明 |
|---------|------|---------|-------|-------------|
| **最大チャンクサイズ** | トークン | 1,024 | 100-4,000 | 各チャンクの最大サイズ1トークン ≈ 4文字 |
| **最小チャンクサイズ** | 文字 | 1 | 1-2,000 | 小さな断片を避けるための最小チャンクサイズ |
| **オーバーラップ** | 文字 | 200 | 0-500 | 連続するチャンク間のコンテキストオーバーラップ |
- **階層的分割**: ドキュメント構造(セクション、段落、文)を尊重
### 編集機能
- **チャンク内容の編集**: 個々のチャンクのテキスト内容を修正
- **チャンク境界の調整**: 必要に応じてチャンク結合分割
- **チャンクコンテンツの編集**: 個々のチャンクのテキストコンテンツを変更
- **チャンク境界の調整**: 必要に応じてチャンク結合または分割
- **メタデータの追加**: 追加のコンテキストでチャンクを強化
- **一括操作**: 複数のチャンクを効率的に管理
## 高度なPDF処理
PDFドキュメントについて、Simは強化された処理機能を提供します
PDFドキュメントに対して、Simは強化された処理機能を提供します
### OCRサポート
Azureまたは[Mistral OCR](https://docs.mistral.ai/ocr/)で構成されている場合
- **スキャンされたドキュメント処理**: 画像ベースのPDFからテキストを抽出
- **混合コンテンツ処理**: テキストと画像の両方を含むPDFを処理
- **高精度**: 高度なAIモデル正確なテキスト抽出を保証
Azureまたは[Mistral OCR](https://docs.mistral.ai/ocr/)で設定されている場合:
- **スキャンされたドキュメント処理**: 画像ベースのPDFからテキストを抽出
- **混合コンテンツ処理**: テキストと画像の両方を含むPDFを処理
- **高精度**: 高度なAIモデルにより正確なテキスト抽出を保証
## ワークフローでのナレッジブロックの使用
ドキュメントが処理されると、ナレッジブロックを通じてAIワークフローで使用できるようになります。これにより検索拡張生成RAGが可能になり、AIエージェントがドキュメントの内容にアクセスして推論し、より正確でコンテキストに沿った答を提供できます。
ドキュメントが処理されると、ナレッジブロックを通じてAIワークフローで使用できます。これにより検索拡張生成RAGが可能になり、AIエージェントがドキュメントコンテンツにアクセスして推論し、より正確でコンテキストに沿った答を提供できます。
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="ワークフローでのナレッジブロックの使用" width={800} height={500} />
### ナレッジブロックの機能
- **意味検索**: 自然言語クエリを使用して関連コンテンツを検索
- **コンテキスト統合**: エージェントプロンプトに関連チャンクを自動的に含める
- **動的検索**: ワークフロー実行中にリアルタイムで検索が行われる
- **関連性スコアリング**: 意味的類似によって結果ランク付け
- **セマンティック検索**: 自然言語クエリを使用して関連コンテンツを検索
- **コンテキスト統合**: 関連するチャンクをエージェントプロンプトに自動的に含める
- **動的検索**: ワークフロー実行中にリアルタイムで検索を実行
- **関連性スコアリング**: セマンティック類似によって結果ランク付け
### 統合オプション
- **システムプロンプト**: AIエージェントにコンテキストを提供
- **動的コンテキスト**: 会話中に関連情報を検索して含める
- **複数ドキュメント検索**: ナレッジベース全体を横断して検索
- **フィルター検索**: タグと組み合わせて正確なコンテンツ検索
- **複数ドキュメント検索**: ナレッジベース全体をクエリ
- **フィルター検索**: タグと組み合わせて正確なコンテンツ取得
## ベクトル検索技術
Simは[pgvector](https://github.com/pgvector/pgvector)を活用したベクトル検索を使用して、コンテンツの意味とコンテキストを理解します
Simは[pgvector](https://github.com/pgvector/pgvector)を活用したベクトル検索により、コンテンツの意味とコンテキストを理解します
### 意味的理解
- **コンテキスト検索**正確なキーワードが一致しなくても関連コンテンツを見つける
- **概念ベースの検索**アイデア間の関係を理解
- **多言語サポート**異なる言語間で機能
- **同義語認識**関連する用語概念を見つける
### セマンティック理解
- **コンテキスト検索**: 正確なキーワードが一致しない場合でも関連コンテンツを検索
- **概念ベースの取得**: アイデア間の関係を理解
- **多言語サポート**: 異なる言語間で動作
- **同義語認識**: 関連する用語概念を検索
### 検索機能
- **自然言語クエリ**平易な日本語で質問できる
- **類似検索**概念的に類似したコンテンツを見つける
- **ハイブリッド検索**ベクトル検索と従来のキーワード検索を組み合わせ
- **結果の設定**結果の数と関連性の値を制御
- **自然言語クエリ**: 平易な語で質問
- **類似検索**: 概念的に類似したコンテンツを検索
- **ハイブリッド検索**: ベクトル検索と従来のキーワード検索を組み合わせ
- **設定可能な結果**: 結果の数と関連性のしきい値を制御
## ドキュメント管理
### 整理機能
- **一括アップロード**非同期APIを通じて複数ファイルを一度にアップロード
- **処理状況**ドキュメント処理のリアルタイム更新
- **検索とフィルタリング**大規模なコレクションからドキュメントを素早く見つける
- **メタデータ追跡**ファイル情報と処理詳細の自動キャプチャ
- **一括アップロード**: 非同期API経由で複数ファイルを一度にアップロード
- **処理ステータス**: ドキュメント処理のリアルタイム更新
- **検索とフィルター**: 大規模なコレクション内でドキュメントを素早く検索
- **メタデータ追跡**: ファイル情報と処理詳細の自動キャプチャ
### セキュリティとプライバシー
- **安全なストレージ**エンタープライズグレードのセキュリティでドキュメントを保存
- **アクセス制御**ワークスペースベースの権限
- **処理の分離**各ワークスペースは分離されたドキュメント処理を持つ
- **データ保持**ドキュメント保持ポリシー設定
- **安全なストレージ**: エンタープライズグレードのセキュリティでドキュメントを保存
- **アクセス制御**: ワークスペースベースの権限
- **処理の分離**: 各ワークスペースは分離されたドキュメント処理を実施
- **データ保持**: ドキュメント保持ポリシー設定
## はじめに
1. **ナレッジベースに移動**ワークスペースのサイドバーからアクセス
2. **ドキュメントアップロード**ドラッグドロップまたはファイルを選択してアップロード
3. **処理監視**ドキュメントが処理されチャンク化される過程を確認
4. **チャンク探索**処理されたコンテンツを表示編集
5. **ワークフローへの追加**:ナレッジブロックを使用してAIエージェントと統合
1. **ナレッジベースに移動**: ワークスペースのサイドバーからアクセス
2. **ドキュメントアップロード**: ドラッグアンドドロップまたはファイルを選択してアップロード
3. **処理監視**: ドキュメントが処理されチャンク化される様子を確認
4. **チャンク探索**: 処理されたコンテンツを表示および編集
5. **ワークフロー追加**: Knowledgeブロックを使用してAIエージェントと統合
ナレッジベースは静的なドキュメントを、AIワークフローがより情報に基づいた文脈的な応答のために活用できる、インテリジェントで検索可能なリソースに変換します。
ナレッジベースは静的なドキュメントをインテリジェントで検索可能なリソースに変換し、AIワークフローがより情報に基づいた文脈に応じた応答を活用できるようにします。

View File

@@ -0,0 +1,59 @@
---
title: Circleback
description: AI搭載の議事録とアクションアイテム
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="circleback"
color="linear-gradient(180deg, #E0F7FA 0%, #FFFFFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Circleback](https://circleback.ai/)は、チームの議事録、アクションアイテム、文字起こし、録音を自動化するAI搭載プラットフォームです。会議が終了すると、Circlebackが会話を処理し、詳細な議事録とアクションアイテム、文字起こしと録音(利用可能な場合)を提供します。これにより、チームは効率的に洞察を記録し、アクションアイテムを配布し、見落としがないことを確認できます。すべてがワークフローにシームレスに統合されます。
Sim Circleback統合により、次のことが可能になります。
- **詳細な議事録とアクションアイテムの受信**: 通話中に議論された実行可能なタスクを追跡し、整形された会議サマリーを自動的に収集します。
- **完全な会議録音と文字起こしへのアクセス**: 会話全体と関連する録音を取得し、重要な瞬間を簡単に確認したり、同僚と共有したりできます。
- **参加者情報と会議コンテキストの記録**: 参加者リスト、会議メタデータ、タグにより、データを整理して実行可能な状態に保ちます。
- **ワークフローに直接洞察を配信**: 会議が終了した瞬間に、Simの強力なWebhookトリガーを使用して、自動化をトリガーしたり、Circlebackデータを他のシステムに送信したりできます。
**Simでの動作方法:**
CirclebackはWebhookトリガーを使用します。会議が処理されるたびに、データが自動的にエージェントまたは自動化にプッシュされます。次の条件に基づいてさらなる自動化を構築できます。
- 会議完了(すべての処理済みデータが利用可能)
- 新しいノート(会議全体が処理される前にノートが準備完了)
- 高度なユースケース向けの生のWebhook統合
**Circleback会議Webhookペイロードでは、次の情報が利用可能です:**
| フィールド | タイプ | 説明 |
|----------------|---------|----------------------------------------------------|
| `id` | number | CirclebackミーティングID |
| `name` | string | ミーティングタイトル |
| `url` | string | バーチャルミーティングURLZoom、Meet、Teamsなど |
| `createdAt` | string | ミーティング作成タイムスタンプ |
| `duration` | number | 秒単位の長さ |
| `recordingUrl` | string | 録画URL24時間有効 |
| `tags` | json | タグの配列 |
| `icalUid` | string | カレンダーイベントID |
| `attendees` | json | 参加者オブジェクトの配列 |
| `notes` | string | Markdown形式のミーティングート |
| `actionItems` | json | アクションアイテムの配列 |
| `transcript` | json | トランスクリプトセグメントの配列 |
| `insights` | json | ユーザー作成のインサイト |
| `meeting` | json | 完全なミーティングペイロード |
即座にサマリーを配信したい場合でも、アクションアイテムを記録したい場合でも、新しいミーティングデータによってトリガーされるカスタムワークフローを構築したい場合でも、CirclebackとSimを使えば、ミーティングに関連するすべてを自動的にシームレスに処理できます。
{/* MANUAL-CONTENT-END */}
## 使用方法
ミーティングが処理されると、ミーティングート、アクションアイテム、トランスクリプト、録画を受信します。Circlebackはwebhookを使用してワークフローにデータをプッシュします。
## 注意事項
- カテゴリー: `triggers`
- タイプ: `circleback`

View File

@@ -0,0 +1,218 @@
---
title: Grain
description: 会議の録画、文字起こし、AI要約にアクセス
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="grain"
color="#F6FAF9"
/>
{/* MANUAL-CONTENT-START:intro */}
[Grain](https://grain.com/)は、会議の録画、文字起こし、ハイライト、AI搭載の要約を記録、保存、共有するための最新プラットフォームです。Grainを使用すると、チームは会話を実用的なインサイトに変換し、会議の重要な瞬間について全員の認識を一致させることができます。
Grainでできること:
- **検索可能な録画と文字起こしへのアクセス**: キーワード、参加者、トピックで会議を検索して確認できます。
- **ハイライトとクリップの共有**: 重要な瞬間を記録し、短い動画/音声のハイライトをチームやワークフロー全体で共有できます。
- **AI生成の要約を取得**: Grainの高度なAIを使用して、会議の要約、アクションアイテム、主要なインサイトを自動的に作成します。
- **チームやタイプ別に会議を整理**: 録画にタグを付けて分類し、簡単にアクセスしてレポートを作成できます。
Sim Grain統合により、エージェントは次のことが可能になります:
- 柔軟なフィルター(日時、参加者、チームなど)で会議の録画と詳細を一覧表示、検索、取得できます。
- 会議のAI要約、参加者、ハイライト、その他のメタデータにアクセスして、自動化や分析を強化できます。
- Grain Webhookを介して、新しい会議が処理されたとき、要約が生成されたとき、またはハイライトが作成されたときにワークフローをトリガーできます。
- Grainのデータを他のツールに簡単に連携したり、会議で重要なことが発生した瞬間にチームメイトに通知したりできます。
フォローアップアクションを自動化したり、重要な会話の記録を保持したり、組織全体でインサイトを表示したりする場合でも、GrainとSimを使用すると、会議のインテリジェンスをワークフローに簡単に接続できます。
{/* MANUAL-CONTENT-END */}
## 使用方法
Grainをワークフローに統合します。会議の録画、文字起こし、ハイライト、AI生成の要約にアクセスできます。Grain Webhookイベントに基づいてワークフローをトリガーすることもできます。
## ツール
### `grain_list_recordings`
オプションのフィルターとページネーションを使用してGrainから録画を一覧表示
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー個人アクセストークン |
| `cursor` | string | いいえ | 次のページのページネーションカーソル |
| `beforeDatetime` | string | いいえ | このISO8601タイムスタンプより前の録画のみ |
| `afterDatetime` | string | いいえ | このISO8601タイムスタンプより後の録画のみ |
| `participantScope` | string | いいえ | フィルター「internal」または「external」 |
| `titleSearch` | string | いいえ | 録画タイトルでフィルタリングする検索語 |
| `teamId` | string | いいえ | チームUUIDでフィルタリング |
| `meetingTypeId` | string | いいえ | ミーティングタイプUUIDでフィルタリング |
| `includeHighlights` | boolean | いいえ | レスポンスにハイライト/クリップを含める |
| `includeParticipants` | boolean | いいえ | レスポンスに参加者リストを含める |
| `includeAiSummary` | boolean | いいえ | AI生成サマリーを含める |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `recordings` | array | 録画オブジェクトの配列 |
### `grain_get_recording`
IDで単一の録画の詳細を取得
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー個人アクセストークン |
| `recordingId` | string | はい | 録画UUID |
| `includeHighlights` | boolean | いいえ | ハイライト/クリップを含める |
| `includeParticipants` | boolean | いいえ | 参加者リストを含める |
| `includeAiSummary` | boolean | いいえ | AIサマリーを含める |
| `includeCalendarEvent` | boolean | いいえ | カレンダーイベントデータを含める |
| `includeHubspot` | boolean | いいえ | HubSpot関連付けを含める |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `id` | string | 録画UUID |
| `title` | string | 録画タイトル |
| `start_datetime` | string | ISO8601形式の開始タイムスタンプ |
| `end_datetime` | string | ISO8601形式の終了タイムスタンプ |
| `duration_ms` | number | ミリ秒単位の長さ |
| `media_type` | string | audio、transcript、またはvideo |
| `source` | string | 録画ソース(zoom、meet、teamsなど) |
| `url` | string | Grainで表示するためのURL |
| `thumbnail_url` | string | サムネイル画像URL |
| `tags` | array | タグ文字列の配列 |
| `teams` | array | 録画が属するチーム |
| `meeting_type` | object | ミーティングタイプ情報(id、name、scope) |
| `highlights` | array | ハイライト(含まれる場合) |
| `participants` | array | 参加者(含まれる場合) |
| `ai_summary` | object | AI要約テキスト(含まれる場合) |
| `calendar_event` | object | カレンダーイベントデータ(含まれる場合) |
| `hubspot` | object | HubSpot関連付け(含まれる場合) |
### `grain_get_transcript`
録画の完全なトランスクリプトを取得
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー(パーソナルアクセストークン) |
| `recordingId` | string | はい | 録画UUID |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `transcript` | array | トランスクリプトセクションの配列 |
### `grain_list_teams`
ワークスペース内のすべてのチームを一覧表示
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー(パーソナルアクセストークン) |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `teams` | array | チームオブジェクトの配列 |
### `grain_list_meeting_types`
ワークスペース内のすべてのミーティングタイプを一覧表示
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー(パーソナルアクセストークン) |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `meeting_types` | array | ミーティングタイプオブジェクトの配列 |
### `grain_create_hook`
録画イベントを受信するためのWebhookを作成
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー(パーソナルアクセストークン) |
| `hookUrl` | string | はい | WebhookエンドポイントURL(2xxを返す必要があります) |
| `filterBeforeDatetime` | string | いいえ | フィルタ: この日付より前の録画 |
| `filterAfterDatetime` | string | いいえ | フィルタ: この日付より後の録画 |
| `filterParticipantScope` | string | いいえ | フィルタ: "internal"または"external" |
| `filterTeamId` | string | いいえ | フィルタ: 特定のチームUUID |
| `filterMeetingTypeId` | string | いいえ | フィルタ: 特定のミーティングタイプ |
| `includeHighlights` | boolean | いいえ | Webhookペイロードにハイライトを含める |
| `includeParticipants` | boolean | いいえ | Webhookペイロードに参加者を含める |
| `includeAiSummary` | boolean | いいえ | WebhookペイロードにAIサマリーを含める |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `id` | string | フックUUID |
| `enabled` | boolean | フックがアクティブかどうか |
| `hook_url` | string | WebフックURL |
| `filter` | object | 適用されたフィルタ |
| `include` | object | 含まれるフィールド |
| `inserted_at` | string | ISO8601形式の作成タイムスタンプ |
### `grain_list_hooks`
アカウントのすべてのWebフックを一覧表示
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー個人アクセストークン |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `hooks` | array | フックオブジェクトの配列 |
### `grain_delete_hook`
IDでWebフックを削除
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | はい | Grain APIキー個人アクセストークン |
| `hookId` | string | はい | 削除するフックUUID |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | Webフックが正常に削除された場合はtrue |
## 注記
- カテゴリ: `tools`
- タイプ: `grain`

View File

@@ -38,16 +38,18 @@ Intercomをワークフローに統合します。連絡先の作成、取得、
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `role` | string | いいえ | 連絡先の役割。「user」または「lead」を指定可能。未指定の場合は「lead」がデフォルト |
| `email` | string | いいえ | 連絡先のメールアドレス |
| `external_id` | string | いいえ | クライアントが提供する連絡先の一意の識別子 |
| `phone` | string | いいえ | 連絡先の電話番号 |
| `name` | string | いいえ | 連絡先の名前 |
| `avatar` | string | いいえ | 連絡先のアバター画像URL |
| `signed_up_at` | number | いいえ | ユーザーが登録した時間(Unixタイムスタンプ |
| `last_seen_at` | number | いいえ | ユーザーが最後に確認された時間(Unixタイムスタンプ |
| `signed_up_at` | number | いいえ | ユーザーが登録した時刻(Unixタイムスタンプ) |
| `last_seen_at` | number | いいえ | ユーザーが最後に確認された時刻(Unixタイムスタンプ) |
| `owner_id` | string | いいえ | 連絡先のアカウント所有権が割り当てられた管理者のID |
| `unsubscribed_from_emails` | boolean | いいえ | 連絡先がメールの配信を解除しているかどうか |
| `custom_attributes` | string | いいえ | JSONオブジェクトとしてのカスタム属性(例:\{"attribute_name": "value"\} |
| `unsubscribed_from_emails` | boolean | いいえ | 連絡先がメールの配信停止をしているかどうか |
| `custom_attributes` | string | いいえ | カスタム属性(JSONオブジェクト形式、例:\{"attribute_name": "value"\}) |
| `company_id` | string | いいえ | 作成時に連絡先を関連付ける会社ID |
#### 出力
@@ -82,15 +84,18 @@ Intercomの既存の連絡先を更新する
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `contactId` | string | はい | 更新する連絡先ID |
| `role` | string | いいえ | 連絡先の役割。「user」または「lead」を指定可能 |
| `external_id` | string | いいえ | クライアントが提供する連絡先の一意の識別子 |
| `email` | string | いいえ | 連絡先のメールアドレス |
| `phone` | string | いいえ | 連絡先の電話番号 |
| `name` | string | いいえ | 連絡先の名前 |
| `avatar` | string | いいえ | 連絡先のアバター画像URL |
| `signed_up_at` | number | いいえ | ユーザーが登録した時間(Unixタイムスタンプ |
| `last_seen_at` | number | いいえ | ユーザーが最後に確認された時間(Unixタイムスタンプ |
| `signed_up_at` | number | いいえ | ユーザーが登録した時刻(Unixタイムスタンプ) |
| `last_seen_at` | number | いいえ | ユーザーが最後に確認された時刻(Unixタイムスタンプ) |
| `owner_id` | string | いいえ | 連絡先のアカウント所有権が割り当てられた管理者のID |
| `unsubscribed_from_emails` | boolean | いいえ | 連絡先がメールの配信を解除しているかどうか |
| `custom_attributes` | string | いいえ | JSONオブジェクトとしてのカスタム属性(例:\{"attribute_name": "value"\} |
| `unsubscribed_from_emails` | boolean | いいえ | 連絡先がメールの配信停止をしているかどうか |
| `custom_attributes` | string | いいえ | カスタム属性(JSONオブジェクト形式、例:\{"attribute_name": "value"\}) |
| `company_id` | string | いいえ | 連絡先を関連付ける会社ID |
#### 出力
@@ -128,6 +133,8 @@ Intercomの既存の連絡先を更新する
| `query` | string | はい | 検索クエリ(例:\{"field":"email","operator":"=","value":"user@example.com"\} |
| `per_page` | number | いいえ | ページあたりの結果数最大150 |
| `starting_after` | string | いいえ | ページネーション用カーソル |
| `sort_field` | string | いいえ | ソート対象のフィールド(例:"name"、"created_at"、"last_seen_at" |
| `sort_order` | string | いいえ | ソート順:"ascending"(昇順)または"descending"(降順) |
#### 出力
@@ -166,9 +173,10 @@ Intercomで企業を作成または更新する
| `website` | string | いいえ | 企業のウェブサイト |
| `plan` | string | いいえ | 企業のプラン名 |
| `size` | number | いいえ | 企業の従業員数 |
| `industry` | string | いいえ | 企業が事業を展開している業界 |
| `monthly_spend` | number | いいえ | 企業があなたのビジネスにもたらす収益額。注このフィールドは小数点以下を切り捨てて整数にします155.98は155になります |
| `industry` | string | いいえ | 企業が事業を展開る業界 |
| `monthly_spend` | number | いいえ | 企業があなたのビジネスに生み出す収益額。注このフィールドは小数点以下を切り捨てて整数にします155.98は155になります |
| `custom_attributes` | string | いいえ | JSONオブジェクトとしてのカスタム属性 |
| `remote_created_at` | number | いいえ | あなたが企業を作成した時刻Unixタイムスタンプ |
#### 出力
@@ -204,6 +212,7 @@ IDによってIntercomから単一の企業を取得する
| --------- | ---- | -------- | ----------- |
| `per_page` | number | いいえ | ページあたりの結果数 |
| `page` | number | いいえ | ページ番号 |
| `starting_after` | string | いいえ | ページネーション用カーソル(ページベースのページネーションより推奨) |
#### 出力
@@ -221,7 +230,8 @@ IDによりIntercomから単一の会話を取得
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | はい | 取得する会話ID |
| `display_as` | string | いいえ | プレーンテキストでメッセージを取得するは「plaintext」に設定 |
| `display_as` | string | いいえ | プレーンテキストでメッセージを取得する場合は「plaintext」に設定 |
| `include_translations` | boolean | いいえ | trueの場合、会話パーツは会話の検出言語に翻訳されます |
#### 出力
@@ -240,6 +250,8 @@ IDによりIntercomから単一の会話を取得
| --------- | ---- | -------- | ----------- |
| `per_page` | number | いいえ | ページあたりの結果数最大150 |
| `starting_after` | string | いいえ | ページネーション用カーソル |
| `sort` | string | いいえ | ソートするフィールド「waiting_since」、「updated_at」、「created_at」 |
| `order` | string | いいえ | ソート順「asc」昇順または「desc」降順 |
#### 出力
@@ -258,9 +270,10 @@ IDによりIntercomから単一の会話を取得
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | はい | 返信する会話ID |
| `message_type` | string | はい | メッセージタイプ「comment」または「note」 |
| `body` | string | はい | 返信の本文テキスト |
| `admin_id` | string | いいえ | 返信を作成する管理者のID。提供されない場合、デフォルトの管理者(オペレーター/Finが使用されます。 |
| `attachment_urls` | string | いいえ | 画像URLのカンマ区切りリスト最大10 |
| `body` | string | はい | 返信のテキスト本文 |
| `admin_id` | string | いいえ | 返信を作成する管理者のID。指定しない場合、デフォルトの管理者(Operator/Finが使用されます。 |
| `attachment_urls` | string | いいえ | カンマ区切りの画像URL一覧最大10 |
| `created_at` | number | いいえ | 返信が作成されたときのUnixタイムスタンプ。指定しない場合、現在時刻が使用されます。 |
#### 出力
@@ -279,7 +292,9 @@ IDによりIntercomから単一の会話を取得
| --------- | ---- | -------- | ----------- |
| `query` | string | はい | JSONオブジェクトとしての検索クエリ |
| `per_page` | number | いいえ | ページあたりの結果数最大150 |
| `starting_after` | string | いいえ | ページネーション用カーソル |
| `starting_after` | string | いいえ | ページネーション用カーソル |
| `sort_field` | string | いいえ | ソートするフィールド(例:「created_at」、「updated_at」 |
| `sort_order` | string | いいえ | ソート順:「ascending」または「descending」 |
#### 出力
@@ -299,6 +314,10 @@ Intercomで新しいチケットを作成する
| `ticket_type_id` | string | はい | チケットタイプのID |
| `contacts` | string | はい | 連絡先識別子のJSON配列\[\{"id": "contact_id"\}\] |
| `ticket_attributes` | string | はい | _default_title_と_default_description_を含むチケット属性のJSONオブジェクト |
| `company_id` | string | いいえ | チケットに関連付ける会社ID |
| `created_at` | number | いいえ | チケットが作成された時間Unixタイムスタンプ。提供されない場合、現在時刻が使用されます。 |
| `conversation_to_link_id` | string | いいえ | このチケットにリンクする既存の会話のID |
| `disable_notifications` | boolean | いいえ | trueの場合、チケット作成時の通知を抑制します |
#### 出力
@@ -332,13 +351,15 @@ Intercomで管理者が開始した新しいメッセージを作成して送信
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `message_type` | string | はい | メッセージタイプ「inapp」または「email」 |
| `message_type` | string | はい | メッセージタイプ:アプリ内メッセージの場合は「inapp」、メールメッセージの場合は「email」 |
| `template` | string | はい | メッセージテンプレートスタイル:プレーンテキストの場合は「plain」、パーソナライズスタイルの場合は「personal」 |
| `subject` | string | いいえ | メッセージの件名emailタイプの場合 |
| `body` | string | はい | メッセージの本文 |
| `from_type` | string | はい | 送信者タイプ「admin」 |
| `from_type` | string | はい | 送信者タイプ:「admin」 |
| `from_id` | string | はい | メッセージを送信する管理者のID |
| `to_type` | string | はい | 受信者タイプ「contact」 |
| `to_type` | string | はい | 受信者タイプ:「contact」 |
| `to_id` | string | はい | メッセージを受信する連絡先のID |
| `created_at` | number | いいえ | メッセージが作成された時間Unixタイムスタンプ。提供されない場合、現在時刻が使用されます。 |
#### 出力

View File

@@ -60,9 +60,7 @@ Jina AI Readerを使用してウェブコンテンツを抽出し、LLMフレン
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `content` | string | URLから抽出されたコンテンツで、クリーンでLLMフレンドリーなテキストに処理されたもの |
| `links` | array | ページで見つかったリンクのリストgatherLinksまたはwithLinksummaryが有効な場合 |
| `images` | array | ページで見つかった画像のリストwithImagesummaryが有効な場合 |
| `content` | string | URLから抽出されたコンテンツクリーンでLLMフレンドリーなテキストに処理されています |
### `jina_search`

View File

@@ -1,6 +1,6 @@
---
title: メモリー
description: メモリストアを追加
description: メモリストアを追加
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
@@ -12,23 +12,22 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
## 使用方法
ワークフローにメモリを統合します。メモリの追加、取得、すべてのメモリの取得、メモリーの削除が可能です。
ワークフローにメモリを統合します。メモリの追加、取得、メモリの取得、削除が可能です。
## ツール
### `memory_add`
新しいメモリーをデータベースに追加するか、同じID既存のメモリに追します。
データベースに新しいメモリを追加するか、同じIDを持つ既存のメモリに追します。
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | いいえ | 会話識別子user-123、session-abc。このブロックに対してこの会話IDメモリがすでに存在する場合、新しいメッセージはそれに追加されます。 |
| `conversationId` | string | いいえ | 会話識別子user-123、session-abc。この会話IDを持つメモリがに存在する場合、新しいメッセージが追記されます。 |
| `id` | string | いいえ | 会話識別子のレガシーパラメータ。代わりにconversationIdを使用してください。後方互換性のために提供されています。 |
| `role` | string | はい | エージェントメモリの役割user、assistant、またはsystem |
| `role` | string | はい | エージェントメモリのロールuser、assistant、またはsystem |
| `content` | string | はい | エージェントメモリのコンテンツ |
| `blockId` | string | いいえ | オプションのブロックID。提供されない場合、実行コンテキストから現在のブロックIDを使用するか、デフォルトで「default」になります。 |
#### 出力
@@ -40,29 +39,27 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
### `memory_get`
conversationId、blockId、blockName、またはそれらの組み合わせによってメモリを取得します。一致するすべてのメモリを返します。
会話IDによってメモリを取得します。一致するメモリを返します。
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | いいえ | 会話識別子user-123、session-abc単独で提供された場合、すべてのブロックにわたるこの会話のすべてのメモリを返します。 |
| `conversationId` | string | いいえ | 会話識別子user-123、session-abcこの会話のメモリを返します。 |
| `id` | string | いいえ | 会話識別子のレガシーパラメータ。代わりにconversationIdを使用してください。後方互換性のために提供されています。 |
| `blockId` | string | いいえ | ブロック識別子。単独で提供された場合、すべての会話にわたるこのブロックのすべてのメモリを返します。conversationIdと一緒に提供された場合、そのブロック内の特定の会話のメモリを返します。 |
| `blockName` | string | いいえ | ブロック名。blockIdの代替。単独で提供された場合、この名前を持つブロックのすべてのメモリを返します。conversationIdと一緒に提供された場合、この名前を持つブロック内のその会話のメモリを返します。 |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | メモリが正常に取得されたかどうか |
| `memories` | array | conversationId、blockId、blockName、およびdataフィールドを含むメモリオブジェクトの配列 |
| `memories` | array | conversationIddataフィールドを含むメモリオブジェクトの配列 |
| `message` | string | 成功またはエラーメッセージ |
| `error` | string | 操作が失敗した場合のエラーメッセージ |
### `memory_get_all`
データベースからすべてのメモリを取得す
データベースからすべてのメモリを取得しま
#### 入力
@@ -74,22 +71,20 @@ conversationId、blockId、blockName、またはそれらの組み合わせに
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | すべてのメモリが正常に取得されたかどうか |
| `memories` | array | key、conversationId、blockId、blockName、およびdataフィールドを含むすべてのメモリオブジェクトの配列 |
| `memories` | array | key、conversationId、dataフィールドを含むすべてのメモリオブジェクトの配列 |
| `message` | string | 成功またはエラーメッセージ |
| `error` | string | 操作が失敗した場合のエラーメッセージ |
### `memory_delete`
conversationId、blockId、blockName、またはそれらの組み合わせによってメモリを削除します。一括削除をサポートしています。
conversationIdによってメモリを削除します。
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | いいえ | 会話識別子user-123、session-abc単独で提供された場合、すべてのブロックにわたるこの会話のすべてのメモリを削除します。 |
| `conversationId` | string | いいえ | 会話識別子user-123、session-abc。この会話のすべてのメモリを削除します。 |
| `id` | string | いいえ | 会話識別子のレガシーパラメータ。代わりにconversationIdを使用してください。後方互換性のために提供されています。 |
| `blockId` | string | いいえ | ブロック識別子。単独で提供された場合、すべての会話にわたるこのブロックのすべてのメモリを削除します。conversationIdと共に提供された場合、そのブロック内の特定の会話のメモリを削除します。 |
| `blockName` | string | いいえ | ブロック名。blockIdの代替。単独で提供された場合、この名前を持つブロックのすべてのメモリを削除します。conversationIdと共に提供された場合、この名前を持つブロック内のその会話のメモリを削除します。 |
#### 出力

View File

@@ -48,7 +48,8 @@ Supabaseテーブルからデータを照会する
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | 照会するSupabaseテーブルの名前 |
| `table` | string | はい | クエリするSupabaseテーブルの名前 |
| `schema` | string | いいえ | クエリするデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用します。 |
| `filter` | string | いいえ | PostgRESTフィルター"id=eq.123" |
| `orderBy` | string | いいえ | 並べ替える列降順の場合はDESCを追加 |
| `limit` | number | いいえ | 返す最大行数 |
@@ -71,6 +72,7 @@ Supabaseテーブルにデータを挿入する
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | データを挿入するSupabaseテーブルの名前 |
| `schema` | string | いいえ | 挿入するデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用します。 |
| `data` | array | はい | 挿入するデータ(オブジェクトの配列または単一のオブジェクト) |
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
@@ -89,10 +91,11 @@ Supabaseテーブルにデータを挿入する
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | SupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | クエリを実行するSupabaseテーブルの名前 |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | クエリするSupabaseテーブルの名前 |
| `schema` | string | いいえ | クエリするデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用します。 |
| `filter` | string | はい | 特定の行を見つけるためのPostgRESTフィルター"id=eq.123" |
| `apiKey` | string | はい | Supabaseサービスロールシークレットキー |
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
#### 出力
@@ -111,7 +114,8 @@ Supabaseテーブルにデータを挿入する
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | 更新するSupabaseテーブルの名前 |
| `filter` | string | い | 更新する行を識別するPostgRESTフィルター"id=eq.123" |
| `schema` | string | いいえ | 更新するデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用します。 |
| `filter` | string | はい | 更新する行を識別するためのPostgRESTフィルター"id=eq.123" |
| `data` | object | はい | 一致する行で更新するデータ |
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
@@ -132,7 +136,8 @@ Supabaseテーブルにデータを挿入する
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | 削除するSupabaseテーブルの名前 |
| `filter` | string | い | 削除する行を識別するPostgRESTフィルター"id=eq.123" |
| `schema` | string | いいえ | 削除するデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用します。 |
| `filter` | string | はい | 削除する行を識別するためのPostgRESTフィルター"id=eq.123" |
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
#### 出力
@@ -151,8 +156,9 @@ Supabaseテーブルにデータを挿入または更新するアップサー
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | データをアップサートするSupabaseテーブルの名前 |
| `data` | array | はい | アップサート(挿入または更新)するデータ - オブジェクトの配列または単一のオブジェクト |
| `table` | string | はい | データをupsertするSupabaseテーブルの名前 |
| `schema` | string | いいえ | upsertするデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用します。 |
| `data` | array | はい | upsert挿入または更新するデータオブジェクトの配列または単一のオブジェクト |
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
#### 出力
@@ -172,6 +178,7 @@ Supabaseテーブルの行数をカウントする
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | 行数をカウントするSupabaseテーブルの名前 |
| `schema` | string | いいえ | カウント元のデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用 |
| `filter` | string | いいえ | PostgRESTフィルター"status=eq.active" |
| `countType` | string | いいえ | カウントタイプexact、planned、またはestimatedデフォルトexact |
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
@@ -193,6 +200,7 @@ Supabaseテーブルで全文検索を実行する
| --------- | ---- | -------- | ----------- |
| `projectId` | string | はい | あなたのSupabaseプロジェクトIDjdrkgepadsdopsntdlom |
| `table` | string | はい | 検索するSupabaseテーブルの名前 |
| `schema` | string | いいえ | 検索するデータベーススキーマデフォルトpublic。他のスキーマのテーブルにアクセスする場合に使用 |
| `column` | string | はい | 検索する列 |
| `query` | string | はい | 検索クエリ |
| `searchType` | string | いいえ | 検索タイプplain、phrase、またはwebsearchデフォルトwebsearch |

View File

@@ -49,6 +49,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| `azureApiVersion` | string | いいえ | Azure OpenAI APIバージョン |
| `vertexProject` | string | いいえ | Vertex AI用のGoogle CloudプロジェクトID |
| `vertexLocation` | string | いいえ | Vertex AI用のGoogle Cloudロケーションデフォルトはus-central1 |
| `vertexCredential` | string | いいえ | Vertex AI用のGoogle Cloud OAuth認証情報ID |
#### 出力

View File

@@ -5,7 +5,6 @@ title: スケジュール
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
スケジュールブロックは、指定された間隔または時間に定期的なスケジュールでワークフローを自動的にトリガーします。
@@ -21,20 +20,20 @@ import { Video } from '@/components/ui/video'
## スケジュールオプション
ドロップダウンオプションを使用してワークフローの実行タイミングを設定します:
ワークフローの実行タイミングを設定します:
<Tabs items={['簡単な間隔', 'Cron式']}>
<Tabs items={['Simple Intervals', 'Cron Expressions']}>
<Tab>
<ul className="list-disc space-y-1 pl-6">
<li><strong>分ごと</strong>5分、15分、30分間隔</li>
<li><strong>毎時</strong>1時間ごとまたは数時間ごと</li>
<li><strong>毎日</strong>1日に1回または複数回</li>
<li><strong>毎週</strong>週の特定の曜日</li>
<li><strong>毎月</strong>月の特定の日</li>
<li><strong>X分ごと</strong>分単位の間隔で実行1〜1440</li>
<li><strong>毎時</strong>毎時指定した分に実行</li>
<li><strong>毎日</strong>毎日指定した時刻に実行</li>
<li><strong>毎週</strong>毎週指定した曜日と時刻に実行</li>
<li><strong>毎月</strong>毎月指定した日時に実行</li>
</ul>
</Tab>
<Tab>
<p>高度なスケジューリングにはCron式を使用します</p>
<p>高度なスケジュール設定にはcron式を使用します</p>
<div className="text-sm space-y-1">
<div><code>0 9 * * 1-5</code> - 平日の午前9時</div>
<div><code>*/15 * * * *</code> - 15分ごと</div>
@@ -43,45 +42,36 @@ import { Video } from '@/components/ui/video'
</Tab>
</Tabs>
## スケジュールの設定
## アクティベーション
ワークフローがスケジュールされると
- スケジュールが**有効**になり、次の実行時間が表示されます
- **「スケジュール済み」**ボタンをクリックするとスケジュールを無効にできます
- スケジュールは**3回連続で失敗すると**自動的に無効になります
スケジュールはワークフローのデプロイに連動します
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-2.png"
alt="アクティブなスケジュールブロック"
width={500}
height={400}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="無効化されたスケジュール"
width={500}
height={350}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="無効化されたスケジュール"
width={500}
height={400}
className="my-6"
/>
</div>
無効化されたスケジュールは、最後に有効だった時間を表示します。**「無効」**バッジをクリックすると、スケジュールを再度有効にできます。
- **ワークフローをデプロイ** → スケジュールが有効になり実行を開始
- **ワークフローをアンデプロイ** → スケジュールが削除
- **ワークフローを再デプロイ** → 現在の設定でスケジュールが再作成
<Callout>
スケジュールブロックは入力接続を受け取ることができず、純粋なワークフロートリガーとして機能します
スケジュールを開始するには、ワークフローをデプロイする必要があります。スケジュールブロックを設定してから、ツールバーからデプロイしてください
</Callout>
## 自動無効化
スケジュールは**10回連続で失敗**すると、エラーの連鎖を防ぐため自動的に無効化されます。無効化されると:
- スケジュールブロックに警告バッジが表示されます
- スケジュールの実行が停止します
- バッジをクリックしてスケジュールを再有効化できます
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="無効化されたスケジュール"
width={500}
height={400}
className="my-6"
/>
</div>
<Callout>
スケジュールブロックは入力接続を受け取ることができず、ワークフローのエントリーポイントとしてのみ機能します。
</Callout>

View File

@@ -47,42 +47,42 @@ totalCost = baseExecutionCharge + modelCost
## 定价选项
<Tabs items={['托管模型', '使用您自己的 API 密钥']}>
<Tabs items={[ '托管模型', '自带 API 密钥' ]}>
<Tab>
**托管模型** - Sim 提供 API 密钥,价格为基础价格的 2.5 倍:
**托管模型** - Sim 提供 API 密钥,价格为基础价格的 2 倍:
**OpenAI**
| 模型 | 基础价格(输入/输出) | 托管价格(输入/输出) |
|-------|---------------------------|----------------------------|
| GPT-5.1 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 | $1.25 / $10.00 | $3.13 / $25.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.63 / $5.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.13 / $1.00 |
| GPT-4o | $2.50 / $10.00 | $6.25 / $25.00 |
| GPT-4.1 | $2.00 / $8.00 | $5.00 / $20.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $1.00 / $4.00 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.25 / $1.00 |
| o1 | $15.00 / $60.00 | $37.50 / $150.00 |
| o3 | $2.00 / $8.00 | $5.00 / $20.00 |
| o4 Mini | $1.10 / $4.40 | $2.75 / $11.00 |
| GPT-5.1 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 | $1.25 / $10.00 | $2.50 / $20.00 |
| GPT-5 Mini | $0.25 / $2.00 | $0.50 / $4.00 |
| GPT-5 Nano | $0.05 / $0.40 | $0.10 / $0.80 |
| GPT-4o | $2.50 / $10.00 | $5.00 / $20.00 |
| GPT-4.1 | $2.00 / $8.00 | $4.00 / $16.00 |
| GPT-4.1 Mini | $0.40 / $1.60 | $0.80 / $3.20 |
| GPT-4.1 Nano | $0.10 / $0.40 | $0.20 / $0.80 |
| o1 | $15.00 / $60.00 | $30.00 / $120.00 |
| o3 | $2.00 / $8.00 | $4.00 / $16.00 |
| o4 Mini | $1.10 / $4.40 | $2.20 / $8.80 |
**Anthropic**
| 模型 | 基础价格(输入/输出) | 托管价格(输入/输出) |
|-------|---------------------------|----------------------------|
| Claude Opus 4.5 | $5.00 / $25.00 | $12.50 / $62.50 |
| Claude Opus 4.1 | $15.00 / $75.00 | $37.50 / $187.50 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $7.50 / $37.50 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.50 / $12.50 |
| Claude Opus 4.5 | $5.00 / $25.00 | $10.00 / $50.00 |
| Claude Opus 4.1 | $15.00 / $75.00 | $30.00 / $150.00 |
| Claude Sonnet 4.5 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Sonnet 4.0 | $3.00 / $15.00 | $6.00 / $30.00 |
| Claude Haiku 4.5 | $1.00 / $5.00 | $2.00 / $10.00 |
**Google**
| 模型 | 基础价格(输入/输出) | 托管价格(输入/输出) |
|-------|---------------------------|----------------------------|
| Gemini 3 Pro Preview | $2.00 / $12.00 | $5.00 / $30.00 |
| Gemini 2.5 Pro | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 2.5 Flash | $0.15 / $0.60 | $0.38 / $1.50 |
| Gemini 3 Pro Preview | $2.00 / $12.00 | $4.00 / $24.00 |
| Gemini 2.5 Pro | $1.25 / $10.00 | $2.50 / $20.00 |
| Gemini 2.5 Flash | $0.30 / $2.50 | $0.60 / $5.00 |
*2.5 倍的价格倍增用于覆盖基础设施和 API 管理成本。*
*2 倍系数涵盖了基础设施和 API 管理成本。*
</Tab>
<Tab>
@@ -185,12 +185,12 @@ curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" htt
不同的订阅计划有不同的使用限制:
| 计划 | 每月使用限 | 速率限制(每分钟) |
| 方案 | 每月使用限 | 速率限制(每分钟) |
|------|-------------------|-------------------------|
| **免费** | $10 | 5 同步10 异步 |
| **专业** | $100 | 10 同步50 异步 |
| **团队** | $500共享 | 50 同步100 异步 |
| **企业** | 自定义 | 自定义 |
| **Free** | $20 | 5 sync10 async |
| **Pro** | $100 | 10 sync50 async |
| **Team** | $500共享 | 50 sync100 async |
| **Enterprise** | 定制 | 定制 |
## 计费模式

View File

@@ -34,81 +34,87 @@ Sim 支持 PDF、Word (DOC/DOCX)、纯文本 (TXT)、Markdown (MD)、HTML、Exce
<Image src="/static/knowledgebase/knowledgebase.png" alt="显示已处理内容的文档分块视图" width={800} height={500} />
### 分块配置
- **默认分块大小**1,024 个字符
- **可配置范围**:每块 100-4,000 个字符
- **智能重叠**:默认重叠 200 个字符以保留上下文
在创建知识库时,您可以配置文档如何被拆分为多个分块:
| 设置 | 单位 | 默认值 | 范围 | 说明 |
|---------|------|---------|-------|-------------|
| **最大分块大小** | tokens | 1,024 | 100-4,000 | 每个分块的最大大小1 token ≈ 4 个字符) |
| **最小分块大小** | 字符 | 1 | 1-2,000 | 避免生成过小分块的最小分块大小 |
| **重叠量** | 字符 | 200 | 0-500 | 相邻分块之间的上下文重叠字符数 |
- **分层拆分**:遵循文档结构(章节、段落、句子)
### 编辑功能
- **编辑分块内容**:修改单个分块的文本内容
- **编辑分块内容**修改单个分块的文本内容
- **调整分块边界**:根据需要合并或拆分分块
- **添加元数据**:为分块添加额外的上下文信息
- **添加元数据**:为分块补充更多上下文信息
- **批量操作**:高效管理多个分块
## 高级 PDF 处理
对于 PDF 文档Sim 提供增强的处理能:
对于 PDF 文档Sim 提供增强的处理能
### OCR 支持
当配置了 Azure 或 [Mistral OCR](https://docs.mistral.ai/ocr/) 时:
- **扫描文档处理**:从基于图像的 PDF 中提取文本
- **混合内容处理**:处理同时包含文本和图的 PDF
- **高精度**:先进的 AI 模型确保准确的文本提取
- **混合内容处理**:处理同时包含文本和图的 PDF
- **高精度**:先进的 AI 模型确保文本提取的准确性
## 在工作流中使用知识块
一旦您的文档处理,您可以通过知识块在 AI 工作流中使用它们。这使得检索增强生成RAG成为可能,让您的 AI 代理能够访问并理文档内容,从而提供更准确、有上下文的响应
文档处理完成后,您可以通过知识块在 AI 工作流中使用它们。这实现了 RAG检索增强生成,让您的 AI 智能体能够访问并理文档内容,从而提供更准确、有上下文的回复
<Image src="/static/knowledgebase/knowledgebase-2.png" alt="在工作流中使用知识块" width={800} height={500} />
### 知识块功能
- **语义搜索**使用自然语言查询查找相关内容
- **上下文集成**:自动将相关分块包含在代理提示
- **动态检索**:在工作流执行期间实时搜索
- **相关性评分**:根据语义相似对结果进行排
- **语义搜索**通过自然语言查询查找相关内容
- **上下文集成**:自动将相关分块纳入智能体提示
- **动态检索**:在工作流执行实时搜索
- **相关性评分**:根据语义相似对结果进行排
### 集成选项
- **系统提示**:为的 AI 代理提供上下文
- **动态上下文**:在对话中搜索并包含相关信息
- **多文档搜索**:在整个知识库中查询
- **过滤搜索**:结合标签实现精内容检索
- **系统提示**:为的 AI 智能体提供上下文
- **动态上下文**:在对话中搜索并纳入相关信息
- **多文档搜索**在整个知识库中查询
- **筛选搜索**:结合标签实现精内容检索
## 向量搜索技术
Sim 使用由 [pgvector](https://github.com/pgvector/pgvector) 提供支持的向量搜索理解的内容的含义和上下文:
Sim 利用 [pgvector](https://github.com/pgvector/pgvector) 提供的向量搜索理解的内容的含义和上下文:
### 语义理解
- **上下文搜索**:即使精确的关键词不匹配,也能找到相关内容
- **基于概念的检索**:理解想法之间的关系
- **多语言支持**支持跨不同语言工作
- **同义词识别**找到相关术语和概念
- **上下文搜索**:即使关键词不完全匹配,也能找到相关内容
- **基于概念的检索**:理解不同想法之间的关系
- **多语言支持**可跨多种语言使用
- **同义词识别**发现相关术语和概念
### 搜索
- **自然语言查询**:用简单的英语提问
- **相似搜索**:找概念上相似的内容
- **混合搜索**:结合向量传统关键词搜索
- **可配置结果**:控制结果数量和相关性阈值
### 搜索能
- **自然语言查询**用简单英文提问
- **相似搜索**找概念上相似的内容
- **混合搜索**:结合向量传统关键词搜索
- **结果可配置**控制结果数量和相关性阈值
## 文档管理
### 组织功能
- **批量上传**:通过异步 API 一次上传多个文件
- **处理状态**:实时更新文档处理状态
- **搜索和过滤**:在大型集合中快速找文档
- **元数据踪**:自动捕获文件信息和处理详情
- **处理状态**:实时更新文档处理进度
- **搜索与筛选**:在大型集合中快速找文档
- **元数据踪**:自动记录文件信息和处理详情
### 安全性和隐私
- **安全存储**:文档企业级安全存储
- **访问控制**:基于工作区的权限设置
- **处理隔离**:每个工作区的文档处理是独立的
- **数据保留**:配置文档保留策略
### 安全隐私
- **安全存储**:文档采用企业级安全存储
- **访问控制**:基于工作区的权限管理
- **处理隔离**:每个工作区的文档处理相互隔离
- **数据保留**配置文档保留策略
## 快速入门
## 快速开始
1. **导航到您的知识库**工作区侧边栏访问
2. **上传文档**:拖或选择文件进行上传
3. **监控处理**:查看文档处理分块进度
4. **探索分块**:查看编辑处理后的内容
5. **添加到工作流**:使用知识块与您的 AI 代理集成
1. **进入你的知识库**可在工作区侧边栏访问
2. **上传文档**:拖或选择文件上传
3. **监控处理进度**实时查看文档处理分块
4. **浏览分块内容**:查看编辑处理内容
5. **添加到工作流**:使用 Knowledge 模块集成到你的 AI 智能体
知识库将您的静态文档转化为智能、可搜索的资源,使您的 AI 工作流能够利用这些资源提供更有信息量和上下文的应。
知识库将您的静态文档转化为智能、可搜索的资源,使您的 AI 工作流能够利用这些信息,提供更有见地和更具上下文的应。

View File

@@ -0,0 +1,58 @@
---
title: Circleback
description: AI 驱动的会议记录与行动项
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="circleback"
color="linear-gradient(180deg, #E0F7FA 0%, #FFFFFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Circleback](https://circleback.ai/) 是一个 AI 驱动的平台可为您的团队自动生成会议记录、行动项、文字稿和录音。每当会议结束后Circleback 会处理对话内容,提供详细的会议纪要和行动项,同时附上文字稿和录音(如有)。这有助于团队高效捕捉洞见、分发行动项,并确保不会遗漏任何重要信息——所有内容都能无缝集成到您的工作流程中。
通过 Sim Circleback 集成,您可以:
- **获取详细的会议记录和行动项**:自动收集格式良好的会议摘要,并跟踪通话中讨论的可执行任务。
- **访问完整的会议录音和文字稿**:获取完整对话及相关录音,便于回顾关键时刻或与同事分享。
- **捕捉与会者信息和会议背景**:与会者名单、会议元数据和标签帮助您有序管理和利用数据。
- **将洞见直接推送到您的工作流程**:会议结束后,利用 Sim 强大的 webhook 触发器,自动触发自动化流程或将 Circleback 数据发送到其他系统。
**在 Sim 中的工作方式:**
Circleback 使用 webhook 触发器:每当会议处理完成,数据会自动推送到您的代理或自动化流程。您可以基于以下内容构建更多自动化:
- 会议完成(所有处理数据可用)
- 新会议记录(即使会议尚未全部处理,会议纪要也可提前获取)
- 原始 webhook 集成,适用于高级用例
**Circleback 会议 webhook 有效载荷中包含以下信息:**
| 字段 | 类型 | 描述 |
|----------------|---------|----------------------------------------------------|
| `id` | number | Circleback 会议 ID |
| `name` | string | 会议标题 |
| `url` | string | 虚拟会议 URLZoom、Meet、Teams 等) |
| `createdAt` | string | 会议创建时间戳 |
| `duration` | number | 时长(秒) |
| `recordingUrl` | string | 录制文件 URL有效期 24 小时) |
| `tags` | json | 标签数组 |
| `icalUid` | string | 日历事件 ID |
| `attendees` | json | 参会者对象数组 |
| `notes` | string | Markdown 格式会议记录 |
| `actionItems` | json | 行动项数组 |
| `transcript` | json | 会议记录片段数组 |
| `insights` | json | 用户创建的洞见 |
| `meeting` | json | 完整会议数据 |
无论你是想分发即时摘要、记录行动项还是基于新会议数据构建自定义工作流Circleback 和 Sim 都能让你自动无缝处理所有与会议相关的事务。
## 使用说明
当会议被处理时你将收到会议记录、行动项、转录和录音。Circleback 使用 webhook 将数据推送到你的工作流。
## 备注
- 分类:`triggers`
- 类型:`circleback`

View File

@@ -0,0 +1,218 @@
---
title: Grain
description: 访问会议录音、转录文本和 AI 摘要
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="grain"
color="#F6FAF9"
/>
{/* MANUAL-CONTENT-START:intro */}
[Grain](https://grain.com/) 是一个现代化平台,用于捕捉、存储和分享会议录音、转录文本、重点片段以及 AI 驱动的摘要。Grain 帮助团队将对话转化为可执行的洞察,让每个人都能对会议中的关键时刻保持一致。
使用 Grain您可以
- **访问可搜索的录音和转录文本**:可按关键词、参与者或主题查找和回顾每场会议。
- **分享重点片段和剪辑**:捕捉重要时刻,并在团队或工作流中分享短视频/音频片段。
- **获取 AI 生成的摘要**:利用 Grain 的先进 AI 自动生成会议摘要、行动项和关键洞察。
- **按团队或类型组织会议**:为录音打标签和分类,便于访问和报告。
Sim Grain 集成让您的坐席能够:
- 通过灵活的筛选条件(日期时间、参与者、团队等)列出、搜索和获取会议录音及详细信息。
- 获取会议的 AI 摘要、参与者、重点片段及其他元数据,以支持自动化或分析。
- 通过 Grain webhook在新会议被处理、摘要生成或重点片段创建时触发工作流。
- 轻松将 Grain 数据桥接到其他工具,或在会议中有重要事件发生时即时通知团队成员。
无论您是想自动化后续操作、保留重要对话记录还是在组织内挖掘洞察Grain 和 Sim 都能让您轻松将会议智能连接到工作流中。
{/* MANUAL-CONTENT-END */}
## 使用说明
将 Grain 集成到您的工作流中。访问会议录音、转录文本、重点片段和 AI 生成的摘要。还可以基于 Grain webhook 事件触发工作流。
## 工具
### `grain_list_recordings`
从 Grain 获取录音列表,可选过滤和分页
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | 是 | Grain API key个人访问令牌 |
| `cursor` | string | 否 | 下一页的分页游标 |
| `beforeDatetime` | string | 否 | 仅包含此 ISO8601 时间戳之前的录音 |
| `afterDatetime` | string | 否 | 仅包含此 ISO8601 时间戳之后的录音 |
| `participantScope` | string | 否 | 过滤条件“internal” 或 “external” |
| `titleSearch` | string | 否 | 按录音标题搜索过滤 |
| `teamId` | string | 否 | 按团队 UUID 过滤 |
| `meetingTypeId` | string | 否 | 按会议类型 UUID 过滤 |
| `includeHighlights` | boolean | 否 | 响应中包含重点/片段 |
| `includeParticipants` | boolean | 否 | 响应中包含参与者列表 |
| `includeAiSummary` | boolean | 否 | 包含 AI 生成的摘要 |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `recordings` | array | 录音对象数组 |
### `grain_get_recording`
根据 ID 获取单个录音的详细信息
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | 是 | Grain API key个人访问令牌 |
| `recordingId` | string | 是 | 录音 UUID |
| `includeHighlights` | boolean | 否 | 包含重点/片段 |
| `includeParticipants` | boolean | 否 | 包含参与者列表 |
| `includeAiSummary` | boolean | 否 | 包含 AI 摘要 |
| `includeCalendarEvent` | boolean | 否 | 包含日历事件数据 |
| `includeHubspot` | boolean | 否 | 包含 HubSpot 关联 |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `id` | string | 录音 UUID |
| `title` | string | 录音标题 |
| `start_datetime` | string | ISO8601 开始时间戳 |
| `end_datetime` | string | ISO8601 结束时间戳 |
| `duration_ms` | number | 持续时间(毫秒) |
| `media_type` | string | 音频、转录或视频 |
| `source` | string | 录音来源zoom、meet、teams 等) |
| `url` | string | 在 Grain 中查看的 URL |
| `thumbnail_url` | string | 缩略图 URL |
| `tags` | array | 标签字符串数组 |
| `teams` | array | 录音所属团队 |
| `meeting_type` | object | 会议类型信息id、name、scope |
| `highlights` | array | 高亮内容(如有) |
| `participants` | array | 参与者(如有) |
| `ai_summary` | object | AI 摘要文本(如有) |
| `calendar_event` | object | 日历事件数据(如有) |
| `hubspot` | object | HubSpot 关联信息(如有) |
### `grain_get_transcript`
获取录音的完整转录文本
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | ---- | ----------- |
| `apiKey` | string | 是 | Grain API 密钥(个人访问令牌) |
| `recordingId` | string | 是 | 录音 UUID |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `transcript` | array | 转录片段数组 |
### `grain_list_teams`
列出工作区中的所有团队
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | 是 | Grain API key个人访问令牌 |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `teams` | array | 团队对象数组 |
### `grain_list_meeting_types`
列出工作区中的所有会议类型
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | 是 | Grain API key个人访问令牌 |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `meeting_types` | array | 会议类型对象数组 |
### `grain_create_hook`
创建一个 webhook 以接收录制事件
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | 是 | Grain API key个人访问令牌 |
| `hookUrl` | string | 是 | Webhook endpoint URL必须响应 2xx |
| `filterBeforeDatetime` | string | 否 | 筛选:此日期之前的录制 |
| `filterAfterDatetime` | string | 否 | 筛选:此日期之后的录制 |
| `filterParticipantScope` | string | 否 | 筛选“internal” 或 “external” |
| `filterTeamId` | string | 否 | 筛选:指定团队 UUID |
| `filterMeetingTypeId` | string | 否 | 筛选:指定会议类型 |
| `includeHighlights` | boolean | 否 | 在 webhook 负载中包含重点内容 |
| `includeParticipants` | boolean | 否 | 在 webhook 负载中包含参与者 |
| `includeAiSummary` | boolean | 否 | 在 webhook 负载中包含 AI 摘要 |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `id` | string | Hook UUID |
| `enabled` | boolean | Hook 是否激活 |
| `hook_url` | string | webhook URL |
| `filter` | object | 已应用的过滤器 |
| `include` | object | 包含的字段 |
| `inserted_at` | string | ISO8601 创建时间戳 |
### `grain_list_hooks`
列出该账户下的所有 webhook
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | 是 | Grain API key个人访问令牌 |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `hooks` | array | Hook 对象数组 |
### `grain_delete_hook`
根据 ID 删除 webhook
#### 输入
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | 是 | Grain API key个人访问令牌 |
| `hookId` | string | 是 | 要删除的 Hook UUID |
#### 输出
| 参数 | 类型 | 说明 |
| --------- | ---- | ----------- |
| `success` | boolean | webhook 删除成功时为 true |
## 备注
- 分类:`tools`
- 类型:`grain`

View File

@@ -38,16 +38,18 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `email` | string | 否 | 联系人的电子邮件地址 |
| `external_id` | string | 否 | 客户提供的联系人的唯一标识符 |
| `phone` | string | 否 | 联系人的电话号码 |
| `name` | string | 否 | 联系人的姓名 |
| `avatar` | string | 否 | 联系人的头像图片 URL |
| `role` | string | 否 | 联系人角色。可选 'user' 或 'lead'。如未指定,默认为 'lead'。 |
| `email` | string | 否 | 联系人邮箱地址 |
| `external_id` | string | 否 | 客户端为联系人提供的唯一标识符 |
| `phone` | string | 否 | 联系人电话号码 |
| `name` | string | 否 | 联系人姓名 |
| `avatar` | string | 否 | 联系人头像图片 URL |
| `signed_up_at` | number | 否 | 用户注册时间Unix 时间戳) |
| `last_seen_at` | number | 否 | 用户上次访问时间Unix 时间戳) |
| `owner_id` | string | 否 | 被分配为联系人账户所有者的管理员 ID |
| `unsubscribed_from_emails` | boolean | 否 | 联系人是否取消订阅电子邮件 |
| `custom_attributes` | string | 否 | 自定义属性,格式为 JSON 对象 \(例如,\{"attribute_name": "value"\}\) |
| `last_seen_at` | number | 否 | 用户最后一次在线时间Unix 时间戳) |
| `owner_id` | string | 否 | 被分配为联系人账户所有者的管理员 ID |
| `unsubscribed_from_emails` | boolean | 否 | 联系人是否已退订邮件 |
| `custom_attributes` | string | 否 | 自定义属性,格式为 JSON 对象(如:\{"attribute_name": "value"\} |
| `company_id` | string | 否 | 创建联系人时关联的公司 ID |
#### 输出
@@ -82,15 +84,18 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `contactId` | string | 是 | 要更新的联系人 ID |
| `email` | string | 否 | 联系人的电子邮件地址 |
| `phone` | string | 否 | 联系人的电话号码 |
| `name` | string | 否 | 联系人的姓名 |
| `avatar` | string | 否 | 联系人的头像图片 URL |
| `role` | string | 否 | 联系人角色。可选 'user' 或 'lead'。 |
| `external_id` | string | 否 | 客户端为联系人提供的唯一标识符 |
| `email` | string | 否 | 联系人邮箱地址 |
| `phone` | string | 否 | 联系人电话号码 |
| `name` | string | 否 | 联系人姓名 |
| `avatar` | string | 否 | 联系人头像图片 URL |
| `signed_up_at` | number | 否 | 用户注册时间Unix 时间戳) |
| `last_seen_at` | number | 否 | 用户上次访问时间Unix 时间戳) |
| `owner_id` | string | 否 | 分配账户所有的管理员 ID |
| `unsubscribed_from_emails` | boolean | 否 | 联系人是否取消订阅电子邮件 |
| `custom_attributes` | string | 否 | 自定义属性,格式为 JSON 对象 \(例如:\{"attribute_name": "value"\}\) |
| `last_seen_at` | number | 否 | 用户最后一次在线时间Unix 时间戳) |
| `owner_id` | string | 否 | 分配为该联系人账户所有的管理员 ID |
| `unsubscribed_from_emails` | boolean | 否 | 联系人是否已退订邮件 |
| `custom_attributes` | string | 否 | 自定义属性,格式为 JSON 对象如:\{"attribute_name": "value"\} |
| `company_id` | string | 否 | 关联的公司 ID |
#### 输出
@@ -123,11 +128,13 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
#### 输入
| 参数 | 类型 | 必 | 描述 |
| 参数 | 类型 | 必 | 描述 |
| --------- | ---- | -------- | ----------- |
| `query` | string | 是 | 搜索查询 \(例如, \{"field":"email","operator":"=","value":"user@example.com"\}\) |
| `per_page` | number | 否 | 每页结果数量 \(最大值: 150\) |
| `starting_after` | string | 否 | 分页游标 |
| `query` | string | 是 | 搜索查询(例如:\{"field":"email", "operator":"=", "value":"user@example.com"\} |
| `per_page` | number | 否 | 每页结果数量最大值150 |
| `starting_after` | string | 否 | 用于分页游标 |
| `sort_field` | string | 否 | 排序字段(例如:"name""created_at""last_seen_at" |
| `sort_order` | string | 否 | 排序方式“ascending” 或 “descending” |
#### 输出
@@ -159,16 +166,17 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
#### 输入
| 参数 | 类型 | 必 | 描述 |
| 参数 | 类型 | 必 | 描述 |
| --------- | ---- | -------- | ----------- |
| `company_id` | string | 是 | 您公司唯一标识符 |
| `name` | string | 否 | 公司名称 |
| `company_id` | string | 是 | 您公司设置的唯一标识符 |
| `name` | string | 否 | 公司名称 |
| `website` | string | 否 | 公司网站 |
| `plan` | string | 否 | 公司计划名称 |
| `plan` | string | 否 | 公司套餐名称 |
| `size` | number | 否 | 公司员工数量 |
| `industry` | string | 否 | 公司所属行业 |
| `monthly_spend` | number | 否 | 公司为您的业务创造的收入。注意:此字段会将浮点数截断为整数(例如155.98 变为 155 |
| `custom_attributes` | string | 否 | 为 JSON 对象的自定义属性 |
| `monthly_spend` | number | 否 | 公司为您的业务带来的收入。注意:此字段会将浮点数截断为整数(例如155.98 变为 155 |
| `custom_attributes` | string | 否 | 自定义属性,格式为 JSON 对象 |
| `remote_created_at` | number | 否 | 您创建公司时的 Unix 时间戳 |
#### 输出
@@ -200,10 +208,11 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
#### 输入
| 参数 | 类型 | 必 | 描述 |
| 参数 | 类型 | 必 | 描述 |
| --------- | ---- | -------- | ----------- |
| `per_page` | 数字 | 否 | 每页结果数量 |
| `page` | 数字 | 否 | 页码 |
| `per_page` | number | 否 | 每页结果数量 |
| `page` | number | 否 | 页码 |
| `starting_after` | string | 否 | 分页游标(优先于基于页码的分页) |
#### 输出
@@ -220,8 +229,9 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | 字符串 | 是 | 要检索的会话 ID |
| `display_as` | 字符串 | 否 | 设为 "plaintext" 检索纯文本消息 |
| `conversationId` | string | 是 | 要检索的会话 ID |
| `display_as` | string | 否 | 设为 "plaintext" 检索纯文本消息 |
| `include_translations` | boolean | 否 | 若为 true会话内容将被翻译为检测到的会话语言 |
#### 输出
@@ -238,8 +248,10 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `per_page` | 数字 | 否 | 每页结果数量 \(最大值: 150\) |
| `starting_after` | 字符串 | 否 | 分页游标 |
| `per_page` | number | 否 | 每页结果数量最大值150 |
| `starting_after` | string | 否 | 分页游标 |
| `sort` | string | 否 | 排序字段(例如:"waiting_since"、"updated_at"、"created_at" |
| `order` | string | 否 | 排序方式:"asc"(升序)或 "desc"(降序) |
#### 输出
@@ -258,9 +270,10 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | 是 | 要回复的会话 ID |
| `message_type` | string | 是 | 消息类型:"comment" 或 "note" |
| `body` | string | 是 | 回复正文文本 |
| `admin_id` | string | 否 | 撰写回复管理员 ID。如果未提供将使用默认管理员Operator/Fin。 |
| `attachment_urls` | string | 否 | 逗号分隔的图片 URL 列表(最多 10 个) |
| `body` | string | 是 | 回复正文 |
| `admin_id` | string | 否 | 回复管理员 ID。如果未提供将使用默认管理员Operator/Fin。 |
| `attachment_urls` | string | 否 | 逗号分隔的图片 URL 列表(最多 10 个) |
| `created_at` | number | 否 | 回复创建时的 Unix 时间戳。如果未提供,则使用当前时间。 |
#### 输出
@@ -275,11 +288,13 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
#### 输入
| 参数 | 类型 | 必 | 描述 |
| 参数 | 类型 | 必 | 描述 |
| --------- | ---- | -------- | ----------- |
| `query` | string | 是 | 作为 JSON 对象的搜索查询 |
| `per_page` | number | 否 | 每页结果数量最大值150 |
| `starting_after` | string | 否 | 用于分页游标 |
| `starting_after` | string | 否 | 分页游标 |
| `sort_field` | string | 否 | 排序字段(例如:"created_at""updated_at" |
| `sort_order` | string | 否 | 排序顺序“ascending” 或 “descending” |
#### 输出
@@ -294,11 +309,15 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
#### 输入
| 参数 | 类型 | 必 | 描述 |
| 参数 | 类型 | 必 | 描述 |
| --------- | ---- | -------- | ----------- |
| `ticket_type_id` | string | 是 | 工单类型的 ID |
| `contacts` | string | 是 | 联系人标识符的 JSON 数组(例如\[\{"id": "contact_id"\}\] |
| `ticket_attributes` | string | 是 | 包含工单属性的 JSON 对象,包括 _default_title_ 和 _default_description_ |
| `contacts` | string | 是 | 联系人标识符的 JSON 数组(例如\[\{"id": "contact_id"\}\] |
| `ticket_attributes` | string | 是 | 包含 _default_title_ 和 _default_description_ 的工单属性 JSON 对象 |
| `company_id` | string | 否 | 要关联工单的公司 ID |
| `created_at` | number | 否 | 工单创建时的 Unix 时间戳。如果未提供,则使用当前时间。 |
| `conversation_to_link_id` | string | 否 | 要关联到此工单的现有会话 ID |
| `disable_notifications` | boolean | 否 | 若为 true创建工单时将不发送通知 |
#### 输出
@@ -332,13 +351,15 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `message_type` | string | 是 | 消息类型:"inapp" 或 "email" |
| `subject` | string | | 消息主题(针对 email 类型) |
| `message_type` | string | 是 | 消息类型:inapp” 表示应用内消息“email” 表示电子邮件消息 |
| `template` | string | | 消息模板样式“plain” 表示纯文本“personal” 表示个性化样式 |
| `subject` | string | 否 | 消息主题(仅适用于 email 类型) |
| `body` | string | 是 | 消息正文 |
| `from_type` | string | 是 | 发送类型:"admin" |
| `from_type` | string | 是 | 发送类型:admin |
| `from_id` | string | 是 | 发送消息的管理员 ID |
| `to_type` | string | 是 | 接收类型:"contact" |
| `to_type` | string | 是 | 接收类型:contact |
| `to_id` | string | 是 | 接收消息的联系人的 ID |
| `created_at` | number | 否 | 消息创建时的 Unix 时间戳。如果未提供,则使用当前时间。 |
#### 输出

View File

@@ -60,9 +60,7 @@ Jina AI Reader 专注于从网页中提取最相关的内容,去除杂乱、
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `content` | 字符串 | 从 URL 提取的内容,处理为干净且适合 LLM 的文本 |
| `links` | 数组 | 页面中找到的链接列表(当启用 gatherLinks 或 withLinksummary 时) |
| `images` | 数组 | 页面中找到的图片列表(当启用 withImagesummary 时) |
| `content` | 字符串 | 从 URL 提取的内容,处理为简洁、适合 LLM 的文本 |
### `jina_search`

View File

@@ -1,6 +1,6 @@
---
title: 内存
description: 添加内存存储
description: 添加记忆存储
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
@@ -12,53 +12,50 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
## 使用说明
记忆集成到工作流程中。可以添加记忆、获取记忆、获取所有记忆以及删除记忆。
Memory 集成到工作流程中。可以添加、获取单条记忆、获取所有记忆以及删除记忆。
## 工具
### `memory_add`
向数据库添加新的内存,或将数据追加到有相同 ID 的现有内存中。
向数据库添加新记忆,或将内容追加到有相同 ID 的记忆中。
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | 否 | 会话标识符(例如,user-123session-abc。如果此 block 已存在具有该 conversationId 的内存,新消息将附加到该内存中。 |
| `id` | string | 否 | 会话标识符的旧参数。请用 conversationId。为向后兼容而提供。 |
| `role` | string | 是 | 代理内存的角色user、assistant 或 system |
| `content` | string | 是 | 代理内存的内容 |
| `blockId` | string | 否 | 可选的 block ID。如果未提供将使用执行上下文中的当前 block ID或默认为 "default"。 |
| --------- | ---- | ---- | ----------- |
| `conversationId` | string | 否 | 会话标识符(user-123session-abc。如果已存在该 conversationId 的记忆,则新消息会追加到其中。 |
| `id` | string | 否 | 旧版会话标识参数。请使用 conversationId,保留用于兼容性。 |
| `role` | string | 是 | agent 记忆的角色user、assistant 或 system |
| `content` | string | 是 | agent 记忆的内容 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 是否成功添加了内存 |
| `memories` | 数组 | 包含新添加或更新内存的内存对象数组 |
| `error` | 字符串 | 如果操作失败,显示错误信息 |
| `success` | boolean | 记忆是否添加成功 |
| `memories` | array | 包含新或更新记忆的记忆对象数组 |
| `error` | string | 操作失败时的错误信息 |
### `memory_get`
通过 conversationId、blockId、blockName 或其组合检索内存。返回所有匹配的内存
根据 conversationId 检索记忆,返回匹配的记忆内容
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | 否 | 会话标识符(例如,user-123session-abc如果单独提供,将返回会话在所有 block 中的所有内存。 |
| `id` | string | 否 | 会话标识符的旧参数。请用 conversationId。为向后兼容而提供。 |
| `blockId` | string | 否 | block 标识符。如果单独提供,将返回此 block 中所有会话的所有内存。如果与 conversationId 一起提供,将返回此 block 中该特定会话的内存。 |
| `blockName` | string | 否 | block 名称。blockId 的替代选项。如果单独提供,将返回具有此名称的 block 的所有内存。如果与 conversationId 一起提供,将返回具有此名称的 block 中该会话的内存。 |
| --------- | ---- | ---- | ----------- |
| `conversationId` | string | 否 | 会话标识符(user-123session-abc。返回会话的记忆。 |
| `id` | string | 否 | 旧版会话标识参数。请使用 conversationId,保留用于兼容性。 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | boolean | 内存是否成功检索 |
| `memories` | array | 包含 conversationId、blockId、blockName 和 data 字段的内存对象数组 |
| `success` | boolean | 是否成功检索到内存 |
| `memories` | array | 包含 conversationId 和 data 字段的内存对象数组 |
| `message` | string | 成功或错误信息 |
| `error` | string | 如果操作失败的错误信息 |
| `error` | string | 操作失败的错误信息 |
### `memory_get_all`
@@ -74,32 +71,30 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | boolean | 是否成功检索到所有内存 |
| `memories` | array | 包含 key、conversationId、blockId、blockName 和 data 字段的所有内存对象数组 |
| `memories` | array | 包含 key、conversationId 和 data 字段的所有内存对象数组 |
| `message` | string | 成功或错误信息 |
| `error` | string | 如果操作失败的错误信息 |
| `error` | string | 操作失败的错误信息 |
### `memory_delete`
通过 conversationId、blockId、blockName 或其组合删除内存。支持批量删除
根据 conversationId 删除内存
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `conversationId` | string | 否 | 会话标识符 \(例如,user-123session-abc\)。如果单独提供,将删除会话在所有块中的所有内存。 |
| `id` | string | 否 | 会话标识符的旧参数。请用 conversationId。为向后兼容而提供。 |
| `blockId` | string | 否 | 块标识符。如果单独提供,将删除此块中所有会话的所有内存。如果与 conversationId 一起提供,将删除此块中特定会话的内存。 |
| `blockName` | string | 否 | 块名称。是 blockId 的替代项。如果单独提供,将删除具有此名称的块的所有内存。如果与 conversationId 一起提供,将删除此名称的块中该会话的内存。 |
| `conversationId` | string | 否 | 会话标识符(如 user-123session-abc)。将删除会话的所有内存。 |
| `id` | string | 否 | 旧版会话标识参数。请使用 conversationId,保留用于兼容性。 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | boolean | 内存是否成功删除 |
| `success` | boolean | 是否成功删除内存 |
| `message` | string | 成功或错误信息 |
| `error` | string | 如果操作失败的错误信息 |
| `error` | string | 操作失败的错误信息 |
## 注意
## 注意事项
- 类别:`blocks`
- 类型:`memory`

View File

@@ -47,12 +47,13 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `projectId` | 字符串 | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | 字符串 | 是 | 要查询的 Supabase 表名 |
| `filter` | 字符串 | 否 | PostgREST 过滤条件 \(例如:"id=eq.123"\) |
| `orderBy` | 字符串 | 否 | 排序的列名 \(添加 DESC 表示降序\) |
| `limit` | 数字 | 否 | 返回的最大行数 |
| `apiKey` | 字符串 | | 您的 Supabase 服务角色密钥 |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要查询的 Supabase 表名 |
| `schema` | string | 否 | 要查询的数据库 schema \(默认public\)。用于访问其他 schema 下的表。|
| `filter` | string | 否 | PostgREST 过滤条件 \(例如:"id=eq.123"\) |
| `orderBy` | string | 否 | 排序的列名 \(添加 DESC 表示降序\) |
| `limit` | number | | 返回的最大行数 |
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
#### 输出
@@ -71,7 +72,8 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| --------- | ---- | -------- | ----------- |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要插入数据的 Supabase 表名 |
| `data` | array | | 要插入的数据 \(对象数组或单个对象\) |
| `schema` | string | | 要插入的数据库 schema \(默认public\)。用于访问其他 schema 下的表。|
| `data` | array | 是 | 要插入的数据(对象数组或单个对象)|
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
#### 输出
@@ -91,7 +93,8 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| --------- | ---- | -------- | ----------- |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要查询的 Supabase 表名 |
| `filter` | string | | PostgREST 筛选条件以找到特定行 \(例如:"id=eq.123"\) |
| `schema` | string | | 要查询的数据库 schema \(默认public\)。用于访问其他 schema 下的表。|
| `filter` | string | 是 | 用于查找特定行的 PostgREST 过滤条件 \(例如:"id=eq.123"\) |
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
#### 输出
@@ -110,9 +113,10 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要更新的 Supabase 表的名称 |
| `filter` | string | | 用于标识要更新行的 PostgREST 筛选条件 \(例如:"id=eq.123"\) |
| `data` | object | 是 | 要更新到匹配行的数据 |
| `table` | string | 是 | 要更新的 Supabase 表 |
| `schema` | string | | 要更新的数据库 schema \(默认public\)。用于访问其他 schema 下的表。|
| `filter` | string | 是 | PostgREST 筛选条件,用于定位要更新的行 \(例如:"id=eq.123"\) |
| `data` | object | 是 | 要在匹配行中更新的数据 |
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
#### 输出
@@ -131,8 +135,9 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要删除的 Supabase 表的名称 |
| `filter` | string | | 用于标识要删除行的 PostgREST 筛选条件 \(例如:"id=eq.123"\) |
| `table` | string | 是 | 要删除数据的 Supabase 表 |
| `schema` | string | | 要删除数据的数据库 schema \(默认public\)。用于访问其他 schema 下的表。|
| `filter` | string | 是 | PostgREST 筛选条件,用于定位要删除的行 \(例如:"id=eq.123"\) |
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
#### 输出
@@ -151,8 +156,9 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要插入或更新数据的 Supabase 表名 |
| `data` | array | | 要插入或更新的数据 \(插入或更新\) - 对象数组或单个对象 |
| `table` | string | 是 | 要 upsert 数据的 Supabase 表名 |
| `schema` | string | | 要 upsert 的数据库 schema \(默认public\)。用于访问其他 schema 下的表。|
| `data` | array | 是 | 要 upsert插入或更新的数据——对象数组或单个对象 |
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
#### 输出
@@ -172,6 +178,7 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| --------- | ---- | -------- | ----------- |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要统计行数的 Supabase 表名 |
| `schema` | string | 否 | 要统计的数据库 schema \(默认public\)。用于访问其他 schema 下的表。 |
| `filter` | string | 否 | PostgREST 过滤条件 \(例如:"status=eq.active"\) |
| `countType` | string | 否 | 计数类型exact、planned 或 estimated \(默认exact\) |
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
@@ -193,8 +200,9 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
| --------- | ---- | -------- | ----------- |
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如jdrkgepadsdopsntdlom\) |
| `table` | string | 是 | 要搜索的 Supabase 表名 |
| `column` | string | | 要搜索的 |
| `query` | string | 是 | 搜索查询 |
| `schema` | string | | 要搜索的数据库 schema \(默认public\)。用于访问其他 schema 下的表。 |
| `column` | string | 是 | 搜索的列名 |
| `query` | string | 是 | 搜索查询内容 |
| `searchType` | string | 否 | 搜索类型plain、phrase 或 websearch \(默认websearch\) |
| `language` | string | 否 | 文本搜索配置的语言 \(默认english\) |
| `limit` | number | 否 | 返回的最大行数 |

View File

@@ -39,7 +39,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必填 | 说明 |
| --------- | ---- | -------- | ----------- |
| `model` | string | 是 | 要使用的模型(例如 gpt-4o、claude-sonnet-4-5、gemini-2.0-flash |
| `model` | string | 是 | 要使用的模型(例如gpt-4o、claude-sonnet-4-5、gemini-2.0-flash |
| `systemPrompt` | string | 否 | 设置助手行为的 system prompt |
| `context` | string | 是 | 发送给模型的用户消息或上下文 |
| `apiKey` | string | 否 | 提供方的 API key如未提供托管模型将使用平台密钥 |
@@ -49,6 +49,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| `azureApiVersion` | string | 否 | Azure OpenAI API 版本 |
| `vertexProject` | string | 否 | Vertex AI 的 Google Cloud 项目 ID |
| `vertexLocation` | string | 否 | Vertex AI 的 Google Cloud 区域(默认为 us-central1 |
| `vertexCredential` | string | 否 | Vertex AI 的 Google Cloud OAuth 凭证 ID |
#### 输出

View File

@@ -5,7 +5,6 @@ title: 计划
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
计划模块会在指定的时间间隔或时间点自动触发工作流。
@@ -21,67 +20,58 @@ import { Video } from '@/components/ui/video'
## 计划选项
通过下拉选项配置工作流的运行时间:
配置工作流的运行时间:
<Tabs items={['简单间隔', 'Cron 表达式']}>
<Tab>
<ul className="list-disc space-y-1 pl-6">
<li><strong>每隔几分钟</strong>5 分钟、15 分钟、30 分钟的间隔</li>
<li><strong>每小时</strong>:每小时或每隔几小时</li>
<li><strong>每天</strong>:每天一次或多次</li>
<li><strong>每周</strong>一周中的特定日子</li>
<li><strong>每月</strong>一个月中的特定日子</li>
<li><strong>每 X 分钟</strong>按分钟间隔运行1-1440</li>
<li><strong>每小时</strong>:每小时在指定的分钟运行</li>
<li><strong>每天</strong>:每天在指定时间运行</li>
<li><strong>每周</strong>每周在指定的星期和时间运行</li>
<li><strong>每月</strong>每月在指定的日期和时间运行</li>
</ul>
</Tab>
<Tab>
<p>使用 cron 表达式进行高级调度:</p>
<div className="text-sm space-y-1">
<div><code>0 9 * * 1-5</code> - 每个工作日的上午 9 点</div>
<div><code>*/15 * * * *</code> - 每 15 分钟</div>
<div><code>*/15 * * * *</code> - 每 15 分钟一次</div>
<div><code>0 0 1 * *</code> - 每月的第一天</div>
</div>
</Tab>
</Tabs>
## 配置计划
## 启用
当工作流被计划时
- 计划变为**激活**状态,并显示下次执行时间
- 点击 **"已计划"** 按钮以停用计划
- 计划在 **连续失败 3 次** 后会自动停用
计划与工作流部署相关联
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-2.png"
alt="活动计划块"
width={500}
height={400}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="停用的计划"
width={500}
height={350}
className="my-6"
/>
</div>
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="禁用计划"
width={500}
height={400}
className="my-6"
/>
</div>
已禁用的计划会显示上次激活的时间。点击 **"已禁用"** 徽章以重新激活计划。
- **部署工作流** → 计划激活并开始运行
- **取消部署工作流** → 计划被移除
- **重新部署工作流** → 计划会以当前配置重新创建
<Callout>
计划块无法接收传入连接,仅作为纯工作流触发器
必须先部署工作流,计划才会开始运行。请先配置计划块,然后在工具栏中部署
</Callout>
## 自动禁用
计划在连续 **10 次失败** 后会自动禁用,以防止错误持续发生。禁用后:
- 计划块上会显示警告徽章
- 计划将停止执行
- 点击徽章可重新激活计划
<div className="flex justify-center">
<Image
src="/static/blocks/schedule-3.png"
alt="已禁用的计划"
width={500}
height={400}
className="my-6"
/>
</div>
<Callout>
计划块无法接收传入连接,只能作为工作流的入口点。
</Callout>

View File

@@ -217,19 +217,21 @@ checksums:
content/9: cbca5d806da167603e38e7dc90344e57
fb53ce2c1fc28db4c6c09f5296ff59c6:
meta/title: a75428cb811bc50150cecde090a3a0d5
content/0: c0a142478cc5c515f87d368fa72da818
content/0: e4684b7201c2aed215c82606e9eaa293
content/1: 3fcad3dff5044fbf0c734bab806c437e
content/2: 7c82b7d111a2517b08861c4c0e71eff9
content/3: 1ed1a03c7f922f4b1437594f34ea2afb
content/4: ca43f34465308970910b39fa073e10ec
content/5: f67fd398c98884cf0829682dca6d5d91
content/6: 72a5feaa2b80a1f22d224e311a0e4efe
content/7: 62261cedf5fff6a13220f3f0b6de661b
content/8: e58bf5c8afb239f2606ec5dfba30fc2f
content/9: 35840d3d91271d11c9449e7f316ff280
content/10: 2ff1c8bf00c740f66bce8a4a7f768ca8
content/11: 909f57e2475676b16d90b6605cd3ff43
content/12: 8f5b5d43297c4ff114ca49395878292b
content/4: d34ebf41fb97810c8398b4064520bd7b
content/5: 5025a2d2e9eadc2b91f323b2862b0a1a
content/6: 913f67efd4923e0f70e29640405e34d2
content/7: a706670c6362a1b723ccc3d6720ad6af
content/8: ab4fe131de634064f9a7744a11599434
content/9: 2f6c9564a33ad9f752df55840b0c8e16
content/10: fef34568e5bbd5a50e2a89412f85302c
content/11: b7ae0ecf6fbaa92b049c718720e4007e
content/12: bcd95e6bef30b6f480fee33800928b13
content/13: 2ff1c8bf00c740f66bce8a4a7f768ca8
content/14: 16eb64906b9e981ea3c11525ff5a1c2e
73129cc41f543288d67924faea3172db:
meta/title: 8cbe02c3108a0dbe0586dbc18db04efe
meta/description: 9540ac7731cebd594afa4ce2fb59ab9d
@@ -557,7 +559,7 @@ checksums:
content/8: 6325adefb6e1520835225285b18b6a45
content/9: b7fa85fce9c7476fe132df189e27dac1
content/10: 371d0e46b4bd2c23f559b8bc112f6955
content/11: 7ad14ccfe548588081626cfe769ad492
content/11: a34c59648e0f7218a8e9b72c333366fb
content/12: bcadfc362b69078beee0088e5936c98b
content/13: 6af66efd0da20944a87fdb8d9defa358
content/14: b3f310d5ef115bea5a8b75bf25d7ea9a
@@ -698,49 +700,49 @@ checksums:
content/11: 04bd9805ef6a50af8469463c34486dbf
content/12: a3671dd7ba76a87dc75464d9bf9b7b4b
content/13: 371d0e46b4bd2c23f559b8bc112f6955
content/14: 319b69dde6e263f38497a0a84dc58e60
content/14: 80578981b8b3a1cf579e52ff05e7468d
content/15: bcadfc362b69078beee0088e5936c98b
content/16: 09ed43219d02501c829594dbf4128959
content/17: 88ae2285d728c80937e1df8194d92c60
content/18: cb8a6d5bf54beed29f0809f80b27648d
content/19: 371d0e46b4bd2c23f559b8bc112f6955
content/20: cdbe4726ca8dd4bb6a013055e14117f5
content/20: 3212d5f414ea8ad920385eff8b18e61a
content/21: bcadfc362b69078beee0088e5936c98b
content/22: 5c59a9fe4d16c81655acd350d08a052e
content/23: 7d96d99e45880195ccbd34bddaac6319
content/24: 75d05f96dff406db06b338d9ab8d0bd7
content/25: 371d0e46b4bd2c23f559b8bc112f6955
content/26: c5aa1613dc223a1c4348732b24c13e8b
content/26: cfd801fa517b4bcfa5fa034b2c4e908a
content/27: bcadfc362b69078beee0088e5936c98b
content/28: a0284632eb0a15e66f69479ec477c5b1
content/29: b1e60734e590a8ad894a96581a253bf4
content/30: bebedc0826cdad098631d8090379501e
content/31: 371d0e46b4bd2c23f559b8bc112f6955
content/32: 017a5d7255b0b029754d91c0c4063a15
content/32: d1ac6e1bb29969a317cb9b98bbd3bf5e
content/33: bcadfc362b69078beee0088e5936c98b
content/34: 31a3025a3f0b9f7348f8c0b45a47d1dd
content/35: 9378daf3cd90dde934d19068f626e262
content/36: 65b3f733c34d0adb46e689c95980a45f
content/37: 371d0e46b4bd2c23f559b8bc112f6955
content/38: 35e18d7355312276b6706a79cdb4bb98
content/38: 2308dbb1aa8b94869e61aa991dc1182a
content/39: bcadfc362b69078beee0088e5936c98b
content/40: ebebd366813cd5cfb35e70121ab97565
content/41: 16f5fe78076e326d643c194312c730a5
content/42: 5d1098c4ada4a79ade1464bd8853fc9e
content/43: 371d0e46b4bd2c23f559b8bc112f6955
content/44: b37f6692238f3a45bfcf106f0d192b21
content/44: 39557f0370b8aa3677ee69977a78cb5d
content/45: bcadfc362b69078beee0088e5936c98b
content/46: 1788748095a805b62a0e21403789dad7
content/47: 0c504770bfe726a98df3e3fadeaf7640
content/48: 5673ae2a352e532a43b65322df0d33a8
content/49: 371d0e46b4bd2c23f559b8bc112f6955
content/50: 479fb8fb1b760e9a045b375aabfb1a45
content/50: f2e7eefa05af1e373a3c667164b00276
content/51: bcadfc362b69078beee0088e5936c98b
content/52: 72f3fd98f52ec42be8a95a019d74c253
content/53: 14db7775b92dc99c54d1fd5497d298ca
content/54: f84723b1195268ffc05970b701bf866a
content/55: 371d0e46b4bd2c23f559b8bc112f6955
content/56: 90c244b243ef73e8d08cc6265ff61445
content/56: 826a89366439187745611f2080d6ddd1
content/57: bcadfc362b69078beee0088e5936c98b
content/58: f1735da5af62123df5e5345ab834b2fa
content/59: dd231637d3d327f0daf546fe92594ac6
@@ -1896,25 +1898,25 @@ checksums:
content/5: b061763378e5f0aca9a25f819d03961d
content/6: 75972cfff5aa2f1d4c24f2a1c867cfb7
content/7: 371d0e46b4bd2c23f559b8bc112f6955
content/8: 8579c5fe58782fed019acfd5019c515e
content/8: deb556a0ce8537461dd58a02e584d808
content/9: bcadfc362b69078beee0088e5936c98b
content/10: 467bff9c1a90c96930d1b05286dd4bf8
content/11: ba06fa96a9fe3d308546a32490e5a8d8
content/12: 58490686b3358445d2fa89e8a048fb51
content/12: 8461d1c991d4c595a64940dc51b130e5
content/13: 371d0e46b4bd2c23f559b8bc112f6955
content/14: 9acf9c7ac7b83db796a143abc8f8de0f
content/14: 72895fa081d39eec0bdf7877fd53580e
content/15: bcadfc362b69078beee0088e5936c98b
content/16: d4ac7483993edc4308e6034d4bd551bd
content/16: 8a2c3d0b818f57012cb3d2e50d2dd05d
content/17: e13dff194d0bc1cecec833cb9805ceaa
content/18: 8813ba0bc9fbf636f3a38e59667df896
content/19: 371d0e46b4bd2c23f559b8bc112f6955
content/20: d71b6bb8e2dd6ce98101aec6a1dd77f2
content/21: bcadfc362b69078beee0088e5936c98b
content/22: d2f04b0f593a08f7656e7431a6b4e5e5
content/22: 7b17554ad765c6283fc5fe6c29b9cc77
content/23: 9eebc263273839cc24231b56fd90b71d
content/24: 9acb060c11b48ae498d55aceb053b996
content/24: c442d573aaae976f5fab534388cee115
content/25: 371d0e46b4bd2c23f559b8bc112f6955
content/26: 707c54d664fcfc307cea6027721b940b
content/26: 2bb55f4566a06bedea778f010f093d19
content/27: bcadfc362b69078beee0088e5936c98b
content/28: b48618ae66e09c34074972d091ceaef0
content/29: b3f310d5ef115bea5a8b75bf25d7ea9a
@@ -2664,7 +2666,7 @@ checksums:
content/12: 371d0e46b4bd2c23f559b8bc112f6955
content/13: 6ad8fcd98fc25eab726d05f9e9ccc6a4
content/14: bcadfc362b69078beee0088e5936c98b
content/15: 0ac8cd06fceaf16c960de79f7df987ee
content/15: 1eb58de69f18ba555d7f349fed365de5
content/16: c340d51e1b2d05b9b68a79baa8e9481a
content/17: 64d5a97527775c7bfcdcbb418a10ea35
content/18: 371d0e46b4bd2c23f559b8bc112f6955
@@ -4407,26 +4409,29 @@ checksums:
content/9: 072b097db5f884122f323c5d8386671c
content/10: 58882acf2056c9e54e27f38f1203f0cd
content/11: 68d81199ca72ece1c31474f5729f98cd
content/12: d152f1dcd6cd068be14a7ae05afd216e
content/13: bf918d2d9b62a9ab640371cea0629c28
content/14: 9b2ebe8a9c3efa9f14c35f6d71a7a274
content/15: fcc7c89bc4c545daecba16f986165f9e
content/16: 395dc70853e0c9ca156db72f3156ae36
content/17: b5b3cc0a48c0f06fa4c475544be4a0e6
content/18: 462ac511233020ce80369b6f834387bf
content/19: cad571a6ce02e0807c5c23699b115c17
content/20: 50251a58c6c1b448dc9a9ed65d7db7aa
content/21: 791148e6bad524eb53286aeea5ddbf24
content/22: ec70f2b34ad4b3839ff42a76c0378655
content/23: dd4d559eba1a9c83a9166bc491d2b2ac
content/24: 6b0f081f8453c427f3b3720d44e62857
content/25: 84dc89f2666e7201c72c258cb4c4e2d0
content/26: 4ae642d59321118a88ebf4ce8751c05a
content/27: 4703a7028a16d9e716631be2a49c72bb
content/28: d1c7c19aae4736f403b0df60cb6e48a4
content/29: 9e5a786192608844493dfbb6e4100886
content/30: 8961e5fb3a49bb48580b23dfd5e053c6
content/31: 1022391b9b79b1d2e9f8db789f9c50a2
content/12: 95cb1a1f36f0e562d85e0e54f0f439ba
content/13: ddaad9625d2ed0f4ec1b96094e7ec7c0
content/14: a050d81709025cb6c6c72619c80219c5
content/15: 8a7329562f5f1324f94ae0bc9b2b3853
content/16: bf918d2d9b62a9ab640371cea0629c28
content/17: 9b2ebe8a9c3efa9f14c35f6d71a7a274
content/18: fcc7c89bc4c545daecba16f986165f9e
content/19: 395dc70853e0c9ca156db72f3156ae36
content/20: b5b3cc0a48c0f06fa4c475544be4a0e6
content/21: 462ac511233020ce80369b6f834387bf
content/22: cad571a6ce02e0807c5c23699b115c17
content/23: 50251a58c6c1b448dc9a9ed65d7db7aa
content/24: 791148e6bad524eb53286aeea5ddbf24
content/25: ec70f2b34ad4b3839ff42a76c0378655
content/26: dd4d559eba1a9c83a9166bc491d2b2ac
content/27: 6b0f081f8453c427f3b3720d44e62857
content/28: 84dc89f2666e7201c72c258cb4c4e2d0
content/29: 4ae642d59321118a88ebf4ce8751c05a
content/30: 4703a7028a16d9e716631be2a49c72bb
content/31: d1c7c19aae4736f403b0df60cb6e48a4
content/32: 9e5a786192608844493dfbb6e4100886
content/33: 8961e5fb3a49bb48580b23dfd5e053c6
content/34: 1022391b9b79b1d2e9f8db789f9c50a2
3fd794279590b9d143d409252c8bcf91:
meta/title: 439cb79e8dfd7923d35b85cfbb6fd201
content/0: dc697d1a69b3cb0152fda60b44bc7da1
@@ -4567,11 +4572,11 @@ checksums:
content/10: d19c8c67f52eb08b6a49c0969a9c8b86
content/11: 4024a36e0d9479ff3191fb9cd2b2e365
content/12: 0396a1e5d9548207f56e6b6cae85a542
content/13: e3e263fb516c8a5413e94064e7700410
content/14: 41bbe0664b778cddce4e14055f6342a9
content/15: 8a274099c74e6b8dac89b8c413601d98
content/16: 55cac8cbd4373a3d1b51c8bbc536a7ce
content/17: 8159087a0aa1e5967545fa6ce86ec5f4
content/13: 4bfdeac5ad21c75209dcdfde85aa52b0
content/14: 35df9a16b866dbe4bb9fc1d7aee42711
content/15: 135c044066cea8cc0e22f06d67754ec5
content/16: 6882b91e30548d7d331388c26cf2e948
content/17: 29aed7061148ae46fa6ec8bcbc857c3d
content/18: e0571c88ea5bcd4305a6f5772dcbed98
content/19: 83fc31418ff454a5e06b290e3708ef32
content/20: 4392b5939a6d5774fb080cad1ee1dbb8
@@ -4594,7 +4599,7 @@ checksums:
content/37: 7bb928aba33a4013ad5f08487da5bbf9
content/38: dbbf313837f13ddfa4a8843d71cb9cc4
content/39: cf10560ae6defb8ee5da344fc6509f6e
content/40: c5dc6e5de6e45b17ee1f5eb567a18e2f
content/40: 1dea5c6442c127ae290185db0cef067b
content/41: 332dab0588fb35dabb64b674ba6120eb
content/42: 714b3f99b0a8686bbb3434deb1f682b3
content/43: ba18ac99184b17d7e49bd1abdc814437
@@ -47157,7 +47162,7 @@ checksums:
content/9: b037aed60eb91ac0b010b6c1ce1a1a70
content/10: b1c4181c4bc75edd5dfa188bcdd3b6c4
content/11: 371d0e46b4bd2c23f559b8bc112f6955
content/12: a830a7e59569945973febaed7634fcf8
content/12: a71a30e9f91c10daf481ea8f542e91f6
content/13: bcadfc362b69078beee0088e5936c98b
content/14: 59c08999f9c404330ebd8f8a7d21e1a1
content/15: 49d191d312481589419c68a5506b0d71
@@ -47169,7 +47174,7 @@ checksums:
content/21: 2e70c0a22a98675a13b493b9761ff92f
content/22: 107f6e51a1e896ee4d18f8ed4f82c50f
content/23: 371d0e46b4bd2c23f559b8bc112f6955
content/24: 3a9d07c3ebf40ef00a67fb694dfbcf97
content/24: e506fbf4b80deecb3b44b29b8dc3438b
content/25: bcadfc362b69078beee0088e5936c98b
content/26: a9096a341b00ce4f4891daaca2586d1c
content/27: 934a0124aa2118682b2b17fa258ff06a
@@ -47181,7 +47186,7 @@ checksums:
content/33: 1a1e332b525e86f7fd92f9da1ac0096c
content/34: 00098e1591c0f80ef6287d934d391409
content/35: 371d0e46b4bd2c23f559b8bc112f6955
content/36: 991ec136b689e0dc95719260a0cef14a
content/36: e52688ff2fa61ce71026f33930e1ec86
content/37: bcadfc362b69078beee0088e5936c98b
content/38: d84fb23e5dfc9d41a177acd7dfb28e72
content/39: 17be090a79154f557bc96f940c687aea
@@ -47193,7 +47198,7 @@ checksums:
content/45: c76943404f9c8d34a85e6315359ed0c4
content/46: b5e111e430aa1c929fb07d5844bf65eb
content/47: 371d0e46b4bd2c23f559b8bc112f6955
content/48: 3e3ced1f6eb6c0ef39098531beb12598
content/48: 6692edffddc28d3c64974ded23d1def2
content/49: bcadfc362b69078beee0088e5936c98b
content/50: dbc08cce26f9565e719891bbbf4632a9
content/51: d0ce65f5420745c45ab42b7edd135bf4
@@ -47205,37 +47210,37 @@ checksums:
content/57: 440f2732ad006bee8cccc975fdbf673a
content/58: 7a7048c54763b0109643f37e583381ce
content/59: 371d0e46b4bd2c23f559b8bc112f6955
content/60: 5672a02f72bdb165f91b43e4ad24c4a9
content/60: 11ad0a529a7fcc5892ae811cde6894f6
content/61: bcadfc362b69078beee0088e5936c98b
content/62: c7055d8ce044e49929d4f005a28d7c0a
content/63: 2d7bad4340c1bc6a28e836e180e26c00
content/64: 576dbecf29644e7abf59d25ffda5728c
content/65: 371d0e46b4bd2c23f559b8bc112f6955
content/66: 61a490d594e10484da99d6b0e8ee684d
content/66: 59015900ce6b64caff0784491ec59ff9
content/67: bcadfc362b69078beee0088e5936c98b
content/68: 2f225a893086726db6b6a994cc8a5e3c
content/69: 63cbf703cf33e0fee06f12fb23184352
content/70: dae1fda5ec57e1b598a7e2596007a775
content/71: 371d0e46b4bd2c23f559b8bc112f6955
content/72: 7f00464f8e9368368ed1104fba516e5d
content/72: 757f42df5247f2e6684ab32888d30e11
content/73: bcadfc362b69078beee0088e5936c98b
content/74: 380f805a5118dd4957f4fcce41e01b86
content/75: 935f1a713d05f32d3d826434a7e715ee
content/76: e505d8f656fb6e3b65a98cb73d744598
content/77: 371d0e46b4bd2c23f559b8bc112f6955
content/78: e218c4f319e6a6a50c0535d3ee5e8fcf
content/78: 2e77859b0f2c89186fc6a2d51287ea47
content/79: bcadfc362b69078beee0088e5936c98b
content/80: 22bd99d5b844817b808b9d0d3baddac4
content/81: e959b48af94a559e9c46cbd7653d2dd2
content/82: 5e3c04c5a9fabfceb7fcc00215f93bf9
content/83: 371d0e46b4bd2c23f559b8bc112f6955
content/84: 8382a2ecb67d09244a2f004e098e0b46
content/84: a92b2a22061ee6fd453af32e0155f5aa
content/85: bcadfc362b69078beee0088e5936c98b
content/86: d84fb23e5dfc9d41a177acd7dfb28e72
content/87: c886f11a0852010b90a1032b97118920
content/88: c60c832c08f9e1ff5f91565bf4ba549e
content/89: 371d0e46b4bd2c23f559b8bc112f6955
content/90: 9019e9ff616caa381458fe1526c87840
content/90: 1545794f4e8e696db96c3b660de684ec
content/91: bcadfc362b69078beee0088e5936c98b
content/92: 573530e346d195727862b03b380f40fc
content/93: 3d31dedf076ec23547189a3eb5fe04c4
@@ -47247,7 +47252,7 @@ checksums:
content/99: e1a03f917ad8b0a1ebec9a601aa3eede
content/100: 3aa857b8f85da07ee2d87e65c95b76d0
content/101: 371d0e46b4bd2c23f559b8bc112f6955
content/102: c9e677ff65fd547dffa46b9c517402ac
content/102: cc49a24c087d08717866a162cc47776c
content/103: bcadfc362b69078beee0088e5936c98b
content/104: c6d621ee3cdc66de2c20b70a39aafe12
content/105: b3f310d5ef115bea5a8b75bf25d7ea9a
@@ -49866,3 +49871,84 @@ checksums:
content/32: fd0f38eb3fe5cf95be366a4ff6b4fb90
content/33: b3f310d5ef115bea5a8b75bf25d7ea9a
content/34: 4a7b2c644e487f3d12b6a6b54f8c6773
d75b83c6e1f54ba41b8cd27960256f4e:
meta/title: 63d9b961cc414fe48ed3a117b1849ac0
meta/description: 0828295c4f8482d4ab18ae67cefb3efa
content/0: 1b031fb0c62c46b177aeed5c3d3f8f80
content/1: ce93512e241ca1ac9723d797d937e8d6
content/2: 4539a8e7b9a0b8c570e8b2261e6d53e8
content/3: 05d783b8313bd21464edbc35f72acda7
content/4: aadfc263ce44fb67b5ec899cf7034707
content/5: 7feedc49fa38d45979f4ae3685e2a2e8
content/6: 6d8ac64adb588d4675e8ad779861cf79
content/7: 9b55ef7d0cb63e28ac9aa5b71ca5611e
content/8: 821e6394b0a953e2b0842b04ae8f3105
content/9: 3e3c921ad486b0390454b325a0ecab98
content/10: 9c8aa3f09c9b2bd50ea4cdff3598ea4e
content/11: 3e12916db64b7037df05c733542689b8
content/12: bf76a8fa5e9be0ad03d4a25fc1cd5d2c
content/13: 371d0e46b4bd2c23f559b8bc112f6955
content/14: 7476e5130f17fef0005e9eb79a288a4b
content/15: bcadfc362b69078beee0088e5936c98b
content/16: 921522dc74bcfe253933280a44e32325
content/17: 5c91a98c8c182a86561bdc2bb55d52fb
content/18: 5a003869e25c931a6a39e75f1fbb331e
content/19: 371d0e46b4bd2c23f559b8bc112f6955
content/20: c03a1ad5898fb9592c47f9fef3a443f9
content/21: bcadfc362b69078beee0088e5936c98b
content/22: 966dd802eb6aa5f8a6d37be800aa0476
content/23: d7f931ee4088a41234a19dbc070bbb06
content/24: b7a5a66f81700ac0f58f0f417a090db1
content/25: 371d0e46b4bd2c23f559b8bc112f6955
content/26: 8dddce76764cf0050ac4f8cb88cbf3b7
content/27: bcadfc362b69078beee0088e5936c98b
content/28: b30efde22ffd4646ac11e1b7053b2f71
content/29: e12dd4d7b99e7c7038b8935f48fbed29
content/30: fd9b29ad276abb6ffbb5350d71fb174a
content/31: 371d0e46b4bd2c23f559b8bc112f6955
content/32: 2e9928cbf2e736fc61f08d4339ccae59
content/33: bcadfc362b69078beee0088e5936c98b
content/34: 99b063108e07f3350f6ec02ce632d682
content/35: c1d1369970a7430014aa1f70a75e1b56
content/36: 25adb991028a92365272704d5921c0fe
content/37: 371d0e46b4bd2c23f559b8bc112f6955
content/38: 2e9928cbf2e736fc61f08d4339ccae59
content/39: bcadfc362b69078beee0088e5936c98b
content/40: 852dffd5402c58c35f6abfd6b8046585
content/41: 66a326fe86b5ff7c12f097bae8917018
content/42: a58bde3efd6164d3541047bd97cee6fe
content/43: 371d0e46b4bd2c23f559b8bc112f6955
content/44: 1c98f5538b8b37801da7f5e8c5912219
content/45: bcadfc362b69078beee0088e5936c98b
content/46: a84d2702883c8af99a401582e2192d39
content/47: e3dd3df817017359361432029b0c5ef1
content/48: 557fb6942a695af69e94fbd7692590e6
content/49: 371d0e46b4bd2c23f559b8bc112f6955
content/50: 2e9928cbf2e736fc61f08d4339ccae59
content/51: bcadfc362b69078beee0088e5936c98b
content/52: 69a6fbea11482ab284195984788c9710
content/53: dafa30ae47d52c901b756bd8bd0ae2fd
content/54: 70e8dcde230d0cd4a9b7b18c8df043cd
content/55: 371d0e46b4bd2c23f559b8bc112f6955
content/56: 97a4116e8509aede52ea1801656a7671
content/57: bcadfc362b69078beee0088e5936c98b
content/58: 2b73b3348aa37da99e35d12e892197f2
content/59: b3f310d5ef115bea5a8b75bf25d7ea9a
content/60: 11e67a936d6e434842446342f83b5289
753fe021f7c0fca8dc429f2e971fae5a:
meta/title: b3498307d692252f1286175a18b62e16
meta/description: 5f52444a2ad126633723bb44d06e7638
content/0: 1b031fb0c62c46b177aeed5c3d3f8f80
content/1: 28c5925266bfcf8a373b0490f6e63c8c
content/2: 76482724500904d534bc171470aa5594
content/3: 5e43b6ea89ab6aa913524b5db4c4f2f3
content/4: aa6b3680f93d09752072d278d8d3e6bb
content/5: 49686bd2f0af8b45071a5e11a47df85e
content/6: 4fcff29464aac96e894b0e9da8b7aac5
content/7: 89255fc21a3a429f27d1f2cdfe065235
content/8: 51dac9c1f218035a3f23137588eca5b6
content/9: 2ddb58bd6414897d33c6cb1590558749
content/10: 821e6394b0a953e2b0842b04ae8f3105
content/11: 972721b310d5e3e6e08ec33dc9630f62
content/12: b3f310d5ef115bea5a8b75bf25d7ea9a
content/13: 06a9cbcec05366fe1c873c90c36b4f44

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

View File

@@ -41,7 +41,7 @@ interface PricingTier {
* Free plan features with consistent icons
*/
const FREE_PLAN_FEATURES: PricingFeature[] = [
{ icon: DollarSign, text: '$10 usage limit' },
{ icon: DollarSign, text: '$20 usage limit' },
{ icon: HardDrive, text: '5GB file storage' },
{ icon: Workflow, text: 'Public template access' },
{ icon: Database, text: 'Limited log retention' },

View File

@@ -20,7 +20,7 @@ interface NavProps {
}
export default function Nav({ hideAuthButtons = false, variant = 'landing' }: NavProps = {}) {
const [githubStars, setGithubStars] = useState('18.6k')
const [githubStars, setGithubStars] = useState('24k')
const [isHovered, setIsHovered] = useState(false)
const [isLoginHovered, setIsLoginHovered] = useState(false)
const router = useRouter()

View File

@@ -1,26 +1,42 @@
'use client'
import { type ReactNode, useState } from 'react'
import type { ReactNode } from 'react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
export function QueryProvider({ children }: { children: ReactNode }) {
const [queryClient] = useState(
() =>
new QueryClient({
defaultOptions: {
queries: {
staleTime: 30 * 1000,
gcTime: 5 * 60 * 1000,
refetchOnWindowFocus: false,
retry: 1,
retryOnMount: false,
},
mutations: {
retry: 1,
},
},
})
)
/**
* Singleton QueryClient instance for client-side use.
* Can be imported directly for cache operations outside React components.
*/
function makeQueryClient() {
return new QueryClient({
defaultOptions: {
queries: {
staleTime: 30 * 1000,
gcTime: 5 * 60 * 1000,
refetchOnWindowFocus: false,
retry: 1,
retryOnMount: false,
},
mutations: {
retry: 1,
},
},
})
}
let browserQueryClient: QueryClient | undefined
export function getQueryClient() {
if (typeof window === 'undefined') {
return makeQueryClient()
}
if (!browserQueryClient) {
browserQueryClient = makeQueryClient()
}
return browserQueryClient
}
export function QueryProvider({ children }: { children: ReactNode }) {
const queryClient = getQueryClient()
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
}

View File

@@ -70,7 +70,7 @@ describe('OAuth Connections API Route', () => {
})
)
vi.doMock('@/lib/oauth/oauth', () => ({
vi.doMock('@/lib/oauth/utils', () => ({
parseProvider: mockParseProvider,
evaluateScopeCoverage: mockEvaluateScopeCoverage,
}))

View File

@@ -5,8 +5,8 @@ import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import type { OAuthProvider } from '@/lib/oauth/oauth'
import { evaluateScopeCoverage, parseProvider } from '@/lib/oauth/oauth'
import type { OAuthProvider } from '@/lib/oauth'
import { evaluateScopeCoverage, parseProvider } from '@/lib/oauth'
const logger = createLogger('OAuthConnectionsAPI')

View File

@@ -42,7 +42,7 @@ describe('OAuth Credentials API Route', () => {
getSession: mockGetSession,
}))
vi.doMock('@/lib/oauth/oauth', () => ({
vi.doMock('@/lib/oauth/utils', () => ({
parseProvider: mockParseProvider,
evaluateScopeCoverage: mockEvaluateScopeCoverage,
}))

View File

@@ -7,7 +7,7 @@ import { z } from 'zod'
import { checkHybridAuth } from '@/lib/auth/hybrid'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { evaluateScopeCoverage, parseProvider } from '@/lib/oauth/oauth'
import { evaluateScopeCoverage, type OAuthProvider, parseProvider } from '@/lib/oauth'
import { getUserEntityPermissions } from '@/lib/workspaces/permissions/utils'
export const dynamic = 'force-dynamic'
@@ -132,7 +132,7 @@ export async function GET(request: NextRequest) {
}
// Parse the provider to get base provider and feature type (if provider is present)
const { baseProvider } = parseProvider(providerParam || 'google-default')
const { baseProvider } = parseProvider((providerParam || 'google') as OAuthProvider)
let accountsData

View File

@@ -26,6 +26,7 @@ vi.mock('@sim/db', () => ({
vi.mock('@/lib/oauth/oauth', () => ({
refreshOAuthToken: vi.fn(),
OAUTH_PROVIDERS: {},
}))
vi.mock('@/lib/logs/console/logger', () => ({
@@ -38,7 +39,7 @@ vi.mock('@/lib/logs/console/logger', () => ({
}))
import { db } from '@sim/db'
import { refreshOAuthToken } from '@/lib/oauth/oauth'
import { refreshOAuthToken } from '@/lib/oauth'
import {
getCredential,
getUserId,

View File

@@ -3,7 +3,7 @@ import { account, workflow } from '@sim/db/schema'
import { and, desc, eq } from 'drizzle-orm'
import { getSession } from '@/lib/auth'
import { createLogger } from '@/lib/logs/console/logger'
import { refreshOAuthToken } from '@/lib/oauth/oauth'
import { refreshOAuthToken } from '@/lib/oauth'
const logger = createLogger('OAuthUtilsAPI')

View File

@@ -70,19 +70,6 @@ vi.mock('@/lib/core/utils/request', () => ({
generateRequestId: vi.fn().mockReturnValue('test-request-id'),
}))
vi.mock('@/app/api/workflows/[id]/execute/route', () => ({
createFilteredResult: vi.fn().mockImplementation((result: any) => ({
...result,
logs: undefined,
metadata: result.metadata
? {
...result.metadata,
workflowConnections: undefined,
}
: undefined,
})),
}))
describe('Chat Identifier API Route', () => {
const mockAddCorsHeaders = vi.fn().mockImplementation((response) => response)
const mockValidateChatAuth = vi.fn().mockResolvedValue({ authorized: true })

View File

@@ -206,7 +206,6 @@ export async function POST(
const { createStreamingResponse } = await import('@/lib/workflows/streaming/streaming')
const { SSE_HEADERS } = await import('@/lib/core/utils/sse')
const { createFilteredResult } = await import('@/app/api/workflows/[id]/execute/route')
const workflowInput: any = { input, conversationId }
if (files && Array.isArray(files) && files.length > 0) {
@@ -267,7 +266,6 @@ export async function POST(
isSecureMode: true,
workflowTriggerType: 'chat',
},
createFilteredResult,
executionId,
})

View File

@@ -10,9 +10,9 @@ import {
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/request-helpers'
import { validateUUID } from '@/lib/core/security/input-validation'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { createLogger } from '@/lib/logs/console/logger'
import { isUuidV4 } from '@/executor/constants'
const logger = createLogger('CheckpointRevertAPI')
@@ -87,9 +87,8 @@ export async function POST(request: NextRequest) {
isDeployed: cleanedState.isDeployed,
})
const workflowIdValidation = validateUUID(checkpoint.workflowId, 'workflowId')
if (!workflowIdValidation.isValid) {
logger.error(`[${tracker.requestId}] Invalid workflow ID: ${workflowIdValidation.error}`)
if (!isUuidV4(checkpoint.workflowId)) {
logger.error(`[${tracker.requestId}] Invalid workflow ID format`)
return NextResponse.json({ error: 'Invalid workflow ID format' }, { status: 400 })
}

View File

@@ -14,6 +14,8 @@ import { generateRequestId } from '@/lib/core/utils/request'
import { getEffectiveDecryptedEnv } from '@/lib/environment/utils'
import { createLogger } from '@/lib/logs/console/logger'
import { refreshTokenIfNeeded } from '@/app/api/auth/oauth/utils'
import { REFERENCE } from '@/executor/constants'
import { createEnvVarPattern } from '@/executor/utils/reference-validation'
import { executeTool } from '@/tools'
import { getTool } from '@/tools/utils'
@@ -33,14 +35,18 @@ const ExecuteToolSchema = z.object({
function resolveEnvVarReferences(value: any, envVars: Record<string, string>): any {
if (typeof value === 'string') {
// Check for exact match: entire string is "{{VAR_NAME}}"
const exactMatch = /^\{\{([^}]+)\}\}$/.exec(value)
const exactMatchPattern = new RegExp(
`^\\${REFERENCE.ENV_VAR_START}([^}]+)\\${REFERENCE.ENV_VAR_END}$`
)
const exactMatch = exactMatchPattern.exec(value)
if (exactMatch) {
const envVarName = exactMatch[1].trim()
return envVars[envVarName] ?? value
}
// Check for embedded references: "prefix {{VAR}} suffix"
return value.replace(/\{\{([^}]+)\}\}/g, (match, varName) => {
const envVarPattern = createEnvVarPattern()
return value.replace(envVarPattern, (match, varName) => {
const trimmedName = varName.trim()
return envVars[trimmedName] ?? match
})

View File

@@ -14,6 +14,7 @@ import type { StorageConfig } from '@/lib/uploads/core/storage-client'
import { getFileMetadataByKey } from '@/lib/uploads/server/metadata'
import { inferContextFromKey } from '@/lib/uploads/utils/file-utils'
import { getUserEntityPermissions } from '@/lib/workspaces/permissions/utils'
import { isUuid } from '@/executor/constants'
const logger = createLogger('FileAuthorization')
@@ -85,9 +86,7 @@ function extractWorkspaceIdFromKey(key: string): string | null {
const parts = key.split('/')
const workspaceId = parts[0]
// Validate UUID format
const UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i
if (workspaceId && UUID_PATTERN.test(workspaceId)) {
if (workspaceId && isUuid(workspaceId)) {
return workspaceId
}

View File

@@ -1,5 +1,6 @@
import { type NextRequest, NextResponse } from 'next/server'
import { createLogger } from '@/lib/logs/console/logger'
import { sanitizeFileName } from '@/executor/constants'
import '@/lib/uploads/core/setup.server'
import { getSession } from '@/lib/auth'
import type { StorageContext } from '@/lib/uploads/config'
@@ -154,7 +155,7 @@ export async function POST(request: NextRequest) {
logger.info(`Uploading knowledge-base file: ${originalName}`)
const timestamp = Date.now()
const safeFileName = originalName.replace(/\s+/g, '-')
const safeFileName = sanitizeFileName(originalName)
const storageKey = `kb/${timestamp}-${safeFileName}`
const metadata: Record<string, string> = {
@@ -267,9 +268,8 @@ export async function POST(request: NextRequest) {
logger.info(`Uploading ${context} file: ${originalName}`)
// Generate storage key with context prefix and timestamp to ensure uniqueness
const timestamp = Date.now()
const safeFileName = originalName.replace(/\s+/g, '-')
const safeFileName = sanitizeFileName(originalName)
const storageKey = `${context}/${timestamp}-${safeFileName}`
const metadata: Record<string, string> = {

View File

@@ -5,6 +5,7 @@ import { executeInE2B } from '@/lib/execution/e2b'
import { executeInIsolatedVM } from '@/lib/execution/isolated-vm'
import { CodeLanguage, DEFAULT_CODE_LANGUAGE, isValidCodeLanguage } from '@/lib/execution/languages'
import { createLogger } from '@/lib/logs/console/logger'
import { escapeRegExp, normalizeName, REFERENCE } from '@/executor/constants'
import {
createEnvVarPattern,
createWorkflowVariablePattern,
@@ -405,7 +406,7 @@ function resolveWorkflowVariables(
// Find the variable by name (workflowVariables is indexed by ID, values are variable objects)
const foundVariable = Object.entries(workflowVariables).find(
([_, variable]) => (variable.name || '').replace(/\s+/g, '') === variableName
([_, variable]) => normalizeName(variable.name || '') === variableName
)
let variableValue: unknown = ''
@@ -513,31 +514,26 @@ function resolveTagVariables(
): string {
let resolvedCode = code
const tagMatches = resolvedCode.match(/<([a-zA-Z_][a-zA-Z0-9_.]*[a-zA-Z0-9_])>/g) || []
const tagPattern = new RegExp(
`${REFERENCE.START}([a-zA-Z_][a-zA-Z0-9_${REFERENCE.PATH_DELIMITER}]*[a-zA-Z0-9_])${REFERENCE.END}`,
'g'
)
const tagMatches = resolvedCode.match(tagPattern) || []
for (const match of tagMatches) {
const tagName = match.slice(1, -1).trim()
const tagName = match.slice(REFERENCE.START.length, -REFERENCE.END.length).trim()
// Handle nested paths like "getrecord.response.data" or "function1.response.result"
// First try params, then blockData directly, then try with block name mapping
let tagValue = getNestedValue(params, tagName) || getNestedValue(blockData, tagName) || ''
// If not found and the path starts with a block name, try mapping the block name to ID
if (!tagValue && tagName.includes('.')) {
const pathParts = tagName.split('.')
if (!tagValue && tagName.includes(REFERENCE.PATH_DELIMITER)) {
const pathParts = tagName.split(REFERENCE.PATH_DELIMITER)
const normalizedBlockName = pathParts[0] // This should already be normalized like "function1"
// Find the block ID by looking for a block name that normalizes to this value
let blockId = null
for (const [blockName, id] of Object.entries(blockNameMapping)) {
// Apply the same normalization logic as the UI: remove spaces and lowercase
const normalizedName = blockName.replace(/\s+/g, '').toLowerCase()
if (normalizedName === normalizedBlockName) {
blockId = id
break
}
}
// Direct lookup using normalized block name
const blockId = blockNameMapping[normalizedBlockName] ?? null
if (blockId) {
const remainingPath = pathParts.slice(1).join('.')
@@ -617,13 +613,6 @@ function getNestedValue(obj: any, path: string): any {
}, obj)
}
/**
* Escape special regex characters in a string
*/
function escapeRegExp(string: string): string {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
}
/**
* Remove one trailing newline from stdout
* This handles the common case where print() or console.log() adds a trailing \n

View File

@@ -34,13 +34,24 @@ const CreateDocumentSchema = z.object({
documentTagsData: z.string().optional(),
})
/**
* Schema for bulk document creation with processing options
*
* Processing options units:
* - chunkSize: tokens (1 token ≈ 4 characters)
* - minCharactersPerChunk: characters
* - chunkOverlap: characters
*/
const BulkCreateDocumentsSchema = z.object({
documents: z.array(CreateDocumentSchema),
processingOptions: z.object({
/** Maximum chunk size in tokens (1 token ≈ 4 characters) */
chunkSize: z.number().min(100).max(4000),
/** Minimum chunk size in characters */
minCharactersPerChunk: z.number().min(1).max(2000),
recipe: z.string(),
lang: z.string(),
/** Overlap between chunks in characters */
chunkOverlap: z.number().min(0).max(500),
}),
bulk: z.literal(true),

View File

@@ -12,6 +12,14 @@ import { checkKnowledgeBaseAccess, checkKnowledgeBaseWriteAccess } from '@/app/a
const logger = createLogger('KnowledgeBaseByIdAPI')
/**
* Schema for updating a knowledge base
*
* Chunking config units:
* - maxSize: tokens (1 token ≈ 4 characters)
* - minSize: characters
* - overlap: tokens (1 token ≈ 4 characters)
*/
const UpdateKnowledgeBaseSchema = z.object({
name: z.string().min(1, 'Name is required').optional(),
description: z.string().optional(),
@@ -20,10 +28,23 @@ const UpdateKnowledgeBaseSchema = z.object({
workspaceId: z.string().nullable().optional(),
chunkingConfig: z
.object({
maxSize: z.number(),
minSize: z.number(),
overlap: z.number(),
/** Maximum chunk size in tokens (1 token ≈ 4 characters) */
maxSize: z.number().min(100).max(4000),
/** Minimum chunk size in characters */
minSize: z.number().min(1).max(2000),
/** Overlap between chunks in characters */
overlap: z.number().min(0).max(500),
})
.refine(
(data) => {
// Convert maxSize from tokens to characters for comparison (1 token ≈ 4 chars)
const maxSizeInChars = data.maxSize * 4
return data.minSize < maxSizeInChars
},
{
message: 'Min chunk size (characters) must be less than max chunk size (tokens × 4)',
}
)
.optional(),
})

View File

@@ -139,8 +139,8 @@ describe('Knowledge Base API Route', () => {
const invalidData = {
name: 'Test KB',
chunkingConfig: {
maxSize: 100,
minSize: 200, // Invalid: minSize > maxSize
maxSize: 100, // 100 tokens = 400 characters
minSize: 500, // Invalid: minSize (500 chars) > maxSize (400 chars)
overlap: 50,
},
}
@@ -168,7 +168,7 @@ describe('Knowledge Base API Route', () => {
expect(data.data.embeddingDimension).toBe(1536)
expect(data.data.chunkingConfig).toEqual({
maxSize: 1024,
minSize: 1,
minSize: 100,
overlap: 200,
})
})

View File

@@ -7,6 +7,14 @@ import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('KnowledgeBaseAPI')
/**
* Schema for creating a knowledge base
*
* Chunking config units:
* - maxSize: tokens (1 token ≈ 4 characters)
* - minSize: characters
* - overlap: tokens (1 token ≈ 4 characters)
*/
const CreateKnowledgeBaseSchema = z.object({
name: z.string().min(1, 'Name is required'),
description: z.string().optional(),
@@ -15,18 +23,28 @@ const CreateKnowledgeBaseSchema = z.object({
embeddingDimension: z.literal(1536).default(1536),
chunkingConfig: z
.object({
/** Maximum chunk size in tokens (1 token ≈ 4 characters) */
maxSize: z.number().min(100).max(4000).default(1024),
minSize: z.number().min(1).max(2000).default(1),
/** Minimum chunk size in characters */
minSize: z.number().min(1).max(2000).default(100),
/** Overlap between chunks in tokens (1 token ≈ 4 characters) */
overlap: z.number().min(0).max(500).default(200),
})
.default({
maxSize: 1024,
minSize: 1,
minSize: 100,
overlap: 200,
})
.refine((data) => data.minSize < data.maxSize, {
message: 'Min chunk size must be less than max chunk size',
}),
.refine(
(data) => {
// Convert maxSize from tokens to characters for comparison (1 token ≈ 4 chars)
const maxSizeInChars = data.maxSize * 4
return data.minSize < maxSizeInChars
},
{
message: 'Min chunk size (characters) must be less than max chunk size (tokens × 4)',
}
),
})
export async function GET(req: NextRequest) {

View File

@@ -183,7 +183,12 @@ describe('Knowledge Utils', () => {
describe('processDocumentAsync', () => {
it.concurrent('should insert embeddings before updating document counters', async () => {
kbRows.push({ id: 'kb1', userId: 'user1', workspaceId: null })
kbRows.push({
id: 'kb1',
userId: 'user1',
workspaceId: null,
chunkingConfig: { maxSize: 1024, minSize: 1, overlap: 200 },
})
docRows.push({ id: 'doc1', knowledgeBaseId: 'kb1' })
await processDocumentAsync(

View File

@@ -1,28 +1,15 @@
import { db } from '@sim/db'
import { permissions, workflow, workflowExecutionLogs } from '@sim/db/schema'
import { and, desc, eq, gte, inArray, lte, type SQL, sql } from 'drizzle-orm'
import { and, desc, eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { createLogger } from '@/lib/logs/console/logger'
import { buildFilterConditions, LogFilterParamsSchema } from '@/lib/logs/filters'
const logger = createLogger('LogsExportAPI')
export const revalidate = 0
const ExportParamsSchema = z.object({
level: z.string().optional(),
workflowIds: z.string().optional(),
folderIds: z.string().optional(),
triggers: z.string().optional(),
startDate: z.string().optional(),
endDate: z.string().optional(),
search: z.string().optional(),
workflowName: z.string().optional(),
folderName: z.string().optional(),
workspaceId: z.string(),
})
function escapeCsv(value: any): string {
if (value === null || value === undefined) return ''
const str = String(value)
@@ -41,7 +28,7 @@ export async function GET(request: NextRequest) {
const userId = session.user.id
const { searchParams } = new URL(request.url)
const params = ExportParamsSchema.parse(Object.fromEntries(searchParams.entries()))
const params = LogFilterParamsSchema.parse(Object.fromEntries(searchParams.entries()))
const selectColumns = {
id: workflowExecutionLogs.id,
@@ -57,53 +44,11 @@ export async function GET(request: NextRequest) {
workflowName: workflow.name,
}
let conditions: SQL | undefined = eq(workflowExecutionLogs.workspaceId, params.workspaceId)
if (params.level && params.level !== 'all') {
const levels = params.level.split(',').filter(Boolean)
if (levels.length === 1) {
conditions = and(conditions, eq(workflowExecutionLogs.level, levels[0]))
} else if (levels.length > 1) {
conditions = and(conditions, inArray(workflowExecutionLogs.level, levels))
}
}
if (params.workflowIds) {
const workflowIds = params.workflowIds.split(',').filter(Boolean)
if (workflowIds.length > 0) conditions = and(conditions, inArray(workflow.id, workflowIds))
}
if (params.folderIds) {
const folderIds = params.folderIds.split(',').filter(Boolean)
if (folderIds.length > 0) conditions = and(conditions, inArray(workflow.folderId, folderIds))
}
if (params.triggers) {
const triggers = params.triggers.split(',').filter(Boolean)
if (triggers.length > 0 && !triggers.includes('all')) {
conditions = and(conditions, inArray(workflowExecutionLogs.trigger, triggers))
}
}
if (params.startDate) {
conditions = and(conditions, gte(workflowExecutionLogs.startedAt, new Date(params.startDate)))
}
if (params.endDate) {
conditions = and(conditions, lte(workflowExecutionLogs.startedAt, new Date(params.endDate)))
}
if (params.search) {
const term = `%${params.search}%`
conditions = and(conditions, sql`${workflowExecutionLogs.executionId} ILIKE ${term}`)
}
if (params.workflowName) {
const nameTerm = `%${params.workflowName}%`
conditions = and(conditions, sql`${workflow.name} ILIKE ${nameTerm}`)
}
if (params.folderName) {
const folderTerm = `%${params.folderName}%`
conditions = and(conditions, sql`${workflow.name} ILIKE ${folderTerm}`)
}
const workspaceCondition = eq(workflowExecutionLogs.workspaceId, params.workspaceId)
const filterConditions = buildFilterConditions(params)
const conditions = filterConditions
? and(workspaceCondition, filterConditions)
: workspaceCondition
const header = [
'startedAt',

View File

@@ -6,51 +6,22 @@ import {
workflowDeploymentVersion,
workflowExecutionLogs,
} from '@sim/db/schema'
import {
and,
desc,
eq,
gt,
gte,
inArray,
isNotNull,
isNull,
lt,
lte,
ne,
or,
type SQL,
sql,
} from 'drizzle-orm'
import { and, desc, eq, isNotNull, isNull, or, type SQL, sql } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { buildFilterConditions, LogFilterParamsSchema } from '@/lib/logs/filters'
const logger = createLogger('LogsAPI')
export const revalidate = 0
const QueryParamsSchema = z.object({
const QueryParamsSchema = LogFilterParamsSchema.extend({
details: z.enum(['basic', 'full']).optional().default('basic'),
limit: z.coerce.number().optional().default(100),
offset: z.coerce.number().optional().default(0),
level: z.string().optional(),
workflowIds: z.string().optional(),
folderIds: z.string().optional(),
triggers: z.string().optional(),
startDate: z.string().optional(),
endDate: z.string().optional(),
search: z.string().optional(),
workflowName: z.string().optional(),
folderName: z.string().optional(),
executionId: z.string().optional(),
costOperator: z.enum(['=', '>', '<', '>=', '<=', '!=']).optional(),
costValue: z.coerce.number().optional(),
durationOperator: z.enum(['=', '>', '<', '>=', '<=', '!=']).optional(),
durationValue: z.coerce.number().optional(),
workspaceId: z.string(),
})
export async function GET(request: NextRequest) {
@@ -78,6 +49,7 @@ export async function GET(request: NextRequest) {
stateSnapshotId: workflowExecutionLogs.stateSnapshotId,
deploymentVersionId: workflowExecutionLogs.deploymentVersionId,
level: workflowExecutionLogs.level,
status: workflowExecutionLogs.status,
trigger: workflowExecutionLogs.trigger,
startedAt: workflowExecutionLogs.startedAt,
endedAt: workflowExecutionLogs.endedAt,
@@ -107,6 +79,7 @@ export async function GET(request: NextRequest) {
stateSnapshotId: workflowExecutionLogs.stateSnapshotId,
deploymentVersionId: workflowExecutionLogs.deploymentVersionId,
level: workflowExecutionLogs.level,
status: workflowExecutionLogs.status,
trigger: workflowExecutionLogs.trigger,
startedAt: workflowExecutionLogs.startedAt,
endedAt: workflowExecutionLogs.endedAt,
@@ -197,102 +170,11 @@ export async function GET(request: NextRequest) {
}
}
if (params.workflowIds) {
const workflowIds = params.workflowIds.split(',').filter(Boolean)
if (workflowIds.length > 0) {
conditions = and(conditions, inArray(workflow.id, workflowIds))
}
}
if (params.folderIds) {
const folderIds = params.folderIds.split(',').filter(Boolean)
if (folderIds.length > 0) {
conditions = and(conditions, inArray(workflow.folderId, folderIds))
}
}
if (params.triggers) {
const triggers = params.triggers.split(',').filter(Boolean)
if (triggers.length > 0 && !triggers.includes('all')) {
conditions = and(conditions, inArray(workflowExecutionLogs.trigger, triggers))
}
}
if (params.startDate) {
conditions = and(
conditions,
gte(workflowExecutionLogs.startedAt, new Date(params.startDate))
)
}
if (params.endDate) {
conditions = and(conditions, lte(workflowExecutionLogs.startedAt, new Date(params.endDate)))
}
if (params.search) {
const searchTerm = `%${params.search}%`
conditions = and(conditions, sql`${workflowExecutionLogs.executionId} ILIKE ${searchTerm}`)
}
if (params.workflowName) {
const nameTerm = `%${params.workflowName}%`
conditions = and(conditions, sql`${workflow.name} ILIKE ${nameTerm}`)
}
if (params.folderName) {
const folderTerm = `%${params.folderName}%`
conditions = and(conditions, sql`${workflow.name} ILIKE ${folderTerm}`)
}
if (params.executionId) {
conditions = and(conditions, eq(workflowExecutionLogs.executionId, params.executionId))
}
if (params.costOperator && params.costValue !== undefined) {
const costField = sql`(${workflowExecutionLogs.cost}->>'total')::numeric`
switch (params.costOperator) {
case '=':
conditions = and(conditions, sql`${costField} = ${params.costValue}`)
break
case '>':
conditions = and(conditions, sql`${costField} > ${params.costValue}`)
break
case '<':
conditions = and(conditions, sql`${costField} < ${params.costValue}`)
break
case '>=':
conditions = and(conditions, sql`${costField} >= ${params.costValue}`)
break
case '<=':
conditions = and(conditions, sql`${costField} <= ${params.costValue}`)
break
case '!=':
conditions = and(conditions, sql`${costField} != ${params.costValue}`)
break
}
}
if (params.durationOperator && params.durationValue !== undefined) {
const durationField = workflowExecutionLogs.totalDurationMs
switch (params.durationOperator) {
case '=':
conditions = and(conditions, eq(durationField, params.durationValue))
break
case '>':
conditions = and(conditions, gt(durationField, params.durationValue))
break
case '<':
conditions = and(conditions, lt(durationField, params.durationValue))
break
case '>=':
conditions = and(conditions, gte(durationField, params.durationValue))
break
case '<=':
conditions = and(conditions, lte(durationField, params.durationValue))
break
case '!=':
conditions = and(conditions, ne(durationField, params.durationValue))
break
}
// Apply common filters (workflowIds, folderIds, triggers, dates, search, cost, duration)
// Level filtering is handled above with advanced running/pending state logic
const commonFilters = buildFilterConditions(params, { useSimpleLevelFilter: false })
if (commonFilters) {
conditions = and(conditions, commonFilters)
}
const logs = await baseQuery
@@ -379,15 +261,16 @@ export async function GET(request: NextRequest) {
input: 0,
output: 0,
total: 0,
tokens: { prompt: 0, completion: 0, total: 0 },
tokens: { input: 0, output: 0, total: 0 },
})
}
const modelCost = models.get(block.cost.model)
modelCost.input += Number(block.cost.input) || 0
modelCost.output += Number(block.cost.output) || 0
modelCost.total += Number(block.cost.total) || 0
modelCost.tokens.prompt += block.cost.tokens?.prompt || 0
modelCost.tokens.completion += block.cost.tokens?.completion || 0
modelCost.tokens.input += block.cost.tokens?.input || block.cost.tokens?.prompt || 0
modelCost.tokens.output +=
block.cost.tokens?.output || block.cost.tokens?.completion || 0
modelCost.tokens.total += block.cost.tokens?.total || 0
}
}
@@ -399,8 +282,8 @@ export async function GET(request: NextRequest) {
output: totalOutputCost,
tokens: {
total: totalTokens,
prompt: totalPromptTokens,
completion: totalCompletionTokens,
input: totalPromptTokens,
output: totalCompletionTokens,
},
models: Object.fromEntries(models),
}
@@ -451,6 +334,7 @@ export async function GET(request: NextRequest) {
deploymentVersion: log.deploymentVersion ?? null,
deploymentVersionName: log.deploymentVersionName ?? null,
level: log.level,
status: log.status,
duration: log.totalDurationMs ? `${log.totalDurationMs}ms` : null,
trigger: log.trigger,
createdAt: log.startedAt.toISOString(),

View File

@@ -6,6 +6,8 @@ import { getParsedBody, withMcpAuth } from '@/lib/mcp/middleware'
import type { McpServerConfig, McpTransport } from '@/lib/mcp/types'
import { validateMcpServerUrl } from '@/lib/mcp/url-validator'
import { createMcpErrorResponse, createMcpSuccessResponse } from '@/lib/mcp/utils'
import { REFERENCE } from '@/executor/constants'
import { createEnvVarPattern } from '@/executor/utils/reference-validation'
const logger = createLogger('McpServerTestAPI')
@@ -23,12 +25,13 @@ function isUrlBasedTransport(transport: McpTransport): boolean {
* Resolve environment variables in strings
*/
function resolveEnvVars(value: string, envVars: Record<string, string>): string {
const envMatches = value.match(/\{\{([^}]+)\}\}/g)
const envVarPattern = createEnvVarPattern()
const envMatches = value.match(envVarPattern)
if (!envMatches) return value
let resolvedValue = value
for (const match of envMatches) {
const envKey = match.slice(2, -2).trim()
const envKey = match.slice(REFERENCE.ENV_VAR_START.length, -REFERENCE.ENV_VAR_END.length).trim()
const envValue = envVars[envKey]
if (envValue === undefined) {

View File

@@ -1,54 +1,16 @@
import { db } from '@sim/db'
import { memory, workflowBlocks } from '@sim/db/schema'
import { memory, permissions, workspace } from '@sim/db/schema'
import { and, eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { checkHybridAuth } from '@/lib/auth/hybrid'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { getWorkflowAccessContext } from '@/lib/workflows/utils'
const logger = createLogger('MemoryByIdAPI')
/**
* Parse memory key into conversationId and blockId
* Key format: conversationId:blockId
*/
function parseMemoryKey(key: string): { conversationId: string; blockId: string } | null {
const parts = key.split(':')
if (parts.length !== 2) {
return null
}
return {
conversationId: parts[0],
blockId: parts[1],
}
}
/**
* Lookup block name from block ID
*/
async function getBlockName(blockId: string, workflowId: string): Promise<string | undefined> {
try {
const result = await db
.select({ name: workflowBlocks.name })
.from(workflowBlocks)
.where(and(eq(workflowBlocks.id, blockId), eq(workflowBlocks.workflowId, workflowId)))
.limit(1)
if (result.length === 0) {
return undefined
}
return result[0].name
} catch (error) {
logger.error('Error looking up block name', { error, blockId, workflowId })
return undefined
}
}
const memoryQuerySchema = z.object({
workflowId: z.string().uuid('Invalid workflow ID format'),
workspaceId: z.string().uuid('Invalid workspace ID format'),
})
const agentMemoryDataSchema = z.object({
@@ -64,26 +26,56 @@ const memoryPutBodySchema = z.object({
data: z.union([agentMemoryDataSchema, genericMemoryDataSchema], {
errorMap: () => ({ message: 'Invalid memory data structure' }),
}),
workflowId: z.string().uuid('Invalid workflow ID format'),
workspaceId: z.string().uuid('Invalid workspace ID format'),
})
/**
* Validates authentication and workflow access for memory operations
* @param request - The incoming request
* @param workflowId - The workflow ID to check access for
* @param requestId - Request ID for logging
* @param action - 'read' for GET, 'write' for PUT/DELETE
* @returns Object with userId if successful, or error response if failed
*/
async function checkWorkspaceAccess(
workspaceId: string,
userId: string
): Promise<{ hasAccess: boolean; canWrite: boolean }> {
const [workspaceRow] = await db
.select({ ownerId: workspace.ownerId })
.from(workspace)
.where(eq(workspace.id, workspaceId))
.limit(1)
if (!workspaceRow) {
return { hasAccess: false, canWrite: false }
}
if (workspaceRow.ownerId === userId) {
return { hasAccess: true, canWrite: true }
}
const [permissionRow] = await db
.select({ permissionType: permissions.permissionType })
.from(permissions)
.where(
and(
eq(permissions.userId, userId),
eq(permissions.entityType, 'workspace'),
eq(permissions.entityId, workspaceId)
)
)
.limit(1)
if (!permissionRow) {
return { hasAccess: false, canWrite: false }
}
return {
hasAccess: true,
canWrite: permissionRow.permissionType === 'write' || permissionRow.permissionType === 'admin',
}
}
async function validateMemoryAccess(
request: NextRequest,
workflowId: string,
workspaceId: string,
requestId: string,
action: 'read' | 'write'
): Promise<{ userId: string } | { error: NextResponse }> {
const authResult = await checkHybridAuth(request, {
requireWorkflowId: false,
})
const authResult = await checkHybridAuth(request, { requireWorkflowId: false })
if (!authResult.success || !authResult.userId) {
logger.warn(`[${requestId}] Unauthorized memory ${action} attempt`)
return {
@@ -94,30 +86,20 @@ async function validateMemoryAccess(
}
}
const accessContext = await getWorkflowAccessContext(workflowId, authResult.userId)
if (!accessContext) {
logger.warn(`[${requestId}] Workflow ${workflowId} not found`)
const { hasAccess, canWrite } = await checkWorkspaceAccess(workspaceId, authResult.userId)
if (!hasAccess) {
return {
error: NextResponse.json(
{ success: false, error: { message: 'Workflow not found' } },
{ success: false, error: { message: 'Workspace not found' } },
{ status: 404 }
),
}
}
const { isOwner, workspacePermission } = accessContext
const hasAccess =
action === 'read'
? isOwner || workspacePermission !== null
: isOwner || workspacePermission === 'write' || workspacePermission === 'admin'
if (!hasAccess) {
logger.warn(
`[${requestId}] User ${authResult.userId} denied ${action} access to workflow ${workflowId}`
)
if (action === 'write' && !canWrite) {
return {
error: NextResponse.json(
{ success: false, error: { message: 'Access denied' } },
{ success: false, error: { message: 'Write access denied' } },
{ status: 403 }
),
}
@@ -129,40 +111,28 @@ async function validateMemoryAccess(
export const dynamic = 'force-dynamic'
export const runtime = 'nodejs'
/**
* GET handler for retrieving a specific memory by ID
*/
export async function GET(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const requestId = generateRequestId()
const { id } = await params
try {
logger.info(`[${requestId}] Processing memory get request for ID: ${id}`)
const url = new URL(request.url)
const workflowId = url.searchParams.get('workflowId')
const validation = memoryQuerySchema.safeParse({ workflowId })
const workspaceId = url.searchParams.get('workspaceId')
const validation = memoryQuerySchema.safeParse({ workspaceId })
if (!validation.success) {
const errorMessage = validation.error.errors
.map((err) => `${err.path.join('.')}: ${err.message}`)
.join(', ')
logger.warn(`[${requestId}] Validation error: ${errorMessage}`)
return NextResponse.json(
{
success: false,
error: {
message: errorMessage,
},
},
{ success: false, error: { message: errorMessage } },
{ status: 400 }
)
}
const { workflowId: validatedWorkflowId } = validation.data
const { workspaceId: validatedWorkspaceId } = validation.data
const accessCheck = await validateMemoryAccess(request, validatedWorkflowId, requestId, 'read')
const accessCheck = await validateMemoryAccess(request, validatedWorkspaceId, requestId, 'read')
if ('error' in accessCheck) {
return accessCheck.error
}
@@ -170,72 +140,33 @@ export async function GET(request: NextRequest, { params }: { params: Promise<{
const memories = await db
.select()
.from(memory)
.where(and(eq(memory.key, id), eq(memory.workflowId, validatedWorkflowId)))
.where(and(eq(memory.key, id), eq(memory.workspaceId, validatedWorkspaceId)))
.orderBy(memory.createdAt)
.limit(1)
if (memories.length === 0) {
logger.warn(`[${requestId}] Memory not found: ${id} for workflow: ${validatedWorkflowId}`)
return NextResponse.json(
{
success: false,
error: {
message: 'Memory not found',
},
},
{ success: false, error: { message: 'Memory not found' } },
{ status: 404 }
)
}
const mem = memories[0]
const parsed = parseMemoryKey(mem.key)
let enrichedMemory
if (!parsed) {
enrichedMemory = {
conversationId: mem.key,
blockId: 'unknown',
blockName: 'unknown',
data: mem.data,
}
} else {
const { conversationId, blockId } = parsed
const blockName = (await getBlockName(blockId, validatedWorkflowId)) || 'unknown'
enrichedMemory = {
conversationId,
blockId,
blockName,
data: mem.data,
}
}
logger.info(
`[${requestId}] Memory retrieved successfully: ${id} for workflow: ${validatedWorkflowId}`
)
logger.info(`[${requestId}] Memory retrieved: ${id} for workspace: ${validatedWorkspaceId}`)
return NextResponse.json(
{
success: true,
data: enrichedMemory,
},
{ success: true, data: { conversationId: mem.key, data: mem.data } },
{ status: 200 }
)
} catch (error: any) {
logger.error(`[${requestId}] Error retrieving memory`, { error })
return NextResponse.json(
{
success: false,
error: {
message: error.message || 'Failed to retrieve memory',
},
},
{ success: false, error: { message: error.message || 'Failed to retrieve memory' } },
{ status: 500 }
)
}
}
/**
* DELETE handler for removing a specific memory
*/
export async function DELETE(
request: NextRequest,
{ params }: { params: Promise<{ id: string }> }
@@ -244,32 +175,28 @@ export async function DELETE(
const { id } = await params
try {
logger.info(`[${requestId}] Processing memory delete request for ID: ${id}`)
const url = new URL(request.url)
const workflowId = url.searchParams.get('workflowId')
const validation = memoryQuerySchema.safeParse({ workflowId })
const workspaceId = url.searchParams.get('workspaceId')
const validation = memoryQuerySchema.safeParse({ workspaceId })
if (!validation.success) {
const errorMessage = validation.error.errors
.map((err) => `${err.path.join('.')}: ${err.message}`)
.join(', ')
logger.warn(`[${requestId}] Validation error: ${errorMessage}`)
return NextResponse.json(
{
success: false,
error: {
message: errorMessage,
},
},
{ success: false, error: { message: errorMessage } },
{ status: 400 }
)
}
const { workflowId: validatedWorkflowId } = validation.data
const { workspaceId: validatedWorkspaceId } = validation.data
const accessCheck = await validateMemoryAccess(request, validatedWorkflowId, requestId, 'write')
const accessCheck = await validateMemoryAccess(
request,
validatedWorkspaceId,
requestId,
'write'
)
if ('error' in accessCheck) {
return accessCheck.error
}
@@ -277,61 +204,41 @@ export async function DELETE(
const existingMemory = await db
.select({ id: memory.id })
.from(memory)
.where(and(eq(memory.key, id), eq(memory.workflowId, validatedWorkflowId)))
.where(and(eq(memory.key, id), eq(memory.workspaceId, validatedWorkspaceId)))
.limit(1)
if (existingMemory.length === 0) {
logger.warn(`[${requestId}] Memory not found: ${id} for workflow: ${validatedWorkflowId}`)
return NextResponse.json(
{
success: false,
error: {
message: 'Memory not found',
},
},
{ success: false, error: { message: 'Memory not found' } },
{ status: 404 }
)
}
await db
.delete(memory)
.where(and(eq(memory.key, id), eq(memory.workflowId, validatedWorkflowId)))
.where(and(eq(memory.key, id), eq(memory.workspaceId, validatedWorkspaceId)))
logger.info(
`[${requestId}] Memory deleted successfully: ${id} for workflow: ${validatedWorkflowId}`
)
logger.info(`[${requestId}] Memory deleted: ${id} for workspace: ${validatedWorkspaceId}`)
return NextResponse.json(
{
success: true,
data: { message: 'Memory deleted successfully' },
},
{ success: true, data: { message: 'Memory deleted successfully' } },
{ status: 200 }
)
} catch (error: any) {
logger.error(`[${requestId}] Error deleting memory`, { error })
return NextResponse.json(
{
success: false,
error: {
message: error.message || 'Failed to delete memory',
},
},
{ success: false, error: { message: error.message || 'Failed to delete memory' } },
{ status: 500 }
)
}
}
/**
* PUT handler for updating a specific memory
*/
export async function PUT(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const requestId = generateRequestId()
const { id } = await params
try {
logger.info(`[${requestId}] Processing memory update request for ID: ${id}`)
let validatedData
let validatedWorkflowId
let validatedWorkspaceId
try {
const body = await request.json()
const validation = memoryPutBodySchema.safeParse(body)
@@ -340,34 +247,27 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
const errorMessage = validation.error.errors
.map((err) => `${err.path.join('.')}: ${err.message}`)
.join(', ')
logger.warn(`[${requestId}] Validation error: ${errorMessage}`)
return NextResponse.json(
{
success: false,
error: {
message: `Invalid request body: ${errorMessage}`,
},
},
{ success: false, error: { message: `Invalid request body: ${errorMessage}` } },
{ status: 400 }
)
}
validatedData = validation.data.data
validatedWorkflowId = validation.data.workflowId
} catch (error: any) {
logger.warn(`[${requestId}] Failed to parse request body: ${error.message}`)
validatedWorkspaceId = validation.data.workspaceId
} catch {
return NextResponse.json(
{
success: false,
error: {
message: 'Invalid JSON in request body',
},
},
{ success: false, error: { message: 'Invalid JSON in request body' } },
{ status: 400 }
)
}
const accessCheck = await validateMemoryAccess(request, validatedWorkflowId, requestId, 'write')
const accessCheck = await validateMemoryAccess(
request,
validatedWorkspaceId,
requestId,
'write'
)
if ('error' in accessCheck) {
return accessCheck.error
}
@@ -375,18 +275,12 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
const existingMemories = await db
.select()
.from(memory)
.where(and(eq(memory.key, id), eq(memory.workflowId, validatedWorkflowId)))
.where(and(eq(memory.key, id), eq(memory.workspaceId, validatedWorkspaceId)))
.limit(1)
if (existingMemories.length === 0) {
logger.warn(`[${requestId}] Memory not found: ${id} for workflow: ${validatedWorkflowId}`)
return NextResponse.json(
{
success: false,
error: {
message: 'Memory not found',
},
},
{ success: false, error: { message: 'Memory not found' } },
{ status: 404 }
)
}
@@ -396,14 +290,8 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
const errorMessage = agentValidation.error.errors
.map((err) => `${err.path.join('.')}: ${err.message}`)
.join(', ')
logger.warn(`[${requestId}] Agent memory validation error: ${errorMessage}`)
return NextResponse.json(
{
success: false,
error: {
message: `Invalid agent memory data: ${errorMessage}`,
},
},
{ success: false, error: { message: `Invalid agent memory data: ${errorMessage}` } },
{ status: 400 }
)
}
@@ -411,59 +299,26 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
const now = new Date()
await db
.update(memory)
.set({
data: validatedData,
updatedAt: now,
})
.where(and(eq(memory.key, id), eq(memory.workflowId, validatedWorkflowId)))
.set({ data: validatedData, updatedAt: now })
.where(and(eq(memory.key, id), eq(memory.workspaceId, validatedWorkspaceId)))
const updatedMemories = await db
.select()
.from(memory)
.where(and(eq(memory.key, id), eq(memory.workflowId, validatedWorkflowId)))
.where(and(eq(memory.key, id), eq(memory.workspaceId, validatedWorkspaceId)))
.limit(1)
const mem = updatedMemories[0]
const parsed = parseMemoryKey(mem.key)
let enrichedMemory
if (!parsed) {
enrichedMemory = {
conversationId: mem.key,
blockId: 'unknown',
blockName: 'unknown',
data: mem.data,
}
} else {
const { conversationId, blockId } = parsed
const blockName = (await getBlockName(blockId, validatedWorkflowId)) || 'unknown'
enrichedMemory = {
conversationId,
blockId,
blockName,
data: mem.data,
}
}
logger.info(
`[${requestId}] Memory updated successfully: ${id} for workflow: ${validatedWorkflowId}`
)
logger.info(`[${requestId}] Memory updated: ${id} for workspace: ${validatedWorkspaceId}`)
return NextResponse.json(
{
success: true,
data: enrichedMemory,
},
{ success: true, data: { conversationId: mem.key, data: mem.data } },
{ status: 200 }
)
} catch (error: any) {
logger.error(`[${requestId}] Error updating memory`, { error })
return NextResponse.json(
{
success: false,
error: {
message: error.message || 'Failed to update memory',
},
},
{ success: false, error: { message: error.message || 'Failed to update memory' } },
{ status: 500 }
)
}

View File

@@ -1,42 +1,56 @@
import { db } from '@sim/db'
import { memory, workflowBlocks } from '@sim/db/schema'
import { and, eq, inArray, isNull, like } from 'drizzle-orm'
import { memory, permissions, workspace } from '@sim/db/schema'
import { and, eq, isNull, like } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { checkHybridAuth } from '@/lib/auth/hybrid'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { getWorkflowAccessContext } from '@/lib/workflows/utils'
const logger = createLogger('MemoryAPI')
export const dynamic = 'force-dynamic'
export const runtime = 'nodejs'
/**
* Parse memory key into conversationId and blockId
* Key format: conversationId:blockId
* @param key The memory key to parse
* @returns Object with conversationId and blockId, or null if invalid
*/
function parseMemoryKey(key: string): { conversationId: string; blockId: string } | null {
const parts = key.split(':')
if (parts.length !== 2) {
return null
async function checkWorkspaceAccess(
workspaceId: string,
userId: string
): Promise<{ hasAccess: boolean; canWrite: boolean }> {
const [workspaceRow] = await db
.select({ ownerId: workspace.ownerId })
.from(workspace)
.where(eq(workspace.id, workspaceId))
.limit(1)
if (!workspaceRow) {
return { hasAccess: false, canWrite: false }
}
if (workspaceRow.ownerId === userId) {
return { hasAccess: true, canWrite: true }
}
const [permissionRow] = await db
.select({ permissionType: permissions.permissionType })
.from(permissions)
.where(
and(
eq(permissions.userId, userId),
eq(permissions.entityType, 'workspace'),
eq(permissions.entityId, workspaceId)
)
)
.limit(1)
if (!permissionRow) {
return { hasAccess: false, canWrite: false }
}
return {
conversationId: parts[0],
blockId: parts[1],
hasAccess: true,
canWrite: permissionRow.permissionType === 'write' || permissionRow.permissionType === 'admin',
}
}
/**
* GET handler for searching and retrieving memories
* Supports query parameters:
* - query: Search string for memory keys
* - type: Filter by memory type
* - limit: Maximum number of results (default: 50)
* - workflowId: Filter by workflow ID (required)
*/
export async function GET(request: NextRequest) {
const requestId = generateRequestId()
@@ -45,102 +59,32 @@ export async function GET(request: NextRequest) {
if (!authResult.success || !authResult.userId) {
logger.warn(`[${requestId}] Unauthorized memory access attempt`)
return NextResponse.json(
{
success: false,
error: {
message: authResult.error || 'Authentication required',
},
},
{ success: false, error: { message: authResult.error || 'Authentication required' } },
{ status: 401 }
)
}
logger.info(`[${requestId}] Processing memory search request`)
const url = new URL(request.url)
const workflowId = url.searchParams.get('workflowId')
const workspaceId = url.searchParams.get('workspaceId')
const searchQuery = url.searchParams.get('query')
const blockNameFilter = url.searchParams.get('blockName')
const limit = Number.parseInt(url.searchParams.get('limit') || '50')
if (!workflowId) {
logger.warn(`[${requestId}] Missing required parameter: workflowId`)
if (!workspaceId) {
return NextResponse.json(
{
success: false,
error: {
message: 'workflowId parameter is required',
},
},
{ success: false, error: { message: 'workspaceId parameter is required' } },
{ status: 400 }
)
}
const accessContext = await getWorkflowAccessContext(workflowId, authResult.userId)
if (!accessContext) {
logger.warn(`[${requestId}] Workflow ${workflowId} not found for user ${authResult.userId}`)
const { hasAccess } = await checkWorkspaceAccess(workspaceId, authResult.userId)
if (!hasAccess) {
return NextResponse.json(
{
success: false,
error: {
message: 'Workflow not found',
},
},
{ status: 404 }
)
}
const { workspacePermission, isOwner } = accessContext
if (!isOwner && !workspacePermission) {
logger.warn(
`[${requestId}] User ${authResult.userId} denied access to workflow ${workflowId}`
)
return NextResponse.json(
{
success: false,
error: {
message: 'Access denied to this workflow',
},
},
{ success: false, error: { message: 'Access denied to this workspace' } },
{ status: 403 }
)
}
logger.info(
`[${requestId}] User ${authResult.userId} (${authResult.authType}) accessing memories for workflow ${workflowId}`
)
const conditions = []
conditions.push(isNull(memory.deletedAt))
conditions.push(eq(memory.workflowId, workflowId))
let blockIdsToFilter: string[] | null = null
if (blockNameFilter) {
const blocks = await db
.select({ id: workflowBlocks.id })
.from(workflowBlocks)
.where(
and(eq(workflowBlocks.workflowId, workflowId), eq(workflowBlocks.name, blockNameFilter))
)
if (blocks.length === 0) {
logger.info(
`[${requestId}] No blocks found with name "${blockNameFilter}" for workflow: ${workflowId}`
)
return NextResponse.json(
{
success: true,
data: { memories: [] },
},
{ status: 200 }
)
}
blockIdsToFilter = blocks.map((b) => b.id)
}
const conditions = [isNull(memory.deletedAt), eq(memory.workspaceId, workspaceId)]
if (searchQuery) {
conditions.push(like(memory.key, `%${searchQuery}%`))
@@ -153,95 +97,27 @@ export async function GET(request: NextRequest) {
.orderBy(memory.createdAt)
.limit(limit)
const filteredMemories = blockIdsToFilter
? rawMemories.filter((mem) => {
const parsed = parseMemoryKey(mem.key)
return parsed && blockIdsToFilter.includes(parsed.blockId)
})
: rawMemories
const blockIds = new Set<string>()
const parsedKeys = new Map<string, { conversationId: string; blockId: string }>()
for (const mem of filteredMemories) {
const parsed = parseMemoryKey(mem.key)
if (parsed) {
blockIds.add(parsed.blockId)
parsedKeys.set(mem.key, parsed)
}
}
const blockNameMap = new Map<string, string>()
if (blockIds.size > 0) {
const blocks = await db
.select({ id: workflowBlocks.id, name: workflowBlocks.name })
.from(workflowBlocks)
.where(
and(
eq(workflowBlocks.workflowId, workflowId),
inArray(workflowBlocks.id, Array.from(blockIds))
)
)
for (const block of blocks) {
blockNameMap.set(block.id, block.name)
}
}
const enrichedMemories = filteredMemories.map((mem) => {
const parsed = parsedKeys.get(mem.key)
if (!parsed) {
return {
conversationId: mem.key,
blockId: 'unknown',
blockName: 'unknown',
data: mem.data,
}
}
const { conversationId, blockId } = parsed
const blockName = blockNameMap.get(blockId) || 'unknown'
return {
conversationId,
blockId,
blockName,
data: mem.data,
}
})
const enrichedMemories = rawMemories.map((mem) => ({
conversationId: mem.key,
data: mem.data,
}))
logger.info(
`[${requestId}] Found ${enrichedMemories.length} memories for workflow: ${workflowId}`
`[${requestId}] Found ${enrichedMemories.length} memories for workspace: ${workspaceId}`
)
return NextResponse.json(
{
success: true,
data: { memories: enrichedMemories },
},
{ success: true, data: { memories: enrichedMemories } },
{ status: 200 }
)
} catch (error: any) {
logger.error(`[${requestId}] Error searching memories`, { error })
return NextResponse.json(
{
success: false,
error: {
message: error.message || 'Failed to search memories',
},
},
{ success: false, error: { message: error.message || 'Failed to search memories' } },
{ status: 500 }
)
}
}
/**
* POST handler for creating new memories
* Requires:
* - key: Unique identifier for the memory (within workflow scope)
* - type: Memory type ('agent')
* - data: Memory content (agent message with role and content)
* - workflowId: ID of the workflow this memory belongs to
*/
export async function POST(request: NextRequest) {
const requestId = generateRequestId()
@@ -250,123 +126,63 @@ export async function POST(request: NextRequest) {
if (!authResult.success || !authResult.userId) {
logger.warn(`[${requestId}] Unauthorized memory creation attempt`)
return NextResponse.json(
{
success: false,
error: {
message: authResult.error || 'Authentication required',
},
},
{ success: false, error: { message: authResult.error || 'Authentication required' } },
{ status: 401 }
)
}
logger.info(`[${requestId}] Processing memory creation request`)
const body = await request.json()
const { key, data, workflowId } = body
const { key, data, workspaceId } = body
if (!key) {
logger.warn(`[${requestId}] Missing required field: key`)
return NextResponse.json(
{
success: false,
error: {
message: 'Memory key is required',
},
},
{ success: false, error: { message: 'Memory key is required' } },
{ status: 400 }
)
}
if (!data) {
logger.warn(`[${requestId}] Missing required field: data`)
return NextResponse.json(
{
success: false,
error: {
message: 'Memory data is required',
},
},
{ success: false, error: { message: 'Memory data is required' } },
{ status: 400 }
)
}
if (!workflowId) {
logger.warn(`[${requestId}] Missing required field: workflowId`)
if (!workspaceId) {
return NextResponse.json(
{
success: false,
error: {
message: 'workflowId is required',
},
},
{ success: false, error: { message: 'workspaceId is required' } },
{ status: 400 }
)
}
const accessContext = await getWorkflowAccessContext(workflowId, authResult.userId)
if (!accessContext) {
logger.warn(`[${requestId}] Workflow ${workflowId} not found for user ${authResult.userId}`)
const { hasAccess, canWrite } = await checkWorkspaceAccess(workspaceId, authResult.userId)
if (!hasAccess) {
return NextResponse.json(
{
success: false,
error: {
message: 'Workflow not found',
},
},
{ success: false, error: { message: 'Workspace not found' } },
{ status: 404 }
)
}
const { workspacePermission, isOwner } = accessContext
const hasWritePermission =
isOwner || workspacePermission === 'write' || workspacePermission === 'admin'
if (!hasWritePermission) {
logger.warn(
`[${requestId}] User ${authResult.userId} denied write access to workflow ${workflowId}`
)
if (!canWrite) {
return NextResponse.json(
{
success: false,
error: {
message: 'Write access denied to this workflow',
},
},
{ success: false, error: { message: 'Write access denied to this workspace' } },
{ status: 403 }
)
}
logger.info(
`[${requestId}] User ${authResult.userId} (${authResult.authType}) creating memory for workflow ${workflowId}`
)
const dataToValidate = Array.isArray(data) ? data : [data]
for (const msg of dataToValidate) {
if (!msg || typeof msg !== 'object' || !msg.role || !msg.content) {
logger.warn(`[${requestId}] Missing required message fields`)
return NextResponse.json(
{
success: false,
error: {
message: 'Memory requires messages with role and content',
},
},
{ success: false, error: { message: 'Memory requires messages with role and content' } },
{ status: 400 }
)
}
if (!['user', 'assistant', 'system'].includes(msg.role)) {
logger.warn(`[${requestId}] Invalid message role: ${msg.role}`)
return NextResponse.json(
{
success: false,
error: {
message: 'Message role must be user, assistant, or system',
},
},
{ success: false, error: { message: 'Message role must be user, assistant, or system' } },
{ status: 400 }
)
}
@@ -382,114 +198,59 @@ export async function POST(request: NextRequest) {
.insert(memory)
.values({
id,
workflowId,
workspaceId,
key,
data: initialData,
createdAt: now,
updatedAt: now,
})
.onConflictDoUpdate({
target: [memory.workflowId, memory.key],
target: [memory.workspaceId, memory.key],
set: {
data: sql`${memory.data} || ${JSON.stringify(initialData)}::jsonb`,
updatedAt: now,
},
})
logger.info(
`[${requestId}] Memory operation successful (atomic): ${key} for workflow: ${workflowId}`
)
logger.info(`[${requestId}] Memory operation successful: ${key} for workspace: ${workspaceId}`)
const allMemories = await db
.select()
.from(memory)
.where(and(eq(memory.key, key), eq(memory.workflowId, workflowId), isNull(memory.deletedAt)))
.where(
and(eq(memory.key, key), eq(memory.workspaceId, workspaceId), isNull(memory.deletedAt))
)
.orderBy(memory.createdAt)
if (allMemories.length === 0) {
logger.warn(`[${requestId}] No memories found after creating/updating memory: ${key}`)
return NextResponse.json(
{
success: false,
error: {
message: 'Failed to retrieve memory after creation/update',
},
},
{ success: false, error: { message: 'Failed to retrieve memory after creation/update' } },
{ status: 500 }
)
}
const memoryRecord = allMemories[0]
const parsed = parseMemoryKey(memoryRecord.key)
let enrichedMemory
if (!parsed) {
enrichedMemory = {
conversationId: memoryRecord.key,
blockId: 'unknown',
blockName: 'unknown',
data: memoryRecord.data,
}
} else {
const { conversationId, blockId } = parsed
const blockName = await (async () => {
const blocks = await db
.select({ name: workflowBlocks.name })
.from(workflowBlocks)
.where(and(eq(workflowBlocks.id, blockId), eq(workflowBlocks.workflowId, workflowId)))
.limit(1)
return blocks.length > 0 ? blocks[0].name : 'unknown'
})()
enrichedMemory = {
conversationId,
blockId,
blockName,
data: memoryRecord.data,
}
}
return NextResponse.json(
{
success: true,
data: enrichedMemory,
},
{ success: true, data: { conversationId: memoryRecord.key, data: memoryRecord.data } },
{ status: 200 }
)
} catch (error: any) {
if (error.code === '23505') {
logger.warn(`[${requestId}] Duplicate key violation`)
return NextResponse.json(
{
success: false,
error: {
message: 'Memory with this key already exists',
},
},
{ success: false, error: { message: 'Memory with this key already exists' } },
{ status: 409 }
)
}
logger.error(`[${requestId}] Error creating memory`, { error })
return NextResponse.json(
{
success: false,
error: {
message: error.message || 'Failed to create memory',
},
},
{ success: false, error: { message: error.message || 'Failed to create memory' } },
{ status: 500 }
)
}
}
/**
* DELETE handler for pattern-based memory deletion
* Supports query parameters:
* - workflowId: Required
* - conversationId: Optional - delete all memories for this conversation
* - blockId: Optional - delete all memories for this block
* - blockName: Optional - delete all memories for blocks with this name
*/
export async function DELETE(request: NextRequest) {
const requestId = generateRequestId()
@@ -498,175 +259,52 @@ export async function DELETE(request: NextRequest) {
if (!authResult.success || !authResult.userId) {
logger.warn(`[${requestId}] Unauthorized memory deletion attempt`)
return NextResponse.json(
{
success: false,
error: {
message: authResult.error || 'Authentication required',
},
},
{ success: false, error: { message: authResult.error || 'Authentication required' } },
{ status: 401 }
)
}
logger.info(`[${requestId}] Processing memory deletion request`)
const url = new URL(request.url)
const workflowId = url.searchParams.get('workflowId')
const workspaceId = url.searchParams.get('workspaceId')
const conversationId = url.searchParams.get('conversationId')
const blockId = url.searchParams.get('blockId')
const blockName = url.searchParams.get('blockName')
if (!workflowId) {
logger.warn(`[${requestId}] Missing required parameter: workflowId`)
if (!workspaceId) {
return NextResponse.json(
{
success: false,
error: {
message: 'workflowId parameter is required',
},
},
{ success: false, error: { message: 'workspaceId parameter is required' } },
{ status: 400 }
)
}
if (!conversationId && !blockId && !blockName) {
logger.warn(`[${requestId}] No filter parameters provided`)
if (!conversationId) {
return NextResponse.json(
{
success: false,
error: {
message: 'At least one of conversationId, blockId, or blockName must be provided',
},
},
{ success: false, error: { message: 'conversationId must be provided' } },
{ status: 400 }
)
}
const accessContext = await getWorkflowAccessContext(workflowId, authResult.userId)
if (!accessContext) {
logger.warn(`[${requestId}] Workflow ${workflowId} not found for user ${authResult.userId}`)
const { hasAccess, canWrite } = await checkWorkspaceAccess(workspaceId, authResult.userId)
if (!hasAccess) {
return NextResponse.json(
{
success: false,
error: {
message: 'Workflow not found',
},
},
{ success: false, error: { message: 'Workspace not found' } },
{ status: 404 }
)
}
const { workspacePermission, isOwner } = accessContext
const hasWritePermission =
isOwner || workspacePermission === 'write' || workspacePermission === 'admin'
if (!hasWritePermission) {
logger.warn(
`[${requestId}] User ${authResult.userId} denied delete access to workflow ${workflowId}`
)
if (!canWrite) {
return NextResponse.json(
{
success: false,
error: {
message: 'Write access denied to this workflow',
},
},
{ success: false, error: { message: 'Write access denied to this workspace' } },
{ status: 403 }
)
}
logger.info(
`[${requestId}] User ${authResult.userId} (${authResult.authType}) deleting memories for workflow ${workflowId}`
)
const result = await db
.delete(memory)
.where(and(eq(memory.key, conversationId), eq(memory.workspaceId, workspaceId)))
.returning({ id: memory.id })
let deletedCount = 0
const deletedCount = result.length
if (conversationId && blockId) {
const key = `${conversationId}:${blockId}`
const result = await db
.delete(memory)
.where(and(eq(memory.key, key), eq(memory.workflowId, workflowId)))
.returning({ id: memory.id })
deletedCount = result.length
} else if (conversationId && blockName) {
const blocks = await db
.select({ id: workflowBlocks.id })
.from(workflowBlocks)
.where(and(eq(workflowBlocks.workflowId, workflowId), eq(workflowBlocks.name, blockName)))
if (blocks.length === 0) {
return NextResponse.json(
{
success: true,
data: {
message: `No blocks found with name "${blockName}"`,
deletedCount: 0,
},
},
{ status: 200 }
)
}
for (const block of blocks) {
const key = `${conversationId}:${block.id}`
const result = await db
.delete(memory)
.where(and(eq(memory.key, key), eq(memory.workflowId, workflowId)))
.returning({ id: memory.id })
deletedCount += result.length
}
} else if (conversationId) {
const pattern = `${conversationId}:%`
const result = await db
.delete(memory)
.where(and(like(memory.key, pattern), eq(memory.workflowId, workflowId)))
.returning({ id: memory.id })
deletedCount = result.length
} else if (blockId) {
const pattern = `%:${blockId}`
const result = await db
.delete(memory)
.where(and(like(memory.key, pattern), eq(memory.workflowId, workflowId)))
.returning({ id: memory.id })
deletedCount = result.length
} else if (blockName) {
const blocks = await db
.select({ id: workflowBlocks.id })
.from(workflowBlocks)
.where(and(eq(workflowBlocks.workflowId, workflowId), eq(workflowBlocks.name, blockName)))
if (blocks.length === 0) {
return NextResponse.json(
{
success: true,
data: {
message: `No blocks found with name "${blockName}"`,
deletedCount: 0,
},
},
{ status: 200 }
)
}
for (const block of blocks) {
const pattern = `%:${block.id}`
const result = await db
.delete(memory)
.where(and(like(memory.key, pattern), eq(memory.workflowId, workflowId)))
.returning({ id: memory.id })
deletedCount += result.length
}
}
logger.info(
`[${requestId}] Successfully deleted ${deletedCount} memories for workflow: ${workflowId}`
)
logger.info(`[${requestId}] Deleted ${deletedCount} memories for workspace: ${workspaceId}`)
return NextResponse.json(
{
success: true,
@@ -683,12 +321,7 @@ export async function DELETE(request: NextRequest) {
} catch (error: any) {
logger.error(`[${requestId}] Error deleting memories`, { error })
return NextResponse.json(
{
success: false,
error: {
message: error.message || 'Failed to delete memories',
},
},
{ success: false, error: { message: error.message || 'Failed to delete memories' } },
{ status: 500 }
)
}

View File

@@ -6,12 +6,29 @@ const logger = createLogger('OpenRouterModelsAPI')
interface OpenRouterModel {
id: string
context_length?: number
supported_parameters?: string[]
pricing?: {
prompt?: string
completion?: string
}
}
interface OpenRouterResponse {
data: OpenRouterModel[]
}
export interface OpenRouterModelInfo {
id: string
contextLength?: number
supportsStructuredOutputs?: boolean
supportsTools?: boolean
pricing?: {
input: number
output: number
}
}
export async function GET(_request: NextRequest) {
try {
const response = await fetch('https://openrouter.ai/api/v1/models', {
@@ -24,23 +41,51 @@ export async function GET(_request: NextRequest) {
status: response.status,
statusText: response.statusText,
})
return NextResponse.json({ models: [] })
return NextResponse.json({ models: [], modelInfo: {} })
}
const data = (await response.json()) as OpenRouterResponse
const allModels = Array.from(new Set(data.data?.map((model) => `openrouter/${model.id}`) ?? []))
const models = filterBlacklistedModels(allModels)
const modelInfo: Record<string, OpenRouterModelInfo> = {}
const allModels: string[] = []
for (const model of data.data ?? []) {
const modelId = `openrouter/${model.id}`
allModels.push(modelId)
const supportedParams = model.supported_parameters ?? []
modelInfo[modelId] = {
id: modelId,
contextLength: model.context_length,
supportsStructuredOutputs: supportedParams.includes('structured_outputs'),
supportsTools: supportedParams.includes('tools'),
pricing: model.pricing
? {
input: Number.parseFloat(model.pricing.prompt ?? '0') * 1000000,
output: Number.parseFloat(model.pricing.completion ?? '0') * 1000000,
}
: undefined,
}
}
const uniqueModels = Array.from(new Set(allModels))
const models = filterBlacklistedModels(uniqueModels)
const structuredOutputCount = Object.values(modelInfo).filter(
(m) => m.supportsStructuredOutputs
).length
logger.info('Successfully fetched OpenRouter models', {
count: models.length,
filtered: allModels.length - models.length,
filtered: uniqueModels.length - models.length,
withStructuredOutputs: structuredOutputCount,
})
return NextResponse.json({ models })
return NextResponse.json({ models, modelInfo })
} catch (error) {
logger.error('Error fetching OpenRouter models', {
error: error instanceof Error ? error.message : 'Unknown error',
})
return NextResponse.json({ models: [] })
return NextResponse.json({ models: [], modelInfo: {} })
}
}

View File

@@ -1,6 +1,10 @@
import { db } from '@sim/db'
import { account } from '@sim/db/schema'
import { eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { refreshTokenIfNeeded } from '@/app/api/auth/oauth/utils'
import type { StreamingExecution } from '@/executor/types'
import { executeProviderRequest } from '@/providers'
import { getApiKey } from '@/providers/utils'
@@ -37,6 +41,7 @@ export async function POST(request: NextRequest) {
azureApiVersion,
vertexProject,
vertexLocation,
vertexCredential,
responseFormat,
workflowId,
workspaceId,
@@ -62,6 +67,7 @@ export async function POST(request: NextRequest) {
hasAzureApiVersion: !!azureApiVersion,
hasVertexProject: !!vertexProject,
hasVertexLocation: !!vertexLocation,
hasVertexCredential: !!vertexCredential,
hasResponseFormat: !!responseFormat,
workflowId,
stream: !!stream,
@@ -76,13 +82,18 @@ export async function POST(request: NextRequest) {
let finalApiKey: string
try {
finalApiKey = getApiKey(provider, model, apiKey)
if (provider === 'vertex' && vertexCredential) {
finalApiKey = await resolveVertexCredential(requestId, vertexCredential)
} else {
finalApiKey = getApiKey(provider, model, apiKey)
}
} catch (error) {
logger.error(`[${requestId}] Failed to get API key:`, {
provider,
model,
error: error instanceof Error ? error.message : String(error),
hasProvidedApiKey: !!apiKey,
hasVertexCredential: !!vertexCredential,
})
return NextResponse.json(
{ error: error instanceof Error ? error.message : 'API key error' },
@@ -165,8 +176,8 @@ export async function POST(request: NextRequest) {
: '',
model: executionData.output?.model,
tokens: executionData.output?.tokens || {
prompt: 0,
completion: 0,
input: 0,
output: 0,
total: 0,
},
// Sanitize any potential Unicode characters in tool calls
@@ -324,3 +335,27 @@ function sanitizeObject(obj: any): any {
return result
}
/**
* Resolves a Vertex AI OAuth credential to an access token
*/
async function resolveVertexCredential(requestId: string, credentialId: string): Promise<string> {
logger.info(`[${requestId}] Resolving Vertex AI credential: ${credentialId}`)
const credential = await db.query.account.findFirst({
where: eq(account.id, credentialId),
})
if (!credential) {
throw new Error(`Vertex AI credential not found: ${credentialId}`)
}
const { accessToken } = await refreshTokenIfNeeded(requestId, credential, credentialId)
if (!accessToken) {
throw new Error('Failed to get Vertex AI access token')
}
logger.info(`[${requestId}] Successfully resolved Vertex AI credential`)
return accessToken
}

View File

@@ -0,0 +1,652 @@
/**
* Tests for schedule reactivate PUT API route
*
* @vitest-environment node
*/
import { NextRequest } from 'next/server'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
const { mockGetSession, mockGetUserEntityPermissions, mockDbSelect, mockDbUpdate } = vi.hoisted(
() => ({
mockGetSession: vi.fn(),
mockGetUserEntityPermissions: vi.fn(),
mockDbSelect: vi.fn(),
mockDbUpdate: vi.fn(),
})
)
vi.mock('@/lib/auth', () => ({
getSession: mockGetSession,
}))
vi.mock('@/lib/workspaces/permissions/utils', () => ({
getUserEntityPermissions: mockGetUserEntityPermissions,
}))
vi.mock('@sim/db', () => ({
db: {
select: mockDbSelect,
update: mockDbUpdate,
},
}))
vi.mock('@sim/db/schema', () => ({
workflow: { id: 'id', userId: 'userId', workspaceId: 'workspaceId' },
workflowSchedule: { id: 'id', workflowId: 'workflowId', status: 'status' },
}))
vi.mock('drizzle-orm', () => ({
eq: vi.fn(),
}))
vi.mock('@/lib/core/utils/request', () => ({
generateRequestId: () => 'test-request-id',
}))
vi.mock('@/lib/logs/console/logger', () => ({
createLogger: () => ({
info: vi.fn(),
warn: vi.fn(),
error: vi.fn(),
debug: vi.fn(),
}),
}))
import { PUT } from './route'
function createRequest(body: Record<string, unknown>): NextRequest {
return new NextRequest(new URL('http://test/api/schedules/sched-1'), {
method: 'PUT',
body: JSON.stringify(body),
headers: { 'Content-Type': 'application/json' },
})
}
function createParams(id: string): { params: Promise<{ id: string }> } {
return { params: Promise.resolve({ id }) }
}
function mockDbChain(selectResults: unknown[][]) {
let selectCallIndex = 0
mockDbSelect.mockImplementation(() => ({
from: () => ({
where: () => ({
limit: () => selectResults[selectCallIndex++] || [],
}),
}),
}))
mockDbUpdate.mockImplementation(() => ({
set: () => ({
where: vi.fn().mockResolvedValue({}),
}),
}))
}
describe('Schedule PUT API (Reactivate)', () => {
beforeEach(() => {
vi.clearAllMocks()
mockGetSession.mockResolvedValue({ user: { id: 'user-1' } })
mockGetUserEntityPermissions.mockResolvedValue('write')
})
afterEach(() => {
vi.clearAllMocks()
})
describe('Authentication', () => {
it('returns 401 when user is not authenticated', async () => {
mockGetSession.mockResolvedValue(null)
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(401)
const data = await res.json()
expect(data.error).toBe('Unauthorized')
})
})
describe('Request Validation', () => {
it('returns 400 when action is not reactivate', async () => {
mockDbChain([
[{ id: 'sched-1', workflowId: 'wf-1', status: 'disabled' }],
[{ userId: 'user-1', workspaceId: null }],
])
const res = await PUT(createRequest({ action: 'disable' }), createParams('sched-1'))
expect(res.status).toBe(400)
const data = await res.json()
expect(data.error).toBe('Invalid request body')
})
it('returns 400 when action is missing', async () => {
mockDbChain([
[{ id: 'sched-1', workflowId: 'wf-1', status: 'disabled' }],
[{ userId: 'user-1', workspaceId: null }],
])
const res = await PUT(createRequest({}), createParams('sched-1'))
expect(res.status).toBe(400)
const data = await res.json()
expect(data.error).toBe('Invalid request body')
})
})
describe('Schedule Not Found', () => {
it('returns 404 when schedule does not exist', async () => {
mockDbChain([[]])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-999'))
expect(res.status).toBe(404)
const data = await res.json()
expect(data.error).toBe('Schedule not found')
})
it('returns 404 when workflow does not exist for schedule', async () => {
mockDbChain([[{ id: 'sched-1', workflowId: 'wf-1', status: 'disabled' }], []])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(404)
const data = await res.json()
expect(data.error).toBe('Workflow not found')
})
})
describe('Authorization', () => {
it('returns 403 when user is not workflow owner', async () => {
mockDbChain([
[{ id: 'sched-1', workflowId: 'wf-1', status: 'disabled' }],
[{ userId: 'other-user', workspaceId: null }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(403)
const data = await res.json()
expect(data.error).toBe('Not authorized to modify this schedule')
})
it('returns 403 for workspace member with only read permission', async () => {
mockGetUserEntityPermissions.mockResolvedValue('read')
mockDbChain([
[{ id: 'sched-1', workflowId: 'wf-1', status: 'disabled' }],
[{ userId: 'other-user', workspaceId: 'ws-1' }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(403)
})
it('allows workflow owner to reactivate', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '*/5 * * * *',
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
expect(data.message).toBe('Schedule activated successfully')
})
it('allows workspace member with write permission to reactivate', async () => {
mockGetUserEntityPermissions.mockResolvedValue('write')
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '*/5 * * * *',
timezone: 'UTC',
},
],
[{ userId: 'other-user', workspaceId: 'ws-1' }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
})
it('allows workspace admin to reactivate', async () => {
mockGetUserEntityPermissions.mockResolvedValue('admin')
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '*/5 * * * *',
timezone: 'UTC',
},
],
[{ userId: 'other-user', workspaceId: 'ws-1' }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
})
})
describe('Schedule State Handling', () => {
it('returns success message when schedule is already active', async () => {
mockDbChain([
[{ id: 'sched-1', workflowId: 'wf-1', status: 'active' }],
[{ userId: 'user-1', workspaceId: null }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
expect(data.message).toBe('Schedule is already active')
expect(mockDbUpdate).not.toHaveBeenCalled()
})
it('successfully reactivates disabled schedule', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '*/5 * * * *',
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
expect(data.message).toBe('Schedule activated successfully')
expect(data.nextRunAt).toBeDefined()
expect(mockDbUpdate).toHaveBeenCalled()
})
it('returns 400 when schedule has no cron expression', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: null,
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(400)
const data = await res.json()
expect(data.error).toBe('Schedule has no cron expression')
})
it('returns 400 when schedule has invalid cron expression', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: 'invalid-cron',
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(400)
const data = await res.json()
expect(data.error).toBe('Schedule has invalid cron expression')
})
it('calculates nextRunAt from stored cron expression (every 5 minutes)', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '*/5 * * * *',
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
const afterCall = Date.now()
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt).getTime()
// nextRunAt should be within 0-5 minutes in the future
expect(nextRunAt).toBeGreaterThan(beforeCall)
expect(nextRunAt).toBeLessThanOrEqual(afterCall + 5 * 60 * 1000 + 1000)
// Should align with 5-minute intervals (minute divisible by 5)
expect(new Date(nextRunAt).getMinutes() % 5).toBe(0)
})
it('calculates nextRunAt from daily cron expression', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '30 14 * * *', // 2:30 PM daily
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date at 14:30 UTC
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
expect(nextRunAt.getUTCHours()).toBe(14)
expect(nextRunAt.getUTCMinutes()).toBe(30)
expect(nextRunAt.getUTCSeconds()).toBe(0)
})
it('calculates nextRunAt from weekly cron expression', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '0 9 * * 1', // Monday at 9:00 AM
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date on Monday at 09:00 UTC
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
expect(nextRunAt.getUTCDay()).toBe(1) // Monday
expect(nextRunAt.getUTCHours()).toBe(9)
expect(nextRunAt.getUTCMinutes()).toBe(0)
})
it('calculates nextRunAt from monthly cron expression', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '0 10 15 * *', // 15th of month at 10:00 AM
timezone: 'UTC',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date on the 15th at 10:00 UTC
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
expect(nextRunAt.getUTCDate()).toBe(15)
expect(nextRunAt.getUTCHours()).toBe(10)
expect(nextRunAt.getUTCMinutes()).toBe(0)
})
})
describe('Timezone Handling in Reactivation', () => {
it('calculates nextRunAt with America/New_York timezone', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '0 9 * * *', // 9:00 AM Eastern
timezone: 'America/New_York',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
// The exact UTC hour will depend on DST, but it should be 13:00 or 14:00 UTC
const utcHour = nextRunAt.getUTCHours()
expect([13, 14]).toContain(utcHour) // 9 AM ET = 1-2 PM UTC depending on DST
expect(nextRunAt.getUTCMinutes()).toBe(0)
})
it('calculates nextRunAt with Asia/Tokyo timezone', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '30 15 * * *', // 3:30 PM Japan Time
timezone: 'Asia/Tokyo',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
// 3:30 PM JST (UTC+9) = 6:30 AM UTC
expect(nextRunAt.getUTCHours()).toBe(6)
expect(nextRunAt.getUTCMinutes()).toBe(30)
})
it('calculates nextRunAt with Europe/London timezone', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '0 12 * * 5', // Friday at noon London time
timezone: 'Europe/London',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date on Friday
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
expect(nextRunAt.getUTCDay()).toBe(5) // Friday
// UTC hour depends on BST/GMT (11:00 or 12:00 UTC)
const utcHour = nextRunAt.getUTCHours()
expect([11, 12]).toContain(utcHour)
expect(nextRunAt.getUTCMinutes()).toBe(0)
})
it('uses UTC as default timezone when timezone is not set', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '0 10 * * *', // 10:00 AM
timezone: null,
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date at 10:00 UTC
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
expect(nextRunAt.getUTCHours()).toBe(10)
expect(nextRunAt.getUTCMinutes()).toBe(0)
})
it('handles minutely schedules with timezone correctly', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '*/10 * * * *', // Every 10 minutes
timezone: 'America/Los_Angeles',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date within the next 10 minutes
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
expect(nextRunAt.getTime()).toBeLessThanOrEqual(beforeCall + 10 * 60 * 1000 + 1000)
// Should align with 10-minute intervals
expect(nextRunAt.getMinutes() % 10).toBe(0)
})
it('handles hourly schedules with timezone correctly', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '15 * * * *', // At minute 15 of every hour
timezone: 'America/Chicago',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date at minute 15
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
expect(nextRunAt.getMinutes()).toBe(15)
expect(nextRunAt.getSeconds()).toBe(0)
})
it('handles custom cron expressions with complex patterns and timezone', async () => {
mockDbChain([
[
{
id: 'sched-1',
workflowId: 'wf-1',
status: 'disabled',
cronExpression: '0 9 * * 1-5', // Weekdays at 9 AM
timezone: 'America/New_York',
},
],
[{ userId: 'user-1', workspaceId: null }],
])
const beforeCall = Date.now()
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(200)
const data = await res.json()
const nextRunAt = new Date(data.nextRunAt)
// Should be a future date on a weekday (1-5)
expect(nextRunAt.getTime()).toBeGreaterThan(beforeCall)
const dayOfWeek = nextRunAt.getUTCDay()
expect([1, 2, 3, 4, 5]).toContain(dayOfWeek)
})
})
describe('Error Handling', () => {
it('returns 500 when database operation fails', async () => {
mockDbSelect.mockImplementation(() => {
throw new Error('Database connection failed')
})
const res = await PUT(createRequest({ action: 'reactivate' }), createParams('sched-1'))
expect(res.status).toBe(500)
const data = await res.json()
expect(data.error).toBe('Failed to update schedule')
})
})
})

View File

@@ -6,104 +6,26 @@ import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { validateCronExpression } from '@/lib/workflows/schedules/utils'
import { getUserEntityPermissions } from '@/lib/workspaces/permissions/utils'
const logger = createLogger('ScheduleAPI')
export const dynamic = 'force-dynamic'
const scheduleActionEnum = z.enum(['reactivate', 'disable'])
const scheduleStatusEnum = z.enum(['active', 'disabled'])
const scheduleUpdateSchema = z
.object({
action: scheduleActionEnum.optional(),
status: scheduleStatusEnum.optional(),
})
.refine((data) => data.action || data.status, {
message: 'Either action or status must be provided',
})
const scheduleUpdateSchema = z.object({
action: z.literal('reactivate'),
})
/**
* Delete a schedule
*/
export async function DELETE(
request: NextRequest,
{ params }: { params: Promise<{ id: string }> }
) {
const requestId = generateRequestId()
try {
const { id } = await params
logger.debug(`[${requestId}] Deleting schedule with ID: ${id}`)
const session = await getSession()
if (!session?.user?.id) {
logger.warn(`[${requestId}] Unauthorized schedule deletion attempt`)
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
}
// Find the schedule and check ownership
const schedules = await db
.select({
schedule: workflowSchedule,
workflow: {
id: workflow.id,
userId: workflow.userId,
workspaceId: workflow.workspaceId,
},
})
.from(workflowSchedule)
.innerJoin(workflow, eq(workflowSchedule.workflowId, workflow.id))
.where(eq(workflowSchedule.id, id))
.limit(1)
if (schedules.length === 0) {
logger.warn(`[${requestId}] Schedule not found: ${id}`)
return NextResponse.json({ error: 'Schedule not found' }, { status: 404 })
}
const workflowRecord = schedules[0].workflow
// Check authorization - either the user owns the workflow or has write/admin workspace permissions
let isAuthorized = workflowRecord.userId === session.user.id
// If not authorized by ownership and the workflow belongs to a workspace, check workspace permissions
if (!isAuthorized && workflowRecord.workspaceId) {
const userPermission = await getUserEntityPermissions(
session.user.id,
'workspace',
workflowRecord.workspaceId
)
isAuthorized = userPermission === 'write' || userPermission === 'admin'
}
if (!isAuthorized) {
logger.warn(`[${requestId}] Unauthorized schedule deletion attempt for schedule: ${id}`)
return NextResponse.json({ error: 'Unauthorized' }, { status: 403 })
}
// Delete the schedule
await db.delete(workflowSchedule).where(eq(workflowSchedule.id, id))
logger.info(`[${requestId}] Successfully deleted schedule: ${id}`)
return NextResponse.json({ success: true }, { status: 200 })
} catch (error) {
logger.error(`[${requestId}] Error deleting schedule`, error)
return NextResponse.json({ error: 'Internal server error' }, { status: 500 })
}
}
/**
* Update a schedule - can be used to reactivate a disabled schedule
* Reactivate a disabled schedule
*/
export async function PUT(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const requestId = generateRequestId()
try {
const { id } = await params
const scheduleId = id
logger.debug(`[${requestId}] Updating schedule with ID: ${scheduleId}`)
const { id: scheduleId } = await params
logger.debug(`[${requestId}] Reactivating schedule with ID: ${scheduleId}`)
const session = await getSession()
if (!session?.user?.id) {
@@ -115,18 +37,16 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
const validation = scheduleUpdateSchema.safeParse(body)
if (!validation.success) {
const firstError = validation.error.errors[0]
logger.warn(`[${requestId}] Validation error:`, firstError)
return NextResponse.json({ error: firstError.message }, { status: 400 })
return NextResponse.json({ error: 'Invalid request body' }, { status: 400 })
}
const { action, status: requestedStatus } = validation.data
const [schedule] = await db
.select({
id: workflowSchedule.id,
workflowId: workflowSchedule.workflowId,
status: workflowSchedule.status,
cronExpression: workflowSchedule.cronExpression,
timezone: workflowSchedule.timezone,
})
.from(workflowSchedule)
.where(eq(workflowSchedule.id, scheduleId))
@@ -164,57 +84,40 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
return NextResponse.json({ error: 'Not authorized to modify this schedule' }, { status: 403 })
}
if (action === 'reactivate' || (requestedStatus && requestedStatus === 'active')) {
if (schedule.status === 'active') {
return NextResponse.json({ message: 'Schedule is already active' }, { status: 200 })
}
if (schedule.status === 'active') {
return NextResponse.json({ message: 'Schedule is already active' }, { status: 200 })
}
const now = new Date()
const nextRunAt = new Date(now.getTime() + 60 * 1000) // Schedule to run in 1 minute
if (!schedule.cronExpression) {
logger.error(`[${requestId}] Schedule has no cron expression: ${scheduleId}`)
return NextResponse.json({ error: 'Schedule has no cron expression' }, { status: 400 })
}
await db
.update(workflowSchedule)
.set({
status: 'active',
failedCount: 0,
updatedAt: now,
nextRunAt,
})
.where(eq(workflowSchedule.id, scheduleId))
const cronResult = validateCronExpression(schedule.cronExpression, schedule.timezone || 'UTC')
if (!cronResult.isValid || !cronResult.nextRun) {
logger.error(`[${requestId}] Invalid cron expression for schedule: ${scheduleId}`)
return NextResponse.json({ error: 'Schedule has invalid cron expression' }, { status: 400 })
}
logger.info(`[${requestId}] Reactivated schedule: ${scheduleId}`)
const now = new Date()
const nextRunAt = cronResult.nextRun
return NextResponse.json({
message: 'Schedule activated successfully',
await db
.update(workflowSchedule)
.set({
status: 'active',
failedCount: 0,
updatedAt: now,
nextRunAt,
})
}
.where(eq(workflowSchedule.id, scheduleId))
if (action === 'disable' || (requestedStatus && requestedStatus === 'disabled')) {
if (schedule.status === 'disabled') {
return NextResponse.json({ message: 'Schedule is already disabled' }, { status: 200 })
}
logger.info(`[${requestId}] Reactivated schedule: ${scheduleId}`)
const now = new Date()
await db
.update(workflowSchedule)
.set({
status: 'disabled',
updatedAt: now,
nextRunAt: null, // Clear next run time when disabled
})
.where(eq(workflowSchedule.id, scheduleId))
logger.info(`[${requestId}] Disabled schedule: ${scheduleId}`)
return NextResponse.json({
message: 'Schedule disabled successfully',
})
}
logger.warn(`[${requestId}] Unsupported update action for schedule: ${scheduleId}`)
return NextResponse.json({ error: 'Unsupported update action' }, { status: 400 })
return NextResponse.json({
message: 'Schedule activated successfully',
nextRunAt,
})
} catch (error) {
logger.error(`[${requestId}] Error updating schedule`, error)
return NextResponse.json({ error: 'Failed to update schedule' }, { status: 500 })

View File

@@ -1,143 +0,0 @@
/**
* Integration tests for schedule status API route
*
* @vitest-environment node
*/
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { createMockRequest, mockScheduleStatusDb } from '@/app/api/__test-utils__/utils'
// Common mocks
const mockSchedule = {
id: 'schedule-id',
workflowId: 'workflow-id',
status: 'active',
failedCount: 0,
lastRanAt: new Date('2024-01-01T00:00:00.000Z'),
lastFailedAt: null,
nextRunAt: new Date('2024-01-02T00:00:00.000Z'),
}
beforeEach(() => {
vi.resetModules()
vi.doMock('@/lib/logs/console/logger', () => ({
createLogger: () => ({ info: vi.fn(), warn: vi.fn(), error: vi.fn(), debug: vi.fn() }),
}))
vi.doMock('crypto', () => ({
randomUUID: vi.fn(() => 'test-uuid'),
default: { randomUUID: vi.fn(() => 'test-uuid') },
}))
})
afterEach(() => {
vi.clearAllMocks()
})
describe('Schedule Status API Route', () => {
it('returns schedule status successfully', async () => {
mockScheduleStatusDb({}) // default mocks
vi.doMock('@/lib/auth', () => ({
getSession: vi.fn().mockResolvedValue({ user: { id: 'user-id' } }),
}))
const req = createMockRequest('GET')
const { GET } = await import('@/app/api/schedules/[id]/status/route')
const res = await GET(req, { params: Promise.resolve({ id: 'schedule-id' }) })
expect(res.status).toBe(200)
const data = await res.json()
expect(data).toMatchObject({
status: 'active',
failedCount: 0,
nextRunAt: mockSchedule.nextRunAt.toISOString(),
isDisabled: false,
})
})
it('marks disabled schedules with isDisabled = true', async () => {
mockScheduleStatusDb({ schedule: [{ ...mockSchedule, status: 'disabled' }] })
vi.doMock('@/lib/auth', () => ({
getSession: vi.fn().mockResolvedValue({ user: { id: 'user-id' } }),
}))
const req = createMockRequest('GET')
const { GET } = await import('@/app/api/schedules/[id]/status/route')
const res = await GET(req, { params: Promise.resolve({ id: 'schedule-id' }) })
expect(res.status).toBe(200)
const data = await res.json()
expect(data).toHaveProperty('status', 'disabled')
expect(data).toHaveProperty('isDisabled', true)
expect(data).toHaveProperty('lastFailedAt')
})
it('returns 404 if schedule not found', async () => {
mockScheduleStatusDb({ schedule: [] })
vi.doMock('@/lib/auth', () => ({
getSession: vi.fn().mockResolvedValue({ user: { id: 'user-id' } }),
}))
const req = createMockRequest('GET')
const { GET } = await import('@/app/api/schedules/[id]/status/route')
const res = await GET(req, { params: Promise.resolve({ id: 'missing-id' }) })
expect(res.status).toBe(404)
const data = await res.json()
expect(data).toHaveProperty('error', 'Schedule not found')
})
it('returns 404 if related workflow not found', async () => {
mockScheduleStatusDb({ workflow: [] })
vi.doMock('@/lib/auth', () => ({
getSession: vi.fn().mockResolvedValue({ user: { id: 'user-id' } }),
}))
const req = createMockRequest('GET')
const { GET } = await import('@/app/api/schedules/[id]/status/route')
const res = await GET(req, { params: Promise.resolve({ id: 'schedule-id' }) })
expect(res.status).toBe(404)
const data = await res.json()
expect(data).toHaveProperty('error', 'Workflow not found')
})
it('returns 403 when user is not owner of workflow', async () => {
mockScheduleStatusDb({ workflow: [{ userId: 'another-user' }] })
vi.doMock('@/lib/auth', () => ({
getSession: vi.fn().mockResolvedValue({ user: { id: 'user-id' } }),
}))
const req = createMockRequest('GET')
const { GET } = await import('@/app/api/schedules/[id]/status/route')
const res = await GET(req, { params: Promise.resolve({ id: 'schedule-id' }) })
expect(res.status).toBe(403)
const data = await res.json()
expect(data).toHaveProperty('error', 'Not authorized to view this schedule')
})
it('returns 401 when user is not authenticated', async () => {
mockScheduleStatusDb({})
vi.doMock('@/lib/auth', () => ({
getSession: vi.fn().mockResolvedValue(null),
}))
const req = createMockRequest('GET')
const { GET } = await import('@/app/api/schedules/[id]/status/route')
const res = await GET(req, { params: Promise.resolve({ id: 'schedule-id' }) })
expect(res.status).toBe(401)
const data = await res.json()
expect(data).toHaveProperty('error', 'Unauthorized')
})
})

View File

@@ -1,84 +0,0 @@
import { db } from '@sim/db'
import { workflow, workflowSchedule } from '@sim/db/schema'
import { eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { getUserEntityPermissions } from '@/lib/workspaces/permissions/utils'
const logger = createLogger('ScheduleStatusAPI')
export async function GET(req: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const requestId = generateRequestId()
const { id } = await params
const scheduleId = id
try {
const session = await getSession()
if (!session?.user?.id) {
logger.warn(`[${requestId}] Unauthorized schedule status request`)
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
}
const [schedule] = await db
.select({
id: workflowSchedule.id,
workflowId: workflowSchedule.workflowId,
status: workflowSchedule.status,
failedCount: workflowSchedule.failedCount,
lastRanAt: workflowSchedule.lastRanAt,
lastFailedAt: workflowSchedule.lastFailedAt,
nextRunAt: workflowSchedule.nextRunAt,
})
.from(workflowSchedule)
.where(eq(workflowSchedule.id, scheduleId))
.limit(1)
if (!schedule) {
logger.warn(`[${requestId}] Schedule not found: ${scheduleId}`)
return NextResponse.json({ error: 'Schedule not found' }, { status: 404 })
}
const [workflowRecord] = await db
.select({ userId: workflow.userId, workspaceId: workflow.workspaceId })
.from(workflow)
.where(eq(workflow.id, schedule.workflowId))
.limit(1)
if (!workflowRecord) {
logger.warn(`[${requestId}] Workflow not found for schedule: ${scheduleId}`)
return NextResponse.json({ error: 'Workflow not found' }, { status: 404 })
}
// Check authorization - either the user owns the workflow or has workspace permissions
let isAuthorized = workflowRecord.userId === session.user.id
// If not authorized by ownership and the workflow belongs to a workspace, check workspace permissions
if (!isAuthorized && workflowRecord.workspaceId) {
const userPermission = await getUserEntityPermissions(
session.user.id,
'workspace',
workflowRecord.workspaceId
)
isAuthorized = userPermission !== null
}
if (!isAuthorized) {
logger.warn(`[${requestId}] User not authorized to view this schedule: ${scheduleId}`)
return NextResponse.json({ error: 'Not authorized to view this schedule' }, { status: 403 })
}
return NextResponse.json({
status: schedule.status,
failedCount: schedule.failedCount,
lastRanAt: schedule.lastRanAt,
lastFailedAt: schedule.lastFailedAt,
nextRunAt: schedule.nextRunAt,
isDisabled: schedule.status === 'disabled',
})
} catch (error) {
logger.error(`[${requestId}] Error retrieving schedule status: ${scheduleId}`, error)
return NextResponse.json({ error: 'Failed to retrieve schedule status' }, { status: 500 })
}
}

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