From a7de436549001771e6f7d10af36a3c77b9e8b36c Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Wed, 14 May 2025 10:15:45 +0500 Subject: [PATCH 01/20] feat(rightbrain): added rightbrain block/tools --- apps/sim/blocks/blocks/rightbrain.ts | 66 ++++++++++++++++++ apps/sim/blocks/registry.ts | 2 + apps/sim/components/icons.tsx | 50 ++++++++++++-- apps/sim/package.json | 1 + apps/sim/tools/registry.ts | 11 ++- apps/sim/tools/rightbrain/index.ts | 3 + apps/sim/tools/rightbrain/run_task.ts | 97 +++++++++++++++++++++++++++ apps/sim/tools/rightbrain/types.ts | 12 ++++ package-lock.json | 6 ++ 9 files changed, 239 insertions(+), 9 deletions(-) create mode 100644 apps/sim/blocks/blocks/rightbrain.ts create mode 100644 apps/sim/tools/rightbrain/index.ts create mode 100644 apps/sim/tools/rightbrain/run_task.ts create mode 100644 apps/sim/tools/rightbrain/types.ts diff --git a/apps/sim/blocks/blocks/rightbrain.ts b/apps/sim/blocks/blocks/rightbrain.ts new file mode 100644 index 0000000000..00d432c2ab --- /dev/null +++ b/apps/sim/blocks/blocks/rightbrain.ts @@ -0,0 +1,66 @@ +import { RightBrainIcon } from '@/components/icons' +import { RightBrainRunTaskResponse } from '@/tools/rightbrain/types' +import { BlockConfig } from '../types' + +export const RightBrainBlock: BlockConfig = { + type: 'rightbrain', + name: 'Rightbrain', + description: 'Run RB task', + longDescription: + 'Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs.', + docsLink: 'https://docs.rightbrain.ai/intro', + category: 'blocks', + bgColor: '#E0E0E0', + icon: RightBrainIcon, + subBlocks: [ + { + id: 'url', + title: 'Task URL', + type: 'short-input', + layout: 'full', + placeholder: 'Enter URL', + }, + { + id: 'inputs', + title: 'Task inputs', + type: 'code', + layout: 'full', + placeholder: 'Enter inputs JSON...', + }, + { + id: 'apiKey', + title: 'API Key', + type: 'short-input', + layout: 'full', + placeholder: 'Your Rightbrain API key', + password: true, + }, + ], + tools: { + access: ['rightbrain_run_task'], + }, + inputs: { + url: { type: 'string', required: true }, + inputs: { type: 'json', required: true }, + apiKey: { type: 'string', required: true }, + }, + outputs: { + response: { + type: { + charged_credits: 'any', + created: 'string', + id: 'string', + input_processor_timing: 'any', + input_tokens: 'number', + llm_call_timing: 'any', + output_tokens: 'number', + response: 'json', + run_data: 'json', + task_id: 'string', + task_revision_id: 'string', + total_tokens: 'number', + is_error: 'any', + }, + }, + }, +} diff --git a/apps/sim/blocks/registry.ts b/apps/sim/blocks/registry.ts index 4a44fdaa4a..7d26d4309e 100644 --- a/apps/sim/blocks/registry.ts +++ b/apps/sim/blocks/registry.ts @@ -36,6 +36,7 @@ import { OpenAIBlock } from './blocks/openai' import { PerplexityBlock } from './blocks/perplexity' import { PineconeBlock } from './blocks/pinecone' import { RedditBlock } from './blocks/reddit' +import { RightBrainBlock } from './blocks/rightbrain' import { RouterBlock } from './blocks/router' import { S3Block } from './blocks/s3' import { SerperBlock } from './blocks/serper' @@ -91,6 +92,7 @@ export const registry: Record = { perplexity: PerplexityBlock, pinecone: PineconeBlock, reddit: RedditBlock, + rightbrain: RightBrainBlock, router: RouterBlock, s3: S3Block, serper: SerperBlock, diff --git a/apps/sim/components/icons.tsx b/apps/sim/components/icons.tsx index cb09565439..6443c9fd00 100644 --- a/apps/sim/components/icons.tsx +++ b/apps/sim/components/icons.tsx @@ -1359,13 +1359,24 @@ export function GoogleIcon(props: SVGProps) { export function DiscordIcon(props: SVGProps) { return ( - - - - - - - + + + + + ) } @@ -2452,3 +2463,28 @@ export function ClayIcon(props: SVGProps) { ) } + +export function RightBrainIcon(props: SVGProps) { + return ( + + + + + + + + + ) +} diff --git a/apps/sim/package.json b/apps/sim/package.json index 6af6cc3868..0822418948 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -65,6 +65,7 @@ "@radix-ui/react-toggle": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.6", "@react-email/components": "^0.0.34", + "@rightbrain/sdk": "^0.1.1", "@sentry/nextjs": "^9.15.0", "@vercel/og": "^0.6.5", "@vercel/speed-insights": "^1.2.0", diff --git a/apps/sim/tools/registry.ts b/apps/sim/tools/registry.ts index a4dc45b82a..acbbb7ba1b 100644 --- a/apps/sim/tools/registry.ts +++ b/apps/sim/tools/registry.ts @@ -8,6 +8,12 @@ import { autoblocksPromptManagerTool } from './autoblocks' import { browserUseRunTaskTool } from './browser_use' import { clayPopulateTool } from './clay' import { confluenceRetrieveTool, confluenceUpdateTool } from './confluence' +import { + discordGetMessagesTool, + discordGetServerTool, + discordGetUserTool, + discordSendMessageTool, +} from './discord' import { elevenLabsTtsTool } from './elevenlabs' import { exaAnswerTool, exaFindSimilarLinksTool, exaGetContentsTool, exaSearchTool } from './exa' import { fileParseTool } from './file' @@ -48,6 +54,7 @@ import { pineconeUpsertTextTool, } from './pinecone' import { redditGetCommentsTool, redditGetPostsTool, redditHotPostsTool } from './reddit' +import { runTaskTool } from './rightbrain' import { s3GetObjectTool } from './s3' import { opportunitiesTool as salesforceOpportunities } from './salesforce/opportunities' import { searchTool as serperSearch } from './serper' @@ -64,7 +71,6 @@ import { visionTool } from './vision' import { whatsappSendMessageTool } from './whatsapp' import { xReadTool, xSearchTool, xUserTool, xWriteTool } from './x' import { youtubeSearchTool } from './youtube' -import { discordGetMessagesTool, discordGetServerTool, discordGetUserTool, discordSendMessageTool } from './discord' // Registry of all available tools export const tools: Record = { @@ -121,6 +127,7 @@ export const tools: Record = { reddit_hot_posts: redditHotPostsTool, reddit_get_posts: redditGetPostsTool, reddit_get_comments: redditGetCommentsTool, + rightbrain_run_task: runTaskTool, google_drive_download: driveDownloadTool, google_drive_list: driveListTool, google_drive_upload: driveUploadTool, @@ -157,4 +164,4 @@ export const tools: Record = { discord_get_messages: discordGetMessagesTool, discord_get_server: discordGetServerTool, discord_get_user: discordGetUserTool, -} +} diff --git a/apps/sim/tools/rightbrain/index.ts b/apps/sim/tools/rightbrain/index.ts new file mode 100644 index 0000000000..2b004d79e4 --- /dev/null +++ b/apps/sim/tools/rightbrain/index.ts @@ -0,0 +1,3 @@ +import { runTaskTool } from './run_task' + +export { runTaskTool } diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts new file mode 100644 index 0000000000..c5ad960771 --- /dev/null +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -0,0 +1,97 @@ +import { BrainClient, BrainClientError } from '@rightbrain/sdk' +import { ToolConfig } from '../types' +import { RightBrainRunTaskParams, RightBrainRunTaskResponse } from './types' + +export const isValidUUID = (uuid: string) => + /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i.test(uuid) + +const processUrl = (url: string) => { + const urlInstance = new URL(url) + + const baseUrl = urlInstance.pathname.split('/') + const orgId = baseUrl[4] + const projectId = baseUrl[6] + const taskId = baseUrl[8] + + if (!isValidUUID(orgId) || !isValidUUID(projectId) || !isValidUUID(taskId)) { + throw new Error('Invalid URL format') + } + + return { baseUrl: urlInstance.origin, orgId, projectId, taskId } +} + +export const runTaskTool: ToolConfig = { + id: 'rightbrain_run_task', + name: 'Rightbrain Run Task', + description: 'Run a task on Rightbrain', + version: '1.0.0', + params: { + url: { + type: 'string', + required: true, + requiredForToolCall: true, + description: 'The Rightbrain task URL', + }, + inputs: { + type: 'object', + required: true, + requiredForToolCall: true, + description: 'Task inputs', + }, + apiKey: { + type: 'string', + required: true, + requiredForToolCall: true, + description: 'Rightbrain API key', + }, + }, + directExecution: async (params) => { + const { baseUrl, orgId, projectId, taskId } = processUrl(params.url) + + const client = new BrainClient({ + accessToken: params.apiKey, + baseUrl: `${baseUrl}/api/v1`, + organizationId: orgId, + projectId, + }) + + try { + const response = await client.runTask({ id: taskId, inputs: params.inputs }) + return { output: response, success: true } + } catch (error) { + if (error instanceof BrainClientError) { + if ( + error.response && + typeof error.response === 'object' && + 'detail' in error.response && + typeof error.response.detail === 'object' && + error.response.detail && + 'message' in error.response.detail && + typeof error.response.detail.message === 'string' + ) { + throw new Error(error.response.detail.message) + } + } + + if (error instanceof Error) { + throw new Error(error.message) + } + + throw new Error('failed to run task') + } + }, + request: { + url: (params) => params.url, + method: 'POST', + headers: (params) => ({ + Authorization: `Bearer ${params.apiKey}`, + 'Content-Type': 'application/json', + }), + body: (params) => params.inputs, + }, + transformError: (error) => { + const message = error.response?.detail?.message || error.message || 'Failed to run task' + + return message + }, +} diff --git a/apps/sim/tools/rightbrain/types.ts b/apps/sim/tools/rightbrain/types.ts new file mode 100644 index 0000000000..cc91b0c3bf --- /dev/null +++ b/apps/sim/tools/rightbrain/types.ts @@ -0,0 +1,12 @@ +import { type TaskRun } from '@rightbrain/sdk' +import { ToolResponse } from '../types' + +export interface RightBrainRunTaskParams { + url: string + inputs: object + apiKey: string +} + +export interface RightBrainRunTaskResponse extends ToolResponse { + output: TaskRun +} diff --git a/package-lock.json b/package-lock.json index 52f924c63d..2abee05b91 100644 --- a/package-lock.json +++ b/package-lock.json @@ -91,6 +91,7 @@ "@radix-ui/react-toggle": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.6", "@react-email/components": "^0.0.34", + "@rightbrain/sdk": "^0.1.1", "@sentry/nextjs": "^9.15.0", "@vercel/og": "^0.6.5", "@vercel/speed-insights": "^1.2.0", @@ -8210,6 +8211,11 @@ "node": ">= 10" } }, + "node_modules/@rightbrain/sdk": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@rightbrain/sdk/-/sdk-0.1.1.tgz", + "integrity": "sha512-MVYjSQO+AEG6d4+zpn5WBBB9TzF2qlzz5PqYx4HchDzFxXzIrmwD0OkXQ97VWJVSEiOz0Z2qSWXlso0cpA473Q==" + }, "node_modules/@rollup/plugin-commonjs": { "version": "28.0.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", From 3b6ab50c6c52f791430b730f5632c77b645a331f Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Wed, 14 May 2025 15:23:19 +0500 Subject: [PATCH 02/20] fix: run_task tool request --- apps/sim/components/icons.tsx | 2 +- apps/sim/tools/rightbrain/run_task.ts | 42 ++++----------------------- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/apps/sim/components/icons.tsx b/apps/sim/components/icons.tsx index 6443c9fd00..bcf859fd89 100644 --- a/apps/sim/components/icons.tsx +++ b/apps/sim/components/icons.tsx @@ -2469,7 +2469,7 @@ export function RightBrainIcon(props: SVGProps) { { - const { baseUrl, orgId, projectId, taskId } = processUrl(params.url) - - const client = new BrainClient({ - accessToken: params.apiKey, - baseUrl: `${baseUrl}/api/v1`, - organizationId: orgId, - projectId, - }) - - try { - const response = await client.runTask({ id: taskId, inputs: params.inputs }) - return { output: response, success: true } - } catch (error) { - if (error instanceof BrainClientError) { - if ( - error.response && - typeof error.response === 'object' && - 'detail' in error.response && - typeof error.response.detail === 'object' && - error.response.detail && - 'message' in error.response.detail && - typeof error.response.detail.message === 'string' - ) { - throw new Error(error.response.detail.message) - } - } - - if (error instanceof Error) { - throw new Error(error.message) - } - - throw new Error('failed to run task') - } - }, request: { url: (params) => params.url, method: 'POST', @@ -87,10 +52,13 @@ export const runTaskTool: ToolConfig params.inputs, + body: (params) => ({ + task_input: params.inputs, + }), }, transformError: (error) => { - const message = error.response?.detail?.message || error.message || 'Failed to run task' + const message = + error.response?.detail?.message || error.message || error.error || 'Failed to run task' return message }, From 47f18b0a23f269f963c75aa5e63503bc184d7b2f Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Wed, 14 May 2025 15:35:51 +0500 Subject: [PATCH 03/20] feat: validate task url --- apps/sim/tools/rightbrain/run_task.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index 19450a20c0..596bca8859 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -1,8 +1,7 @@ -import { BrainClient, BrainClientError } from '@rightbrain/sdk' import { ToolConfig } from '../types' import { RightBrainRunTaskParams, RightBrainRunTaskResponse } from './types' -export const isValidUUID = (uuid: string) => +const isValidUUID = (uuid: string) => /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i.test(uuid) const processUrl = (url: string) => { @@ -46,7 +45,10 @@ export const runTaskTool: ToolConfig params.url, + url: (params) => { + processUrl(params.url) + return params.url + }, method: 'POST', headers: (params) => ({ Authorization: `Bearer ${params.apiKey}`, From 43cca8bcc16e699d0e72716e170c4b1382c80d2c Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Wed, 14 May 2025 16:34:39 +0500 Subject: [PATCH 04/20] fix: rightbrain category --- apps/sim/blocks/blocks/rightbrain.ts | 2 +- apps/sim/tools/rightbrain/run_task.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/sim/blocks/blocks/rightbrain.ts b/apps/sim/blocks/blocks/rightbrain.ts index 00d432c2ab..bbe54c1d57 100644 --- a/apps/sim/blocks/blocks/rightbrain.ts +++ b/apps/sim/blocks/blocks/rightbrain.ts @@ -9,7 +9,7 @@ export const RightBrainBlock: BlockConfig = { longDescription: 'Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs.', docsLink: 'https://docs.rightbrain.ai/intro', - category: 'blocks', + category: 'tools', bgColor: '#E0E0E0', icon: RightBrainIcon, subBlocks: [ diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index 596bca8859..b250723118 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -34,7 +34,6 @@ export const runTaskTool: ToolConfig Date: Wed, 14 May 2025 16:35:20 +0500 Subject: [PATCH 05/20] fix: run_task tool body --- apps/sim/tools/rightbrain/run_task.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index b250723118..9e46ceac3e 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -53,9 +53,7 @@ export const runTaskTool: ToolConfig ({ - task_input: params.inputs, - }), + body: (params) => params.inputs, }, transformError: (error) => { const message = From c2c1f51826b1551f08e49466d009f42779a69872 Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Wed, 14 May 2025 17:23:54 +0500 Subject: [PATCH 06/20] fix: run_task tool description --- apps/sim/tools/rightbrain/run_task.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index 9e46ceac3e..b52c29ddae 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -22,7 +22,7 @@ const processUrl = (url: string) => { export const runTaskTool: ToolConfig = { id: 'rightbrain_run_task', name: 'Rightbrain Run Task', - description: 'Run a task on Rightbrain', + description: 'Run a Rightbrain AI task', version: '1.0.0', params: { url: { From f810f666bf9397e92e21daad64724d7de2dac46e Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Wed, 14 May 2025 17:26:26 +0500 Subject: [PATCH 07/20] fix: run task block description --- apps/sim/blocks/blocks/rightbrain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sim/blocks/blocks/rightbrain.ts b/apps/sim/blocks/blocks/rightbrain.ts index bbe54c1d57..c2757a84ba 100644 --- a/apps/sim/blocks/blocks/rightbrain.ts +++ b/apps/sim/blocks/blocks/rightbrain.ts @@ -5,7 +5,7 @@ import { BlockConfig } from '../types' export const RightBrainBlock: BlockConfig = { type: 'rightbrain', name: 'Rightbrain', - description: 'Run RB task', + description: 'Run a Rightbrain AI task', longDescription: 'Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs.', docsLink: 'https://docs.rightbrain.ai/intro', From a4d04a0fead89e65fa559f69c988e013e2eb3513 Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Wed, 14 May 2025 18:20:08 +0500 Subject: [PATCH 08/20] feat: rightbrain integration docs --- apps/docs/content/docs/tools/rightbrain.mdx | 84 +++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 apps/docs/content/docs/tools/rightbrain.mdx diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx new file mode 100644 index 0000000000..22ac297540 --- /dev/null +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -0,0 +1,84 @@ +--- +title: Rightbrain +description: Run a Rightbrain AI task +--- + +import { BlockInfoCard } from '@/components/ui/block-info-card' + + + + + + + + +`} +/> + +{/* MANUAL-CONTENT-START:intro */} +[Rightbrain](https://rightbrain.ai) lets you reliably deploy LLMs +for specific tasks across any app or workflow +by turning prompts into production-ready APIs. + +In Sim Studio, the Rightbrain integration enables your agents to run a Rightbrain AI task. + +## Tools + +### `rightbrain_run_task` + +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ---------------------- | +| `url` | string | Yes | The task URL | +| `inputs` | object | Yes | The task inputs | +| `apiKey` | string | Yes | The Rightbrain api key | + +#### Output + +| Parameter | Type | +| ------------------------ | ------- | +| `charged_credits` | string | +| `created` | string | +| `id` | string | +| `input_processor_timing` | number | +| `input_tokens` | number | +| `llm_call_timing` | number | +| `output_tokens` | number | +| `response` | json | +| `run_data` | json | +| `task_id` | string | +| `task_revision_id` | string | +| `is_error` | boolean | + +## Block Configuration + +### Input + +No configuration parameters required. + +### Outputs + +| Output | Type | Description | +| -------------------------- | ------- | ---------------------- | +| `response` | object | Output from response | +| ↳ `charged_credits` | string | charged credits | +| ↳ `created` | string | created | +| ↳ `id` | string | task run id | +| ↳ `input_processor_timing` | number | input processor timing | +| ↳ `input_tokens` | number | input tokens | +| ↳ `llm_call_timing` | number | llm call timing | +| ↳ `output_tokens` | number | output tokens | +| ↳ `response` | json | response | +| ↳ `run_data` | json | run data | +| ↳ `task_id` | string | task id | +| ↳ `task_revision_id` | string | task revision id | +| ↳ `is_error` | boolean | is error | + +## Notes + +- Category: `tools` +- Type: `rightbrain` From 1ce804d01071fe4c81a75df5a5f092d09c16a9db Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Thu, 15 May 2025 18:48:37 +0500 Subject: [PATCH 09/20] fix: rightbrain docs --- apps/docs/content/docs/tools/discord.mdx | 27 +++-- apps/docs/content/docs/tools/meta.json | 1 + apps/docs/content/docs/tools/rightbrain.mdx | 117 ++++++++++++-------- apps/sim/tools/rightbrain/run_task.ts | 21 ++++ 4 files changed, 111 insertions(+), 55 deletions(-) diff --git a/apps/docs/content/docs/tools/discord.mdx b/apps/docs/content/docs/tools/discord.mdx index bbce58594c..4104533ee4 100644 --- a/apps/docs/content/docs/tools/discord.mdx +++ b/apps/docs/content/docs/tools/discord.mdx @@ -5,17 +5,28 @@ description: Interact with Discord import { BlockInfoCard } from '@/components/ui/block-info-card' - - - - - - -`} + iconSvg={` + + + + `} /> {/* MANUAL-CONTENT-START:intro */} diff --git a/apps/docs/content/docs/tools/meta.json b/apps/docs/content/docs/tools/meta.json index f331ca1a84..cbfb47d4e2 100644 --- a/apps/docs/content/docs/tools/meta.json +++ b/apps/docs/content/docs/tools/meta.json @@ -28,6 +28,7 @@ "perplexity", "pinecone", "reddit", + "rightbrain", "s3", "serper", "slack", diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx index 22ac297540..ecd149735c 100644 --- a/apps/docs/content/docs/tools/rightbrain.mdx +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -9,74 +9,97 @@ import { BlockInfoCard } from '@/components/ui/block-info-card' type="rightbrain" color="#E0E0E0" icon={true} - iconSvg={` - - - - - - -`} + iconSvg={` + + + + + + + `} /> {/* MANUAL-CONTENT-START:intro */} -[Rightbrain](https://rightbrain.ai) lets you reliably deploy LLMs -for specific tasks across any app or workflow -by turning prompts into production-ready APIs. +[Rightbrain](https://rightbrain.ai) lets you reliably deploy LLMs for specific tasks across any app +or workflow by turning prompts into production-ready APIs. In Sim Studio, the Rightbrain integration enables your agents to run a Rightbrain AI task. +{/* MANUAL-CONTENT-END */} + +## Usage Instructions + +Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs. ## Tools ### `rightbrain_run_task` -| Parameter | Type | Required | Description | -| --------- | ------ | -------- | ---------------------- | -| `url` | string | Yes | The task URL | -| `inputs` | object | Yes | The task inputs | -| `apiKey` | string | Yes | The Rightbrain api key | +Run a Rightbrain AI task + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ----------------------- | +| `url` | string | Yes | The Rightbrain task URL | +| `inputs` | object | Yes | Task inputs | +| `apiKey` | string | Yes | Rightbrain API key | #### Output -| Parameter | Type | -| ------------------------ | ------- | -| `charged_credits` | string | -| `created` | string | -| `id` | string | -| `input_processor_timing` | number | -| `input_tokens` | number | -| `llm_call_timing` | number | -| `output_tokens` | number | -| `response` | json | -| `run_data` | json | -| `task_id` | string | -| `task_revision_id` | string | -| `is_error` | boolean | +| Parameter | Type | +| ------------------------ | ------ | +| `charged_credits` | string | +| `created` | string | +| `id` | string | +| `input_processor_timing` | string | +| `input_tokens` | string | +| `llm_call_timing` | string | +| `output_tokens` | string | +| `response` | string | +| `run_data` | string | +| `task_id` | string | +| `task_revision_id` | string | +| `total_tokens` | string | +| `is_error` | string | ## Block Configuration ### Input -No configuration parameters required. +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | -------------------- | +| `url` | string | Yes | Task URL - Enter URL | ### Outputs -| Output | Type | Description | -| -------------------------- | ------- | ---------------------- | -| `response` | object | Output from response | -| ↳ `charged_credits` | string | charged credits | -| ↳ `created` | string | created | -| ↳ `id` | string | task run id | -| ↳ `input_processor_timing` | number | input processor timing | -| ↳ `input_tokens` | number | input tokens | -| ↳ `llm_call_timing` | number | llm call timing | -| ↳ `output_tokens` | number | output tokens | -| ↳ `response` | json | response | -| ↳ `run_data` | json | run data | -| ↳ `task_id` | string | task id | -| ↳ `task_revision_id` | string | task revision id | -| ↳ `is_error` | boolean | is error | +| Output | Type | Description | +| -------------------------- | ------ | -------------------------------------- | +| `response` | object | Output from response | +| ↳ `charged_credits` | any | charged_credits of the response | +| ↳ `created` | string | created of the response | +| ↳ `id` | string | id of the response | +| ↳ `input_processor_timing` | any | input_processor_timing of the response | +| ↳ `input_tokens` | number | input_tokens of the response | +| ↳ `llm_call_timing` | any | llm_call_timing of the response | +| ↳ `output_tokens` | number | output_tokens of the response | +| ↳ `response` | json | response of the response | +| ↳ `run_data` | json | run_data of the response | +| ↳ `task_id` | string | task_id of the response | +| ↳ `task_revision_id` | string | task_revision_id of the response | +| ↳ `total_tokens` | number | total_tokens of the response | +| ↳ `is_error` | any | is_error of the response | ## Notes diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index b52c29ddae..a39c81dc53 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -61,4 +61,25 @@ export const runTaskTool: ToolConfig { + const data = await response.json() + return { + success: true, + output: { + charged_credits: data.charged_credits, + created: data.created, + id: data.id, + input_processor_timing: data.input_processor_timing, + input_tokens: data.input_tokens, + llm_call_timing: data.llm_call_timing, + output_tokens: data.output_tokens, + response: data.response, + run_data: data.run_data, + task_id: data.task_id, + task_revision_id: data.task_revision_id, + total_tokens: data.total_tokens, + is_error: data.is_error, + }, + } + }, } From 6d024394f822abfa8768fbcffc528bd1b9f92501 Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Thu, 15 May 2025 19:07:28 +0500 Subject: [PATCH 10/20] fix: rightbrain_run_task throw error if task run not successful --- apps/sim/tools/rightbrain/run_task.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index a39c81dc53..dca6748895 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -63,6 +63,11 @@ export const runTaskTool: ToolConfig { const data = await response.json() + + if (data?.is_error) { + throw new Error(data.response?.detail?.message || 'Failed to run task') + } + return { success: true, output: { From 5bd4cda151dfa531bce0bfe82f036cedfd01b5c6 Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Thu, 15 May 2025 19:32:14 +0500 Subject: [PATCH 11/20] fix: rightbrain icon --- apps/docs/content/docs/tools/rightbrain.mdx | 433 +++++++++++++++++++- apps/sim/components/icons.tsx | 433 +++++++++++++++++++- 2 files changed, 830 insertions(+), 36 deletions(-) diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx index ecd149735c..230685f94d 100644 --- a/apps/docs/content/docs/tools/rightbrain.mdx +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -9,25 +9,422 @@ import { BlockInfoCard } from '@/components/ui/block-info-card' type="rightbrain" color="#E0E0E0" icon={true} - iconSvg={` - - - - - + iconSvg={` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + `} /> diff --git a/apps/sim/components/icons.tsx b/apps/sim/components/icons.tsx index bcf859fd89..4772ac0e77 100644 --- a/apps/sim/components/icons.tsx +++ b/apps/sim/components/icons.tsx @@ -2466,25 +2466,422 @@ export function ClayIcon(props: SVGProps) { export function RightBrainIcon(props: SVGProps) { return ( - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) } From 607aaecd510f2729a0c5396f4a46d9a0408c83c6 Mon Sep 17 00:00:00 2001 From: Danish Sajjad <92915951+Danishsjjd@users.noreply.github.com> Date: Thu, 15 May 2025 19:34:35 +0500 Subject: [PATCH 12/20] chore: update rightbrain sdk package --- apps/sim/package.json | 2 +- package-lock.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/sim/package.json b/apps/sim/package.json index 0822418948..ccd838b13a 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -65,7 +65,7 @@ "@radix-ui/react-toggle": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.6", "@react-email/components": "^0.0.34", - "@rightbrain/sdk": "^0.1.1", + "@rightbrain/sdk": "^0.1.2", "@sentry/nextjs": "^9.15.0", "@vercel/og": "^0.6.5", "@vercel/speed-insights": "^1.2.0", diff --git a/package-lock.json b/package-lock.json index 2abee05b91..fd4b6a3a06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -91,7 +91,7 @@ "@radix-ui/react-toggle": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.6", "@react-email/components": "^0.0.34", - "@rightbrain/sdk": "^0.1.1", + "@rightbrain/sdk": "^0.1.2", "@sentry/nextjs": "^9.15.0", "@vercel/og": "^0.6.5", "@vercel/speed-insights": "^1.2.0", @@ -8212,9 +8212,9 @@ } }, "node_modules/@rightbrain/sdk": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rightbrain/sdk/-/sdk-0.1.1.tgz", - "integrity": "sha512-MVYjSQO+AEG6d4+zpn5WBBB9TzF2qlzz5PqYx4HchDzFxXzIrmwD0OkXQ97VWJVSEiOz0Z2qSWXlso0cpA473Q==" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@rightbrain/sdk/-/sdk-0.1.2.tgz", + "integrity": "sha512-kBcfVMMvB6xCGEdnH8CsRkbq7xAlV2GC2zyhkJaeOWIJnLNzelyC8vFnuDIP4UFi4mPYYFjFdjpCBJ5M6KONeA==" }, "node_modules/@rollup/plugin-commonjs": { "version": "28.0.1", From c83f6c91d6469564a66c1d75530a5fafcf9942dd Mon Sep 17 00:00:00 2001 From: Pete Cheyne Date: Thu, 15 May 2025 15:40:31 +0000 Subject: [PATCH 13/20] docs: get them production ready --- apps/docs/content/docs/tools/rightbrain.mdx | 43 +++++++++++++++------ apps/sim/blocks/blocks/rightbrain.ts | 4 +- apps/sim/tools/rightbrain/run_task.ts | 9 +++-- 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx index 230685f94d..9c9d25ee78 100644 --- a/apps/docs/content/docs/tools/rightbrain.mdx +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -429,29 +429,48 @@ import { BlockInfoCard } from '@/components/ui/block-info-card' /> {/* MANUAL-CONTENT-START:intro */} -[Rightbrain](https://rightbrain.ai) lets you reliably deploy LLMs for specific tasks across any app -or workflow by turning prompts into production-ready APIs. +[Rightbrain](https://rightbrain.ai) helps you ship AI features faster by turning prompts and simple instructions into production-ready, scalable APIs. It allows you to build LLM prototypes in minutes, continuously optimize performance, and deploy them for specific tasks across any app or workflow without extended development cycles. -In Sim Studio, the Rightbrain integration enables your agents to run a Rightbrain AI task. +In Sim Studio, the Rightbrain integration enables your agents to seamlessly run these Rightbrain AI tasks as part of their workflows. {/* MANUAL-CONTENT-END */} ## Usage Instructions +{/* MANUAL-CONTENT-START:usage */} +To use the Rightbrain tool in Sim Studio: + +### Rightbrain + +- **Fetch your API Key**: Obtain your API key from your [Rightbrain dashboard](https://app.rightbrain.ai/preferences?tab=api-clients). +- **Get Task Details**: Navigate to the specific Rightbrain Task you want to run. From the Task Run view, click the **Integrate** button. + - **Copy Task Run URL**: Click the **Task Run URL** to copy it. + - **Copy Example Input JSON**: Copy the example `task_input` structure. + +### Sim Studio + +- **Select the Rightbrain Tool**: Drag into the Sim Studio canvas. +- Paste the **Task Run URL** into the "Task URL" field in the Rightbrain tool. +- Paste the example **Task Inputs** JSON object in the "Task Inputs" code field. This is where you will want to dynamically inject Sim Studio variables from previous blocks/tools in your workflow. +- Paste your **Rightbrain API Key** into the "API Key" field. + +Sim Studio will then be able to execute your Rightbrain task, and the results will be available via the tool's output `response` object. +{/* MANUAL-CONTENT-END */} + Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs. ## Tools ### `rightbrain_run_task` -Run a Rightbrain AI task +Run a Rightbrain AI task. Tasks are created in the Rightbrain app and can be chained together or connected to other apps with Sim Studio to dynamically process inputs, outputs or a combination of both. A task response can be found in the `response.response` object. #### Input -| Parameter | Type | Required | Description | -| --------- | ------ | -------- | ----------------------- | -| `url` | string | Yes | The Rightbrain task URL | -| `inputs` | object | Yes | Task inputs | -| `apiKey` | string | Yes | Rightbrain API key | +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------- | +| `url` | string | Yes | Rightbrain task URL | +| `inputs` | object | Yes | The task input_data JSON object | +| `apiKey` | string | Yes | Your Rightbrain API key | #### Output @@ -475,9 +494,9 @@ Run a Rightbrain AI task ### Input -| Parameter | Type | Required | Description | -| --------- | ------ | -------- | -------------------- | -| `url` | string | Yes | Task URL - Enter URL | +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------ | +| `url` | string | Yes | Task URL - Rightbrain task URL | ### Outputs diff --git a/apps/sim/blocks/blocks/rightbrain.ts b/apps/sim/blocks/blocks/rightbrain.ts index c2757a84ba..f97ca23883 100644 --- a/apps/sim/blocks/blocks/rightbrain.ts +++ b/apps/sim/blocks/blocks/rightbrain.ts @@ -18,14 +18,14 @@ export const RightBrainBlock: BlockConfig = { title: 'Task URL', type: 'short-input', layout: 'full', - placeholder: 'Enter URL', + placeholder: 'Rightbrain task URL', }, { id: 'inputs', title: 'Task inputs', type: 'code', layout: 'full', - placeholder: 'Enter inputs JSON...', + placeholder: 'The task input_data JSON object', }, { id: 'apiKey', diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index dca6748895..01db3b194d 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -22,25 +22,26 @@ const processUrl = (url: string) => { export const runTaskTool: ToolConfig = { id: 'rightbrain_run_task', name: 'Rightbrain Run Task', - description: 'Run a Rightbrain AI task', + description: + 'Run a Rightbrain AI task. Tasks are created in the Rightbrain app and can be chained together or connected to other apps with Sim Studio to dynamically process inputs, outputs or a combination of both. A task response can be found in the `response.response` object.', version: '1.0.0', params: { url: { type: 'string', required: true, requiredForToolCall: true, - description: 'The Rightbrain task URL', + description: 'Rightbrain task URL', }, inputs: { type: 'object', required: true, - description: 'Task inputs', + description: 'The task input_data JSON object', }, apiKey: { type: 'string', required: true, requiredForToolCall: true, - description: 'Rightbrain API key', + description: 'Your Rightbrain API key', }, }, request: { From cdce2809b627801f3b4e8ee59432acd9611aa3a8 Mon Sep 17 00:00:00 2001 From: Pete Cheyne Date: Thu, 15 May 2025 15:46:37 +0000 Subject: [PATCH 14/20] docs: fix json object attribute --- apps/docs/content/docs/tools/rightbrain.mdx | 10 +++++----- apps/sim/blocks/blocks/rightbrain.ts | 2 +- apps/sim/tools/rightbrain/run_task.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx index 9c9d25ee78..d154e73d48 100644 --- a/apps/docs/content/docs/tools/rightbrain.mdx +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -466,11 +466,11 @@ Run a Rightbrain AI task. Tasks are created in the Rightbrain app and can be cha #### Input -| Parameter | Type | Required | Description | -| --------- | ------ | -------- | ------------------------------- | -| `url` | string | Yes | Rightbrain task URL | -| `inputs` | object | Yes | The task input_data JSON object | -| `apiKey` | string | Yes | Your Rightbrain API key | +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | -------------------------- | +| `url` | string | Yes | Rightbrain task URL | +| `inputs` | object | Yes | The task_input JSON object | +| `apiKey` | string | Yes | Your Rightbrain API key | #### Output diff --git a/apps/sim/blocks/blocks/rightbrain.ts b/apps/sim/blocks/blocks/rightbrain.ts index f97ca23883..5f4a3236ba 100644 --- a/apps/sim/blocks/blocks/rightbrain.ts +++ b/apps/sim/blocks/blocks/rightbrain.ts @@ -25,7 +25,7 @@ export const RightBrainBlock: BlockConfig = { title: 'Task inputs', type: 'code', layout: 'full', - placeholder: 'The task input_data JSON object', + placeholder: 'The task_input JSON object', }, { id: 'apiKey', diff --git a/apps/sim/tools/rightbrain/run_task.ts b/apps/sim/tools/rightbrain/run_task.ts index 01db3b194d..b0bfc9a272 100644 --- a/apps/sim/tools/rightbrain/run_task.ts +++ b/apps/sim/tools/rightbrain/run_task.ts @@ -35,7 +35,7 @@ export const runTaskTool: ToolConfig Date: Thu, 15 May 2025 16:50:55 +0100 Subject: [PATCH 15/20] revert discord docs --- apps/docs/content/docs/tools/discord.mdx | 27 +++++++----------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/apps/docs/content/docs/tools/discord.mdx b/apps/docs/content/docs/tools/discord.mdx index 4104533ee4..bbce58594c 100644 --- a/apps/docs/content/docs/tools/discord.mdx +++ b/apps/docs/content/docs/tools/discord.mdx @@ -5,28 +5,17 @@ description: Interact with Discord import { BlockInfoCard } from '@/components/ui/block-info-card' - - - - - `} + iconSvg={` + + + + + +`} /> {/* MANUAL-CONTENT-START:intro */} From ded8a0eac00fbe8f29c17049f2b52a772b06dfb9 Mon Sep 17 00:00:00 2001 From: Pete Cheyne Date: Thu, 15 May 2025 16:53:14 +0100 Subject: [PATCH 16/20] fix: remove discord include --- apps/sim/tools/registry.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/sim/tools/registry.ts b/apps/sim/tools/registry.ts index acbbb7ba1b..0ba4ce1db5 100644 --- a/apps/sim/tools/registry.ts +++ b/apps/sim/tools/registry.ts @@ -8,12 +8,6 @@ import { autoblocksPromptManagerTool } from './autoblocks' import { browserUseRunTaskTool } from './browser_use' import { clayPopulateTool } from './clay' import { confluenceRetrieveTool, confluenceUpdateTool } from './confluence' -import { - discordGetMessagesTool, - discordGetServerTool, - discordGetUserTool, - discordSendMessageTool, -} from './discord' import { elevenLabsTtsTool } from './elevenlabs' import { exaAnswerTool, exaFindSimilarLinksTool, exaGetContentsTool, exaSearchTool } from './exa' import { fileParseTool } from './file' From 63b5486663e3309cba3254e629d208835dc43381 Mon Sep 17 00:00:00 2001 From: Pete Cheyne Date: Thu, 15 May 2025 16:55:30 +0100 Subject: [PATCH 17/20] Revert "fix: remove discord include" This reverts commit ded8a0eac00fbe8f29c17049f2b52a772b06dfb9. --- apps/sim/tools/registry.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/sim/tools/registry.ts b/apps/sim/tools/registry.ts index 0ba4ce1db5..acbbb7ba1b 100644 --- a/apps/sim/tools/registry.ts +++ b/apps/sim/tools/registry.ts @@ -8,6 +8,12 @@ import { autoblocksPromptManagerTool } from './autoblocks' import { browserUseRunTaskTool } from './browser_use' import { clayPopulateTool } from './clay' import { confluenceRetrieveTool, confluenceUpdateTool } from './confluence' +import { + discordGetMessagesTool, + discordGetServerTool, + discordGetUserTool, + discordSendMessageTool, +} from './discord' import { elevenLabsTtsTool } from './elevenlabs' import { exaAnswerTool, exaFindSimilarLinksTool, exaGetContentsTool, exaSearchTool } from './exa' import { fileParseTool } from './file' From d1de2420a8bcb3795f6a7dc486a008e92950341a Mon Sep 17 00:00:00 2001 From: Pete Cheyne Date: Thu, 15 May 2025 17:46:14 +0100 Subject: [PATCH 18/20] simplify docs --- apps/docs/content/docs/tools/rightbrain.mdx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx index d154e73d48..ed0367c480 100644 --- a/apps/docs/content/docs/tools/rightbrain.mdx +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -443,17 +443,18 @@ To use the Rightbrain tool in Sim Studio: - **Fetch your API Key**: Obtain your API key from your [Rightbrain dashboard](https://app.rightbrain.ai/preferences?tab=api-clients). - **Get Task Details**: Navigate to the specific Rightbrain Task you want to run. From the Task Run view, click the **Integrate** button. - - **Copy Task Run URL**: Click the **Task Run URL** to copy it. - - **Copy Example Input JSON**: Copy the example `task_input` structure. + - **Fetch API Key**: Create or choose an existing API key and copy it. + - **Task Run URL**: Click the **Task Run URL** button from the Quick Copy section to copy it. + - **Task Input JSON**: Copy the example `task_input` structure. ### Sim Studio -- **Select the Rightbrain Tool**: Drag into the Sim Studio canvas. -- Paste the **Task Run URL** into the "Task URL" field in the Rightbrain tool. +- **Rightbrain Tool**: Drag the Rightbrain tool into the Sim Studio canvas. +- Paste the **Task Run URL** into the "Task URL" input field. - Paste the example **Task Inputs** JSON object in the "Task Inputs" code field. This is where you will want to dynamically inject Sim Studio variables from previous blocks/tools in your workflow. -- Paste your **Rightbrain API Key** into the "API Key" field. +- Paste your **Rightbrain API Key** into the "API Key" input field. -Sim Studio will then be able to execute your Rightbrain task, and the results will be available via the tool's output `response` object. +Sim Studio will then be able to execute your Rightbrain task, and the results will be available via the tool's `response` object. {/* MANUAL-CONTENT-END */} Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs. From 6b00b233515a466f9467bd8759ec6da6d55b2bc7 Mon Sep 17 00:00:00 2001 From: Pete Cheyne Date: Thu, 15 May 2025 18:37:01 +0100 Subject: [PATCH 19/20] final update to docs. --- apps/docs/content/docs/tools/rightbrain.mdx | 17 +++++++++++++---- apps/sim/blocks/blocks/rightbrain.ts | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx index ed0367c480..420adf32e6 100644 --- a/apps/docs/content/docs/tools/rightbrain.mdx +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -429,10 +429,19 @@ import { BlockInfoCard } from '@/components/ui/block-info-card' /> {/* MANUAL-CONTENT-START:intro */} -[Rightbrain](https://rightbrain.ai) helps you ship AI features faster by turning prompts and simple instructions into production-ready, scalable APIs. It allows you to build LLM prototypes in minutes, continuously optimize performance, and deploy them for specific tasks across any app or workflow without extended development cycles. +[Rightbrain](https://rightbrain.ai) helps you ship AI features faster by turning prompts and simple instructions into production-ready, scalable APIs. -In Sim Studio, the Rightbrain integration enables your agents to seamlessly run these Rightbrain AI tasks as part of their workflows. -{/* MANUAL-CONTENT-END */} +In Sim Studio, the Rightbrain tool allows you to run Rightbrain tasks from within Sim Studio and connect them to other apps. + +### Why use Rightbrain? + +- **No code required**: Turn natural language instructions into production-ready APIs in minutes. +- **Instant access to LLMs**: Use the latest LLMs and models without any setup. +- **No BYOK**: No requirement to setup and manage your own LLM accounts or infrastructure. +- **Scalable**: Deploy across any app or workflow without extended development cycles. +- **Centralised**: Manage all your AI features in one place with built-in tools for testing, monitoring, and updating. +- **Optimised**: Continuously optimise your tasks and roll iterative improvements with no code changes required. + {/* MANUAL-CONTENT-END */} ## Usage Instructions @@ -457,7 +466,7 @@ To use the Rightbrain tool in Sim Studio: Sim Studio will then be able to execute your Rightbrain task, and the results will be available via the tool's `response` object. {/* MANUAL-CONTENT-END */} -Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs. +Rightbrain allows you to build LLM features in minutes and instantly deploy them for specific tasks across any app or workflow without extended development cycles. ## Tools diff --git a/apps/sim/blocks/blocks/rightbrain.ts b/apps/sim/blocks/blocks/rightbrain.ts index 5f4a3236ba..486e23d297 100644 --- a/apps/sim/blocks/blocks/rightbrain.ts +++ b/apps/sim/blocks/blocks/rightbrain.ts @@ -7,7 +7,7 @@ export const RightBrainBlock: BlockConfig = { name: 'Rightbrain', description: 'Run a Rightbrain AI task', longDescription: - 'Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs.', + 'Rightbrain allows you to build LLM features in minutes and instantly deploy them for specific tasks across any app or workflow without extended development cycles.', docsLink: 'https://docs.rightbrain.ai/intro', category: 'tools', bgColor: '#E0E0E0', From c3ed3d37631cd4a2b93e7a8b7b1a79c9dc680d48 Mon Sep 17 00:00:00 2001 From: Pete Cheyne Date: Thu, 15 May 2025 19:21:38 +0000 Subject: [PATCH 20/20] docs: adds final rightbrain docs --- apps/docs/content/docs/tools/rightbrain.mdx | 56 ++++++++++++--------- apps/sim/blocks/blocks/rightbrain.ts | 2 +- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/apps/docs/content/docs/tools/rightbrain.mdx b/apps/docs/content/docs/tools/rightbrain.mdx index 420adf32e6..62f8aff0a5 100644 --- a/apps/docs/content/docs/tools/rightbrain.mdx +++ b/apps/docs/content/docs/tools/rightbrain.mdx @@ -429,44 +429,52 @@ import { BlockInfoCard } from '@/components/ui/block-info-card' /> {/* MANUAL-CONTENT-START:intro */} -[Rightbrain](https://rightbrain.ai) helps you ship AI features faster by turning prompts and simple instructions into production-ready, scalable APIs. - -In Sim Studio, the Rightbrain tool allows you to run Rightbrain tasks from within Sim Studio and connect them to other apps. +[Rightbrain](https://rightbrain.ai) is an AI deployment platform that transforms your natural language instructions into production-ready APIs within minutes. With Rightbrain + Sim Studio, you can seamlessly integrate powerful AI capabilities into your workflows without writing a single line of code. ### Why use Rightbrain? -- **No code required**: Turn natural language instructions into production-ready APIs in minutes. -- **Instant access to LLMs**: Use the latest LLMs and models without any setup. -- **No BYOK**: No requirement to setup and manage your own LLM accounts or infrastructure. -- **Scalable**: Deploy across any app or workflow without extended development cycles. -- **Centralised**: Manage all your AI features in one place with built-in tools for testing, monitoring, and updating. -- **Optimised**: Continuously optimise your tasks and roll iterative improvements with no code changes required. +- **Zero-Code Deployment**: Turn natural language instructions into production-ready APIs in minutes - no coding required. +- **Instant Model Access**: Utilize the latest LLMs and AI models without any setup, API keys, or infrastructure management. +- **No BYOK Required**: Eliminate the complexity of managing your own LLM accounts, tokens, or infrastructure. +- **Enterprise-Ready Scalability**: Deploy AI features across any application or workflow with automatic scaling to handle varying loads. +- **Comprehensive Management Hub**: Control all your AI features from one central dashboard with powerful tools for testing, monitoring, analytics, and version management. +- **Continuous Optimisation**: Improve your AI tasks over time without requiring code changes in your applications. +- **Cost-Effective**: Pay only for what you use with a free credits on sign up, transparent pricing, and no minimum commitments. {/* MANUAL-CONTENT-END */} ## Usage Instructions {/* MANUAL-CONTENT-START:usage */} -To use the Rightbrain tool in Sim Studio: -### Rightbrain +### Step 1: Set Up Your Rightbrain Task + +1. **Create a Rightbrain Account**: Sign up at [Rightbrain.ai](https://rightbrain.ai) if you don't already have an account. Accounts are free and include a 30-day trial with free credits to get started. +2. **Create Your Task**: Build your AI task using natural language instructions in the Rightbrain platform. +3. **Test and Refine**: Use Rightbrain's testing tools to validate your task performs as expected. -- **Fetch your API Key**: Obtain your API key from your [Rightbrain dashboard](https://app.rightbrain.ai/preferences?tab=api-clients). -- **Get Task Details**: Navigate to the specific Rightbrain Task you want to run. From the Task Run view, click the **Integrate** button. - - **Fetch API Key**: Create or choose an existing API key and copy it. - - **Task Run URL**: Click the **Task Run URL** button from the Quick Copy section to copy it. - - **Task Input JSON**: Copy the example `task_input` structure. +### Step 2: Get Your Task Details for Sim Studio -### Sim Studio +1. **Access Task Integration**: + - Open the specific Rightbrain Task you want to run + - Click the **Integrate** button from the Task Run view + - From here you can: + - Create or choose an existing API key and copy it + - Copy the **Task Run URL** from the Quick Copy section + - Copy the example **Task Input JSON** structure -- **Rightbrain Tool**: Drag the Rightbrain tool into the Sim Studio canvas. -- Paste the **Task Run URL** into the "Task URL" input field. -- Paste the example **Task Inputs** JSON object in the "Task Inputs" code field. This is where you will want to dynamically inject Sim Studio variables from previous blocks/tools in your workflow. -- Paste your **Rightbrain API Key** into the "API Key" input field. +### Step 3: Configure in Sim Studio -Sim Studio will then be able to execute your Rightbrain task, and the results will be available via the tool's `response` object. -{/* MANUAL-CONTENT-END */} +1. **Add the Rightbrain Tool**: Drag the Rightbrain tool onto your Sim Studio canvas +2. **Configure the Tool**: + - Paste the **Task Run URL** into the "Task URL" field + - Paste your **Task Inputs JSON** object into the "Task Inputs" code field + - Paste your **Rightbrain API Key** into the "API Key" field +3. **Link with Other Tools**: Connect the Rightbrain block to other tools in your workflow + - Use variables from previous blocks as dynamic inputs + - Pass Rightbrain outputs to subsequent blocks in your workflow + {/* MANUAL-CONTENT-END */} -Rightbrain allows you to build LLM features in minutes and instantly deploy them for specific tasks across any app or workflow without extended development cycles. +Your Rightbrain task will execute as part of your Sim Studio workflow, with results available via the `response` object. ## Tools diff --git a/apps/sim/blocks/blocks/rightbrain.ts b/apps/sim/blocks/blocks/rightbrain.ts index 486e23d297..d3fb9337ea 100644 --- a/apps/sim/blocks/blocks/rightbrain.ts +++ b/apps/sim/blocks/blocks/rightbrain.ts @@ -7,7 +7,7 @@ export const RightBrainBlock: BlockConfig = { name: 'Rightbrain', description: 'Run a Rightbrain AI task', longDescription: - 'Rightbrain allows you to build LLM features in minutes and instantly deploy them for specific tasks across any app or workflow without extended development cycles.', + 'Your Rightbrain task will execute as part of your Sim Studio workflow, with results available via the `response` object.', docsLink: 'https://docs.rightbrain.ai/intro', category: 'tools', bgColor: '#E0E0E0',