Skip to main content

Build a Custom Connector

Bring data from your internal applications and custom APIs into Supaflow. Describe your source to Claude or Codex, and the Supaflow connector skill guides you through building and testing the integration. Your private agent runs the connector inside your environment and syncs the data to your destination.

This guide takes you from your first connector project to a successful pipeline run.

Prerequisites​

Have these ready before starting:

RequirementWhat you need
Supaflow accountAn account at app.supa-flow.io and access to the organization and workspace where you will create the datasource and pipeline.
Organization permissionsAn organization administrator or personal-account owner reserves the connector group and registers connector versions. You also need permission to create datasources, projects, and pipelines in the selected workspace. Your Supaflow environment must support tenant-level custom connector registration.
CLI installed and authenticatedNode.js 18 or later, plus Supaflow CLI 0.9.0 or later. Complete the CLI installation, API access, authentication, and workspace setup. Confirm your login belongs to the intended organization.
Python, uv, and GitInstall Python 3.14, uv, and Git; the Codex installation below also uses rsync. The CLI selects an already installed compatible Python; it does not download Python for you. It prepares the project environment and SDK dependencies.
AI coding assistant and connector skillInstall the Supaflow connector development skill in Claude Code, Codex, or another supported assistant, following the instructions below.
Running private Docker agentFollow the existing Docker agent deployment guide, including enrollment, approval, persistent storage, and host requirements. The agent image must support the SDK and local connector deployment.
Docker access from your terminalThe CLI must be able to reach the Docker daemon containing your agent. Know its container name; this guide uses the default supaflow-agent.
Network and dependency accessYour development machine needs access to the CLI's package sources. The agent needs outbound access to Supaflow, any required dependency sources, and your source and destination. Have the exact SDK/runtime wheels available if they are not already on the agent.
Test source and destinationThe starter needs no source credentials. For a real integration, use a sandbox account and keep credentials outside source control and assistant chat. Have an accessible destination with permission to create and load tables.

Check your tools and workspace:

node --version
python3 --version
uv --version
git --version
supaflow auth status
supaflow workspaces list
supaflow workspaces select <workspace-name>
supaflow connectors --help
supaflow agent status --name supaflow-agent

Confirm that connectors --help includes the authoring commands before continuing. Use the Docker deployment guide to start or upgrade an agent; do not create a second agent just for connector registration.

1. Install the Connector Skill​

Install the Supaflow connector development skills:

git clone https://github.com/supaflow-labs/supaflow-connector-dev-skills.git

Choose your assistant's installation method.

Claude Code​

From the directory containing the clone:

mkdir -p ~/.claude/skills
ln -s "$(pwd)/supaflow-connector-dev-skills/skills/build-supaflow-connector" \
~/.claude/skills/build-supaflow-connector

Start a new Claude Code session and invoke /build-supaflow-connector.

Codex​

Copy the skill directory, including its references and scripts:

mkdir -p ~/.codex/skills/build-supaflow-connector
rsync -a supaflow-connector-dev-skills/skills/build-supaflow-connector/ \
~/.codex/skills/build-supaflow-connector/

Start a new Codex session and invoke $build-supaflow-connector.

For other assistants, follow the skill repository's installation instructions.

When working with your assistant, provide the integration's authentication method, objects, field types, pagination, rate limits, and incremental behavior. Give it credential variable names, never actual keys or passwords.

2. Create a Minimal Connector​

Create a new directory using the SDK-only source starter. The example uses com.acme; substitute your intended group, or your organization's existing group if it already has one. You can create, test, and build the project locally without a login or group reservation. Reserve the group in step 5 only when you are ready to register the connector:

supaflow connectors init ./mvp-records \
--template custom-source \
--name MVP_RECORDS \
--group com.acme \
--display-name "MVP Records" \
--connector-version 0.1.0.dev1

The CLI creates a source package, project metadata, dependency locks, a connector manifest, and tests. You do not need a Supaflow platform repository clone.

Optional: try the starter with sample data

Before connecting your source, you can use the starter's Record prefix setting with the value example. It discovers a records object with an id primary key and reads these rows:

[{"id": "example-1"}, {"id": "example-2"}]

Run the starter's checks before changing it:

