Skip to content

Commit 535155d

Browse files
egrigokhancoderabbitai[bot]GTFalcaoNauxiemichelle0927
authored
brainbase labs (#18759)
* brainbase labs * changes made * Update components/kustomer/actions/update-conversation/update-conversation.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update components/close/actions/update-lead/update-lead.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update components/brainbase_labs/actions/create-voice-deployment/create-voice-deployment.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * ESLint + pnpm * Revert close create-lead action to upstream master version * Revert close search-leads action to upstream master version * Revert close update-lead action to upstream master version * Revert kustomer update-conversation action to upstream master version * Revert prisma create-new-database-in-existing-project action to upstream master version * replace brainbase with brainbase_labs * linter * Running ESLint * doc links, coderabbit suggestions * doc links, annotations * update actions * add requested source * updates --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Guilherme Falcão <48412907+GTFalcao@users.noreply.github.com> Co-authored-by: GTFalcao <gtfalcao96@gmail.com> Co-authored-by: Abhinav Tumu <abhinav.tumu1@gmail.com> Co-authored-by: Abhinav Tumu <37749663+Nauxie@users.noreply.github.com> Co-authored-by: Michelle Bergeron <michelle.bergeron@gmail.com>
1 parent 0450db2 commit 535155d

File tree

33 files changed

+1895
-10
lines changed

33 files changed

+1895
-10
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Brainbase
2+
3+
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.
4+
5+
## What You Can Do
6+
7+
With the Brainbase integration on Pipedream, you can:
8+
9+
- **Automate Voice Agent Deployments** - Programmatically create and configure AI voice agents that can make or receive phone calls
10+
- **Monitor Call Activity** - Track voice deployment logs, analyze sentiment, and retrieve call records for quality assurance
11+
- **Manage Phone Numbers** - Register and configure phone numbers for your voice agents through Twilio integration
12+
- **Build Dynamic Workflows** - Create AI workers with custom flows that adapt based on triggers from other apps in your Pipedream workflows
13+
- **Scale Communications** - Make batch calls to multiple recipients with personalized AI interactions
14+
15+
## Use Cases
16+
17+
### Customer Support Automation
18+
19+
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.
20+
21+
### Appointment Reminders
22+
23+
Trigger AI voice calls to remind customers of upcoming appointments when calendar events approach. Collect confirmations and automatically update your scheduling system.
24+
25+
### Lead Qualification
26+
27+
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.
28+
29+
### Outbound Notifications
30+
31+
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.
32+
33+
## Getting Started
34+
35+
1. Connect your Brainbase account using your API key
36+
2. Create a worker to define your AI agent's purpose
37+
3. Build a flow to script your agent's conversation logic
38+
4. Deploy your voice agent with a phone number
39+
5. Integrate with other Pipedream apps to trigger or respond to voice interactions
40+
41+
## Authentication
42+
43+
This integration uses API Key authentication. You'll need to provide your Brainbase API key when connecting the app in Pipedream.
44+
45+
## Links
46+
47+
- [Brainbase Documentation](https://docs.usebrainbase.com)
48+
- [Pipedream Community](https://pipedream.com/community)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import app from "../../brainbase_labs.app.mjs";
2+
3+
export default {
4+
key: "brainbase_labs-create-flow",
5+
name: "Create Flow",
6+
description: "Create a new flow for a worker. [See the documentation](https://docs.usebrainbase.com/api-reference/flows/create-a-new-flow)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
app,
16+
workerId: {
17+
propDefinition: [
18+
app,
19+
"workerId",
20+
],
21+
},
22+
name: {
23+
type: "string",
24+
label: "Name",
25+
description: "The name of the flow",
26+
},
27+
code: {
28+
type: "string",
29+
label: "Code",
30+
description: "The flow code/definition",
31+
},
32+
label: {
33+
type: "string",
34+
label: "Label",
35+
description: "Optional label for the flow",
36+
},
37+
variables: {
38+
type: "string",
39+
label: "Variables",
40+
description: "Flow variables (optional)",
41+
optional: true,
42+
},
43+
validate: {
44+
type: "boolean",
45+
label: "Validate",
46+
description: "Whether to validate the flow",
47+
},
48+
},
49+
async run({ $ }) {
50+
const response = await this.app.createFlow({
51+
$,
52+
workerId: this.workerId,
53+
data: {
54+
name: this.name,
55+
code: this.code,
56+
label: this.label,
57+
variables: this.variables,
58+
validate: this.validate,
59+
},
60+
});
61+
62+
$.export("$summary", `Successfully created flow "${this.name}"`);
63+
return response;
64+
},
65+
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import app from "../../brainbase_labs.app.mjs";
2+
3+
export default {
4+
key: "brainbase_labs-create-twilio-integration",
5+
name: "Create Twilio Integration",
6+
description: "Create a new Twilio integration for the authenticated team. [See the documentation](https://docs.usebrainbase.com/api-reference/integrations/create-a-new-twilio-integration-for-the-authenticated-team)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
app,
16+
accountSid: {
17+
type: "string",
18+
label: "Account SID",
19+
description: "Twilio account SID",
20+
},
21+
authToken: {
22+
type: "string",
23+
label: "Auth Token",
24+
description: "Twilio auth token (will be encrypted before being stored)",
25+
secret: true,
26+
},
27+
},
28+
async run({ $ }) {
29+
const response = await this.app.createTwilioIntegration({
30+
$,
31+
data: {
32+
accountSid: this.accountSid,
33+
authToken: this.authToken,
34+
},
35+
});
36+
37+
$.export("$summary", "Successfully created Twilio integration");
38+
return response;
39+
},
40+
};
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import app from "../../brainbase_labs.app.mjs";
2+
import { parseObject } from "../../common/utils.mjs";
3+
4+
export default {
5+
key: "brainbase_labs-create-voice-deployment",
6+
name: "Create Voice Deployment",
7+
description: "Create a new voice deployment. [See the documentation](https://docs.usebrainbase.com/api-reference/voice-deployments/create-a-new-voice-deployment)",
8+
version: "0.0.1",
9+
type: "action",
10+
annotations: {
11+
destructiveHint: false,
12+
openWorldHint: true,
13+
readOnlyHint: false,
14+
},
15+
props: {
16+
app,
17+
workerId: {
18+
propDefinition: [
19+
app,
20+
"workerId",
21+
],
22+
},
23+
name: {
24+
type: "string",
25+
label: "Name",
26+
description: "Deployment name",
27+
},
28+
phoneNumber: {
29+
type: "string",
30+
label: "Phone Number",
31+
description: "Phone number for deployment (e.g., +1234567890)",
32+
},
33+
flowId: {
34+
propDefinition: [
35+
app,
36+
"flowId",
37+
(c) => ({
38+
workerId: c.workerId,
39+
}),
40+
],
41+
},
42+
enableVoiceSentiment: {
43+
type: "boolean",
44+
label: "Enable Voice Sentiment",
45+
description: "Enable voice sentiment analysis",
46+
default: false,
47+
},
48+
externalConfig: {
49+
type: "object",
50+
label: "External Config",
51+
description:
52+
"External configuration object with voice settings, language, voiceId, etc. Example: `{\"voice\": \"alloy\", \"language\": \"en\"}`",
53+
optional: true,
54+
},
55+
extractionsKey: {
56+
type: "string",
57+
label: "Extractions Key",
58+
description: "The key of the extractions to use for the deployment",
59+
},
60+
extractionsType: {
61+
type: "string",
62+
label: "Extractions Type",
63+
description: "The type of the extractions to use for the deployment",
64+
options: [
65+
"string",
66+
"number",
67+
"boolean",
68+
],
69+
},
70+
extractionsDescription: {
71+
type: "string",
72+
label: "Extractions Description",
73+
description: "The description of the extractions to use for the deployment",
74+
},
75+
extractionsRequired: {
76+
type: "boolean",
77+
label: "Extractions Required",
78+
description: "Whether the extractions are required for the deployment",
79+
},
80+
successCriteria: {
81+
type: "string[]",
82+
label: "Success Criteria",
83+
description: "Deployment success measurement criteria (optional)",
84+
optional: true,
85+
},
86+
},
87+
async run({ $ }) {
88+
const response = await this.app.createVoiceDeployment({
89+
$,
90+
workerId: this.workerId,
91+
data: {
92+
name: this.name,
93+
phoneNumber: this.phoneNumber,
94+
flowId: this.flowId,
95+
enableVoiceSentiment: this.enableVoiceSentiment,
96+
...(this.externalConfig && {
97+
externalConfig: parseObject(this.externalConfig),
98+
}),
99+
extractions: {
100+
[this.extractionsKey]: {
101+
type: this.extractionsType,
102+
description: this.extractionsDescription,
103+
required: this.extractionsRequired,
104+
},
105+
},
106+
...(this.successCriteria && {
107+
successCriteria: parseObject(this.successCriteria),
108+
}),
109+
},
110+
});
111+
112+
$.export(
113+
"$summary",
114+
`Successfully created voice deployment "${this.name}"`,
115+
);
116+
return response;
117+
},
118+
};
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import app from "../../brainbase_labs.app.mjs";
2+
3+
export default {
4+
key: "brainbase_labs-create-worker",
5+
name: "Create Worker",
6+
description: "Create a new worker for the team. [See the documentation](https://docs.usebrainbase.com/api-reference/workers/create-a-new-worker)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: false,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
app,
16+
name: {
17+
type: "string",
18+
label: "Name",
19+
description: "The name of the worker",
20+
},
21+
description: {
22+
type: "string",
23+
label: "Description",
24+
description: "Worker description",
25+
},
26+
status: {
27+
type: "string",
28+
label: "Status",
29+
description: "Worker status",
30+
options: [
31+
"active",
32+
"inactive",
33+
"archived",
34+
],
35+
},
36+
},
37+
async run({ $ }) {
38+
const response = await this.app.createWorker({
39+
$,
40+
data: {
41+
name: this.name,
42+
description: this.description,
43+
status: this.status,
44+
},
45+
});
46+
47+
$.export("$summary", `Successfully created worker "${this.name}"`);
48+
return response;
49+
},
50+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import app from "../../brainbase_labs.app.mjs";
2+
3+
export default {
4+
key: "brainbase_labs-delete-flow",
5+
name: "Delete Flow",
6+
description: "Delete a flow. [See the documentation](https://docs.usebrainbase.com/api-reference/flows/delete-a-flow)",
7+
version: "0.0.1",
8+
type: "action",
9+
annotations: {
10+
destructiveHint: true,
11+
openWorldHint: true,
12+
readOnlyHint: false,
13+
},
14+
props: {
15+
app,
16+
workerId: {
17+
propDefinition: [
18+
app,
19+
"workerId",
20+
],
21+
},
22+
flowId: {
23+
propDefinition: [
24+
app,
25+
"flowId",
26+
(c) => ({
27+
workerId: c.workerId,
28+
}),
29+
],
30+
},
31+
},
32+
async run({ $ }) {
33+
const response = await this.app.deleteFlow({
34+
$,
35+
workerId: this.workerId,
36+
flowId: this.flowId,
37+
});
38+
39+
$.export("$summary", `Successfully deleted flow with ID ${this.flowId}`);
40+
return response;
41+
},
42+
};

0 commit comments

Comments
 (0)