Silvanexumdocs
Guides

Bind a connector

Connect an external tool or data source so your agent can use it inside a run.

This guide explains how to bind a connector — an external tool, API, or data source — to an agent so it is available during a run and recorded in the signed trace. Connectors are how agents reach beyond the model.

You will register a connector, scope its credentials, and reference it from an agent.

Connectors are Nango-backed third-party tools. Creating, confirming, and attaching connectors need an API key with the manage scope.

The connector lifecycle is: create the connector, mint a Connect session token, let the user complete Nango Connect, confirm the resulting connectionId, then attach the connector to an agent via connectorIds.

Create the connector

Reference the Nango provider config key for the integration you want (for example, github).

import { Silvanexum } from "@silvanexum/sdk";
 
const sx = new Silvanexum({ apiKey: process.env.SILVANEXUM_API_KEY! });
 
const connector = await sx.connectors.create({
  providerConfigKey: "github",
  displayName: "GitHub",
});
 
console.log(connector.id);

Mint a Connect session token

Get a sessionToken and hand it to the Nango Connect UI in your frontend so the user can authorize the integration.

const { sessionToken } = await sx.connectors.session(connector.id);
// Pass sessionToken to Nango Connect in your frontend.

Confirm the connection

After the user completes Nango Connect, the flow returns a connectionId. Confirm it to mark the connector connected.

await sx.connectors.confirm(connector.id, connectionId);

Attach it to an agent

Once connected, include the connector's id in connectorIds when you create (or update) an agent. The connector is then available during runs and recorded in the signed trace.

const agent = await sx.agents.create({
  name: "Repo Assistant",
  config: {
    provider: "anthropic",
    model: "claude-opus-4-8",
    systemPrompt: "You help triage GitHub issues.",
  },
  connectorIds: [connector.id],
});

On this page