Connectors & data
TypeScript SDK methods for connectors, datasets, source registration, and repository intelligence — create, test, browse, onboard, snapshot, triage, and apply.
These AlgentaClient methods bring data into the engine and turn it into governed evidence: connectors (create, test, browse, update, delete), datasets (connect, list, summarize, refresh, delete), source registration, and repository intelligence (snapshot, triage, graph, simulate, apply). Method names are camelCase; bodies stay snake_case.
Connector methods
Create a connector, test it against the live source, then browse the tables it exposes. The preview* variants test or browse an unsaved connector from an inline config, without persisting it first.
import { AlgentaClient } from "algenta-sdk";
const client = new AlgentaClient({ apiKey: process.env.ALGENTA_API_KEY });
// 1. Create a connector.
const connector = await client.createConnector({
name: "Analytics Warehouse",
connector_type: "snowflake",
config: {
account: "xy12345.eu-central-1",
user: "ANALYTICS",
password: process.env.SNOWFLAKE_PASSWORD,
warehouse: "COMPUTE_WH",
database: "SALES",
schema: "PUBLIC",
},
});
// 2. Test the live connection, then browse its tables.
const test = await client.testConnector(connector.id);
if (test.success) {
const browse = await client.browseConnector(connector.id);
console.log(browse.total, "tables");
}createConnector(request)
POST /v1/connectors
name, connector_type, and a config; returns ConnectorInfo with status: "untested".
listConnectors(options?)
GET /v1/connectors
Paginate with page, limit.
getConnector(connectorId)
GET /v1/connectors/{id}
Fetch one connector.
updateConnector(connectorId, request)
PATCH /v1/connectors/{id}
Update name, description, visibility, or config.
testConnector(connectorId)
POST /v1/connectors/{id}/test
Real connection health check; flips status to live or error.
previewTestConnector(request)
POST /v1/connectors/test
Test an unsaved connector from a { connector_type, config } body.
browseConnector(connectorId)
GET /v1/connectors/{id}/browse
List the tables a live connector exposes.
previewBrowseConnector(request)
POST /v1/connectors/browse
Browse an unsaved connector from a { connector_type, config } body.
deleteConnector(connectorId)
DELETE /v1/connectors/{id}
Remove a connector; resolves to void.
Dataset methods
connectData onboards a selection (a table or a SQL query) from a saved connector as a queryable dataset. The rest of the family lists, inspects, refreshes, and deletes datasets. listDatasets supports search, status, sourceName (sent as source_name), and compact.
connectData(request)
POST /v1/data/connect
Onboard a selection from a connection_id; returns a DatasetConnectResult.
listDatasets(options?)
GET /v1/data
Filter with search, status, sourceName; compact returns lighter rows.
getDataset(datasetId)
GET /v1/data/{id}
Full dataset detail.
getDatasetSummary(datasetId)
GET /v1/data/{id}/summary
Schema, fields, and row counts.
refreshDataset(datasetId)
POST /v1/data/{id}/refresh
Re-ingest the dataset; returns a DatasetConnectResult.
deleteDataset(datasetId)
DELETE /v1/data/{id}
Remove a dataset.
Source registration methods
registerSource registers a raw source object as a dataset in one call; the optional second argument sets a description and name. refreshSource re-ingests a registered source by its dataset id.
registerSource(source, options?)
POST /v1/sources/register
source is the source object; options sets { description, name }.
refreshSource(datasetId)
POST /v1/data/{id}/refresh
Re-ingest a registered source; returns a SourceRegistrationResponse.
Repository intelligence methods
Repository intelligence turns a code repository into governed evidence. Snapshot the repo, triage an issue into ranked evidence, walk the symbol graph, simulate a candidate decision plan, and apply the result as a patch, branch, or pull request. Start by checking which languages the engine supports.
getRepositoryIntelligenceCapabilities()
GET /v1/repositories/capabilities
Supported languages and support progress.
createRepositorySnapshot(repositoryId, request)
POST /v1/repositories/{id}/snapshots
ref and optional include_patterns, exclude_patterns, max_files.
getRepositorySnapshot(repositoryId, snapshotId)
GET /v1/repositories/{id}/snapshots/{snapshotId}
Fetch one snapshot.
triageRepository(repositoryId, request)
POST /v1/repositories/{id}/triage
Ranked evidence from signals (issue_text, failing_tests, changed_files).
createRepositoryDecisionPlan(repositoryId, request)
POST /v1/repositories/{id}/decision-plans
Plan from a workspace_evidence_bundle_ref; optional model.
queryRepositoryGraph(repositoryId, request)
POST /v1/repositories/{id}/graph-query
Symbol/file graph; direction is inbound, outbound, or both.
simulateRepository(repositoryId, request)
POST /v1/repositories/{id}/simulate
Returns a DecisionEnvelope for a decision_plan_id.
applyRepository(repositoryId, request)
POST /v1/repositories/{id}/apply
mode is patch_only, local_branch, or remote_pr.
Next steps
Last updated
Was this helpful?