supaflow connectors check --project ./mvp-records
supaflow connectors test --project ./mvp-records

The generated tests exercise connection properties and invalid-configuration rejection, connection testing, schema discovery and refresh, and exact reads. Keep those tests when adding your real integration. This is a source starter: it must read records. A destination connector has a different responsibility and must implement its writing operations.

Other source templates are api-source and sql-source. They use the higher-level source adapter; choose a template when creating a new project rather than treating their source files as interchangeable.

3. Implement and Test Your Integration​

Use the assistant with the generated project. For example:

Use the installed Supaflow connector skill to extend ./mvp-records as a
standalone Python source connector. Use the Supaflow CLI for authoring,
testing, locking, and building; do not create a platform checkout or Maven
module. Start by running the existing starter tests.

Implement: <describe source, objects, authentication, pagination, fields,
and incremental behavior>. Credentials will be supplied separately through
<environment variable names>.

Keep connection testing, schema discovery/refresh, and read tests. Update
sample fixtures and compare exact expected rows. Declare only capabilities
that are implemented. Stop and report a real failed check before proceeding.

The main files to update are:

FilePurpose
src/.../connector.pyConnection properties and lifecycle behavior.
src/.../source.pyReading data from your source.
src/.../schemas.pyObjects, field types, and keys.
tests/connector_fixture.pyNonsecret configuration and expected sample rows.
tests/test_connector.pyExecutable lifecycle and integration behavior checks.
pyproject.tomlPackage version, identity, and dependencies.

After definition or schema changes, regenerate and check the manifest:

supaflow connectors manifest generate --project ./mvp-records
supaflow connectors check --project ./mvp-records
supaflow connectors test --project ./mvp-records

After dependency changes, explicitly refresh the locks first:

supaflow connectors lock --project ./mvp-records

Keep the generated locks with the project. Ordinary checks and builds report stale locks rather than silently changing dependencies. Live tests require your explicit opt-in with connectors test --live; keep normal fixture tests independent of production credentials.

4. Build the Artifact​

supaflow connectors build --project ./mvp-records --json

Use the returned artifactDir in the next steps. For this starter and version, it has this form:

mvp-records/dist/supaflow-connector-mvp-records-python/0.1.0.dev1

Deploy the complete artifact directory, not just its wheel. Do not edit generated files inside it.

5. Reserve Your Organization's Connector Group​

After the local build passes, reserve the group used by your project. If your organization already owns that group, reuse it:

supaflow connectors group register com.acme --json

A group belongs to the organization, can contain multiple connectors and vendor display names, and must be unique. Group names use lowercase letters, digits, and dots, with each segment beginning with a letter. Each organization can reserve one group, and it cannot be changed after reservation. Choose it carefully. Repeating the same reservation is safe.

The group and local connector name determine identity. For example, com.acme plus MVP_RECORDS becomes COM_ACME__MVP_RECORDS. The vendor display name is not part of this identity. Registration is organization-level and does not require an enrolled agent.

6. Register It in Your Organization​

supaflow connectors dev register \
--artifact ./mvp-records/dist/supaflow-connector-mvp-records-python/0.1.0.dev1 \
--json

Registration makes this connector version available to your organization. It sends the built metadata, not a runnable wheel to your agent. Save the returned connector type and version_id.

You can compare the local artifact with its registered version:

supaflow connectors dev status <version-id> \
--artifact ./mvp-records/dist/supaflow-connector-mvp-records-python/0.1.0.dev1
supaflow connectors list

The connector also appears under Sources > Create Source. The example below shows the registered SDK Walkthrough connector.

Registered custom connector in the source catalog

7. Deploy to Your Private Agent​

With the Docker agent already running, deploy the same artifact:

supaflow connectors dev deploy \
--artifact ./mvp-records/dist/supaflow-connector-mvp-records-python/0.1.0.dev1 \
--name supaflow-agent

If its exact SDK/runtime wheels are not already on the agent, supply the matching wheel files in a local directory:

supaflow connectors dev deploy \
--artifact ./mvp-records/dist/supaflow-connector-mvp-records-python/0.1.0.dev1 \
--name supaflow-agent \
--runtime-wheels ./runtime-wheels

