@uniohq/agent
v0.2.0
Published
TypeScript SDK for Unio — discover, onboard, and call agent-native services.
Maintainers
Readme
@uniohq/agent
TypeScript SDK for Unio — the agent runtime for the open agent-software web. Discover services, onboard programmatically, and call them with credentials your agent issued itself.
npm install @uniohq/agentQuickstart
import { UnioAgent } from "@uniohq/agent";
const agent = await UnioAgent.init("my-agent", "[email protected]");
// 1. Discover
const services = await agent.find("send transactional email");
console.log(services.map((s) => s.service_id));
// 2. Onboard against the live Unio sandbox provider
await agent.onboard("unio-sandbox");
// 3. Call a capability
const reply = await agent.call<{ echoed: string; call_count: number }>(
"unio-sandbox",
"echo",
{ message: "hello from my agent" },
);
console.log(reply.echoed, reply.call_count);What's in scope (0.1.x)
UnioAgent.init(agentName, contactEmail, options?)— load or register an Ed25519 identity at~/.unio/agent.json.agent.find(intent, filters?)— semantic search against the registry, filtered by trust level.agent.onboard(serviceId)— POST to the provider'ssignup_endpoint, cache the issued credential in the OS keychain (or~/.unio/credentials.jsonifkeytarisn't available).agent.call(serviceId, capabilityId, payload)— build the HTTP request from the manifest'sapi.base_url+capability.path, attach the credential underapi.auth_header, return the parsed JSON.
Roadmap (0.2+)
Circuit breaker, throttling, delegation, and subscription notifications are already in the Python SDK — they'll land here once the API surface stabilises.
License
Apache-2.0
