import { UMP } from '@umpledger/sdk';
const ump = new UMP({ apiKey: 'ump_sk_demo' });
// Register the Writer Agent (service provider)
const writer = ump.agents.create({
name: 'Writer Agent',
type: 'AI_AGENT',
capabilities: ['text-generation', 'blog-writing'],
authority: { maxPerTransaction: 50, maxPerDay: 500 }
});
// → agentId: agt_... walletId: wal_...
// Register the Researcher Agent (service consumer)
const researcher = ump.agents.create({
name: 'Researcher Agent',
type: 'AI_AGENT',
capabilities: ['research', 'data-analysis'],
authority: { maxPerTransaction: 20, maxPerDay: 200 }
});
// → agentId: agt_... walletId: wal_...
POST /ump/v2/agents
X-API-Key: 'ump_sk_demo'
Content-Type: application/json
{
"name": "Writer Agent",
"type": "AI_AGENT",
"capabilities": ["text-generation", "blog-writing"],
"authority": { "max_per_transaction": 50, "max_per_day": 500 }
}
// Response →
{
"agent_id": "agt_...",
"wallet_id": "wal_...",
"status": "ACTIVE"
}