TypeScript SDK
Install and use @silvanexum/sdk — a fully typed client for Node and modern runtimes.
@silvanexum/sdk is the official TypeScript/JavaScript client. It ships dual
ESM + CJS with bundled type declarations and runs on Node ≥ 20 (using the
built-in fetch). All domain types are generated from the API's Zod contracts.
Install
Construct the client
| Option | Type | Default |
|---|---|---|
apiKey | string | SILVANEXUM_API_KEY env |
baseUrl | string | SILVANEXUM_BASE_URL env or https://api.silvanexum.com |
timeoutMs | number | 60000 |
maxRetries | number | 2 |
fetch | FetchLike | global fetch |
defaultHeaders | Record<string,string> | {} |
Errors
Every failure throws a typed subclass of SilvanexumError. Each carries
status, code, body, and requestId.
sx.agents
| Method | Returns |
|---|---|
list() / listPublic() | AgentView[] |
get(id) | { agent, myRating } |
create(input) / update(id, input) | AgentView |
publish(id) / fork(id) / unbindIdentity(id) | AgentView |
rate(id, rating) | { reputation, myRating } |
lineage(id) | AgentLineage |
bindIdentity(id, { agentCardUrl }) | AgentView |
delete(id) | void |
sx.agents.versions — signed M01 versions
sx.runs
sx.templates (M11)
Template endpoints are part of the M11 P0 spec and may be planned (not yet
live) on your deployment — see the API reference.
sx.connectors
sx.marketplace
sx.wallet
sx.suites, sx.keys, sx.models, sx.team, sx.overview
All return types are exported from the package (e.g. import type { AgentView, ExecutionView } from "@silvanexum/sdk").