imarobot-agent
v1.0.0
Published
Register, manage, and rotate ImaRobot AI agent identities. Issuer-side SDK.
Maintainers
Readme
imarobot-agent
Register, manage, and rotate ImaRobot AI agent identities. Issuer-side SDK.
Install
npm install imarobot-agentQuick start
const { ImaRobotAgent } = require('imarobot-agent');
const client = new ImaRobotAgent({
apiKey: 'sk_live_YOUR_KEY',
});
// Register an agent
const agent = await client.registerAgent({
name: 'PortfolioBot',
issuerDomain: 'apexwealth.com',
scopes: ['read:portfolio', 'read:transactions'],
});
console.log(agent.token); // JWT — use this to authenticate with receiversKey generation
npx imarobot-agent generate-keys --output ./keys
# Writes: ./keys/private.pem and ./keys/public.pemAPI
client.registerAgent(options)— Register + get first tokenclient.issueToken(agentId)— Issue a new tokenclient.revokeAgent(agentId, { reason })— Revoke immediatelyclient.rotateAgent(agentId, { expiryDays, scopes })— Revoke + re-registerclient.listAgents({ status, limit, cursor })— List org's agents
Docs
License
MIT — Humans and Robots LLC
