@zerro_ai/sdk
v0.1.6
Published
Zerro AI Infrastructure SDK — Swarm, Free API Hub, Legal Research, Localization, Gateway (see also Zero DevOps Agent Workers package)
Maintainers
Readme
@zerro_ai/sdk — Zerro AI Infrastructure
Zerro AI = 무료 API와 로컬 LLM을 위한 AI Operating System.
Phase 3 developer surface: API Hub · Swarm · Local LLM · Routing · Cost Optimization · AI Gateway · Legal Research · Localization.
Related infra (separate package): Zero DevOps Agent — packages/zero-devops-agent · docs/ZERO_DEVOPS_AGENT.md.
NVIDIA NIM (v0.1.5+): bundled default is deepseek-ai/deepseek-v4-flash-0731. Retired meta/llama-3.3-70b-instruct returns upstream 410 Gone — Swarm failovers.
Gemini (v0.1.6+): bundled swarm default is gemini-3.1-flash-lite. gemini-2.0-flash-lite shut down 2026-06-01.
import { createZerro, createLegalClient, createL10nClient } from "@zerro_ai/sdk";
const client = createZerro({
apiKeys: { groq: process.env.GROQ_API_KEY! },
swarm: { mode: "auto" }, // Auto failover · set mode: "max" for #1 only
gatewayUrl: process.env.ZERRO_GATEWAY_URL, // optional AI Gateway
});
await client.chat({
messages: [{ role: "user", content: "hi" }],
});
await client.agent({ name: "ops" }).generate("List free LLM providers");
await client.workflow({ goal: "Research AI news and draft a briefing" });
const legal = createLegalClient(); // https://kr-ai-legal.onrender.com
await legal.workspaceLegal({ question: "What notice is required to terminate?", lang: "en" });
const l10n = createL10nClient(); // https://zerro-localization.vercel.app
await l10n.listProjects();Install
npmjs (preferred):
npm install @zerro_ai/sdkRequires one-time setup: npm org @zerro_ai + GitHub secret NPM_TOKEN, then tag sdk-v* (or Actions → Publish @zerro_ai/sdk).
Token (required for CI publish):
- https://www.npmjs.com/settings/~/tokens → Granular Access Token
- Packages: Read and write
- Bypass two-factor authentication 체크 (필수 — 없으면 E403)
- Organization:
zerro_ai
- 또는 Classic → Automation 토큰 (2FA bypass 내장)
- GitHub → Settings → Secrets → Actions →
NPM_TOKEN업데이트
From GitHub Release (private repo — use a PAT):
npm install https://github.com/Benjamin5607/zero_ai/releases/download/sdk-v0.1.6/zerro-sdk-0.1.6.tgzSurface
| API | Maps to |
|-----|---------|
| zerro.chat() | Swarm Engine routing + failover |
| zerro.agent() | Named agent generate/chat |
| zerro.workflow() | Plan → execute (LLM or gateway tools) |
| zerro.swarm.configure() | Auto / MAX + model mix |
| zerro.providers.free() | Free API Hub (13+) |
| zerro.cost.inferCostTier() | Cost optimization hints |
| createLegalClient() | KR_AI_Legal plugin — Legal Research workstation |
| createL10nClient() | zerro-l10n plugin — Localization TMS |
| (related) Zero DevOps Agent | Cloudflare Workers package — not an SDK client; npm run devops:dev |
Legal Research
import { createLegalClient } from "@zerro_ai/sdk";
const legal = createLegalClient(); // default https://kr-ai-legal.onrender.com
await legal.getPlugin();
// Prefer ZeroAI BFF so Swarm Hyde/Jekyll + cite-check + authorities apply.
await legal.workspaceLegal({
question: "…",
rounds: 1,
lang: "ko",
mock: false,
llm: {
provider: "nvidia",
model: "deepseek-ai/deepseek-v4-flash-0731",
base_url: "https://zerroai.space/api/legal/llm?hyde_provider=nvidia&jekyll_provider=groq&…",
api_key: "zerroai-bridge",
},
});In the ZeroAI app: sidebar ⚖️ Legal — Matters · authority search · debate · verified report.
Docs: docs/LEGAL_RESEARCH.md.
Localization
import { createL10nClient } from "@zerro_ai/sdk";
const l10n = createL10nClient(); // default https://zerro-localization.vercel.app
await l10n.getPlugin();
await l10n.listProjects();
await l10n.translateBatch({ projectId: "…", locale: "ko" });
await l10n.otaBundle({ projectId: "…", locale: "ko" });In the ZeroAI app: sidebar 🌐 L10n — CAT embed · Settings console · Swarm Translator/Reviewer/QA.
Docs: docs/LOCALIZATION.md.
Build / publish
npm run sdk:build
# Tag: sdk-v0.1.6 → Actions publish-sdk.yml → GitHub Release offline tarball, then npmjsKeys
createZerro({ apiKeys: { groq: "…" } })- Or env:
GROQ_API_KEY/ZERRO_KEYS_JSON - Or
gatewayUrl→ app/api/proxy+/api/tools/execute
