SENTINEL Docs

Agents

Managing and monitoring agents.

Sentinel tracks agents implicitly through audit records. There is no separate agent registry — agents are discovered from the agent_id field in records.

getAgents

Get a summary for all known agents:

const agents = await dashboard.getAgents();

for (const agent of agents) {
  console.log(agent.agentId);
  console.log(agent.team);
  console.log(agent.totalSpend);
  console.log(agent.transactionCount);
  console.log(agent.lastActive);
}

AgentSummary

FieldTypeDescription
agentIdstringUnique agent identifier
teamstring | nullTeam from config
totalSpendstringTotal USDC spent (all time)
transactionCountnumberNumber of payments
lastActivenumberUnix timestamp of last payment

Top Spenders

import { topSpenders } from "@valeo/x402/dashboard";

const top = await topSpenders(storage, 10, "last_day");

for (const entry of top) {
  console.log(entry.agentId, entry.spend, entry.count);
}

Spend by Agent

import { spendByAgent } from "@valeo/x402/dashboard";

const result = await spendByAgent(storage, "agent-weather-001", "last_week");
console.log(result.spend, result.count);
console.log(result.records);  // Full AuditRecord[]

Agent identity is set at wrap time in SentinelConfig. There is no API to create or update agents — they appear as records are written.