agentbridge-sdk
v1.0.43
Published
Official Node.js SDK for AgentBridge — connect AI agents to GitHub, Slack, Notion, Gmail and Google Drive through a single unified API.
Maintainers
Readme
AgentBridge Node.js SDK
Official Node.js SDK for AgentBridge — connect AI agents to GitHub, Slack, Notion, Gmail and Google Drive through a single unified API.
Installation
npm install agentbridge-sdkQuick Start
- Sign up at agentbridge.in
- Connect your providers (GitHub, Slack, etc.) from the dashboard
- Create an API key from API Keys
import { AgentBridge } from 'agentbridge-sdk';
const client = new AgentBridge({ apiKey: 'ab_your_api_key_here' });
// List your GitHub repos
const repos = await client.execute({
provider: 'github',
tool: 'list_repos',
});
console.log(repos.data);
// Create a Slack message
await client.execute({
provider: 'slack',
tool: 'send_message',
params: { channel: '#general', text: 'Hello from AgentBridge!' },
});
// Search Notion pages
const pages = await client.execute({
provider: 'notion',
tool: 'search_pages',
params: { query: 'meeting notes' },
});Configuration
const client = new AgentBridge({
apiKey: 'ab_your_api_key_here', // required — get one at agentbridge.in/app/api-keys
baseUrl: 'https://agentbridge.in', // optional, defaults to this
});API Reference
client.execute(params)
Execute a tool on a connected provider.
const result = await client.execute({
provider: 'github',
tool: 'create_issue',
params: {
owner: 'octocat',
repo: 'hello-world',
title: 'Bug report',
body: 'Something is broken',
},
});
console.log(result.status); // 'success'
console.log(result.data); // tool-specific response| Field | Type | Required | Description |
| ---------- | ------ | -------- | ------------------------------------------------ |
| provider | string | Yes | Provider slug (github, slack, notion, gmail, google-drive) |
| tool | string | Yes | Tool name (e.g. list_repos, create_issue) |
| params | object | No | Tool-specific parameters |
client.getProviders()
List all available providers.
const providers = await client.getProviders();
// [{ id: '...', name: 'GitHub', slug: 'github', active: true }, ...]client.getProviderTools(slug)
List available tools for a provider. Use this to discover tool names and their parameters.
const tools = await client.getProviderTools('github');
// [{ name: 'list_repos', description: '...', parameters: {...} }, ...]Error Handling
try {
const result = await client.execute({
provider: 'github',
tool: 'list_repos',
});
} catch (error) {
console.error(error.message); // e.g. "Unauthorized" or "Provider not connected"
}Providers
| Provider | Slug | Example Tools |
| ------------ | -------------- | ------------------------------------------ |
| GitHub | github | list_repos, create_issue, create_pr, get_file |
| Slack | slack | send_message, list_channels |
| Notion | notion | search_pages, create_page |
| Gmail | gmail | send_email, list_messages |
| Google Drive | google-drive | list_files, upload_file |
Use client.getProviderTools('slug') to see all tools and parameters for each provider.
Links
License
MIT
