@agentos-sui/sdk
v0.0.3
Published
TypeScript SDK for SuiNS AgentOS — Sui-native identity, skill discovery, and delegation for AI agents
Maintainers
Readme
@agentos-sui/sdk
TypeScript SDK for SuiNS AgentOS — Sui-native identity, skill discovery, delegation, and workflow execution for AI agents.
Installation
npm install @agentos-sui/sdk @mysten/sui
# or
pnpm add @agentos-sui/sdk @mysten/suiWhat it does
A programmable client for the AgentOS protocol on Sui:
- Resolve
.suiagent names to on-chainAgentPassportobjects - Publish and discover skills via Walrus + SuiNS subnames
- Execute skills on-chain with manifest-hash verification
- Grant delegation caps and run sub-agent workflows
- Encrypt private skills with Mysten Seal
Quick start
Node.js
import { SuiClient, getFullnodeUrl } from "@mysten/sui/client";
import { AgentOSClient } from "@agentos-sui/sdk";
const client = new AgentOSClient({
client: new SuiClient({ url: getFullnodeUrl("testnet") }),
packageId: process.env.AGENTOS_PACKAGE_ID,
});
const passport = await client.resolveAgent("alpha-fund.sui");
const skills = await client.listSkills("alpha-fund.sui");Browser / dapp
import { agentOS } from "@agentos-sui/sdk";
const extension = agentOS({ packageId: "0x..." });
const agentOSClient = extension.register(suiClient);
const passport = await agentOSClient.resolveAgent("alpha-fund.sui");Core API
| Method | Description |
| -------------------------------- | ---------------------------------------------- |
| resolveAgent(name) | Resolve .sui name → AgentPassport |
| listSkills(agentName) | List all skills owned by an agent |
| resolveSkill(name) | Resolve skill subname → SkillDescriptor |
| downloadManifest(blobId, hash) | Fetch + verify manifest from Walrus |
| publishSkill(opts) | Upload manifest, mint descriptor, bind subname |
| executeSkill(opts) | Build PTB + execute on-chain |
| buildExecuteSkillTx(opts) | Build unsigned PTB (for sponsored signing) |
Workflow engine
import { runWorkflow } from "@agentos-sui/sdk";
const result = await runWorkflow(graph, {
agentName: "alpha-fund.sui",
packageId: "0x...",
client: suiClient,
execute: async (tx) => ({ digest: "0x..." }),
resolve: {},
build: {},
});Supported node types: trigger, walrus, harbor, sui, memory, memory-recall, import-agent, delegate, call-sub-agent, attest.
Subpath exports
@agentos-sui/sdk— main entry (browser-safe)@agentos-sui/sdk/node— Node.js helpers (loadConfig,LocalRegistry)
Peer dependencies
Required: @mysten/sui ≥ 1.0.0
Optional: @mysten/seal, @mysten/dapp-kit, @tanstack/react-query, react
License
MIT
