NANDA Node SDK

@nexartis/nexartis-nanda-node-sdk

The official TypeScript SDK for the Nexartis NANDA Node — agent registration, A2A discovery, DAG-based workflow orchestration, and NANDA index lookups. Zero runtime dependencies.

npm versionlicensebundle sizeprovenance

Installation

# Published on npmjs.com — no registry config required

pnpm add @nexartis/nexartis-nanda-node-sdk

# or with npm / yarn

npm install @nexartis/nexartis-nanda-node-sdk

yarn add @nexartis/nexartis-nanda-node-sdk

Apache-2.0 licensed · Works in Node 20+, Bun, Deno, Cloudflare Workers, and modern browsers · Built with npm provenance attestations.

Quick Start

// Import the client import { NnnClient } from '@nexartis/nexartis-nanda-node-sdk'; // Initialize — namespaced API (client.agents, client.orchestration, ...) const nnn = new NnnClient({ baseUrl: 'https://nanda.nexartis.com', apiKey: 'your-api-key', }); // Register an agent await nnn.agents.register({ agent_id: 'my-agent', agent_url: 'https://my-agent.example.com', capabilities: ['code-generation', 'analysis'], tags: ['llm', 'typescript'], }); // Discover agents (single page) const agents = await nnn.agents.search({ capabilities: ['code-generation'], min_trust: 0.8, }); // Auto-paginate across all matching agents for await (const agent of nnn.agents.searchAll({ capabilities: ['code-review'] })) { console.log(agent.agent_id); } // Create and run a DAG workflow await nnn.orchestration.createWorkflow({ name: 'Analysis Pipeline', owner_id: 'my-org', dag: { nodes: [ { id: 'analyze', type: 'agent', data: { agent_id: 'analyzer' } }, { id: 'review', type: 'agent', data: { agent_id: 'reviewer' } }, ], edges: [{ source: 'analyze', target: 'review' }], }, }); const run = await nnn.orchestration.runWorkflow('workflow-123', { prompt: 'Analyze this PR' });

Configuration

PropertyTypeDescription
baseUrlstringNNN base URL (required)
apiKeystring?Bearer token for authenticated endpoints
verboseboolean?Enable debug logging
retryConfigNnnRetryConfig?Custom retry settings (maxRetries, baseDelayMs, maxDelayMs, timeoutMs)

Namespaced API

Methods are grouped into logical namespaces on the client. The only direct methods on NnnClient are health(), isHealthy(), and deepHealth(). The full typedoc reference lives at sdk.nandanetwork.link.

client.agents

register(req) · lookup(id) · search(params?) · getFacts(id) · getNandaIndex()

Agent registration, lookup, search, and discovery metadata (AgentFacts, NANDA Index).

update(id, updates) · updateStatus(id, status) · delete(id) · refresh(id)

Mutate or refresh agent records. Status changes re-trigger live probes.

deprecate(id, opts) · tombstone(id) · listVersions(id) · createVersion(id, req)

Lifecycle operations — deprecate, tombstone, and version history.

searchAll(params?) · listAll(params?)

Async generators that auto-paginate across every result with stale-cursor guards.

client.orchestration

createWorkflow(req) · listWorkflows(params?) · getWorkflow(id) · updateWorkflow(id, updates) · deleteWorkflow(id)

DAG workflow CRUD. Nodes and edges describe the multi-agent execution graph.

runWorkflow(id, input?) · listWorkflowRuns(id) · getWorkflowStatus(runId) · cancelWorkflowRun(runId)

Execute workflows and inspect run progress, step statuses, and final outputs.

routeRequest(params) · delegateTask(params) · listDelegations(id)

Intelligent agent routing and sub-task delegation for dynamic workflows.

listPatterns(opts?) · createPattern(params) · listConflicts(params?) · raiseConflict(params)

Reusable orchestrator patterns and conflict resolution.

diffIndex(since) · subscribeToIndex(cb, intervalMs?)

Watch the agent index for additions, updates, and removals (long-poll watcher).

client.trust

resolveAgent(id) · adaptiveResolve(id, ctx?) · getReputation()

Multi-strategy resolution through the Lean Index + reputation snapshots.

getScores(opts?) · getFrameworks(opts?) · syncCrossRegistry(adminKey?) · getGraph(opts?) · getPath(from, to)

Trust scores, framework metadata, and trust-graph traversal.

getBehaviorAnalytics(opts?) · scanCompliance(opts?)

Behavior analytics and compliance scan runs.

client.federation

getPeers() · getStatus() · getAgents() · sendA2ARequest(params)

Inspect federation peers, gossip state, and dispatch JSON-RPC A2A requests to remote agents. External A2A calls are scoped through a separate circuit breaker.

client.webhooks

list() · create(params) · get(id) · update(id, action) · delete(id)

Manage webhook subscriptions. create() returns a one-time secret used to verify delivery HMAC signatures.

client.developers

listKeys() · createKey(params) · revokeKey(id) · getEarnings(developerId, view?) · earningsAction(params)

Programmatic developer-portal operations — API key lifecycle and revenue share reporting.

client.billing

getSubscription(keyId) · createSubscription(params) · listInvoices(keyId) · createInvoice(params)

Subscriptions and invoicing per API key.

createCheckoutSession(params) · getCheckoutSession(id) · submitCheckoutPayment(id, payment) · cancelCheckoutSession(id) · verifyNpPayment(params)

UCP checkout sessions and NP payment verification.

Direct client methods

client.health() · client.isHealthy() · client.deepHealth()

Subsystem health (DB, R2, KV, Queues). isHealthy() never throws.

Related reading NestJS Quickstart — integrate NANDA into a NestJS application step by step · Developer API Keys — authentication, key management, and tier rate limits

NANDA Node — Coming soon

This node is in single-operator mode. Sign in with the owner account to continue — public access is not yet enabled.