xorb-sdk
v0.3.0
Published
TypeScript SDK for X.orb — Agent Trust Infrastructure API
Maintainers
Readme
xorb-sdk
TypeScript SDK for X.orb — the orchestration layer for AI agent trust.
Install
npm install xorb-sdkQuick Start
import { XorbClient } from 'xorb-sdk'
const xorb = new XorbClient({
apiUrl: 'https://api.xorb.xyz',
apiKey: 'xorb_sk_...',
})
// Register an agent
const { agent } = await xorb.agents.register({
name: 'my-bot',
role: 'RESEARCHER',
sponsor_address: '0x...',
})
// Execute action through 8-gate pipeline
const result = await xorb.actions.execute({
agent_id: agent.agentId,
action: 'query',
tool: 'get_balance',
})
if (result.approved) {
console.log('Approved!', result.audit_hash)
} else {
const failed = result.gates.find(g => !g.passed)
console.log('Blocked:', failed?.gate, failed?.reason)
}API
xorb.agents.register(params)— Register agentxorb.agents.list()— List agentsxorb.agents.get(id)— Get agentxorb.agents.pause(id, address)— Pause agentxorb.agents.resume(id, address)— Resume agentxorb.agents.revoke(id, address)— Revoke agentxorb.actions.execute(params)— Execute through 8-gate pipelinexorb.actions.batch(actions)— Batch executexorb.reputation.get(id)— Get trust scorexorb.webhooks.subscribe(url, events)— Subscribe to eventsxorb.audit.get(id)— Get audit logxorb.health()— Health checkxorb.pricing()— Get pricing
