Skip to main content

Dashboard

The dashboard endpoint returns everything needed to render an agent management UI in a single request. Instead of making 4–5 separate calls for balance, spend, policies, transactions, and approvals, you get it all aggregated. Base path: GET /dashboard/:agentId
Auth: Agent JWT or tenant-level key

Get Agent Dashboard

Response:

Response Fields

agent

Agent identity from the Steward database — ID, tenant, name, and wallet address.

balances

Current on-chain balances. Currently returns evm (native ETH/gas token). The balance is fetched live from the configured RPC.
If the balance cannot be fetched (e.g., RPC unavailable), evm is null and the rest of the response is still returned.

spend

Current spend totals across all time ranges — today, this week, this month. Values are in wei (as strings) plus pre-formatted ETH strings. Includes only signed, broadcast, and confirmed transactions.

policies

The agent’s full current policy set, same format as GET /agents/:id/policies.

pendingApprovals

Count of pending approval queue items for this agent. Use this to show a badge count in your UI without fetching the full approval list.

recentTransactions

Last 5 transactions for the agent, most recent first. Each includes: ID, to address, value, status, chain ID, tx hash (if signed), and timestamp.

Performance

The dashboard endpoint runs all queries in parallel (Promise.all) — balance fetch, policy lookup, spend stats, recent transactions, and pending approval count all resolve concurrently. Typical latency is ~50–100ms.

Using with React

The @stwd/react components each use their own focused hooks, but you can prefetch dashboard data and hydrate them:
Or just let each component fetch its own data — the API is lightweight and the endpoints are fast.