Download the published SDK/runtime wheel versions listed in the artifact's runtime.lock from PyPI into ./runtime-wheels. Their filenames and hashes must match the lock; do not substitute newer packages. The agent checks artifact integrity and compatibility and prepares its Python environment.

Registration and deployment are independent: either can happen first. Deployment uses local Docker access and does not require a CLI login or look up your organization. It makes the binary available locally; it does not register it, start the agent, or change job routing.

If multiple agents can execute your organization's jobs, deploy the artifact to each of them. Registration does not distribute it, and a job that reaches an agent without the custom artifact fails. You do not need to configure connector-aware scheduling.

8. Create and Test a Datasource​

Use the connector type returned by registration:

supaflow datasources init \
--connector COM_ACME__MVP_RECORDS \
--name "MVP Records Source" \
--role SOURCE \
--output ./mvp-records-source.env

Review the generated file. For the unmodified starter, set recordPrefix to example. For a real connector, supply the declared connection settings and keep the file out of source control.

supaflow datasources create --from ./mvp-records-source.env --role SOURCE --json
supaflow datasources test <source-id>
supaflow datasources catalog <source-id> --refresh --output ./objects.json

Wait for schema discovery to finish and verify the expected objects before creating a pipeline. The starter should discover records with an id field. In the app, Sources shows the datasource and its connection properties.

Custom source connection properties

9. Run an End-to-End Pipeline​

Create or select a destination that your private agent can reach, following its destination setup guide. Create a project that uses that destination, or use an existing project:

supaflow projects create --name "Connector Development" --destination <destination-id>
supaflow pipelines init --source <source-id> --project <project-id> \
--output ./pipeline-config.json

Review the generated configuration and objects.json. Then create the pipeline and run it:

supaflow pipelines create --name "MVP Records Pipeline" \
--source <source-id> --project <project-id> \
--config ./pipeline-config.json --objects ./objects.json --json
supaflow pipelines sync <pipeline-id> --json
supaflow jobs get <job-id> --json

sync returns a job ID; queued or running is not success. Check until the job is completed. In the app, the pipeline's Schema tab shows the selected objects and keys; Jobs shows the run and per-object results.

Discovered source object and primary key

Completed pipeline with successful object and row counts

Finally, query the destination itself. For the unmodified starter, compare the actual id values with example-1 and example-2, and check that no extra rows were written. Row counts alone do not establish that the values are correct. See Ingestion Pipelines for ongoing sync management.

Iterating on a Connector​

After changing a built connector, increase its version in pyproject.toml, for example to 0.1.0.dev2. Regenerate the manifest, refresh dependency locks if needed, rerun checks and tests, and build again. Register and deploy the new artifact.

The same version cannot be replaced with different artifact bytes. Redeploying identical bytes reuses the prepared environment. Existing datasources keep their selected connector version; registering a newer version does not automatically repin them. For a development iteration, create a new test datasource for the new version before rerunning the pipeline workflow.

Keep the agent's persistent storage. If its connector checkout is replaced during recovery, deploy the local artifact again before running jobs that need it. Use the existing Docker agent lifecycle guidance for restarts and upgrades.

Troubleshooting​

ProblemWhat to check
connectors init is unknownUpdate the Supaflow CLI, then check supaflow connectors --help.
No compatible Python is selectedInstall Python 3.14 for CLI authoring; check uv --version and run supaflow connectors doctor --project ./mvp-records for an existing project.
Group reservation or registration is deniedConfirm your active organization and administrator/owner role. Use your organization's reserved group. CLI access setup is covered in the authentication guide.
Locks are staleRun the explicit connectors lock command after reviewing dependency changes.
Local deployment failsCheck the container name, running state, agent compatibility, and availability of the exact locked SDK/runtime wheels.
The connector is listed but a job cannot load itRegistration and deployment are separate. Deploy the exact version to the agent that executes the job.
Connection succeeds but schema discovery failsInspect the schema-refresh job in Activities, fix schema contract errors, and test the corrected version.
A pipeline failsOpen Jobs, inspect the failed object's error, and verify source/destination access from the private agent.

Support​

Contact support@supa-flow.io for help with connector development or private agent setup.