npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sanvika/agents

v0.3.0

Published

Sanvika Agent Platform SDK — runAgent/runWorkflow enterprise client with fleet shims

Readme

@sanvika/agents

Enterprise client SDK for Sanvika Agent Platform (SAP) — decision intelligence for host platforms such as GAP (Digital Political Organization).

This package is a thin, domain-agnostic SDK. Domain intelligence (for example political) is selected by agentId / workflowId after sap install, not shipped inside this npm package.

AI Riya is a separate product. This SDK is not for end-user Riya chat.

Architecture summary

Host platform (GAP, …)
  → @sanvika/agents (this SDK)
    → in-process SAP runtime bridge  OR  legacy HTTP fleet endpoints
      → registries / governance / workflows / providers
        → domain packs (e.g. political)

Agents only: analyze, verify, audit, recommend, generate drafts, summarize, validate, explain.
Agents never: write business databases, appoint office bearers, perform payments, send WhatsApp/email, or approve decisions.

Installation

pnpm add @sanvika/agents
# or
npm install @sanvika/agents

Requires Node.js 18+.

Quick Start

Canonical APIs (in-process runtime)

Bind a SAP runtime bridge from your host (monorepo / platform process), then call:

import {
  setSapRuntime,
  runAgent,
  runWorkflow,
  runAnalysis,
  runAudit,
} from "@sanvika/agents";

// Host supplies the in-process SAP client (e.g. SapSdkClient from platform)
setSapRuntime(sapClient);

const analysis = await runAnalysis({
  agentId: "political.organization",
  input: { subjectRefs: { orgId: "…" }, question: "Summarize readiness gaps" },
});

const eligibility = await runAgent({
  agentId: "political.eligibility",
  capability: "VERIFY",
  input: { subjectRefs: { memberId: "…", vacancyId: "…" } },
});

const audit = await runAudit({
  agentId: "political.readiness",
  input: { subjectRefs: { orgId: "…" } },
});

const workflow = await runWorkflow({
  workflowId: "political.vacancy-analysis",
  input: { subjectRefs: { orgId: "…" } },
  idempotencyKey: "vacancy-1",
});

Without setSapRuntime, canonical methods throw SDK_RUNTIME_NOT_BOUND (HTTP routes for the new APIs are not part of this release).

Server / client class

import { SanvikaAgentsClient } from "@sanvika/agents/server";

const client = SanvikaAgentsClient.fromProcessEnv();
// Prefer: new SanvikaAgentsClient({ runtime: sapClient })

Configuration

| Variable | Purpose | |----------|---------| | CLIENT_ID / NEXT_PUBLIC_CLIENT_ID | Legacy fleet HTTP client id | | SANVIKA_SERVICE_KEY or AGENTS_CLIENT_SECRET | Legacy fleet auth | | AGENTS_URL / NEXT_PUBLIC_AGENTS_URL | Legacy fleet base URL (default production) | | SAP_SDK_DETERMINISTIC=1 | Host runtime: prefer deterministic agent results |

API reference

runAgent(options)

Execute one registered agent (ANALYZE / VERIFY / …).

runWorkflow(options)

Execute a registered multi-step workflow; returns run id, step results, aggregation.

runAnalysis(options)

Semantic helper for analysis-style capabilities (ANALYZE / SUMMARIZE / CLASSIFY).

runAudit(options)

Semantic helper for audit/validate-style agents.

Discovery

  • listAgents({ domain? })
  • getAgent(agentId)
  • listWorkflows({ domain? })
  • getRun(runId)

Runtime bridge

  • setSapRuntime(bridge)
  • getSapRuntime()

Compatibility / legacy shims

These remain exported for migration. They emit deprecation warnings and call the legacy HTTP fleet API:

| Shim | Prefer | |------|--------| | runFleetExpert | runAgent | | suggestFleetExpert | listAgents / getAgent | | runFleetExpertAuto | runAnalysis / runAgent | | buildStructuredPrompt | structured input on runAgent |

Version policy

| Version | Meaning | |---------|---------| | 0.3.x | SAP SDK surface + fleet shims (pre-1.0) | | 1.0.0 | Reserved for production-stable API + service contracts |

This release is 0.3.0, not 1.0.0.

License

MIT © Sanvika Production