CONNECT APP
Build with Brainbase Labs
Artificial Intelligence (AI)
- API key
MCP
Give your agent Brainbase Labs tools
Every Brainbase Labs action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Brainbase Labs account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "brainbase_labs",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Create Flow:
const result = await mcp.callTool({
name: "brainbase_labs-create-flow",
arguments: {
workerId: "Worker ID",
name: "Name",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "brainbase_labs",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Flow:
result = await session.call_tool("brainbase_labs-create-flow", {
"workerId": "Worker ID",
"name": "Name",
})API PROXY
Call the Brainbase Labs API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Brainbase Labs API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://brainbase-monorepo-api.onrender.com/api/team",
})
// Any allowed Brainbase Labs endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://brainbase-monorepo-api.onrender.com/api/team
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9icmFpbmJhc2UtbW9ub3JlcG8tYXBpLm9ucmVuZGVyLmNvbS9hcGkvdGVhbQ?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Brainbase Labs actions from your backend
Connect a user's Brainbase Labs account once, then run Create Flow on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "brainbase_labs-create-flow",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
brainbase_labs: { authProvisionId: "apn_xxxxxxx" },
workerId: "Worker ID",
name: "Name",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="brainbase_labs-create-flow",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"brainbase_labs": {"authProvisionId": "apn_xxxxxxx"},
"workerId": "Worker ID",
"name": "Name",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "brainbase_labs-create-flow",
"configured_props": {
"brainbase_labs": { "authProvisionId": "apn_xxxxxxx" },
"workerId": "Worker ID",
"name": "Name"
}
}'TOOLS
Brainbase Labs actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Flow
actionCreate a new flow for a worker. See the documentationWritev0.0.1 -
Create Twilio Integration
actionCreate a new Twilio integration for the authenticated team. See the documentationWritev0.0.1 -
Create Voice Deployment
actionCreate a new voice deployment. See the documentationWritev0.0.1 -
Create Worker
actionCreate a new worker for the team. See the documentationWritev0.0.1 -
Delete Flow
actionDelete a flow. See the documentationWritev0.0.1 -
Delete Integration
actionDelete an existing Twilio integration. See the documentationWritev0.0.1 -
Delete Phone Number
actionDelete a registered phone number for the team. See the documentationWritev0.0.1 -
Delete Voice Deployment
actionDelete a voice deployment. See the documentationWritev0.0.1 -
Delete Worker
actionDelete a worker. See the documentationWritev0.0.1 -
Get Flow
actionGet a single flow by ID. See the documentationRead-onlyv0.0.1 -
Get Integration
actionGet a specific integration by ID. See the documentationRead-onlyv0.0.1 -
Get Phone Numbers
actionGet all registered phone numbers for the team, optionally filtered by integration id. See the documentationRead-onlyv0.0.1 -
Get Team
actionGet the team associated with the provided API key. See the documentationRead-onlyv0.0.1 -
Get Voice Deployment
actionGet a single voice deployment by ID. See the documentationRead-onlyv0.0.1 -
Get Voice Deployment Log
actionRetrieve a single voice deployment log record. See the documentationRead-onlyv0.0.2 -
Get Worker
actionGet a single worker by ID. See the documentationRead-onlyv0.0.1 -
List Flows
actionGet all flows for a worker. See the documentationRead-onlyv0.0.1 -
List Integrations
actionGet all integrations for the authenticated team. See the documentationRead-onlyv0.0.1 -
List Voice Deployment Logs
actionList voice deployment logs for a worker with optional filtering and pagination. See the documentationRead-onlyv0.0.1 -
List Voice Deployments
actionGet all voice deployments for a worker. See the documentationRead-onlyv0.0.1 -
List Workers
actionGet all workers for the team. See the documentationRead-onlyv0.0.1 -
Make Voice Batch Calls
actionMake batch calls for a voice deployment. See the documentationWritev0.0.1 -
Register Phone Number
actionRegister a phone number for the team via Twilio integration. See the documentationWritev0.0.1 -
Update Flow
actionUpdate an existing flow. See the documentationWritev0.0.1 -
Update Voice Deployment
actionUpdate an existing voice deployment. See the documentationWritev0.0.1 -
Update Worker
actionUpdate an existing worker. See the documentationWritev0.0.1
EVENTS
Brainbase Labs triggers
Event sources your backend can deploy for users and receive through a webhook.
- App slug
- brainbase_labs
- Authentication
- API key
- Categories
- Artificial Intelligence (AI)
- Actions
- 26
- Triggers
- 1
- API proxy
- Available