-
Notifications
You must be signed in to change notification settings - Fork 5.5k
brainbase labs #18759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
brainbase labs #18759
Changes from all commits
864b1d7
93f9d95
0f2c03b
a2334e3
5974fab
2e84ee6
f50626e
db31dbe
5d3fa03
2e27e83
09b7ada
c8da5c4
f8d48ee
079d52a
856d143
e45d292
bcf685e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Brainbase | ||
|
|
||
| Brainbase is a platform for building and deploying AI voice agents. Create intelligent workers that can handle phone calls, automate customer interactions, and integrate with your existing communication infrastructure. | ||
|
|
||
| ## What You Can Do | ||
|
|
||
| With the Brainbase integration on Pipedream, you can: | ||
|
|
||
| - **Automate Voice Agent Deployments** - Programmatically create and configure AI voice agents that can make or receive phone calls | ||
| - **Monitor Call Activity** - Track voice deployment logs, analyze sentiment, and retrieve call records for quality assurance | ||
| - **Manage Phone Numbers** - Register and configure phone numbers for your voice agents through Twilio integration | ||
| - **Build Dynamic Workflows** - Create AI workers with custom flows that adapt based on triggers from other apps in your Pipedream workflows | ||
| - **Scale Communications** - Make batch calls to multiple recipients with personalized AI interactions | ||
|
|
||
| ## Use Cases | ||
|
|
||
| ### Customer Support Automation | ||
|
|
||
| Automatically deploy voice agents when support tickets are created in Zendesk or when specific keywords are detected in emails. Route calls based on customer data and log interactions back to your CRM. | ||
|
|
||
| ### Appointment Reminders | ||
|
|
||
| Trigger AI voice calls to remind customers of upcoming appointments when calendar events approach. Collect confirmations and automatically update your scheduling system. | ||
|
|
||
| ### Lead Qualification | ||
|
|
||
| Deploy voice agents to call leads from your sales pipeline, ask qualification questions, and route hot leads to human sales reps based on responses and sentiment analysis. | ||
|
|
||
| ### Outbound Notifications | ||
|
|
||
| Send voice notifications for order updates, delivery alerts, or account changes by triggering calls when status changes occur in your e-commerce or SaaS platform. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| 1. Connect your Brainbase account using your API key | ||
| 2. Create a worker to define your AI agent's purpose | ||
| 3. Build a flow to script your agent's conversation logic | ||
| 4. Deploy your voice agent with a phone number | ||
| 5. Integrate with other Pipedream apps to trigger or respond to voice interactions | ||
|
|
||
| ## Authentication | ||
|
|
||
| This integration uses API Key authentication. You'll need to provide your Brainbase API key when connecting the app in Pipedream. | ||
|
|
||
| ## Links | ||
|
|
||
| - [Brainbase Documentation](https://docs.usebrainbase.com) | ||
| - [Pipedream Community](https://pipedream.com/community) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import app from "../../brainbase_labs.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "brainbase_labs-create-flow", | ||
| name: "Create Flow", | ||
| description: | ||
| "Create a new flow for a worker. [See the documentation](https://docs.usebrainbase.com)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| app, | ||
| workerId: { | ||
| propDefinition: [ | ||
| app, | ||
| "workerId", | ||
| ], | ||
| }, | ||
| name: { | ||
| type: "string", | ||
| label: "Name", | ||
| description: "The name of the flow", | ||
| }, | ||
| code: { | ||
| type: "string", | ||
| label: "Code", | ||
| description: "The flow code/definition", | ||
| }, | ||
|
Comment on lines
+28
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Provide more specific description for the code prop. The description "The flow code/definition" doesn't specify the expected format. Consider clarifying whether this expects JSON, JavaScript, a specific DSL, or another format to improve the user experience. Example: - description: "The flow code/definition",
+ description: "The flow code/definition in [expected format, e.g., JSON, JavaScript, etc.]",
🤖 Prompt for AI Agents |
||
| label: { | ||
| type: "string", | ||
| label: "Label", | ||
| description: "Optional label for the flow", | ||
| optional: true, | ||
| }, | ||
| variables: { | ||
| type: "string", | ||
| label: "Variables", | ||
| description: "Flow variables (optional)", | ||
| optional: true, | ||
| }, | ||
| validate: { | ||
| type: "boolean", | ||
| label: "Validate", | ||
| description: "Whether to validate the flow", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.createFlow({ | ||
| $, | ||
| workerId: this.workerId, | ||
| data: { | ||
| name: this.name, | ||
| code: this.code, | ||
| label: this.label, | ||
| variables: this.variables, | ||
| validate: this.validate, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created flow "${this.name}"`); | ||
| return response; | ||
| }, | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import app from "../../brainbase_labs.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "brainbase_labs-create-twilio-integration", | ||
| name: "Create Twilio Integration", | ||
| description: | ||
| "Create a new Twilio integration for the authenticated team. [See the documentation](https://docs.usebrainbase.com)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| app, | ||
| accountSid: { | ||
| type: "string", | ||
| label: "Account SID", | ||
| description: "Twilio account SID", | ||
| }, | ||
| authToken: { | ||
| type: "string", | ||
| label: "Auth Token", | ||
| description: "Twilio auth token (will be encrypted before being stored)", | ||
| secret: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.createTwilioIntegration({ | ||
| $, | ||
| data: { | ||
| accountSid: this.accountSid, | ||
| authToken: this.authToken, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", "Successfully created Twilio integration"); | ||
| return response; | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,95 @@ | ||||||||||
| import app from "../../brainbase_labs.app.mjs"; | ||||||||||
|
|
||||||||||
| export default { | ||||||||||
| key: "brainbase_labs-create-voice-deployment", | ||||||||||
| name: "Create Voice Deployment", | ||||||||||
| description: | ||||||||||
| "Create a new voice deployment. [See the documentation](https://docs.usebrainbase.com)", | ||||||||||
|
Comment on lines
+6
to
+7
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider linking to specific API endpoint documentation. The documentation link points to the general docs homepage. If available, link directly to the voice deployment creation endpoint documentation for easier reference. Example: - description:
- "Create a new voice deployment. [See the documentation](https://docs.usebrainbase.com)",
+ description:
+ "Create a new voice deployment. [See the documentation](https://docs.usebrainbase.com/api/voice-deployments#create)",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| version: "0.0.1", | ||||||||||
| type: "action", | ||||||||||
| annotations: { | ||||||||||
| destructiveHint: false, | ||||||||||
| openWorldHint: true, | ||||||||||
| readOnlyHint: false, | ||||||||||
| }, | ||||||||||
| props: { | ||||||||||
| app, | ||||||||||
| workerId: { | ||||||||||
| propDefinition: [ | ||||||||||
| app, | ||||||||||
| "workerId", | ||||||||||
| ], | ||||||||||
| }, | ||||||||||
| name: { | ||||||||||
| type: "string", | ||||||||||
| label: "Name", | ||||||||||
| description: "Deployment name", | ||||||||||
| }, | ||||||||||
| phoneNumber: { | ||||||||||
| type: "string", | ||||||||||
| label: "Phone Number", | ||||||||||
| description: "Phone number for deployment (e.g., +1234567890)", | ||||||||||
| }, | ||||||||||
|
Comment on lines
+28
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider adding phone number format validation. While the description provides a format example, there's no validation to ensure the phone number matches the expected pattern (E.164 format). The API will likely reject invalid formats, but client-side validation would provide faster feedback. Example using a pattern validation: phoneNumber: {
type: "string",
label: "Phone Number",
description: "Phone number for deployment (e.g., +1234567890)",
+ pattern: /^\+[1-9]\d{1,14}$/,
},
🤖 Prompt for AI Agents |
||||||||||
| flowId: { | ||||||||||
| propDefinition: [ | ||||||||||
| app, | ||||||||||
| "flowId", | ||||||||||
| (c) => ({ | ||||||||||
| workerId: c.workerId, | ||||||||||
| }), | ||||||||||
| ], | ||||||||||
| }, | ||||||||||
| enableVoiceSentiment: { | ||||||||||
| type: "boolean", | ||||||||||
| label: "Enable Voice Sentiment", | ||||||||||
| description: "Enable voice sentiment analysis", | ||||||||||
| default: false, | ||||||||||
| }, | ||||||||||
| externalConfig: { | ||||||||||
| type: "object", | ||||||||||
| label: "External Config", | ||||||||||
| description: | ||||||||||
| "External configuration object with voice settings, language, voiceId, etc. Example: `{\"voice\": \"alloy\", \"language\": \"en\"}`", | ||||||||||
| optional: true, | ||||||||||
| }, | ||||||||||
| extractions: { | ||||||||||
| type: "object", | ||||||||||
| label: "Extractions", | ||||||||||
| description: "Custom data extraction configurations (optional)", | ||||||||||
| optional: true, | ||||||||||
| }, | ||||||||||
| successCriteria: { | ||||||||||
| type: "string[]", | ||||||||||
| label: "Success Criteria", | ||||||||||
| description: "Deployment success measurement criteria (optional)", | ||||||||||
| optional: true, | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| async run({ $ }) { | ||||||||||
| const response = await this.app.createVoiceDeployment({ | ||||||||||
| $, | ||||||||||
| workerId: this.workerId, | ||||||||||
| data: { | ||||||||||
| name: this.name, | ||||||||||
| phoneNumber: this.phoneNumber, | ||||||||||
| flowId: this.flowId, | ||||||||||
| enableVoiceSentiment: this.enableVoiceSentiment, | ||||||||||
| ...(this.externalConfig && { | ||||||||||
| externalConfig: this.externalConfig, | ||||||||||
| }), | ||||||||||
| ...(this.extractions && { | ||||||||||
| extractions: this.extractions, | ||||||||||
| }), | ||||||||||
| ...(this.successCriteria && { | ||||||||||
| successCriteria: this.successCriteria, | ||||||||||
| }), | ||||||||||
| }, | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| $.export( | ||||||||||
| "$summary", | ||||||||||
| `Successfully created voice deployment "${this.name}"`, | ||||||||||
| ); | ||||||||||
| return response; | ||||||||||
| }, | ||||||||||
| }; | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| import app from "../../brainbase_labs.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "brainbase_labs-create-worker", | ||
| name: "Create Worker", | ||
| description: | ||
| "Create a new worker for the team. [See the documentation](https://docs.usebrainbase.com)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| app, | ||
| name: { | ||
| type: "string", | ||
| label: "Name", | ||
| description: "The name of the worker", | ||
| }, | ||
| description: { | ||
| type: "string", | ||
| label: "Description", | ||
| description: "Worker description", | ||
| optional: true, | ||
| }, | ||
| status: { | ||
| type: "string", | ||
| label: "Status", | ||
| description: "Worker status", | ||
| optional: true, | ||
| options: [ | ||
| "active", | ||
| "inactive", | ||
| "archived", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.createWorker({ | ||
| $, | ||
| data: { | ||
| name: this.name, | ||
| description: this.description, | ||
| status: this.status, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created worker "${this.name}"`); | ||
| return response; | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import app from "../../brainbase_labs.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "brainbase_labs-delete-flow", | ||
| name: "Delete Flow", | ||
| description: | ||
| "Delete a flow. [See the documentation](https://docs.usebrainbase.com)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: true, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| app, | ||
| workerId: { | ||
| propDefinition: [ | ||
| app, | ||
| "workerId", | ||
| ], | ||
| }, | ||
| flowId: { | ||
| propDefinition: [ | ||
| app, | ||
| "flowId", | ||
| (c) => ({ | ||
| workerId: c.workerId, | ||
| }), | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.deleteFlow({ | ||
| $, | ||
| workerId: this.workerId, | ||
| flowId: this.flowId, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully deleted flow with ID ${this.flowId}`); | ||
| return response; | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import app from "../../brainbase_labs.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "brainbase_labs-delete-integration", | ||
| name: "Delete Integration", | ||
| description: | ||
| "Delete an existing Twilio integration. [See the documentation](https://docs.usebrainbase.com)", | ||
|
Comment on lines
+6
to
+7
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainClarify if description should be Twilio-specific. The description mentions "Delete an existing Twilio integration" which suggests this action only applies to Twilio integrations. If the Brainbase API supports multiple integration types (not just Twilio), consider using a more generic description like "Delete an existing integration." Run the following script to check if other integration types are referenced in the codebase: 🏁 Script executed: #!/bin/bash
# Description: Check for other integration types beyond Twilio
# Search for integration creation/types in action files
rg -i 'integration' --type=js -A 3 -B 3 components/brainbase_labs/actions/
# Look for integration type references
rg -i 'twilio|slack|zapier|webhook' --type=js components/brainbase_labs/Length of output: 0 I need to verify the file structure and content since the initial script produced no output. Let me run additional verification scripts: 🏁 Script executed: #!/bin/bash
# Check if the file exists and explore directory structure
echo "=== Checking file existence ==="
find . -name "delete-integration.mjs" -o -name "*integration*" -type f 2>/dev/null | head -20
echo -e "\n=== Listing actions directory ==="
ls -la components/brainbase_labs/actions/ 2>/dev/null || echo "Directory not found"
echo -e "\n=== Checking broader directory structure ==="
ls -la components/brainbase_labs/ 2>/dev/null || echo "brainbase_labs directory not found"
echo -e "\n=== List all .mjs files ==="
find . -name "*.mjs" -type f 2>/dev/null | head -20Length of output: 4461 Now I need to examine the actual file content and compare with related actions: 🏁 Script executed: #!/bin/bash
# Read the delete-integration file
echo "=== delete-integration.mjs ==="
cat ./components/brainbase_labs/actions/delete-integration/delete-integration.mjs
echo -e "\n\n=== create-twilio-integration.mjs ==="
cat ./components/brainbase_labs/actions/create-twilio-integration/create-twilio-integration.mjs
echo -e "\n\n=== get-integration.mjs ==="
cat ./components/brainbase_labs/actions/get-integration/get-integration.mjs
echo -e "\n\n=== list-integrations.mjs ==="
cat ./components/brainbase_labs/actions/list-integrations/list-integrations.mjsLength of output: 3410 Update description to be generic, not Twilio-specific. The Change the description from: to: 🤖 Prompt for AI Agents |
||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: true, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| app, | ||
| integrationId: { | ||
| propDefinition: [ | ||
| app, | ||
| "integrationId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.deleteIntegration({ | ||
| $, | ||
| integrationId: this.integrationId, | ||
| }); | ||
|
|
||
| $.export( | ||
| "$summary", | ||
| `Successfully deleted integration with ID ${this.integrationId}`, | ||
| ); | ||
| return response; | ||
| }, | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README is your call - I don't think it's useful to have individual components listed here, but rather a general description of the app and its use cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.