Build Connectors
Connectors are the bridge between HUMΛN agents and any external service — databases, file storage, payments, email, messaging, CRMs, developer tools, and more. Each connector is a typed, credential-managed integration that agents use via ctx.* calls.
How it works: When an agent calls ctx.files.read(), ctx.db.query(), or ctx.call.human(), HUMΛN routes the call through the connector you've configured for that organization. Connectors handle credential lifecycle (OAuth refresh, secret rotation), retry logic, delivery tracking, and audit logging. Your agent code stays clean — just call the ctx API.
Why use the Connector SDK instead of my own API client?
One contract for kind support, resource I/O, and manifest: the platform discovers what your connector does, routes ctx.* calls to it, and manages credentials (OAuth, KMS-encrypted storage). Same connector code runs hosted, hybrid, or self-hosted—you don’t reimplement discovery, auth, or deployment wiring.
Connector Base Classes
Choose the base class that matches the external service type. Each base class wires your connector into the right ctx.* API.
NotificationConnectorSend alerts, messages, and approval requests to humans
Slack, PagerDuty, Twilio SMS, email, webhooks
OAuthConnectorOAuth 2.0 authenticated service integrations (PKCE, token refresh built in)
Google Workspace, Microsoft 365, Salesforce, GitHub
StorageConnectorComing soonRead and write files via ctx.files inside agents
Amazon S3, Google Cloud Storage, Azure Blob, Dropbox
DatabaseConnectorComing soonQuery and mutate records via ctx.db inside agents
PostgreSQL, Supabase, MySQL, MongoDB, Redis
PaymentConnectorComing soonPayment processing, subscriptions, and billing
Stripe, Paddle
Install the Connector SDK
pnpm add @human/connector-sdk
Examples
Notification Connector
Extend NotificationConnector. Implement send(). The SDK handles token lifecycle, retry, and delivery tracking.
import { NotificationConnector } from '@human/connector-sdk';
export class SlackConnector extends NotificationConnector { readonly id = 'slack-notifications'; readonly name = 'Slack Notifications'; readonly version = '1.0.0';
async send(notification: Notification, config: SlackConfig): Promise<void> { const token = await this.getToken(config.teamId); await fetch('https://slack.com/api/chat.postMessage', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ channel: config.channel, text: notification.message }), }); }}Storage Connector
Extend StorageConnector to expose files via ctx.files inside agents. The SDK manages credential scoping and access logging.
import { StorageConnector } from '@human/connector-sdk';
export class S3Connector extends StorageConnector { readonly id = 'storage-s3'; readonly name = 'Amazon S3'; readonly version = '1.0.0';
async read(path: string, config: S3Config): Promise<Uint8Array> { const credentials = await this.getCredentials(config.orgId); // Read a file from S3 using the scoped credentials return this.s3Get(credentials, config.bucket, path); }
async write(path: string, data: Uint8Array, config: S3Config): Promise<void> { const credentials = await this.getCredentials(config.orgId); await this.s3Put(credentials, config.bucket, path, data); }}Payment Connector
Extend PaymentConnector to let agents initiate payment flows. Secrets are fetched from the credential vault — never hardcoded.
import { PaymentConnector } from '@human/connector-sdk';
export class StripeConnector extends PaymentConnector { readonly id = 'payments-stripe'; readonly name = 'Stripe'; readonly version = '1.0.0';
async charge(amount: number, currency: string, config: StripeConfig): Promise<ChargeResult> { const apiKey = await this.getSecret(config.orgId, 'stripe_secret_key'); const response = await fetch('https://api.stripe.com/v1/payment_intents', { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}` }, body: new URLSearchParams({ amount: String(amount), currency }), }); return response.json(); }}OAuth Connector
For services using OAuth 2.0, extend OAuthConnector. Authorization flow, PKCE, token refresh, and encrypted storage are all handled by the SDK.
OAuth and token lifecycle: One flow for auth URL, callback, and refresh—no custom token storage. Tokens are encrypted at rest (KMS); connector code never sees raw secrets. Bypass with your own OAuth client and you own refresh logic, storage, and audit.
import { OAuthConnector } from '@human/connector-sdk';
export class GoogleWorkspaceConnector extends OAuthConnector { readonly id = 'email-google-workspace'; readonly oauthConfig = { authUrl: 'https://accounts.google.com/o/oauth2/auth', tokenUrl: 'https://oauth2.googleapis.com/token', scopes: ['https://www.googleapis.com/auth/gmail.send'], pkce: true, };
async sendEmail(to: string, subject: string, body: string, orgId: string) { // Tokens stored encrypted — connector never stores credentials in source const accessToken = await this.getAccessToken(orgId); await fetch('https://gmail.googleapis.com/gmail/v1/users/me/messages/send', { method: 'POST', headers: { 'Authorization': `Bearer ${accessToken}` }, body: JSON.stringify({ raw: this.encodeEmail(to, subject, body) }), }); }}Receiving Webhooks
When a vendor (e.g. Stripe, GitHub) sends a webhook to your connector, use the SDK's webhook helpers to verify the payload and turn it into an attested event. Why: One place to validate signatures and log delivery. How it helps: Agents can react to "payment.succeeded" or "issue.created" with full provenance; bypass and you handle verification and audit yourself.
Connector Manifest
Add a humanConnector section to your package.json. This controls marketplace visibility, certification status, and how HUMΛN hosts or registers your connector.
{ "name": "@acme/connector-github", "version": "1.0.0", "description": "GitHub issue and PR connector for HUMΛN", "keywords": ["human", "connector", "github"], "main": "./dist/index.js", "types": "./dist/index.d.ts", "humanConnector": { "publisherId": "acme", "category": "devtools", "visibility": "public", "certified": false }}Deployment Models
Same connector code runs in hosted, hybrid, or self-hosted environments. Choose the model that fits your ops and compliance: HUMΛN hosts and runs it, you run it and register the URL, or you run everything and only receive webhook delivery.
Hosted
HUMΛN runs your connector on managed infrastructure. Credentials stored in HUMΛN vault. Zero ops.
Use when: Public connectors, SaaS integrations, getting started quickly.
// No config needed — publish and HUMΛN hosts it human connector publish --hosted
Hybrid
Connector runs on your infrastructure, credentials stay in your vault, events proxied through HUMΛN.
Use when: Enterprise with on-prem systems, data residency requirements.
// Deploy to your infra, register with HUMΛN human connector register --url https://connectors.acme.com/github
Self-Hosted
Entirely on your infrastructure. HUMΛN never sees credentials or event payloads.
Use when: Air-gapped environments, strict compliance requirements.
// Webhook delivery only — you handle everything human connector register --url https://internal.acme.com --self-hosted
Connector Catalog
HUMΛN-published connectors in packages/connectors/. Connectors marked coming soon are on the roadmap — contributions welcome.
@human/connector-email-sendgridTransactional email via Twilio SendGrid.
@human/connector-email-google-workspaceEnterprise email via Google Workspace.
@human/connector-email-microsoft365Enterprise email via Microsoft 365.
@human/connector-email-mailgunTransactional email via Mailgun.
@human/connector-email-postmarkTransactional email via Postmark.
@human/connector-email-sesEmail via AWS SES.
@human/connector-email-smtpUniversal SMTP — any SMTP endpoint.
Messaging & Alerts
@human/connector-slack-notificationsSlack channel notifications.
@human/connector-twilio-smsSMS notifications via Twilio.
@human/connector-pagerdutyOps and alerting via PagerDuty.
@human/connector-webhookGeneric webhook — any HTTPS endpoint.
CRM & Platforms
@human/connector-salesforceSalesforce CRM integration.
@human/connector-google-calendarGoogle Calendar integration.
@human/connector-hubspotSoonHubSpot CRM integration.
@human/connector-shopifySoonShopify orders and inventory.
File Storage
@human/connector-storage-s3SoonAmazon S3 — read/write files in agents.
@human/connector-storage-gcsSoonGoogle Cloud Storage.
@human/connector-storage-azureSoonAzure Blob Storage.
@human/connector-storage-dropboxSoonDropbox file storage.
Databases
@human/connector-db-postgresqlSoonPostgreSQL — query/mutate records in agents.
@human/connector-db-supabaseSoonSupabase (PostgreSQL + auth).
@human/connector-db-mysqlSoonMySQL/MariaDB.
@human/connector-db-mongodbSoonMongoDB document store.
@human/connector-db-redisSoonRedis key-value and pub/sub.
Payments
@human/connector-payments-stripeSoonStripe payments and subscriptions.
@human/connector-payments-paddleSoonPaddle billing for SaaS.
Developer Tools
@human/connector-githubSoonGitHub issues, PRs, and actions.
@human/connector-jiraSoonJira issue and project management.
@human/connector-linearSoonLinear issue tracking.
@human/connector-gitlabSoonGitLab repositories and CI/CD.